@onairos/react-native 3.6.4 → 3.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/lib/commonjs/api/index.js +1 -1
  2. package/lib/commonjs/components/BodyText.js +1 -1
  3. package/lib/commonjs/components/BrandMark.js +1 -1
  4. package/lib/commonjs/components/CodeInput.js +1 -1
  5. package/lib/commonjs/components/EmailInput.js +1 -1
  6. package/lib/commonjs/components/GoogleButton.js +1 -1
  7. package/lib/commonjs/components/HeadingGroup.js +1 -1
  8. package/lib/commonjs/components/LLMDataInputModal.js +1 -1
  9. package/lib/commonjs/components/ModalHeader.js +1 -1
  10. package/lib/commonjs/components/ModalSheet.js +1 -1
  11. package/lib/commonjs/components/Onairos.js +1 -1
  12. package/lib/commonjs/components/OnairosButton.js +1 -1
  13. package/lib/commonjs/components/OnairosSignInButton.js +1 -1
  14. package/lib/commonjs/components/Overlay.js +1 -1
  15. package/lib/commonjs/components/PersonaImage.js +1 -1
  16. package/lib/commonjs/components/PersonaLoadingScreen.js +1 -1
  17. package/lib/commonjs/components/PersonalizationConsentScreen.js +1 -1
  18. package/lib/commonjs/components/PinCreationScreen.js +1 -1
  19. package/lib/commonjs/components/PinInput.js +1 -1
  20. package/lib/commonjs/components/PlatformConnectorsStep.js +1 -1
  21. package/lib/commonjs/components/PlatformList.js +1 -1
  22. package/lib/commonjs/components/PlatformToggle.js +1 -1
  23. package/lib/commonjs/components/PrimaryButton.js +1 -1
  24. package/lib/commonjs/components/SignInMatchAnimation.js +1 -1
  25. package/lib/commonjs/components/SignInStep.js +1 -1
  26. package/lib/commonjs/components/UniversalOnboarding.js +1 -1
  27. package/lib/commonjs/components/VerificationStep.js +1 -1
  28. package/lib/commonjs/components/WelcomeScreen.js +1 -1
  29. package/lib/commonjs/components/icons/Basicproficon.js +1 -1
  30. package/lib/commonjs/components/icons/Basicprofile.js +1 -1
  31. package/lib/commonjs/components/icons/Checkbox.js +1 -1
  32. package/lib/commonjs/components/icons/Checkmark.js +1 -1
  33. package/lib/commonjs/components/icons/Contentanalysis.js +1 -1
  34. package/lib/commonjs/components/icons/Contenticon.js +1 -1
  35. package/lib/commonjs/components/icons/EnochE.js +1 -1
  36. package/lib/commonjs/components/icons/Personalityicon.js +1 -1
  37. package/lib/commonjs/components/icons/Personalityprofile.js +1 -1
  38. package/lib/commonjs/components/icons/Personalitytraits.js +1 -1
  39. package/lib/commonjs/components/icons/Userpreferences.js +1 -1
  40. package/lib/commonjs/components/icons/index.js +1 -1
  41. package/lib/commonjs/components/onboarding/OAuthWebView.js +1 -1
  42. package/lib/commonjs/components/onboarding/OnboardingHeader.js +1 -1
  43. package/lib/commonjs/components/onboarding/PinInput.js +1 -1
  44. package/lib/commonjs/components/onboarding/PlatformConnector.js +1 -1
  45. package/lib/commonjs/config/api.js +1 -1
  46. package/lib/commonjs/constants/index.js +1 -1
  47. package/lib/commonjs/context/AuthContext.js +1 -1
  48. package/lib/commonjs/hooks/useConnectedAccounts.js +1 -1
  49. package/lib/commonjs/hooks/useConnections.js +1 -1
  50. package/lib/commonjs/hooks/useCredentials.js +1 -1
  51. package/lib/commonjs/hooks/useUserConnections.js +1 -1
  52. package/lib/commonjs/index.js +1 -1
  53. package/lib/commonjs/services/apiClient.js +1 -1
  54. package/lib/commonjs/services/apiKeyService.js +924 -9
  55. package/lib/commonjs/services/authService.js +627 -10
  56. package/lib/commonjs/services/biometricPinService.js +1 -1
  57. package/lib/commonjs/services/chatGPTConversationExtractor.js +1 -1
  58. package/lib/commonjs/services/chatGPTConversationService.js +1 -1
  59. package/lib/commonjs/services/claudeConversationExtractor.js +1 -1
  60. package/lib/commonjs/services/claudeConversationService.js +1 -1
  61. package/lib/commonjs/services/connectedAccountsService.js +1 -1
  62. package/lib/commonjs/services/googleAuthService.js +1 -1
  63. package/lib/commonjs/services/hingeDataExtractor.js +1 -1
  64. package/lib/commonjs/services/hingeDataService.js +1 -1
  65. package/lib/commonjs/services/imageCompressionService.js +1 -1
  66. package/lib/commonjs/services/instagramDataExtractor.js +1 -1
  67. package/lib/commonjs/services/instagramDataService.js +1 -1
  68. package/lib/commonjs/services/jwtStorageService.js +1 -1
  69. package/lib/commonjs/services/linkedinDOMExtractor.js +1 -1
  70. package/lib/commonjs/services/linkedinProfileService.js +1 -1
  71. package/lib/commonjs/services/linkedinScrapingService.js +1 -1
  72. package/lib/commonjs/services/llmDataStorage.js +1 -1
  73. package/lib/commonjs/services/mobileTrainingService.js +1 -1
  74. package/lib/commonjs/services/oauthService.js +391 -11
  75. package/lib/commonjs/services/pinEncryptionService.js +1 -1
  76. package/lib/commonjs/services/pinStorageUtils.js +1 -1
  77. package/lib/commonjs/services/platformAuthService.js +1 -1
  78. package/lib/commonjs/services/sephoraDataExtractor.js +1 -1
  79. package/lib/commonjs/services/sephoraDataService.js +1 -1
  80. package/lib/commonjs/services/storageService.js +1 -1
  81. package/lib/commonjs/services/telegramDataExtractor.js +1 -1
  82. package/lib/commonjs/services/telegramDataService.js +1 -1
  83. package/lib/commonjs/services/trainingApiHelpers.js +1 -1
  84. package/lib/commonjs/services/userConnectionsService.js +1 -1
  85. package/lib/commonjs/services/youtubeMigrationService.js +1 -1
  86. package/lib/commonjs/theme/index.js +1 -1
  87. package/lib/commonjs/types/index.js +1 -1
  88. package/lib/commonjs/types.js +1 -1
  89. package/lib/commonjs/utils/Portal.js +1 -1
  90. package/lib/commonjs/utils/api.js +1 -1
  91. package/lib/commonjs/utils/assetRegistry.js +1 -1
  92. package/lib/commonjs/utils/auth.js +1 -1
  93. package/lib/commonjs/utils/connectorTests.js +1 -1
  94. package/lib/commonjs/utils/crypto.js +1 -1
  95. package/lib/commonjs/utils/debugHelper.js +1 -1
  96. package/lib/commonjs/utils/encryption.js +1 -1
  97. package/lib/commonjs/utils/eventUtils.js +1 -1
  98. package/lib/commonjs/utils/haptics.js +1 -1
  99. package/lib/commonjs/utils/imagePreloader.js +1 -1
  100. package/lib/commonjs/utils/networkDiagnostics.js +1 -1
  101. package/lib/commonjs/utils/onairosApi.js +1 -1
  102. package/lib/commonjs/utils/programmaticFlow.js +1 -1
  103. package/lib/commonjs/utils/retryHelper.js +1 -1
  104. package/lib/commonjs/utils/secureStorage.js +1 -1
  105. package/lib/commonjs/utils/webviewScripts/chatgpt.js +1 -1
  106. package/lib/commonjs/utils/webviewScripts/claude.js +1 -1
  107. package/lib/commonjs/utils/webviewScripts/hinge.js +1 -1
  108. package/lib/commonjs/utils/webviewScripts/index.js +1 -1
  109. package/lib/commonjs/utils/webviewScripts/instagram.js +1 -1
  110. package/lib/commonjs/utils/webviewScripts/linkedin.js +1 -1
  111. package/lib/commonjs/utils/webviewScripts/sephora.js +1 -1
  112. package/lib/commonjs/utils/webviewScripts/telegram.js +1 -1
  113. package/lib/module/api/index.js +1 -1
  114. package/lib/module/components/BodyText.js +1 -1
  115. package/lib/module/components/BrandMark.js +1 -1
  116. package/lib/module/components/CodeInput.js +1 -1
  117. package/lib/module/components/EmailInput.js +1 -1
  118. package/lib/module/components/GoogleButton.js +1 -1
  119. package/lib/module/components/HeadingGroup.js +1 -1
  120. package/lib/module/components/LLMDataInputModal.js +1 -1
  121. package/lib/module/components/ModalHeader.js +1 -1
  122. package/lib/module/components/ModalSheet.js +1 -1
  123. package/lib/module/components/Onairos.js +1 -1
  124. package/lib/module/components/OnairosButton.js +1 -1
  125. package/lib/module/components/OnairosSignInButton.js +1 -1
  126. package/lib/module/components/Overlay.js +1 -1
  127. package/lib/module/components/PersonaImage.js +1 -1
  128. package/lib/module/components/PersonaLoadingScreen.js +1 -1
  129. package/lib/module/components/PersonalizationConsentScreen.js +1 -1
  130. package/lib/module/components/PinCreationScreen.js +1 -1
  131. package/lib/module/components/PinInput.js +1 -1
  132. package/lib/module/components/PlatformConnectorsStep.js +1 -1
  133. package/lib/module/components/PlatformList.js +1 -1
  134. package/lib/module/components/PlatformToggle.js +1 -1
  135. package/lib/module/components/PrimaryButton.js +1 -1
  136. package/lib/module/components/SignInMatchAnimation.js +1 -1
  137. package/lib/module/components/SignInStep.js +1 -1
  138. package/lib/module/components/UniversalOnboarding.js +1 -1
  139. package/lib/module/components/VerificationStep.js +1 -1
  140. package/lib/module/components/WelcomeScreen.js +1 -1
  141. package/lib/module/components/icons/Basicproficon.js +1 -1
  142. package/lib/module/components/icons/Basicprofile.js +1 -1
  143. package/lib/module/components/icons/Checkbox.js +1 -1
  144. package/lib/module/components/icons/Checkmark.js +1 -1
  145. package/lib/module/components/icons/Contentanalysis.js +1 -1
  146. package/lib/module/components/icons/Contenticon.js +1 -1
  147. package/lib/module/components/icons/EnochE.js +1 -1
  148. package/lib/module/components/icons/Personalityicon.js +1 -1
  149. package/lib/module/components/icons/Personalityprofile.js +1 -1
  150. package/lib/module/components/icons/Personalitytraits.js +1 -1
  151. package/lib/module/components/icons/Userpreferences.js +1 -1
  152. package/lib/module/components/onboarding/OAuthWebView.js +1 -1
  153. package/lib/module/components/onboarding/OnboardingHeader.js +1 -1
  154. package/lib/module/components/onboarding/PinInput.js +1 -1
  155. package/lib/module/components/onboarding/PlatformConnector.js +1 -1
  156. package/lib/module/config/api.js +1 -1
  157. package/lib/module/constants/index.js +1 -1
  158. package/lib/module/context/AuthContext.js +1 -1
  159. package/lib/module/hooks/useConnectedAccounts.js +1 -1
  160. package/lib/module/hooks/useConnections.js +1 -1
  161. package/lib/module/hooks/useCredentials.js +1 -1
  162. package/lib/module/hooks/useUserConnections.js +1 -1
  163. package/lib/module/index.js +1 -1
  164. package/lib/module/services/apiClient.js +1 -1
  165. package/lib/module/services/apiKeyService.js +898 -1
  166. package/lib/module/services/authService.js +602 -1
  167. package/lib/module/services/biometricPinService.js +1 -1
  168. package/lib/module/services/chatGPTConversationExtractor.js +1 -1
  169. package/lib/module/services/chatGPTConversationService.js +1 -1
  170. package/lib/module/services/claudeConversationExtractor.js +1 -1
  171. package/lib/module/services/claudeConversationService.js +1 -1
  172. package/lib/module/services/connectedAccountsService.js +1 -1
  173. package/lib/module/services/googleAuthService.js +1 -1
  174. package/lib/module/services/hingeDataExtractor.js +1 -1
  175. package/lib/module/services/hingeDataService.js +1 -1
  176. package/lib/module/services/imageCompressionService.js +1 -1
  177. package/lib/module/services/instagramDataExtractor.js +1 -1
  178. package/lib/module/services/instagramDataService.js +1 -1
  179. package/lib/module/services/jwtStorageService.js +1 -1
  180. package/lib/module/services/linkedinDOMExtractor.js +1 -1
  181. package/lib/module/services/linkedinProfileService.js +1 -1
  182. package/lib/module/services/linkedinScrapingService.js +1 -1
  183. package/lib/module/services/llmDataStorage.js +1 -1
  184. package/lib/module/services/mobileTrainingService.js +1 -1
  185. package/lib/module/services/oauthService.js +381 -1
  186. package/lib/module/services/pinEncryptionService.js +1 -1
  187. package/lib/module/services/pinStorageUtils.js +1 -1
  188. package/lib/module/services/platformAuthService.js +1 -1
  189. package/lib/module/services/sephoraDataExtractor.js +1 -1
  190. package/lib/module/services/sephoraDataService.js +1 -1
  191. package/lib/module/services/storageService.js +1 -1
  192. package/lib/module/services/telegramDataExtractor.js +1 -1
  193. package/lib/module/services/telegramDataService.js +1 -1
  194. package/lib/module/services/trainingApiHelpers.js +1 -1
  195. package/lib/module/services/userConnectionsService.js +1 -1
  196. package/lib/module/services/youtubeMigrationService.js +1 -1
  197. package/lib/module/theme/index.js +1 -1
  198. package/lib/module/types.js +1 -1
  199. package/lib/module/utils/Portal.js +1 -1
  200. package/lib/module/utils/api.js +1 -1
  201. package/lib/module/utils/assetRegistry.js +1 -1
  202. package/lib/module/utils/auth.js +1 -1
  203. package/lib/module/utils/connectorTests.js +1 -1
  204. package/lib/module/utils/crypto.js +1 -1
  205. package/lib/module/utils/debugHelper.js +1 -1
  206. package/lib/module/utils/encryption.js +1 -1
  207. package/lib/module/utils/eventUtils.js +1 -1
  208. package/lib/module/utils/haptics.js +1 -1
  209. package/lib/module/utils/networkDiagnostics.js +1 -1
  210. package/lib/module/utils/onairosApi.js +1 -1
  211. package/lib/module/utils/programmaticFlow.js +1 -1
  212. package/lib/module/utils/retryHelper.js +1 -1
  213. package/lib/module/utils/secureStorage.js +1 -1
  214. package/lib/module/utils/webviewScripts/chatgpt.js +1 -1
  215. package/lib/module/utils/webviewScripts/claude.js +1 -1
  216. package/lib/module/utils/webviewScripts/hinge.js +1 -1
  217. package/lib/module/utils/webviewScripts/index.js +1 -1
  218. package/lib/module/utils/webviewScripts/instagram.js +1 -1
  219. package/lib/module/utils/webviewScripts/linkedin.js +1 -1
  220. package/lib/module/utils/webviewScripts/sephora.js +1 -1
  221. package/lib/module/utils/webviewScripts/telegram.js +1 -1
  222. package/package.json +1 -1
