@onairos/react-native 3.6.7 → 3.6.9

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 (257) hide show
  1. package/README.md +423 -423
  2. package/lib/commonjs/api/index.js +1 -1
  3. package/lib/commonjs/assets/images/Checkbox.svg +3 -3
  4. package/lib/commonjs/assets/images/EnochE.svg +19 -19
  5. package/lib/commonjs/assets/images/Personalityprofile.svg +3 -3
  6. package/lib/commonjs/assets/images/Personalitytraits.svg +3 -3
  7. package/lib/commonjs/assets/images/Userpreferences.svg +3 -3
  8. package/lib/commonjs/assets/images/arrow.svg +20 -20
  9. package/lib/commonjs/assets/images/basicproficon.svg +43 -43
  10. package/lib/commonjs/assets/images/basicprofile.svg +3 -3
  11. package/lib/commonjs/assets/images/checkmark.svg +4 -4
  12. package/lib/commonjs/assets/images/contentanalysis.svg +3 -3
  13. package/lib/commonjs/assets/images/contenticon.svg +23 -23
  14. package/lib/commonjs/assets/images/personalityicon.svg +18 -18
  15. package/lib/commonjs/assets/images/x-close.svg +3 -3
  16. package/lib/commonjs/components/BodyText.js +1 -1
  17. package/lib/commonjs/components/BrandMark.js +1 -1
  18. package/lib/commonjs/components/CodeInput.js +1 -1
  19. package/lib/commonjs/components/EmailInput.js +1 -1
  20. package/lib/commonjs/components/GoogleButton.js +1 -1
  21. package/lib/commonjs/components/HeadingGroup.js +1 -1
  22. package/lib/commonjs/components/LLMDataInputModal.js +1 -1
  23. package/lib/commonjs/components/ModalHeader.js +1 -1
  24. package/lib/commonjs/components/ModalSheet.js +1 -1
  25. package/lib/commonjs/components/Onairos.js +1 -1
  26. package/lib/commonjs/components/OnairosButton.js +1 -1
  27. package/lib/commonjs/components/OnairosSignInButton.js +1 -1
  28. package/lib/commonjs/components/Overlay.js +1 -1
  29. package/lib/commonjs/components/PersonaImage.js +1 -1
  30. package/lib/commonjs/components/PersonaLoadingScreen.js +1 -1
  31. package/lib/commonjs/components/PersonalizationConsentScreen.js +1 -1
  32. package/lib/commonjs/components/PinCreationScreen.js +1 -1
  33. package/lib/commonjs/components/PinInput.js +1 -1
  34. package/lib/commonjs/components/PlatformConnectorsStep.js +1 -1
  35. package/lib/commonjs/components/PlatformList.js +1 -1
  36. package/lib/commonjs/components/PlatformToggle.js +1 -1
  37. package/lib/commonjs/components/PrimaryButton.js +1 -1
  38. package/lib/commonjs/components/SignInMatchAnimation.js +1 -1
  39. package/lib/commonjs/components/SignInStep.js +1 -1
  40. package/lib/commonjs/components/UniversalOnboarding.js +1 -1
  41. package/lib/commonjs/components/VerificationStep.js +1 -1
  42. package/lib/commonjs/components/WelcomeScreen.js +1 -1
  43. package/lib/commonjs/components/icons/Basicproficon.js +1 -1
  44. package/lib/commonjs/components/icons/Basicprofile.js +1 -1
  45. package/lib/commonjs/components/icons/Checkbox.js +1 -1
  46. package/lib/commonjs/components/icons/Checkmark.js +1 -1
  47. package/lib/commonjs/components/icons/Contentanalysis.js +1 -1
  48. package/lib/commonjs/components/icons/Contenticon.js +1 -1
  49. package/lib/commonjs/components/icons/EnochE.js +1 -1
  50. package/lib/commonjs/components/icons/Personalityicon.js +1 -1
  51. package/lib/commonjs/components/icons/Personalityprofile.js +1 -1
  52. package/lib/commonjs/components/icons/Personalitytraits.js +1 -1
  53. package/lib/commonjs/components/icons/Userpreferences.js +1 -1
  54. package/lib/commonjs/components/icons/index.js +1 -1
  55. package/lib/commonjs/components/onboarding/OAuthWebView.js +1 -1
  56. package/lib/commonjs/components/onboarding/OnboardingHeader.js +1 -1
  57. package/lib/commonjs/components/onboarding/PinInput.js +1 -1
  58. package/lib/commonjs/components/onboarding/PlatformConnector.js +1 -1
  59. package/lib/commonjs/config/PLATFORM_APIS.md +559 -0
  60. package/lib/commonjs/config/api.js +1 -1
  61. package/lib/commonjs/config/telegramConfig.js +8 -0
  62. package/lib/commonjs/config/webchangelog/md +607 -0
  63. package/lib/commonjs/constants/index.js +1 -1
  64. package/lib/commonjs/context/AuthContext.js +1 -1
  65. package/lib/commonjs/hooks/useConnectedAccounts.js +1 -1
  66. package/lib/commonjs/hooks/useConnections.js +1 -1
  67. package/lib/commonjs/hooks/useCredentials.js +1 -1
  68. package/lib/commonjs/hooks/useUserConnections.js +1 -1
  69. package/lib/commonjs/index.js +1 -1
  70. package/lib/commonjs/services/SDK_API_KEY_VALIDATION.md +421 -421
  71. package/lib/commonjs/services/apiClient.js +1 -1
  72. package/lib/commonjs/services/apiKeyService.js +99 -99
  73. package/lib/commonjs/services/authService.js +72 -72
  74. package/lib/commonjs/services/biometricPinService.js +1 -1
  75. package/lib/commonjs/services/chatGPTConversationExtractor.js +1 -1
  76. package/lib/commonjs/services/chatGPTConversationService.js +1 -1
  77. package/lib/commonjs/services/claudeConversationExtractor.js +1 -1
  78. package/lib/commonjs/services/claudeConversationService.js +1 -1
  79. package/lib/commonjs/services/connectedAccountsService.js +1 -1
  80. package/lib/commonjs/services/googleAuthService.js +1 -1
  81. package/lib/commonjs/services/hingeDataExtractor.js +1 -1
  82. package/lib/commonjs/services/hingeDataService.js +1 -1
  83. package/lib/commonjs/services/imageCompressionService.js +1 -1
  84. package/lib/commonjs/services/instagramDataExtractor.js +1 -1
  85. package/lib/commonjs/services/instagramDataService.js +1 -1
  86. package/lib/commonjs/services/jwtStorageService.js +1 -1
  87. package/lib/commonjs/services/linkedinDOMExtractor.js +1 -1
  88. package/lib/commonjs/services/linkedinProfileService.js +1 -1
  89. package/lib/commonjs/services/linkedinScrapingService.js +1 -1
  90. package/lib/commonjs/services/llmDataStorage.js +1 -1
  91. package/lib/commonjs/services/mobileTrainingService.js +1 -1
  92. package/lib/commonjs/services/oauthService.js +20 -20
  93. package/lib/commonjs/services/pinEncryptionService.js +1 -1
  94. package/lib/commonjs/services/pinStorageUtils.js +1 -1
  95. package/lib/commonjs/services/platformAuthService.js +1 -1
  96. package/lib/commonjs/services/sephoraDataExtractor.js +1 -1
  97. package/lib/commonjs/services/sephoraDataService.js +1 -1
  98. package/lib/commonjs/services/storageService.js +1 -1
  99. package/lib/commonjs/services/telegramDataExtractor.js +1 -1
  100. package/lib/commonjs/services/telegramDataService.js +1 -1
  101. package/lib/commonjs/services/trainingApiHelpers.js +1 -1
  102. package/lib/commonjs/services/userConnectionsService.js +1 -1
  103. package/lib/commonjs/services/youtubeMigrationService.js +1 -1
  104. package/lib/commonjs/theme/index.js +1 -1
  105. package/lib/commonjs/types/index.js +1 -1
  106. package/lib/commonjs/types.js +1 -1
  107. package/lib/commonjs/utils/Portal.js +1 -1
  108. package/lib/commonjs/utils/api.js +1 -1
  109. package/lib/commonjs/utils/assetRegistry.js +1 -1
  110. package/lib/commonjs/utils/auth.js +1 -1
  111. package/lib/commonjs/utils/connectorTests.js +1 -1
  112. package/lib/commonjs/utils/crypto.js +1 -1
  113. package/lib/commonjs/utils/debugHelper.js +1 -1
  114. package/lib/commonjs/utils/encryption.js +1 -1
  115. package/lib/commonjs/utils/eventUtils.js +1 -1
  116. package/lib/commonjs/utils/haptics.js +1 -1
  117. package/lib/commonjs/utils/imagePreloader.js +1 -1
  118. package/lib/commonjs/utils/networkDiagnostics.js +1 -1
  119. package/lib/commonjs/utils/onairosApi.js +1 -1
  120. package/lib/commonjs/utils/programmaticFlow.js +1 -1
  121. package/lib/commonjs/utils/retryHelper.js +1 -1
  122. package/lib/commonjs/utils/secureStorage.js +1 -1
  123. package/lib/commonjs/utils/webviewScripts/chatgpt.js +1 -1
  124. package/lib/commonjs/utils/webviewScripts/claude.js +1 -1
  125. package/lib/commonjs/utils/webviewScripts/hinge.js +1 -1
  126. package/lib/commonjs/utils/webviewScripts/index.js +1 -1
  127. package/lib/commonjs/utils/webviewScripts/instagram.js +1 -1
  128. package/lib/commonjs/utils/webviewScripts/linkedin.js +1 -1
  129. package/lib/commonjs/utils/webviewScripts/sephora.js +1 -1
  130. package/lib/commonjs/utils/webviewScripts/telegram.js +1 -1
  131. package/lib/module/api/index.js +1 -1
  132. package/lib/module/assets/images/Checkbox.svg +3 -3
  133. package/lib/module/assets/images/EnochE.svg +19 -19
  134. package/lib/module/assets/images/Personalityprofile.svg +3 -3
  135. package/lib/module/assets/images/Personalitytraits.svg +3 -3
  136. package/lib/module/assets/images/Userpreferences.svg +3 -3
  137. package/lib/module/assets/images/arrow.svg +20 -20
  138. package/lib/module/assets/images/basicproficon.svg +43 -43
  139. package/lib/module/assets/images/basicprofile.svg +3 -3
  140. package/lib/module/assets/images/checkmark.svg +4 -4
  141. package/lib/module/assets/images/contentanalysis.svg +3 -3
  142. package/lib/module/assets/images/contenticon.svg +23 -23
  143. package/lib/module/assets/images/personalityicon.svg +18 -18
  144. package/lib/module/assets/images/x-close.svg +3 -3
  145. package/lib/module/components/BodyText.js +1 -1
  146. package/lib/module/components/BrandMark.js +1 -1
  147. package/lib/module/components/CodeInput.js +1 -1
  148. package/lib/module/components/EmailInput.js +1 -1
  149. package/lib/module/components/GoogleButton.js +1 -1
  150. package/lib/module/components/HeadingGroup.js +1 -1
  151. package/lib/module/components/LLMDataInputModal.js +1 -1
  152. package/lib/module/components/ModalHeader.js +1 -1
  153. package/lib/module/components/ModalSheet.js +1 -1
  154. package/lib/module/components/Onairos.js +1 -1
  155. package/lib/module/components/OnairosButton.js +1 -1
  156. package/lib/module/components/OnairosSignInButton.js +1 -1
  157. package/lib/module/components/Overlay.js +1 -1
  158. package/lib/module/components/PersonaImage.js +1 -1
  159. package/lib/module/components/PersonaLoadingScreen.js +1 -1
  160. package/lib/module/components/PersonalizationConsentScreen.js +1 -1
  161. package/lib/module/components/PinCreationScreen.js +1 -1
  162. package/lib/module/components/PinInput.js +1 -1
  163. package/lib/module/components/PlatformConnectorsStep.js +1 -1
  164. package/lib/module/components/PlatformList.js +1 -1
  165. package/lib/module/components/PlatformToggle.js +1 -1
  166. package/lib/module/components/PrimaryButton.js +1 -1
  167. package/lib/module/components/SignInMatchAnimation.js +1 -1
  168. package/lib/module/components/SignInStep.js +1 -1
  169. package/lib/module/components/UniversalOnboarding.js +1 -1
  170. package/lib/module/components/VerificationStep.js +1 -1
  171. package/lib/module/components/WelcomeScreen.js +1 -1
  172. package/lib/module/components/icons/Basicproficon.js +1 -1
  173. package/lib/module/components/icons/Basicprofile.js +1 -1
  174. package/lib/module/components/icons/Checkbox.js +1 -1
  175. package/lib/module/components/icons/Checkmark.js +1 -1
  176. package/lib/module/components/icons/Contentanalysis.js +1 -1
  177. package/lib/module/components/icons/Contenticon.js +1 -1
  178. package/lib/module/components/icons/EnochE.js +1 -1
  179. package/lib/module/components/icons/Personalityicon.js +1 -1
  180. package/lib/module/components/icons/Personalityprofile.js +1 -1
  181. package/lib/module/components/icons/Personalitytraits.js +1 -1
  182. package/lib/module/components/icons/Userpreferences.js +1 -1
  183. package/lib/module/components/onboarding/OAuthWebView.js +1 -1
  184. package/lib/module/components/onboarding/OnboardingHeader.js +1 -1
  185. package/lib/module/components/onboarding/PinInput.js +1 -1
  186. package/lib/module/components/onboarding/PlatformConnector.js +1 -1
  187. package/lib/module/config/PLATFORM_APIS.md +559 -0
  188. package/lib/module/config/api.js +1 -1
  189. package/lib/module/config/telegramConfig.js +8 -0
  190. package/lib/module/config/webchangelog/md +607 -0
  191. package/lib/module/constants/index.js +1 -1
  192. package/lib/module/context/AuthContext.js +1 -1
  193. package/lib/module/hooks/useConnectedAccounts.js +1 -1
  194. package/lib/module/hooks/useConnections.js +1 -1
  195. package/lib/module/hooks/useCredentials.js +1 -1
  196. package/lib/module/hooks/useUserConnections.js +1 -1
  197. package/lib/module/index.js +1 -1
  198. package/lib/module/services/SDK_API_KEY_VALIDATION.md +421 -421
  199. package/lib/module/services/apiClient.js +1 -1
  200. package/lib/module/services/apiKeyService.js +99 -99
  201. package/lib/module/services/authService.js +72 -72
  202. package/lib/module/services/biometricPinService.js +1 -1
  203. package/lib/module/services/chatGPTConversationExtractor.js +1 -1
  204. package/lib/module/services/chatGPTConversationService.js +1 -1
  205. package/lib/module/services/claudeConversationExtractor.js +1 -1
  206. package/lib/module/services/claudeConversationService.js +1 -1
  207. package/lib/module/services/connectedAccountsService.js +1 -1
  208. package/lib/module/services/googleAuthService.js +1 -1
  209. package/lib/module/services/hingeDataExtractor.js +1 -1
  210. package/lib/module/services/hingeDataService.js +1 -1
  211. package/lib/module/services/imageCompressionService.js +1 -1
  212. package/lib/module/services/instagramDataExtractor.js +1 -1
  213. package/lib/module/services/instagramDataService.js +1 -1
  214. package/lib/module/services/jwtStorageService.js +1 -1
  215. package/lib/module/services/linkedinDOMExtractor.js +1 -1
  216. package/lib/module/services/linkedinProfileService.js +1 -1
  217. package/lib/module/services/linkedinScrapingService.js +1 -1
  218. package/lib/module/services/llmDataStorage.js +1 -1
  219. package/lib/module/services/mobileTrainingService.js +1 -1
  220. package/lib/module/services/oauthService.js +20 -20
  221. package/lib/module/services/pinEncryptionService.js +1 -1
  222. package/lib/module/services/pinStorageUtils.js +1 -1
  223. package/lib/module/services/platformAuthService.js +1 -1
  224. package/lib/module/services/sephoraDataExtractor.js +1 -1
  225. package/lib/module/services/sephoraDataService.js +1 -1
  226. package/lib/module/services/storageService.js +1 -1
  227. package/lib/module/services/telegramDataExtractor.js +1 -1
  228. package/lib/module/services/telegramDataService.js +1 -1
  229. package/lib/module/services/trainingApiHelpers.js +1 -1
  230. package/lib/module/services/userConnectionsService.js +1 -1
  231. package/lib/module/services/youtubeMigrationService.js +1 -1
  232. package/lib/module/theme/index.js +1 -1
  233. package/lib/module/types.js +1 -1
  234. package/lib/module/utils/Portal.js +1 -1
  235. package/lib/module/utils/api.js +1 -1
  236. package/lib/module/utils/assetRegistry.js +1 -1
  237. package/lib/module/utils/auth.js +1 -1
  238. package/lib/module/utils/connectorTests.js +1 -1
  239. package/lib/module/utils/crypto.js +1 -1
  240. package/lib/module/utils/debugHelper.js +1 -1
  241. package/lib/module/utils/encryption.js +1 -1
  242. package/lib/module/utils/eventUtils.js +1 -1
  243. package/lib/module/utils/haptics.js +1 -1
  244. package/lib/module/utils/networkDiagnostics.js +1 -1
  245. package/lib/module/utils/onairosApi.js +1 -1
  246. package/lib/module/utils/programmaticFlow.js +1 -1
  247. package/lib/module/utils/retryHelper.js +1 -1
  248. package/lib/module/utils/secureStorage.js +1 -1
  249. package/lib/module/utils/webviewScripts/chatgpt.js +1 -1
  250. package/lib/module/utils/webviewScripts/claude.js +1 -1
  251. package/lib/module/utils/webviewScripts/hinge.js +1 -1
  252. package/lib/module/utils/webviewScripts/index.js +1 -1
  253. package/lib/module/utils/webviewScripts/instagram.js +1 -1
  254. package/lib/module/utils/webviewScripts/linkedin.js +1 -1
  255. package/lib/module/utils/webviewScripts/sephora.js +1 -1
  256. package/lib/module/utils/webviewScripts/telegram.js +1 -1
  257. package/package.json +172 -172
