@onairos/react-native 3.6.3 → 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.
- package/lib/commonjs/api/index.js +1 -1
- package/lib/commonjs/components/BodyText.js +1 -1
- package/lib/commonjs/components/BrandMark.js +1 -1
- package/lib/commonjs/components/CodeInput.js +1 -1
- package/lib/commonjs/components/EmailInput.js +1 -1
- package/lib/commonjs/components/GoogleButton.js +1 -1
- package/lib/commonjs/components/HeadingGroup.js +1 -1
- package/lib/commonjs/components/LLMDataInputModal.js +1 -1
- package/lib/commonjs/components/ModalHeader.js +1 -1
- package/lib/commonjs/components/ModalSheet.js +1 -1
- package/lib/commonjs/components/Onairos.js +1 -1
- package/lib/commonjs/components/OnairosButton.js +1 -1
- package/lib/commonjs/components/OnairosSignInButton.js +1 -1
- package/lib/commonjs/components/Overlay.js +1 -1
- package/lib/commonjs/components/PersonaImage.js +1 -1
- package/lib/commonjs/components/PersonaLoadingScreen.js +1 -1
- package/lib/commonjs/components/PersonalizationConsentScreen.js +1 -1
- package/lib/commonjs/components/PinCreationScreen.js +1 -1
- package/lib/commonjs/components/PinInput.js +1 -1
- package/lib/commonjs/components/PlatformConnectorsStep.js +1 -1
- package/lib/commonjs/components/PlatformList.js +1 -1
- package/lib/commonjs/components/PlatformToggle.js +1 -1
- package/lib/commonjs/components/PrimaryButton.js +1 -1
- package/lib/commonjs/components/SignInMatchAnimation.js +1 -1
- package/lib/commonjs/components/SignInStep.js +1 -1
- package/lib/commonjs/components/UniversalOnboarding.js +1 -1
- package/lib/commonjs/components/VerificationStep.js +1 -1
- package/lib/commonjs/components/WelcomeScreen.js +1 -1
- package/lib/commonjs/components/icons/Basicproficon.js +1 -1
- package/lib/commonjs/components/icons/Basicprofile.js +1 -1
- package/lib/commonjs/components/icons/Checkbox.js +1 -1
- package/lib/commonjs/components/icons/Checkmark.js +1 -1
- package/lib/commonjs/components/icons/Contentanalysis.js +1 -1
- package/lib/commonjs/components/icons/Contenticon.js +1 -1
- package/lib/commonjs/components/icons/EnochE.js +1 -1
- package/lib/commonjs/components/icons/Personalityicon.js +1 -1
- package/lib/commonjs/components/icons/Personalityprofile.js +1 -1
- package/lib/commonjs/components/icons/Personalitytraits.js +1 -1
- package/lib/commonjs/components/icons/Userpreferences.js +1 -1
- package/lib/commonjs/components/icons/index.js +1 -1
- package/lib/commonjs/components/onboarding/OAuthWebView.js +1 -1
- package/lib/commonjs/components/onboarding/OnboardingHeader.js +1 -1
- package/lib/commonjs/components/onboarding/PinInput.js +1 -1
- package/lib/commonjs/components/onboarding/PlatformConnector.js +1 -1
- package/lib/commonjs/config/api.js +1 -1
- package/lib/commonjs/constants/index.js +1 -1
- package/lib/commonjs/context/AuthContext.js +1 -1
- package/lib/commonjs/hooks/useConnectedAccounts.js +1 -1
- package/lib/commonjs/hooks/useConnections.js +1 -1
- package/lib/commonjs/hooks/useCredentials.js +1 -1
- package/lib/commonjs/hooks/useUserConnections.js +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/services/apiClient.js +1 -1
- package/lib/commonjs/services/apiKeyService.js +924 -9
- package/lib/commonjs/services/authService.js +627 -10
- package/lib/commonjs/services/biometricPinService.js +1 -1
- package/lib/commonjs/services/chatGPTConversationExtractor.js +1 -1
- package/lib/commonjs/services/chatGPTConversationService.js +1 -1
- package/lib/commonjs/services/claudeConversationExtractor.js +1 -1
- package/lib/commonjs/services/claudeConversationService.js +1 -1
- package/lib/commonjs/services/connectedAccountsService.js +1 -1
- package/lib/commonjs/services/googleAuthService.js +1 -1
- package/lib/commonjs/services/hingeDataExtractor.js +1 -1
- package/lib/commonjs/services/hingeDataService.js +1 -1
- package/lib/commonjs/services/imageCompressionService.js +1 -1
- package/lib/commonjs/services/instagramDataExtractor.js +1 -1
- package/lib/commonjs/services/instagramDataService.js +1 -1
- package/lib/commonjs/services/jwtStorageService.js +1 -1
- package/lib/commonjs/services/linkedinDOMExtractor.js +1 -1
- package/lib/commonjs/services/linkedinProfileService.js +1 -1
- package/lib/commonjs/services/linkedinScrapingService.js +1 -1
- package/lib/commonjs/services/llmDataStorage.js +1 -1
- package/lib/commonjs/services/mobileTrainingService.js +1 -1
- package/lib/commonjs/services/oauthService.js +391 -11
- package/lib/commonjs/services/pinEncryptionService.js +1 -1
- package/lib/commonjs/services/pinStorageUtils.js +1 -1
- package/lib/commonjs/services/platformAuthService.js +1 -1
- package/lib/commonjs/services/sephoraDataExtractor.js +1 -1
- package/lib/commonjs/services/sephoraDataService.js +1 -1
- package/lib/commonjs/services/storageService.js +1 -1
- package/lib/commonjs/services/telegramDataExtractor.js +1 -1
- package/lib/commonjs/services/telegramDataService.js +1 -1
- package/lib/commonjs/services/trainingApiHelpers.js +1 -1
- package/lib/commonjs/services/userConnectionsService.js +1 -1
- package/lib/commonjs/services/youtubeMigrationService.js +1 -1
- package/lib/commonjs/theme/index.js +1 -1
- package/lib/commonjs/types/index.js +1 -1
- package/lib/commonjs/types.js +1 -1
- package/lib/commonjs/utils/Portal.js +1 -1
- package/lib/commonjs/utils/api.js +1 -1
- package/lib/commonjs/utils/assetRegistry.js +1 -1
- package/lib/commonjs/utils/auth.js +1 -1
- package/lib/commonjs/utils/connectorTests.js +1 -1
- package/lib/commonjs/utils/crypto.js +1 -1
- package/lib/commonjs/utils/debugHelper.js +1 -1
- package/lib/commonjs/utils/encryption.js +1 -1
- package/lib/commonjs/utils/eventUtils.js +1 -1
- package/lib/commonjs/utils/haptics.js +1 -1
- package/lib/commonjs/utils/imagePreloader.js +1 -1
- package/lib/commonjs/utils/networkDiagnostics.js +1 -1
- package/lib/commonjs/utils/onairosApi.js +1 -1
- package/lib/commonjs/utils/programmaticFlow.js +1 -1
- package/lib/commonjs/utils/retryHelper.js +1 -1
- package/lib/commonjs/utils/secureStorage.js +1 -1
- package/lib/commonjs/utils/webviewScripts/chatgpt.js +1 -1
- package/lib/commonjs/utils/webviewScripts/claude.js +1 -1
- package/lib/commonjs/utils/webviewScripts/hinge.js +1 -1
- package/lib/commonjs/utils/webviewScripts/index.js +1 -1
- package/lib/commonjs/utils/webviewScripts/instagram.js +1 -1
- package/lib/commonjs/utils/webviewScripts/linkedin.js +1 -1
- package/lib/commonjs/utils/webviewScripts/sephora.js +1 -1
- package/lib/commonjs/utils/webviewScripts/telegram.js +1 -1
- package/lib/module/api/index.js +1 -1
- package/lib/module/components/BodyText.js +1 -1
- package/lib/module/components/BrandMark.js +1 -1
- package/lib/module/components/CodeInput.js +1 -1
- package/lib/module/components/EmailInput.js +1 -1
- package/lib/module/components/GoogleButton.js +1 -1
- package/lib/module/components/HeadingGroup.js +1 -1
- package/lib/module/components/LLMDataInputModal.js +1 -1
- package/lib/module/components/ModalHeader.js +1 -1
- package/lib/module/components/ModalSheet.js +1 -1
- package/lib/module/components/Onairos.js +1 -1
- package/lib/module/components/OnairosButton.js +1 -1
- package/lib/module/components/OnairosSignInButton.js +1 -1
- package/lib/module/components/Overlay.js +1 -1
- package/lib/module/components/PersonaImage.js +1 -1
- package/lib/module/components/PersonaLoadingScreen.js +1 -1
- package/lib/module/components/PersonalizationConsentScreen.js +1 -1
- package/lib/module/components/PinCreationScreen.js +1 -1
- package/lib/module/components/PinInput.js +1 -1
- package/lib/module/components/PlatformConnectorsStep.js +1 -1
- package/lib/module/components/PlatformList.js +1 -1
- package/lib/module/components/PlatformToggle.js +1 -1
- package/lib/module/components/PrimaryButton.js +1 -1
- package/lib/module/components/SignInMatchAnimation.js +1 -1
- package/lib/module/components/SignInStep.js +1 -1
- package/lib/module/components/UniversalOnboarding.js +1 -1
- package/lib/module/components/VerificationStep.js +1 -1
- package/lib/module/components/WelcomeScreen.js +1 -1
- package/lib/module/components/icons/Basicproficon.js +1 -1
- package/lib/module/components/icons/Basicprofile.js +1 -1
- package/lib/module/components/icons/Checkbox.js +1 -1
- package/lib/module/components/icons/Checkmark.js +1 -1
- package/lib/module/components/icons/Contentanalysis.js +1 -1
- package/lib/module/components/icons/Contenticon.js +1 -1
- package/lib/module/components/icons/EnochE.js +1 -1
- package/lib/module/components/icons/Personalityicon.js +1 -1
- package/lib/module/components/icons/Personalityprofile.js +1 -1
- package/lib/module/components/icons/Personalitytraits.js +1 -1
- package/lib/module/components/icons/Userpreferences.js +1 -1
- package/lib/module/components/onboarding/OAuthWebView.js +1 -1
- package/lib/module/components/onboarding/OnboardingHeader.js +1 -1
- package/lib/module/components/onboarding/PinInput.js +1 -1
- package/lib/module/components/onboarding/PlatformConnector.js +1 -1
- package/lib/module/config/api.js +1 -1
- package/lib/module/constants/index.js +1 -1
- package/lib/module/context/AuthContext.js +1 -1
- package/lib/module/hooks/useConnectedAccounts.js +1 -1
- package/lib/module/hooks/useConnections.js +1 -1
- package/lib/module/hooks/useCredentials.js +1 -1
- package/lib/module/hooks/useUserConnections.js +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/services/apiClient.js +1 -1
- package/lib/module/services/apiKeyService.js +898 -1
- package/lib/module/services/authService.js +602 -1
- package/lib/module/services/biometricPinService.js +1 -1
- package/lib/module/services/chatGPTConversationExtractor.js +1 -1
- package/lib/module/services/chatGPTConversationService.js +1 -1
- package/lib/module/services/claudeConversationExtractor.js +1 -1
- package/lib/module/services/claudeConversationService.js +1 -1
- package/lib/module/services/connectedAccountsService.js +1 -1
- package/lib/module/services/googleAuthService.js +1 -1
- package/lib/module/services/hingeDataExtractor.js +1 -1
- package/lib/module/services/hingeDataService.js +1 -1
- package/lib/module/services/imageCompressionService.js +1 -1
- package/lib/module/services/instagramDataExtractor.js +1 -1
- package/lib/module/services/instagramDataService.js +1 -1
- package/lib/module/services/jwtStorageService.js +1 -1
- package/lib/module/services/linkedinDOMExtractor.js +1 -1
- package/lib/module/services/linkedinProfileService.js +1 -1
- package/lib/module/services/linkedinScrapingService.js +1 -1
- package/lib/module/services/llmDataStorage.js +1 -1
- package/lib/module/services/mobileTrainingService.js +1 -1
- package/lib/module/services/oauthService.js +381 -1
- package/lib/module/services/pinEncryptionService.js +1 -1
- package/lib/module/services/pinStorageUtils.js +1 -1
- package/lib/module/services/platformAuthService.js +1 -1
- package/lib/module/services/sephoraDataExtractor.js +1 -1
- package/lib/module/services/sephoraDataService.js +1 -1
- package/lib/module/services/storageService.js +1 -1
- package/lib/module/services/telegramDataExtractor.js +1 -1
- package/lib/module/services/telegramDataService.js +1 -1
- package/lib/module/services/trainingApiHelpers.js +1 -1
- package/lib/module/services/userConnectionsService.js +1 -1
- package/lib/module/services/youtubeMigrationService.js +1 -1
- package/lib/module/theme/index.js +1 -1
- package/lib/module/types.js +1 -1
- package/lib/module/utils/Portal.js +1 -1
- package/lib/module/utils/api.js +1 -1
- package/lib/module/utils/assetRegistry.js +1 -1
- package/lib/module/utils/auth.js +1 -1
- package/lib/module/utils/connectorTests.js +1 -1
- package/lib/module/utils/crypto.js +1 -1
- package/lib/module/utils/debugHelper.js +1 -1
- package/lib/module/utils/encryption.js +1 -1
- package/lib/module/utils/eventUtils.js +1 -1
- package/lib/module/utils/haptics.js +1 -1
- package/lib/module/utils/networkDiagnostics.js +1 -1
- package/lib/module/utils/onairosApi.js +1 -1
- package/lib/module/utils/programmaticFlow.js +1 -1
- package/lib/module/utils/retryHelper.js +1 -1
- package/lib/module/utils/secureStorage.js +1 -1
- package/lib/module/utils/webviewScripts/chatgpt.js +1 -1
- package/lib/module/utils/webviewScripts/claude.js +1 -1
- package/lib/module/utils/webviewScripts/hinge.js +1 -1
- package/lib/module/utils/webviewScripts/index.js +1 -1
- package/lib/module/utils/webviewScripts/instagram.js +1 -1
- package/lib/module/utils/webviewScripts/linkedin.js +1 -1
- package/lib/module/utils/webviewScripts/sephora.js +1 -1
- package/lib/module/utils/webviewScripts/telegram.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x4b37(){const _0x2fb01a=['@onairos:llm_data','@onairos:llm_metadata','connected','✅\x20LLM\x20data\x20stored\x20locally\x20successfully','❌\x20Failed\x20to\x20store\x20LLM\x20data:','xFKIJ','setItem','userId','stringify','email','appName','data','length','ozIPf','IUfGM','log','📊\x20Data\x20size:\x20','\x20bytes','error','llm','chatgpt','1.0','hdqQt','✅\x20Retrieved\x20LLM\x20data\x20for\x20user:','❌\x20Failed\x20to\x20retrieve\x20LLM\x20data:','lvdFt','YejRk','timestamp','conversations','chatHistory','preferences','customData','toISOString','UsmrN','getItem','ℹ️\x20No\x20LLM\x20data\x20found\x20for\x20user:','parse','sNirM','AxvLW','❌\x20Failed\x20to\x20retrieve\x20LLM\x20metadata:','gvaUO','mfDwT','iaFRh','TeHmt','SVNvt','pfknU','HZaeW','⚠️\x20No\x20LLM\x20metadata\x20found\x20for\x20user:','qagPR','ZxFZI','warn','eYywQ','connectionStatus','✅\x20Updated\x20LLM\x20status\x20to:\x20','❌\x20Failed\x20to\x20clear\x20LLM\x20data:','vIKcN','ltCEy','gDakI','❌\x20Failed\x20to\x20request\x20LLM\x20data\x20from\x20backend:','sTvHq','message','OxugQ','qRcod','removeItem','mVPwc','🔍\x20Platform\x20connection\x20check:','entries','filter','map','includes','TYrWJ','ZAEhE','bBWYe','NBiAy','📡\x20Sending\x20LLM\x20data\x20to\x20backend\x20for\x20processing...','✅\x20Backend\x20received\x20and\x20stored\x20LLM\x20data:','QBwjF','❌\x20Backend\x20data\x20ingestion\x20failed:','uxBkR','xqVif','BASE_URL','/llmdata','OKNFI','Bearer\x20','YYKMt','CzvJJ','accessToken','refreshToken','tokenExpiry','blxRd','json','qZmfk','connectionId','JlAtL','status','WnTvl','MbSfc','eEOOF','SjdRa','Unknown\x20error','cwYRi','📤\x20Requesting\x20backend\x20to\x20send\x20LLM\x20data\x20to\x20developer...','✅\x20Backend\x20processing\x20LLM\x20data\x20request:','❌\x20Failed\x20to\x20request\x20LLM\x20data:','mEfYB','UkOvK','NPxlC','gKySo','/llmdata/request','HgZnY','apiUrl','token','text','ySini','Backend\x20error:\x20','YpKGj','getAllKeys','startsWith','rNjyb'];_0x4b37=function(){return _0x2fb01a;};return _0x4b37();}import AsyncStorage from'@react-native-async-storage/async-storage';import{API_CONFIG}from'../config/api';const LLM_DATA_STORAGE_KEY=_0x12f6(0x0),LLM_METADATA_STORAGE_KEY=_0x12f6(0x1);export const storeLLMData=async _0x559e6a=>{const _0x1381e8={'xFKIJ':'💾\x20Storing\x20LLM\x20data\x20locally\x20(temporary)...','ozIPf':_0x12f6(0x2),'IUfGM':_0x12f6(0x3),'Duwrl':_0x12f6(0x4)};try{console['log'](_0x1381e8[_0x12f6(0x5)]),await AsyncStorage[_0x12f6(0x6)](LLM_DATA_STORAGE_KEY+':'+_0x559e6a[_0x12f6(0x7)],JSON[_0x12f6(0x8)](_0x559e6a));const _0x55f3c9={'userId':_0x559e6a[_0x12f6(0x7)],'email':_0x559e6a[_0x12f6(0x9)],'appName':_0x559e6a[_0x12f6(0xa)],'timestamp':_0x559e6a['timestamp'],'hasData':!![],'dataSize':JSON[_0x12f6(0x8)](_0x559e6a[_0x12f6(0xb)])[_0x12f6(0xc)],'connectionStatus':_0x1381e8[_0x12f6(0xd)]};return await AsyncStorage[_0x12f6(0x6)](LLM_METADATA_STORAGE_KEY+':'+_0x559e6a[_0x12f6(0x7)],JSON[_0x12f6(0x8)](_0x55f3c9)),console['log'](_0x1381e8[_0x12f6(0xe)]),console[_0x12f6(0xf)](_0x12f6(0x10)+_0x55f3c9['dataSize']+_0x12f6(0x11)),!![];}catch(_0x3d8adf){return console[_0x12f6(0x12)](_0x1381e8['Duwrl'],_0x3d8adf),![];}};export const getLLMData=async _0x3fc10d=>{const _0x131954={'YejRk':_0x12f6(0x13),'GLBOv':_0x12f6(0x14),'UsmrN':_0x12f6(0x15),'lvdFt':_0x12f6(0x16),'sNirM':_0x12f6(0x17),'bPvVF':_0x12f6(0x18)};try{if(_0x131954[_0x12f6(0x19)]!==_0x131954[_0x12f6(0x19)])return{'platform':_0x131954[_0x12f6(0x1a)],'userId':_0x225cd0['userId'],'email':_0x4e12d2['email'],'timestamp':_0x8bbab4[_0x12f6(0x1b)],'data':{'type':_0x131954['GLBOv'],'conversations':_0x2b4855[_0x12f6(0xb)][_0x12f6(0x1c)]||[],'chatHistory':_0x15adfc['data'][_0x12f6(0x1d)]||[],'preferences':_0x3ec2a0['data'][_0x12f6(0x1e)]||{},'customData':_0xc7a5d2[_0x12f6(0xb)][_0x12f6(0x1f)]||{}},'metadata':{'appName':_0x1bcdb9[_0x12f6(0xa)],'collectedAt':new _0x352a3b(_0x24b5ed[_0x12f6(0x1b)])[_0x12f6(0x20)](),'dataVersion':_0x131954[_0x12f6(0x21)]}};else{const _0x28c45a=await AsyncStorage[_0x12f6(0x22)](LLM_DATA_STORAGE_KEY+':'+_0x3fc10d);if(!_0x28c45a)return console[_0x12f6(0xf)](_0x12f6(0x23),_0x3fc10d),null;const _0x4991c2=JSON[_0x12f6(0x24)](_0x28c45a);return console[_0x12f6(0xf)](_0x131954[_0x12f6(0x25)],_0x3fc10d),_0x4991c2;}}catch(_0xe1a80f){return console[_0x12f6(0x12)](_0x131954['bPvVF'],_0xe1a80f),null;}};export const getLLMMetadata=async _0x208e2f=>{const _0x30b82c={'gvaUO':function(_0x58782e,_0x17842d){return _0x58782e!==_0x17842d;},'mfDwT':_0x12f6(0x26),'TeHmt':'iaFRh','SVNvt':_0x12f6(0x27)};try{const _0x316ec5=await AsyncStorage['getItem'](LLM_METADATA_STORAGE_KEY+':'+_0x208e2f);if(!_0x316ec5)return _0x30b82c[_0x12f6(0x28)](_0x30b82c[_0x12f6(0x29)],_0x30b82c[_0x12f6(0x29)])?(_0x1480c6['error'](_0x12f6(0x4),_0x58302c),![]):null;return JSON[_0x12f6(0x24)](_0x316ec5);}catch(_0x16bcd5){return _0x30b82c[_0x12f6(0x28)](_0x12f6(0x2a),_0x30b82c[_0x12f6(0x2b)])?(_0x39d4c4[_0x12f6(0x12)]('❌\x20Failed\x20to\x20retrieve\x20LLM\x20metadata:',_0x6be1ba),null):(console[_0x12f6(0x12)](_0x30b82c[_0x12f6(0x2c)],_0x16bcd5),null);}};export const updateLLMStatus=async(_0x2c8cf6,_0x13a372)=>{const _0x3a2a21={'sTvHq':function(_0x18fe13,_0x38bfba){return _0x18fe13 instanceof _0x38bfba;},'OxugQ':'Unknown\x20error','ZxFZI':_0x12f6(0x2d),'Wsgxc':_0x12f6(0x2e),'eYywQ':_0x12f6(0x2f),'vIKcN':function(_0x59a8cf,_0x379211){return _0x59a8cf===_0x379211;},'ltCEy':_0x12f6(0x30),'gDakI':'QrQgo','qRcod':'❌\x20Failed\x20to\x20update\x20LLM\x20status:'};try{if(_0x3a2a21[_0x12f6(0x31)]!==_0x3a2a21['Wsgxc']){const _0x8103b4=await getLLMMetadata(_0x2c8cf6);if(!_0x8103b4)return console[_0x12f6(0x32)](_0x3a2a21[_0x12f6(0x33)],_0x2c8cf6),![];return _0x8103b4[_0x12f6(0x34)]=_0x13a372,await AsyncStorage[_0x12f6(0x6)](LLM_METADATA_STORAGE_KEY+':'+_0x2c8cf6,JSON[_0x12f6(0x8)](_0x8103b4)),console[_0x12f6(0xf)](_0x12f6(0x35)+_0x13a372),!![];}else return _0x240d7e[_0x12f6(0x12)](_0x12f6(0x36),_0x886909),![];}catch(_0x5c1f44){return _0x3a2a21[_0x12f6(0x37)](_0x3a2a21[_0x12f6(0x38)],_0x3a2a21[_0x12f6(0x39)])?(_0x1631b5[_0x12f6(0x12)](_0x12f6(0x3a),_0x110fcd),{'success':![],'message':_0x3a2a21[_0x12f6(0x3b)](_0x514f1f,_0x4dd5d9)?_0x2e9ffa[_0x12f6(0x3c)]:_0x3a2a21[_0x12f6(0x3d)]}):(console['error'](_0x3a2a21[_0x12f6(0x3e)],_0x5c1f44),![]);}};function _0x12f6(_0x4b37fc,_0x12f6a3){_0x4b37fc=_0x4b37fc-0x0;const _0x39d6a7=_0x4b37();let _0x5c7950=_0x39d6a7[_0x4b37fc];return _0x5c7950;}export const clearLLMData=async _0x509da5=>{const _0x478cdd={'aUfVR':'✅\x20LLM\x20data\x20cleared\x20for\x20user:','mVPwc':_0x12f6(0x36)};try{return await AsyncStorage[_0x12f6(0x3f)](LLM_DATA_STORAGE_KEY+':'+_0x509da5),await AsyncStorage[_0x12f6(0x3f)](LLM_METADATA_STORAGE_KEY+':'+_0x509da5),console['log'](_0x478cdd['aUfVR'],_0x509da5),!![];}catch(_0x480fc5){return console['error'](_0x478cdd[_0x12f6(0x40)],_0x480fc5),![];}};export const hasOnlyLLMConnection=_0x4f0afe=>{const _0x3309ed={'TYrWJ':'llm','ZAEhE':'chatgpt','Tpdry':function(_0x16b6f9,_0x4e1d48){return _0x16b6f9===_0x4e1d48;},'bBWYe':_0x12f6(0x41)},_0xb39943=Object[_0x12f6(0x42)](_0x4f0afe)[_0x12f6(0x43)](([_0x38f9fe,_0xb3bb89])=>_0xb3bb89)[_0x12f6(0x44)](([_0x32cda9,_0x2fc7c0])=>_0x32cda9),_0x565edd=_0xb39943[_0x12f6(0x45)](_0x3309ed[_0x12f6(0x46)])||_0xb39943[_0x12f6(0x45)](_0x3309ed[_0x12f6(0x47)]),_0x42170c=_0x3309ed['Tpdry'](_0xb39943[_0x12f6(0xc)],0x1)&&_0x565edd;return console[_0x12f6(0xf)](_0x3309ed[_0x12f6(0x48)],{'connectedPlatforms':_0xb39943,'hasLLM':_0x565edd,'onlyLLM':_0x42170c}),_0x42170c;};export const formatLLMDataForDeveloper=_0x1d8d6=>{const _0x4889ce={'NBiAy':_0x12f6(0x14)};return{'platform':_0x12f6(0x13),'userId':_0x1d8d6[_0x12f6(0x7)],'email':_0x1d8d6['email'],'timestamp':_0x1d8d6[_0x12f6(0x1b)],'data':{'type':_0x4889ce[_0x12f6(0x49)],'conversations':_0x1d8d6[_0x12f6(0xb)][_0x12f6(0x1c)]||[],'chatHistory':_0x1d8d6[_0x12f6(0xb)][_0x12f6(0x1d)]||[],'preferences':_0x1d8d6[_0x12f6(0xb)]['preferences']||{},'customData':_0x1d8d6[_0x12f6(0xb)][_0x12f6(0x1f)]||{}},'metadata':{'appName':_0x1d8d6[_0x12f6(0xa)],'collectedAt':new Date(_0x1d8d6[_0x12f6(0x1b)])['toISOString'](),'dataVersion':_0x12f6(0x15)}};};export const sendLLMDataToBackend=async(_0x356439,_0x537f69)=>{const _0x70c868={'WnTvl':'❌\x20Failed\x20to\x20get\x20LLM\x20data\x20keys:','eEOOF':_0x12f6(0x2f),'IDEIn':_0x12f6(0x4a),'tsNgm':function(_0x1261fe,_0x54df8d,_0x27d511){return _0x1261fe(_0x54df8d,_0x27d511);},'OKNFI':function(_0x260eee,_0x1f6379){return _0x260eee&&_0x1f6379;},'YYKMt':'llm','CzvJJ':_0x12f6(0x14),'blxRd':_0x12f6(0x15),'qZmfk':_0x12f6(0x4b),'JlAtL':_0x12f6(0x4c),'maWRL':_0x12f6(0x4d),'rJShC':_0x12f6(0x4e),'MbSfc':_0x12f6(0x4f),'SjdRa':'❌\x20Failed\x20to\x20send\x20data\x20to\x20backend:','VVjUP':function(_0x4293ee,_0x4ef34a){return _0x4293ee instanceof _0x4ef34a;}};try{console[_0x12f6(0xf)](_0x70c868['IDEIn']);const _0x33b893=await _0x70c868['tsNgm'](fetch,API_CONFIG[_0x12f6(0x50)]+_0x12f6(0x51),{'method':'POST','headers':{'Content-Type':'application/json',..._0x70c868[_0x12f6(0x52)](_0x537f69,{'Authorization':_0x12f6(0x53)+_0x537f69})},'body':JSON[_0x12f6(0x8)]({'userId':_0x356439[_0x12f6(0x7)],'email':_0x356439[_0x12f6(0x9)],'appName':_0x356439[_0x12f6(0xa)],'platform':_0x70c868[_0x12f6(0x54)],'connectionType':_0x70c868[_0x12f6(0x55)],'timestamp':new Date()[_0x12f6(0x20)](),'data':_0x356439[_0x12f6(0xb)],'accessToken':_0x356439[_0x12f6(0x56)],'refreshToken':_0x356439[_0x12f6(0x57)],'tokenExpiry':_0x356439[_0x12f6(0x58)],'metadata':{'collectedAt':new Date(_0x356439[_0x12f6(0x1b)])['toISOString'](),'dataVersion':_0x70c868[_0x12f6(0x59)]}})});if(_0x33b893['ok']){const _0x382bc7=await _0x33b893[_0x12f6(0x5a)]();return console[_0x12f6(0xf)](_0x70c868[_0x12f6(0x5b)],_0x382bc7),{'success':!![],'message':_0x382bc7[_0x12f6(0x3c)],'connectionId':_0x382bc7[_0x12f6(0x5c)]};}else{if(_0x70c868[_0x12f6(0x5d)]===_0x70c868['JlAtL']){const _0x5bb9ee=await _0x33b893['text']();return console[_0x12f6(0x12)](_0x70c868['maWRL'],_0x33b893[_0x12f6(0x5e)],_0x5bb9ee),{'success':![],'message':'Backend\x20error:\x20'+_0x33b893[_0x12f6(0x5e)]};}else return _0x1080e3[_0x12f6(0x12)](_0x70c868[_0x12f6(0x5f)],_0x433c09),[];}}catch(_0x360629){return _0x70c868['rJShC']===_0x70c868[_0x12f6(0x60)]?(_0x2388eb[_0x12f6(0x32)](_0x70c868[_0x12f6(0x61)],_0x5415ed),![]):(console[_0x12f6(0x12)](_0x70c868[_0x12f6(0x62)],_0x360629),{'success':![],'message':_0x70c868['VVjUP'](_0x360629,Error)?_0x360629[_0x12f6(0x3c)]:_0x12f6(0x63)});}};export const requestLLMDataForDeveloper=async(_0xc0dbaf,_0x2b59a3,_0x3014fb,_0x127e8e,_0x279370)=>{const _0x2d0fe0={'qSiOY':_0x12f6(0x13),'UkOvK':_0x12f6(0x14),'NPxlC':_0x12f6(0x41),'mEfYB':function(_0x2ced12,_0x54b0f8){return _0x2ced12!==_0x54b0f8;},'LVfPi':_0x12f6(0x64),'CdRZr':_0x12f6(0x65),'gKySo':function(_0x2a4535,_0xfce6ce,_0x46940c){return _0x2a4535(_0xfce6ce,_0x46940c);},'HgZnY':_0x12f6(0x66),'ySini':_0x12f6(0x67),'CZrhR':_0x12f6(0x3a),'YpKGj':function(_0x292d11,_0x31af66){return _0x292d11 instanceof _0x31af66;},'hedBE':_0x12f6(0x63)};try{if(_0x2d0fe0[_0x12f6(0x68)](_0x2d0fe0['LVfPi'],'cwYRi')){const _0x41fabf=_0x2f6855['entries'](_0x331dbf)[_0x12f6(0x43)](([_0x1e34cf,_0x592f11])=>_0x592f11)['map'](([_0x333a07,_0x5de975])=>_0x333a07),_0x61a2a0=_0x41fabf['includes'](_0x2d0fe0['qSiOY'])||_0x41fabf[_0x12f6(0x45)](_0x2d0fe0[_0x12f6(0x69)]),_0x30efeb=_0x41fabf[_0x12f6(0xc)]===0x1&&_0x61a2a0;return _0x4c4f09['log'](_0x2d0fe0[_0x12f6(0x6a)],{'connectedPlatforms':_0x41fabf,'hasLLM':_0x61a2a0,'onlyLLM':_0x30efeb}),_0x30efeb;}else{console['log'](_0x2d0fe0['CdRZr']);const _0x1d2cb8=await _0x2d0fe0[_0x12f6(0x6b)](fetch,API_CONFIG['BASE_URL']+_0x12f6(0x6c),{'method':'POST','headers':{'Content-Type':'application/json','Authorization':_0x12f6(0x53)+_0x279370},'body':JSON[_0x12f6(0x8)]({'userId':_0xc0dbaf,'email':_0x2b59a3,'appName':_0x3014fb,'requestedData':_0x127e8e,'timestamp':new Date()[_0x12f6(0x20)]()})});if(_0x1d2cb8['ok']){const _0x10eefe=await _0x1d2cb8['json']();return console['log'](_0x2d0fe0[_0x12f6(0x6d)],_0x10eefe),{'success':!![],'message':_0x10eefe[_0x12f6(0x3c)],'apiUrl':_0x10eefe[_0x12f6(0x6e)],'token':_0x10eefe[_0x12f6(0x6f)]};}else{const _0x15022d=await _0x1d2cb8[_0x12f6(0x70)]();return console['error'](_0x2d0fe0[_0x12f6(0x71)],_0x1d2cb8[_0x12f6(0x5e)],_0x15022d),{'success':![],'message':_0x12f6(0x72)+_0x1d2cb8[_0x12f6(0x5e)]};}}}catch(_0xec22ee){return console[_0x12f6(0x12)](_0x2d0fe0['CZrhR'],_0xec22ee),{'success':![],'message':_0x2d0fe0[_0x12f6(0x73)](_0xec22ee,Error)?_0xec22ee[_0x12f6(0x3c)]:_0x2d0fe0['hedBE']};}};export const getAllLLMDataKeys=async()=>{const _0x420b72={'rNjyb':'❌\x20Failed\x20to\x20get\x20LLM\x20data\x20keys:'};try{const _0x2b4664=await AsyncStorage[_0x12f6(0x74)](),_0x5e93eb=_0x2b4664[_0x12f6(0x43)](_0x5e441e=>_0x5e441e[_0x12f6(0x75)](LLM_DATA_STORAGE_KEY)||_0x5e441e[_0x12f6(0x75)](LLM_METADATA_STORAGE_KEY));return _0x5e93eb;}catch(_0x2a2174){return console[_0x12f6(0x12)](_0x420b72[_0x12f6(0x76)],_0x2a2174),[];}};
|
|
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
|
-
|
|
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';import{API_CONFIG}from'../config/api';const OAUTH_CONFIGS={'instagram':{'clientId':_0x231a(0x0),'redirectUri':'onairosanime://auth/instagram','scope':_0x231a(0x1),'authorizationEndpoint':_0x231a(0x2),'tokenEndpoint':_0x231a(0x3),'responseType':'code'},'youtube':{'clientId':_0x231a(0x4),'redirectUri':_0x231a(0x5),'scope':_0x231a(0x6),'authorizationEndpoint':_0x231a(0x7),'tokenEndpoint':_0x231a(0x8),'responseType':'code'},'pinterest':{'clientId':_0x231a(0x9),'redirectUri':_0x231a(0xa),'scope':_0x231a(0xb),'authorizationEndpoint':_0x231a(0xc),'tokenEndpoint':_0x231a(0xd),'responseType':_0x231a(0xe)},'reddit':{'clientId':'YOUR_REDDIT_CLIENT_ID','redirectUri':_0x231a(0xf),'scope':_0x231a(0x10),'authorizationEndpoint':_0x231a(0x11),'tokenEndpoint':_0x231a(0x12),'responseType':'code'}},generateState=()=>{const _0x3fbb48=Math[_0x231a(0x13)]()[_0x231a(0x14)](0x24)['substring'](0x2,0xf);return sha256(_0x3fbb48)[_0x231a(0x15)](0x0,0xa);};function _0x4827(){const _0x138a99=['YOUR_INSTAGRAM_CLIENT_ID','user_profile,user_media','https://api.instagram.com/oauth/authorize','https://api.instagram.com/oauth/access_token','YOUR_YOUTUBE_CLIENT_ID','onairosanime://auth/youtube','https://www.googleapis.com/auth/youtube.readonly','https://accounts.google.com/o/oauth2/auth','https://oauth2.googleapis.com/token','YOUR_PINTEREST_CLIENT_ID','onairosanime://auth/pinterest','boards:read,pins:read','https://www.pinterest.com/oauth/','https://api.pinterest.com/v5/oauth/token','code','onairosanime://auth/reddit','identity,read','https://www.reddit.com/api/v1/authorize','https://www.reddit.com/api/v1/access_token','random','toString','substring','url','rKkpp','removeAllListeners','GzFUV','NCmJR','zZBgo','onairosanime://auth/','lihti','arTFM','Error\x20handling\x20OAuth\x20deep\x20link:','startsWith','kqUED','split','ZtaWy','ckVLg','UHUha','error','searchParams','get','VaRpF','state','bcTdo','ZWAOm','ybfzj','bQokR','OAuth\x20error:\x20','GvnOt','No\x20authorization\x20code\x20received','oBNIt','UOXmu','Error\x20disconnecting\x20platform\x20(','fvUdL','PkmxP','authorization_code','Failed\x20to\x20exchange\x20code\x20for\x20token','UhuxJ','Unsupported\x20platform:\x20','jfHtu','clientId','QErri','eEdkT','mPijA','EZCrs','access_token','refresh_token','expires_in','username','Uaerj','Error\x20exchanging\x20code\x20for\x20token\x20(','client_id','cEswB','ntpnT','instagram','https://graph.instagram.com/me?fields=id,username','pinterest','reddit','https://oauth.reddit.com/api/v1/me','Failed\x20to\x20fetch\x20user\x20info','QPuJa','YekFL','AEXHI','Bearer\x20','AloBA','SkvXW','https://www.googleapis.com/youtube/v3/channels?part=snippet&mine=true','oDQbm','https://api.pinterest.com/v5/user_account','mirxm','json','lpTtC','youtube','items','snippet','title','full_name','name','authorizationEndpoint','append','sGSva','GTHVD','redirectUri','response_type','responseType','scope','openURL','NmcpL','JRLkL','OAuth\x20state\x20mismatch\x20-\x20possible\x20CSRF\x20attack','Error\x20fetching\x20user\x20info\x20(','WZxYA','RgLOg','rrbJo','redirect_uri','GUNav','DsLbR','eDMiJ','ABQhE','OomPs','gCrIK','OQAME','kKLJH','MIHWZ','gdauC','SZatB','DoEAr','/users/disconnect-platform','post','platforms','AfVHc','RyCLV','lsaUj','FSdtD','fOKFU','pAesD','expiresIn','kwVPa','now','ADFuL','upxtZ','ajRDP','WlZhN','Error\x20storing\x20platform\x20connection\x20(','BASE_URL'];_0x4827=function(){return _0x138a99;};return _0x4827();}export const initializeOAuthService=()=>{const _0x529879={'NkEdF':_0x231a(0x16)};Linking['addEventListener'](_0x529879['NkEdF'],handleDeepLink);};export const cleanupOAuthService=()=>{const _0x1d468c={'NCmJR':function(_0x3bcaf1,_0x1a1a86){return _0x3bcaf1===_0x1a1a86;},'GzFUV':'function','zZBgo':_0x231a(0x17),'ewPvh':'urmOb'};if(_0x1d468c['NCmJR'](typeof Linking[_0x231a(0x18)],_0x1d468c[_0x231a(0x19)])){if(_0x1d468c[_0x231a(0x1a)](_0x1d468c[_0x231a(0x1b)],_0x1d468c['ewPvh']))throw new _0x59269a('Unsupported\x20platform:\x20'+_0x3f8fb2);else Linking['removeAllListeners'](_0x231a(0x16));}};let currentOAuthState=null,currentOAuthPlatform=null,currentOAuthResolve=null,currentOAuthReject=null;const handleDeepLink=async _0x3b0626=>{const _0x1cf7c7={'kqUED':'UEjDi','QQknY':'kwrwn','ZtaWy':_0x231a(0x1c),'ckVLg':function(_0xf93e34,_0x5037b5){return _0xf93e34!==_0x5037b5;},'UHUha':_0x231a(0x1d),'VaRpF':_0x231a(0xe),'bcTdo':function(_0x2448a2,_0x4ba70c){return _0x2448a2(_0x4ba70c);},'ZWAOm':'OAuth\x20state\x20mismatch\x20-\x20possible\x20CSRF\x20attack','ybfzj':function(_0x22cc7d,_0xc45e5c){return _0x22cc7d===_0xc45e5c;},'bQokR':'MOjTu','kgnGv':function(_0x52292e,_0x7b37c5,_0x5a5176){return _0x52292e(_0x7b37c5,_0x5a5176);},'Kgiof':function(_0xfaf053,_0x1aded6){return _0xfaf053(_0x1aded6);},'GvnOt':function(_0x2b3cad,_0x259da8){return _0x2b3cad(_0x259da8);},'oBNIt':function(_0xde535,_0x34c9d0){return _0xde535!==_0x34c9d0;},'UOXmu':_0x231a(0x1e),'fvUdL':_0x231a(0x1f),'MgViU':function(_0x24daa5,_0x3c5b28){return _0x24daa5(_0x3c5b28);}};try{const {url:_0x3fddc9}=_0x3b0626;if(!_0x3fddc9[_0x231a(0x20)](_0x231a(0x1c))){if(_0x1cf7c7[_0x231a(0x21)]!==_0x1cf7c7['QQknY'])return;else return;}const _0x4c2392=_0x3fddc9[_0x231a(0x22)](_0x1cf7c7[_0x231a(0x23)])[0x1][_0x231a(0x22)]('?')[0x0];if(_0x4c2392!==currentOAuthPlatform){if(_0x1cf7c7[_0x231a(0x24)](_0x1cf7c7[_0x231a(0x25)],_0x1cf7c7[_0x231a(0x25)])){_0x4cd73e[_0x231a(0x26)]('Error\x20fetching\x20user\x20info\x20('+_0x3c75f9+'):',_0x122727);throw _0x5549c3;}else return;}const _0x1f256c=new URL(_0x3fddc9)[_0x231a(0x27)],_0x34010a=_0x1f256c[_0x231a(0x28)](_0x1cf7c7[_0x231a(0x29)]),_0x1e90cb=_0x1f256c[_0x231a(0x28)](_0x231a(0x2a)),_0x593128=_0x1f256c['get'](_0x231a(0x26));if(_0x1e90cb!==currentOAuthState){currentOAuthReject&&_0x1cf7c7[_0x231a(0x2b)](currentOAuthReject,new Error(_0x1cf7c7[_0x231a(0x2c)]));return;}if(_0x593128){if(_0x1cf7c7[_0x231a(0x2d)](_0x1cf7c7[_0x231a(0x2e)],'aTPiI'))_0x4fa79a(new _0x2212db(_0x231a(0x2f)+_0x3f19a9));else{currentOAuthReject&&_0x1cf7c7[_0x231a(0x2b)](currentOAuthReject,new Error('OAuth\x20error:\x20'+_0x593128));return;}}if(_0x34010a){const _0x346ba2=await _0x1cf7c7['kgnGv'](exchangeCodeForToken,_0x4c2392,_0x34010a);currentOAuthResolve&&_0x1cf7c7['Kgiof'](currentOAuthResolve,_0x346ba2);}else currentOAuthReject&&_0x1cf7c7[_0x231a(0x30)](currentOAuthReject,new Error(_0x231a(0x31)));}catch(_0x3bf7c0){if(_0x1cf7c7[_0x231a(0x32)](_0x1cf7c7[_0x231a(0x33)],_0x1cf7c7['UOXmu']))return _0x1a5d03[_0x231a(0x26)](_0x231a(0x34)+_0x3eb3e0+'):',_0x5cbfdd),![];else console['error'](_0x1cf7c7[_0x231a(0x35)],_0x3bf7c0),currentOAuthReject&&_0x1cf7c7['MgViU'](currentOAuthReject,_0x3bf7c0);}finally{currentOAuthState=null,currentOAuthPlatform=null,currentOAuthResolve=null,currentOAuthReject=null;}},exchangeCodeForToken=async(_0x116e77,_0x4a017b)=>{const _0x570d02={'Uaerj':function(_0x281a8b,_0x405b97){return _0x281a8b(_0x405b97);},'hGens':function(_0x5088ca,_0x27603a){return _0x5088ca!==_0x27603a;},'SIgpb':_0x231a(0x36),'jfHtu':_0x231a(0x37),'QErri':function(_0x185aa9,_0x216c7b,_0x5139a7){return _0x185aa9(_0x216c7b,_0x5139a7);},'eEdkT':'application/x-www-form-urlencoded','mPijA':_0x231a(0x38),'EZCrs':function(_0x4b4a4d,_0x57f160,_0x5e48e7){return _0x4b4a4d(_0x57f160,_0x5e48e7);}};try{if(_0x570d02['hGens'](_0x570d02['SIgpb'],_0x231a(0x39))){const _0x1407f7=OAUTH_CONFIGS[_0x116e77];if(!_0x1407f7)throw new Error(_0x231a(0x3a)+_0x116e77);const _0x18c5bf=new URLSearchParams({'grant_type':_0x570d02[_0x231a(0x3b)],'code':_0x4a017b,'redirect_uri':_0x1407f7['redirectUri'],'client_id':_0x1407f7[_0x231a(0x3c)]}),_0x2c77ea=await _0x570d02[_0x231a(0x3d)](fetch,_0x1407f7['tokenEndpoint'],{'method':'POST','headers':{'Content-Type':_0x570d02[_0x231a(0x3e)]},'body':_0x18c5bf[_0x231a(0x14)]()}),_0x27f492=await _0x2c77ea['json']();if(!_0x2c77ea['ok'])throw new Error(_0x27f492[_0x231a(0x26)]||_0x570d02[_0x231a(0x3f)]);const _0x5d164e=await _0x570d02[_0x231a(0x40)](fetchUserInfo,_0x116e77,_0x27f492[_0x231a(0x41)]);return{'token':_0x27f492[_0x231a(0x41)],'refreshToken':_0x27f492[_0x231a(0x42)],'expiresIn':_0x27f492[_0x231a(0x43)],'username':_0x5d164e[_0x231a(0x44)],'userId':_0x5d164e['id']};}else{_0xea2851&&_0x570d02[_0x231a(0x45)](_0xa0171e,new _0x37eea8(_0x231a(0x2f)+_0x32e97f));return;}}catch(_0x3f1eaf){console[_0x231a(0x26)](_0x231a(0x46)+_0x116e77+'):',_0x3f1eaf);throw _0x3f1eaf;}},fetchUserInfo=async(_0x3b2037,_0x23dc9c)=>{const _0x4fa771={'WdssJ':function(_0x2287ca){return _0x2287ca();},'sGSva':_0x231a(0x47),'GTHVD':'redirect_uri','dpLeh':'state','JTrYe':function(_0x2ba095,_0x2a8db5){return _0x2ba095(_0x2a8db5);},'YekFL':function(_0x33f222,_0x157cb4){return _0x33f222!==_0x157cb4;},'AEXHI':_0x231a(0x48),'gkfNt':_0x231a(0x49),'AloBA':_0x231a(0x4a),'SkvXW':_0x231a(0x4b),'OVjrr':'youtube','oDQbm':_0x231a(0x4c),'mirxm':_0x231a(0x4d),'qDnZQ':_0x231a(0x4e),'lpTtC':_0x231a(0x4f),'NmcpL':'aHupw','JRLkL':_0x231a(0x50)};try{if(_0x4fa771[_0x231a(0x51)](_0x4fa771[_0x231a(0x52)],_0x4fa771['gkfNt'])){let _0xd660f0,_0x3b0077={'Authorization':_0x231a(0x53)+_0x23dc9c};switch(_0x3b2037){case _0x4fa771[_0x231a(0x54)]:_0xd660f0=_0x4fa771[_0x231a(0x55)];break;case _0x4fa771['OVjrr']:_0xd660f0=_0x231a(0x56);break;case _0x4fa771[_0x231a(0x57)]:_0xd660f0=_0x231a(0x58);break;case _0x4fa771[_0x231a(0x59)]:_0xd660f0=_0x4fa771['qDnZQ'];break;default:throw new Error(_0x231a(0x3a)+_0x3b2037);}const _0x1c80cb=await fetch(_0xd660f0,{'headers':_0x3b0077}),_0xb87c3d=await _0x1c80cb[_0x231a(0x5a)]();if(!_0x1c80cb['ok'])throw new Error(_0xb87c3d[_0x231a(0x26)]||_0x4fa771[_0x231a(0x5b)]);switch(_0x3b2037){case _0x231a(0x4a):return{'id':_0xb87c3d['id'],'username':_0xb87c3d[_0x231a(0x44)]};case _0x231a(0x5c):return{'id':_0xb87c3d[_0x231a(0x5d)][0x0]['id'],'username':_0xb87c3d['items'][0x0][_0x231a(0x5e)][_0x231a(0x5f)]};case _0x4fa771[_0x231a(0x57)]:return{'id':_0xb87c3d['id'],'username':_0xb87c3d['username']||_0xb87c3d[_0x231a(0x60)]};case _0x4fa771[_0x231a(0x59)]:return{'id':_0xb87c3d['id'],'username':_0xb87c3d[_0x231a(0x61)]};default:throw new Error(_0x231a(0x3a)+_0x3b2037);}}else{const _0x24200d=_0x449acd[_0x259b11];if(!_0x24200d)throw new _0x4c7954(_0x231a(0x3a)+_0x160a25);const _0x4bfb68=_0x4fa771['WdssJ'](_0x102e43),_0x320ec9=new _0x39c62(_0x24200d[_0x231a(0x62)]);_0x320ec9[_0x231a(0x27)][_0x231a(0x63)](_0x4fa771[_0x231a(0x64)],_0x24200d['clientId']),_0x320ec9[_0x231a(0x27)][_0x231a(0x63)](_0x4fa771[_0x231a(0x65)],_0x24200d[_0x231a(0x66)]),_0x320ec9[_0x231a(0x27)]['append'](_0x231a(0x67),_0x24200d[_0x231a(0x68)]),_0x320ec9[_0x231a(0x27)][_0x231a(0x63)](_0x231a(0x69),_0x24200d[_0x231a(0x69)]),_0x320ec9['searchParams']['append'](_0x4fa771['dpLeh'],_0x4bfb68),_0x18b4ec=_0x4bfb68,_0x37b888=_0x15a550,_0x789ff5=_0x2d0b0a,_0x5669a6=_0x39768e,Linking[_0x231a(0x6a)](_0x320ec9[_0x231a(0x14)]());}}catch(_0x1ea731){if(_0x4fa771[_0x231a(0x6b)]===_0x4fa771[_0x231a(0x6c)]){_0x1d3c75&&_0x4fa771['JTrYe'](_0x3d6596,new _0x518534(_0x231a(0x6d)));return;}else{console[_0x231a(0x26)](_0x231a(0x6e)+_0x3b2037+'):',_0x1ea731);throw _0x1ea731;}}};export const connectPlatform=_0x35092a=>{const _0x463db9={'MIHWZ':function(_0x8e5159,_0x4b06d8){return _0x8e5159(_0x4b06d8);},'DsLbR':_0x231a(0x6f),'eDMiJ':function(_0x47878a,_0x4dbdd0){return _0x47878a===_0x4dbdd0;},'ABQhE':_0x231a(0x70),'gCrIK':_0x231a(0x71),'aUZYD':function(_0x409c36){return _0x409c36();},'uJNjb':_0x231a(0x47),'OQAME':_0x231a(0x72),'kKLJH':_0x231a(0x67),'DNspJ':_0x231a(0x69),'gdauC':function(_0x110a0e,_0x55a770){return _0x110a0e===_0x55a770;},'SZatB':_0x231a(0x73),'DoEAr':function(_0x363ea6,_0x52f0f1){return _0x363ea6(_0x52f0f1);}};return new Promise((_0x1ab60a,_0x9ec63a)=>{if(_0x463db9['DsLbR']===_0x463db9[_0x231a(0x74)])try{if(_0x463db9[_0x231a(0x75)](_0x463db9[_0x231a(0x76)],_0x463db9['ABQhE'])){const _0x2960c1=OAUTH_CONFIGS[_0x35092a];if(!_0x2960c1){if(_0x463db9[_0x231a(0x75)](_0x231a(0x77),_0x463db9[_0x231a(0x78)]))return _0x3259d6['error']('Error\x20storing\x20platform\x20connection\x20('+_0x55a85b+'):',_0x4bf71b),![];else throw new Error(_0x231a(0x3a)+_0x35092a);}const _0x39adc9=_0x463db9['aUZYD'](generateState),_0x3122e3=new URL(_0x2960c1[_0x231a(0x62)]);_0x3122e3['searchParams']['append'](_0x463db9['uJNjb'],_0x2960c1[_0x231a(0x3c)]),_0x3122e3['searchParams'][_0x231a(0x63)](_0x463db9[_0x231a(0x79)],_0x2960c1['redirectUri']),_0x3122e3[_0x231a(0x27)][_0x231a(0x63)](_0x463db9[_0x231a(0x7a)],_0x2960c1[_0x231a(0x68)]),_0x3122e3[_0x231a(0x27)]['append'](_0x463db9['DNspJ'],_0x2960c1[_0x231a(0x69)]),_0x3122e3[_0x231a(0x27)][_0x231a(0x63)](_0x231a(0x2a),_0x39adc9),currentOAuthState=_0x39adc9,currentOAuthPlatform=_0x35092a,currentOAuthResolve=_0x1ab60a,currentOAuthReject=_0x9ec63a,Linking[_0x231a(0x6a)](_0x3122e3[_0x231a(0x14)]());}else _0x463db9[_0x231a(0x7b)](_0xa441c8,_0x53dda3);}catch(_0x4caf22){if(_0x463db9[_0x231a(0x7c)](_0x463db9[_0x231a(0x7d)],'PFXCJ'))return;else _0x463db9[_0x231a(0x7e)](_0x9ec63a,_0x4caf22);}else _0xb6a83d&&_0x1ad235(new _0x3690f4(_0x231a(0x31)));});};export const disconnectPlatform=async(_0xc018a7,_0x37792f)=>{const _0x4f498e={'gvUzu':_0x231a(0x7f),'jPQIk':function(_0x47fd05,_0x5986ee){return _0x47fd05(_0x5986ee);}};try{await onairosApi[_0x231a(0x80)](_0x4f498e['gvUzu'],{'platform':_0xc018a7,'username':_0x37792f['username']});const _0x4dff3={..._0x37792f[_0x231a(0x81)]};return _0x4dff3&&_0xc018a7 in _0x4dff3&&delete _0x4dff3[_0xc018a7],await _0x4f498e['jPQIk'](updateCredentials,{..._0x37792f,'platforms':_0x4dff3}),!![];}catch(_0x3e3b0b){return console[_0x231a(0x26)](_0x231a(0x34)+_0xc018a7+'):',_0x3e3b0b),![];}};function _0x231a(_0x4827d5,_0x231a73){_0x4827d5=_0x4827d5-0x0;const _0x36d99a=_0x4827();let _0x479fde=_0x36d99a[_0x4827d5];return _0x479fde;}export const storePlatformConnection=async(_0x5459a9,_0x84b97f,_0x5aca33)=>{const _0x28e3fd={'pAesD':_0x231a(0x6d),'RyCLV':function(_0x21ba07,_0x866519){return _0x21ba07===_0x866519;},'lsaUj':_0x231a(0x4a),'FSdtD':function(_0x5bd8a5,_0x2f8a0a){return _0x5bd8a5===_0x2f8a0a;},'CIGJz':function(_0x2c2b44,_0x31e2bb){return _0x2c2b44===_0x31e2bb;},'fOKFU':_0x231a(0x82),'kwVPa':function(_0x3f1bca,_0xeb3fba){return _0x3f1bca*_0xeb3fba;},'JkoJy':function(_0x24815a,_0x1e9a91){return _0x24815a===_0x1e9a91;},'ADFuL':_0x231a(0x5c),'upxtZ':'pinterest','ajRDP':'reddit','WlZhN':function(_0x3b80cf,_0x448ec7){return _0x3b80cf(_0x448ec7);}};try{const _0x1a2970=_0x28e3fd[_0x231a(0x83)](_0x5459a9,_0x28e3fd[_0x231a(0x84)])||_0x28e3fd[_0x231a(0x85)](_0x5459a9,_0x231a(0x5c))||_0x28e3fd[_0x231a(0x83)](_0x5459a9,'pinterest')||_0x28e3fd['CIGJz'](_0x5459a9,_0x231a(0x4d));if(!_0x1a2970){if(_0x28e3fd[_0x231a(0x86)]===_0x231a(0x82))throw new Error(_0x231a(0x3a)+_0x5459a9);else _0x5f5c92(new _0x25042e(_0x28e3fd[_0x231a(0x87)]));}const _0x3a7bec={..._0x5aca33['platforms']},_0x1d75fa={'username':_0x84b97f[_0x231a(0x44)],'userId':_0x84b97f['userId'],'token':_0x84b97f['token'],'refreshToken':_0x84b97f['refreshToken'],'expiresAt':_0x84b97f[_0x231a(0x88)]?Date['now']()+_0x28e3fd[_0x231a(0x89)](_0x84b97f[_0x231a(0x88)],0x3e8):null,'connectedAt':Date[_0x231a(0x8a)]()};if(_0x28e3fd['JkoJy'](_0x5459a9,_0x28e3fd[_0x231a(0x84)]))_0x3a7bec[_0x231a(0x4a)]=_0x1d75fa;else{if(_0x5459a9===_0x28e3fd[_0x231a(0x8b)])_0x3a7bec[_0x231a(0x5c)]=_0x1d75fa;else{if(_0x28e3fd[_0x231a(0x83)](_0x5459a9,_0x28e3fd[_0x231a(0x8c)]))_0x3a7bec[_0x231a(0x4c)]=_0x1d75fa;else{if(_0x5459a9===_0x28e3fd[_0x231a(0x8d)])_0x3a7bec[_0x231a(0x4d)]=_0x1d75fa;}}}return await _0x28e3fd[_0x231a(0x8e)](updateCredentials,{..._0x5aca33,'platforms':_0x3a7bec}),!![];}catch(_0x15fff1){return console[_0x231a(0x26)](_0x231a(0x8f)+_0x5459a9+'):',_0x15fff1),![];}};export const OAuthService={'initializeOAuthService':initializeOAuthService,'cleanupOAuthService':cleanupOAuthService,'connectPlatform':connectPlatform,'disconnectPlatform':disconnectPlatform,'storePlatformConnection':storePlatformConnection,'_apiBaseUrl':''+API_CONFIG[_0x231a(0x90)]};
|
|
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
|
-
const CryptoJS=__ONAIROS_REQ_FUNC__(0x0);import{getTemporaryPin}from'./pinStorageUtils';const ENCRYPTION_KEY=
|
|
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';
|
|
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();}
|