@@ -1 +1 @@
1
- import AsyncStorage from'@react-native-async-storage/async-storage';import{API_CONFIG}from'../config/api';const LLM_DATA_STORAGE_KEY='@onairos:llm_data',LLM_METADATA_STORAGE_KEY=_0x3430(0x0);export const storeLLMData=async _0xc49402=>{const _0x318cd8={'fKpAw':_0x3430(0x1),'EOUGb':_0x3430(0x2)};try{console['log'](_0x3430(0x3)),await AsyncStorage[_0x3430(0x4)](LLM_DATA_STORAGE_KEY+':'+_0xc49402[_0x3430(0x5)],JSON[_0x3430(0x6)](_0xc49402));const _0x1a84d4={'userId':_0xc49402[_0x3430(0x5)],'email':_0xc49402['email'],'appName':_0xc49402[_0x3430(0x7)],'timestamp':_0xc49402['timestamp'],'hasData':!![],'dataSize':JSON[_0x3430(0x6)](_0xc49402[_0x3430(0x8)])[_0x3430(0x9)],'connectionStatus':'connected'};return await AsyncStorage['setItem'](LLM_METADATA_STORAGE_KEY+':'+_0xc49402[_0x3430(0x5)],JSON[_0x3430(0x6)](_0x1a84d4)),console['log'](_0x318cd8['fKpAw']),console[_0x3430(0xa)](_0x3430(0xb)+_0x1a84d4[_0x3430(0xc)]+_0x3430(0xd)),!![];}catch(_0x18e875){return console[_0x3430(0xe)](_0x318cd8['EOUGb'],_0x18e875),![];}};export const getLLMData=async _0x300507=>{const _0x251430={'WUeVb':_0x3430(0xf),'hcwSt':'DMyOc','NOqkg':_0x3430(0x10),'PORdO':_0x3430(0x11)};try{if(_0x251430[_0x3430(0x12)]===_0x3430(0x13))return _0x1d3c5f['error'](_0x251430[_0x3430(0x14)],_0x6a8e32),![];else{const _0x1088ff=await AsyncStorage[_0x3430(0x15)](LLM_DATA_STORAGE_KEY+':'+_0x300507);if(!_0x1088ff)return console['log'](_0x251430[_0x3430(0x16)],_0x300507),null;const _0x5181bf=JSON[_0x3430(0x17)](_0x1088ff);return console[_0x3430(0xa)](_0x3430(0x18),_0x300507),_0x5181bf;}}catch(_0x239192){return console[_0x3430(0xe)](_0x251430[_0x3430(0x19)],_0x239192),null;}};export const getLLMMetadata=async _0x463ae3=>{const _0x1e0e7c={'XmcPB':function(_0x252924,_0x4b177e){return _0x252924!==_0x4b177e;},'yTDQq':_0x3430(0x1a),'McgGO':'❌\x20Failed\x20to\x20retrieve\x20LLM\x20metadata:'};try{const _0x398c24=await AsyncStorage[_0x3430(0x15)](LLM_METADATA_STORAGE_KEY+':'+_0x463ae3);if(!_0x398c24)return null;return JSON[_0x3430(0x17)](_0x398c24);}catch(_0x2f8a16){return _0x1e0e7c[_0x3430(0x1b)]('jKyhX',_0x1e0e7c[_0x3430(0x1c)])?(console[_0x3430(0xe)](_0x1e0e7c['McgGO'],_0x2f8a16),null):null;}};export const updateLLMStatus=async(_0x124aa8,_0x17c987)=>{const _0x578802={'uHEBj':_0x3430(0x10),'nAAWu':function(_0xf53e94,_0x4b4256){return _0xf53e94!==_0x4b4256;},'zeEKJ':'cNQed','HrRVd':_0x3430(0x1d),'WhtvI':_0x3430(0x1e)};try{if(_0x578802[_0x3430(0x1f)](_0x578802['zeEKJ'],_0x578802[_0x3430(0x20)])){const _0x1ce022=await getLLMMetadata(_0x124aa8);if(!_0x1ce022)return console[_0x3430(0x21)](_0x578802['WhtvI'],_0x124aa8),![];return _0x1ce022[_0x3430(0x22)]=_0x17c987,await AsyncStorage[_0x3430(0x4)](LLM_METADATA_STORAGE_KEY+':'+_0x124aa8,JSON[_0x3430(0x6)](_0x1ce022)),console[_0x3430(0xa)](_0x3430(0x23)+_0x17c987),!![];}else return _0x2ed0a4['log'](_0x578802['uHEBj'],_0x4604f4),null;}catch(_0x1fa286){return console[_0x3430(0xe)](_0x3430(0x24),_0x1fa286),![];}};export const clearLLMData=async _0x1a9ee9=>{const _0x36acd9={'CLiGI':function(_0x3a27a2,_0x5c7144){return _0x3a27a2===_0x5c7144;},'JeiTY':_0x3430(0x25),'RQgob':'✅\x20LLM\x20data\x20cleared\x20for\x20user:','aDXgf':_0x3430(0xf)};try{return _0x36acd9['CLiGI']('MZlbm',_0x36acd9[_0x3430(0x26)])?(_0x5157d8[_0x3430(0xe)](_0x3430(0x2),_0x27da6f),![]):(await AsyncStorage['removeItem'](LLM_DATA_STORAGE_KEY+':'+_0x1a9ee9),await AsyncStorage[_0x3430(0x27)](LLM_METADATA_STORAGE_KEY+':'+_0x1a9ee9),console[_0x3430(0xa)](_0x36acd9['RQgob'],_0x1a9ee9),!![]);}catch(_0x7b27e5){return console[_0x3430(0xe)](_0x36acd9[_0x3430(0x28)],_0x7b27e5),![];}};export const hasOnlyLLMConnection=_0x560c86=>{const _0x201183={'jgCfp':_0x3430(0x29),'CkGDf':_0x3430(0x2a),'RDjXq':_0x3430(0x2b)},_0x1a37d7=Object['entries'](_0x560c86)[_0x3430(0x2c)](([_0x21291d,_0x490184])=>_0x490184)[_0x3430(0x2d)](([_0x3e0520,_0x4862cd])=>_0x3e0520),_0x58387e=_0x1a37d7[_0x3430(0x2e)](_0x201183['jgCfp'])||_0x1a37d7[_0x3430(0x2e)](_0x201183[_0x3430(0x2f)]),_0x2d3636=_0x1a37d7[_0x3430(0x9)]===0x1&&_0x58387e;return console[_0x3430(0xa)](_0x201183[_0x3430(0x30)],{'connectedPlatforms':_0x1a37d7,'hasLLM':_0x58387e,'onlyLLM':_0x2d3636}),_0x2d3636;};export const formatLLMDataForDeveloper=_0x5478d6=>{const _0x156019={'pZvth':'chatgpt','irLeP':_0x3430(0x31)};return{'platform':_0x3430(0x29),'userId':_0x5478d6['userId'],'email':_0x5478d6['email'],'timestamp':_0x5478d6[_0x3430(0x32)],'data':{'type':_0x156019[_0x3430(0x33)],'conversations':_0x5478d6['data'][_0x3430(0x34)]||[],'chatHistory':_0x5478d6[_0x3430(0x8)]['chatHistory']||[],'preferences':_0x5478d6[_0x3430(0x8)][_0x3430(0x35)]||{},'customData':_0x5478d6[_0x3430(0x8)][_0x3430(0x36)]||{}},'metadata':{'appName':_0x5478d6[_0x3430(0x7)],'collectedAt':new Date(_0x5478d6['timestamp'])[_0x3430(0x37)](),'dataVersion':_0x156019[_0x3430(0x38)]}};};export const sendLLMDataToBackend=async(_0x48fdc9,_0x328561)=>{const _0x537b26={'wnfmN':_0x3430(0x39),'zluFB':function(_0x3314a1,_0xf6a7e,_0x2d9bc8){return _0x3314a1(_0xf6a7e,_0x2d9bc8);},'EIHuM':function(_0x5b7494,_0x6701dd){return _0x5b7494&&_0x6701dd;},'xMKpS':_0x3430(0x29),'DYsVt':_0x3430(0x2a),'JLkwm':_0x3430(0x31),'OZXJP':'✅\x20Backend\x20received\x20and\x20stored\x20LLM\x20data:','YbruY':_0x3430(0x3a),'sCDgo':_0x3430(0x3b),'IeHHl':function(_0x4c1402,_0x54467b){return _0x4c1402 instanceof _0x54467b;},'eFnFj':_0x3430(0x3c)};try{console[_0x3430(0xa)](_0x537b26['wnfmN']);const _0x3d0246=await _0x537b26['zluFB'](fetch,API_CONFIG[_0x3430(0x3d)]+_0x3430(0x3e),{'method':'POST','headers':{'Content-Type':'application/json',..._0x537b26[_0x3430(0x3f)](_0x328561,{'Authorization':_0x3430(0x40)+_0x328561})},'body':JSON[_0x3430(0x6)]({'userId':_0x48fdc9[_0x3430(0x5)],'email':_0x48fdc9[_0x3430(0x41)],'appName':_0x48fdc9[_0x3430(0x7)],'platform':_0x537b26['xMKpS'],'connectionType':_0x537b26[_0x3430(0x42)],'timestamp':new Date()['toISOString'](),'data':_0x48fdc9['data'],'accessToken':_0x48fdc9[_0x3430(0x43)],'refreshToken':_0x48fdc9['refreshToken'],'tokenExpiry':_0x48fdc9[_0x3430(0x44)],'metadata':{'collectedAt':new Date(_0x48fdc9[_0x3430(0x32)])[_0x3430(0x37)](),'dataVersion':_0x537b26['JLkwm']}})});if(_0x3d0246['ok']){const _0x386a7b=await _0x3d0246['json']();return console['log'](_0x537b26[_0x3430(0x45)],_0x386a7b),{'success':!![],'message':_0x386a7b[_0x3430(0x46)],'connectionId':_0x386a7b[_0x3430(0x47)]};}else{const _0x492168=await _0x3d0246[_0x3430(0x48)]();return console['error'](_0x537b26[_0x3430(0x49)],_0x3d0246[_0x3430(0x4a)],_0x492168),{'success':![],'message':_0x3430(0x4b)+_0x3d0246[_0x3430(0x4a)]};}}catch(_0x507d90){return console[_0x3430(0xe)](_0x537b26[_0x3430(0x4c)],_0x507d90),{'success':![],'message':_0x537b26['IeHHl'](_0x507d90,Error)?_0x507d90['message']:_0x537b26[_0x3430(0x4d)]};}};export const requestLLMDataForDeveloper=async(_0x2ed417,_0x2cd1e3,_0xc5196b,_0x1b7407,_0x2b9818)=>{const _0x57b644={'OiFoo':_0x3430(0x3c),'VaXUR':_0x3430(0x4e),'wCvqd':'✅\x20Backend\x20processing\x20LLM\x20data\x20request:','htWMB':_0x3430(0x4f),'lTAkb':_0x3430(0x50),'mUhGL':_0x3430(0x51),'MZFWs':_0x3430(0x52)};try{console[_0x3430(0xa)](_0x57b644[_0x3430(0x53)]);const _0x33daf2=await fetch(API_CONFIG['BASE_URL']+_0x3430(0x54),{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x2b9818},'body':JSON[_0x3430(0x6)]({'userId':_0x2ed417,'email':_0x2cd1e3,'appName':_0xc5196b,'requestedData':_0x1b7407,'timestamp':new Date()[_0x3430(0x37)]()})});if(_0x33daf2['ok']){const _0xb7bb72=await _0x33daf2['json']();return console[_0x3430(0xa)](_0x57b644[_0x3430(0x55)],_0xb7bb72),{'success':!![],'message':_0xb7bb72['message'],'apiUrl':_0xb7bb72['apiUrl'],'token':_0xb7bb72['token']};}else{const _0x480a02=await _0x33daf2[_0x3430(0x48)]();return console[_0x3430(0xe)](_0x57b644['htWMB'],_0x33daf2[_0x3430(0x4a)],_0x480a02),{'success':![],'message':_0x3430(0x4b)+_0x33daf2[_0x3430(0x4a)]};}}catch(_0x373310){return _0x57b644[_0x3430(0x56)]===_0x57b644['mUhGL']?(_0x577c70[_0x3430(0xe)](_0x3430(0x52),_0x50afc7),{'success':![],'message':_0x5492d9 instanceof _0x5a31ab?_0x3d5a81[_0x3430(0x46)]:_0x57b644[_0x3430(0x57)]}):(console[_0x3430(0xe)](_0x57b644[_0x3430(0x58)],_0x373310),{'success':![],'message':_0x373310 instanceof Error?_0x373310[_0x3430(0x46)]:_0x57b644[_0x3430(0x57)]});}};function _0x3430(_0x3bc802,_0x343074){_0x3bc802=_0x3bc802-0x0;const _0x145fc8=_0x3bc8();let _0x49119a=_0x145fc8[_0x3bc802];return _0x49119a;}function _0x3bc8(){const _0x55f732=['@onairos:llm_metadata','✅\x20LLM\x20data\x20stored\x20locally\x20successfully','❌\x20Failed\x20to\x20store\x20LLM\x20data:','💾\x20Storing\x20LLM\x20data\x20locally\x20(temporary)...','setItem','userId','stringify','appName','data','length','log','📊\x20Data\x20size:\x20','dataSize','\x20bytes','error','❌\x20Failed\x20to\x20clear\x20LLM\x20data:','ℹ️\x20No\x20LLM\x20data\x20found\x20for\x20user:','❌\x20Failed\x20to\x20retrieve\x20LLM\x20data:','hcwSt','SvUym','WUeVb','getItem','NOqkg','parse','✅\x20Retrieved\x20LLM\x20data\x20for\x20user:','PORdO','cLbkQ','XmcPB','yTDQq','oKOGN','⚠️\x20No\x20LLM\x20metadata\x20found\x20for\x20user:','nAAWu','HrRVd','warn','connectionStatus','✅\x20Updated\x20LLM\x20status\x20to:\x20','❌\x20Failed\x20to\x20update\x20LLM\x20status:','SANqR','JeiTY','removeItem','aDXgf','llm','chatgpt','🔍\x20Platform\x20connection\x20check:','filter','map','includes','CkGDf','RDjXq','1.0','timestamp','pZvth','conversations','preferences','customData','toISOString','irLeP','📡\x20Sending\x20LLM\x20data\x20to\x20backend\x20for\x20processing...','❌\x20Backend\x20data\x20ingestion\x20failed:','❌\x20Failed\x20to\x20send\x20data\x20to\x20backend:','Unknown\x20error','BASE_URL','/llmdata','EIHuM','Bearer\x20','email','DYsVt','accessToken','tokenExpiry','OZXJP','message','connectionId','text','YbruY','status','Backend\x20error:\x20','sCDgo','eFnFj','📤\x20Requesting\x20backend\x20to\x20send\x20LLM\x20data\x20to\x20developer...','❌\x20Failed\x20to\x20request\x20LLM\x20data:','DnMTh','pglcu','❌\x20Failed\x20to\x20request\x20LLM\x20data\x20from\x20backend:','VaXUR','/llmdata/request','wCvqd','lTAkb','OiFoo','MZFWs','KuDKi','XCAvl','getAllKeys','startsWith','gfSSR'];_0x3bc8=function(){return _0x55f732;};return _0x3bc8();}export const getAllLLMDataKeys=async()=>{const _0x364f9f={'QoZZr':_0x3430(0x24),'KuDKi':function(_0x3bd1e8,_0x4370ba){return _0x3bd1e8!==_0x4370ba;},'gfSSR':'❌\x20Failed\x20to\x20get\x20LLM\x20data\x20keys:'};try{if(_0x364f9f[_0x3430(0x59)](_0x3430(0x5a),'kIGWq')){const _0x253b98=await AsyncStorage[_0x3430(0x5b)](),_0x401c47=_0x253b98[_0x3430(0x2c)](_0xc206a1=>_0xc206a1[_0x3430(0x5c)](LLM_DATA_STORAGE_KEY)||_0xc206a1['startsWith'](LLM_METADATA_STORAGE_KEY));return _0x401c47;}else return _0x8de0e1[_0x3430(0xe)](_0x364f9f['QoZZr'],_0x12a1cb),![];}catch(_0x4913a0){return console[_0x3430(0xe)](_0x364f9f[_0x3430(0x5d)],_0x4913a0),[];}};
1
+ import AsyncStorage from'@react-native-async-storage/async-storage';import{API_CONFIG}from'../config/api';const LLM_DATA_STORAGE_KEY=_0x36b8(0x0),LLM_METADATA_STORAGE_KEY='@onairos:llm_metadata';function _0x3b4c(){const _0x3d55b3=['@onairos:llm_data','Unknown\x20error','Ntvdl','connected','✅\x20LLM\x20data\x20stored\x20locally\x20successfully','KlWfR','LPcgc','error','❌\x20Failed\x20to\x20send\x20data\x20to\x20backend:','PBMnG','message','FDpSN','log','setItem','userId','stringify','email','appName','timestamp','data','length','eZjHz','\x20bytes','uBbHF','ℹ️\x20No\x20LLM\x20data\x20found\x20for\x20user:','getItem','parse','✅\x20Retrieved\x20LLM\x20data\x20for\x20user:','iZVhG','❌\x20Failed\x20to\x20retrieve\x20LLM\x20metadata:','❌\x20Failed\x20to\x20clear\x20LLM\x20data:','nPGPJ','yjHSK','⚠️\x20No\x20LLM\x20metadata\x20found\x20for\x20user:','wXPKv','KQsbY','sACRf','ZdgDw','warn','TuFUf','connectionStatus','llm','chatgpt','DzMXV','ymZJJ','koIdu','bzAOI','VIlKw','removeItem','evzTy','❌\x20Failed\x20to\x20request\x20LLM\x20data\x20from\x20backend:','fDguc','entries','map','includes','🔍\x20Platform\x20connection\x20check:','cOadd','ItmlU','awJha','NMyJk','conversations','chatHistory','toISOString','❌\x20Failed\x20to\x20update\x20LLM\x20status:','1.0','tZzut','❌\x20Backend\x20data\x20ingestion\x20failed:','BLuNz','/llmdata','nCnDb','Bearer\x20','accessToken','refreshToken','tokenExpiry','AXWAl','json','✅\x20Backend\x20received\x20and\x20stored\x20LLM\x20data:','connectionId','text','wLcSq','status','Backend\x20error:\x20','fiVEK','XePmW','📤\x20Requesting\x20backend\x20to\x20send\x20LLM\x20data\x20to\x20developer...','pyFMY','jAhJV','HCSdU','BASE_URL','/llmdata/request','uYTfb','OxYXa','✅\x20Backend\x20processing\x20LLM\x20data\x20request:','apiUrl','token','❌\x20Failed\x20to\x20store\x20LLM\x20data:','hQZif','uVgaq','nICmY','wPfTo','❌\x20Failed\x20to\x20get\x20LLM\x20data\x20keys:','fRfSj','SAOqx','sJKho','XmJvE','HJtrX','getAllKeys','filter','startsWith','cQAlN'];_0x3b4c=function(){return _0x3d55b3;};return _0x3b4c();}function _0x36b8(_0x3b4cd7,_0x36b892){_0x3b4cd7=_0x3b4cd7-0x0;const _0x11b614=_0x3b4c();let _0x345fdc=_0x11b614[_0x3b4cd7];return _0x345fdc;}export const storeLLMData=async _0x205f47=>{const _0x2d33d1={'PBMnG':function(_0x5c7dfc,_0x4c7fc3){return _0x5c7dfc instanceof _0x4c7fc3;},'FDpSN':_0x36b8(0x1),'KlWfR':_0x36b8(0x2),'yUYbV':_0x36b8(0x3),'eZjHz':_0x36b8(0x4),'uBbHF':'❌\x20Failed\x20to\x20store\x20LLM\x20data:'};try{if(_0x2d33d1[_0x36b8(0x5)]===_0x36b8(0x6))return _0x2d699d[_0x36b8(0x7)](_0x36b8(0x8),_0x56e34d),{'success':![],'message':_0x2d33d1[_0x36b8(0x9)](_0x48b55d,_0x2be31b)?_0x367f70[_0x36b8(0xa)]:_0x2d33d1[_0x36b8(0xb)]};else{console[_0x36b8(0xc)]('💾\x20Storing\x20LLM\x20data\x20locally\x20(temporary)...'),await AsyncStorage[_0x36b8(0xd)](LLM_DATA_STORAGE_KEY+':'+_0x205f47[_0x36b8(0xe)],JSON[_0x36b8(0xf)](_0x205f47));const _0x1bcf31={'userId':_0x205f47[_0x36b8(0xe)],'email':_0x205f47[_0x36b8(0x10)],'appName':_0x205f47[_0x36b8(0x11)],'timestamp':_0x205f47[_0x36b8(0x12)],'hasData':!![],'dataSize':JSON[_0x36b8(0xf)](_0x205f47[_0x36b8(0x13)])[_0x36b8(0x14)],'connectionStatus':_0x2d33d1['yUYbV']};return await AsyncStorage[_0x36b8(0xd)](LLM_METADATA_STORAGE_KEY+':'+_0x205f47[_0x36b8(0xe)],JSON['stringify'](_0x1bcf31)),console[_0x36b8(0xc)](_0x2d33d1[_0x36b8(0x15)]),console[_0x36b8(0xc)]('📊\x20Data\x20size:\x20'+_0x1bcf31['dataSize']+_0x36b8(0x16)),!![];}}catch(_0x11e2d2){return console[_0x36b8(0x7)](_0x2d33d1[_0x36b8(0x17)],_0x11e2d2),![];}};export const getLLMData=async _0x55a632=>{const _0x431178={'JKxOp':_0x36b8(0x18),'iZVhG':'❌\x20Failed\x20to\x20retrieve\x20LLM\x20data:'};try{const _0x4446ae=await AsyncStorage[_0x36b8(0x19)](LLM_DATA_STORAGE_KEY+':'+_0x55a632);if(!_0x4446ae)return console[_0x36b8(0xc)](_0x431178['JKxOp'],_0x55a632),null;const _0x3e16d3=JSON[_0x36b8(0x1a)](_0x4446ae);return console[_0x36b8(0xc)](_0x36b8(0x1b),_0x55a632),_0x3e16d3;}catch(_0x3d1e5f){return console['error'](_0x431178[_0x36b8(0x1c)],_0x3d1e5f),null;}};export const getLLMMetadata=async _0x101f10=>{try{const _0x2c4baf=await AsyncStorage[_0x36b8(0x19)](LLM_METADATA_STORAGE_KEY+':'+_0x101f10);if(!_0x2c4baf)return null;return JSON['parse'](_0x2c4baf);}catch(_0x1ab9ae){return console[_0x36b8(0x7)](_0x36b8(0x1d),_0x1ab9ae),null;}};export const updateLLMStatus=async(_0x25d656,_0xa007d4)=>{const _0x369ccf={'vlRQx':_0x36b8(0x1e),'wXPKv':function(_0x27b958,_0x301ab1){return _0x27b958!==_0x301ab1;},'KQsbY':_0x36b8(0x1f),'sACRf':_0x36b8(0x20),'ZdgDw':function(_0x3ac5f1,_0x206e94){return _0x3ac5f1(_0x206e94);},'TuFUf':_0x36b8(0x21),'zPFzY':'❌\x20Failed\x20to\x20update\x20LLM\x20status:'};try{if(_0x369ccf[_0x36b8(0x22)](_0x369ccf[_0x36b8(0x23)],_0x369ccf[_0x36b8(0x24)])){const _0x540292=await _0x369ccf[_0x36b8(0x25)](getLLMMetadata,_0x25d656);if(!_0x540292)return console[_0x36b8(0x26)](_0x369ccf[_0x36b8(0x27)],_0x25d656),![];return _0x540292[_0x36b8(0x28)]=_0xa007d4,await AsyncStorage[_0x36b8(0xd)](LLM_METADATA_STORAGE_KEY+':'+_0x25d656,JSON[_0x36b8(0xf)](_0x540292)),console[_0x36b8(0xc)]('✅\x20Updated\x20LLM\x20status\x20to:\x20'+_0xa007d4),!![];}else return _0x5c4546[_0x36b8(0x7)](_0x369ccf['vlRQx'],_0x25e351),![];}catch(_0x33c310){return console['error'](_0x369ccf['zPFzY'],_0x33c310),![];}};export const clearLLMData=async _0x2b831d=>{const _0x3a9d6f={'dLIIu':_0x36b8(0x1),'uCoiE':_0x36b8(0x29),'diuPn':_0x36b8(0x2a),'fDguc':function(_0x15fc54,_0x196f41){return _0x15fc54===_0x196f41;},'koIdu':function(_0x46c4ae,_0x31a119){return _0x46c4ae!==_0x31a119;},'VIlKw':_0x36b8(0x2b),'evzTy':'✅\x20LLM\x20data\x20cleared\x20for\x20user:','BpKpN':'kgpsp','hVWgZ':_0x36b8(0x2c)};try{return _0x3a9d6f[_0x36b8(0x2d)](_0x36b8(0x2e),_0x3a9d6f[_0x36b8(0x2f)])?(await AsyncStorage[_0x36b8(0x30)](LLM_DATA_STORAGE_KEY+':'+_0x2b831d),await AsyncStorage['removeItem'](LLM_METADATA_STORAGE_KEY+':'+_0x2b831d),console['log'](_0x3a9d6f[_0x36b8(0x31)],_0x2b831d),!![]):(_0x3d9aa6[_0x36b8(0x7)](_0x36b8(0x32),_0x1900e4),{'success':![],'message':_0x2ce564 instanceof _0x8ee29b?_0x320e2f['message']:_0x3a9d6f['dLIIu']});}catch(_0x120dcb){if(_0x3a9d6f[_0x36b8(0x33)](_0x3a9d6f['BpKpN'],_0x3a9d6f['hVWgZ'])){const _0x1244f6=_0x54a1ef[_0x36b8(0x34)](_0x4d9912)['filter'](([_0x185942,_0x591a6d])=>_0x591a6d)[_0x36b8(0x35)](([_0x21f438,_0x1cb912])=>_0x21f438),_0x132294=_0x1244f6[_0x36b8(0x36)](_0x3a9d6f['uCoiE'])||_0x1244f6[_0x36b8(0x36)](_0x3a9d6f['diuPn']),_0x53234e=_0x3a9d6f['fDguc'](_0x1244f6[_0x36b8(0x14)],0x1)&&_0x132294;return _0x331582[_0x36b8(0xc)](_0x36b8(0x37),{'connectedPlatforms':_0x1244f6,'hasLLM':_0x132294,'onlyLLM':_0x53234e}),_0x53234e;}else return console[_0x36b8(0x7)]('❌\x20Failed\x20to\x20clear\x20LLM\x20data:',_0x120dcb),![];}};export const hasOnlyLLMConnection=_0x25a822=>{const _0x382dfd={'MScUH':_0x36b8(0x29),'cOadd':'chatgpt','ItmlU':function(_0x143c38,_0x1abc2c){return _0x143c38===_0x1abc2c;}},_0x28a758=Object[_0x36b8(0x34)](_0x25a822)['filter'](([_0x536313,_0x15aea6])=>_0x15aea6)[_0x36b8(0x35)](([_0x49e305,_0x598e1c])=>_0x49e305),_0x463062=_0x28a758[_0x36b8(0x36)](_0x382dfd['MScUH'])||_0x28a758[_0x36b8(0x36)](_0x382dfd[_0x36b8(0x38)]),_0x5e01c6=_0x382dfd[_0x36b8(0x39)](_0x28a758[_0x36b8(0x14)],0x1)&&_0x463062;return console['log']('🔍\x20Platform\x20connection\x20check:',{'connectedPlatforms':_0x28a758,'hasLLM':_0x463062,'onlyLLM':_0x5e01c6}),_0x5e01c6;};export const formatLLMDataForDeveloper=_0x3384d6=>{const _0x1d48fc={'awJha':_0x36b8(0x29),'NMyJk':'chatgpt','RSwhr':'1.0'};return{'platform':_0x1d48fc[_0x36b8(0x3a)],'userId':_0x3384d6[_0x36b8(0xe)],'email':_0x3384d6[_0x36b8(0x10)],'timestamp':_0x3384d6['timestamp'],'data':{'type':_0x1d48fc[_0x36b8(0x3b)],'conversations':_0x3384d6['data'][_0x36b8(0x3c)]||[],'chatHistory':_0x3384d6[_0x36b8(0x13)][_0x36b8(0x3d)]||[],'preferences':_0x3384d6[_0x36b8(0x13)]['preferences']||{},'customData':_0x3384d6['data']['customData']||{}},'metadata':{'appName':_0x3384d6[_0x36b8(0x11)],'collectedAt':new Date(_0x3384d6[_0x36b8(0x12)])[_0x36b8(0x3e)](),'dataVersion':_0x1d48fc['RSwhr']}};};export const sendLLMDataToBackend=async(_0x556b99,_0x4492af)=>{const _0x4466fc={'xHFCk':_0x36b8(0x3f),'BLuNz':'📡\x20Sending\x20LLM\x20data\x20to\x20backend\x20for\x20processing...','nCnDb':function(_0x41bbb9,_0x57c4b1){return _0x41bbb9&&_0x57c4b1;},'aWyzi':'llm','AXWAl':_0x36b8(0x40),'cNnxZ':function(_0x195181,_0x37c071){return _0x195181!==_0x37c071;},'heNgD':_0x36b8(0x41),'wlyrF':'jPvVo','wLcSq':_0x36b8(0x42),'QaLWd':_0x36b8(0x8),'fiVEK':function(_0x4c54d8,_0xaf5cdf){return _0x4c54d8 instanceof _0xaf5cdf;},'XePmW':'Unknown\x20error'};try{console[_0x36b8(0xc)](_0x4466fc[_0x36b8(0x43)]);const _0x439983=await fetch(API_CONFIG['BASE_URL']+_0x36b8(0x44),{'method':'POST','headers':{'Content-Type':'application/json',..._0x4466fc[_0x36b8(0x45)](_0x4492af,{'Authorization':_0x36b8(0x46)+_0x4492af})},'body':JSON[_0x36b8(0xf)]({'userId':_0x556b99['userId'],'email':_0x556b99[_0x36b8(0x10)],'appName':_0x556b99[_0x36b8(0x11)],'platform':_0x4466fc['aWyzi'],'connectionType':_0x36b8(0x2a),'timestamp':new Date()[_0x36b8(0x3e)](),'data':_0x556b99[_0x36b8(0x13)],'accessToken':_0x556b99[_0x36b8(0x47)],'refreshToken':_0x556b99[_0x36b8(0x48)],'tokenExpiry':_0x556b99[_0x36b8(0x49)],'metadata':{'collectedAt':new Date(_0x556b99[_0x36b8(0x12)])[_0x36b8(0x3e)](),'dataVersion':_0x4466fc[_0x36b8(0x4a)]}})});if(_0x439983['ok']){if(_0x4466fc['cNnxZ'](_0x4466fc['heNgD'],_0x4466fc['wlyrF'])){const _0xdfc916=await _0x439983[_0x36b8(0x4b)]();return console[_0x36b8(0xc)](_0x36b8(0x4c),_0xdfc916),{'success':!![],'message':_0xdfc916[_0x36b8(0xa)],'connectionId':_0xdfc916[_0x36b8(0x4d)]};}else return _0x15514f[_0x36b8(0x7)](_0x4466fc['xHFCk'],_0x533007),![];}else{const _0x2f79c4=await _0x439983[_0x36b8(0x4e)]();return console[_0x36b8(0x7)](_0x4466fc[_0x36b8(0x4f)],_0x439983[_0x36b8(0x50)],_0x2f79c4),{'success':![],'message':_0x36b8(0x51)+_0x439983[_0x36b8(0x50)]};}}catch(_0x56854d){return console['error'](_0x4466fc['QaLWd'],_0x56854d),{'success':![],'message':_0x4466fc[_0x36b8(0x52)](_0x56854d,Error)?_0x56854d[_0x36b8(0xa)]:_0x4466fc[_0x36b8(0x53)]};}};export const requestLLMDataForDeveloper=async(_0x2d3656,_0x24ff33,_0x1582a9,_0x18352b,_0x2e5886)=>{const _0x24a089={'jAhJV':_0x36b8(0x54),'HCSdU':function(_0x29e8a8,_0x282b07,_0x16cd58){return _0x29e8a8(_0x282b07,_0x16cd58);},'uYTfb':function(_0x597f24,_0x329d4c){return _0x597f24===_0x329d4c;},'wmmEg':'❌\x20Failed\x20to\x20request\x20LLM\x20data:','hQZif':_0x36b8(0x55),'uVgaq':_0x36b8(0x32),'nICmY':function(_0x2d1e2e,_0x226ab7){return _0x2d1e2e instanceof _0x226ab7;},'wPfTo':'Unknown\x20error'};try{console[_0x36b8(0xc)](_0x24a089[_0x36b8(0x56)]);const _0x1e2c7d=await _0x24a089[_0x36b8(0x57)](fetch,API_CONFIG[_0x36b8(0x58)]+_0x36b8(0x59),{'method':'POST','headers':{'Content-Type':'application/json','Authorization':_0x36b8(0x46)+_0x2e5886},'body':JSON[_0x36b8(0xf)]({'userId':_0x2d3656,'email':_0x24ff33,'appName':_0x1582a9,'requestedData':_0x18352b,'timestamp':new Date()[_0x36b8(0x3e)]()})});if(_0x1e2c7d['ok']){if(_0x24a089[_0x36b8(0x5a)](_0x36b8(0x5b),'OxYXa')){const _0x4185ef=await _0x1e2c7d['json']();return console[_0x36b8(0xc)](_0x36b8(0x5c),_0x4185ef),{'success':!![],'message':_0x4185ef[_0x36b8(0xa)],'apiUrl':_0x4185ef[_0x36b8(0x5d)],'token':_0x4185ef[_0x36b8(0x5e)]};}else return _0x62f2ea[_0x36b8(0x7)](_0x36b8(0x5f),_0x42ccd1),![];}else{const _0x20e3f3=await _0x1e2c7d[_0x36b8(0x4e)]();return console[_0x36b8(0x7)](_0x24a089['wmmEg'],_0x1e2c7d[_0x36b8(0x50)],_0x20e3f3),{'success':![],'message':'Backend\x20error:\x20'+_0x1e2c7d['status']};}}catch(_0x55b1e0){return _0x24a089[_0x36b8(0x60)]===_0x24a089['hQZif']?(console[_0x36b8(0x7)](_0x24a089[_0x36b8(0x61)],_0x55b1e0),{'success':![],'message':_0x24a089[_0x36b8(0x62)](_0x55b1e0,Error)?_0x55b1e0[_0x36b8(0xa)]:_0x24a089[_0x36b8(0x63)]}):(_0x4dfd27[_0x36b8(0x7)](_0x36b8(0x64),_0x544be1),[]);}};export const getAllLLMDataKeys=async()=>{const _0x1f750c={'sJKho':function(_0x1816f9,_0x12f535){return _0x1816f9!==_0x12f535;},'XmJvE':_0x36b8(0x65),'HJtrX':_0x36b8(0x66),'cQAlN':_0x36b8(0x64)};try{if(_0x1f750c[_0x36b8(0x67)](_0x1f750c[_0x36b8(0x68)],_0x1f750c[_0x36b8(0x69)])){const _0x120980=await AsyncStorage[_0x36b8(0x6a)](),_0xc9952e=_0x120980[_0x36b8(0x6b)](_0xbe0fe5=>_0xbe0fe5[_0x36b8(0x6c)](LLM_DATA_STORAGE_KEY)||_0xbe0fe5[_0x36b8(0x6c)](LLM_METADATA_STORAGE_KEY));return _0xc9952e;}else return null;}catch(_0x4eef0e){return console[_0x36b8(0x7)](_0x1f750c[_0x36b8(0x6d)],_0x4eef0e),[];}};
@@ -1 +1 @@
1
- import{getAuthToken}from'./authService';import{API_CONFIG}from'../config/api';const API_BASE_URL=''+API_CONFIG[_0x25e9(0x0)];function _0x25e9(_0x2e1172,_0x25e947){_0x2e1172=_0x2e1172-0x0;const _0x2ab99d=_0x2e11();let _0x592059=_0x2ab99d[_0x2e1172];return _0x592059;}export const getTrainingStatus=async _0xbf7a75=>{const _0x230727={'ldxgk':_0x25e9(0x1),'uipQr':function(_0x3add2e,_0x240274,_0x57acc1){return _0x3add2e(_0x240274,_0x57acc1);},'CVNFo':function(_0x236e8f,_0x348f58){return _0x236e8f!==_0x348f58;},'CCDVy':_0x25e9(0x2),'YLfbj':_0x25e9(0x3),'ePRNv':'❌\x20Failed\x20to\x20get\x20training\x20status:'};try{const _0x4f67d4=await getAuthToken();if(!_0x4f67d4)throw new Error(_0x25e9(0x4));const _0x37652d=await _0x230727[_0x25e9(0x5)](fetch,API_BASE_URL+_0x25e9(0x6)+_0xbf7a75,{'method':'GET','headers':{'Authorization':_0x4f67d4,'Content-Type':'application/json'}});if(!_0x37652d['ok']){const _0x45cfa2=await _0x37652d[_0x25e9(0x7)]();throw new Error(_0x45cfa2[_0x25e9(0x8)]||_0x25e9(0x9)+_0x37652d[_0x25e9(0xa)]);}return await _0x37652d[_0x25e9(0x7)]();}catch(_0xb4927f){if(_0x230727[_0x25e9(0xb)](_0x230727[_0x25e9(0xc)],_0x230727['YLfbj'])){console['error'](_0x230727['ePRNv'],_0xb4927f);throw _0xb4927f;}else{_0x31989d[_0x25e9(0x8)](_0x230727[_0x25e9(0xd)],_0xd6e1af);throw _0x2801d7;}}};export const getModelInfo=async()=>{const _0x3e1f3f={'ukNBy':function(_0x2981ce,_0x36ffbc,_0x1f0810){return _0x2981ce(_0x36ffbc,_0x1f0810);},'pvvww':function(_0x355871,_0x31a4d9){return _0x355871===_0x31a4d9;},'GsvbG':_0x25e9(0xe),'lSowo':'VvygJ'};try{const _0x32a4dd=await getAuthToken();if(!_0x32a4dd)throw new Error(_0x25e9(0x4));const _0x35f56c=await _0x3e1f3f[_0x25e9(0xf)](fetch,API_BASE_URL+'/mobile-training/model-info',{'method':'GET','headers':{'Authorization':_0x32a4dd,'Content-Type':'application/json'}});if(!_0x35f56c['ok']){if(_0x3e1f3f[_0x25e9(0x10)](_0x3e1f3f[_0x25e9(0x11)],_0x3e1f3f[_0x25e9(0x12)])){const _0x4c2b0e=_0x4e506d[_0x25e9(0x13)](_0x382da9);throw new _0x556234(_0x4c2b0e[_0x25e9(0x8)]||_0x25e9(0x9)+_0x2f5076[_0x25e9(0xa)]);}else{const _0x1b7151=await _0x35f56c[_0x25e9(0x7)]();throw new Error(_0x1b7151[_0x25e9(0x8)]||_0x25e9(0x9)+_0x35f56c[_0x25e9(0xa)]);}}return await _0x35f56c['json']();}catch(_0x16a6b8){console[_0x25e9(0x8)](_0x25e9(0x1),_0x16a6b8);throw _0x16a6b8;}};export const getHealthCheck=async()=>{const _0x130939={'hoIqj':_0x25e9(0x4),'cdyDz':function(_0x1b7652,_0x1522e7,_0x1df232){return _0x1b7652(_0x1522e7,_0x1df232);},'TTpZz':function(_0xa02239,_0x356bc5){return _0xa02239!==_0x356bc5;},'SfxSS':_0x25e9(0x14),'QUwGw':'VnSEm','RhDGo':_0x25e9(0x15)};try{const _0x5e8222=await _0x130939['cdyDz'](fetch,API_BASE_URL+'/mobile-training/health',{'method':'GET','headers':{'Content-Type':'application/json'}});if(!_0x5e8222['ok']){if(_0x130939[_0x25e9(0x16)](_0x130939[_0x25e9(0x17)],_0x130939['QUwGw'])){const _0x1551f2=await _0x5e8222[_0x25e9(0x7)]();throw new Error(_0x1551f2[_0x25e9(0x8)]||_0x25e9(0x9)+_0x5e8222[_0x25e9(0xa)]);}else throw new _0x2cc0e9(_0x130939[_0x25e9(0x18)]);}return await _0x5e8222[_0x25e9(0x7)]();}catch(_0x160f86){console[_0x25e9(0x8)](_0x130939[_0x25e9(0x19)],_0x160f86);throw _0x160f86;}};function _0x2e11(){const _0x341d48=['BASE_URL','❌\x20Failed\x20to\x20get\x20model\x20info:','SHtWf','VvLnS','No\x20authentication\x20token\x20available','uipQr','/mobile-training/status/','json','error','HTTP\x20','status','CVNFo','CCDVy','ldxgk','npDEh','ukNBy','pvvww','GsvbG','lSowo','parse','bWJHa','❌\x20Failed\x20to\x20get\x20health\x20check:','TTpZz','SfxSS','hoIqj','RhDGo','2|4|1|3|0|6|5','ℹ️\x20[TRAINING]\x20No\x20migration\x20checks\x20needed:','🚀\x20Starting\x20Enoch\x20training\x20for\x20user:','\x20\x20\x20-\x20Temporary\x20mode\x20connections:\x20Work\x20automatically\x20✅','🚀\x20[TRAINING]\x20Starting\x20training\x20-\x20backend\x20handles\x20all\x20YouTube\x20cases\x20automatically','ZUbFi','split','log','dRzhQ','username','VqnRH','xUjEd','BcRDz','\x20\x20\x20-\x20Backend\x20validation:\x20Handles\x20all\x20edge\x20cases\x20✅','DfZwq','❌\x20Training\x20start\x20error:','⚠️\x20Could\x20not\x20check\x20training\x20status:','📤\x20Sending\x20training\x20data\x20to\x20/mobile-training/enoch:','Error:','JJjiY','UarCQ','ZVKCf','iUwoJ','qWeKo','mGAnT','/mobile-training/enoch','stringify','📡\x20Training\x20API\x20response\x20status:','text','❌\x20Training\x20API\x20failed\x20with\x20status:','OjwLd','tDOWf','twAnp','Training\x20API\x20failed:\x20','\x20-\x20','warn','gwRrj','jbeRj','Bbnuj','bEJEK','gGGgK','smyzv','sDyvK','Oggji','success','isTraining','YzdGK','⚠️\x20Could\x20not\x20get\x20training\x20features:','Mobdi','SxADo','ZwRNG','ryaQP'];_0x2e11=function(){return _0x341d48;};return _0x2e11();}export const startEnochTrainingWithYouTubeCheck=async _0x1cf996=>{const _0x3ec64a={'ZUbFi':_0x25e9(0x1a),'UkTYk':'\x20\x20\x20-\x20Full\x20refresh\x20tokens:\x20Auto-refresh\x20when\x20expired\x20✅','hqgHo':_0x25e9(0x1b),'dRzhQ':_0x25e9(0x1c),'kfQcJ':'(backend\x20auto-handles\x20YouTube)','VqnRH':_0x25e9(0x1d),'xUjEd':_0x25e9(0x1e),'BcRDz':function(_0x1e9e73,_0x79107f){return _0x1e9e73(_0x79107f);},'DfZwq':'❌\x20Training\x20error:'};try{const _0x37cb77=_0x3ec64a[_0x25e9(0x1f)][_0x25e9(0x20)]('|');let _0x27eeb4=0x0;while(!![]){switch(_0x37cb77[_0x27eeb4++]){case'0':console[_0x25e9(0x21)](_0x3ec64a['UkTYk']);continue;case'1':console[_0x25e9(0x21)](_0x3ec64a['hqgHo']);continue;case'2':console[_0x25e9(0x21)](_0x3ec64a[_0x25e9(0x22)],_0x1cf996[_0x25e9(0x23)],_0x3ec64a['kfQcJ']);continue;case'3':console[_0x25e9(0x21)](_0x3ec64a[_0x25e9(0x24)]);continue;case'4':console[_0x25e9(0x21)](_0x3ec64a[_0x25e9(0x25)]);continue;case'5':return await _0x3ec64a[_0x25e9(0x26)](startEnochTraining,_0x1cf996);case'6':console['log'](_0x25e9(0x27));continue;}break;}}catch(_0x261685){console['error'](_0x3ec64a[_0x25e9(0x28)],_0x261685);throw _0x261685;}};export const startEnochTraining=async _0x97a358=>{const _0x222df7={'iUwoJ':_0x25e9(0x29),'gwRrj':_0x25e9(0x2a),'UarCQ':function(_0x4b4245,_0x55d718){return _0x4b4245===_0x55d718;},'qWeKo':function(_0x44a7fa){return _0x44a7fa();},'mGAnT':_0x25e9(0x2b),'WXowc':function(_0x35a2f,_0x2818ba,_0x50473b){return _0x35a2f(_0x2818ba,_0x50473b);},'OjwLd':_0x25e9(0x2c),'tDOWf':function(_0x5e6399,_0x5273ed){return _0x5e6399!==_0x5273ed;},'TLSdG':_0x25e9(0x2d),'twAnp':'NFudm','jbeRj':'📡\x20Training\x20API\x20response:'};try{if(_0x222df7[_0x25e9(0x2e)]('sFVhv',_0x25e9(0x2f))){_0x12d374[_0x25e9(0x8)](_0x222df7[_0x25e9(0x30)],_0x3bc698);throw _0x35a5fe;}else{const _0x1152a6=await _0x222df7[_0x25e9(0x31)](getAuthToken);if(!_0x1152a6)throw new Error(_0x25e9(0x4));console['log'](_0x222df7[_0x25e9(0x32)],_0x97a358);const _0x37625f=await _0x222df7['WXowc'](fetch,API_BASE_URL+_0x25e9(0x33),{'method':'POST','headers':{'Content-Type':'application/json','Authorization':_0x1152a6},'body':JSON[_0x25e9(0x34)](_0x97a358)});console[_0x25e9(0x21)](_0x25e9(0x35),_0x37625f['status']);if(!_0x37625f['ok']){const _0x25aceb=await _0x37625f[_0x25e9(0x36)]();console['error'](_0x25e9(0x37),_0x37625f[_0x25e9(0xa)],_0x222df7[_0x25e9(0x38)],_0x25aceb);try{const _0x2b2ff1=JSON[_0x25e9(0x13)](_0x25aceb);throw new Error(_0x2b2ff1[_0x25e9(0x8)]||_0x25e9(0x9)+_0x37625f['status']);}catch(_0x42dd94){if(_0x222df7[_0x25e9(0x39)](_0x222df7['TLSdG'],_0x222df7[_0x25e9(0x3a)]))throw new Error(_0x25e9(0x3b)+_0x37625f['status']+_0x25e9(0x3c)+_0x25aceb);else return _0x4e1df7[_0x25e9(0x3d)](_0x222df7[_0x25e9(0x3e)],_0x8e6a2f),![];}}const _0x3821c9=await _0x37625f[_0x25e9(0x7)]();return console['log'](_0x222df7[_0x25e9(0x3f)],_0x3821c9),_0x3821c9;}}catch(_0x186f9e){console[_0x25e9(0x8)](_0x222df7['iUwoJ'],_0x186f9e);throw _0x186f9e;}};export const isTrainingInProgress=async _0x450c5b=>{const _0x2cc41b={'Oggji':_0x25e9(0x4),'gGGgK':function(_0x5d9e67,_0x295024){return _0x5d9e67===_0x295024;},'smyzv':_0x25e9(0x40),'sDyvK':_0x25e9(0x41),'gIPma':function(_0x4a81f3,_0x5308d8){return _0x4a81f3(_0x5308d8);},'bqmue':_0x25e9(0x2a)};try{if(_0x2cc41b[_0x25e9(0x42)](_0x2cc41b[_0x25e9(0x43)],_0x2cc41b[_0x25e9(0x44)]))throw new _0x282dc3(_0x2cc41b[_0x25e9(0x45)]);else{const _0x371567=await _0x2cc41b['gIPma'](getTrainingStatus,_0x450c5b);return _0x371567[_0x25e9(0x46)]&&_0x371567[_0x25e9(0x47)];}}catch(_0x40e71b){return console[_0x25e9(0x3d)](_0x2cc41b['bqmue'],_0x40e71b),![];}};export const getTrainingFeatures=async()=>{const _0x3c2307={'OXLpB':_0x25e9(0x4),'Mobdi':function(_0x1ca010){return _0x1ca010();},'UKLVE':function(_0x1b18c3,_0x1e7f0e){return _0x1b18c3!==_0x1e7f0e;},'SxADo':_0x25e9(0x48),'ryaQP':_0x25e9(0x49)};try{const _0x4413a1=await _0x3c2307[_0x25e9(0x4a)](getHealthCheck);return _0x4413a1['features'];}catch(_0x30b4fd){if(_0x3c2307['UKLVE'](_0x3c2307[_0x25e9(0x4b)],_0x25e9(0x4c)))return console[_0x25e9(0x3d)](_0x3c2307[_0x25e9(0x4d)],_0x30b4fd),null;else throw new _0x1b4389(_0x3c2307['OXLpB']);}};
1
+ import{getAuthToken}from'./authService';import{API_CONFIG}from'../config/api';const API_BASE_URL=''+API_CONFIG[_0x2b49(0x0)];export const getTrainingStatus=async _0x325d2b=>{const _0x4cb1a5={'NyLEw':_0x2b49(0x1),'ACaRT':_0x2b49(0x2),'CyUbg':function(_0x23c2c1,_0x175a51,_0x408797){return _0x23c2c1(_0x175a51,_0x408797);},'coify':function(_0x24431e,_0x3c2fca){return _0x24431e===_0x3c2fca;},'xiLoQ':'Omlwn','gEVRL':_0x2b49(0x3)};try{const _0x1c7714=await getAuthToken();if(!_0x1c7714)throw new Error(_0x4cb1a5[_0x2b49(0x4)]);const _0x17dcf4=await _0x4cb1a5[_0x2b49(0x5)](fetch,API_BASE_URL+_0x2b49(0x6)+_0x325d2b,{'method':'GET','headers':{'Authorization':_0x1c7714,'Content-Type':'application/json'}});if(!_0x17dcf4['ok']){const _0x3762b2=await _0x17dcf4[_0x2b49(0x7)]();throw new Error(_0x3762b2['error']||_0x2b49(0x8)+_0x17dcf4['status']);}return await _0x17dcf4[_0x2b49(0x7)]();}catch(_0x11dad0){if(_0x4cb1a5[_0x2b49(0x9)]('Omlwn',_0x4cb1a5[_0x2b49(0xa)])){console[_0x2b49(0xb)](_0x4cb1a5[_0x2b49(0xc)],_0x11dad0);throw _0x11dad0;}else return _0x8814d0[_0x2b49(0xd)](_0x4cb1a5[_0x2b49(0xe)],_0x159dfa),![];}};export const getModelInfo=async()=>{const _0x5b7dea={'EmkLi':_0x2b49(0x2),'Xrtwv':'❌\x20Training\x20error:','tznmD':function(_0x21add1,_0xacfdb6){return _0x21add1===_0xacfdb6;},'JCmPL':_0x2b49(0xf),'cOGto':function(_0x19f176,_0x309b92,_0x50c72e){return _0x19f176(_0x309b92,_0x50c72e);},'ZSVBe':'KQQQY','ETJaI':_0x2b49(0x10)};try{if(_0x5b7dea['tznmD'](_0x5b7dea[_0x2b49(0x11)],_0x5b7dea[_0x2b49(0x11)])){const _0x3bc759=await getAuthToken();if(!_0x3bc759)throw new Error(_0x5b7dea[_0x2b49(0x12)]);const _0xf6db2b=await _0x5b7dea[_0x2b49(0x13)](fetch,API_BASE_URL+'/mobile-training/model-info',{'method':'GET','headers':{'Authorization':_0x3bc759,'Content-Type':'application/json'}});if(!_0xf6db2b['ok']){const _0x5e27d0=await _0xf6db2b[_0x2b49(0x7)]();throw new Error(_0x5e27d0[_0x2b49(0xb)]||_0x2b49(0x8)+_0xf6db2b['status']);}return await _0xf6db2b[_0x2b49(0x7)]();}else throw new _0x5bf8f2(_0x5b7dea[_0x2b49(0x12)]);}catch(_0x1312b6){if(_0x5b7dea['ZSVBe']===_0x2b49(0x14)){console[_0x2b49(0xb)](_0x5b7dea[_0x2b49(0x15)],_0x1312b6);throw _0x1312b6;}else{_0x210e17[_0x2b49(0xb)](_0x5b7dea[_0x2b49(0x16)],_0x3d5fee);throw _0x17f907;}}};export const getHealthCheck=async()=>{const _0x2ba7f1={'uYgna':_0x2b49(0x3),'wXxTh':_0x2b49(0x17),'nnMSk':_0x2b49(0x18),'yoYQD':function(_0x17dcfd,_0xa02313,_0x515302){return _0x17dcfd(_0xa02313,_0x515302);},'JvRaE':function(_0x172d56,_0x2921ae){return _0x172d56!==_0x2921ae;},'hLDrR':'oxsSm','Dbhzt':_0x2b49(0x19)};try{if('qafFd'!==_0x2ba7f1[_0x2b49(0x1a)]){const _0x2f38b2=_0x6ff5fc[_0x2b49(0x1b)](_0x2d7f17);throw new _0x5001d2(_0x2f38b2[_0x2b49(0xb)]||_0x2b49(0x8)+_0x5d1fd8[_0x2b49(0x1c)]);}else{const _0x5b7831=await _0x2ba7f1[_0x2b49(0x1d)](fetch,API_BASE_URL+_0x2b49(0x1e),{'method':'GET','headers':{'Content-Type':'application/json'}});if(!_0x5b7831['ok']){if('zoBNM'!==_0x2b49(0x1f)){const _0x2266c3=await _0x5b7831['json']();throw new Error(_0x2266c3[_0x2b49(0xb)]||_0x2b49(0x8)+_0x5b7831[_0x2b49(0x1c)]);}else{_0x5e8453[_0x2b49(0xb)](_0x2ba7f1[_0x2b49(0x20)],_0x3243aa);throw _0x3d8aae;}}return await _0x5b7831[_0x2b49(0x7)]();}}catch(_0x1e996f){if(_0x2ba7f1[_0x2b49(0x21)](_0x2ba7f1[_0x2b49(0x22)],_0x2ba7f1[_0x2b49(0x22)])){_0x104665[_0x2b49(0xb)](_0x2ba7f1[_0x2b49(0x23)],_0x575670);throw _0x1f0022;}else{console[_0x2b49(0xb)](_0x2ba7f1[_0x2b49(0x24)],_0x1e996f);throw _0x1e996f;}}};export const startEnochTrainingWithYouTubeCheck=async _0x10d7ce=>{const _0x3f7ab1={'aSwEv':_0x2b49(0x19),'viMOy':_0x2b49(0x10),'aldMl':function(_0x143541,_0x49cf79){return _0x143541===_0x49cf79;},'NOLjU':_0x2b49(0x25),'bTYDC':_0x2b49(0x26),'qPRus':'🚀\x20[TRAINING]\x20Starting\x20training\x20-\x20backend\x20handles\x20all\x20YouTube\x20cases\x20automatically','GQhfj':_0x2b49(0x27),'GDQVD':_0x2b49(0x28),'WcNsu':function(_0x27de9f,_0x15c377){return _0x27de9f(_0x15c377);},'Stowh':_0x2b49(0x29),'gpQcM':'ℹ️\x20[TRAINING]\x20No\x20migration\x20checks\x20needed:','ihKsN':_0x2b49(0x2a),'aYEtg':_0x2b49(0x2b),'hLdvb':function(_0x563812,_0xc28d17){return _0x563812===_0xc28d17;},'TiNAN':'LnPOH','SrnGk':_0x2b49(0x2c)};try{if(_0x3f7ab1[_0x2b49(0x2d)](_0x3f7ab1[_0x2b49(0x2e)],_0x3f7ab1['NOLjU'])){const _0x45d5f6=_0x3f7ab1[_0x2b49(0x2f)]['split']('|');let _0x56ba7c=0x0;while(!![]){switch(_0x45d5f6[_0x56ba7c++]){case'0':console[_0x2b49(0x30)](_0x3f7ab1[_0x2b49(0x31)]);continue;case'1':console[_0x2b49(0x30)](_0x3f7ab1[_0x2b49(0x32)]);continue;case'2':console[_0x2b49(0x30)](_0x3f7ab1[_0x2b49(0x33)]);continue;case'3':return await _0x3f7ab1[_0x2b49(0x34)](startEnochTraining,_0x10d7ce);case'4':console[_0x2b49(0x30)](_0x3f7ab1[_0x2b49(0x35)]);continue;case'5':console['log'](_0x3f7ab1[_0x2b49(0x36)]);continue;case'6':console[_0x2b49(0x30)](_0x3f7ab1[_0x2b49(0x37)],_0x10d7ce[_0x2b49(0x38)],_0x3f7ab1[_0x2b49(0x39)]);continue;}break;}}else{_0x254894['error'](_0x3f7ab1[_0x2b49(0x3a)],_0x37ae40);throw _0x5c3300;}}catch(_0x4b620f){if(_0x3f7ab1[_0x2b49(0x3b)](_0x3f7ab1[_0x2b49(0x3c)],_0x3f7ab1[_0x2b49(0x3c)])){console[_0x2b49(0xb)](_0x3f7ab1[_0x2b49(0x3d)],_0x4b620f);throw _0x4b620f;}else{_0x5f29b9[_0x2b49(0xb)](_0x3f7ab1[_0x2b49(0x3e)],_0x3952cd);throw _0x449bcc;}}};export const startEnochTraining=async _0x595769=>{const _0x7cf33f={'pyVZM':function(_0x3a2ea7,_0x1ea99a){return _0x3a2ea7===_0x1ea99a;},'cKCyo':_0x2b49(0x3f),'sdnDJ':_0x2b49(0x40),'jzTDA':function(_0x465ee9){return _0x465ee9();},'ekqXJ':_0x2b49(0x2),'eXKCQ':_0x2b49(0x41),'wWkDO':function(_0x1211d8,_0x1b0aa0,_0x188aa3){return _0x1211d8(_0x1b0aa0,_0x188aa3);},'JEaJa':'📡\x20Training\x20API\x20response\x20status:','btGvq':_0x2b49(0x42),'RrYYP':_0x2b49(0x43),'qPXCQ':'📡\x20Training\x20API\x20response:','DxMDu':function(_0x1b8a10,_0x2226f3){return _0x1b8a10===_0x2226f3;},'tlawl':'RitgC','knIjD':_0x2b49(0x17)};try{if(_0x7cf33f[_0x2b49(0x44)](_0x7cf33f['cKCyo'],_0x7cf33f[_0x2b49(0x45)]))throw new _0x2870f0(_0x2b49(0x2));else{const _0xd59d4c=await _0x7cf33f[_0x2b49(0x46)](getAuthToken);if(!_0xd59d4c)throw new Error(_0x7cf33f['ekqXJ']);console[_0x2b49(0x30)](_0x7cf33f[_0x2b49(0x47)],_0x595769);const _0x469172=await _0x7cf33f[_0x2b49(0x48)](fetch,API_BASE_URL+'/mobile-training/enoch',{'method':'POST','headers':{'Content-Type':'application/json','Authorization':_0xd59d4c},'body':JSON[_0x2b49(0x49)](_0x595769)});console[_0x2b49(0x30)](_0x7cf33f[_0x2b49(0x4a)],_0x469172[_0x2b49(0x1c)]);if(!_0x469172['ok']){const _0x395961=await _0x469172[_0x2b49(0x4b)]();console[_0x2b49(0xb)](_0x7cf33f[_0x2b49(0x4c)],_0x469172[_0x2b49(0x1c)],_0x7cf33f['RrYYP'],_0x395961);try{const _0x159c71=JSON[_0x2b49(0x1b)](_0x395961);throw new Error(_0x159c71[_0x2b49(0xb)]||_0x2b49(0x8)+_0x469172[_0x2b49(0x1c)]);}catch(_0xed8703){throw new Error(_0x2b49(0x4d)+_0x469172[_0x2b49(0x1c)]+_0x2b49(0x4e)+_0x395961);}}const _0x47aaef=await _0x469172[_0x2b49(0x7)]();return console['log'](_0x7cf33f[_0x2b49(0x4f)],_0x47aaef),_0x47aaef;}}catch(_0x4b870e){if(_0x7cf33f[_0x2b49(0x50)](_0x7cf33f['tlawl'],'AqYWp'))throw new _0x2cb6a7('Training\x20API\x20failed:\x20'+_0x232842[_0x2b49(0x1c)]+_0x2b49(0x4e)+_0x5af0b5);else{console[_0x2b49(0xb)](_0x7cf33f[_0x2b49(0x51)],_0x4b870e);throw _0x4b870e;}}};function _0x2b49(_0xbc15b6,_0x2b494e){_0xbc15b6=_0xbc15b6-0x0;const _0x1f1435=_0xbc15();let _0x407c5d=_0x1f1435[_0xbc15b6];return _0x407c5d;}export const isTrainingInProgress=async _0x11fd1e=>{const _0x4ea677={'lDVyH':function(_0x59b1d6,_0x5e16a2){return _0x59b1d6(_0x5e16a2);},'sAvYK':_0x2b49(0x1)};try{const _0x37ae54=await _0x4ea677[_0x2b49(0x52)](getTrainingStatus,_0x11fd1e);return _0x37ae54['success']&&_0x37ae54[_0x2b49(0x53)];}catch(_0x45bd52){return console['warn'](_0x4ea677['sAvYK'],_0x45bd52),![];}};export const getTrainingFeatures=async()=>{const _0x10f412={'aPnoM':'cninu','EtIWA':_0x2b49(0x54)};try{const _0x52f0df=await getHealthCheck();return _0x52f0df[_0x2b49(0x55)];}catch(_0x5dccc0){return'RsAPy'===_0x10f412['aPnoM']?(_0x5e8b6c[_0x2b49(0xd)](_0x2b49(0x54),_0x3e661f),null):(console[_0x2b49(0xd)](_0x10f412['EtIWA'],_0x5dccc0),null);}};function _0xbc15(){const _0x6658b6=['BASE_URL','⚠️\x20Could\x20not\x20check\x20training\x20status:','No\x20authentication\x20token\x20available','❌\x20Failed\x20to\x20get\x20training\x20status:','ACaRT','CyUbg','/mobile-training/status/','json','HTTP\x20','coify','xiLoQ','error','gEVRL','warn','NyLEw','XRfLh','❌\x20Failed\x20to\x20get\x20model\x20info:','JCmPL','EmkLi','cOGto','KQQQY','ETJaI','Xrtwv','❌\x20Training\x20start\x20error:','qafFd','❌\x20Failed\x20to\x20get\x20health\x20check:','nnMSk','parse','status','yoYQD','/mobile-training/health','PIcMz','uYgna','JvRaE','hLDrR','wXxTh','Dbhzt','USSpy','6|0|5|4|2|1|3','\x20\x20\x20-\x20Backend\x20validation:\x20Handles\x20all\x20edge\x20cases\x20✅','\x20\x20\x20-\x20Full\x20refresh\x20tokens:\x20Auto-refresh\x20when\x20expired\x20✅','\x20\x20\x20-\x20Temporary\x20mode\x20connections:\x20Work\x20automatically\x20✅','🚀\x20Starting\x20Enoch\x20training\x20for\x20user:','(backend\x20auto-handles\x20YouTube)','❌\x20Training\x20error:','aldMl','NOLjU','bTYDC','log','qPRus','GQhfj','GDQVD','WcNsu','Stowh','gpQcM','ihKsN','username','aYEtg','aSwEv','hLdvb','TiNAN','SrnGk','viMOy','MOhWJ','IirKb','📤\x20Sending\x20training\x20data\x20to\x20/mobile-training/enoch:','❌\x20Training\x20API\x20failed\x20with\x20status:','Error:','pyVZM','sdnDJ','jzTDA','eXKCQ','wWkDO','stringify','JEaJa','text','btGvq','Training\x20API\x20failed:\x20','\x20-\x20','qPXCQ','DxMDu','knIjD','lDVyH','isTraining','⚠️\x20Could\x20not\x20get\x20training\x20features:','features'];_0xbc15=function(){return _0x6658b6;};return _0xbc15();}
@@ -1 +1,381 @@
1
- import{Linking}from'react-native';import{updateCredentials}from'../utils/secureStorage';import{sha256}from'../utils/crypto';import{onairosApi}from'../api';function _0x1969(){const _0x5c5bc3=['onairosanime://auth/instagram','user_profile,user_media','code','YOUR_YOUTUBE_CLIENT_ID','onairosanime://auth/youtube','https://www.googleapis.com/auth/youtube.readonly','https://accounts.google.com/o/oauth2/auth','onairosanime://auth/pinterest','boards:read,pins:read','onairosanime://auth/reddit','https://www.reddit.com/api/v1/access_token','random','toString','substring','wPDtw','url','addEventListener','NhUJt','Ndflr','removeAllListeners','KiITV','client_id','state','No\x20authorization\x20code\x20received','NJTDQ','error','OAuth\x20state\x20mismatch\x20-\x20possible\x20CSRF\x20attack','cySss','VOlTf','VDoOA','strjR','Error\x20handling\x20OAuth\x20deep\x20link:','YxJEp','JFUmr','startsWith','onairosanime://auth/','XngxU','dfEYf','ZcGJr','split','bqDlo','Iuqqm','searchParams','lXjiI','get','DmhQU','UmEzO','lCpxx','vqHiG','OAuth\x20error:\x20','cSFzq','PxUTQ','CRLxu','JkDkf','nmDWP','cuiad','cCCAr','clientId','append','redirect_uri','redirectUri','balaI','responseType','mZWWr','scope','cWZcF','CWggz','EukEo','yzkeZ','QMxAu','HLpmg','Unsupported\x20platform:\x20','CiMlG','openURL','MsJwR','dcLlM','authorization_code','application/x-www-form-urlencoded','rmtsZ','CTXjV','tokenEndpoint','json','refresh_token','expires_in','Error\x20exchanging\x20code\x20for\x20token\x20(','instagram','youtube','https://api.pinterest.com/v5/user_account','https://oauth.reddit.com/api/v1/me','Failed\x20to\x20fetch\x20user\x20info','USYqt','Bearer\x20','https://graph.instagram.com/me?fields=id,username','https://www.googleapis.com/youtube/v3/channels?part=snippet&mine=true','UhZee','DeQaW','btPvB','hEJEp','uqBav','jxDLK','CRzAK','username','snippet','full_name','name','HGsgh','WYWri','Error\x20fetching\x20user\x20info\x20(','Error\x20storing\x20platform\x20connection\x20(','fgqqi','EtaOI','MFdqC','vZgRP','TigPw','authorizationEndpoint','uKHzH','response_type','QyBUb','/users/disconnect-platform','JFltl','OJlPx','post','QFiVr','PvVbT','tSzpf','nCdJA','Error\x20disconnecting\x20platform\x20(','zUUlR','pinterest','xoTVz','reddit','vWwRz','XrxVV','Gawrc','krYad','KGcjH','ZXWAR','ijdpa','rMMMO','platforms','userId','token','refreshToken','expiresIn','now','UfQwZ','qsYdi','lnGdp','nokbp','pXdxq','kLOOq','BASE_URL'];_0x1969=function(){return _0x5c5bc3;};return _0x1969();}import{API_CONFIG}from'../config/api';const OAUTH_CONFIGS={'instagram':{'clientId':'YOUR_INSTAGRAM_CLIENT_ID','redirectUri':_0x5da0(0x0),'scope':_0x5da0(0x1),'authorizationEndpoint':'https://api.instagram.com/oauth/authorize','tokenEndpoint':'https://api.instagram.com/oauth/access_token','responseType':_0x5da0(0x2)},'youtube':{'clientId':_0x5da0(0x3),'redirectUri':_0x5da0(0x4),'scope':_0x5da0(0x5),'authorizationEndpoint':_0x5da0(0x6),'tokenEndpoint':'https://oauth2.googleapis.com/token','responseType':_0x5da0(0x2)},'pinterest':{'clientId':'YOUR_PINTEREST_CLIENT_ID','redirectUri':_0x5da0(0x7),'scope':_0x5da0(0x8),'authorizationEndpoint':'https://www.pinterest.com/oauth/','tokenEndpoint':'https://api.pinterest.com/v5/oauth/token','responseType':_0x5da0(0x2)},'reddit':{'clientId':'YOUR_REDDIT_CLIENT_ID','redirectUri':_0x5da0(0x9),'scope':'identity,read','authorizationEndpoint':'https://www.reddit.com/api/v1/authorize','tokenEndpoint':_0x5da0(0xa),'responseType':'code'}},generateState=()=>{const _0x28fd36={'wPDtw':function(_0x4d18eb,_0x576039){return _0x4d18eb(_0x576039);}},_0x25e039=Math[_0x5da0(0xb)]()[_0x5da0(0xc)](0x24)[_0x5da0(0xd)](0x2,0xf);return _0x28fd36[_0x5da0(0xe)](sha256,_0x25e039)['substring'](0x0,0xa);};export const initializeOAuthService=()=>{const _0x1ec150={'NhUJt':_0x5da0(0xf)};Linking[_0x5da0(0x10)](_0x1ec150[_0x5da0(0x11)],handleDeepLink);};export const cleanupOAuthService=()=>{const _0x4af83f={'Ndflr':'function','KiITV':'url'};typeof Linking['removeAllListeners']===_0x4af83f[_0x5da0(0x12)]&&Linking[_0x5da0(0x13)](_0x4af83f[_0x5da0(0x14)]);};let currentOAuthState=null,currentOAuthPlatform=null,currentOAuthResolve=null,currentOAuthReject=null;const handleDeepLink=async _0x5d0df1=>{const _0x3c086a={'vqHiG':function(_0xefd50a,_0x4c46d7){return _0xefd50a(_0x4c46d7);},'cCCAr':function(_0x4964c4){return _0x4964c4();},'CiMlG':_0x5da0(0x15),'balaI':'response_type','mZWWr':'scope','cWZcF':_0x5da0(0x16),'CWggz':_0x5da0(0x17),'mTHiB':'redirect_uri','MsJwR':function(_0x28f33a,_0x5dc50a){return _0x28f33a(_0x5dc50a);},'XngxU':function(_0x47d4ba,_0x40daae){return _0x47d4ba===_0x40daae;},'dfEYf':_0x5da0(0x18),'bqDlo':'onairosanime://auth/','Iuqqm':function(_0x5f5971,_0x3c5b05){return _0x5f5971!==_0x3c5b05;},'lXjiI':_0x5da0(0x2),'DmhQU':_0x5da0(0x19),'xdVjI':function(_0x2dd5d8,_0x2f1376){return _0x2dd5d8(_0x2f1376);},'UmEzO':_0x5da0(0x1a),'lCpxx':_0x5da0(0x1b),'cSFzq':function(_0x4270d4,_0x3040b9){return _0x4270d4!==_0x3040b9;},'PxUTQ':_0x5da0(0x1c),'CRLxu':function(_0x5d6d23,_0x3b50ea,_0x44f3a4){return _0x5d6d23(_0x3b50ea,_0x44f3a4);},'JkDkf':function(_0x412950,_0x4733ab){return _0x412950!==_0x4733ab;},'nmDWP':'SyPSW','cuiad':_0x5da0(0x1d),'EukEo':_0x5da0(0x1e),'yzkeZ':_0x5da0(0x1f),'QMxAu':function(_0x1580cf,_0x48b683){return _0x1580cf===_0x48b683;},'HLpmg':_0x5da0(0x20),'DYfAv':function(_0x53e69c,_0x3504ba){return _0x53e69c(_0x3504ba);},'dcLlM':function(_0x582373,_0x2f37c9){return _0x582373===_0x2f37c9;},'wPfhp':_0x5da0(0x21)};try{const {url:_0x1c3115}=_0x5d0df1;if(!_0x1c3115[_0x5da0(0x22)](_0x5da0(0x23))){if(_0x3c086a[_0x5da0(0x24)](_0x3c086a[_0x5da0(0x25)],_0x5da0(0x26)))delete _0x59c1fb[_0x370b6f];else return;}const _0x1be716=_0x1c3115[_0x5da0(0x27)](_0x3c086a[_0x5da0(0x28)])[0x1]['split']('?')[0x0];if(_0x3c086a[_0x5da0(0x29)](_0x1be716,currentOAuthPlatform))return;const _0x11edc9=new URL(_0x1c3115)[_0x5da0(0x2a)],_0x5df9de=_0x11edc9['get'](_0x3c086a[_0x5da0(0x2b)]),_0x4e368e=_0x11edc9[_0x5da0(0x2c)](_0x3c086a['cWZcF']),_0x17299d=_0x11edc9[_0x5da0(0x2c)](_0x3c086a[_0x5da0(0x2d)]);if(_0x3c086a[_0x5da0(0x29)](_0x4e368e,currentOAuthState)){currentOAuthReject&&_0x3c086a['xdVjI'](currentOAuthReject,new Error(_0x3c086a[_0x5da0(0x2e)]));return;}if(_0x17299d){if(currentOAuthReject){if('lVpDT'!==_0x3c086a[_0x5da0(0x2f)])_0x3c086a[_0x5da0(0x30)](currentOAuthReject,new Error('OAuth\x20error:\x20'+_0x17299d));else{_0x163c7e&&_0x3c086a[_0x5da0(0x30)](_0x31a6da,new _0x246a29(_0x5da0(0x31)+_0x1ead3c));return;}}return;}if(_0x5df9de){if(_0x3c086a[_0x5da0(0x32)](_0x3c086a[_0x5da0(0x33)],'DMJkS')){const _0x1b7afd=await _0x3c086a[_0x5da0(0x34)](exchangeCodeForToken,_0x1be716,_0x5df9de);if(currentOAuthResolve){if(_0x3c086a[_0x5da0(0x35)](_0x3c086a[_0x5da0(0x36)],_0x3c086a[_0x5da0(0x37)]))currentOAuthResolve(_0x1b7afd);else{const _0x55a6cf=_0x2d08fa[_0x555c64];if(!_0x55a6cf)throw new _0x1f2c2d('Unsupported\x20platform:\x20'+_0x7d5202);const _0x5c9913=_0x3c086a[_0x5da0(0x38)](_0xf9c72b),_0x118d3a=new _0x4b0f0a(_0x55a6cf['authorizationEndpoint']);_0x118d3a[_0x5da0(0x2a)]['append'](_0x3c086a['CiMlG'],_0x55a6cf[_0x5da0(0x39)]),_0x118d3a['searchParams'][_0x5da0(0x3a)](_0x5da0(0x3b),_0x55a6cf[_0x5da0(0x3c)]),_0x118d3a[_0x5da0(0x2a)][_0x5da0(0x3a)](_0x3c086a[_0x5da0(0x3d)],_0x55a6cf[_0x5da0(0x3e)]),_0x118d3a[_0x5da0(0x2a)][_0x5da0(0x3a)](_0x3c086a[_0x5da0(0x3f)],_0x55a6cf[_0x5da0(0x40)]),_0x118d3a[_0x5da0(0x2a)][_0x5da0(0x3a)](_0x3c086a[_0x5da0(0x41)],_0x5c9913),_0x3a3173=_0x5c9913,_0x593dd7=_0x9d0caa,_0x53a4e8=_0x2cb05c,_0x11564b=_0x3de456,Linking['openURL'](_0x118d3a[_0x5da0(0xc)]());}}}else _0x579904&&_0x3c086a[_0x5da0(0x30)](_0x107244,new _0x534350(_0x3c086a[_0x5da0(0x42)]));}else{if(_0x3c086a[_0x5da0(0x24)](_0x5da0(0x1e),_0x3c086a[_0x5da0(0x43)]))currentOAuthReject&&currentOAuthReject(new Error(_0x3c086a[_0x5da0(0x42)]));else throw new _0x168a07('Unsupported\x20platform:\x20'+_0x38141f);}}catch(_0x272e4f){console['error'](_0x3c086a[_0x5da0(0x44)],_0x272e4f);if(currentOAuthReject){if(_0x3c086a[_0x5da0(0x45)](_0x3c086a[_0x5da0(0x46)],_0x3c086a[_0x5da0(0x46)]))_0x3c086a['DYfAv'](currentOAuthReject,_0x272e4f);else try{const _0x4870f4=_0x5ad948[_0x520f89];if(!_0x4870f4)throw new _0x170e48(_0x5da0(0x47)+_0x585073);const _0x5ce2d9=_0x3c086a[_0x5da0(0x38)](_0x470081),_0x247a1e=new _0x12bab0(_0x4870f4['authorizationEndpoint']);_0x247a1e['searchParams'][_0x5da0(0x3a)](_0x3c086a[_0x5da0(0x48)],_0x4870f4['clientId']),_0x247a1e[_0x5da0(0x2a)]['append'](_0x3c086a['mTHiB'],_0x4870f4['redirectUri']),_0x247a1e[_0x5da0(0x2a)][_0x5da0(0x3a)](_0x3c086a[_0x5da0(0x3d)],_0x4870f4['responseType']),_0x247a1e[_0x5da0(0x2a)]['append'](_0x3c086a[_0x5da0(0x3f)],_0x4870f4[_0x5da0(0x40)]),_0x247a1e[_0x5da0(0x2a)][_0x5da0(0x3a)](_0x3c086a[_0x5da0(0x41)],_0x5ce2d9),_0x4d5068=_0x5ce2d9,_0x45f707=_0x112513,_0x3af4c2=_0x15eaf0,_0x20789b=_0x4600de,Linking[_0x5da0(0x49)](_0x247a1e[_0x5da0(0xc)]());}catch(_0x25f7fb){_0x3c086a[_0x5da0(0x4a)](_0x4f3828,_0x25f7fb);}}}finally{_0x3c086a[_0x5da0(0x4b)](_0x3c086a['wPfhp'],'yZcDS')?_0x3c086a[_0x5da0(0x30)](_0x553263,new _0x5d0e34(_0x5da0(0x31)+_0x498988)):(currentOAuthState=null,currentOAuthPlatform=null,currentOAuthResolve=null,currentOAuthReject=null);}},exchangeCodeForToken=async(_0x31092d,_0x4d8484)=>{const _0x19d08f={'rmtsZ':_0x5da0(0x4c),'CTXjV':function(_0x4118da,_0x3ae1c2,_0x2bedfa){return _0x4118da(_0x3ae1c2,_0x2bedfa);},'SptDE':_0x5da0(0x4d),'DSuDc':'Failed\x20to\x20exchange\x20code\x20for\x20token'};try{const _0x5eb453=OAUTH_CONFIGS[_0x31092d];if(!_0x5eb453)throw new Error(_0x5da0(0x47)+_0x31092d);const _0x3132ba=new URLSearchParams({'grant_type':_0x19d08f[_0x5da0(0x4e)],'code':_0x4d8484,'redirect_uri':_0x5eb453[_0x5da0(0x3c)],'client_id':_0x5eb453[_0x5da0(0x39)]}),_0x4bd78c=await _0x19d08f[_0x5da0(0x4f)](fetch,_0x5eb453[_0x5da0(0x50)],{'method':'POST','headers':{'Content-Type':_0x19d08f['SptDE']},'body':_0x3132ba['toString']()}),_0x12282c=await _0x4bd78c[_0x5da0(0x51)]();if(!_0x4bd78c['ok'])throw new Error(_0x12282c['error']||_0x19d08f['DSuDc']);const _0x4ce4ea=await fetchUserInfo(_0x31092d,_0x12282c['access_token']);return{'token':_0x12282c['access_token'],'refreshToken':_0x12282c[_0x5da0(0x52)],'expiresIn':_0x12282c[_0x5da0(0x53)],'username':_0x4ce4ea['username'],'userId':_0x4ce4ea['id']};}catch(_0x560f37){console[_0x5da0(0x19)](_0x5da0(0x54)+_0x31092d+'):',_0x560f37);throw _0x560f37;}},fetchUserInfo=async(_0x52becf,_0x3b0342)=>{const _0x27674f={'CRzAK':_0x5da0(0x55),'LWivA':_0x5da0(0x56),'UhZee':'pinterest','DeQaW':_0x5da0(0x57),'btPvB':'reddit','hEJEp':_0x5da0(0x58),'uqBav':function(_0x3b9db4,_0x56e45c,_0x8fd037){return _0x3b9db4(_0x56e45c,_0x8fd037);},'jxDLK':_0x5da0(0x59),'HGsgh':_0x5da0(0x5a)};try{let _0x56fec5,_0x517cb8={'Authorization':_0x5da0(0x5b)+_0x3b0342};switch(_0x52becf){case _0x27674f['CRzAK']:_0x56fec5=_0x5da0(0x5c);break;case _0x27674f['LWivA']:_0x56fec5=_0x5da0(0x5d);break;case _0x27674f[_0x5da0(0x5e)]:_0x56fec5=_0x27674f[_0x5da0(0x5f)];break;case _0x27674f[_0x5da0(0x60)]:_0x56fec5=_0x27674f[_0x5da0(0x61)];break;default:throw new Error('Unsupported\x20platform:\x20'+_0x52becf);}const _0x1f9f7e=await _0x27674f[_0x5da0(0x62)](fetch,_0x56fec5,{'headers':_0x517cb8}),_0x52eddf=await _0x1f9f7e[_0x5da0(0x51)]();if(!_0x1f9f7e['ok'])throw new Error(_0x52eddf[_0x5da0(0x19)]||_0x27674f[_0x5da0(0x63)]);switch(_0x52becf){case _0x27674f[_0x5da0(0x64)]:return{'id':_0x52eddf['id'],'username':_0x52eddf[_0x5da0(0x65)]};case'youtube':return{'id':_0x52eddf['items'][0x0]['id'],'username':_0x52eddf['items'][0x0][_0x5da0(0x66)]['title']};case _0x27674f[_0x5da0(0x5e)]:return{'id':_0x52eddf['id'],'username':_0x52eddf[_0x5da0(0x65)]||_0x52eddf[_0x5da0(0x67)]};case _0x27674f[_0x5da0(0x60)]:return{'id':_0x52eddf['id'],'username':_0x52eddf[_0x5da0(0x68)]};default:throw new Error(_0x5da0(0x47)+_0x52becf);}}catch(_0x25f067){if(_0x27674f[_0x5da0(0x69)]!==_0x5da0(0x6a)){console[_0x5da0(0x19)](_0x5da0(0x6b)+_0x52becf+'):',_0x25f067);throw _0x25f067;}else return _0x4da931[_0x5da0(0x19)](_0x5da0(0x6c)+_0xc0e657+'):',_0x1a4413),![];}};export const connectPlatform=_0x4a61b3=>{const _0x36978e={'vZgRP':function(_0xb5ad05,_0x2435f3){return _0xb5ad05(_0x2435f3);},'EtaOI':_0x5da0(0x6d),'MFdqC':'IfIhc','TigPw':function(_0x30d478){return _0x30d478();},'uKHzH':'redirect_uri','QyBUb':function(_0x4022b2,_0x582ba0){return _0x4022b2(_0x582ba0);}};return new Promise((_0xa80271,_0x3aad71)=>{if(_0x36978e[_0x5da0(0x6e)]!==_0x36978e[_0x5da0(0x6e)])return;else try{const _0x53d7df=OAUTH_CONFIGS[_0x4a61b3];if(!_0x53d7df){if('IfIhc'!==_0x36978e[_0x5da0(0x6f)])_0x36978e[_0x5da0(0x70)](_0x59b345,_0x501b73);else throw new Error(_0x5da0(0x47)+_0x4a61b3);}const _0x3ca5b2=_0x36978e[_0x5da0(0x71)](generateState),_0x23011b=new URL(_0x53d7df[_0x5da0(0x72)]);_0x23011b[_0x5da0(0x2a)]['append']('client_id',_0x53d7df[_0x5da0(0x39)]),_0x23011b['searchParams'][_0x5da0(0x3a)](_0x36978e[_0x5da0(0x73)],_0x53d7df[_0x5da0(0x3c)]),_0x23011b[_0x5da0(0x2a)][_0x5da0(0x3a)](_0x5da0(0x74),_0x53d7df[_0x5da0(0x3e)]),_0x23011b[_0x5da0(0x2a)][_0x5da0(0x3a)]('scope',_0x53d7df[_0x5da0(0x40)]),_0x23011b['searchParams']['append'](_0x5da0(0x16),_0x3ca5b2),currentOAuthState=_0x3ca5b2,currentOAuthPlatform=_0x4a61b3,currentOAuthResolve=_0xa80271,currentOAuthReject=_0x3aad71,Linking['openURL'](_0x23011b[_0x5da0(0xc)]());}catch(_0x3cac6f){_0x36978e[_0x5da0(0x75)](_0x3aad71,_0x3cac6f);}});};export const disconnectPlatform=async(_0xd10d38,_0x45f2c2)=>{const _0x3ed8a9={'PvVbT':_0x5da0(0xf),'IXXSZ':function(_0xb8ac8a,_0x3336d0){return _0xb8ac8a(_0x3336d0);},'zUUlR':_0x5da0(0x1a),'TsDYR':_0x5da0(0x76),'KeklF':function(_0x4128de,_0x43541d){return _0x4128de!==_0x43541d;},'QFiVr':_0x5da0(0x77),'tSzpf':function(_0x3ca18f,_0x1c262c){return _0x3ca18f(_0x1c262c);},'nCdJA':function(_0x4802c5,_0x4bc0be){return _0x4802c5===_0x4bc0be;},'OFzbz':_0x5da0(0x78)};try{await onairosApi[_0x5da0(0x79)](_0x3ed8a9['TsDYR'],{'platform':_0xd10d38,'username':_0x45f2c2['username']});const _0x176c41={..._0x45f2c2['platforms']};return _0x176c41&&_0xd10d38 in _0x176c41&&(_0x3ed8a9['KeklF'](_0x3ed8a9['QFiVr'],_0x3ed8a9[_0x5da0(0x7a)])?Linking['addEventListener'](_0x3ed8a9[_0x5da0(0x7b)],_0x16de01):delete _0x176c41[_0xd10d38]),await _0x3ed8a9[_0x5da0(0x7c)](updateCredentials,{..._0x45f2c2,'platforms':_0x176c41}),!![];}catch(_0x491357){if(_0x3ed8a9[_0x5da0(0x7d)](_0x3ed8a9['OFzbz'],_0x3ed8a9['OFzbz']))return console[_0x5da0(0x19)](_0x5da0(0x7e)+_0xd10d38+'):',_0x491357),![];else{_0x55335e&&_0x3ed8a9['IXXSZ'](_0x497492,new _0x2982ce(_0x3ed8a9[_0x5da0(0x7f)]));return;}}};export const storePlatformConnection=async(_0x4c8d52,_0x393210,_0x4c64b9)=>{const _0x27d72e={'Gawrc':function(_0x509328,_0x16acfe){return _0x509328===_0x16acfe;},'krYad':_0x5da0(0x55),'KGcjH':function(_0xb4886e,_0x479d5c){return _0xb4886e===_0x479d5c;},'jWYcH':'youtube','ZXWAR':_0x5da0(0x80),'ijdpa':function(_0x170354,_0x197768){return _0x170354===_0x197768;},'rMMMO':function(_0x50ac4c,_0x508c30){return _0x50ac4c===_0x508c30;},'eisLw':_0x5da0(0x81),'RazAd':function(_0xb4d76b,_0x355af4){return _0xb4d76b+_0x355af4;},'UfQwZ':function(_0x487b38,_0x4f0b4f){return _0x487b38*_0x4f0b4f;},'qsYdi':function(_0x34463d,_0x435407){return _0x34463d===_0x435407;},'lnGdp':function(_0x2d37d6,_0x5070bf){return _0x2d37d6===_0x5070bf;},'VaAKh':_0x5da0(0x82),'nokbp':function(_0x48e392,_0x19b54b){return _0x48e392(_0x19b54b);},'pXdxq':function(_0x30cd41,_0x5ab634){return _0x30cd41!==_0x5ab634;},'kLOOq':_0x5da0(0x83),'sgVxa':_0x5da0(0x84)};try{const _0x3e6f6a=_0x27d72e[_0x5da0(0x85)](_0x4c8d52,_0x27d72e[_0x5da0(0x86)])||_0x27d72e[_0x5da0(0x87)](_0x4c8d52,_0x27d72e['jWYcH'])||_0x4c8d52===_0x27d72e[_0x5da0(0x88)]||_0x27d72e[_0x5da0(0x89)](_0x4c8d52,_0x5da0(0x82));if(!_0x3e6f6a){if(_0x27d72e[_0x5da0(0x8a)]('xoTVz',_0x27d72e['eisLw']))throw new Error(_0x5da0(0x47)+_0x4c8d52);else{_0x29b7e0[_0x5da0(0x19)](_0x5da0(0x54)+_0x1fb9a7+'):',_0x3e4909);throw _0x3a2471;}}const _0x52640e={..._0x4c64b9[_0x5da0(0x8b)]},_0x4bc3df={'username':_0x393210[_0x5da0(0x65)],'userId':_0x393210[_0x5da0(0x8c)],'token':_0x393210[_0x5da0(0x8d)],'refreshToken':_0x393210[_0x5da0(0x8e)],'expiresAt':_0x393210[_0x5da0(0x8f)]?_0x27d72e['RazAd'](Date[_0x5da0(0x90)](),_0x27d72e[_0x5da0(0x91)](_0x393210[_0x5da0(0x8f)],0x3e8)):null,'connectedAt':Date[_0x5da0(0x90)]()};if(_0x27d72e[_0x5da0(0x92)](_0x4c8d52,_0x27d72e[_0x5da0(0x86)]))_0x52640e['instagram']=_0x4bc3df;else{if(_0x27d72e[_0x5da0(0x93)](_0x4c8d52,_0x5da0(0x56)))_0x52640e['youtube']=_0x4bc3df;else{if(_0x27d72e[_0x5da0(0x87)](_0x4c8d52,_0x27d72e['ZXWAR']))_0x52640e[_0x5da0(0x80)]=_0x4bc3df;else{if(_0x27d72e[_0x5da0(0x93)](_0x4c8d52,_0x27d72e['VaAKh']))_0x52640e[_0x5da0(0x82)]=_0x4bc3df;}}}return await _0x27d72e[_0x5da0(0x94)](updateCredentials,{..._0x4c64b9,'platforms':_0x52640e}),!![];}catch(_0x141964){if(_0x27d72e[_0x5da0(0x95)](_0x27d72e[_0x5da0(0x96)],_0x27d72e['sgVxa']))return console[_0x5da0(0x19)]('Error\x20storing\x20platform\x20connection\x20('+_0x4c8d52+'):',_0x141964),![];else _0x3dc9e9=null,_0x43f2ba=null,_0x18828f=null,_0x3c8361=null;}};function _0x5da0(_0x1969c9,_0x5da0ec){_0x1969c9=_0x1969c9-0x0;const _0x1dc0cc=_0x1969();let _0x224fad=_0x1dc0cc[_0x1969c9];return _0x224fad;}export const OAuthService={'initializeOAuthService':initializeOAuthService,'cleanupOAuthService':cleanupOAuthService,'connectPlatform':connectPlatform,'disconnectPlatform':disconnectPlatform,'storePlatformConnection':storePlatformConnection,'_apiBaseUrl':''+API_CONFIG[_0x5da0(0x97)]};
1
+ import { Linking } from 'react-native';
2
+ import { updateCredentials } from '../utils/secureStorage';
3
+ import { sha256 } from '../utils/crypto';
4
+ import { onairosApi } from '../api';
5
+ import { API_CONFIG } from '../config/api';
6
+
7
+ // Define OAuth configuration types
8
+
9
+ // Platform-specific OAuth configurations
10
+ const OAUTH_CONFIGS = {
11
+ instagram: {
12
+ clientId: 'YOUR_INSTAGRAM_CLIENT_ID',
13
+ // Replace with actual client ID
14
+ redirectUri: 'onairosanime://auth/instagram',
15
+ scope: 'user_profile,user_media',
16
+ authorizationEndpoint: 'https://api.instagram.com/oauth/authorize',
17
+ tokenEndpoint: 'https://api.instagram.com/oauth/access_token',
18
+ responseType: 'code'
19
+ },
20
+ youtube: {
21
+ clientId: 'YOUR_YOUTUBE_CLIENT_ID',
22
+ // Replace with actual client ID
23
+ redirectUri: 'onairosanime://auth/youtube',
24
+ scope: 'https://www.googleapis.com/auth/youtube.readonly',
25
+ authorizationEndpoint: 'https://accounts.google.com/o/oauth2/auth',
26
+ tokenEndpoint: 'https://oauth2.googleapis.com/token',
27
+ responseType: 'code'
28
+ },
29
+ pinterest: {
30
+ clientId: 'YOUR_PINTEREST_CLIENT_ID',
31
+ // Replace with actual client ID
32
+ redirectUri: 'onairosanime://auth/pinterest',
33
+ scope: 'boards:read,pins:read',
34
+ authorizationEndpoint: 'https://www.pinterest.com/oauth/',
35
+ tokenEndpoint: 'https://api.pinterest.com/v5/oauth/token',
36
+ responseType: 'code'
37
+ },
38
+ reddit: {
39
+ clientId: 'YOUR_REDDIT_CLIENT_ID',
40
+ // Replace with actual client ID
41
+ redirectUri: 'onairosanime://auth/reddit',
42
+ scope: 'identity,read',
43
+ authorizationEndpoint: 'https://www.reddit.com/api/v1/authorize',
44
+ tokenEndpoint: 'https://www.reddit.com/api/v1/access_token',
45
+ responseType: 'code'
46
+ }
47
+ };
48
+
49
+ /**
50
+ * Generate a state value for OAuth to prevent CSRF attacks
51
+ */
52
+ const generateState = () => {
53
+ const randomValue = Math.random().toString(36).substring(2, 15);
54
+ return sha256(randomValue).substring(0, 10);
55
+ };
56
+
57
+ /**
58
+ * Initialize OAuth service handlers and listeners
59
+ */
60
+ export const initializeOAuthService = () => {
61
+ // Set up deep linking handlers for OAuth redirects
62
+ Linking.addEventListener('url', handleDeepLink);
63
+ };
64
+
65
+ /**
66
+ * Clean up OAuth service handlers and listeners
67
+ */
68
+ export const cleanupOAuthService = () => {
69
+ // Use the modern React Native Linking API
70
+ if (typeof Linking.removeAllListeners === 'function') {
71
+ Linking.removeAllListeners('url');
72
+ }
73
+ };
74
+
75
+ // Keep track of current OAuth state and callbacks
76
+ let currentOAuthState = null;
77
+ let currentOAuthPlatform = null;
78
+ let currentOAuthResolve = null;
79
+ let currentOAuthReject = null;
80
+
81
+ /**
82
+ * Handle deep link callbacks from OAuth providers
83
+ */
84
+ const handleDeepLink = async event => {
85
+ try {
86
+ const {
87
+ url
88
+ } = event;
89
+
90
+ // Check if this is an OAuth callback URL
91
+ if (!url.startsWith('onairosanime://auth/')) {
92
+ return;
93
+ }
94
+
95
+ // Extract platform from URL path
96
+ const platform = url.split('onairosanime://auth/')[1].split('?')[0];
97
+
98
+ // Only handle if it matches current OAuth flow
99
+ if (platform !== currentOAuthPlatform) {
100
+ return;
101
+ }
102
+
103
+ // Parse URL parameters
104
+ const params = new URL(url).searchParams;
105
+ const code = params.get('code');
106
+ const state = params.get('state');
107
+ const error = params.get('error');
108
+
109
+ // Validate state to prevent CSRF attacks
110
+ if (state !== currentOAuthState) {
111
+ if (currentOAuthReject) {
112
+ currentOAuthReject(new Error('OAuth state mismatch - possible CSRF attack'));
113
+ }
114
+ return;
115
+ }
116
+
117
+ // Handle errors
118
+ if (error) {
119
+ if (currentOAuthReject) {
120
+ currentOAuthReject(new Error(`OAuth error: ${error}`));
121
+ }
122
+ return;
123
+ }
124
+
125
+ // Proceed with token exchange if code is present
126
+ if (code) {
127
+ const tokenResult = await exchangeCodeForToken(platform, code);
128
+ if (currentOAuthResolve) {
129
+ currentOAuthResolve(tokenResult);
130
+ }
131
+ } else {
132
+ if (currentOAuthReject) {
133
+ currentOAuthReject(new Error('No authorization code received'));
134
+ }
135
+ }
136
+ } catch (error) {
137
+ console.error('Error handling OAuth deep link:', error);
138
+ if (currentOAuthReject) {
139
+ currentOAuthReject(error);
140
+ }
141
+ } finally {
142
+ // Reset state
143
+ currentOAuthState = null;
144
+ currentOAuthPlatform = null;
145
+ currentOAuthResolve = null;
146
+ currentOAuthReject = null;
147
+ }
148
+ };
149
+
150
+ /**
151
+ * Exchange OAuth authorization code for access token
152
+ */
153
+ const exchangeCodeForToken = async (platform, code) => {
154
+ try {
155
+ const config = OAUTH_CONFIGS[platform];
156
+ if (!config) {
157
+ throw new Error(`Unsupported platform: ${platform}`);
158
+ }
159
+
160
+ // Prepare token request parameters
161
+ const params = new URLSearchParams({
162
+ grant_type: 'authorization_code',
163
+ code,
164
+ redirect_uri: config.redirectUri,
165
+ client_id: config.clientId
166
+ });
167
+
168
+ // Exchange code for token
169
+ const response = await fetch(config.tokenEndpoint, {
170
+ method: 'POST',
171
+ headers: {
172
+ 'Content-Type': 'application/x-www-form-urlencoded'
173
+ },
174
+ body: params.toString()
175
+ });
176
+ const data = await response.json();
177
+ if (!response.ok) {
178
+ throw new Error(data.error || 'Failed to exchange code for token');
179
+ }
180
+
181
+ // Fetch user information based on the platform
182
+ const userInfo = await fetchUserInfo(platform, data.access_token);
183
+ return {
184
+ token: data.access_token,
185
+ refreshToken: data.refresh_token,
186
+ expiresIn: data.expires_in,
187
+ username: userInfo.username,
188
+ userId: userInfo.id
189
+ };
190
+ } catch (error) {
191
+ console.error(`Error exchanging code for token (${platform}):`, error);
192
+ throw error;
193
+ }
194
+ };
195
+
196
+ /**
197
+ * Fetch user information from the connected platform
198
+ */
199
+ const fetchUserInfo = async (platform, accessToken) => {
200
+ try {
201
+ let endpoint;
202
+ let headers = {
203
+ Authorization: `Bearer ${accessToken}`
204
+ };
205
+
206
+ // Platform-specific API endpoints for user info
207
+ switch (platform) {
208
+ case 'instagram':
209
+ endpoint = 'https://graph.instagram.com/me?fields=id,username';
210
+ break;
211
+ case 'youtube':
212
+ endpoint = 'https://www.googleapis.com/youtube/v3/channels?part=snippet&mine=true';
213
+ break;
214
+ case 'pinterest':
215
+ endpoint = 'https://api.pinterest.com/v5/user_account';
216
+ break;
217
+ case 'reddit':
218
+ endpoint = 'https://oauth.reddit.com/api/v1/me';
219
+ break;
220
+ default:
221
+ throw new Error(`Unsupported platform: ${platform}`);
222
+ }
223
+ const response = await fetch(endpoint, {
224
+ headers
225
+ });
226
+ const data = await response.json();
227
+ if (!response.ok) {
228
+ throw new Error(data.error || 'Failed to fetch user info');
229
+ }
230
+
231
+ // Extract user information based on platform-specific response format
232
+ switch (platform) {
233
+ case 'instagram':
234
+ return {
235
+ id: data.id,
236
+ username: data.username
237
+ };
238
+ case 'youtube':
239
+ return {
240
+ id: data.items[0].id,
241
+ username: data.items[0].snippet.title
242
+ };
243
+ case 'pinterest':
244
+ return {
245
+ id: data.id,
246
+ username: data.username || data.full_name
247
+ };
248
+ case 'reddit':
249
+ return {
250
+ id: data.id,
251
+ username: data.name
252
+ };
253
+ default:
254
+ throw new Error(`Unsupported platform: ${platform}`);
255
+ }
256
+ } catch (error) {
257
+ console.error(`Error fetching user info (${platform}):`, error);
258
+ throw error;
259
+ }
260
+ };
261
+
262
+ /**
263
+ * Connect to a platform using OAuth
264
+ */
265
+ export const connectPlatform = platform => {
266
+ return new Promise((resolve, reject) => {
267
+ try {
268
+ const config = OAUTH_CONFIGS[platform];
269
+ if (!config) {
270
+ throw new Error(`Unsupported platform: ${platform}`);
271
+ }
272
+
273
+ // Generate state for CSRF protection
274
+ const state = generateState();
275
+
276
+ // Build authorization URL
277
+ const authUrl = new URL(config.authorizationEndpoint);
278
+ authUrl.searchParams.append('client_id', config.clientId);
279
+ authUrl.searchParams.append('redirect_uri', config.redirectUri);
280
+ authUrl.searchParams.append('response_type', config.responseType);
281
+ authUrl.searchParams.append('scope', config.scope);
282
+ authUrl.searchParams.append('state', state);
283
+
284
+ // Set up current OAuth state for callback handling
285
+ currentOAuthState = state;
286
+ currentOAuthPlatform = platform;
287
+ currentOAuthResolve = resolve;
288
+ currentOAuthReject = reject;
289
+
290
+ // Open browser or WebView to the authorization URL
291
+ Linking.openURL(authUrl.toString());
292
+ } catch (error) {
293
+ reject(error);
294
+ }
295
+ });
296
+ };
297
+
298
+ /**
299
+ * Disconnect from a platform
300
+ */
301
+ export const disconnectPlatform = async (platform, credentials) => {
302
+ try {
303
+ // Call Onairos API to disconnect platform
304
+ await onairosApi.post('/users/disconnect-platform', {
305
+ platform,
306
+ username: credentials.username
307
+ });
308
+
309
+ // Update local credentials to remove platform
310
+ const updatedPlatforms = {
311
+ ...credentials.platforms
312
+ };
313
+
314
+ // Type-safe platform removal using keyof operator
315
+ if (updatedPlatforms && platform in updatedPlatforms) {
316
+ delete updatedPlatforms[platform];
317
+ }
318
+ await updateCredentials({
319
+ ...credentials,
320
+ platforms: updatedPlatforms
321
+ });
322
+ return true;
323
+ } catch (error) {
324
+ console.error(`Error disconnecting platform (${platform}):`, error);
325
+ return false;
326
+ }
327
+ };
328
+
329
+ /**
330
+ * Store platform connection data in user credentials
331
+ */
332
+ export const storePlatformConnection = async (platform, connectionData, credentials) => {
333
+ try {
334
+ // Only accept valid platform types
335
+ const validPlatform = platform === 'instagram' || platform === 'youtube' || platform === 'pinterest' || platform === 'reddit';
336
+ if (!validPlatform) {
337
+ throw new Error(`Unsupported platform: ${platform}`);
338
+ }
339
+
340
+ // Update platforms in credentials with type safety
341
+ const updatedPlatforms = {
342
+ ...credentials.platforms
343
+ };
344
+
345
+ // Type-safe assignment
346
+ const platformData = {
347
+ username: connectionData.username,
348
+ userId: connectionData.userId,
349
+ token: connectionData.token,
350
+ refreshToken: connectionData.refreshToken,
351
+ expiresAt: connectionData.expiresIn ? Date.now() + connectionData.expiresIn * 1000 : null,
352
+ connectedAt: Date.now()
353
+ };
354
+
355
+ // Assign platform data based on platform type
356
+ if (platform === 'instagram') updatedPlatforms.instagram = platformData;else if (platform === 'youtube') updatedPlatforms.youtube = platformData;else if (platform === 'pinterest') updatedPlatforms.pinterest = platformData;else if (platform === 'reddit') updatedPlatforms.reddit = platformData;
357
+
358
+ // Update stored credentials
359
+ await updateCredentials({
360
+ ...credentials,
361
+ platforms: updatedPlatforms
362
+ });
363
+ return true;
364
+ } catch (error) {
365
+ console.error(`Error storing platform connection (${platform}):`, error);
366
+ return false;
367
+ }
368
+ };
369
+ /**
370
+ * Service for handling OAuth connections to various platforms
371
+ */
372
+ export const OAuthService = {
373
+ initializeOAuthService,
374
+ cleanupOAuthService,
375
+ connectPlatform,
376
+ disconnectPlatform,
377
+ storePlatformConnection,
378
+ // Base API URL
379
+ _apiBaseUrl: `${API_CONFIG.BASE_URL}`
380
+ };
381
+ //# sourceMappingURL=oauthService.js.map
@@ -4,4 +4,4 @@ var __ONAIROS_REQ_REGISTRY__ = [
4
4
  require('react-native-crypto-js')
5
5
  ];