@@ -1 +1 @@
1
- import{getJWTForRoute,TokenType,getTokenTypeForRoute,clearJWT,getAllTokens,replaceJWTAfterVerification}from'./jwtStorageService';import{API_CONFIG}from'../config/api';let currentRequestId=0x0;const activeRequests=new Map();class ApiClient{constructor(_0xeeed3a=API_CONFIG[_0x54e6(0x0)],_0x3a2fa7={}){this[_0x54e6(0x1)]=_0xeeed3a,this[_0x54e6(0x2)]=_0x3a2fa7;}async[_0x54e6(0x3)](_0x47f831,_0x1900d0={}){const _0x3b9b84={'uWqGx':_0x54e6(0x4),'ssAOm':function(_0x8588bf,_0x6c6ec3){return _0x8588bf(_0x6c6ec3);},'YPNkr':function(_0x5ee32f,_0x2b8411){return _0x5ee32f!==_0x2b8411;},'FAVdM':'OnairosSDK/1.0.0','kiFYh':function(_0x54295f,_0x20cb90,_0x22e2e6){return _0x54295f(_0x20cb90,_0x22e2e6);},'GsJGq':function(_0x167dd2,_0x328a31){return _0x167dd2===_0x328a31;},'kSWOu':_0x54e6(0x5),'mqSfH':function(_0x2ba85b,_0x14cdb6){return _0x2ba85b!==_0x14cdb6;},'HHBSV':'RQoFr','ZwaLP':function(_0x2289f2,_0x51c33a){return _0x2289f2!==_0x51c33a;},'YCZhA':_0x54e6(0x6),'oYHXj':_0x54e6(0x7),'uXevI':function(_0x4bde19,_0x3dfbd6){return _0x4bde19 instanceof _0x3dfbd6;}},_0x2a2600=++currentRequestId,_0x73ba96=new AbortController();activeRequests[_0x54e6(0x8)](_0x2a2600,_0x73ba96);try{if(_0x3b9b84[_0x54e6(0x9)]!==_0x3b9b84[_0x54e6(0x9)])return this[_0x54e6(0x3)](_0x50b075,{..._0x4b784f,'method':'DELETE'});else{console[_0x54e6(0xa)](_0x54e6(0xb)+_0x2a2600+_0x54e6(0xc)+_0x47f831);const _0x202afe=_0x3b9b84[_0x54e6(0xd)](getTokenTypeForRoute,_0x47f831);console[_0x54e6(0xa)](_0x54e6(0xe)+_0x47f831+_0x54e6(0xf)+_0x202afe+_0x54e6(0x10));const _0x399a80=await this[_0x54e6(0x11)](_0x47f831,_0x3b9b84[_0x54e6(0x12)](_0x1900d0[_0x54e6(0x13)],![])),_0x4c1f44={'method':_0x1900d0['method']||'GET','headers':{'Content-Type':'application/json','User-Agent':_0x3b9b84['FAVdM'],..._0x399a80,..._0x1900d0['headers']},'body':_0x1900d0[_0x54e6(0x14)]?JSON['stringify'](_0x1900d0[_0x54e6(0x14)]):undefined,'signal':_0x73ba96[_0x54e6(0x15)]};console[_0x54e6(0xa)](_0x54e6(0x16)+_0x2a2600+'\x20using\x20'+_0x202afe+_0x54e6(0x10));const _0xf839f0=await _0x3b9b84[_0x54e6(0x17)](fetch,''+this[_0x54e6(0x1)]+_0x47f831,_0x4c1f44);console[_0x54e6(0xa)](_0x54e6(0x18)+_0x2a2600+_0x54e6(0x19),_0xf839f0[_0x54e6(0x1a)]);if(_0x3b9b84[_0x54e6(0x1b)](_0xf839f0['status'],0x191)){if(_0x3b9b84[_0x54e6(0x1b)](_0x54e6(0x1c),_0x3b9b84['kSWOu']))_0xe1714f[_0x54e6(0x1d)](),_0x17e819['delete'](_0x52766e),_0x550e00++;else return await this[_0x54e6(0x1e)](_0x2a2600,_0x47f831,_0x202afe,_0x1900d0);}const _0x4723ca=await _0xf839f0[_0x54e6(0x1f)]();activeRequests[_0x54e6(0x20)](_0x2a2600);if(!_0xf839f0['ok'])return{'success':![],'error':_0x4723ca[_0x54e6(0x21)]||'Request\x20failed\x20with\x20status\x20'+_0xf839f0['status'],'status':_0xf839f0[_0x54e6(0x1a)],'tokenType':_0x202afe};return{'success':!![],'data':_0x4723ca,'status':_0xf839f0[_0x54e6(0x1a)],'tokenType':_0x202afe};}}catch(_0x4df5f5){if(_0x3b9b84[_0x54e6(0x22)](_0x54e6(0x23),_0x3b9b84[_0x54e6(0x24)]))_0x2ee789[_0x54e6(0xa)](_0x54e6(0x25)+_0x14cdcc+':\x20'+_0x82a593[_0x54e6(0x26)](0x0,0x14)+_0x54e6(0x27)+_0x5b4580['length']+')');else{activeRequests[_0x54e6(0x20)](_0x2a2600);if(_0x4df5f5 instanceof Error&&_0x4df5f5[_0x54e6(0x28)]===_0x54e6(0x29))return _0x3b9b84['ZwaLP'](_0x3b9b84[_0x54e6(0x2a)],_0x3b9b84[_0x54e6(0x2a)])?{}:(console[_0x54e6(0xa)](_0x54e6(0x2b)+_0x2a2600+'\x20was\x20cancelled'),{'success':![],'error':_0x3b9b84[_0x54e6(0x2c)],'status':0x0});return console[_0x54e6(0x2d)](_0x54e6(0x2e)+_0x2a2600+_0x54e6(0x2f),_0x4df5f5),{'success':![],'error':_0x3b9b84[_0x54e6(0x30)](_0x4df5f5,Error)?_0x4df5f5[_0x54e6(0x21)]:_0x54e6(0x31),'status':0x0};}}}async[_0x54e6(0x11)](_0x435988,_0x2eb523){const _0x23b5f2={'qDfKl':function(_0x54e686,_0x273f10){return _0x54e686 instanceof _0x273f10;},'xMvKR':function(_0x3a9e98,_0x1d0857){return _0x3a9e98===_0x1d0857;},'pmATK':_0x54e6(0x29),'LvJui':_0x54e6(0x7),'drxle':'Unknown\x20error','OqhOW':function(_0x528042,_0x289f8a){return _0x528042(_0x289f8a);},'wkDKX':_0x54e6(0x32),'RNHLJ':function(_0x19ac36,_0x703a7f){return _0x19ac36(_0x703a7f);}};if(!_0x2eb523)return{};const _0x28d136=await _0x23b5f2[_0x54e6(0x33)](getJWTForRoute,_0x435988);if(!_0x28d136){if(_0x54e6(0x34)===_0x23b5f2['wkDKX']){_0x3d537a['delete'](_0x2afa99);if(_0x23b5f2[_0x54e6(0x35)](_0x577eff,_0x4698b5)&&_0x23b5f2[_0x54e6(0x36)](_0x5f59fc['name'],_0x23b5f2['pmATK']))return _0x243433[_0x54e6(0xa)](_0x54e6(0x2b)+_0x256373+_0x54e6(0x37)),{'success':![],'error':_0x23b5f2[_0x54e6(0x38)],'status':0x0};return _0x2deb0d['error'](_0x54e6(0x2e)+_0x216fb3+_0x54e6(0x2f),_0x47ee37),{'success':![],'error':_0x23b5f2[_0x54e6(0x35)](_0x29a84b,_0x31ec5e)?_0x274a7f['message']:_0x23b5f2[_0x54e6(0x39)],'status':0x0};}else{const _0x51a90b=_0x23b5f2[_0x54e6(0x3a)](getTokenTypeForRoute,_0x435988);throw new Error(_0x54e6(0x3b)+_0x51a90b+_0x54e6(0x3c)+_0x435988+_0x54e6(0x3d));}}return{'Authorization':_0x28d136};}async[_0x54e6(0x1e)](_0x1295c8,_0xbcaf07,_0x7148ca,_0x5d0f09){const _0x2454c7={'vfUju':function(_0x43fe10,_0x52036e){return _0x43fe10(_0x52036e);}};return console[_0x54e6(0x2d)]('🚫\x20[API\x20Client]\x20Request\x20'+_0x1295c8+_0x54e6(0x3e)+_0x7148ca+_0x54e6(0x3f)+_0xbcaf07),console['log'](_0x54e6(0x40)+_0x7148ca+_0x54e6(0x41)),await _0x2454c7[_0x54e6(0x42)](clearJWT,_0x7148ca),this[_0x54e6(0x43)](_0x7148ca,_0x1295c8),await this[_0x54e6(0x44)](_0x7148ca,_0xbcaf07),console[_0x54e6(0xa)](_0x54e6(0x45)+_0x7148ca+'\x20token\x20cleared,\x20user\x20needs\x20to\x20re-authenticate'),{'success':![],'error':_0x7148ca+'\x20authentication\x20expired\x20for\x20'+_0xbcaf07+_0x54e6(0x46),'status':0x191,'tokenType':_0x7148ca};}async[_0x54e6(0x44)](_0x2086a6,_0x54889c){const _0x5b1ad1={'ZZbkd':function(_0x2e9150,_0x4db6e5){return _0x2e9150(_0x4db6e5);},'UiNML':function(_0x3cbc9b,_0x25edad){return _0x3cbc9b===_0x25edad;},'UJTSF':_0x54e6(0x47),'CFdHt':function(_0x490ad4,_0x1436e2){return _0x490ad4===_0x1436e2;},'sBElv':'lSlbr','bEcCP':_0x54e6(0x48),'gBRRB':function(_0x4d2afe,_0x53f3be){return _0x4d2afe===_0x53f3be;},'AIHrQ':_0x54e6(0x49),'ESshi':_0x54e6(0x4a),'TwLsA':'⚠️\x20[API\x20Client]\x20No\x20Onairos\x20re-auth\x20trigger\x20configured','bNlel':'TaUSX','YJBdA':'⚠️\x20[API\x20Client]\x20No\x20auth\x20token\x20refresh\x20trigger\x20configured'};console['log'](_0x54e6(0x4b)+_0x2086a6+_0x54e6(0x4c)+_0x54889c+')');try{if(_0x5b1ad1[_0x54e6(0x4d)](_0x5b1ad1[_0x54e6(0x4e)],_0x54e6(0x4f)))return{'success':![],'error':_0x20b08d[_0x54e6(0x21)]||_0x54e6(0x50)+_0x5c1cf7[_0x54e6(0x1a)],'status':_0x1aacfa[_0x54e6(0x1a)],'tokenType':_0x1b9d5f};else switch(_0x2086a6){case TokenType[_0x54e6(0x51)]:this[_0x54e6(0x2)]['triggerEnochReAuth']?_0x5b1ad1[_0x54e6(0x52)](_0x54e6(0x53),_0x5b1ad1['sBElv'])?_0x7af2e8['warn'](_0x54e6(0x54)):(console[_0x54e6(0xa)](_0x5b1ad1[_0x54e6(0x55)]),await this['authTriggers'][_0x54e6(0x56)]()):_0x5b1ad1[_0x54e6(0x57)](_0x5b1ad1[_0x54e6(0x58)],_0x5b1ad1[_0x54e6(0x58)])?console[_0x54e6(0x59)]('⚠️\x20[API\x20Client]\x20No\x20Enoch\x20re-auth\x20trigger\x20configured'):_0x400f63!==_0xfa18fe&&(_0x4cc0f1[_0x54e6(0x1d)](),_0x12a55f[_0x54e6(0x20)](_0x505223),_0x495b50++);break;case TokenType[_0x54e6(0x5a)]:this[_0x54e6(0x2)][_0x54e6(0x5b)]?(console[_0x54e6(0xa)](_0x5b1ad1[_0x54e6(0x5c)]),await this[_0x54e6(0x2)][_0x54e6(0x5b)]()):console[_0x54e6(0x59)](_0x5b1ad1[_0x54e6(0x5d)]);break;case TokenType['AUTH']:if(this[_0x54e6(0x2)][_0x54e6(0x5e)])console[_0x54e6(0xa)](_0x54e6(0x5f)),await this['authTriggers'][_0x54e6(0x5e)]();else{if(_0x5b1ad1[_0x54e6(0x4d)](_0x54e6(0x60),_0x5b1ad1[_0x54e6(0x61)])){const _0x1b7bfb=_0x5b1ad1[_0x54e6(0x62)](_0x14948,_0x304469);throw new _0x4b34b1('No\x20'+_0x1b7bfb+_0x54e6(0x3c)+_0x90f962+_0x54e6(0x3d));}else console[_0x54e6(0x59)](_0x5b1ad1['YJBdA']);}break;}}catch(_0x67897d){console[_0x54e6(0x2d)](_0x54e6(0x63)+_0x2086a6+':',_0x67897d);}}[_0x54e6(0x43)](_0x2da3fb,_0xa25f75){const _0x149e08={'SPtMY':function(_0x2a2622,_0xe92a5e){return _0x2a2622!==_0xe92a5e;},'XAiCp':function(_0x36a902,_0x530f75){return _0x36a902>_0x530f75;},'PgMjn':_0x54e6(0x64)};let _0x30bc5e=0x0;for(const [_0x182dad,_0x552085]of activeRequests['entries']()){_0x149e08[_0x54e6(0x65)](_0x182dad,_0xa25f75)&&(_0x552085[_0x54e6(0x1d)](),activeRequests[_0x54e6(0x20)](_0x182dad),_0x30bc5e++);}if(_0x149e08[_0x54e6(0x66)](_0x30bc5e,0x0)){if(_0x149e08[_0x54e6(0x67)]===_0x149e08['PgMjn'])console[_0x54e6(0xa)](_0x54e6(0x68)+_0x30bc5e+_0x54e6(0x69)+_0x2da3fb+_0x54e6(0x6a));else return this[_0x54e6(0x3)](_0xd0d085,{..._0x14ae63,'method':'PUT','body':_0x1f93ec});}}async['replaceTokenForType'](_0x1fc5dd,_0x2ea260){const _0x10e04d={'WePIh':function(_0x259732,_0x4deb3c,_0x5c09d2){return _0x259732(_0x4deb3c,_0x5c09d2);}};console[_0x54e6(0xa)]('🔄\x20[API\x20Client]\x20Replacing\x20'+_0x1fc5dd+_0x54e6(0x10)),this[_0x54e6(0x43)](_0x1fc5dd);const _0x4dd87a=await _0x10e04d[_0x54e6(0x6b)](replaceJWTAfterVerification,_0x1fc5dd,_0x2ea260);return _0x4dd87a&&console['log'](_0x54e6(0x6c)+_0x1fc5dd+'\x20token\x20replaced\x20and\x20related\x20requests\x20cancelled'),_0x4dd87a;}async[_0x54e6(0x6d)](){const _0x2b4eae={'wVOSs':function(_0x103c00,_0x2679d4){return _0x103c00!==_0x2679d4;}};console[_0x54e6(0xa)](_0x54e6(0x6e));const _0x418b1b=await getAllTokens();for(const [_0x1aa96a,_0x244035]of Object[_0x54e6(0x6f)](_0x418b1b)){if(_0x2b4eae[_0x54e6(0x70)](_0x54e6(0x71),_0x54e6(0x71)))return this['request'](_0x1f5e1f,{..._0x5d49d0,'method':'GET'});else _0x244035?console[_0x54e6(0xa)](_0x54e6(0x25)+_0x1aa96a+':\x20'+_0x244035[_0x54e6(0x26)](0x0,0x14)+_0x54e6(0x27)+_0x244035[_0x54e6(0x72)]+')'):console[_0x54e6(0xa)](_0x54e6(0x73)+_0x1aa96a+_0x54e6(0x74));}return _0x418b1b;}['setAuthTriggers'](_0x16cbbe){const _0x1e1980={'vNoaE':'🔧\x20[API\x20Client]\x20Authentication\x20triggers\x20updated'};this[_0x54e6(0x2)]={...this[_0x54e6(0x2)],..._0x16cbbe},console[_0x54e6(0xa)](_0x1e1980[_0x54e6(0x75)]);}async[_0x54e6(0x76)](_0x5ee204,_0x267c10={}){return this['request'](_0x5ee204,{..._0x267c10,'method':'GET'});}async[_0x54e6(0x77)](_0x115a34,_0x282092,_0x568dcb={}){return this['request'](_0x115a34,{..._0x568dcb,'method':'POST','body':_0x282092});}async['put'](_0x26307b,_0x4f5085,_0x3277ef={}){return this[_0x54e6(0x3)](_0x26307b,{..._0x3277ef,'method':'PUT','body':_0x4f5085});}async['delete'](_0x10b407,_0x4f454b={}){return this[_0x54e6(0x3)](_0x10b407,{..._0x4f454b,'method':'DELETE'});}}export const apiClient=new ApiClient();export{ApiClient};export const authenticatedRequest=apiClient[_0x54e6(0x3)]['bind'](apiClient);export const apiGet=apiClient[_0x54e6(0x76)][_0x54e6(0x78)](apiClient);function _0x54e6(_0x52d90a,_0x54e607){_0x52d90a=_0x52d90a-0x0;const _0x5c33ef=_0x52d9();let _0x326f32=_0x5c33ef[_0x52d90a];return _0x326f32;}export const apiPost=apiClient[_0x54e6(0x77)]['bind'](apiClient);function _0x52d9(){const _0x59a23f=['BASE_URL','baseUrl','authTriggers','request','LkRsS','EVzsf','ivuaT','Request\x20cancelled','set','uWqGx','log','🔗\x20[API\x20Client]\x20Starting\x20request\x20','\x20to:\x20','ssAOm','🎯\x20[API\x20Client]\x20Route\x20','\x20requires\x20','\x20token','getRequestHeaders','YPNkr','requiresAuth','body','signal','🔐\x20[API\x20Client]\x20Request\x20','kiFYh','📡\x20[API\x20Client]\x20Response\x20','\x20status:','status','GsJGq','rvqUu','abort','handle401Error','json','delete','message','mqSfH','RQoFr','HHBSV','🔐\x20','substring','...\x20(length:\x20','name','AbortError','YCZhA','🚫\x20[API\x20Client]\x20Request\x20','oYHXj','error','❌\x20[API\x20Client]\x20Request\x20','\x20failed:','uXevI','Unknown\x20error','dofyA','OqhOW','YFVTl','qDfKl','xMvKR','\x20was\x20cancelled','LvJui','drxle','RNHLJ','No\x20','\x20token\x20available\x20for\x20route\x20','.\x20Please\x20authenticate\x20first.','\x20received\x20401\x20for\x20','\x20token\x20on\x20route:\x20','🔄\x20[API\x20Client]\x20Clearing\x20','\x20token\x20due\x20to\x20401\x20error','vfUju','cancelRequestsForTokenType','triggerReAuthForTokenType','🔑\x20[API\x20Client]\x20','.\x20Please\x20re-authenticate.','PRdqg','📧\x20[API\x20Client]\x20Triggering\x20Enoch\x20email\x20re-verification','elFPF','🔑\x20[API\x20Client]\x20Triggering\x20Onairos\x20re-authentication','🔄\x20[API\x20Client]\x20Triggering\x20re-auth\x20for\x20','\x20token\x20(endpoint:\x20','UiNML','UJTSF','mlnrg','Request\x20failed\x20with\x20status\x20','ENOCH','CFdHt','dzVXC','⚠️\x20[API\x20Client]\x20No\x20Enoch\x20re-auth\x20trigger\x20configured','bEcCP','triggerEnochReAuth','gBRRB','AIHrQ','warn','ONAIROS','triggerOnairosReAuth','ESshi','TwLsA','triggerAuthTokenRefresh','🔄\x20[API\x20Client]\x20Triggering\x20auth\x20token\x20refresh','ATAvv','bNlel','ZZbkd','❌\x20[API\x20Client]\x20Failed\x20to\x20trigger\x20re-auth\x20for\x20','MwWAm','SPtMY','XAiCp','PgMjn','🚫\x20[API\x20Client]\x20Cancelled\x20','\x20requests\x20due\x20to\x20','\x20token\x20failure','WePIh','✅\x20[API\x20Client]\x20','debugTokens','🔍\x20[API\x20Client]\x20Debug:\x20Current\x20token\x20status','entries','wVOSs','GavoB','length','📭\x20',':\x20null','vNoaE','get','post','bind'];_0x52d9=function(){return _0x59a23f;};return _0x52d9();}export const apiPut=apiClient['put']['bind'](apiClient);export const apiDelete=apiClient[_0x54e6(0x20)][_0x54e6(0x78)](apiClient);export default apiClient;
1
+ function _0xc426(_0x585fa8,_0xc426c9){_0x585fa8=_0x585fa8-0x0;const _0x56f6cc=_0x585f();let _0x50cc37=_0x56f6cc[_0x585fa8];return _0x50cc37;}import{getJWTForRoute,TokenType,getTokenTypeForRoute,clearJWT,getAllTokens,replaceJWTAfterVerification}from'./jwtStorageService';function _0x585f(){const _0x584063=['BASE_URL','baseUrl','authTriggers','request','Request\x20cancelled','Unknown\x20error','set','log','🔗\x20[API\x20Client]\x20Starting\x20request\x20','\x20to:\x20','Ggewl','🎯\x20[API\x20Client]\x20Route\x20','\x20token','getRequestHeaders','xINYd','requiresAuth','OnairosSDK/1.0.0','headers','body','signal','🔐\x20[API\x20Client]\x20Request\x20','\x20using\x20','\x20status:','status','FJpje','delete','JEgKT','OjaNP','dGFmc','✅\x20[API\x20Client]\x20','\x20token\x20replaced\x20and\x20related\x20requests\x20cancelled','message','qruls','name','AbortError','\x20was\x20cancelled','dLoWg','error','❌\x20[API\x20Client]\x20Request\x20','eexYw','No\x20','.\x20Please\x20authenticate\x20first.','handle401Error','3|5|2|0|4|1|6','HePEg','split','cancelRequestsForTokenType','🚫\x20[API\x20Client]\x20Request\x20','\x20received\x20401\x20for\x20','\x20token\x20on\x20route:\x20','🔄\x20[API\x20Client]\x20Clearing\x20','\x20token\x20due\x20to\x20401\x20error','\x20authentication\x20expired\x20for\x20','.\x20Please\x20re-authenticate.','triggerReAuthForTokenType','📧\x20[API\x20Client]\x20Triggering\x20Enoch\x20email\x20re-verification','PoYIC','🔄\x20[API\x20Client]\x20Triggering\x20auth\x20token\x20refresh','vueKw','yjdMi','🔄\x20[API\x20Client]\x20Triggering\x20re-auth\x20for\x20','triggerEnochReAuth','NORYr','warn','aklkJ','ONAIROS','MUIqo','⚠️\x20[API\x20Client]\x20No\x20Onairos\x20re-auth\x20trigger\x20configured','substring','length','AUTH','triggerAuthTokenRefresh','zsXCD','ENBBy','FvJYS','hYAmL','wPEUs','TWIZg','nnkir','MKSUL','⚠️\x20[API\x20Client]\x20No\x20auth\x20token\x20refresh\x20trigger\x20configured','yTLPy','YYNsI','❌\x20[API\x20Client]\x20Failed\x20to\x20trigger\x20re-auth\x20for\x20','🔧\x20[API\x20Client]\x20Authentication\x20triggers\x20updated','oiiNp','entries','dFXhh','pITDl','Request\x20failed\x20with\x20status\x20','ygMzo','frxct','🔄\x20[API\x20Client]\x20Replacing\x20','debugTokens','🔍\x20[API\x20Client]\x20Debug:\x20Current\x20token\x20status','ckNjX','ivUtF','rxxPB','uFnYY','LwsOd','VJlrH','🔐\x20','...\x20(length:\x20','📭\x20',':\x20null','nUxxv','ySMli','setAuthTriggers','VbCis','get','post','bind','put'];_0x585f=function(){return _0x584063;};return _0x585f();}import{API_CONFIG}from'../config/api';let currentRequestId=0x0;const activeRequests=new Map();class ApiClient{constructor(_0x57d577=API_CONFIG[_0xc426(0x0)],_0x11192e={}){this[_0xc426(0x1)]=_0x57d577,this[_0xc426(0x2)]=_0x11192e;}async[_0xc426(0x3)](_0x8d25fe,_0x8e16b1={}){const _0x6beb30={'Ggewl':function(_0x2be1e9,_0x4f83ad){return _0x2be1e9(_0x4f83ad);},'xINYd':function(_0x5ddd1f,_0x41421d){return _0x5ddd1f!==_0x41421d;},'HzqOt':function(_0x2ac7a5,_0x1698ec,_0x292e00){return _0x2ac7a5(_0x1698ec,_0x292e00);},'FJpje':function(_0x3eb414,_0x3e49d7){return _0x3eb414===_0x3e49d7;},'JEgKT':function(_0xafba79,_0x3266b7){return _0xafba79===_0x3266b7;},'qruls':function(_0x379d80,_0x581463){return _0x379d80 instanceof _0x581463;},'dLoWg':_0xc426(0x4),'eexYw':_0xc426(0x5)},_0x48cb94=++currentRequestId,_0x2fdb49=new AbortController();activeRequests[_0xc426(0x6)](_0x48cb94,_0x2fdb49);try{console[_0xc426(0x7)](_0xc426(0x8)+_0x48cb94+_0xc426(0x9)+_0x8d25fe);const _0x5dab15=_0x6beb30[_0xc426(0xa)](getTokenTypeForRoute,_0x8d25fe);console['log'](_0xc426(0xb)+_0x8d25fe+'\x20requires\x20'+_0x5dab15+_0xc426(0xc));const _0x12c957=await this[_0xc426(0xd)](_0x8d25fe,_0x6beb30[_0xc426(0xe)](_0x8e16b1[_0xc426(0xf)],![])),_0x17032c={'method':_0x8e16b1['method']||'GET','headers':{'Content-Type':'application/json','User-Agent':_0xc426(0x10),..._0x12c957,..._0x8e16b1[_0xc426(0x11)]},'body':_0x8e16b1['body']?JSON['stringify'](_0x8e16b1[_0xc426(0x12)]):undefined,'signal':_0x2fdb49[_0xc426(0x13)]};console[_0xc426(0x7)](_0xc426(0x14)+_0x48cb94+_0xc426(0x15)+_0x5dab15+_0xc426(0xc));const _0x1739ed=await _0x6beb30['HzqOt'](fetch,''+this[_0xc426(0x1)]+_0x8d25fe,_0x17032c);console[_0xc426(0x7)]('📡\x20[API\x20Client]\x20Response\x20'+_0x48cb94+_0xc426(0x16),_0x1739ed[_0xc426(0x17)]);if(_0x6beb30[_0xc426(0x18)](_0x1739ed[_0xc426(0x17)],0x191))return await this['handle401Error'](_0x48cb94,_0x8d25fe,_0x5dab15,_0x8e16b1);const _0x33d809=await _0x1739ed['json']();activeRequests[_0xc426(0x19)](_0x48cb94);if(!_0x1739ed['ok']){if(_0x6beb30[_0xc426(0x1a)](_0xc426(0x1b),_0xc426(0x1c)))_0x4b56e5[_0xc426(0x7)](_0xc426(0x1d)+_0x2065a8+_0xc426(0x1e));else return{'success':![],'error':_0x33d809[_0xc426(0x1f)]||'Request\x20failed\x20with\x20status\x20'+_0x1739ed[_0xc426(0x17)],'status':_0x1739ed[_0xc426(0x17)],'tokenType':_0x5dab15};}return{'success':!![],'data':_0x33d809,'status':_0x1739ed[_0xc426(0x17)],'tokenType':_0x5dab15};}catch(_0x315ae3){activeRequests[_0xc426(0x19)](_0x48cb94);if(_0x6beb30[_0xc426(0x20)](_0x315ae3,Error)&&_0x6beb30[_0xc426(0x1a)](_0x315ae3[_0xc426(0x21)],_0xc426(0x22)))return console[_0xc426(0x7)]('🚫\x20[API\x20Client]\x20Request\x20'+_0x48cb94+_0xc426(0x23)),{'success':![],'error':_0x6beb30[_0xc426(0x24)],'status':0x0};return console[_0xc426(0x25)](_0xc426(0x26)+_0x48cb94+'\x20failed:',_0x315ae3),{'success':![],'error':_0x6beb30[_0xc426(0x20)](_0x315ae3,Error)?_0x315ae3[_0xc426(0x1f)]:_0x6beb30[_0xc426(0x27)],'status':0x0};}}async['getRequestHeaders'](_0x4238c5,_0x1ab79f){const _0x12f24d={'bhsXl':function(_0x36858d,_0x136f52){return _0x36858d(_0x136f52);}};if(!_0x1ab79f)return{};const _0x335735=await _0x12f24d['bhsXl'](getJWTForRoute,_0x4238c5);if(!_0x335735){const _0x7e0e3d=getTokenTypeForRoute(_0x4238c5);throw new Error(_0xc426(0x28)+_0x7e0e3d+'\x20token\x20available\x20for\x20route\x20'+_0x4238c5+_0xc426(0x29));}return{'Authorization':_0x335735};}async[_0xc426(0x2a)](_0x5ae0d8,_0x4cf149,_0x5c68dc,_0x208cd8){const _0x1fd099={'HePEg':_0xc426(0x2b)},_0x9d0562=_0x1fd099[_0xc426(0x2c)][_0xc426(0x2d)]('|');let _0x24f625=0x0;while(!![]){switch(_0x9d0562[_0x24f625++]){case'0':this[_0xc426(0x2e)](_0x5c68dc,_0x5ae0d8);continue;case'1':console['log']('🔑\x20[API\x20Client]\x20'+_0x5c68dc+'\x20token\x20cleared,\x20user\x20needs\x20to\x20re-authenticate');continue;case'2':await clearJWT(_0x5c68dc);continue;case'3':console[_0xc426(0x25)](_0xc426(0x2f)+_0x5ae0d8+_0xc426(0x30)+_0x5c68dc+_0xc426(0x31)+_0x4cf149);continue;case'4':await this['triggerReAuthForTokenType'](_0x5c68dc,_0x4cf149);continue;case'5':console[_0xc426(0x7)](_0xc426(0x32)+_0x5c68dc+_0xc426(0x33));continue;case'6':return{'success':![],'error':_0x5c68dc+_0xc426(0x34)+_0x4cf149+_0xc426(0x35),'status':0x191,'tokenType':_0x5c68dc};}break;}}async[_0xc426(0x36)](_0x4b8cb7,_0x4860af){const _0x31a59b={'lSyPm':function(_0x1ada51,_0x58fbad){return _0x1ada51 instanceof _0x58fbad;},'FvJYS':function(_0x526634,_0xa5ae2c){return _0x526634===_0xa5ae2c;},'AyjwU':_0xc426(0x22),'hYAmL':'Request\x20cancelled','wPEUs':function(_0x2069ad,_0x350767){return _0x2069ad instanceof _0x350767;},'xyQvF':_0xc426(0x5),'NORYr':_0xc426(0x37),'aklkJ':'⚠️\x20[API\x20Client]\x20No\x20Enoch\x20re-auth\x20trigger\x20configured','nnkir':function(_0x77d390,_0x109e37){return _0x77d390===_0x109e37;},'MUIqo':_0xc426(0x38),'ENBBy':'TrCbH','TWIZg':_0xc426(0x39),'MKSUL':_0xc426(0x3a),'yTLPy':function(_0x1c77e8,_0x2a3c6a){return _0x1c77e8!==_0x2a3c6a;},'YYNsI':_0xc426(0x3b)};console[_0xc426(0x7)](_0xc426(0x3c)+_0x4b8cb7+'\x20token\x20(endpoint:\x20'+_0x4860af+')');try{switch(_0x4b8cb7){case TokenType['ENOCH']:this[_0xc426(0x2)][_0xc426(0x3d)]?(console[_0xc426(0x7)](_0x31a59b[_0xc426(0x3e)]),await this[_0xc426(0x2)]['triggerEnochReAuth']()):console[_0xc426(0x3f)](_0x31a59b[_0xc426(0x40)]);break;case TokenType[_0xc426(0x41)]:this[_0xc426(0x2)]['triggerOnairosReAuth']?(console['log']('🔑\x20[API\x20Client]\x20Triggering\x20Onairos\x20re-authentication'),await this[_0xc426(0x2)]['triggerOnairosReAuth']()):_0x31a59b['nnkir'](_0x31a59b['MUIqo'],_0x31a59b[_0xc426(0x42)])?console[_0xc426(0x3f)](_0xc426(0x43)):_0x29946d[_0xc426(0x7)]('🔐\x20'+_0x51770c+':\x20'+_0x317ee4[_0xc426(0x44)](0x0,0x14)+'...\x20(length:\x20'+_0x57b2bd[_0xc426(0x45)]+')');break;case TokenType[_0xc426(0x46)]:if(this[_0xc426(0x2)][_0xc426(0x47)]){if(_0x31a59b['nnkir'](_0xc426(0x48),_0x31a59b[_0xc426(0x49)])){_0x2e6462[_0xc426(0x19)](_0x3ba169);if(_0x31a59b['lSyPm'](_0x35356b,_0x35d0b4)&&_0x31a59b[_0xc426(0x4a)](_0x5706e5[_0xc426(0x21)],_0x31a59b['AyjwU']))return _0x14e437['log'](_0xc426(0x2f)+_0x36e47e+_0xc426(0x23)),{'success':![],'error':_0x31a59b[_0xc426(0x4b)],'status':0x0};return _0x1d7f5e[_0xc426(0x25)](_0xc426(0x26)+_0x4e3c13+'\x20failed:',_0x72ed60),{'success':![],'error':_0x31a59b[_0xc426(0x4c)](_0xbc4d4d,_0x366cb0)?_0xfa8ac8[_0xc426(0x1f)]:_0x31a59b['xyQvF'],'status':0x0};}else console[_0xc426(0x7)](_0x31a59b[_0xc426(0x4d)]),await this['authTriggers'][_0xc426(0x47)]();}else{if(_0x31a59b[_0xc426(0x4e)]('vueKw',_0x31a59b[_0xc426(0x4f)]))console[_0xc426(0x3f)](_0xc426(0x50));else return this[_0xc426(0x3)](_0x5be1eb,{..._0x1036aa,'method':'POST','body':_0x161810});}break;}}catch(_0x31c8a9){if(_0x31a59b[_0xc426(0x51)](_0x31a59b[_0xc426(0x52)],_0x31a59b[_0xc426(0x52)]))return _0xa5ca2b['log'](_0xc426(0x2f)+_0x2882ec+_0xc426(0x23)),{'success':![],'error':_0x31a59b[_0xc426(0x4b)],'status':0x0};else console[_0xc426(0x25)](_0xc426(0x53)+_0x4b8cb7+':',_0x31c8a9);}}[_0xc426(0x2e)](_0x52a60b,_0x24b218){const _0x29e6ed={'frxct':_0xc426(0x54),'dFXhh':function(_0x5ac541,_0x3da09e){return _0x5ac541!==_0x3da09e;},'pITDl':'QiwEk','ygMzo':_0xc426(0x55)};let _0xbd8488=0x0;for(const [_0x34990e,_0x3ea1a2]of activeRequests[_0xc426(0x56)]()){if(_0x29e6ed[_0xc426(0x57)]('JHJYc',_0x29e6ed[_0xc426(0x58)]))_0x34990e!==_0x24b218&&(_0x3ea1a2['abort'](),activeRequests[_0xc426(0x19)](_0x34990e),_0xbd8488++);else return{'success':![],'error':_0x5cf42e[_0xc426(0x1f)]||_0xc426(0x59)+_0x3756a0[_0xc426(0x17)],'status':_0x525c82[_0xc426(0x17)],'tokenType':_0x21ddea};}_0xbd8488>0x0&&(_0xc426(0x55)!==_0x29e6ed[_0xc426(0x5a)]?(this[_0xc426(0x2)]={...this[_0xc426(0x2)],..._0x4b4852},_0x74e7c3['log'](_0x29e6ed[_0xc426(0x5b)])):console['log']('🚫\x20[API\x20Client]\x20Cancelled\x20'+_0xbd8488+'\x20requests\x20due\x20to\x20'+_0x52a60b+'\x20token\x20failure'));}async['replaceTokenForType'](_0x2d43a2,_0x4a4b65){console['log'](_0xc426(0x5c)+_0x2d43a2+'\x20token'),this[_0xc426(0x2e)](_0x2d43a2);const _0x3f8495=await replaceJWTAfterVerification(_0x2d43a2,_0x4a4b65);return _0x3f8495&&console[_0xc426(0x7)](_0xc426(0x1d)+_0x2d43a2+'\x20token\x20replaced\x20and\x20related\x20requests\x20cancelled'),_0x3f8495;}async[_0xc426(0x5d)](){const _0x45ef6b={'ySMli':function(_0x328846,_0x10ab37){return _0x328846!==_0x10ab37;},'qKdVF':_0xc426(0x5e),'LwsOd':function(_0x4a078d,_0x2bb4b1){return _0x4a078d===_0x2bb4b1;},'YwvzX':_0xc426(0x5f),'VJlrH':_0xc426(0x60),'nUxxv':_0xc426(0x61),'KiFGY':_0xc426(0x62)};console['log'](_0x45ef6b['qKdVF']);const _0x4a420c=await getAllTokens();for(const [_0x3ddc1e,_0x546527]of Object['entries'](_0x4a420c)){_0x45ef6b[_0xc426(0x63)](_0x45ef6b['YwvzX'],_0x45ef6b[_0xc426(0x64)])?_0x767dd8?_0x1347a1[_0xc426(0x7)](_0xc426(0x65)+_0x4912ec+':\x20'+_0x4f77e0[_0xc426(0x44)](0x0,0x14)+_0xc426(0x66)+_0x4b7820[_0xc426(0x45)]+')'):_0x42d738[_0xc426(0x7)](_0xc426(0x67)+_0x17471b+_0xc426(0x68)):_0x546527?_0x45ef6b[_0xc426(0x69)]!==_0x45ef6b['KiFGY']?console[_0xc426(0x7)](_0xc426(0x65)+_0x3ddc1e+':\x20'+_0x546527['substring'](0x0,0x14)+_0xc426(0x66)+_0x546527[_0xc426(0x45)]+')'):_0x45ef6b[_0xc426(0x6a)](_0x10c6e3,_0x412e8f)&&(_0x450911['abort'](),_0x2c2a51['delete'](_0x2fbf23),_0xd4eaee++):console['log'](_0xc426(0x67)+_0x3ddc1e+_0xc426(0x68));}return _0x4a420c;}[_0xc426(0x6b)](_0x230b96){const _0xbc8fc4={'VbCis':_0xc426(0x54)};this[_0xc426(0x2)]={...this['authTriggers'],..._0x230b96},console[_0xc426(0x7)](_0xbc8fc4[_0xc426(0x6c)]);}async[_0xc426(0x6d)](_0x18ca57,_0x3befde={}){return this[_0xc426(0x3)](_0x18ca57,{..._0x3befde,'method':'GET'});}async[_0xc426(0x6e)](_0x15e9e8,_0x10baa0,_0x576113={}){return this['request'](_0x15e9e8,{..._0x576113,'method':'POST','body':_0x10baa0});}async['put'](_0x5041bc,_0xfd8d41,_0x39d269={}){return this[_0xc426(0x3)](_0x5041bc,{..._0x39d269,'method':'PUT','body':_0xfd8d41});}async[_0xc426(0x19)](_0x33fab6,_0x3fac9b={}){return this[_0xc426(0x3)](_0x33fab6,{..._0x3fac9b,'method':'DELETE'});}}export const apiClient=new ApiClient();export{ApiClient};export const authenticatedRequest=apiClient[_0xc426(0x3)][_0xc426(0x6f)](apiClient);export const apiGet=apiClient['get'][_0xc426(0x6f)](apiClient);export const apiPost=apiClient['post'][_0xc426(0x6f)](apiClient);export const apiPut=apiClient[_0xc426(0x70)][_0xc426(0x6f)](apiClient);export const apiDelete=apiClient[_0xc426(0x19)][_0xc426(0x6f)](apiClient);export default apiClient;
@@ -12,23 +12,23 @@ export let ApiKeyType = /*#__PURE__*/function (ApiKeyType) {
12
12
  // JWT token storage key
13
13
  const JWT_TOKEN_KEY = 'onairos_jwt_token';
14
14
 
15
- /**
16
- * Two-Tier Authentication Service for Onairos React Native SDK
17
- *
18
- * This service implements the two-tier authentication system:
19
- * 1. Developer API Keys: For app-level operations (email verification, app registration)
20
- * 2. JWT User Tokens: For user-level operations (PIN storage, user profile)
21
- *
22
- * How it works:
23
- * 1. Initialize with developer API key
24
- * 2. Use API key for email verification requests
25
- * 3. Store JWT token from email verification response
26
- * 4. Use JWT token for user-authenticated requests
27
- * 5. Handle token expiration gracefully
28
- *
29
- * Backend Integration:
30
- * - Developer routes: Authorization: Bearer ${API_KEY}
31
- * - User routes: Authorization: Bearer ${JWT_TOKEN}
15
+ /**
16
+ * Two-Tier Authentication Service for Onairos React Native SDK
17
+ *
18
+ * This service implements the two-tier authentication system:
19
+ * 1. Developer API Keys: For app-level operations (email verification, app registration)
20
+ * 2. JWT User Tokens: For user-level operations (PIN storage, user profile)
21
+ *
22
+ * How it works:
23
+ * 1. Initialize with developer API key
24
+ * 2. Use API key for email verification requests
25
+ * 3. Store JWT token from email verification response
26
+ * 4. Use JWT token for user-authenticated requests
27
+ * 5. Handle token expiration gracefully
28
+ *
29
+ * Backend Integration:
30
+ * - Developer routes: Authorization: Bearer ${API_KEY}
31
+ * - User routes: Authorization: Bearer ${JWT_TOKEN}
32
32
  */
33
33
 
34
34
  // Global configuration state
@@ -40,9 +40,9 @@ let userToken = null;
40
40
  // Cache duration (5 minutes)
41
41
  const CACHE_DURATION = 5 * 60 * 1000;
42
42
 
43
- /**
44
- * Check network connectivity
45
- * @returns Promise<boolean> - true if connected, false otherwise
43
+ /**
44
+ * Check network connectivity
45
+ * @returns Promise<boolean> - true if connected, false otherwise
46
46
  */
47
47
  const checkNetworkConnectivity = async () => {
48
48
  try {
@@ -63,9 +63,9 @@ const API_ENDPOINTS = {
63
63
  development: `${API_CONFIG.BASE_URL}` // Fallback to production since dev-API server doesn't exist
64
64
  };
65
65
 
66
- /**
67
- * Initialize the SDK with developer API key
68
- * @param config API configuration including developer API key
66
+ /**
67
+ * Initialize the SDK with developer API key
68
+ * @param config API configuration including developer API key
69
69
  */
70
70
  export const initializeApiKey = async config => {
71
71
  try {
@@ -150,10 +150,10 @@ export const initializeApiKey = async config => {
150
150
  }
151
151
  };
152
152
 
153
- /**
154
- * Determine API key type
155
- * @param apiKey The API key to check
156
- * @returns The type of API key (only DEVELOPER or INVALID - admin keys not supported in client SDK)
153
+ /**
154
+ * Determine API key type
155
+ * @param apiKey The API key to check
156
+ * @returns The type of API key (only DEVELOPER or INVALID - admin keys not supported in client SDK)
157
157
  */
158
158
  export const getApiKeyType = apiKey => {
159
159
  // Developer keys must be at least 32 characters and start with specific prefix
@@ -163,11 +163,11 @@ export const getApiKeyType = apiKey => {
163
163
  return ApiKeyType.INVALID;
164
164
  };
165
165
 
166
- /**
167
- * Validate an API key with the Onairos backend
168
- * All developer keys must be validated against the backend - no local bypass
169
- * @param apiKey The API key to validate
170
- * @returns Validation result with permissions and rate limits
166
+ /**
167
+ * Validate an API key with the Onairos backend
168
+ * All developer keys must be validated against the backend - no local bypass
169
+ * @param apiKey The API key to validate
170
+ * @returns Validation result with permissions and rate limits
171
171
  */
172
172
  export const validateApiKey = async apiKey => {
173
173
  try {
@@ -418,34 +418,34 @@ export const validateApiKey = async apiKey => {
418
418
  }
419
419
  };
420
420
 
421
- /**
422
- * Get the current API configuration
423
- * @returns Current API configuration or null if not initialized
421
+ /**
422
+ * Get the current API configuration
423
+ * @returns Current API configuration or null if not initialized
424
424
  */
425
425
  export const getApiConfig = () => {
426
426
  return globalConfig;
427
427
  };
428
428
 
429
- /**
430
- * Get the current API key
431
- * @returns Current API key or null if not initialized
429
+ /**
430
+ * Get the current API key
431
+ * @returns Current API key or null if not initialized
432
432
  */
433
433
  export const getApiKey = () => {
434
434
  var _globalConfig9;
435
435
  return ((_globalConfig9 = globalConfig) === null || _globalConfig9 === void 0 ? void 0 : _globalConfig9.apiKey) || null;
436
436
  };
437
437
 
438
- /**
439
- * Check if the SDK is properly initialized
440
- * @returns True if initialized with valid API key
438
+ /**
439
+ * Check if the SDK is properly initialized
440
+ * @returns True if initialized with valid API key
441
441
  */
442
442
  export const isApiKeyInitialized = () => {
443
443
  return isInitialized && globalConfig !== null;
444
444
  };
445
445
 
446
- /**
447
- * Store JWT token securely after email verification
448
- * @param token JWT token from email verification response
446
+ /**
447
+ * Store JWT token securely after email verification
448
+ * @param token JWT token from email verification response
449
449
  */
450
450
  export const storeJWT = async token => {
451
451
  try {
@@ -461,9 +461,9 @@ export const storeJWT = async token => {
461
461
  }
462
462
  };
463
463
 
464
- /**
465
- * Load JWT token from storage
466
- * @returns JWT token or null if not found
464
+ /**
465
+ * Load JWT token from storage
466
+ * @returns JWT token or null if not found
467
467
  */
468
468
  export const loadJWT = async () => {
469
469
  try {
@@ -476,16 +476,16 @@ export const loadJWT = async () => {
476
476
  }
477
477
  };
478
478
 
479
- /**
480
- * Get current JWT token
481
- * @returns JWT token or null if not available
479
+ /**
480
+ * Get current JWT token
481
+ * @returns JWT token or null if not available
482
482
  */
483
483
  export const getJWT = () => {
484
484
  return userToken;
485
485
  };
486
486
 
487
- /**
488
- * Clear JWT token (on logout or token expiration)
487
+ /**
488
+ * Clear JWT token (on logout or token expiration)
489
489
  */
490
490
  export const clearJWT = async () => {
491
491
  try {
@@ -500,10 +500,10 @@ export const clearJWT = async () => {
500
500
  }
501
501
  };
502
502
 
503
- /**
504
- * React Native compatible base64 decoder
505
- * @param str Base64 encoded string
506
- * @returns Decoded string
503
+ /**
504
+ * React Native compatible base64 decoder
505
+ * @param str Base64 encoded string
506
+ * @returns Decoded string
507
507
  */
508
508
  const base64Decode = str => {
509
509
  // Simple base64 decoding for React Native
@@ -524,10 +524,10 @@ const base64Decode = str => {
524
524
  return result;
525
525
  };
526
526
 
527
- /**
528
- * Decode JWT token payload (React Native compatible)
529
- * @param token JWT token string
530
- * @returns Decoded payload or null if invalid
527
+ /**
528
+ * Decode JWT token payload (React Native compatible)
529
+ * @param token JWT token string
530
+ * @returns Decoded payload or null if invalid
531
531
  */
532
532
  export const decodeJWTPayload = token => {
533
533
  try {
@@ -554,10 +554,10 @@ export const decodeJWTPayload = token => {
554
554
  }
555
555
  };
556
556
 
557
- /**
558
- * Extract username from JWT token
559
- * @param token JWT token (optional, uses stored token if not provided)
560
- * @returns Username or null if not found
557
+ /**
558
+ * Extract username from JWT token
559
+ * @param token JWT token (optional, uses stored token if not provided)
560
+ * @returns Username or null if not found
561
561
  */
562
562
  export const extractUsernameFromJWT = token => {
563
563
  try {
@@ -584,10 +584,10 @@ export const extractUsernameFromJWT = token => {
584
584
  }
585
585
  };
586
586
 
587
- /**
588
- * Extract user data from JWT token
589
- * @param token JWT token (optional, uses stored token if not provided)
590
- * @returns User data object or null if not found
587
+ /**
588
+ * Extract user data from JWT token
589
+ * @param token JWT token (optional, uses stored token if not provided)
590
+ * @returns User data object or null if not found
591
591
  */
592
592
  export const extractUserDataFromJWT = token => {
593
593
  try {
@@ -620,17 +620,17 @@ export const extractUserDataFromJWT = token => {
620
620
  }
621
621
  };
622
622
 
623
- /**
624
- * Check if user is authenticated with JWT token
625
- * @returns True if user has valid JWT token
623
+ /**
624
+ * Check if user is authenticated with JWT token
625
+ * @returns True if user has valid JWT token
626
626
  */
627
627
  export const isUserAuthenticated = () => {
628
628
  return !!userToken;
629
629
  };
630
630
 
631
- /**
632
- * Get authenticated headers for API requests
633
- * @returns Headers object with Authorization and other required headers
631
+ /**
632
+ * Get authenticated headers for API requests
633
+ * @returns Headers object with Authorization and other required headers
634
634
  */
635
635
  export const getAuthHeaders = () => {
636
636
  var _globalConfig12;
@@ -649,9 +649,9 @@ export const getAuthHeaders = () => {
649
649
  };
650
650
  };
651
651
 
652
- /**
653
- * Get authentication headers for developer API requests
654
- * @returns Headers with developer API key
652
+ /**
653
+ * Get authentication headers for developer API requests
654
+ * @returns Headers with developer API key
655
655
  */
656
656
  export const getDeveloperAuthHeaders = () => {
657
657
  var _globalConfig13;
@@ -670,9 +670,9 @@ export const getDeveloperAuthHeaders = () => {
670
670
  };
671
671
  };
672
672
 
673
- /**
674
- * Get authentication headers for user JWT requests
675
- * @returns Headers with user JWT token
673
+ /**
674
+ * Get authentication headers for user JWT requests
675
+ * @returns Headers with user JWT token
676
676
  */
677
677
  export const getUserAuthHeaders = () => {
678
678
  var _globalConfig14;
@@ -688,11 +688,11 @@ export const getUserAuthHeaders = () => {
688
688
  };
689
689
  };
690
690
 
691
- /**
692
- * Make an authenticated API request
693
- * @param endpoint The API endpoint (relative to base URL)
694
- * @param options Fetch options
695
- * @returns Response promise
691
+ /**
692
+ * Make an authenticated API request
693
+ * @param endpoint The API endpoint (relative to base URL)
694
+ * @param options Fetch options
695
+ * @returns Response promise
696
696
  */
697
697
  export const makeAuthenticatedRequest = async (endpoint, options = {}) => {
698
698
  if (!isApiKeyInitialized()) {
@@ -749,11 +749,11 @@ export const makeAuthenticatedRequest = async (endpoint, options = {}) => {
749
749
  }
750
750
  };
751
751
 
752
- /**
753
- * Make authenticated request with developer API key
754
- * @param endpoint The API endpoint
755
- * @param options Fetch options
756
- * @returns Response promise
752
+ /**
753
+ * Make authenticated request with developer API key
754
+ * @param endpoint The API endpoint
755
+ * @param options Fetch options
756
+ * @returns Response promise
757
757
  */
758
758
  export const makeDeveloperRequest = async (endpoint, options = {}) => {
759
759
  if (!isApiKeyInitialized()) {
@@ -810,11 +810,11 @@ export const makeDeveloperRequest = async (endpoint, options = {}) => {
810
810
  }
811
811
  };
812
812
 
813
- /**
814
- * Make authenticated request with user JWT token
815
- * @param endpoint The API endpoint
816
- * @param options Fetch options
817
- * @returns Response promise
813
+ /**
814
+ * Make authenticated request with user JWT token
815
+ * @param endpoint The API endpoint
816
+ * @param options Fetch options
817
+ * @returns Response promise
818
818
  */
819
819
  export const makeUserRequest = async (endpoint, options = {}) => {
820
820
  if (!isUserAuthenticated()) {
@@ -875,8 +875,8 @@ export const makeUserRequest = async (endpoint, options = {}) => {
875
875
  }
876
876
  };
877
877
 
878
- /**
879
- * Clear the API key validation cache
878
+ /**
879
+ * Clear the API key validation cache
880
880
  */
881
881
  export const clearValidationCache = () => {
882
882
  var _globalConfig15;
@@ -886,8 +886,8 @@ export const clearValidationCache = () => {
886
886
  }
887
887
  };
888
888
 
889
- /**
890
- * Reset the SDK initialization state
889
+ /**
890
+ * Reset the SDK initialization state
891
891
  */
892
892
  export const resetApiKeyService = () => {
893
893
  globalConfig = null;