6
6
  function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
7
- function _0x419b(_0x5550df,_0x419b77){_0x5550df=_0x5550df-0x0;const _0x4b0d3e=_0x5550();let _0x66bce5=_0x4b0d3e[_0x5550df];return _0x66bce5;}function _0x5550(){const _0x5f0a43=['onairos-pin-encryption-key-2024','🔓\x20PIN\x20decrypted\x20successfully','🔐\x20PIN\x20encrypted\x20successfully','❌\x20Error\x20encrypting\x20PIN:','jPoEk','bpbKL','encrypt','log','QFosh','AES','decrypt','toString','enc','Utf8','udwjB','error','rJsny','❌\x20Error\x20hashing\x20PIN:','🔒\x20PIN\x20hashed\x20successfully','pweid','❌\x20Error\x20decrypting\x20PIN:','LdRjn','qoWel','QMwMX','tFvDG','SHA256','sfXOo','gAAem','⚠️\x20No\x20temporary\x20PIN\x20available\x20for\x20encryption','✅\x20PIN\x20encrypted\x20for\x20API\x20transmission','❌\x20Error\x20getting\x20encrypted\x20PIN\x20for\x20API:','NdlPC','iUoRz','hiIFL','juDyr','ACEQG','TjMPn','yFwCn','TzUET','PREby','AsVWN','jDMwO','iqoPB'];_0x5550=function(){return _0x5f0a43;};return _0x5550();}const CryptoJS=__ONAIROS_REQ_FUNC__(0x0);import{getTemporaryPin}from'./pinStorageUtils';const ENCRYPTION_KEY=_0x419b(0x0);export const encryptPin=_0x19b832=>{const _0x31e4a7={'udwjB':_0x419b(0x1),'jPoEk':function(_0x25137f,_0x4963e9){return _0x25137f===_0x4963e9;},'QFosh':_0x419b(0x2),'rJsny':_0x419b(0x3)};try{if(_0x31e4a7[_0x419b(0x4)](_0x419b(0x5),_0x419b(0x5))){const _0x435e0e=CryptoJS['AES'][_0x419b(0x6)](_0x19b832,ENCRYPTION_KEY)['toString']();return console[_0x419b(0x7)](_0x31e4a7[_0x419b(0x8)]),_0x435e0e;}else try{const _0x5e003d=_0x241138[_0x419b(0x9)][_0x419b(0xa)](_0x26b90f,_0x375817),_0x1a8d4b=_0x5e003d[_0x419b(0xb)](_0x141ea5[_0x419b(0xc)][_0x419b(0xd)]);return _0xb00a6c[_0x419b(0x7)](_0x31e4a7[_0x419b(0xe)]),_0x1a8d4b;}catch(_0x1619c1){_0x825c32[_0x419b(0xf)]('❌\x20Error\x20decrypting\x20PIN:',_0x1619c1);throw _0x1619c1;}}catch(_0x1eaf56){console[_0x419b(0xf)](_0x31e4a7[_0x419b(0x10)],_0x1eaf56);throw _0x1eaf56;}};export const decryptPin=_0x3172b7=>{const _0x239c7a={'QMwMX':_0x419b(0x11),'sfXOo':_0x419b(0x12),'LdRjn':function(_0x3227aa,_0x55d942){return _0x3227aa===_0x55d942;},'qoWel':_0x419b(0x13),'meEDD':_0x419b(0x1),'tFvDG':'PmrdM','lhYxH':_0x419b(0x14)};try{if(_0x239c7a[_0x419b(0x15)](_0x239c7a['qoWel'],_0x239c7a[_0x419b(0x16)])){const _0x355eee=CryptoJS['AES'][_0x419b(0xa)](_0x3172b7,ENCRYPTION_KEY),_0x294694=_0x355eee[_0x419b(0xb)](CryptoJS[_0x419b(0xc)][_0x419b(0xd)]);return console['log'](_0x239c7a['meEDD']),_0x294694;}else{_0x12a1e2['error'](_0x239c7a[_0x419b(0x17)],_0x400a3d);throw _0x46d117;}}catch(_0x10d3b2){if(_0x239c7a[_0x419b(0x18)]===_0x239c7a[_0x419b(0x18)]){console[_0x419b(0xf)](_0x239c7a['lhYxH'],_0x10d3b2);throw _0x10d3b2;}else{const _0x507308=_0x16a4f6[_0x419b(0x19)](_0x5da810+_0x2e4baa)[_0x419b(0xb)]();return _0x593f45[_0x419b(0x7)](_0x239c7a[_0x419b(0x1a)]),_0x507308;}}};export const getEncryptedPinForAPI=async()=>{const _0x5ece8b={'TjMPn':function(_0x4b2776,_0xcc6b57){return _0x4b2776+_0xcc6b57;},'yFwCn':_0x419b(0x12),'KBjNl':_0x419b(0x11),'NdlPC':function(_0x23decf,_0xeac6b8){return _0x23decf!==_0xeac6b8;},'iUoRz':_0x419b(0x1b),'juDyr':_0x419b(0x1c),'ACEQG':_0x419b(0x1d),'TzUET':_0x419b(0x1e)};try{if(_0x5ece8b[_0x419b(0x1f)](_0x5ece8b[_0x419b(0x20)],_0x419b(0x21))){const _0x5990a8=getTemporaryPin();if(!_0x5990a8)return console[_0x419b(0x7)](_0x5ece8b[_0x419b(0x22)]),null;const _0x3b220d=encryptPin(_0x5990a8);return console[_0x419b(0x7)](_0x5ece8b[_0x419b(0x23)]),_0x3b220d;}else try{const _0x596d6f=_0xac600e[_0x419b(0x19)](_0x5ece8b[_0x419b(0x24)](_0x1ab649,_0x3feb87))[_0x419b(0xb)]();return _0x35c415[_0x419b(0x7)](_0x5ece8b[_0x419b(0x25)]),_0x596d6f;}catch(_0x134a28){_0x31b51a[_0x419b(0xf)](_0x5ece8b['KBjNl'],_0x134a28);throw _0x134a28;}}catch(_0x55b087){return console[_0x419b(0xf)](_0x5ece8b[_0x419b(0x26)],_0x55b087),null;}};export const hashPin=_0x4003f4=>{const _0x3c15a4={'AsVWN':function(_0x351332,_0x32cf84){return _0x351332+_0x32cf84;},'jDMwO':_0x419b(0x12),'hyiXP':_0x419b(0x27),'iqoPB':'❌\x20Error\x20hashing\x20PIN:'};try{const _0x666174=CryptoJS[_0x419b(0x19)](_0x3c15a4[_0x419b(0x28)](_0x4003f4,ENCRYPTION_KEY))['toString']();return console[_0x419b(0x7)](_0x3c15a4[_0x419b(0x29)]),_0x666174;}catch(_0x280534){if(_0x3c15a4['hyiXP']!==_0x3c15a4['hyiXP']){_0x58ae09[_0x419b(0xf)]('❌\x20Error\x20decrypting\x20PIN:',_0x392e04);throw _0x190722;}else{console[_0x419b(0xf)](_0x3c15a4[_0x419b(0x2a)],_0x280534);throw _0x280534;}}};
7
+ const CryptoJS=__ONAIROS_REQ_FUNC__(0x0);function _0x5630(_0x45c522,_0x563027){_0x45c522=_0x45c522-0x0;const _0x51edd4=_0x45c5();let _0x2990da=_0x51edd4[_0x45c522];return _0x2990da;}import{getTemporaryPin}from'./pinStorageUtils';const ENCRYPTION_KEY=_0x5630(0x0);export const encryptPin=_0x29ef21=>{const _0x44d045={'jFmGD':_0x5630(0x1),'RBWNZ':'❌\x20Error\x20encrypting\x20PIN:','HRBRq':function(_0x1609e2,_0x1d1ba4){return _0x1609e2!==_0x1d1ba4;},'anrcn':'mgmjX'};try{const _0x4f28b3=CryptoJS[_0x5630(0x2)][_0x5630(0x3)](_0x29ef21,ENCRYPTION_KEY)[_0x5630(0x4)]();return console[_0x5630(0x5)](_0x44d045['jFmGD']),_0x4f28b3;}catch(_0x55b79d){if(_0x44d045[_0x5630(0x6)](_0x44d045[_0x5630(0x7)],_0x5630(0x8)))try{const _0x56af04=_0x1a572e[_0x5630(0x2)]['encrypt'](_0x308695,_0x13d049)['toString']();return _0x4186d6[_0x5630(0x5)](_0x44d045[_0x5630(0x9)]),_0x56af04;}catch(_0x3240f0){_0x42b126[_0x5630(0xa)](_0x44d045['RBWNZ'],_0x3240f0);throw _0x3240f0;}else{console['error'](_0x44d045[_0x5630(0xb)],_0x55b79d);throw _0x55b79d;}}};export const decryptPin=_0x54c468=>{const _0x58b88e={'gcOje':'🔓\x20PIN\x20decrypted\x20successfully','TdkUy':_0x5630(0xc)};try{const _0x7ae9df=CryptoJS[_0x5630(0x2)]['decrypt'](_0x54c468,ENCRYPTION_KEY),_0x29623a=_0x7ae9df[_0x5630(0x4)](CryptoJS[_0x5630(0xd)][_0x5630(0xe)]);return console[_0x5630(0x5)](_0x58b88e['gcOje']),_0x29623a;}catch(_0x1f5334){console['error'](_0x58b88e['TdkUy'],_0x1f5334);throw _0x1f5334;}};function _0x45c5(){const _0xeff537=['onairos-pin-encryption-key-2024','🔐\x20PIN\x20encrypted\x20successfully','AES','encrypt','toString','log','HRBRq','anrcn','mgmjX','jFmGD','error','RBWNZ','❌\x20Error\x20decrypting\x20PIN:','enc','Utf8','⚠️\x20No\x20temporary\x20PIN\x20available\x20for\x20encryption','✅\x20PIN\x20encrypted\x20for\x20API\x20transmission','olMCA','mudIJ','YxPva','gugTA','❌\x20Error\x20getting\x20encrypted\x20PIN\x20for\x20API:','zstdj','iaQvY','YlSca','yFRyH','gdcTb','PqCqu','🔒\x20PIN\x20hashed\x20successfully','❌\x20Error\x20hashing\x20PIN:'];_0x45c5=function(){return _0xeff537;};return _0x45c5();}export const getEncryptedPinForAPI=async()=>{const _0x849b21={'olMCA':function(_0x4836e3){return _0x4836e3();},'eqTbx':_0x5630(0xf),'mudIJ':function(_0x40ca3b,_0x130a8f){return _0x40ca3b(_0x130a8f);},'YxPva':_0x5630(0x10),'gugTA':'❌\x20Error\x20getting\x20encrypted\x20PIN\x20for\x20API:'};try{const _0x53861d=_0x849b21[_0x5630(0x11)](getTemporaryPin);if(!_0x53861d)return console[_0x5630(0x5)](_0x849b21['eqTbx']),null;const _0x57fba5=_0x849b21[_0x5630(0x12)](encryptPin,_0x53861d);return console['log'](_0x849b21[_0x5630(0x13)]),_0x57fba5;}catch(_0x2b5679){return console[_0x5630(0xa)](_0x849b21[_0x5630(0x14)],_0x2b5679),null;}};export const hashPin=_0x1b7f2a=>{const _0x419acf={'gdcTb':_0x5630(0x15),'YlSca':function(_0x80b9bd,_0x46bb18){return _0x80b9bd===_0x46bb18;},'yFRyH':_0x5630(0x16),'kPFix':_0x5630(0x17),'PqCqu':function(_0x40d2de,_0x506cb0){return _0x40d2de+_0x506cb0;}};try{if(_0x419acf[_0x5630(0x18)](_0x419acf[_0x5630(0x19)],_0x419acf['kPFix']))return _0x54fbc0[_0x5630(0xa)](_0x419acf[_0x5630(0x1a)],_0x360481),null;else{const _0x1e1574=CryptoJS['SHA256'](_0x419acf[_0x5630(0x1b)](_0x1b7f2a,ENCRYPTION_KEY))[_0x5630(0x4)]();return console[_0x5630(0x5)](_0x5630(0x1c)),_0x1e1574;}}catch(_0x26e4be){console[_0x5630(0xa)](_0x5630(0x1d),_0x26e4be);throw _0x26e4be;}};
@@ -1 +1 @@
1
- import{biometricPinService}from'./biometricPinService';function _0x43ed(_0xb6c377,_0x43ed22){_0xb6c377=_0xb6c377-0x0;const _0x4be8db=_0xb6c3();let _0x104297=_0x4be8db[_0xb6c377];return _0x104297;}export const getStoredPinForTraining=async()=>{const _0x32d999={'ktech':'📝\x20Using\x20temporary\x20PIN\x20for\x20training','PCFXI':_0x43ed(0x0),'OnQMp':function(_0x518575,_0x4aad4f){return _0x518575!==_0x4aad4f;},'ipvbS':'ifBqw','sRIdP':'ZTJhX','fVDhF':_0x43ed(0x1),'QQQof':'⚠️\x20No\x20PIN\x20stored\x20in\x20secure\x20storage','HHYsU':_0x43ed(0x2),'vmNhD':_0x43ed(0x3),'xLqeu':_0x43ed(0x4)};try{if(_0x32d999[_0x43ed(0x5)](_0x32d999[_0x43ed(0x6)],_0x32d999['sRIdP'])){console[_0x43ed(0x7)](_0x32d999[_0x43ed(0x8)]);const _0x57faad=await biometricPinService[_0x43ed(0x9)]();if(!_0x57faad)return console[_0x43ed(0x7)](_0x32d999[_0x43ed(0xa)]),null;const _0x155dc4=await biometricPinService[_0x43ed(0xb)]();return _0x155dc4?_0x32d999[_0x43ed(0xc)]!==_0x43ed(0xd)?(console[_0x43ed(0x7)](_0x32d999[_0x43ed(0xe)]),_0x155dc4):(_0xf3c4ee[_0x43ed(0x7)](_0x32d999[_0x43ed(0xf)]),_0x5d21b6):(console[_0x43ed(0x7)](_0x32d999[_0x43ed(0x10)]),null);}else return _0x3fa208['error'](_0x32d999[_0x43ed(0x11)],_0x1b8133),null;}catch(_0x37a6bd){return console[_0x43ed(0x12)](_0x32d999[_0x43ed(0x11)],_0x37a6bd),null;}};export const hasStoredPin=async()=>{const _0x4d15a1={'HLIsw':_0x43ed(0x4),'zqbJt':_0x43ed(0x13),'LUeUI':'TVimV','jpPpn':_0x43ed(0x14)};try{return await biometricPinService[_0x43ed(0x9)]();}catch(_0xf3bd33){return _0x4d15a1[_0x43ed(0x15)]===_0x4d15a1[_0x43ed(0x16)]?(_0x348f66[_0x43ed(0x7)](_0x4d15a1[_0x43ed(0x17)]),null):(console[_0x43ed(0x12)](_0x4d15a1[_0x43ed(0x18)],_0xf3bd33),![]);}};export const clearStoredPin=async()=>{const _0xc0687d={'pAZGu':_0x43ed(0x19),'hRDuT':function(_0x1795a5,_0x2a7282){return _0x1795a5!==_0x2a7282;},'CPEUj':_0x43ed(0x1a),'DNczM':'AQZsa','DZFCj':_0x43ed(0x1b)};try{if(_0xc0687d[_0x43ed(0x1c)](_0xc0687d[_0x43ed(0x1d)],_0xc0687d[_0x43ed(0x1e)]))return console[_0x43ed(0x7)](_0x43ed(0x1f)),await biometricPinService['removePinFromStorage']();else _0x17cb9f=null,_0x4d06b1[_0x43ed(0x7)](_0xc0687d[_0x43ed(0x20)]);}catch(_0x47a955){return console[_0x43ed(0x12)](_0xc0687d['DZFCj'],_0x47a955),![];}};export const getPinForTraining=async _0x5e2da3=>{const _0x92897a={'YvzwV':function(_0x3fd5f,_0x12a00f){return _0x3fd5f!==_0x12a00f;},'MggPW':_0x43ed(0x21),'PoFhF':_0x43ed(0x22)};if(_0x5e2da3)return _0x92897a[_0x43ed(0x23)](_0x92897a[_0x43ed(0x24)],_0x92897a[_0x43ed(0x25)])?(console[_0x43ed(0x7)](_0x43ed(0x26)),_0x5e2da3):_0x143d62;return await getStoredPinForTraining();};let temporaryPin=null;export const setTemporaryPin=_0xd2498a=>{temporaryPin=_0xd2498a,console[_0x43ed(0x7)](_0x43ed(0x27));};export const getTemporaryPin=()=>{return temporaryPin;};function _0xb6c3(){const _0x392265=['❌\x20Error\x20retrieving\x20stored\x20PIN:','🔓\x20Retrieving\x20stored\x20PIN\x20for\x20training...','jWtpi','✅\x20PIN\x20retrieved\x20successfully\x20for\x20training','❌\x20Failed\x20to\x20retrieve\x20PIN\x20or\x20user\x20cancelled\x20authentication','OnQMp','ipvbS','log','fVDhF','isPinStored','QQQof','retrievePinWithBiometric','HHYsU','lwOfK','vmNhD','ktech','xLqeu','PCFXI','error','lAyjC','❌\x20Error\x20checking\x20PIN\x20storage:','zqbJt','LUeUI','HLIsw','jpPpn','🗑️\x20Temporary\x20PIN\x20cleared','EFpzv','❌\x20Error\x20clearing\x20stored\x20PIN:','hRDuT','CPEUj','DNczM','🗑️\x20Clearing\x20stored\x20PIN...','pAZGu','BZTcg','CmKWI','YvzwV','MggPW','PoFhF','📝\x20Using\x20temporary\x20PIN\x20for\x20training','📝\x20Temporary\x20PIN\x20set\x20for\x20training','XoDYy'];_0xb6c3=function(){return _0x392265;};return _0xb6c3();}export const clearTemporaryPin=()=>{const _0x1d9c7e={'XoDYy':'🗑️\x20Temporary\x20PIN\x20cleared'};temporaryPin=null,console[_0x43ed(0x7)](_0x1d9c7e[_0x43ed(0x28)]);};
1
+ import{biometricPinService}from'./biometricPinService';export const getStoredPinForTraining=async()=>{const _0x3f9436={'MqKxB':_0x157f(0x0),'DeCAg':function(_0x37a5a2,_0x3a6568){return _0x37a5a2!==_0x3a6568;},'LvGVl':_0x157f(0x1),'kkpmi':_0x157f(0x2),'HFxXF':_0x157f(0x3),'rDnDQ':'✅\x20PIN\x20retrieved\x20successfully\x20for\x20training','Xwpof':_0x157f(0x4),'OAlXr':_0x157f(0x5),'KakUO':_0x157f(0x6),'GVxuq':_0x157f(0x7)};try{if(_0x3f9436[_0x157f(0x8)](_0x3f9436[_0x157f(0x9)],_0x157f(0xa))){console[_0x157f(0xb)](_0x3f9436[_0x157f(0xc)]);const _0x14a0b9=await biometricPinService['isPinStored']();if(!_0x14a0b9)return console[_0x157f(0xb)](_0x3f9436['HFxXF']),null;const _0x5d846d=await biometricPinService[_0x157f(0xd)]();return _0x5d846d?(console[_0x157f(0xb)](_0x3f9436[_0x157f(0xe)]),_0x5d846d):(console[_0x157f(0xb)](_0x3f9436['Xwpof']),null);}else _0x4ef14d=_0x55b5d4,_0x387847[_0x157f(0xb)](_0x3f9436['MqKxB']);}catch(_0x4669b7){return _0x3f9436['DeCAg'](_0x3f9436['OAlXr'],_0x3f9436[_0x157f(0xf)])?(console[_0x157f(0x10)](_0x3f9436[_0x157f(0x11)],_0x4669b7),null):_0x906c43;}};export const hasStoredPin=async()=>{const _0x2448a7={'uUnlw':_0x157f(0x12)};try{return await biometricPinService['isPinStored']();}catch(_0x520d14){return console['error'](_0x2448a7[_0x157f(0x13)],_0x520d14),![];}};export const clearStoredPin=async()=>{const _0x2e6d7f={'PbAjO':'🗑️\x20Clearing\x20stored\x20PIN...','BkuaW':_0x157f(0x14)};try{return console[_0x157f(0xb)](_0x2e6d7f[_0x157f(0x15)]),await biometricPinService[_0x157f(0x16)]();}catch(_0x4a8b6f){return console[_0x157f(0x10)](_0x2e6d7f['BkuaW'],_0x4a8b6f),![];}};export const getPinForTraining=async _0x15b53f=>{const _0x4050ca={'VZeDd':function(_0x500b86){return _0x500b86();}};if(_0x15b53f)return console['log'](_0x157f(0x17)),_0x15b53f;return await _0x4050ca[_0x157f(0x18)](getStoredPinForTraining);};let temporaryPin=null;function _0x157f(_0xe89092,_0x157f3a){_0xe89092=_0xe89092-0x0;const _0x218f8d=_0xe890();let _0x3d2962=_0x218f8d[_0xe89092];return _0x3d2962;}export const setTemporaryPin=_0x21aa73=>{const _0xfd17ae={'eMhAN':'📝\x20Temporary\x20PIN\x20set\x20for\x20training'};temporaryPin=_0x21aa73,console['log'](_0xfd17ae[_0x157f(0x19)]);};export const getTemporaryPin=()=>{return temporaryPin;};export const clearTemporaryPin=()=>{const _0x89251e={'Cmlup':_0x157f(0x1a)};temporaryPin=null,console[_0x157f(0xb)](_0x89251e['Cmlup']);};function _0xe890(){const _0x352785=['📝\x20Temporary\x20PIN\x20set\x20for\x20training','BEChk','🔓\x20Retrieving\x20stored\x20PIN\x20for\x20training...','⚠️\x20No\x20PIN\x20stored\x20in\x20secure\x20storage','❌\x20Failed\x20to\x20retrieve\x20PIN\x20or\x20user\x20cancelled\x20authentication','hXNvm','KBSvO','❌\x20Error\x20retrieving\x20stored\x20PIN:','DeCAg','LvGVl','PAyvI','log','kkpmi','retrievePinWithBiometric','rDnDQ','KakUO','error','GVxuq','❌\x20Error\x20checking\x20PIN\x20storage:','uUnlw','❌\x20Error\x20clearing\x20stored\x20PIN:','PbAjO','removePinFromStorage','📝\x20Using\x20temporary\x20PIN\x20for\x20training','VZeDd','eMhAN','🗑️\x20Temporary\x20PIN\x20cleared'];_0xe890=function(){return _0x352785;};return _0xe890();}