@onairos/react-native 3.6.2 → 3.6.3
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 +1 -1
- package/lib/commonjs/services/authService.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/lib/module/services/authService.js +1 -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 +1 -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
|
-
import{RSA}from'react-native-rsa-native';import{sha256 as
|
|
1
|
+
function _0x14a6(_0x104fc2,_0x14a622){_0x104fc2=_0x104fc2-0x0;const _0x553758=_0x104f();let _0x300bb0=_0x553758[_0x104fc2];return _0x300bb0;}import{RSA}from'react-native-rsa-native';function _0x104f(){const _0x50c519=['base64','-----END\x20PUBLIC\x20KEY-----','oKHuj','replace','FfXJI','NFNGT','trim','-----BEGIN\x20PUBLIC\x20KEY-----\x0a','\x0a-----END\x20PUBLIC\x20KEY-----','encrypt','KGabE','Qcffu','from','uCnFn','toString','binary','length','aOpXL','charCodeAt','buffer','error','WMKbk','RSA\x20encryption\x20failed:','Error\x20converting\x20base64\x20to\x20buffer:','GTUDh','Svfuj','xPCFT','kejoc','WfCyN'];_0x104f=function(){return _0x50c519;};return _0x104f();}import{sha256 as _0x9a0869}from'react-native-crypto-js';export const rsaEncrypt=async(_0x4b43eb,_0x3b1340)=>{const _0x17f590={'uCnFn':_0x14a6(0x0),'aOpXL':function(_0x102756,_0x4261dd){return _0x102756<_0x4261dd;},'WMKbk':'Error\x20converting\x20base64\x20to\x20buffer:','FfXJI':'-----BEGIN\x20PUBLIC\x20KEY-----','NFNGT':_0x14a6(0x1),'KGabE':function(_0x53da2b,_0x2b90c1){return _0x53da2b!==_0x2b90c1;},'Qcffu':_0x14a6(0x2)};try{const _0xa2c40=_0x4b43eb[_0x14a6(0x3)](/\\n/g,'')[_0x14a6(0x3)](/^\s+|\s+$/g,'')['replace'](_0x17f590[_0x14a6(0x4)],'')[_0x14a6(0x3)](_0x17f590[_0x14a6(0x5)],'')[_0x14a6(0x6)](),_0x5de8d9=_0x14a6(0x7)+_0xa2c40+_0x14a6(0x8),_0x3a9d16=await RSA[_0x14a6(0x9)](_0x3b1340,_0x5de8d9);return _0x3a9d16;}catch(_0x502973){if(_0x17f590[_0x14a6(0xa)](_0x17f590[_0x14a6(0xb)],_0x17f590[_0x14a6(0xb)]))try{const _0x22c863=_0x2f1aa1[_0x14a6(0xc)](_0x11d276,_0x17f590[_0x14a6(0xd)])[_0x14a6(0xe)](_0x14a6(0xf)),_0x40f17b=new _0x40d1cc(_0x22c863[_0x14a6(0x10)]);for(let _0x2950b5=0x0;_0x17f590[_0x14a6(0x11)](_0x2950b5,_0x22c863[_0x14a6(0x10)]);_0x2950b5++){_0x40f17b[_0x2950b5]=_0x22c863[_0x14a6(0x12)](_0x2950b5);}return _0x40f17b[_0x14a6(0x13)];}catch(_0x305320){_0x3dbf15[_0x14a6(0x14)](_0x17f590[_0x14a6(0x15)],_0x305320);throw _0x305320;}else{console['error'](_0x14a6(0x16),_0x502973);throw _0x502973;}}};export const sha256=_0x3f0a76=>{return _0x9a0869(_0x3f0a76)[_0x14a6(0xe)]();};export const base64ToBuffer=_0x208ebc=>{const _0x139e2d={'WfCyN':_0x14a6(0x17),'GTUDh':_0x14a6(0x0),'Svfuj':_0x14a6(0xf),'IzUQw':function(_0x3be39a,_0x4b7aad){return _0x3be39a<_0x4b7aad;},'xPCFT':function(_0x4fefb9,_0xaec42a){return _0x4fefb9===_0xaec42a;},'kejoc':'wuggI'};try{const _0x2b67d3=Buffer['from'](_0x208ebc,_0x139e2d[_0x14a6(0x18)])[_0x14a6(0xe)](_0x139e2d[_0x14a6(0x19)]),_0x37a419=new Uint8Array(_0x2b67d3[_0x14a6(0x10)]);for(let _0xf3f2cd=0x0;_0x139e2d['IzUQw'](_0xf3f2cd,_0x2b67d3[_0x14a6(0x10)]);_0xf3f2cd++){if(_0x139e2d[_0x14a6(0x1a)](_0x139e2d[_0x14a6(0x1b)],_0x139e2d[_0x14a6(0x1b)]))_0x37a419[_0xf3f2cd]=_0x2b67d3[_0x14a6(0x12)](_0xf3f2cd);else{_0x597b89[_0x14a6(0x14)](_0x139e2d[_0x14a6(0x1c)],_0x4b4d6d);throw _0x5c7d6f;}}return _0x37a419[_0x14a6(0x13)];}catch(_0x228e9a){console[_0x14a6(0x14)](_0x139e2d[_0x14a6(0x1c)],_0x228e9a);throw _0x228e9a;}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const __DEV__=process['env']['NODE_ENV']!==_0x5322(0x0);function _0x8680(){const _0x19c011=['production','eaIPO','gcNxm','DvZnq','log','[Onairos\x20Debug]\x20','ahFNv','hKuay','error','[Onairos\x20Error]\x20','API\x20Request','EeNJq'];_0x8680=function(){return _0x19c011;};return _0x8680();}function _0x5322(_0x8680a0,_0x532249){_0x8680a0=_0x8680a0-0x0;const _0x38d416=_0x8680();let _0x45bfbe=_0x38d416[_0x8680a0];return _0x45bfbe;}export const logDebug=(_0x23fb56,_0x227e32)=>{const _0x427645={'ahFNv':function(_0x469865,_0x20f265){return _0x469865||_0x20f265;},'gcNxm':function(_0x4b9f34,_0x1a81ac){return _0x4b9f34===_0x1a81ac;},'DvZnq':_0x5322(0x1)};__DEV__&&(_0x427645[_0x5322(0x2)](_0x427645[_0x5322(0x3)],'eaIPO')?console[_0x5322(0x4)](_0x5322(0x5)+_0x23fb56+':',_0x227e32||''):_0x22c9e4['log']('[Onairos\x20Debug]\x20'+_0x3712a8+':',_0x427645[_0x5322(0x6)](_0x3401a2,'')));};export const logError=(_0x48c479,_0x1a0fb8)=>{const _0x3d85b9={'hKuay':function(_0x539568,_0x24de9a){return _0x539568!==_0x24de9a;}};__DEV__&&(_0x3d85b9[_0x5322(0x7)]('eYKMt','eYKMt')?_0x5b37d5[_0x5322(0x8)](_0x5322(0x9)+_0x8eb5bf+':',_0x3069f3):console[_0x5322(0x8)]('[Onairos\x20Error]\x20'+_0x48c479+':',_0x1a0fb8));};export const isDebugMode=_0xfe088f=>{return _0xfe088f===!![]||__DEV__;};export const logApiRequest=(_0x4af1ec,_0x3ba35f,_0x2ad93e)=>{const _0x45320e={'EeNJq':function(_0x446917,_0x2d9f92){return _0x446917||_0x2d9f92;}};__DEV__&&logDebug(_0x5322(0xa),{'method':_0x4af1ec,'url':_0x3ba35f,'data':_0x45320e[_0x5322(0xb)](_0x2ad93e,{})});};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{onairosApi}from'../api';export const encryptModelKey=(
|
|
1
|
+
import{onairosApi}from'../api';export const encryptModelKey=(_0x6d0ad8,_0x24928d)=>{const _0x58c8b4={'RaZlU':'Encrypting\x20model\x20key','dvZIx':'Public\x20key\x20or\x20model\x20key\x20is\x20missing','gQkrX':function(_0xaf5c09,_0x255cad){return _0xaf5c09||_0x255cad;},'nHHdw':_0x34a1(0x0),'QtZyO':_0x34a1(0x1)};try{console[_0x34a1(0x2)]('Encrypting\x20model\x20key');if(_0x58c8b4[_0x34a1(0x3)](!_0x6d0ad8,!_0x24928d)){if(_0x58c8b4['nHHdw']!==_0x58c8b4[_0x34a1(0x4)]){_0x5677e4['log'](_0x58c8b4[_0x34a1(0x5)]);if(!_0x5cf429||!_0xa5b43a)throw new _0x85be9c(_0x58c8b4['dvZIx']);return'encrypted_'+_0xa585db+'_'+_0x386586[_0x34a1(0x6)]();}else throw new Error(_0x58c8b4[_0x34a1(0x7)]);}return _0x34a1(0x8)+_0x24928d+'_'+Date[_0x34a1(0x6)]();}catch(_0x554dec){console[_0x34a1(0x9)](_0x58c8b4['QtZyO'],_0x554dec);throw _0x554dec;}};function _0x55ab(){const _0x2a2e01=['EOCcg','Error\x20encrypting\x20model\x20key:','log','gQkrX','nHHdw','RaZlU','now','dvZIx','encrypted_','error','public/getPublicKey','bFCox','No\x20public\x20key\x20found\x20in\x20response','Error\x20getting\x20server\x20public\x20key:','get','XbOnV','WEhCv','data','vOhye','publicKey','cmlKu','dnAlW','pUuBD','yvIvP','JclRo','wJaSD','mock_public_key_for_testing','hash_','CzheZ','fallback_hash_'];_0x55ab=function(){return _0x2a2e01;};return _0x55ab();}function _0x34a1(_0x55ab5b,_0x34a1d4){_0x55ab5b=_0x55ab5b-0x0;const _0x6dbe8c=_0x55ab();let _0x51c725=_0x6dbe8c[_0x55ab5b];return _0x51c725;}export const getServerPublicKey=async()=>{const _0x4df74b={'XbOnV':_0x34a1(0xa),'WEhCv':function(_0x14a39e,_0x545866){return _0x14a39e!==_0x545866;},'vOhye':function(_0xe97de0,_0x144f9d){return _0xe97de0!==_0x144f9d;},'ygtFL':function(_0x60d774,_0xa1b760){return _0x60d774!==_0xa1b760;},'cmlKu':function(_0x2e0ab2,_0x548156){return _0x2e0ab2===_0x548156;},'pUuBD':_0x34a1(0xb),'yvIvP':function(_0xbc72d8,_0x3d64ff){return _0xbc72d8!==_0x3d64ff;},'JclRo':_0x34a1(0xc),'wJaSD':_0x34a1(0xd)};try{var _0x45879e,_0x28036f;const _0x464232=await onairosApi[_0x34a1(0xe)](_0x4df74b[_0x34a1(0xf)]);if(_0x464232!==null&&_0x464232!==void 0x0&&_0x4df74b[_0x34a1(0x10)](_0x45879e=_0x464232[_0x34a1(0x11)],null)&&_0x4df74b[_0x34a1(0x12)](_0x45879e,void 0x0)&&_0x4df74b['ygtFL'](_0x45879e=_0x45879e['data'],null)&&_0x45879e!==void 0x0&&_0x45879e[_0x34a1(0x13)]){if(_0x4df74b[_0x34a1(0x14)](_0x34a1(0x15),_0x4df74b[_0x34a1(0x16)]))throw new _0xfb012b('No\x20public\x20key\x20found\x20in\x20response');else return _0x464232[_0x34a1(0x11)][_0x34a1(0x11)]['publicKey'];}else{if(_0x464232!==null&&_0x464232!==void 0x0&&(_0x28036f=_0x464232['data'])!==null&&_0x4df74b[_0x34a1(0x17)](_0x28036f,void 0x0)&&_0x28036f[_0x34a1(0x13)])return _0x464232[_0x34a1(0x11)][_0x34a1(0x13)];else throw new Error(_0x4df74b[_0x34a1(0x18)]);}}catch(_0x50cb12){return console['error'](_0x4df74b[_0x34a1(0x19)],_0x50cb12),_0x34a1(0x1a);}};export const hashString=async _0x234b17=>{const _0x4116bf={'CzheZ':'Error\x20hashing\x20string:'};try{return _0x34a1(0x1b)+_0x234b17['replace'](/\s+/g,'_')+'_'+Date[_0x34a1(0x6)]();}catch(_0x4f8967){return console[_0x34a1(0x9)](_0x4116bf[_0x34a1(0x1c)],_0x4f8967),_0x34a1(0x1d)+Date[_0x34a1(0x6)]();}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x36f8(){const _0x3cf656=['qlvgp','mXkwq','rnWUx','VMqoo','wLlAC','charAt','conOa','random','length','kqqLH','VkJwM','LiNZc','DYZeh','ciPLF','trim','XqxdO','toUpperCase','replace','split','filter','ohVBV','PlJQj','sJfAc','HuuQO','getFullYear','getMonth','getDate','iEjem','OaCvy','fScbR','slice','map','substring','cjnEl','iCumM','pxRgY','nRGpr','setHours','getTime','ceil','hKOnS','LXidm','hpPpY','Event\x20code\x20is\x20required','Event\x20code\x20must\x20be\x20at\x20least\x203\x20characters','FFPXz','UofgK','Event\x20code\x20must\x20be\x2010\x20characters\x20or\x20less','qMIzz','Event\x20code\x20must\x20contain\x20only\x20letters\x20and\x20numbers','FDsnH','gFcOa','CTEHq','fSYzJ','PdwJK','CcSbj','ZySMr','GjDgW','BPOkx','kQWNo','floor','vxNaJ','fIkCw','en-US','numeric','long','toLocaleDateString','tCSoB','qjPlY','GasHo','ptpQN','atxfn','nCnKc','DThtl','gZDTA','Npxiw','VmqUE','ETaRi','isActive','eventDate','zcsVy','WeALL','mYPqC','mhbFj','FxdfX','Upcoming','Inactive','FaCwx','TweBO','FgaFa','IOXHs','BmrYF','RqxAg','QxyGn','jLPbN','FlPQs','flatMap','tags','eGCbY','eotvC','elHvs','sort','VqVbA','TAJai','QnafP','Mstfq','SylyQ','NSoRM','UaRaJ','uKuPZ','gXOIE','oXXdp','soHqG','uosuN','IacKT','MFCut','reduce','attendeeCount','maxAttendees','eMeFR','round','oZJQd','toLowerCase','title','description','includes','code','hjdKJ','location','GfhmJ','from','OskTG','zaZqB','egnWu','ZLfvd'];_0x36f8=function(){return _0x3cf656;};return _0x36f8();}export const generateEventCode=(_0x14198a=0x6)=>{const _0x4a9f70={'mXkwq':'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789','rnWUx':function(_0x5546d2,_0x533b6e){return _0x5546d2<_0x533b6e;},'VMqoo':function(_0x895a09,_0x4c8124){return _0x895a09!==_0x4c8124;},'wLlAC':_0x3f09(0x0),'conOa':function(_0x2f19e8,_0x5818b4){return _0x2f19e8*_0x5818b4;}},_0x250c1f=_0x4a9f70[_0x3f09(0x1)];let _0x1f671d='';for(let _0x4fba7d=0x0;_0x4a9f70[_0x3f09(0x2)](_0x4fba7d,_0x14198a);_0x4fba7d++){if(_0x4a9f70[_0x3f09(0x3)]('wIeiT',_0x4a9f70[_0x3f09(0x4)]))_0x1f671d+=_0x250c1f[_0x3f09(0x5)](Math['floor'](_0x4a9f70[_0x3f09(0x6)](Math[_0x3f09(0x7)](),_0x250c1f[_0x3f09(0x8)])));else return _0x130e0a;}return _0x1f671d;};export const generateSmartEventCode=_0x26590e=>{const _0x595499={'HuuQO':function(_0x3c45bd,_0x442d62){return _0x3c45bd===_0x442d62;},'RWIBm':function(_0x3f07ab,_0x5c1df4){return _0x3f07ab===_0x5c1df4;},'nRGpr':function(_0x406101,_0x22b804){return _0x406101-_0x22b804;},'hKOnS':function(_0x51321f,_0x26ab99){return _0x51321f/_0x26ab99;},'LXidm':function(_0x2a275e,_0x4bedcd){return _0x2a275e*_0x4bedcd;},'XqxdO':function(_0x316774){return _0x316774();},'ohVBV':function(_0x1b56cd,_0x425518){return _0x1b56cd!==_0x425518;},'PlJQj':_0x3f09(0x9),'sJfAc':_0x3f09(0xa),'xxInq':function(_0x55f28a){return _0x55f28a();},'iEjem':function(_0x2c76c1,_0x4344e6){return _0x2c76c1>=_0x4344e6;},'OaCvy':_0x3f09(0xb),'fScbR':_0x3f09(0xc),'cjnEl':function(_0x4e066e,_0x4df7eb){return _0x4e066e<_0x4df7eb;},'iCumM':_0x3f09(0xd),'pxRgY':function(_0x23133a,_0x1b683d){return _0x23133a(_0x1b683d);},'hpPpY':function(_0x35bafa,_0x29590c){return _0x35bafa>_0x29590c;}};if(!_0x26590e[_0x3f09(0xe)]())return _0x595499[_0x3f09(0xf)](generateEventCode);const _0x32f418=_0x26590e['trim']()[_0x3f09(0x10)]()[_0x3f09(0x11)](/[^A-Z0-9\s]/g,'')[_0x3f09(0x12)](/\s+/)[_0x3f09(0x13)](_0x2e16bf=>_0x2e16bf[_0x3f09(0x8)]>0x0);if(_0x32f418['length']===0x0){if(_0x595499[_0x3f09(0x14)](_0x595499[_0x3f09(0x15)],_0x595499[_0x3f09(0x16)]))return _0x595499['xxInq'](generateEventCode);else try{const _0x2523ec=new _0x218836(),_0x1d48ce=new _0x27971c(_0x433513);return _0x595499[_0x3f09(0x17)](_0x2523ec[_0x3f09(0x18)](),_0x1d48ce[_0x3f09(0x18)]())&&_0x595499[_0x3f09(0x17)](_0x2523ec[_0x3f09(0x19)](),_0x1d48ce[_0x3f09(0x19)]())&&_0x595499['RWIBm'](_0x2523ec[_0x3f09(0x1a)](),_0x1d48ce[_0x3f09(0x1a)]());}catch(_0x5ed51c){return![];}}let _0x3056f1='';if(_0x595499[_0x3f09(0x1b)](_0x32f418[_0x3f09(0x8)],0x2)){if(_0x595499['HuuQO'](_0x595499[_0x3f09(0x1c)],_0x595499[_0x3f09(0x1d)])){const _0x6b0f=_0x1e8575[_0x3f09(0x1e)](0x0,0x3);_0x3675cd=_0x6b0f[_0x3f09(0x1f)](_0x39ed55=>_0x39ed55[_0x3f09(0x20)](0x0,0x2))['join']('');}else{const _0x4d68c7=_0x32f418['slice'](0x0,0x3);_0x3056f1=_0x4d68c7[_0x3f09(0x1f)](_0x2470dc=>_0x2470dc['substring'](0x0,0x2))['join']('');}}else _0x3056f1=_0x32f418[0x0]['substring'](0x0,0x4);const _0x522fea=new Date()[_0x3f09(0x18)]()['toString']()[_0x3f09(0x1e)](-0x2);_0x3056f1+=_0x522fea;if(_0x595499[_0x3f09(0x21)](_0x3056f1[_0x3f09(0x8)],0x4)){if(_0x595499[_0x3f09(0x17)](_0x595499['iCumM'],_0x595499[_0x3f09(0x22)]))_0x3056f1+=_0x595499[_0x3f09(0x23)](generateEventCode,_0x595499[_0x3f09(0x24)](0x4,_0x3056f1[_0x3f09(0x8)]));else{const _0x428c5a=new _0x2965cb(),_0xacd88=new _0x14ad8d(_0x165175);_0x428c5a[_0x3f09(0x25)](0x0,0x0,0x0,0x0),_0xacd88[_0x3f09(0x25)](0x0,0x0,0x0,0x0);const _0x31cf74=_0x595499[_0x3f09(0x24)](_0xacd88[_0x3f09(0x26)](),_0x428c5a[_0x3f09(0x26)]()),_0x1343b2=_0x182cc1[_0x3f09(0x27)](_0x595499[_0x3f09(0x28)](_0x31cf74,_0x595499[_0x3f09(0x29)](_0x595499[_0x3f09(0x29)](0x3e8,0x3c)*0x3c,0x18)));return _0x1343b2;}}else _0x595499[_0x3f09(0x2a)](_0x3056f1[_0x3f09(0x8)],0x8)&&(_0x3056f1=_0x3056f1[_0x3f09(0x20)](0x0,0x8));return _0x3056f1;};export const validateEventCode=_0x269f58=>{const _0x4a481e={'ZySMr':function(_0x52324d,_0x398d7d){return _0x52324d<_0x398d7d;},'kQWNo':'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789','vxNaJ':function(_0x4269a5,_0x474731){return _0x4269a5*_0x474731;},'FDsnH':_0x3f09(0x2b),'gFcOa':_0x3f09(0x2c),'CTEHq':function(_0x835161,_0x1d59f2){return _0x835161>_0x1d59f2;},'fSYzJ':_0x3f09(0x2d),'PdwJK':_0x3f09(0x2e),'CcSbj':_0x3f09(0x2f),'GjDgW':function(_0x562ff4,_0xf8587e){return _0x562ff4===_0xf8587e;},'SuSkt':_0x3f09(0x30),'BPOkx':'XDAHF','fIkCw':_0x3f09(0x31)};if(!_0x269f58||!_0x269f58[_0x3f09(0xe)]())return{'isValid':![],'error':_0x4a481e[_0x3f09(0x32)]};const _0xc1934b=_0x269f58[_0x3f09(0xe)]()[_0x3f09(0x10)]();if(_0xc1934b[_0x3f09(0x8)]<0x3)return{'isValid':![],'error':_0x4a481e[_0x3f09(0x33)]};if(_0x4a481e[_0x3f09(0x34)](_0xc1934b[_0x3f09(0x8)],0xa)){if(_0x4a481e[_0x3f09(0x35)]!==_0x4a481e[_0x3f09(0x36)])return{'isValid':![],'error':_0x4a481e[_0x3f09(0x37)]};else try{const _0x2532c7=new _0x5f41b1(),_0x20cc1c=new _0x84178a(_0x14414f);return _0x2532c7[_0x3f09(0x25)](0x0,0x0,0x0,0x0),_0x20cc1c['setHours'](0x0,0x0,0x0,0x0),_0x4a481e[_0x3f09(0x38)](_0x20cc1c,_0x2532c7);}catch(_0x196fc4){return![];}}if(!/^[A-Z0-9]+$/['test'](_0xc1934b)){if(_0x4a481e[_0x3f09(0x39)](_0x4a481e['SuSkt'],_0x4a481e[_0x3f09(0x3a)])){const _0x38a5f5=_0x4a481e[_0x3f09(0x3b)];let _0x59995a='';for(let _0x43c75f=0x0;_0x4a481e['ZySMr'](_0x43c75f,_0x4f837b);_0x43c75f++){_0x59995a+=_0x38a5f5['charAt'](_0x5ced84[_0x3f09(0x3c)](_0x4a481e[_0x3f09(0x3d)](_0x234597[_0x3f09(0x7)](),_0x38a5f5['length'])));}return _0x59995a;}else return{'isValid':![],'error':_0x4a481e[_0x3f09(0x3e)]};}return{'isValid':!![]};};export const formatEventDate=_0x575959=>{const _0x14b9f1={'KYEbE':_0x3f09(0x3f),'tCSoB':_0x3f09(0x40),'iNNbp':_0x3f09(0x41)};try{const _0x33eec7=new Date(_0x575959);return _0x33eec7[_0x3f09(0x42)](_0x14b9f1['KYEbE'],{'weekday':'long','year':_0x14b9f1['tCSoB'],'month':_0x14b9f1['iNNbp'],'day':_0x14b9f1[_0x3f09(0x43)]});}catch(_0x5c530b){return _0x575959;}};export const isEventToday=_0x43d75b=>{const _0x314437={'qjPlY':function(_0x19eec5,_0x4bdf12){return _0x19eec5===_0x4bdf12;}};try{const _0x50f81c=new Date(),_0x13af42=new Date(_0x43d75b);return _0x50f81c[_0x3f09(0x18)]()===_0x13af42[_0x3f09(0x18)]()&&_0x314437[_0x3f09(0x44)](_0x50f81c[_0x3f09(0x19)](),_0x13af42[_0x3f09(0x19)]())&&_0x314437['qjPlY'](_0x50f81c['getDate'](),_0x13af42[_0x3f09(0x1a)]());}catch(_0x1609ed){return![];}};function _0x3f09(_0x36f82c,_0x3f0966){_0x36f82c=_0x36f82c-0x0;const _0x1a58f3=_0x36f8();let _0x15ea83=_0x1a58f3[_0x36f82c];return _0x15ea83;}export const isEventPast=_0x55c62f=>{const _0x440e54={'VmqUE':function(_0xcc84dd,_0x1dde38){return _0xcc84dd<_0x1dde38;},'YLode':function(_0x58a826,_0x489b01){return _0x58a826<_0x489b01;},'ETaRi':function(_0x52992a,_0x42927a){return _0x52992a&&_0x42927a;},'nCnKc':_0x3f09(0x45),'DThtl':_0x3f09(0x46),'gZDTA':function(_0x389095,_0x553c61){return _0x389095!==_0x553c61;},'Npxiw':_0x3f09(0x47)};try{if(_0x440e54[_0x3f09(0x48)]===_0x440e54[_0x3f09(0x49)])return _0xb246a3['getTime']()-_0x26421d[_0x3f09(0x26)]();else{const _0x3defba=new Date(),_0x2be809=new Date(_0x55c62f);return _0x3defba['setHours'](0x0,0x0,0x0,0x0),_0x2be809[_0x3f09(0x25)](0x0,0x0,0x0,0x0),_0x2be809<_0x3defba;}}catch(_0x110717){if(_0x440e54[_0x3f09(0x4a)](_0x440e54[_0x3f09(0x4b)],'atxfn')){const _0x479908={'zcsVy':function(_0x478f78,_0x226397){return _0x440e54[_0x3f09(0x4c)](_0x478f78,_0x226397);},'WeALL':function(_0x42cb4b,_0x29ea04){return _0x440e54['YLode'](_0x42cb4b,_0x29ea04);},'mYPqC':function(_0x26b0d1,_0x49c66f){return _0x440e54[_0x3f09(0x4d)](_0x26b0d1,_0x49c66f);}};return _0x2aba94['sort']((_0x53a1a6,_0x16c1be)=>{if(_0x53a1a6['isActive']&&!_0x16c1be['isActive'])return-0x1;if(!_0x53a1a6[_0x3f09(0x4e)]&&_0x16c1be[_0x3f09(0x4e)])return 0x1;const _0x475b6c=new _0x675878(_0x53a1a6[_0x3f09(0x4f)]),_0x21e12d=new _0x3776f9(_0x16c1be[_0x3f09(0x4f)]),_0x2bf70d=new _0x2c1b79(),_0x2e6bc5=_0x479908[_0x3f09(0x50)](_0x475b6c,_0x2bf70d),_0x50af10=_0x479908[_0x3f09(0x51)](_0x21e12d,_0x2bf70d);if(_0x2e6bc5&&!_0x50af10)return 0x1;if(_0x479908[_0x3f09(0x52)](!_0x2e6bc5,_0x50af10))return-0x1;return _0x479908[_0x3f09(0x52)](_0x2e6bc5,_0x50af10)?_0x21e12d[_0x3f09(0x26)]()-_0x475b6c[_0x3f09(0x26)]():_0x475b6c['getTime']()-_0x21e12d[_0x3f09(0x26)]();});}else return![];}};export const getEventStatus=(_0x275250,_0x1147db)=>{const _0x56f974={'DWibH':function(_0x5b6dc3,_0x31f5f7){return _0x5b6dc3===_0x31f5f7;},'RqxAg':function(_0x4f2201,_0x418136){return _0x4f2201===_0x418136;},'vtnfp':function(_0x4dd78e,_0x3b1d1a){return _0x4dd78e(_0x3b1d1a);},'FaCwx':_0x3f09(0x53),'gvHrz':'Past','TweBO':function(_0x21d994,_0x572ec1){return _0x21d994(_0x572ec1);},'FgaFa':function(_0x3ef428,_0x27b9a7){return _0x3ef428===_0x27b9a7;},'IOXHs':_0x3f09(0x54),'BmrYF':'Today','QxyGn':_0x3f09(0x55)};if(!_0x1147db)return _0x3f09(0x56);if(_0x56f974['vtnfp'](isEventPast,_0x275250))return _0x56f974['FaCwx']===_0x56f974[_0x3f09(0x57)]?_0x56f974['gvHrz']:![];if(_0x56f974[_0x3f09(0x58)](isEventToday,_0x275250)){if(_0x56f974[_0x3f09(0x59)](_0x56f974['IOXHs'],_0x56f974[_0x3f09(0x5a)]))return _0x56f974[_0x3f09(0x5b)];else{const _0x5a9792=new _0x29874e(),_0x48cbfe=new _0x1e946c(_0x579cee);return _0x56f974['DWibH'](_0x5a9792['getFullYear'](),_0x48cbfe[_0x3f09(0x18)]())&&_0x5a9792[_0x3f09(0x19)]()===_0x48cbfe[_0x3f09(0x19)]()&&_0x56f974[_0x3f09(0x5c)](_0x5a9792['getDate'](),_0x48cbfe[_0x3f09(0x1a)]());}}return _0x56f974[_0x3f09(0x5d)];};export const getDaysUntilEvent=_0x5b7f1c=>{const _0x444979={'FlPQs':_0x3f09(0x5e),'xMbbu':function(_0x321b4e,_0x5ac8c5){return _0x321b4e-_0x5ac8c5;},'eGCbY':function(_0x3b73cc,_0x41a1df){return _0x3b73cc/_0x41a1df;},'eotvC':function(_0x26b2be,_0x2a69aa){return _0x26b2be*_0x2a69aa;}};try{if(_0x444979[_0x3f09(0x5f)]!==_0x444979[_0x3f09(0x5f)]){const _0x340f08=_0x8a695a[_0x3f09(0x60)](_0x460a99=>_0x460a99[_0x3f09(0x61)]||[]);return _0xd37dce['from'](new _0x22d137(_0x340f08))['sort']();}else{const _0xcbe867=new Date(),_0x293289=new Date(_0x5b7f1c);_0xcbe867[_0x3f09(0x25)](0x0,0x0,0x0,0x0),_0x293289['setHours'](0x0,0x0,0x0,0x0);const _0x598888=_0x444979['xMbbu'](_0x293289[_0x3f09(0x26)](),_0xcbe867[_0x3f09(0x26)]()),_0xe17526=Math[_0x3f09(0x27)](_0x444979[_0x3f09(0x62)](_0x598888,_0x444979[_0x3f09(0x63)](0x3e8*0x3c*0x3c,0x18)));return _0xe17526;}}catch(_0x5a40b6){return 0x0;}};export const sortEventsByDate=_0x59d99c=>{const _0x2afadd={'VqVbA':_0x3f09(0x2b),'TAJai':function(_0x1ade50,_0x5b62fc){return _0x1ade50<_0x5b62fc;},'QnafP':function(_0x1a6d9e,_0x4b3771){return _0x1a6d9e<_0x4b3771;},'Mstfq':function(_0xabe44a,_0x577e9c){return _0xabe44a&&_0x577e9c;},'PtALb':function(_0x958c6c,_0x218bd4){return _0x958c6c&&_0x218bd4;},'SylyQ':function(_0x3706c4,_0x1b1274){return _0x3706c4&&_0x1b1274;},'NSoRM':function(_0x85703d,_0xe3ea71){return _0x85703d!==_0xe3ea71;},'uKuPZ':_0x3f09(0x64),'gXOIE':function(_0x3b3eb7,_0x64924e){return _0x3b3eb7-_0x64924e;},'soHqG':function(_0x37138d,_0x149648){return _0x37138d-_0x149648;}};return _0x59d99c[_0x3f09(0x65)]((_0x4a3c72,_0x5bac50)=>{const _0x35745d={'oXXdp':_0x2afadd[_0x3f09(0x66)]};if(_0x4a3c72[_0x3f09(0x4e)]&&!_0x5bac50[_0x3f09(0x4e)])return-0x1;if(!_0x4a3c72[_0x3f09(0x4e)]&&_0x5bac50['isActive'])return 0x1;const _0x31db94=new Date(_0x4a3c72['eventDate']),_0x3a03b9=new Date(_0x5bac50[_0x3f09(0x4f)]),_0x1f7d11=new Date(),_0x29215c=_0x2afadd[_0x3f09(0x67)](_0x31db94,_0x1f7d11),_0x4e49bf=_0x2afadd[_0x3f09(0x68)](_0x3a03b9,_0x1f7d11);if(_0x2afadd[_0x3f09(0x69)](_0x29215c,!_0x4e49bf))return 0x1;if(_0x2afadd['PtALb'](!_0x29215c,_0x4e49bf))return-0x1;return _0x2afadd[_0x3f09(0x6a)](_0x29215c,_0x4e49bf)?_0x2afadd[_0x3f09(0x6b)](_0x3f09(0x6c),_0x2afadd[_0x3f09(0x6d)])?_0x2afadd[_0x3f09(0x6e)](_0x3a03b9[_0x3f09(0x26)](),_0x31db94[_0x3f09(0x26)]()):{'isValid':![],'error':_0x35745d[_0x3f09(0x6f)]}:_0x2afadd[_0x3f09(0x70)](_0x31db94[_0x3f09(0x26)](),_0x3a03b9[_0x3f09(0x26)]());});};export const filterEventsBySearch=(_0x2c173e,_0x301b02)=>{const _0x37c231={'eMeFR':function(_0x5458e2,_0x51c73c){return _0x5458e2>_0x51c73c;},'oZJQd':function(_0x353936,_0x5599d9){return _0x353936*_0x5599d9;},'hjdKJ':function(_0x42b9d2,_0x2773f){return _0x42b9d2===_0x2773f;},'GfhmJ':function(_0x2e1d6a,_0x2cc16c){return _0x2e1d6a===_0x2cc16c;},'IacKT':_0x3f09(0x71),'MFCut':'VvQoR'};if(!_0x301b02['trim']()){if(_0x37c231[_0x3f09(0x72)]!==_0x37c231[_0x3f09(0x73)])return _0x2c173e;else{const _0x9c8dd9=_0x211379[_0x3f09(0x8)],_0x5acf27=_0x28909d[_0x3f09(0x13)](_0x56d799=>_0x56d799[_0x3f09(0x4e)])[_0x3f09(0x8)],_0x2ce260=_0x9c8dd9-_0x5acf27,_0x11c77f=_0x78c3f4[_0x3f09(0x74)]((_0x34b481,_0x150668)=>_0x34b481+_0x150668[_0x3f09(0x75)],0x0),_0x4d9b8d=_0x468f10['reduce']((_0x122d8c,_0xa649b8)=>_0x122d8c+_0xa649b8[_0x3f09(0x76)],0x0),_0x214a66=_0xc6d8f5[_0x3f09(0x13)](_0x436f83=>_0x436f83[_0x3f09(0x4e)]&&!_0x582a2e(_0x436f83[_0x3f09(0x4f)]))[_0x3f09(0x8)],_0x5b2801=_0x157155['filter'](_0x10b362=>_0x2b06e6(_0x10b362[_0x3f09(0x4f)]))[_0x3f09(0x8)],_0x54085a=_0x19b166[_0x3f09(0x13)](_0x5c5a52=>_0x5c5a52[_0x3f09(0x4e)]&&_0x5c709e(_0x5c5a52['eventDate']))['length'];return{'total':_0x9c8dd9,'active':_0x5acf27,'inactive':_0x2ce260,'upcoming':_0x214a66,'past':_0x5b2801,'today':_0x54085a,'totalAttendees':_0x11c77f,'totalCapacity':_0x4d9b8d,'averageAttendance':_0x37c231[_0x3f09(0x77)](_0x4d9b8d,0x0)?_0x50b97f[_0x3f09(0x78)](_0x37c231[_0x3f09(0x79)](_0x11c77f/_0x4d9b8d,0x64)):0x0};}}const _0x1a65c5=_0x301b02[_0x3f09(0x7a)]()['trim']();return _0x2c173e[_0x3f09(0x13)](_0x199f8d=>{var _0x2b8218,_0x5f1525,_0x4cc523;return _0x199f8d[_0x3f09(0x7b)]['toLowerCase']()['includes'](_0x1a65c5)||_0x199f8d[_0x3f09(0x7c)][_0x3f09(0x7a)]()[_0x3f09(0x7d)](_0x1a65c5)||_0x199f8d[_0x3f09(0x7e)][_0x3f09(0x7a)]()['includes'](_0x1a65c5)||(_0x37c231[_0x3f09(0x7f)](_0x2b8218=_0x199f8d[_0x3f09(0x80)],null)||_0x37c231[_0x3f09(0x7f)](_0x2b8218,void 0x0)?void 0x0:_0x2b8218[_0x3f09(0x7a)]()[_0x3f09(0x7d)](_0x1a65c5))||((_0x5f1525=_0x199f8d['organizer'])===null||_0x37c231[_0x3f09(0x7f)](_0x5f1525,void 0x0)?void 0x0:_0x5f1525[_0x3f09(0x7a)]()[_0x3f09(0x7d)](_0x1a65c5))||(_0x37c231[_0x3f09(0x7f)](_0x4cc523=_0x199f8d[_0x3f09(0x61)],null)||_0x37c231[_0x3f09(0x81)](_0x4cc523,void 0x0)?void 0x0:_0x4cc523['some'](_0x5c42ca=>_0x5c42ca['toLowerCase']()[_0x3f09(0x7d)](_0x1a65c5)));});};export const getUniqueEventTags=_0x1e2e53=>{const _0x245a86=_0x1e2e53[_0x3f09(0x60)](_0x12bac4=>_0x12bac4[_0x3f09(0x61)]||[]);return Array[_0x3f09(0x82)](new Set(_0x245a86))[_0x3f09(0x65)]();};export const calculateEventStats=_0x1aaed6=>{const _0x5953fa={'OskTG':function(_0x181131,_0x340260){return _0x181131-_0x340260;},'zaZqB':function(_0x1e4290,_0x5b4cdf){return _0x1e4290>_0x5b4cdf;},'egnWu':function(_0x527bfe,_0x86190){return _0x527bfe*_0x86190;},'ZLfvd':function(_0x24b8cb,_0x51238d){return _0x24b8cb/_0x51238d;}},_0x5f3279=_0x1aaed6[_0x3f09(0x8)],_0x8c892f=_0x1aaed6[_0x3f09(0x13)](_0x124fac=>_0x124fac[_0x3f09(0x4e)])['length'],_0x35e3d9=_0x5953fa[_0x3f09(0x83)](_0x5f3279,_0x8c892f),_0x17ca21=_0x1aaed6[_0x3f09(0x74)]((_0x2ea55a,_0x195fe4)=>_0x2ea55a+_0x195fe4[_0x3f09(0x75)],0x0),_0x2a42c9=_0x1aaed6['reduce']((_0x598bb4,_0x2c9d60)=>_0x598bb4+_0x2c9d60['maxAttendees'],0x0),_0x3d261c=_0x1aaed6[_0x3f09(0x13)](_0xab209=>_0xab209[_0x3f09(0x4e)]&&!isEventPast(_0xab209['eventDate']))[_0x3f09(0x8)],_0x4cc2b1=_0x1aaed6[_0x3f09(0x13)](_0x39ccbe=>isEventPast(_0x39ccbe[_0x3f09(0x4f)]))['length'],_0x3d0e85=_0x1aaed6['filter'](_0x5021f3=>_0x5021f3[_0x3f09(0x4e)]&&isEventToday(_0x5021f3[_0x3f09(0x4f)]))[_0x3f09(0x8)];return{'total':_0x5f3279,'active':_0x8c892f,'inactive':_0x35e3d9,'upcoming':_0x3d261c,'past':_0x4cc2b1,'today':_0x3d0e85,'totalAttendees':_0x17ca21,'totalCapacity':_0x2a42c9,'averageAttendance':_0x5953fa[_0x3f09(0x84)](_0x2a42c9,0x0)?Math[_0x3f09(0x78)](_0x5953fa[_0x3f09(0x85)](_0x5953fa[_0x3f09(0x86)](_0x17ca21,_0x2a42c9),0x64)):0x0};};
|
|
1
|
+
export const generateEventCode=(_0x2e80ba=0x6)=>{const _0x2065a6={'byzRU':'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789','ZdlAP':function(_0x1bae0b,_0x40d269){return _0x1bae0b<_0x40d269;}},_0x3b2ece=_0x2065a6[_0x31fa(0x0)];let _0x3b7cd2='';for(let _0x10f99d=0x0;_0x2065a6[_0x31fa(0x1)](_0x10f99d,_0x2e80ba);_0x10f99d++){_0x3b7cd2+=_0x3b2ece[_0x31fa(0x2)](Math[_0x31fa(0x3)](Math[_0x31fa(0x4)]()*_0x3b2ece[_0x31fa(0x5)]));}return _0x3b7cd2;};export const generateSmartEventCode=_0x4e16a5=>{const _0xfbd8a5={'ESeGd':function(_0x327595){return _0x327595();},'ccDJt':function(_0x2d31ff,_0x4baea2){return _0x2d31ff===_0x4baea2;},'SVFrW':function(_0x46125a,_0x15b33e){return _0x46125a===_0x15b33e;},'FCarx':function(_0x52c886){return _0x52c886();},'FwGTI':function(_0x38b57e,_0x3c6360){return _0x38b57e===_0x3c6360;},'dzKYe':function(_0x55b12a,_0x1e23a1){return _0x55b12a>=_0x1e23a1;},'NSNuL':_0x31fa(0x6),'UjiEk':function(_0x39fca7,_0x103e3c){return _0x39fca7===_0x103e3c;},'KBapr':_0x31fa(0x7),'QIImx':function(_0x5bdea4,_0x1ea87c){return _0x5bdea4!==_0x1ea87c;},'HLIrV':_0x31fa(0x8),'WaVzZ':function(_0x20d2fd,_0x922013){return _0x20d2fd(_0x922013);},'Ixbls':function(_0x50c459,_0x48752d){return _0x50c459-_0x48752d;},'RpWZt':function(_0x43901e,_0x2b79dc){return _0x43901e>_0x2b79dc;}};if(!_0x4e16a5[_0x31fa(0x9)]())return _0xfbd8a5[_0x31fa(0xa)](generateEventCode);const _0x538fda=_0x4e16a5[_0x31fa(0x9)]()['toUpperCase']()[_0x31fa(0xb)](/[^A-Z0-9\s]/g,'')['split'](/\s+/)[_0x31fa(0xc)](_0x6a3ad8=>_0x6a3ad8[_0x31fa(0x5)]>0x0);if(_0xfbd8a5[_0x31fa(0xd)](_0x538fda[_0x31fa(0x5)],0x0)){if(_0x31fa(0xe)!==_0x31fa(0xe)){const _0x4ad9ec=_0x3ca36d[_0x31fa(0xf)](0x0,0x3);_0x1bd2d4=_0x4ad9ec['map'](_0x4609a9=>_0x4609a9[_0x31fa(0x10)](0x0,0x2))['join']('');}else return generateEventCode();}let _0xadeafc='';if(_0xfbd8a5['dzKYe'](_0x538fda[_0x31fa(0x5)],0x2)){if(_0xfbd8a5[_0x31fa(0x11)]==='OXWWX'){const _0x31c2af=_0x538fda[_0x31fa(0xf)](0x0,0x3);_0xadeafc=_0x31c2af['map'](_0xb6d202=>_0xb6d202[_0x31fa(0x10)](0x0,0x2))[_0x31fa(0x12)]('');}else return _0xfbd8a5['ESeGd'](_0x1e1364);}else{if(_0xfbd8a5[_0x31fa(0x13)](_0x31fa(0x14),_0xfbd8a5[_0x31fa(0x15)]))return _0xb8ea96;else _0xadeafc=_0x538fda[0x0][_0x31fa(0x10)](0x0,0x4);}const _0x4daee7=new Date()['getFullYear']()['toString']()['slice'](-0x2);_0xadeafc+=_0x4daee7;if(_0xadeafc[_0x31fa(0x5)]<0x4){if(_0xfbd8a5[_0x31fa(0x16)](_0xfbd8a5['HLIrV'],_0xfbd8a5[_0x31fa(0x17)])){if(!_0x39925a[_0x31fa(0x9)]())return _0x5bd1d4;const _0x134371=_0x4a4388['toLowerCase']()[_0x31fa(0x9)]();return _0x3d6852['filter'](_0x6a696f=>{var _0x44f08c,_0x130942,_0x44199e;return _0x6a696f[_0x31fa(0x18)]['toLowerCase']()[_0x31fa(0x19)](_0x134371)||_0x6a696f[_0x31fa(0x1a)][_0x31fa(0x1b)]()[_0x31fa(0x19)](_0x134371)||_0x6a696f[_0x31fa(0x1c)][_0x31fa(0x1b)]()[_0x31fa(0x19)](_0x134371)||((_0x44f08c=_0x6a696f['location'])===null||_0x44f08c===void 0x0?void 0x0:_0x44f08c[_0x31fa(0x1b)]()[_0x31fa(0x19)](_0x134371))||((_0x130942=_0x6a696f['organizer'])===null||_0xfbd8a5[_0x31fa(0x1d)](_0x130942,void 0x0)?void 0x0:_0x130942[_0x31fa(0x1b)]()[_0x31fa(0x19)](_0x134371))||(_0xfbd8a5[_0x31fa(0x1d)](_0x44199e=_0x6a696f[_0x31fa(0x1e)],null)||_0xfbd8a5[_0x31fa(0x1f)](_0x44199e,void 0x0)?void 0x0:_0x44199e['some'](_0x2e1ec6=>_0x2e1ec6['toLowerCase']()[_0x31fa(0x19)](_0x134371)));});}else _0xadeafc+=_0xfbd8a5['WaVzZ'](generateEventCode,_0xfbd8a5[_0x31fa(0x20)](0x4,_0xadeafc[_0x31fa(0x5)]));}else _0xfbd8a5[_0x31fa(0x21)](_0xadeafc[_0x31fa(0x5)],0x8)&&(_0xadeafc=_0xadeafc[_0x31fa(0x10)](0x0,0x8));return _0xadeafc;};export const validateEventCode=_0x250cb4=>{const _0x4e8dc3={'lWQbF':function(_0x5add6f,_0x48e582){return _0x5add6f<_0x48e582;},'nHBra':_0x31fa(0x22),'FvpTW':function(_0x50dd91,_0x907c33){return _0x50dd91>_0x907c33;},'GNkFj':_0x31fa(0x23),'wZQmk':_0x31fa(0x24)};if(!_0x250cb4||!_0x250cb4['trim']())return{'isValid':![],'error':_0x31fa(0x25)};const _0x4d9fcb=_0x250cb4[_0x31fa(0x9)]()[_0x31fa(0x26)]();if(_0x4e8dc3[_0x31fa(0x27)](_0x4d9fcb[_0x31fa(0x5)],0x3))return{'isValid':![],'error':_0x4e8dc3[_0x31fa(0x28)]};if(_0x4e8dc3[_0x31fa(0x29)](_0x4d9fcb[_0x31fa(0x5)],0xa))return{'isValid':![],'error':_0x31fa(0x2a)};if(!/^[A-Z0-9]+$/[_0x31fa(0x2b)](_0x4d9fcb))return _0x4e8dc3[_0x31fa(0x2c)]===_0x4e8dc3[_0x31fa(0x2d)]?![]:{'isValid':![],'error':'Event\x20code\x20must\x20contain\x20only\x20letters\x20and\x20numbers'};return{'isValid':!![]};};export const formatEventDate=_0x120b92=>{const _0x4e5594={'MoUKZ':function(_0x1ac4bc,_0x1f7566){return _0x1ac4bc<_0x1f7566;},'kIbbO':function(_0x369fed,_0x1af3ff){return _0x369fed!==_0x1af3ff;},'kiEEj':_0x31fa(0x2e),'DAjXK':_0x31fa(0x2f),'dIIDu':_0x31fa(0x30),'HRYNa':_0x31fa(0x31)};try{if(_0x4e5594[_0x31fa(0x32)](_0x4e5594[_0x31fa(0x33)],_0x4e5594[_0x31fa(0x34)])){const _0x3a2046=new Date(_0x120b92);return _0x3a2046['toLocaleDateString'](_0x31fa(0x35),{'weekday':_0x31fa(0x31),'year':_0x4e5594['dIIDu'],'month':_0x4e5594['HRYNa'],'day':_0x31fa(0x30)});}else{const _0x2ae0af=new _0x36f623(),_0x3aeeaf=new _0x1a0589(_0x5206c3);return _0x2ae0af['setHours'](0x0,0x0,0x0,0x0),_0x3aeeaf[_0x31fa(0x36)](0x0,0x0,0x0,0x0),_0x4e5594[_0x31fa(0x37)](_0x3aeeaf,_0x2ae0af);}}catch(_0x29a6cb){return _0x120b92;}};function _0x31fa(_0x1c70eb,_0x31fa80){_0x1c70eb=_0x1c70eb-0x0;const _0xafd5b=_0x1c70();let _0x33a984=_0xafd5b[_0x1c70eb];return _0x33a984;}export const isEventToday=_0x119f29=>{const _0x10bfd0={'XlVpe':_0x31fa(0x35),'cmZWP':_0x31fa(0x31),'NrOvb':_0x31fa(0x30),'fdZfB':function(_0x360d34,_0x50453a){return _0x360d34!==_0x50453a;},'VYPPy':_0x31fa(0x38),'XVoFf':function(_0x15b8a4,_0xc236a1){return _0x15b8a4===_0xc236a1;},'xMZGk':function(_0x219ce6,_0x1ca373){return _0x219ce6===_0x1ca373;},'FGbTN':function(_0x36fd33,_0x107b65){return _0x36fd33===_0x107b65;},'iQtOV':function(_0x565c77,_0x1f460a){return _0x565c77===_0x1f460a;},'aaGoj':_0x31fa(0x39)};try{if(_0x10bfd0['fdZfB'](_0x10bfd0['VYPPy'],_0x10bfd0[_0x31fa(0x3a)])){const _0xe7b589=new _0x33b733(_0x2913e6);return _0xe7b589[_0x31fa(0x3b)](_0x10bfd0[_0x31fa(0x3c)],{'weekday':_0x10bfd0[_0x31fa(0x3d)],'year':_0x10bfd0[_0x31fa(0x3e)],'month':_0x31fa(0x31),'day':_0x31fa(0x30)});}else{const _0x2b4ba2=new Date(),_0x2faddf=new Date(_0x119f29);return _0x10bfd0[_0x31fa(0x3f)](_0x2b4ba2[_0x31fa(0x40)](),_0x2faddf[_0x31fa(0x40)]())&&_0x10bfd0['xMZGk'](_0x2b4ba2[_0x31fa(0x41)](),_0x2faddf[_0x31fa(0x41)]())&&_0x10bfd0[_0x31fa(0x42)](_0x2b4ba2['getDate'](),_0x2faddf[_0x31fa(0x43)]());}}catch(_0x4539c4){if(_0x10bfd0['iQtOV']('wXkTi',_0x10bfd0[_0x31fa(0x44)]))_0x3418cb=_0x4b7c70[_0x31fa(0x10)](0x0,0x8);else return![];}};export const isEventPast=_0x18fad2=>{const _0x8e4730={'uAFpX':_0x31fa(0x35),'BPrXw':_0x31fa(0x31),'gsqQf':'numeric','RUTFM':function(_0x57c79a,_0x1c90ff){return _0x57c79a!==_0x1c90ff;},'JYdes':_0x31fa(0x45)};try{if(_0x8e4730[_0x31fa(0x46)](_0x8e4730[_0x31fa(0x47)],_0x31fa(0x48))){const _0x16175e=new Date(),_0x441661=new Date(_0x18fad2);return _0x16175e[_0x31fa(0x36)](0x0,0x0,0x0,0x0),_0x441661['setHours'](0x0,0x0,0x0,0x0),_0x441661<_0x16175e;}else try{const _0x498179=new _0x1a4cf0(_0x1880ee);return _0x498179[_0x31fa(0x3b)](_0x8e4730[_0x31fa(0x49)],{'weekday':_0x8e4730[_0x31fa(0x4a)],'year':_0x31fa(0x30),'month':_0x31fa(0x31),'day':_0x8e4730[_0x31fa(0x4b)]});}catch(_0x19edda){return _0x28cbac;}}catch(_0x4d21f6){return![];}};export const getEventStatus=(_0xdec2e3,_0xfc7beb)=>{const _0x5b2333={'CWkLm':function(_0x221a14,_0x1e2886){return _0x221a14===_0x1e2886;},'ydUnQ':_0x31fa(0x4c),'YmxxB':_0x31fa(0x4d),'WDAzn':function(_0x4ae30e,_0x1dd015){return _0x4ae30e(_0x1dd015);},'oOMuK':_0x31fa(0x4e),'ClWkE':_0x31fa(0x4f),'XEyfy':'Today','KEiOZ':_0x31fa(0x50)};if(!_0xfc7beb)return _0x5b2333[_0x31fa(0x51)];if(isEventPast(_0xdec2e3))return _0x5b2333[_0x31fa(0x52)];if(_0x5b2333[_0x31fa(0x53)](isEventToday,_0xdec2e3)){if(_0x5b2333[_0x31fa(0x54)](_0x5b2333[_0x31fa(0x55)],_0x5b2333[_0x31fa(0x56)])){var _0x5a6085,_0x4919a1,_0x419c19;return _0x410577['title']['toLowerCase']()[_0x31fa(0x19)](_0x483360)||_0x52fa99['description'][_0x31fa(0x1b)]()['includes'](_0x5357eb)||_0x525c31['code']['toLowerCase']()[_0x31fa(0x19)](_0x18293b)||(_0x5b2333[_0x31fa(0x54)](_0x5a6085=_0x387e15['location'],null)||_0x5a6085===void 0x0?void 0x0:_0x5a6085['toLowerCase']()[_0x31fa(0x19)](_0x177368))||((_0x4919a1=_0x8f03cb[_0x31fa(0x57)])===null||_0x4919a1===void 0x0?void 0x0:_0x4919a1[_0x31fa(0x1b)]()[_0x31fa(0x19)](_0xac20a2))||(_0x5b2333[_0x31fa(0x54)](_0x419c19=_0x7e3174[_0x31fa(0x1e)],null)||_0x419c19===void 0x0?void 0x0:_0x419c19['some'](_0x1a5d77=>_0x1a5d77[_0x31fa(0x1b)]()['includes'](_0x3d16fc)));}else return _0x5b2333['XEyfy'];}return _0x5b2333[_0x31fa(0x58)];};export const getDaysUntilEvent=_0x291da2=>{const _0xf939de={'duepJ':function(_0x22010f,_0x4062e4){return _0x22010f===_0x4062e4;},'vgoxB':function(_0x2fd25a,_0xe2535c){return _0x2fd25a===_0xe2535c;},'BlCrC':function(_0x251b55,_0x1573f8){return _0x251b55===_0x1573f8;},'VYhQU':function(_0x4ede52,_0x5c3e64){return _0x4ede52!==_0x5c3e64;},'squZF':_0x31fa(0x59),'TtXWF':function(_0x17ac99,_0x415f5b){return _0x17ac99/_0x415f5b;},'FUXZA':function(_0x4444a4,_0x40bc10){return _0x4444a4*_0x40bc10;},'rNaTc':'tPxYX'};try{if(_0xf939de[_0x31fa(0x5a)](_0xf939de[_0x31fa(0x5b)],_0x31fa(0x5c))){const _0xa00a3c=new Date(),_0x46a8f4=new Date(_0x291da2);_0xa00a3c['setHours'](0x0,0x0,0x0,0x0),_0x46a8f4[_0x31fa(0x36)](0x0,0x0,0x0,0x0);const _0x160c37=_0x46a8f4[_0x31fa(0x5d)]()-_0xa00a3c['getTime'](),_0x46dfd3=Math[_0x31fa(0x5e)](_0xf939de[_0x31fa(0x5f)](_0x160c37,_0xf939de['FUXZA'](_0xf939de[_0x31fa(0x60)](_0xf939de[_0x31fa(0x60)](0x3e8,0x3c),0x3c),0x18)));return _0x46dfd3;}else{const _0x29a59f=_0x2779ed[_0x31fa(0x61)](_0x21a26d=>_0x21a26d[_0x31fa(0x1e)]||[]);return _0x2ba5c6[_0x31fa(0x62)](new _0x3ca8f6(_0x29a59f))[_0x31fa(0x63)]();}}catch(_0x4ce215){if(_0xf939de['VYhQU'](_0xf939de[_0x31fa(0x64)],_0xf939de[_0x31fa(0x64)])){const _0x3e7db1=new _0x4c10ce(),_0x4abc97=new _0x40cc70(_0x34a7c7);return _0xf939de[_0x31fa(0x65)](_0x3e7db1[_0x31fa(0x40)](),_0x4abc97['getFullYear']())&&_0xf939de[_0x31fa(0x66)](_0x3e7db1['getMonth'](),_0x4abc97[_0x31fa(0x41)]())&&_0xf939de[_0x31fa(0x67)](_0x3e7db1['getDate'](),_0x4abc97[_0x31fa(0x43)]());}else return 0x0;}};export const sortEventsByDate=_0x1a007b=>{const _0x5119d0={'gJgZQ':function(_0x4d95a5,_0x1a7284){return _0x4d95a5<_0x1a7284;},'LOTGG':function(_0x53be7f,_0x44e04f){return _0x53be7f===_0x44e04f;},'JRsmR':_0x31fa(0x68),'JkZwM':function(_0x5400b5,_0x5d683c){return _0x5400b5&&_0x5d683c;},'YesSs':function(_0x338ddc,_0x44e756){return _0x338ddc&&_0x44e756;},'mzQKZ':function(_0x3cff35,_0x4a6b8a){return _0x3cff35-_0x4a6b8a;},'ipNuW':function(_0x342cc3,_0x37820e){return _0x342cc3!==_0x37820e;},'xMUGs':_0x31fa(0x69),'QxQZf':function(_0x4a8297,_0x503983){return _0x4a8297-_0x503983;}};return _0x1a007b[_0x31fa(0x63)]((_0x105644,_0x3c9c57)=>{const _0x2b881d={'QvQKK':function(_0x36d85b,_0x281145){return _0x5119d0[_0x31fa(0x6a)](_0x36d85b,_0x281145);},'TdVxt':function(_0x4e17a5,_0x19ce82){return _0x4e17a5-_0x19ce82;}};if(_0x5119d0[_0x31fa(0x6b)]('pgTkb',_0x5119d0[_0x31fa(0x6c)]))try{const _0x38595e=new _0x28b6ee(),_0x3fe33d=new _0x2ea79a(_0x3975c4);return _0x38595e['setHours'](0x0,0x0,0x0,0x0),_0x3fe33d[_0x31fa(0x36)](0x0,0x0,0x0,0x0),_0x2b881d[_0x31fa(0x6d)](_0x3fe33d,_0x38595e);}catch(_0x5ba63f){return![];}else{if(_0x105644[_0x31fa(0x6e)]&&!_0x3c9c57[_0x31fa(0x6e)])return-0x1;if(!_0x105644[_0x31fa(0x6e)]&&_0x3c9c57[_0x31fa(0x6e)])return 0x1;const _0x5e7b7c=new Date(_0x105644[_0x31fa(0x6f)]),_0x2d3a2f=new Date(_0x3c9c57[_0x31fa(0x6f)]),_0xf658d5=new Date(),_0x293653=_0x5119d0[_0x31fa(0x6a)](_0x5e7b7c,_0xf658d5),_0x14a3ed=_0x2d3a2f<_0xf658d5;if(_0x5119d0[_0x31fa(0x70)](_0x293653,!_0x14a3ed))return 0x1;if(_0x5119d0[_0x31fa(0x71)](!_0x293653,_0x14a3ed))return-0x1;return _0x293653&&_0x14a3ed?_0x5119d0[_0x31fa(0x72)](_0x2d3a2f[_0x31fa(0x5d)](),_0x5e7b7c['getTime']()):_0x5119d0[_0x31fa(0x73)](_0x31fa(0x69),_0x5119d0['xMUGs'])?_0x2b881d[_0x31fa(0x74)](_0x4ac763[_0x31fa(0x5d)](),_0x4fb23c[_0x31fa(0x5d)]()):_0x5119d0[_0x31fa(0x75)](_0x5e7b7c[_0x31fa(0x5d)](),_0x2d3a2f['getTime']());}});};export const filterEventsBySearch=(_0x572229,_0x2e6991)=>{const _0x52cf52={'yhYVu':function(_0x55930a,_0x11f52f){return _0x55930a===_0x11f52f;}};if(!_0x2e6991['trim']())return _0x572229;const _0x211dc6=_0x2e6991[_0x31fa(0x1b)]()['trim']();return _0x572229[_0x31fa(0xc)](_0x522568=>{var _0x5d6995,_0xc24afc,_0x479d0c;return _0x522568[_0x31fa(0x18)]['toLowerCase']()[_0x31fa(0x19)](_0x211dc6)||_0x522568[_0x31fa(0x1a)]['toLowerCase']()['includes'](_0x211dc6)||_0x522568[_0x31fa(0x1c)][_0x31fa(0x1b)]()['includes'](_0x211dc6)||(_0x52cf52[_0x31fa(0x76)](_0x5d6995=_0x522568['location'],null)||_0x52cf52[_0x31fa(0x76)](_0x5d6995,void 0x0)?void 0x0:_0x5d6995['toLowerCase']()[_0x31fa(0x19)](_0x211dc6))||(_0x52cf52[_0x31fa(0x76)](_0xc24afc=_0x522568[_0x31fa(0x57)],null)||_0x52cf52[_0x31fa(0x76)](_0xc24afc,void 0x0)?void 0x0:_0xc24afc[_0x31fa(0x1b)]()['includes'](_0x211dc6))||(_0x52cf52[_0x31fa(0x76)](_0x479d0c=_0x522568['tags'],null)||_0x479d0c===void 0x0?void 0x0:_0x479d0c[_0x31fa(0x77)](_0x472f49=>_0x472f49[_0x31fa(0x1b)]()[_0x31fa(0x19)](_0x211dc6)));});};export const getUniqueEventTags=_0x5daf06=>{const _0x8c97e6=_0x5daf06[_0x31fa(0x61)](_0x339a42=>_0x339a42[_0x31fa(0x1e)]||[]);return Array[_0x31fa(0x62)](new Set(_0x8c97e6))[_0x31fa(0x63)]();};export const calculateEventStats=_0x3a4b4c=>{const _0x3eb5e6={'LmEdL':function(_0x5f43c3,_0x43ab5f){return _0x5f43c3-_0x43ab5f;},'tsepH':function(_0x2d0ba9,_0x824c11){return _0x2d0ba9>_0x824c11;},'sVFeP':function(_0x407bf8,_0x1548ac){return _0x407bf8/_0x1548ac;}},_0x3e3733=_0x3a4b4c['length'],_0x4ebf1e=_0x3a4b4c[_0x31fa(0xc)](_0x3bb041=>_0x3bb041[_0x31fa(0x6e)])[_0x31fa(0x5)],_0x16c29a=_0x3eb5e6['LmEdL'](_0x3e3733,_0x4ebf1e),_0x4302b4=_0x3a4b4c[_0x31fa(0x78)]((_0x498c2a,_0x28a30b)=>_0x498c2a+_0x28a30b['attendeeCount'],0x0),_0x40cd81=_0x3a4b4c[_0x31fa(0x78)]((_0x5a9af6,_0x21d08a)=>_0x5a9af6+_0x21d08a['maxAttendees'],0x0),_0x16d748=_0x3a4b4c[_0x31fa(0xc)](_0x5cff35=>_0x5cff35[_0x31fa(0x6e)]&&!isEventPast(_0x5cff35[_0x31fa(0x6f)]))[_0x31fa(0x5)],_0x477658=_0x3a4b4c[_0x31fa(0xc)](_0x5e7548=>isEventPast(_0x5e7548[_0x31fa(0x6f)]))[_0x31fa(0x5)],_0x1275cd=_0x3a4b4c['filter'](_0x57e483=>_0x57e483[_0x31fa(0x6e)]&&isEventToday(_0x57e483[_0x31fa(0x6f)]))[_0x31fa(0x5)];return{'total':_0x3e3733,'active':_0x4ebf1e,'inactive':_0x16c29a,'upcoming':_0x16d748,'past':_0x477658,'today':_0x1275cd,'totalAttendees':_0x4302b4,'totalCapacity':_0x40cd81,'averageAttendance':_0x3eb5e6[_0x31fa(0x79)](_0x40cd81,0x0)?Math['round'](_0x3eb5e6[_0x31fa(0x7a)](_0x4302b4,_0x40cd81)*0x64):0x0};};function _0x1c70(){const _0x555e9a=['byzRU','ZdlAP','charAt','floor','random','length','OXWWX','BlBSr','vAVtg','trim','FCarx','replace','filter','FwGTI','kEzLr','slice','substring','NSNuL','join','UjiEk','SpGHU','KBapr','QIImx','HLIrV','title','includes','description','toLowerCase','code','ccDJt','tags','SVFrW','Ixbls','RpWZt','Event\x20code\x20must\x20be\x20at\x20least\x203\x20characters','CTtbO','cuDYk','Event\x20code\x20is\x20required','toUpperCase','lWQbF','nHBra','FvpTW','Event\x20code\x20must\x20be\x2010\x20characters\x20or\x20less','test','GNkFj','wZQmk','SgAyO','mFnoN','numeric','long','kIbbO','kiEEj','DAjXK','en-US','setHours','MoUKZ','xaHWF','EcfRc','VYPPy','toLocaleDateString','XlVpe','cmZWP','NrOvb','XVoFf','getFullYear','getMonth','FGbTN','getDate','aaGoj','dLkUq','RUTFM','JYdes','npOLK','uAFpX','BPrXw','gsqQf','Inactive','Past','lsraL','bqABf','Upcoming','ydUnQ','YmxxB','WDAzn','CWkLm','oOMuK','ClWkE','organizer','KEiOZ','tZnId','VYhQU','squZF','gutEV','getTime','ceil','TtXWF','FUXZA','flatMap','from','sort','rNaTc','duepJ','vgoxB','BlCrC','ykICl','oloCr','gJgZQ','LOTGG','JRsmR','QvQKK','isActive','eventDate','JkZwM','YesSs','mzQKZ','ipNuW','TdVxt','QxQZf','yhYVu','some','reduce','tsepH','sVFeP'];_0x1c70=function(){return _0x555e9a;};return _0x1c70();}
|
|
@@ -5,4 +5,4 @@ var __ONAIROS_REQ_REGISTRY__ = [
|
|
|
5
5
|
require('react-native')
|
|
6
6
|
];
|
|
7
7
|
function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
|
|
8
|
-
|
|
8
|
+
import{Platform}from'react-native';export let HapticType=function(_0x4d5d48){const _0x54300f={'sxKcE':_0x14d7(0x0),'AcARV':'MEDIUM','Jgvwm':_0x14d7(0x1),'ClSku':_0x14d7(0x2),'AVRTw':_0x14d7(0x3),'RbgBE':_0x14d7(0x4),'UInIm':_0x14d7(0x5),'owajS':_0x14d7(0x6),'JfrJq':'SUCCESS','kTzxY':_0x14d7(0x7)},_0x3c9942=_0x54300f[_0x14d7(0x8)]['split']('|');let _0x5d5ac3=0x0;while(!![]){switch(_0x3c9942[_0x5d5ac3++]){case'0':_0x4d5d48[_0x54300f['AcARV']]='medium';continue;case'1':_0x4d5d48[_0x14d7(0x9)]=_0x54300f['Jgvwm'];continue;case'2':_0x4d5d48[_0x54300f['ClSku']]=_0x54300f[_0x14d7(0xa)];continue;case'3':return _0x4d5d48;case'4':_0x4d5d48[_0x54300f[_0x14d7(0xb)]]=_0x54300f[_0x14d7(0xc)];continue;case'5':_0x4d5d48[_0x54300f['owajS']]=_0x14d7(0xd);continue;case'6':_0x4d5d48[_0x54300f[_0x14d7(0xe)]]=_0x14d7(0xf);continue;case'7':_0x4d5d48[_0x54300f[_0x14d7(0x10)]]=_0x54300f[_0x14d7(0x11)];continue;}break;}}({});export const triggerHaptic=(_0x46b507=HapticType['LIGHT'])=>{const _0x1c8e67={'bSuEZ':function(_0x57c46a,_0x526841){return _0x57c46a===_0x526841;},'epAbj':_0x14d7(0x12),'rJaeP':_0x14d7(0x13),'XCmZR':_0x14d7(0x14),'wkBUd':_0x14d7(0x15),'NUrVv':_0x14d7(0x16),'iHtVR':_0x14d7(0x17),'DbhXO':_0x14d7(0x18),'jrZQq':_0x14d7(0x19),'oNUEP':_0x14d7(0x1a)};if(_0x1c8e67['bSuEZ'](Platform['OS'],_0x1c8e67[_0x14d7(0x1b)]))try{const _0x330734=__ONAIROS_REQ_FUNC__(0x0),_0x20a787={'enableVibrateFallback':!![],'ignoreAndroidSystemSettings':![]};switch(_0x46b507){case HapticType[_0x14d7(0x9)]:_0x330734['trigger'](_0x14d7(0x17),_0x20a787);break;case HapticType[_0x14d7(0x1c)]:_0x330734[_0x14d7(0x1d)](_0x14d7(0x1e),_0x20a787);break;case HapticType[_0x14d7(0x6)]:_0x330734[_0x14d7(0x1d)](_0x1c8e67[_0x14d7(0x1f)],_0x20a787);break;case HapticType[_0x14d7(0x20)]:_0x330734[_0x14d7(0x1d)](_0x1c8e67[_0x14d7(0x21)],_0x20a787);break;case HapticType['WARNING']:_0x330734[_0x14d7(0x1d)](_0x1c8e67[_0x14d7(0x22)],_0x20a787);break;case HapticType[_0x14d7(0x4)]:_0x330734[_0x14d7(0x1d)](_0x1c8e67[_0x14d7(0x23)],_0x20a787);break;default:_0x330734['trigger'](_0x1c8e67[_0x14d7(0x24)],_0x20a787);}}catch(_0x2c64ae){if(_0x1c8e67[_0x14d7(0x25)]===_0x14d7(0x18))console[_0x14d7(0x26)](_0x1c8e67['jrZQq'],_0x2c64ae);else{const {Vibration:_0x482140}=_0x1f7d93(0x1);_0x482140[_0x14d7(0x27)](0x32);}}else{if(Platform['OS']==='android')try{const {Vibration:_0x271d9a}=__ONAIROS_REQ_FUNC__(0x1);_0x271d9a['vibrate'](0x32);}catch(_0x2ee718){console[_0x14d7(0x26)](_0x1c8e67['oNUEP'],_0x2ee718);}}};function _0x14d7(_0x2065d3,_0x14d793){_0x2065d3=_0x2065d3-0x0;const _0x44c406=_0x2065();let _0x58a295=_0x44c406[_0x2065d3];return _0x58a295;}function _0x2065(){const _0x26706d=['1|0|5|6|2|4|7|3','light','WARNING','warning','ERROR','error','HEAVY','BUTTON_PRESS','sxKcE','LIGHT','AVRTw','RbgBE','UInIm','heavy','JfrJq','success','kTzxY','Jgvwm','ios','impactHeavy','notificationSuccess','notificationWarning','notificationError','impactLight','PaJFR','Haptic\x20feedback\x20not\x20available:','Vibration\x20not\x20available:','epAbj','MEDIUM','trigger','impactMedium','rJaeP','SUCCESS','XCmZR','wkBUd','NUrVv','iHtVR','DbhXO','warn','vibrate'];_0x2065=function(){return _0x26706d;};return _0x2065();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x5d97(){const _0x163f08=['Check\x20internet\x20connection\x20on\x20device','UVIym','═══════════════════════════════════════════','PMcSL','https://www.google.com','HEAD','2|3|1|0|4','diagnostic_test','youtube','\x0a⚠️\x20SOME\x20TESTS\x20FAILED\x20-\x20See\x20recommendations\x20below:','ios','iOS:\x20Add\x20NSAppTransportSecurity\x20to\x20Info.plist','iOS:\x20Try\x20on\x20physical\x20device\x20instead\x20of\x20simulator','Device\x20has\x20no\x20internet\x20-\x20check\x20WiFi/cellular','\x0a═══════════════════════════════════════════','log','jxCVN','hBDyb','toISOString','Version','📱\x20Platform:\x20','───────────────────────────────────────────','XNJlW','ZiFBG','iotVl','now','DZvAT','vngdi','vAOLG','tests','rawResults','\x20\x20\x20✅\x20PASS\x20-\x20Google\x20reachable\x20(','ms)','recommendations','push','mYkhi','google','message','Google\x20unreachable:\x20','\x20\x20\x20❌\x20FAIL\x20-\x20','OHfjv','split','\x0a🧪\x20Test\x202:\x20API\x20Reachability\x20(API\x20server/health)','YKqRh','text','catch','Unable\x20to\x20read','apiReachable','apiHealth','status','substring','\x20\x20\x20✅\x20PASS\x20-\x20API\x20reachable\x20(','\x20\x20\x20⚠️\x20PARTIAL\x20-\x20API\x20responded\x20with\x20','API\x20returned\x20status\x20','FDqEc','neaWB','1|4|3|2|0','googleReachable','tWBJA','\x20\x20\x20','REVON','/youtube/authorize','stringify','JTGXH','ccagJ','apiPost','apiPostWorks','parse','youtubeURL','youtubeOAuthWorks','\x20\x20\x20✅\x20BONUS\x20-\x20Got\x20YouTube\x20OAuth\x20URL!','POST\x20request\x20failed:\x20','\x0a───────────────────────────────────────────','📋\x20SUMMARY','FWfSJ','values','keys','length','\x0aTests\x20Passed:\x20','YjszU','DhKYE','uGDBp','fUrFu','zsfoF','olcWI','lnZFR','dBzUu','myOhg','Czhme','forEach','QvKet','Full\x20results\x20object\x20logged\x20below\x20for\x20debugging:','0|4|2|1|3','QCFwI','gbdzd','oJeNq','BASE_URL','/health','BNzbC','vfhNf','rXpaS','errors','api_unreachable','GxUbP','GYdGe','offline','ZRjfv','ztIYD','xEIsU','APQDu','AtbQR','ynafU','MAtrC'];_0x5d97=function(){return _0x163f08;};return _0x5d97();}import{Platform}from'react-native';import{API_CONFIG}from'../config/api';export const runFullDiagnostics=async()=>{const _0x20d5a8={'mYkhi':_0x556a(0x0),'FqIqy':function(_0x4f8cea,_0x1f17e2){return _0x4f8cea+_0x1f17e2;},'tWBJA':'Internet\x20works\x20but\x20API\x20blocked.\x20Check:\x20VPN,\x20Firewall,\x20iOS\x20ATS\x20settings','YjszU':function(_0x510f79,_0x1648fa){return _0x510f79===_0x1648fa;},'QvKet':_0x556a(0x1),'jxCVN':_0x556a(0x2),'hBDyb':'🔍\x20ONAIROS\x20SDK\x20NETWORK\x20DIAGNOSTICS','XNJlW':'\x0a🧪\x20Test\x201:\x20Internet\x20Connectivity\x20(google.com)','ZiFBG':'zBIOE','iotVl':_0x556a(0x3),'ZcTgp':function(_0x11c967,_0x1b4faa,_0x1e7dca){return _0x11c967(_0x1b4faa,_0x1e7dca);},'DZvAT':_0x556a(0x4),'vngdi':_0x556a(0x5),'vAOLG':function(_0x3f0221,_0x4fc8bb){return _0x3f0221-_0x4fc8bb;},'OHfjv':_0x556a(0x6),'YKqRh':function(_0x5d0aaa,_0x426324,_0x22c39c){return _0x5d0aaa(_0x426324,_0x22c39c);},'FDqEc':function(_0x38b102,_0x563cf4){return _0x38b102!==_0x563cf4;},'neaWB':'xXvww','REVON':function(_0x74eb6e,_0x482118,_0x2d51d9){return _0x74eb6e(_0x482118,_0x2d51d9);},'JTGXH':_0x556a(0x7),'ccagJ':_0x556a(0x8),'FWfSJ':'───────────────────────────────────────────','DhKYE':function(_0x453b71,_0x3eb881){return _0x453b71!==_0x3eb881;},'uGDBp':'NSNVj','zsfoF':'\x0a✅\x20ALL\x20TESTS\x20PASSED\x20-\x20SDK\x20should\x20work\x20correctly','olcWI':_0x556a(0x9),'WHZnX':_0x556a(0xa),'lnZFR':_0x556a(0xb),'dBzUu':_0x556a(0xc),'myOhg':_0x556a(0xd),'Czhme':'\x0a📌\x20RECOMMENDATIONS:','xohPo':_0x556a(0xe)};console[_0x556a(0xf)](_0x20d5a8[_0x556a(0x10)]),console['log'](_0x20d5a8[_0x556a(0x11)]),console[_0x556a(0xf)](_0x20d5a8[_0x556a(0x10)]);const _0x2fd5f4={'timestamp':new Date()[_0x556a(0x12)](),'platform':Platform['OS'],'platformVersion':Platform[_0x556a(0x13)],'tests':{'googleReachable':![],'apiReachable':![],'apiPostWorks':![],'youtubeOAuthWorks':![]},'errors':[],'recommendations':[],'rawResults':{}};console[_0x556a(0xf)](_0x556a(0x14)+Platform['OS']+'\x20'+Platform['Version']),console[_0x556a(0xf)](_0x556a(0x15)),console['log'](_0x20d5a8[_0x556a(0x16)]);try{if(_0x20d5a8[_0x556a(0x17)]!==_0x20d5a8[_0x556a(0x18)]){const _0x583d3a=Date[_0x556a(0x19)](),_0x150376=await _0x20d5a8['ZcTgp'](fetch,_0x20d5a8[_0x556a(0x1a)],{'method':_0x20d5a8[_0x556a(0x1b)]}),_0x4aa8e7=_0x20d5a8[_0x556a(0x1c)](Date[_0x556a(0x19)](),_0x583d3a);_0x2fd5f4[_0x556a(0x1d)]['googleReachable']=!![],_0x2fd5f4[_0x556a(0x1e)]['google']={'status':_0x150376['status'],'time':_0x4aa8e7},console[_0x556a(0xf)](_0x556a(0x1f)+_0x4aa8e7+_0x556a(0x20));}else{const _0x56195f='1|3|2|4|0'['split']('|');let _0x4d874b=0x0;while(!![]){switch(_0x56195f[_0x4d874b++]){case'0':_0x254f16[_0x556a(0x21)][_0x556a(0x22)](_0x20d5a8[_0x556a(0x23)]);continue;case'1':_0x5b793c[_0x556a(0x1d)]['googleReachable']=![];continue;case'2':_0x29c4ae[_0x556a(0x1e)][_0x556a(0x24)]={'error':_0x565f22[_0x556a(0x25)]};continue;case'3':_0x1b275b['errors'][_0x556a(0x22)](_0x556a(0x26)+_0x27cd3d[_0x556a(0x25)]);continue;case'4':_0x46cee1['log'](_0x556a(0x27)+_0x45da90['message']);continue;}break;}}}catch(_0x1929c5){const _0x324068=_0x20d5a8[_0x556a(0x28)][_0x556a(0x29)]('|');let _0x473ffc=0x0;while(!![]){switch(_0x324068[_0x473ffc++]){case'0':console[_0x556a(0xf)](_0x556a(0x27)+_0x1929c5[_0x556a(0x25)]);continue;case'1':_0x2fd5f4[_0x556a(0x1e)][_0x556a(0x24)]={'error':_0x1929c5['message']};continue;case'2':_0x2fd5f4['tests']['googleReachable']=![];continue;case'3':_0x2fd5f4['errors']['push']('Google\x20unreachable:\x20'+_0x1929c5[_0x556a(0x25)]);continue;case'4':_0x2fd5f4[_0x556a(0x21)]['push']('Check\x20internet\x20connection\x20on\x20device');continue;}break;}}console[_0x556a(0xf)](_0x556a(0x2a));try{const _0x3eb4b1=Date['now'](),_0x2b5849=await _0x20d5a8[_0x556a(0x2b)](fetch,API_CONFIG['BASE_URL']+'/health',{'method':'GET','headers':{'Accept':'application/json'}}),_0x2d909e=_0x20d5a8['vAOLG'](Date['now'](),_0x3eb4b1),_0x34f9d8=await _0x2b5849[_0x556a(0x2c)]()[_0x556a(0x2d)](()=>_0x556a(0x2e));_0x2fd5f4[_0x556a(0x1d)][_0x556a(0x2f)]=_0x2b5849['ok'],_0x2fd5f4[_0x556a(0x1e)][_0x556a(0x30)]={'status':_0x2b5849[_0x556a(0x31)],'time':_0x2d909e,'body':_0x34f9d8[_0x556a(0x32)](0x0,0xc8)},_0x2b5849['ok']?console[_0x556a(0xf)](_0x556a(0x33)+_0x2d909e+_0x556a(0x20)):(console[_0x556a(0xf)](_0x556a(0x34)+_0x2b5849[_0x556a(0x31)]),_0x2fd5f4['errors']['push'](_0x556a(0x35)+_0x2b5849[_0x556a(0x31)]));}catch(_0x57814a){if(_0x20d5a8[_0x556a(0x36)](_0x20d5a8[_0x556a(0x37)],'CpJMY')){const _0x8442f1=_0x556a(0x38)['split']('|');let _0x569f8a=0x0;while(!![]){switch(_0x8442f1[_0x569f8a++]){case'0':_0x2fd5f4[_0x556a(0x1d)][_0x556a(0x39)]&&_0x2fd5f4['recommendations']['push'](_0x20d5a8[_0x556a(0x3a)]);continue;case'1':_0x2fd5f4[_0x556a(0x1d)][_0x556a(0x2f)]=![];continue;case'2':console[_0x556a(0xf)](_0x556a(0x27)+_0x57814a[_0x556a(0x25)]);continue;case'3':_0x2fd5f4[_0x556a(0x1e)][_0x556a(0x30)]={'error':_0x57814a[_0x556a(0x25)]};continue;case'4':_0x2fd5f4['errors'][_0x556a(0x22)]('API\x20unreachable:\x20'+_0x57814a[_0x556a(0x25)]);continue;}break;}}else _0x54187f['log'](_0x556a(0x3b)+_0x20d5a8['FqIqy'](_0xc64640,0x1)+'.\x20'+_0x4f3e6d);}console[_0x556a(0xf)]('\n\uD83E\uDDEA Test 3: POST Request (OAuth simulation)');try{const _0x40fb43=Date[_0x556a(0x19)](),_0x25cc7a=await _0x20d5a8[_0x556a(0x3c)](fetch,API_CONFIG['BASE_URL']+_0x556a(0x3d),{'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/json'},'body':JSON[_0x556a(0x3e)]({'session':{'username':_0x20d5a8[_0x556a(0x3f)],'platform':_0x20d5a8[_0x556a(0x40)],'timestamp':new Date()[_0x556a(0x12)]()}})}),_0x557945=Date['now']()-_0x40fb43,_0x5e1d7f=await _0x25cc7a[_0x556a(0x2c)]()[_0x556a(0x2d)](()=>_0x556a(0x2e));_0x2fd5f4[_0x556a(0x1e)][_0x556a(0x41)]={'status':_0x25cc7a[_0x556a(0x31)],'time':_0x557945,'body':_0x5e1d7f[_0x556a(0x32)](0x0,0x1f4)},_0x2fd5f4[_0x556a(0x1d)][_0x556a(0x42)]=!![],console[_0x556a(0xf)]('\x20\x20\x20✅\x20PASS\x20-\x20POST\x20request\x20succeeded,\x20status:\x20'+_0x25cc7a[_0x556a(0x31)]+'\x20('+_0x557945+_0x556a(0x20));try{const _0x35071d=JSON[_0x556a(0x43)](_0x5e1d7f);_0x35071d[_0x556a(0x44)]&&(_0x2fd5f4[_0x556a(0x1d)][_0x556a(0x45)]=!![],console[_0x556a(0xf)](_0x556a(0x46)));}catch{}}catch(_0x29cdcd){_0x2fd5f4['tests'][_0x556a(0x42)]=![],_0x2fd5f4['errors']['push'](_0x556a(0x47)+_0x29cdcd['message']),_0x2fd5f4[_0x556a(0x1e)][_0x556a(0x41)]={'error':_0x29cdcd[_0x556a(0x25)]},console[_0x556a(0xf)](_0x556a(0x27)+_0x29cdcd[_0x556a(0x25)]),_0x2fd5f4[_0x556a(0x21)][_0x556a(0x22)]('POST requests failing. This is the exact issue affecting OAuth.');}console[_0x556a(0xf)](_0x556a(0x48)),console[_0x556a(0xf)](_0x556a(0x49)),console['log'](_0x20d5a8[_0x556a(0x4a)]);const _0x189275=Object[_0x556a(0x4b)](_0x2fd5f4[_0x556a(0x1d)])['filter'](Boolean)['length'],_0x3ae4e2=Object[_0x556a(0x4c)](_0x2fd5f4[_0x556a(0x1d)])[_0x556a(0x4d)];return console['log'](_0x556a(0x4e)+_0x189275+'/'+_0x3ae4e2),_0x20d5a8[_0x556a(0x4f)](_0x189275,_0x3ae4e2)?_0x20d5a8[_0x556a(0x50)](_0x20d5a8[_0x556a(0x51)],_0x556a(0x52))?console[_0x556a(0xf)](_0x20d5a8[_0x556a(0x53)]):_0xebedeb[_0x556a(0x21)]['push'](_0x20d5a8[_0x556a(0x3a)]):(console['log'](_0x20d5a8[_0x556a(0x54)]),Platform['OS']===_0x20d5a8['WHZnX']&&!_0x2fd5f4[_0x556a(0x1d)][_0x556a(0x2f)]&&_0x2fd5f4[_0x556a(0x21)][_0x556a(0x22)](_0x20d5a8[_0x556a(0x55)],_0x20d5a8[_0x556a(0x56)]),!_0x2fd5f4[_0x556a(0x1d)][_0x556a(0x39)]&&_0x2fd5f4['recommendations']['push'](_0x20d5a8[_0x556a(0x57)]),console[_0x556a(0xf)](_0x20d5a8[_0x556a(0x58)]),_0x2fd5f4[_0x556a(0x21)][_0x556a(0x59)]((_0x5100ef,_0x568528)=>{_0x20d5a8[_0x556a(0x4f)](_0x556a(0x1),_0x20d5a8[_0x556a(0x5a)])?console['log'](_0x556a(0x3b)+_0x20d5a8['FqIqy'](_0x568528,0x1)+'.\x20'+_0x5100ef):_0x3e541f[_0x556a(0xf)](_0x556a(0x33)+_0x5d89ad+_0x556a(0x20));})),console[_0x556a(0xf)](_0x20d5a8['xohPo']),console[_0x556a(0xf)](_0x556a(0x5b)),console['log'](JSON['stringify'](_0x2fd5f4,null,0x2)),_0x2fd5f4;};function _0x556a(_0x5d97e6,_0x556aaa){_0x5d97e6=_0x5d97e6-0x0;const _0x2568bd=_0x5d97();let _0x57e6ee=_0x2568bd[_0x5d97e6];return _0x57e6ee;}export const isApiReachable=async()=>{const _0x1b6b78={'BNzbC':_0x556a(0xb),'fsvga':_0x556a(0xc),'rXpaS':_0x556a(0x5c),'oJeNq':function(_0x500e21,_0x65851b){return _0x500e21===_0x65851b;},'nSqMY':_0x556a(0x5d),'uRivE':function(_0x22f729,_0x3c91b4){return _0x22f729!==_0x3c91b4;},'VBHEK':_0x556a(0x5e)};try{if(_0x1b6b78[_0x556a(0x5f)](_0x556a(0x5d),_0x1b6b78['nSqMY'])){const _0x4cefff=await fetch(API_CONFIG[_0x556a(0x60)]+_0x556a(0x61),{'method':'GET'});return _0x4cefff['ok'];}else _0x37235d[_0x556a(0x21)][_0x556a(0x22)](_0x1b6b78[_0x556a(0x62)],_0x1b6b78['fsvga']);}catch{if(_0x1b6b78['uRivE'](_0x1b6b78['VBHEK'],_0x556a(0x63)))return![];else{const _0x491441=_0x1b6b78[_0x556a(0x64)][_0x556a(0x29)]('|');let _0x27d203=0x0;while(!![]){switch(_0x491441[_0x27d203++]){case'0':_0x203d30[_0x556a(0x1d)][_0x556a(0x42)]=![];continue;case'1':_0x1668ec['log']('\x20\x20\x20❌\x20FAIL\x20-\x20'+_0x468832[_0x556a(0x25)]);continue;case'2':_0x429566['rawResults'][_0x556a(0x41)]={'error':_0x16ea00[_0x556a(0x25)]};continue;case'3':_0x1b4b38[_0x556a(0x21)][_0x556a(0x22)]('POST requests failing. This is the exact issue affecting OAuth.');continue;case'4':_0xee24a9[_0x556a(0x65)][_0x556a(0x22)](_0x556a(0x47)+_0x5943fa['message']);continue;}break;}}}};export const getNetworkStatus=async()=>{const _0xcc0437={'ynafU':_0x556a(0x66),'ZRjfv':_0x556a(0x67),'zyhQP':_0x556a(0x68),'ITEPQ':function(_0x1f2b6b,_0x1ffb04,_0x5669f5){return _0x1f2b6b(_0x1ffb04,_0x5669f5);},'ztIYD':'HEAD','xEIsU':function(_0x3de7b0,_0x1d05e9){return _0x3de7b0===_0x1d05e9;},'APQDu':'ZoPiK','AtbQR':'online','MAtrC':_0x556a(0x69)};try{if(_0xcc0437[_0x556a(0x6a)]!==_0xcc0437['zyhQP']){await _0xcc0437['ITEPQ'](fetch,'https://www.google.com',{'method':_0xcc0437[_0x556a(0x6b)]});const _0x3d7201=await fetch(API_CONFIG[_0x556a(0x60)]+'/health');if(_0x3d7201['ok']){if(_0xcc0437[_0x556a(0x6c)](_0xcc0437[_0x556a(0x6d)],'PFkQB'))_0x1e1a7b[_0x556a(0x1d)][_0x556a(0x45)]=!![],_0x39aa2c[_0x556a(0xf)](_0x556a(0x46));else return _0xcc0437[_0x556a(0x6e)];}else return _0xcc0437['ynafU'];}else return _0xcc0437[_0x556a(0x6f)];}catch{return _0xcc0437[_0x556a(0x70)];}};
|
|
1
|
+
function _0x3e5a(){const _0x50445f=['4|2|1|3|0','iCULF','\x0a🧪\x20Test\x201:\x20Internet\x20Connectivity\x20(google.com)','https://www.google.com','HEAD','rvmBA','3|0|4|1|2','Check\x20internet\x20connection\x20on\x20device','\x0a🧪\x20Test\x202:\x20API\x20Reachability\x20(API\x20server/health)','0|3|4|1|2','GPzPV','QoAZU','youtube','sZkdb','Arvzj','\x0a───────────────────────────────────────────','📋\x20SUMMARY','\x0a⚠️\x20SOME\x20TESTS\x20FAILED\x20-\x20See\x20recommendations\x20below:','iOS:\x20Try\x20on\x20physical\x20device\x20instead\x20of\x20simulator','Device\x20has\x20no\x20internet\x20-\x20check\x20WiFi/cellular','\x0a📌\x20RECOMMENDATIONS:','log','═══════════════════════════════════════════','ysDXg','KSeiu','📱\x20Platform:\x20','Version','PWfax','zVMVZ','now','zpzbC','CJWNB','tests','googleReachable','rawResults','status','\x20\x20\x20✅\x20PASS\x20-\x20Google\x20reachable\x20(','ms)','nujZf','MLcQE','errors','Google\x20unreachable:\x20','message','\x20\x20\x20❌\x20FAIL\x20-\x20','push','google','OdICY','mgZRz','API\x20returned\x20status\x20','HItWP','BASE_URL','rbSai','text','catch','Unable\x20to\x20read','apiReachable','apiHealth','substring','\x20\x20\x20⚠️\x20PARTIAL\x20-\x20API\x20responded\x20with\x20','TNWiD','split','recommendations','Internet\x20works\x20but\x20API\x20blocked.\x20Check:\x20VPN,\x20Firewall,\x20iOS\x20ATS\x20settings','API\x20unreachable:\x20','BIoFk','XKzjz','HYfEB','stringify','diagnostic_test','MsEYT','toISOString','iYMgv','apiPost','parse','youtubeURL','cGXex','youtubeOAuthWorks','apiPostWorks','POST\x20request\x20failed:\x20','bDjzl','values','filter','length','keys','\x0aTests\x20Passed:\x20','KJiqp','pQNjz','IbZxe','ios','xietj','jmvjf','XWlWW','XcQlZ','iOS:\x20Add\x20NSAppTransportSecurity\x20to\x20Info.plist','InWRX','fFGcS','forEach','kEpgI','GVQrs','\x20\x20\x20✅\x20BONUS\x20-\x20Got\x20YouTube\x20OAuth\x20URL!','\x20\x20\x20','yzUat','\x0a═══════════════════════════════════════════','Full\x20results\x20object\x20logged\x20below\x20for\x20debugging:','api_unreachable','vMxDW','gwkVj','BRTpR','\x0a✅\x20ALL\x20TESTS\x20PASSED\x20-\x20SDK\x20should\x20work\x20correctly','online','rWlMZ','Ooxva','GOPEv','Jpnnn','AgkLf','AzbVX','gKjtb','/health','wqcDg','XtUnz','Jtnow','rvgop'];_0x3e5a=function(){return _0x50445f;};return _0x3e5a();}import{Platform}from'react-native';import{API_CONFIG}from'../config/api';export const runFullDiagnostics=async()=>{const _0x25dc84={'EvosT':_0x43e9(0x0),'XcQlZ':'Internet\x20works\x20but\x20API\x20blocked.\x20Check:\x20VPN,\x20Firewall,\x20iOS\x20ATS\x20settings','xietj':function(_0x33f664,_0x2da11f){return _0x33f664===_0x2da11f;},'kEpgI':_0x43e9(0x1),'yzUat':function(_0x487b50,_0x2913ac){return _0x487b50+_0x2913ac;},'ysDXg':'🔍\x20ONAIROS\x20SDK\x20NETWORK\x20DIAGNOSTICS','KSeiu':'═══════════════════════════════════════════','PWfax':'───────────────────────────────────────────','zVMVZ':_0x43e9(0x2),'zpzbC':_0x43e9(0x3),'CJWNB':_0x43e9(0x4),'nujZf':_0x43e9(0x5),'MLcQE':_0x43e9(0x6),'LzBmG':_0x43e9(0x7),'OdICY':_0x43e9(0x8),'mHFEL':function(_0x17679c,_0x3ff133){return _0x17679c!==_0x3ff133;},'mgZRz':'EhiXV','HItWP':function(_0x1ac83c,_0x28d47d,_0x1c9e89){return _0x1ac83c(_0x28d47d,_0x1c9e89);},'rbSai':function(_0x2861a4,_0x25723c){return _0x2861a4-_0x25723c;},'TNWiD':_0x43e9(0x9),'BIoFk':function(_0x51e46c,_0x4f9339){return _0x51e46c!==_0x4f9339;},'XKzjz':_0x43e9(0xa),'HYfEB':_0x43e9(0xb),'mZSDa':function(_0x108eae,_0x58d8f8,_0x285ec3){return _0x108eae(_0x58d8f8,_0x285ec3);},'MsEYT':_0x43e9(0xc),'iYMgv':function(_0x230d26,_0x37c3b8){return _0x230d26-_0x37c3b8;},'XwlDv':_0x43e9(0xd),'cGXex':_0x43e9(0xe),'KusgD':_0x43e9(0xf),'bDjzl':_0x43e9(0x10),'KJiqp':function(_0x5b33da,_0x26eb9e){return _0x5b33da===_0x26eb9e;},'pQNjz':_0x43e9(0x11),'IbZxe':function(_0x533647,_0x5ab983){return _0x533647===_0x5ab983;},'tYwUn':_0x43e9(0x12),'InWRX':_0x43e9(0x13),'fFGcS':_0x43e9(0x14)};console[_0x43e9(0x15)](_0x43e9(0x16)),console[_0x43e9(0x15)](_0x25dc84[_0x43e9(0x17)]),console[_0x43e9(0x15)](_0x25dc84[_0x43e9(0x18)]);const _0x1e6401={'timestamp':new Date()['toISOString'](),'platform':Platform['OS'],'platformVersion':Platform['Version'],'tests':{'googleReachable':![],'apiReachable':![],'apiPostWorks':![],'youtubeOAuthWorks':![]},'errors':[],'recommendations':[],'rawResults':{}};console['log'](_0x43e9(0x19)+Platform['OS']+'\x20'+Platform[_0x43e9(0x1a)]),console[_0x43e9(0x15)](_0x25dc84[_0x43e9(0x1b)]),console[_0x43e9(0x15)](_0x25dc84[_0x43e9(0x1c)]);try{const _0x2833de=Date[_0x43e9(0x1d)](),_0x506ff2=await fetch(_0x25dc84[_0x43e9(0x1e)],{'method':_0x25dc84[_0x43e9(0x1f)]}),_0x1bb7ba=Date[_0x43e9(0x1d)]()-_0x2833de;_0x1e6401[_0x43e9(0x20)][_0x43e9(0x21)]=!![],_0x1e6401[_0x43e9(0x22)]['google']={'status':_0x506ff2[_0x43e9(0x23)],'time':_0x1bb7ba},console[_0x43e9(0x15)](_0x43e9(0x24)+_0x1bb7ba+_0x43e9(0x25));}catch(_0x304780){if(_0x25dc84[_0x43e9(0x26)]===_0x25dc84['nujZf']){const _0x17a2f6=_0x25dc84[_0x43e9(0x27)]['split']('|');let _0x1fac93=0x0;while(!![]){switch(_0x17a2f6[_0x1fac93++]){case'0':_0x1e6401[_0x43e9(0x28)]['push'](_0x43e9(0x29)+_0x304780[_0x43e9(0x2a)]);continue;case'1':console[_0x43e9(0x15)](_0x43e9(0x2b)+_0x304780[_0x43e9(0x2a)]);continue;case'2':_0x1e6401['recommendations'][_0x43e9(0x2c)](_0x25dc84['LzBmG']);continue;case'3':_0x1e6401['tests']['googleReachable']=![];continue;case'4':_0x1e6401[_0x43e9(0x22)][_0x43e9(0x2d)]={'error':_0x304780[_0x43e9(0x2a)]};continue;}break;}}else return'online';}console[_0x43e9(0x15)](_0x25dc84[_0x43e9(0x2e)]);try{if(_0x25dc84['mHFEL'](_0x25dc84['mgZRz'],_0x25dc84[_0x43e9(0x2f)]))_0x2c3c93[_0x43e9(0x15)]('\x20\x20\x20⚠️\x20PARTIAL\x20-\x20API\x20responded\x20with\x20'+_0x235fc4[_0x43e9(0x23)]),_0x45a823[_0x43e9(0x28)]['push'](_0x43e9(0x30)+_0x3cc7ea[_0x43e9(0x23)]);else{const _0x3f6723=Date[_0x43e9(0x1d)](),_0x4584e5=await _0x25dc84[_0x43e9(0x31)](fetch,API_CONFIG[_0x43e9(0x32)]+'/health',{'method':'GET','headers':{'Accept':'application/json'}}),_0x5c1b7e=_0x25dc84[_0x43e9(0x33)](Date[_0x43e9(0x1d)](),_0x3f6723),_0x5c10a3=await _0x4584e5[_0x43e9(0x34)]()[_0x43e9(0x35)](()=>_0x43e9(0x36));_0x1e6401['tests'][_0x43e9(0x37)]=_0x4584e5['ok'],_0x1e6401[_0x43e9(0x22)][_0x43e9(0x38)]={'status':_0x4584e5['status'],'time':_0x5c1b7e,'body':_0x5c10a3[_0x43e9(0x39)](0x0,0xc8)},_0x4584e5['ok']?console[_0x43e9(0x15)]('\x20\x20\x20✅\x20PASS\x20-\x20API\x20reachable\x20('+_0x5c1b7e+_0x43e9(0x25)):(console['log'](_0x43e9(0x3a)+_0x4584e5['status']),_0x1e6401[_0x43e9(0x28)][_0x43e9(0x2c)]('API\x20returned\x20status\x20'+_0x4584e5[_0x43e9(0x23)]));}}catch(_0x414f40){const _0x176fcd=_0x25dc84[_0x43e9(0x3b)][_0x43e9(0x3c)]('|');let _0xe1b5b9=0x0;while(!![]){switch(_0x176fcd[_0xe1b5b9++]){case'0':_0x1e6401[_0x43e9(0x20)][_0x43e9(0x37)]=![];continue;case'1':console[_0x43e9(0x15)](_0x43e9(0x2b)+_0x414f40['message']);continue;case'2':_0x1e6401[_0x43e9(0x20)][_0x43e9(0x21)]&&_0x1e6401[_0x43e9(0x3d)][_0x43e9(0x2c)](_0x43e9(0x3e));continue;case'3':_0x1e6401[_0x43e9(0x28)][_0x43e9(0x2c)](_0x43e9(0x3f)+_0x414f40[_0x43e9(0x2a)]);continue;case'4':_0x1e6401['rawResults'][_0x43e9(0x38)]={'error':_0x414f40[_0x43e9(0x2a)]};continue;}break;}}console['log']('\n\uD83E\uDDEA Test 3: POST Request (OAuth simulation)');try{if(_0x25dc84[_0x43e9(0x40)](_0x25dc84[_0x43e9(0x41)],_0x25dc84[_0x43e9(0x42)])){const _0x2916b7=Date['now'](),_0x3b8649=await _0x25dc84['mZSDa'](fetch,API_CONFIG['BASE_URL']+'/youtube/authorize',{'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/json'},'body':JSON[_0x43e9(0x43)]({'session':{'username':_0x43e9(0x44),'platform':_0x25dc84[_0x43e9(0x45)],'timestamp':new Date()[_0x43e9(0x46)]()}})}),_0x3b9b48=_0x25dc84[_0x43e9(0x47)](Date[_0x43e9(0x1d)](),_0x2916b7),_0x8bdea7=await _0x3b8649[_0x43e9(0x34)]()[_0x43e9(0x35)](()=>_0x43e9(0x36));_0x1e6401[_0x43e9(0x22)][_0x43e9(0x48)]={'status':_0x3b8649[_0x43e9(0x23)],'time':_0x3b9b48,'body':_0x8bdea7[_0x43e9(0x39)](0x0,0x1f4)},_0x1e6401[_0x43e9(0x20)]['apiPostWorks']=!![],console[_0x43e9(0x15)]('\x20\x20\x20✅\x20PASS\x20-\x20POST\x20request\x20succeeded,\x20status:\x20'+_0x3b8649['status']+'\x20('+_0x3b9b48+_0x43e9(0x25));try{const _0x5ee9c5=JSON[_0x43e9(0x49)](_0x8bdea7);_0x5ee9c5[_0x43e9(0x4a)]&&(_0x25dc84['XwlDv']===_0x25dc84[_0x43e9(0x4b)]?(_0x5dd93f[_0x43e9(0x20)]['apiReachable']=![],_0x3d0107[_0x43e9(0x28)][_0x43e9(0x2c)](_0x43e9(0x3f)+_0x2fd0ad['message']),_0x6d929f[_0x43e9(0x22)][_0x43e9(0x38)]={'error':_0x28149c[_0x43e9(0x2a)]},_0xe92b02[_0x43e9(0x15)](_0x43e9(0x2b)+_0x31fa7f[_0x43e9(0x2a)]),_0x1cedf3[_0x43e9(0x20)][_0x43e9(0x21)]&&_0x3f917f[_0x43e9(0x3d)][_0x43e9(0x2c)]('Internet\x20works\x20but\x20API\x20blocked.\x20Check:\x20VPN,\x20Firewall,\x20iOS\x20ATS\x20settings')):(_0x1e6401[_0x43e9(0x20)][_0x43e9(0x4c)]=!![],console['log']('\x20\x20\x20✅\x20BONUS\x20-\x20Got\x20YouTube\x20OAuth\x20URL!')));}catch{}}else{const _0x44be23=_0x25dc84['EvosT'][_0x43e9(0x3c)]('|');let _0x40af32=0x0;while(!![]){switch(_0x44be23[_0x40af32++]){case'0':_0x149c8a[_0x43e9(0x3d)][_0x43e9(0x2c)]('Check\x20internet\x20connection\x20on\x20device');continue;case'1':_0x191887[_0x43e9(0x22)][_0x43e9(0x2d)]={'error':_0x4da86f[_0x43e9(0x2a)]};continue;case'2':_0x12aa4f['errors'][_0x43e9(0x2c)]('Google\x20unreachable:\x20'+_0x1de516[_0x43e9(0x2a)]);continue;case'3':_0x5bca5d[_0x43e9(0x15)]('\x20\x20\x20❌\x20FAIL\x20-\x20'+_0x5ecc46[_0x43e9(0x2a)]);continue;case'4':_0x21bd22[_0x43e9(0x20)][_0x43e9(0x21)]=![];continue;}break;}}}catch(_0x69ff80){_0x1e6401[_0x43e9(0x20)][_0x43e9(0x4d)]=![],_0x1e6401[_0x43e9(0x28)][_0x43e9(0x2c)](_0x43e9(0x4e)+_0x69ff80[_0x43e9(0x2a)]),_0x1e6401[_0x43e9(0x22)][_0x43e9(0x48)]={'error':_0x69ff80[_0x43e9(0x2a)]},console[_0x43e9(0x15)](_0x43e9(0x2b)+_0x69ff80[_0x43e9(0x2a)]),_0x1e6401[_0x43e9(0x3d)][_0x43e9(0x2c)]('POST requests failing. This is the exact issue affecting OAuth.');}console[_0x43e9(0x15)](_0x25dc84['KusgD']),console[_0x43e9(0x15)](_0x25dc84[_0x43e9(0x4f)]),console[_0x43e9(0x15)](_0x25dc84['PWfax']);const _0x2b99f5=Object[_0x43e9(0x50)](_0x1e6401[_0x43e9(0x20)])[_0x43e9(0x51)](Boolean)[_0x43e9(0x52)],_0x16a43e=Object[_0x43e9(0x53)](_0x1e6401[_0x43e9(0x20)])[_0x43e9(0x52)];return console[_0x43e9(0x15)](_0x43e9(0x54)+_0x2b99f5+'/'+_0x16a43e),_0x25dc84[_0x43e9(0x55)](_0x2b99f5,_0x16a43e)?console[_0x43e9(0x15)]('\x0a✅\x20ALL\x20TESTS\x20PASSED\x20-\x20SDK\x20should\x20work\x20correctly'):(console[_0x43e9(0x15)](_0x25dc84[_0x43e9(0x56)]),_0x25dc84[_0x43e9(0x57)](Platform['OS'],_0x43e9(0x58))&&!_0x1e6401[_0x43e9(0x20)]['apiReachable']&&(_0x25dc84[_0x43e9(0x59)](_0x43e9(0x5a),_0x43e9(0x5b))?_0x3539b0['recommendations'][_0x43e9(0x2c)](_0x25dc84[_0x43e9(0x5c)]):_0x1e6401['recommendations']['push'](_0x43e9(0x5d),_0x25dc84['tYwUn'])),!_0x1e6401['tests'][_0x43e9(0x21)]&&_0x1e6401[_0x43e9(0x3d)][_0x43e9(0x2c)](_0x25dc84[_0x43e9(0x5e)]),console['log'](_0x25dc84[_0x43e9(0x5f)]),_0x1e6401[_0x43e9(0x3d)][_0x43e9(0x60)]((_0x3c00d9,_0xb8c25c)=>{_0x25dc84[_0x43e9(0x59)](_0x25dc84[_0x43e9(0x61)],_0x43e9(0x62))?(_0x3de906[_0x43e9(0x20)]['youtubeOAuthWorks']=!![],_0x439523[_0x43e9(0x15)](_0x43e9(0x63))):console[_0x43e9(0x15)](_0x43e9(0x64)+_0x25dc84[_0x43e9(0x65)](_0xb8c25c,0x1)+'.\x20'+_0x3c00d9);})),console['log'](_0x43e9(0x66)),console[_0x43e9(0x15)](_0x43e9(0x67)),console[_0x43e9(0x15)](JSON['stringify'](_0x1e6401,null,0x2)),_0x1e6401;};function _0x43e9(_0x3e5ace,_0x43e9e1){_0x3e5ace=_0x3e5ace-0x0;const _0xd74e9b=_0x3e5a();let _0x1f7ecd=_0xd74e9b[_0x3e5ace];return _0x1f7ecd;}export const isApiReachable=async()=>{const _0x18bfac={'QmAHC':_0x43e9(0x68),'gwkVj':function(_0x16f7eb,_0x394f7f){return _0x16f7eb!==_0x394f7f;},'BRTpR':_0x43e9(0x69)};try{if(_0x18bfac[_0x43e9(0x6a)](_0x18bfac[_0x43e9(0x6b)],_0x18bfac[_0x43e9(0x6b)]))return _0x18bfac['QmAHC'];else{const _0x18db56=await fetch(API_CONFIG['BASE_URL']+'/health',{'method':'GET'});return _0x18db56['ok'];}}catch{return![];}};export const getNetworkStatus=async()=>{const _0x973b7={'Jpnnn':_0x43e9(0x6c),'Ooxva':function(_0x1023fc,_0x48d078){return _0x1023fc!==_0x48d078;},'hyRWu':'GOPEv','AgkLf':function(_0x4fa0a4,_0x377f44,_0x2be666){return _0x4fa0a4(_0x377f44,_0x2be666);},'AzbVX':_0x43e9(0x3),'gKjtb':_0x43e9(0x4),'wqcDg':_0x43e9(0x6d),'XtUnz':_0x43e9(0x68),'Jtnow':function(_0x45484f,_0x115c1d){return _0x45484f!==_0x115c1d;},'rvgop':_0x43e9(0x6e)};try{if(_0x973b7[_0x43e9(0x6f)](_0x43e9(0x70),_0x973b7['hyRWu']))_0x132520[_0x43e9(0x15)](_0x973b7[_0x43e9(0x71)]);else{await _0x973b7[_0x43e9(0x72)](fetch,_0x973b7[_0x43e9(0x73)],{'method':_0x973b7[_0x43e9(0x74)]});const _0x536514=await fetch(API_CONFIG[_0x43e9(0x32)]+_0x43e9(0x75));return _0x536514['ok']?_0x973b7[_0x43e9(0x76)]:_0x973b7[_0x43e9(0x77)];}}catch{if(_0x973b7[_0x43e9(0x78)](_0x973b7[_0x43e9(0x79)],'huJxO'))return'offline';else{const _0x5f1a62=_0x347da7[_0x43e9(0x49)](_0x58688a);_0x5f1a62[_0x43e9(0x4a)]&&(_0x23e863[_0x43e9(0x20)][_0x43e9(0x4c)]=!![],_0x3d9d2d[_0x43e9(0x15)](_0x43e9(0x63)));}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x5c9b(){const _0x20e07d=['type','code','details','fetch','oqsXt','isConnected','Request\x20timed\x20out','timeout_error','No\x20username\x20available\x20-\x20either\x20provide\x20username\x20or\x20ensure\x20JWT\x20token\x20is\x20valid','auth_error','validation_error','server_error','API\x20request\x20failed','No\x20network\x20connection\x20available','network_error','hSjtv','tkahe','[REDACTED]','maKwi','User\x20API\x20Response','bdCQC','User\x20API\x20Error','Unknown\x20error','eAUlb','eesUm','HCuKn','LRdmv','xLRvk','xxMHw','wYIXM','HsBYW','XnKCS','YtBfi','Mhpqe','message','YQcPY','rtHwP','json','JOOFE','wrvDd','voxAf','status','gjKLD','MegnU','QiZXU','error','MbrxJ','FaMYR','name','AbortError','HHaGa','iZICq','naZdt','TeFdK','ruFlQ','SPfGJ','QKKQN','HwdaP','An\x20unexpected\x20error\x20occurred','unknown_error','Developer\x20API\x20Error','store-pin/mobile','tDIuN','XuCzZ','Developer\x20API\x20Request','Developer\x20API\x20Response','vvoRH','SahlQ','JjYum','TyEpW','MYmUw','phcev','tcnad','bPLnC','kDjhD','vWNqt','obtTH','SCWAk','AMuFu','wTQIH','MHmOi','gGVaT','stringify','iWXss','TXmIk','bhNyP','lcaBE','AzSGT','UEGzN','jnSpE','ZDljK','OLato','ivPhT','KTgKk','klIAu','rNuHb','bjAiZ','DQXVU','auth/validate','irrto','debug','success','wlklF','data','rgzYz','isValid','JXWtz','auth/register','EwlXr','NcTfH','username','platforms','auth/login','RvqWI','GhbjJ','yPNxj','yFaEm','VfcGf','platforms/','/data','BxHay','KcqJD','MDAaF','eypiU','LIjKo','kpaPo','eXgHC','DzVno'];_0x5c9b=function(){return _0x20e07d;};return _0x5c9b();}import NetInfo from'@react-native-community/netinfo';import{logDebug}from'./debugHelper';import{getJWT,makeUserRequest,makeDeveloperRequest,isUserAuthenticated,extractUsernameFromJWT}from'../services/apiKeyService';export class ApiError extends Error{constructor(_0x457972,_0x25bb87,_0x14314c,_0x137846){super(_0x457972),this[_0x3da4(0x0)]=_0x25bb87,this[_0x3da4(0x1)]=_0x14314c,this[_0x3da4(0x2)]=_0x137846,this['name']='ApiError';}}const checkNetworkConnection=async()=>{const _0x5ab6b4={'oqsXt':function(_0xeac4ae,_0x1da370){return _0xeac4ae===_0x1da370;}},_0x8ab78f=await NetInfo[_0x3da4(0x3)]();return _0x5ab6b4[_0x3da4(0x4)](_0x8ab78f[_0x3da4(0x5)],!![]);},makeUserApiRequest=async(_0x11971a,_0x5c6dc4,_0x999c10={})=>{const _0x45f2ea={'xxMHw':_0x3da4(0x6),'wYIXM':_0x3da4(0x7),'nhNbQ':_0x3da4(0x8),'XnKCS':_0x3da4(0x9),'iZICq':function(_0x462224,_0x220719){return _0x462224===_0x220719;},'mlPfL':_0x3da4(0xa),'naZdt':function(_0x5ed40a,_0x244202){return _0x5ed40a>=_0x244202;},'MegnU':_0x3da4(0xb),'QiZXU':'unknown_error','gjKLD':function(_0xc15980,_0x573d5e){return _0xc15980===_0x573d5e;},'TeFdK':_0x3da4(0xc),'ruFlQ':function(_0x531928,_0x4264fd){return _0x531928===_0x4264fd;},'eAUlb':function(_0x2931c6){return _0x2931c6();},'eesUm':_0x3da4(0xd),'HCuKn':_0x3da4(0xe),'LRdmv':function(_0x40f8e3,_0x3558f5){return _0x40f8e3!==_0x3558f5;},'xLRvk':'AGjKK','HsBYW':'User\x20not\x20authenticated.\x20Please\x20verify\x20email\x20first.','YtBfi':_0x3da4(0xf),'Mhpqe':_0x3da4(0x10),'YQcPY':function(_0x2b04fb,_0x58df07,_0x1152ce){return _0x2b04fb(_0x58df07,_0x1152ce);},'VOqNa':'User\x20API\x20Request','mDKNd':_0x3da4(0x11),'rtHwP':function(_0x22054a,_0x55d0f1){return _0x22054a||_0x55d0f1;},'wrvDd':_0x3da4(0x12),'voxAf':_0x3da4(0x13),'XSKmk':function(_0x1e5bf6,_0x115571){return _0x1e5bf6===_0x115571;},'MbrxJ':function(_0x45e88f,_0x1b10a3){return _0x45e88f===_0x1b10a3;},'FaMYR':function(_0x4d1a78,_0x5f0b52){return _0x4d1a78===_0x5f0b52;},'HHaGa':_0x3da4(0x14),'SPfGJ':function(_0x456a18,_0x2e1ed0,_0x17c21b){return _0x456a18(_0x2e1ed0,_0x17c21b);},'QKKQN':_0x3da4(0x15),'HwdaP':_0x3da4(0x16)},{data:_0xbdfec7,headers:headers={},debug:debug=![]}=_0x999c10;try{const _0x4757c6=await _0x45f2ea[_0x3da4(0x17)](checkNetworkConnection);if(!_0x4757c6)throw new ApiError(_0x45f2ea[_0x3da4(0x18)],_0x45f2ea[_0x3da4(0x19)]);if(!_0x45f2ea['eAUlb'](isUserAuthenticated)){if(_0x45f2ea[_0x3da4(0x1a)](_0x45f2ea[_0x3da4(0x1b)],_0x45f2ea[_0x3da4(0x1b)]))throw new _0x29f97f(_0x45f2ea[_0x3da4(0x1c)],_0x45f2ea[_0x3da4(0x1d)]);else throw new ApiError(_0x45f2ea[_0x3da4(0x1e)],_0x45f2ea[_0x3da4(0x1f)]);}if(debug){if(_0x45f2ea[_0x3da4(0x20)]===_0x45f2ea[_0x3da4(0x21)])return{'isValid':![],'message':_0x1f32fc[_0x3da4(0x22)]};else _0x45f2ea[_0x3da4(0x23)](logDebug,_0x45f2ea['VOqNa'],{'endpoint':_0x11971a,'method':_0x5c6dc4,'headers':{...headers,'Authorization':_0x45f2ea['mDKNd']},'data':_0x45f2ea[_0x3da4(0x24)](_0xbdfec7,null)});}const _0x389669=await _0x45f2ea[_0x3da4(0x23)](makeUserRequest,_0x11971a,{'method':_0x5c6dc4,'headers':headers,..._0xbdfec7?{'body':JSON['stringify'](_0xbdfec7)}:{}}),_0xe5b040=await _0x389669[_0x3da4(0x25)]();if(debug){if(_0x45f2ea['ruFlQ'](_0x3da4(0x26),_0x45f2ea[_0x3da4(0x27)]))throw new _0xa44695(_0x45f2ea['nhNbQ'],_0x45f2ea[_0x3da4(0x1f)]);else _0x45f2ea[_0x3da4(0x23)](logDebug,_0x45f2ea[_0x3da4(0x28)],{'status':_0x389669[_0x3da4(0x29)],'data':_0xe5b040});}if(!_0x389669['ok']){var _0xfbc3b7,_0x1a6443,_0x806c42;const _0x1c6e96=_0x45f2ea[_0x3da4(0x2a)](_0x389669[_0x3da4(0x29)],0x191)||_0x45f2ea['ruFlQ'](_0x389669[_0x3da4(0x29)],0x193)?_0x3da4(0x9):_0x45f2ea['XSKmk'](_0x389669[_0x3da4(0x29)],0x190)?'validation_error':_0x389669[_0x3da4(0x29)]>=0x1f4?_0x45f2ea[_0x3da4(0x2b)]:_0x45f2ea[_0x3da4(0x2c)];throw new ApiError((_0x45f2ea['iZICq'](_0xfbc3b7=_0xe5b040[_0x3da4(0x2d)],null)||_0x45f2ea['ruFlQ'](_0xfbc3b7,void 0x0)?void 0x0:_0xfbc3b7[_0x3da4(0x22)])||_0x45f2ea['TeFdK'],_0x1c6e96,_0x45f2ea[_0x3da4(0x2e)](_0x1a6443=_0xe5b040['error'],null)||_0x1a6443===void 0x0?void 0x0:_0x1a6443['code'],(_0x806c42=_0xe5b040['error'])===null||_0x45f2ea[_0x3da4(0x2f)](_0x806c42,void 0x0)?void 0x0:_0x806c42['details']);}return _0xe5b040;}catch(_0x5186d6){if(_0x5186d6 instanceof ApiError)throw _0x5186d6;if(_0x45f2ea[_0x3da4(0x2e)](_0x5186d6[_0x3da4(0x30)],_0x3da4(0x31))){if(_0x45f2ea[_0x3da4(0x32)]===_0x45f2ea[_0x3da4(0x32)])throw new ApiError(_0x45f2ea[_0x3da4(0x1c)],_0x45f2ea[_0x3da4(0x1d)]);else{var _0x4c7985,_0x569472,_0x4fbae1;const _0x3f288e=_0x45f2ea[_0x3da4(0x33)](_0x24b470[_0x3da4(0x29)],0x191)||_0x45f2ea[_0x3da4(0x33)](_0x8de512[_0x3da4(0x29)],0x193)?_0x45f2ea[_0x3da4(0x1f)]:_0x45f2ea[_0x3da4(0x33)](_0x1d5f70[_0x3da4(0x29)],0x190)?_0x45f2ea['mlPfL']:_0x45f2ea[_0x3da4(0x34)](_0xca0450[_0x3da4(0x29)],0x1f4)?_0x45f2ea['MegnU']:_0x45f2ea[_0x3da4(0x2c)];throw new _0x2265de((_0x45f2ea[_0x3da4(0x2a)](_0x4c7985=_0x21f549[_0x3da4(0x2d)],null)||_0x4c7985===void 0x0?void 0x0:_0x4c7985[_0x3da4(0x22)])||_0x45f2ea[_0x3da4(0x35)],_0x3f288e,(_0x569472=_0x42db27['error'])===null||_0x569472===void 0x0?void 0x0:_0x569472[_0x3da4(0x1)],_0x45f2ea[_0x3da4(0x36)](_0x4fbae1=_0x1d8df7[_0x3da4(0x2d)],null)||_0x4fbae1===void 0x0?void 0x0:_0x4fbae1['details']);}}debug&&_0x45f2ea[_0x3da4(0x37)](logDebug,_0x45f2ea[_0x3da4(0x38)],{'endpoint':_0x11971a,'method':_0x5c6dc4,'error':_0x5186d6[_0x3da4(0x22)]||_0x45f2ea[_0x3da4(0x39)]});throw new ApiError(_0x5186d6[_0x3da4(0x22)]||_0x3da4(0x3a),_0x45f2ea[_0x3da4(0x2c)]);}},makeDeveloperApiRequest=async(_0x263108,_0x4fa486,_0x4fbfae={})=>{const _0x42f846={'kDjhD':function(_0x13d759,_0x47c711){return _0x13d759 instanceof _0x47c711;},'vWNqt':function(_0x35b7e7,_0x1cf4a2){return _0x35b7e7===_0x1cf4a2;},'KTgKk':'AbortError','obtTH':_0x3da4(0x6),'klIAu':_0x3da4(0x7),'SCWAk':function(_0x218d49,_0x57fcb4,_0x5dada4){return _0x218d49(_0x57fcb4,_0x5dada4);},'AMwGd':_0x3da4(0x15),'TXmIk':_0x3da4(0x16),'AMuFu':_0x3da4(0x3b),'MZpAY':_0x3da4(0x3c),'cXgiC':function(_0x3c80eb){return _0x3c80eb();},'nsZfZ':'No\x20username\x20available\x20-\x20either\x20provide\x20username\x20or\x20ensure\x20JWT\x20token\x20is\x20valid','ZDljK':_0x3da4(0x9),'OLato':function(_0x9026db,_0x1df211,_0x3dad56,_0x4f46fb){return _0x9026db(_0x1df211,_0x3dad56,_0x4f46fb);},'ivPhT':_0x3da4(0x3d),'bjAiZ':function(_0x16d255,_0xee63a4,_0x586fce){return _0x16d255(_0xee63a4,_0x586fce);},'tcnad':function(_0x396015,_0x505b27){return _0x396015!==_0x505b27;},'MYmUw':_0x3da4(0x3e),'nBnso':function(_0x3dd017){return _0x3dd017();},'phcev':_0x3da4(0xd),'bPLnC':_0x3da4(0x3f),'wTQIH':function(_0x4cd7e2,_0x4ab267,_0x483794){return _0x4cd7e2(_0x4ab267,_0x483794);},'MHmOi':_0x3da4(0x40),'gGVaT':function(_0x2ae70d,_0x35919e){return _0x2ae70d||_0x35919e;},'DQXVU':function(_0x52b2e1,_0x1152d7,_0x4c5154){return _0x52b2e1(_0x1152d7,_0x4c5154);},'oeMcO':_0x3da4(0x41),'iWXss':_0x3da4(0x42),'bhNyP':'validation_error','lcaBE':function(_0x48953c,_0x58715f){return _0x48953c>=_0x58715f;},'AzSGT':_0x3da4(0xb),'UEGzN':function(_0x62635b,_0xdd0adf){return _0x62635b===_0xdd0adf;},'hHVnk':_0x3da4(0x43),'jnSpE':_0x3da4(0x44),'rNuHb':'uSQsk'},{data:_0x562322,headers:headers={},debug:debug=![]}=_0x4fbfae;try{if(_0x42f846['tcnad'](_0x3da4(0x45),_0x42f846[_0x3da4(0x46)])){const _0x3866a9=await _0x42f846['nBnso'](checkNetworkConnection);if(!_0x3866a9)throw new ApiError(_0x42f846[_0x3da4(0x47)],_0x3da4(0xe));if(debug){if(_0x42f846[_0x3da4(0x48)](_0x42f846[_0x3da4(0x49)],_0x42f846['bPLnC'])){if(_0x42f846[_0x3da4(0x4a)](_0x4ca751,_0x122261))throw _0x3064a6;if(_0x42f846[_0x3da4(0x4b)](_0x309ac2[_0x3da4(0x30)],_0x42f846['KTgKk']))throw new _0x46b09b(_0x42f846[_0x3da4(0x4c)],_0x42f846['klIAu']);_0x502d4a&&_0x42f846[_0x3da4(0x4d)](_0x557889,_0x42f846['AMwGd'],{'endpoint':_0x43b81d,'method':_0x3c28ae,'error':_0x131a96[_0x3da4(0x22)]||_0x42f846['TXmIk']});throw new _0x212fbf(_0x2b498c[_0x3da4(0x22)]||_0x3da4(0x3a),_0x42f846[_0x3da4(0x4e)]);}else _0x42f846[_0x3da4(0x4f)](logDebug,_0x42f846[_0x3da4(0x50)],{'endpoint':_0x263108,'method':_0x4fa486,'headers':{...headers,'Authorization':_0x3da4(0x11)},'data':_0x42f846[_0x3da4(0x51)](_0x562322,null)});}const _0x521c62=await _0x42f846['DQXVU'](makeDeveloperRequest,_0x263108,{'method':_0x4fa486,'headers':headers,..._0x562322?{'body':JSON[_0x3da4(0x52)](_0x562322)}:{}}),_0x50ed3d=await _0x521c62[_0x3da4(0x25)]();debug&&logDebug(_0x42f846['oeMcO'],{'status':_0x521c62['status'],'data':_0x50ed3d});if(!_0x521c62['ok']){if(_0x42f846[_0x3da4(0x53)]!==_0x42f846[_0x3da4(0x53)])_0x42f846[_0x3da4(0x4d)](_0x5bb9d5,_0x42f846['MZpAY'],{'endpoint':_0x267eca,'method':_0x22251c,'error':_0x134811['message']||_0x42f846[_0x3da4(0x54)]});else{var _0x4d6e11,_0x556bc2,_0x1ef0bf;const _0x443719=_0x42f846[_0x3da4(0x4b)](_0x521c62[_0x3da4(0x29)],0x191)||_0x42f846['vWNqt'](_0x521c62[_0x3da4(0x29)],0x193)?'auth_error':_0x42f846[_0x3da4(0x4b)](_0x521c62[_0x3da4(0x29)],0x190)?_0x42f846[_0x3da4(0x55)]:_0x42f846[_0x3da4(0x56)](_0x521c62['status'],0x1f4)?_0x42f846[_0x3da4(0x57)]:_0x42f846[_0x3da4(0x4e)];throw new ApiError((_0x42f846[_0x3da4(0x4b)](_0x4d6e11=_0x50ed3d[_0x3da4(0x2d)],null)||_0x42f846[_0x3da4(0x4b)](_0x4d6e11,void 0x0)?void 0x0:_0x4d6e11['message'])||'API\x20request\x20failed',_0x443719,_0x42f846['vWNqt'](_0x556bc2=_0x50ed3d[_0x3da4(0x2d)],null)||_0x42f846[_0x3da4(0x4b)](_0x556bc2,void 0x0)?void 0x0:_0x556bc2[_0x3da4(0x1)],_0x42f846[_0x3da4(0x4b)](_0x1ef0bf=_0x50ed3d['error'],null)||_0x42f846[_0x3da4(0x58)](_0x1ef0bf,void 0x0)?void 0x0:_0x1ef0bf[_0x3da4(0x2)]);}}return _0x50ed3d;}else throw _0x4c06cc;}catch(_0x4d6fdf){if(_0x4d6fdf instanceof ApiError){if(_0x42f846['hHVnk']===_0x42f846[_0x3da4(0x59)]){const {debug:debug=![],username:_0x3ef1df}=_0x2731b7,_0x57c724=_0x3ef1df||_0x42f846['cXgiC'](_0x48b480);if(!_0x57c724)throw new _0x387803(_0x42f846['nsZfZ'],_0x42f846[_0x3da4(0x5a)]);return _0x42f846[_0x3da4(0x5b)](_0x27bde0,_0x42f846[_0x3da4(0x5c)],'POST',{'data':{'username':_0x57c724,'pin':_0x4f7d6c},'debug':debug});}else throw _0x4d6fdf;}if(_0x42f846[_0x3da4(0x58)](_0x4d6fdf['name'],_0x42f846[_0x3da4(0x5d)]))throw new ApiError(_0x42f846['obtTH'],_0x42f846[_0x3da4(0x5e)]);debug&&(_0x42f846['tcnad'](_0x42f846[_0x3da4(0x5f)],_0x42f846[_0x3da4(0x5f)])?_0x42f846[_0x3da4(0x60)](_0x3af6f8,_0x42f846['AMwGd'],{'endpoint':_0x3bce7b,'method':_0x320745,'error':_0x2b7781[_0x3da4(0x22)]||_0x42f846['TXmIk']}):_0x42f846[_0x3da4(0x61)](logDebug,_0x3da4(0x3c),{'endpoint':_0x263108,'method':_0x4fa486,'error':_0x4d6fdf[_0x3da4(0x22)]||_0x42f846[_0x3da4(0x54)]}));throw new ApiError(_0x4d6fdf[_0x3da4(0x22)]||_0x3da4(0x3a),_0x3da4(0x3b));}};export const validateCredentials=async(_0x20e351,_0x26c69f={'debug':![]})=>{const _0x3287fc={'irrto':function(_0x4f0ae8,_0x9edec,_0x31ba09,_0x4af7b8){return _0x4f0ae8(_0x9edec,_0x31ba09,_0x4af7b8);},'Ulhkm':_0x3da4(0x62),'wlklF':function(_0x503243,_0x59de46){return _0x503243===_0x59de46;},'rgzYz':function(_0x529311,_0x2762c1){return _0x529311===_0x2762c1;},'JXWtz':function(_0x58fa5b,_0x4c165e){return _0x58fa5b===_0x4c165e;}};try{var _0x3a37ad,_0x5db92f;const _0x277ef5=await _0x3287fc[_0x3da4(0x63)](makeUserApiRequest,_0x3287fc['Ulhkm'],'POST',{'data':{'username':_0x20e351},'debug':_0x26c69f[_0x3da4(0x64)]});return{'isValid':_0x277ef5[_0x3da4(0x65)]&&_0x3287fc[_0x3da4(0x66)](_0x3287fc['wlklF'](_0x3a37ad=_0x277ef5[_0x3da4(0x67)],null)||_0x3287fc[_0x3da4(0x68)](_0x3a37ad,void 0x0)?void 0x0:_0x3a37ad[_0x3da4(0x69)],!![]),'message':(_0x5db92f=_0x277ef5[_0x3da4(0x2d)])===null||_0x3287fc[_0x3da4(0x6a)](_0x5db92f,void 0x0)?void 0x0:_0x5db92f[_0x3da4(0x22)]};}catch(_0xf88db){return{'isValid':![],'message':_0xf88db['message']};}};export const createAccount=async(_0x393408,_0x215e38={'debug':![]})=>{const _0x29641a={'EwlXr':function(_0x56f374,_0x4b7ec4,_0x4c4029,_0x22ec85){return _0x56f374(_0x4b7ec4,_0x4c4029,_0x22ec85);},'NcTfH':_0x3da4(0x6b)};return _0x29641a[_0x3da4(0x6c)](makeDeveloperApiRequest,_0x29641a[_0x3da4(0x6d)],'POST',{'data':{'username':_0x393408[_0x3da4(0x6e)],'platforms':_0x393408[_0x3da4(0x6f)]},'debug':_0x215e38[_0x3da4(0x64)]});};export const authenticate=async(_0x408fa4,_0x25e407={'debug':![]})=>{const _0x78f8a2={'RvqWI':function(_0x4396f6,_0x133972,_0x3b5379,_0x51b57c){return _0x4396f6(_0x133972,_0x3b5379,_0x51b57c);},'GhbjJ':_0x3da4(0x70)};return _0x78f8a2[_0x3da4(0x71)](makeUserApiRequest,_0x78f8a2[_0x3da4(0x72)],'POST',{'data':{'username':_0x408fa4[_0x3da4(0x6e)],'pin':_0x408fa4['userPin']},'debug':_0x25e407[_0x3da4(0x64)]});};export const refreshToken=async(_0x4b7461,_0x270e2d={'debug':![]})=>{const _0x280930={'yPNxj':function(_0x431103,_0x21a898,_0x3ba96e,_0x908447){return _0x431103(_0x21a898,_0x3ba96e,_0x908447);},'yFaEm':'auth/refresh'};return _0x280930[_0x3da4(0x73)](makeUserApiRequest,_0x280930[_0x3da4(0x74)],'POST',{'data':{'refreshToken':_0x4b7461},'debug':_0x270e2d[_0x3da4(0x64)]});};export const getPlatformData=async(_0x461b66,_0x1d912a={'debug':![]})=>{const _0x2d7137={'VfcGf':function(_0x292041,_0x31c1e0,_0x4fc888,_0x14d27e){return _0x292041(_0x31c1e0,_0x4fc888,_0x14d27e);}};return _0x2d7137[_0x3da4(0x75)](makeUserApiRequest,_0x3da4(0x76)+_0x461b66+_0x3da4(0x77),'GET',{'debug':_0x1d912a['debug']});};function _0x3da4(_0x5c9bfa,_0x3da41f){_0x5c9bfa=_0x5c9bfa-0x0;const _0x19bb1a=_0x5c9b();let _0x495e97=_0x19bb1a[_0x5c9bfa];return _0x495e97;}export const getUserProfile=async(_0x973c73={'debug':![]})=>{const _0x4bcf95={'BxHay':function(_0x1e465e,_0x2b67c6,_0x35958e,_0x2b9a7a){return _0x1e465e(_0x2b67c6,_0x35958e,_0x2b9a7a);},'KcqJD':'user/profile'};return _0x4bcf95[_0x3da4(0x78)](makeUserApiRequest,_0x4bcf95[_0x3da4(0x79)],'GET',{'debug':_0x973c73[_0x3da4(0x64)]});};export const updatePlatformConnections=async(_0x435fa8,_0x35992f={'debug':![]})=>{const _0x4d29bd={'MDAaF':function(_0x15c386,_0x5c88c6,_0x3ae46e,_0xf07cb1){return _0x15c386(_0x5c88c6,_0x3ae46e,_0xf07cb1);},'eypiU':'user/platforms'};return _0x4d29bd[_0x3da4(0x7a)](makeUserApiRequest,_0x4d29bd[_0x3da4(0x7b)],'PUT',{'data':{'platforms':_0x435fa8},'debug':_0x35992f[_0x3da4(0x64)]});};export const storePIN=async(_0x43bb67,_0x5c28fb={})=>{const _0x30b341={'zzeta':function(_0x3d5ec8){return _0x3d5ec8();},'LIjKo':'No\x20username\x20available\x20-\x20either\x20provide\x20username\x20or\x20ensure\x20JWT\x20token\x20is\x20valid','kpaPo':'auth_error','eXgHC':'store-pin/mobile'},{debug:debug=![],username:_0x1cc22d}=_0x5c28fb,_0x4f26d9=_0x1cc22d||_0x30b341['zzeta'](extractUsernameFromJWT);if(!_0x4f26d9)throw new ApiError(_0x30b341[_0x3da4(0x7c)],_0x30b341[_0x3da4(0x7d)]);return makeUserApiRequest(_0x30b341[_0x3da4(0x7e)],'POST',{'data':{'username':_0x4f26d9,'pin':_0x43bb67},'debug':debug});};export const getCurrentUserToken=async()=>{return await getJWT();};export const isCurrentUserAuthenticated=()=>{const _0x2b3429={'DzVno':function(_0x4cb6d8){return _0x4cb6d8();}};return _0x2b3429[_0x3da4(0x7f)](isUserAuthenticated);};
|
|
1
|
+
import NetInfo from'@react-native-community/netinfo';import{logDebug}from'./debugHelper';import{getJWT,makeUserRequest,makeDeveloperRequest,isUserAuthenticated,extractUsernameFromJWT}from'../services/apiKeyService';function _0x421a(_0x4f7206,_0x421a05){_0x4f7206=_0x4f7206-0x0;const _0x57bb9a=_0x4f72();let _0x4afa62=_0x57bb9a[_0x4f7206];return _0x4afa62;}export class ApiError extends Error{constructor(_0x101dcf,_0x4c2db3,_0x59840d,_0x336596){const _0x34c3ab={'SceeS':_0x421a(0x0)},_0x97a712=_0x421a(0x1)['split']('|');let _0xb1758c=0x0;while(!![]){switch(_0x97a712[_0xb1758c++]){case'0':this['details']=_0x336596;continue;case'1':this['code']=_0x59840d;continue;case'2':this[_0x421a(0x2)]=_0x4c2db3;continue;case'3':super(_0x101dcf);continue;case'4':this[_0x421a(0x3)]=_0x34c3ab[_0x421a(0x4)];continue;}break;}}}const checkNetworkConnection=async()=>{const _0x49a737=await NetInfo['fetch']();return _0x49a737[_0x421a(0x5)]===!![];},makeUserApiRequest=async(_0x14e6e5,_0x4d7d95,_0x358125={})=>{const _0x346f14={'PnEpW':_0x421a(0x6),'AmEEL':_0x421a(0x7),'LiztS':_0x421a(0x8),'HaGsy':function(_0x293cfc,_0x6d68d6){return _0x293cfc===_0x6d68d6;},'mDOLG':_0x421a(0x9),'ultCu':function(_0x44f87e,_0xdff27){return _0x44f87e>=_0xdff27;},'LSOBX':function(_0x369be1,_0x40b4cd){return _0x369be1===_0x40b4cd;},'noZQi':function(_0x5c65e1,_0x5f1fa8){return _0x5c65e1===_0x5f1fa8;},'fAuKf':function(_0x52638d,_0x55d9f1){return _0x52638d===_0x55d9f1;},'SiXzu':function(_0x171ea1,_0x558b2e){return _0x171ea1===_0x558b2e;},'eMPrw':function(_0x5ebf6a){return _0x5ebf6a();},'QjLjV':'No\x20network\x20connection\x20available','ZSMno':_0x421a(0xa),'XCYCP':function(_0x53aa2a,_0x1452f9,_0x5a673d){return _0x53aa2a(_0x1452f9,_0x5a673d);},'WrAQg':'User\x20API\x20Request','MxMai':_0x421a(0xb),'ihvVu':'User\x20API\x20Response','htOuv':function(_0x5d6c3c,_0xb797ea){return _0x5d6c3c!==_0xb797ea;},'HaSuV':'HIiUZ','PTFpG':_0x421a(0xc),'OjpJl':function(_0x370af3,_0x4f92b4){return _0x370af3===_0x4f92b4;},'UFEqH':function(_0x53af71,_0x15d4f7){return _0x53af71>=_0x15d4f7;},'rzhXp':_0x421a(0xd),'mTTmm':function(_0x561549,_0x129747){return _0x561549===_0x129747;},'OsirI':function(_0x295dfb,_0x3eb154){return _0x295dfb===_0x3eb154;},'JBxbL':function(_0x3a7864,_0x2f0eb4){return _0x3a7864===_0x2f0eb4;},'unAlC':function(_0xb7b92f,_0x55a5b0){return _0xb7b92f instanceof _0x55a5b0;},'pwKYb':_0x421a(0xe),'XGsQb':_0x421a(0xf),'LDxui':_0x421a(0x10),'YXRVf':_0x421a(0x11),'fOWpc':function(_0x413641,_0x54f01b){return _0x413641===_0x54f01b;},'iOYZL':'DDCXh','fQSro':function(_0x473cd9,_0x46dba1,_0x187b7b){return _0x473cd9(_0x46dba1,_0x187b7b);},'gGKDK':'unknown_error'},{data:_0xc29fa1,headers:headers={},debug:debug=![]}=_0x358125;try{const _0xd68898=await _0x346f14['eMPrw'](checkNetworkConnection);if(!_0xd68898)throw new ApiError(_0x346f14[_0x421a(0x12)],_0x346f14[_0x421a(0x13)]);if(!isUserAuthenticated())throw new ApiError(_0x346f14[_0x421a(0x14)],_0x346f14[_0x421a(0x15)]);debug&&_0x346f14[_0x421a(0x16)](logDebug,_0x346f14[_0x421a(0x17)],{'endpoint':_0x14e6e5,'method':_0x4d7d95,'headers':{...headers,'Authorization':_0x346f14[_0x421a(0x18)]},'data':_0xc29fa1||null});const _0x3e2ebc=await _0x346f14[_0x421a(0x16)](makeUserRequest,_0x14e6e5,{'method':_0x4d7d95,'headers':headers,..._0xc29fa1?{'body':JSON[_0x421a(0x19)](_0xc29fa1)}:{}}),_0x3459b6=await _0x3e2ebc[_0x421a(0x1a)]();debug&&logDebug(_0x346f14['ihvVu'],{'status':_0x3e2ebc['status'],'data':_0x3459b6});if(!_0x3e2ebc['ok']){if(_0x346f14[_0x421a(0x1b)](_0x346f14[_0x421a(0x1c)],_0x346f14[_0x421a(0x1d)])){var _0x259b9f,_0x13a57a,_0xb975ad;const _0x15b617=_0x3e2ebc[_0x421a(0x1e)]===0x191||_0x346f14[_0x421a(0x1f)](_0x3e2ebc[_0x421a(0x1e)],0x193)?_0x346f14['AmEEL']:_0x3e2ebc[_0x421a(0x1e)]===0x190?_0x346f14[_0x421a(0x20)]:_0x346f14[_0x421a(0x21)](_0x3e2ebc[_0x421a(0x1e)],0x1f4)?_0x346f14[_0x421a(0x22)]:_0x421a(0x23);throw new ApiError((_0x346f14[_0x421a(0x24)](_0x259b9f=_0x3459b6[_0x421a(0x25)],null)||_0x346f14['noZQi'](_0x259b9f,void 0x0)?void 0x0:_0x259b9f[_0x421a(0x26)])||_0x421a(0x27),_0x15b617,_0x346f14[_0x421a(0x28)](_0x13a57a=_0x3459b6['error'],null)||_0x346f14[_0x421a(0x29)](_0x13a57a,void 0x0)?void 0x0:_0x13a57a[_0x421a(0x2a)],_0x346f14[_0x421a(0x2b)](_0xb975ad=_0x3459b6[_0x421a(0x25)],null)||_0x346f14[_0x421a(0x1f)](_0xb975ad,void 0x0)?void 0x0:_0xb975ad[_0x421a(0x2c)]);}else throw new _0x537730(_0x346f14['PnEpW'],_0x346f14[_0x421a(0x15)]);}return _0x3459b6;}catch(_0x5c4086){if(_0x346f14[_0x421a(0x2d)](_0x5c4086,ApiError)){if(_0x346f14['HaGsy'](_0x421a(0xe),_0x346f14[_0x421a(0x2e)]))throw _0x5c4086;else throw new _0x2dbc76(_0x421a(0x2f),_0x346f14[_0x421a(0x13)]);}if(_0x346f14['JBxbL'](_0x5c4086[_0x421a(0x3)],_0x346f14[_0x421a(0x30)]))throw new ApiError(_0x346f14['LDxui'],_0x346f14[_0x421a(0x31)]);if(debug){if(_0x346f14[_0x421a(0x32)]('DDCXh',_0x346f14[_0x421a(0x33)]))_0x346f14['fQSro'](logDebug,'User\x20API\x20Error',{'endpoint':_0x14e6e5,'method':_0x4d7d95,'error':_0x5c4086[_0x421a(0x26)]||_0x421a(0x34)});else{var _0xcf04d6,_0x2a729d,_0xb84385;const _0x4ef2d4=_0x346f14[_0x421a(0x35)](_0x52f223['status'],0x191)||_0x346f14['HaGsy'](_0x3eec3f['status'],0x193)?_0x346f14[_0x421a(0x15)]:_0x1367cd['status']===0x190?_0x346f14['mDOLG']:_0x346f14['ultCu'](_0x311a07[_0x421a(0x1e)],0x1f4)?_0x421a(0xd):_0x421a(0x23);throw new _0x21ed10(((_0xcf04d6=_0x424e16[_0x421a(0x25)])===null||_0x346f14['LSOBX'](_0xcf04d6,void 0x0)?void 0x0:_0xcf04d6['message'])||_0x421a(0x27),_0x4ef2d4,_0x346f14['LSOBX'](_0x2a729d=_0x44c3a4['error'],null)||_0x346f14['noZQi'](_0x2a729d,void 0x0)?void 0x0:_0x2a729d[_0x421a(0x2a)],_0x346f14[_0x421a(0x36)](_0xb84385=_0x134219['error'],null)||_0x346f14[_0x421a(0x37)](_0xb84385,void 0x0)?void 0x0:_0xb84385[_0x421a(0x2c)]);}}throw new ApiError(_0x5c4086[_0x421a(0x26)]||_0x421a(0x38),_0x346f14[_0x421a(0x39)]);}},makeDeveloperApiRequest=async(_0x190552,_0x362f9c,_0x475374={})=>{const _0x4106f3={'NHYlP':function(_0x2d9bf4,_0x24ff44,_0x3b63ee,_0x330d33){return _0x2d9bf4(_0x24ff44,_0x3b63ee,_0x330d33);},'MZVvY':_0x421a(0x3a),'rtdme':_0x421a(0x10),'jAwoF':_0x421a(0x11),'LeJNE':_0x421a(0x7),'kikSh':function(_0x14531f,_0x5441f9,_0x405f83,_0x2d7e8a){return _0x14531f(_0x5441f9,_0x405f83,_0x2d7e8a);},'WEyGw':function(_0x140db0,_0x83ee4c){return _0x140db0===_0x83ee4c;},'bbYli':_0x421a(0x3b),'uYtei':'Developer\x20API\x20Request','TWzxj':'[REDACTED]','rmjcQ':function(_0x19a0f9,_0x4ad485){return _0x19a0f9||_0x4ad485;},'dSwbZ':function(_0x5d1b19,_0x87151a,_0x5ccabf){return _0x5d1b19(_0x87151a,_0x5ccabf);},'HlBAV':_0x421a(0x3c),'NLKyX':function(_0x5eae8d,_0x22186f){return _0x5eae8d===_0x22186f;},'iLOVn':function(_0x1dcbdc,_0x1c17e6){return _0x1dcbdc===_0x1c17e6;},'lXxgh':function(_0xa97838,_0x429ed6){return _0xa97838>=_0x429ed6;},'eVxIB':_0x421a(0xd),'IhNjW':'unknown_error','YdlpS':function(_0x15e4e2,_0x1a6916){return _0x15e4e2===_0x1a6916;},'cOXkZ':_0x421a(0x27),'wGMVn':function(_0x24937c,_0x35c127){return _0x24937c===_0x35c127;},'IVPWZ':_0x421a(0x3d),'aZROy':function(_0x40b5f8,_0x332430){return _0x40b5f8 instanceof _0x332430;},'YddCg':_0x421a(0x3e),'ZUqZo':_0x421a(0x3f),'qsLGP':_0x421a(0x40),'eFvlY':_0x421a(0x41),'OpCTW':_0x421a(0x34),'MYyVf':'An\x20unexpected\x20error\x20occurred'},{data:_0x39663e,headers:headers={},debug:debug=![]}=_0x475374;try{const _0x53cdfc=await checkNetworkConnection();if(!_0x53cdfc){if(_0x4106f3[_0x421a(0x42)](_0x421a(0x3b),_0x4106f3['bbYli']))throw new ApiError('No\x20network\x20connection\x20available',_0x421a(0x8));else return _0x4106f3[_0x421a(0x43)](_0x2411be,_0x421a(0x44)+_0x345997+_0x421a(0x45),'GET',{'debug':_0xe65c6[_0x421a(0x46)]});}debug&&logDebug(_0x4106f3[_0x421a(0x47)],{'endpoint':_0x190552,'method':_0x362f9c,'headers':{...headers,'Authorization':_0x4106f3[_0x421a(0x48)]},'data':_0x4106f3[_0x421a(0x49)](_0x39663e,null)});const _0x59eec3=await _0x4106f3[_0x421a(0x4a)](makeDeveloperRequest,_0x190552,{'method':_0x362f9c,'headers':headers,..._0x39663e?{'body':JSON[_0x421a(0x19)](_0x39663e)}:{}}),_0x21fb70=await _0x59eec3[_0x421a(0x1a)]();debug&&logDebug(_0x4106f3[_0x421a(0x4b)],{'status':_0x59eec3['status'],'data':_0x21fb70});if(!_0x59eec3['ok']){var _0x30b625,_0x380a50,_0x4c092a;const _0x4d274d=_0x59eec3[_0x421a(0x1e)]===0x191||_0x4106f3[_0x421a(0x4c)](_0x59eec3[_0x421a(0x1e)],0x193)?_0x421a(0x7):_0x4106f3['iLOVn'](_0x59eec3[_0x421a(0x1e)],0x190)?_0x421a(0x9):_0x4106f3[_0x421a(0x4d)](_0x59eec3[_0x421a(0x1e)],0x1f4)?_0x4106f3[_0x421a(0x4e)]:_0x4106f3[_0x421a(0x4f)];throw new ApiError((_0x4106f3[_0x421a(0x50)](_0x30b625=_0x21fb70[_0x421a(0x25)],null)||_0x4106f3[_0x421a(0x51)](_0x30b625,void 0x0)?void 0x0:_0x30b625[_0x421a(0x26)])||_0x4106f3[_0x421a(0x52)],_0x4d274d,_0x4106f3[_0x421a(0x51)](_0x380a50=_0x21fb70[_0x421a(0x25)],null)||_0x380a50===void 0x0?void 0x0:_0x380a50[_0x421a(0x2a)],(_0x4c092a=_0x21fb70[_0x421a(0x25)])===null||_0x4106f3[_0x421a(0x53)](_0x4c092a,void 0x0)?void 0x0:_0x4c092a[_0x421a(0x2c)]);}return _0x21fb70;}catch(_0xf71f8b){if(_0x4106f3['IVPWZ']!==_0x421a(0x3d))return _0x5523d4(_0x4106f3[_0x421a(0x54)],'POST',{'data':{'username':_0x4f085b[_0x421a(0x55)],'pin':_0x34ba5c[_0x421a(0x56)]},'debug':_0x3d09df[_0x421a(0x46)]});else{if(_0x4106f3[_0x421a(0x57)](_0xf71f8b,ApiError)){if(_0x4106f3[_0x421a(0x53)](_0x4106f3[_0x421a(0x58)],_0x4106f3[_0x421a(0x58)]))throw _0xf71f8b;else return{'isValid':![],'message':_0x15e61c[_0x421a(0x26)]};}if(_0x4106f3[_0x421a(0x53)](_0xf71f8b['name'],_0x421a(0xf))){if(_0x4106f3[_0x421a(0x51)](_0x4106f3[_0x421a(0x59)],_0x4106f3['ZUqZo']))throw new ApiError(_0x4106f3[_0x421a(0x5a)],_0x4106f3[_0x421a(0x5b)]);else throw new _0x1db086(_0x4106f3['rtdme'],_0x4106f3[_0x421a(0x5b)]);}if(debug){if(_0x4106f3[_0x421a(0x5c)]!==_0x4106f3['qsLGP']){const {debug:debug=![],username:_0x54ab21}=_0x4929b2,_0x17ebf6=_0x54ab21||_0x567678();if(!_0x17ebf6)throw new _0x159151(_0x421a(0x6),_0x4106f3[_0x421a(0x5d)]);return _0x4106f3['kikSh'](_0x276b94,_0x421a(0x5e),'POST',{'data':{'username':_0x17ebf6,'pin':_0x2fa082},'debug':debug});}else logDebug(_0x4106f3[_0x421a(0x5f)],{'endpoint':_0x190552,'method':_0x362f9c,'error':_0xf71f8b[_0x421a(0x26)]||_0x4106f3['OpCTW']});}throw new ApiError(_0xf71f8b[_0x421a(0x26)]||_0x4106f3[_0x421a(0x60)],_0x4106f3[_0x421a(0x4f)]);}}};export const validateCredentials=async(_0x19ad9d,_0x1e5b92={'debug':![]})=>{const _0x3c9aa1={'EABZT':_0x421a(0x61),'qJggp':function(_0x32e51a,_0x50a247){return _0x32e51a===_0x50a247;},'gettC':function(_0x3dd2d5,_0x3fd6b0){return _0x3dd2d5===_0x3fd6b0;},'ebpcf':function(_0x562f89,_0x4ae5ae){return _0x562f89===_0x4ae5ae;},'GckDY':function(_0x4756a2,_0x1e0eda){return _0x4756a2===_0x1e0eda;}};try{var _0x4d72a3,_0x573f3a;const _0x42f466=await makeUserApiRequest(_0x3c9aa1['EABZT'],'POST',{'data':{'username':_0x19ad9d},'debug':_0x1e5b92['debug']});return{'isValid':_0x42f466['success']&&(_0x3c9aa1['qJggp'](_0x4d72a3=_0x42f466['data'],null)||_0x3c9aa1[_0x421a(0x62)](_0x4d72a3,void 0x0)?void 0x0:_0x4d72a3['isValid'])===!![],'message':_0x3c9aa1[_0x421a(0x63)](_0x573f3a=_0x42f466['error'],null)||_0x3c9aa1[_0x421a(0x64)](_0x573f3a,void 0x0)?void 0x0:_0x573f3a[_0x421a(0x26)]};}catch(_0x4d05eb){return{'isValid':![],'message':_0x4d05eb[_0x421a(0x26)]};}};export const createAccount=async(_0x57c420,_0x380782={'debug':![]})=>{const _0xcdcc64={'zWLLG':function(_0x1dded2,_0x1ae53e,_0x2c0213,_0x3a3614){return _0x1dded2(_0x1ae53e,_0x2c0213,_0x3a3614);},'zpMYu':_0x421a(0x65)};return _0xcdcc64[_0x421a(0x66)](makeDeveloperApiRequest,_0xcdcc64['zpMYu'],'POST',{'data':{'username':_0x57c420[_0x421a(0x55)],'platforms':_0x57c420[_0x421a(0x67)]},'debug':_0x380782[_0x421a(0x46)]});};export const authenticate=async(_0x4ab2d4,_0x376942={'debug':![]})=>{const _0x594356={'pvmfa':function(_0x34f094,_0x144b55,_0x4fe929,_0x57a1e7){return _0x34f094(_0x144b55,_0x4fe929,_0x57a1e7);},'wYxAk':_0x421a(0x3a)};return _0x594356['pvmfa'](makeUserApiRequest,_0x594356[_0x421a(0x68)],'POST',{'data':{'username':_0x4ab2d4['username'],'pin':_0x4ab2d4[_0x421a(0x56)]},'debug':_0x376942[_0x421a(0x46)]});};export const refreshToken=async(_0x5ce342,_0x452c08={'debug':![]})=>{const _0x4928c1={'SQFIw':function(_0x351864,_0x20da5d,_0x6e6a7d,_0xe94358){return _0x351864(_0x20da5d,_0x6e6a7d,_0xe94358);},'VWWex':_0x421a(0x69)};return _0x4928c1[_0x421a(0x6a)](makeUserApiRequest,_0x4928c1[_0x421a(0x6b)],'POST',{'data':{'refreshToken':_0x5ce342},'debug':_0x452c08[_0x421a(0x46)]});};export const getPlatformData=async(_0x399cbe,_0x274d33={'debug':![]})=>{return makeUserApiRequest('platforms/'+_0x399cbe+_0x421a(0x45),'GET',{'debug':_0x274d33[_0x421a(0x46)]});};export const getUserProfile=async(_0x4ce750={'debug':![]})=>{const _0x3ba4b9={'zyQIv':function(_0x43c3a6,_0x45183e,_0x36eaab,_0x24ae60){return _0x43c3a6(_0x45183e,_0x36eaab,_0x24ae60);},'GBrEb':_0x421a(0x6c)};return _0x3ba4b9[_0x421a(0x6d)](makeUserApiRequest,_0x3ba4b9[_0x421a(0x6e)],'GET',{'debug':_0x4ce750[_0x421a(0x46)]});};function _0x4f72(){const _0xdddbc4=['ApiError','3|2|1|0|4','type','name','SceeS','isConnected','No\x20username\x20available\x20-\x20either\x20provide\x20username\x20or\x20ensure\x20JWT\x20token\x20is\x20valid','auth_error','network_error','validation_error','User\x20not\x20authenticated.\x20Please\x20verify\x20email\x20first.','[REDACTED]','dhxIG','server_error','OZSzR','AbortError','Request\x20timed\x20out','timeout_error','QjLjV','LiztS','ZSMno','AmEEL','XCYCP','WrAQg','MxMai','stringify','json','htOuv','HaSuV','PTFpG','status','OjpJl','mDOLG','UFEqH','rzhXp','unknown_error','noZQi','error','message','API\x20request\x20failed','mTTmm','OsirI','code','JBxbL','details','unAlC','pwKYb','No\x20network\x20connection\x20available','XGsQb','YXRVf','fOWpc','iOYZL','Unknown\x20error','HaGsy','fAuKf','SiXzu','An\x20unexpected\x20error\x20occurred','gGKDK','auth/login','AOzAM','Developer\x20API\x20Response','dmDaB','pSUIW','HuRmk','FOUtO','Developer\x20API\x20Error','WEyGw','NHYlP','platforms/','/data','debug','uYtei','TWzxj','rmjcQ','dSwbZ','HlBAV','NLKyX','lXxgh','eVxIB','IhNjW','iLOVn','YdlpS','cOXkZ','wGMVn','MZVvY','username','userPin','aZROy','YddCg','ZUqZo','rtdme','jAwoF','qsLGP','LeJNE','store-pin/mobile','eFvlY','MYyVf','auth/validate','gettC','ebpcf','GckDY','auth/register','zWLLG','platforms','wYxAk','auth/refresh','SQFIw','VWWex','user/profile','zyQIv','GBrEb','QSWtN','Isiei','kYrSH','Dlodt','zNIQm','BuRnc','FXPxS'];_0x4f72=function(){return _0xdddbc4;};return _0x4f72();}export const updatePlatformConnections=async(_0x364a79,_0x65d409={'debug':![]})=>{const _0x3bf8e7={'QSWtN':function(_0x1c1089,_0x427ad7,_0x1cf1db,_0xa53222){return _0x1c1089(_0x427ad7,_0x1cf1db,_0xa53222);},'Isiei':'user/platforms'};return _0x3bf8e7[_0x421a(0x6f)](makeUserApiRequest,_0x3bf8e7[_0x421a(0x70)],'PUT',{'data':{'platforms':_0x364a79},'debug':_0x65d409[_0x421a(0x46)]});};export const storePIN=async(_0x3b5b6c,_0x2e952a={})=>{const _0xa84246={'kYrSH':function(_0x2f3f5c){return _0x2f3f5c();},'Dlodt':'No\x20username\x20available\x20-\x20either\x20provide\x20username\x20or\x20ensure\x20JWT\x20token\x20is\x20valid','zNIQm':_0x421a(0x7),'vczMu':function(_0x53d15e,_0x578075,_0xa3f19,_0x18be95){return _0x53d15e(_0x578075,_0xa3f19,_0x18be95);}},{debug:debug=![],username:_0x33bdaa}=_0x2e952a,_0xc41011=_0x33bdaa||_0xa84246[_0x421a(0x71)](extractUsernameFromJWT);if(!_0xc41011)throw new ApiError(_0xa84246[_0x421a(0x72)],_0xa84246[_0x421a(0x73)]);return _0xa84246['vczMu'](makeUserApiRequest,_0x421a(0x5e),'POST',{'data':{'username':_0xc41011,'pin':_0x3b5b6c},'debug':debug});};export const getCurrentUserToken=async()=>{const _0x1800cc={'BuRnc':function(_0x26501a){return _0x26501a();}};return await _0x1800cc[_0x421a(0x74)](getJWT);};export const isCurrentUserAuthenticated=()=>{const _0x2b6904={'FXPxS':function(_0x341f20){return _0x341f20();}};return _0x2b6904[_0x421a(0x75)](isUserAuthenticated);};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{initializePlatformAuthService}from'../services/platformAuthService';export const executeOnairosFlow=async _0x2d26d0=>{const _0x3207e7={'CzJGJ':function(_0x2af695,_0x1336d0){return _0x2af695(_0x1336d0);},'qtsaV':function(_0x2f2649,_0x1535fb){return _0x2f2649||_0x1535fb;},'tUnRr':_0x4690(0x0),'VdDCW':function(_0x599af8,_0x2fcbac){return _0x599af8!==_0x2fcbac;},'qFFoQ':_0x4690(0x1),'AJeAT':function(_0x3e4d73){return _0x3e4d73();},'UtfhY':function(_0x2e8f5b,_0x567076){return _0x2e8f5b===_0x567076;},'FbKdQ':'sWDIK','SJFtU':_0x4690(0x2),'NiWFg':_0x4690(0x3),'TGWFc':_0x4690(0x4),'rpXmr':'📱\x20Onairos\x20modal\x20should\x20be\x20displayed','yAUrG':'🚀\x20Starting\x20Onairos\x20flow\x20programmatically...','iQIRj':_0x4690(0x5),'chYfX':_0x4690(0x6)};try{console[_0x4690(0x7)](_0x3207e7[_0x4690(0x8)]),await _0x3207e7['AJeAT'](initializePlatformAuthService);const {UniversalOnboarding:_0x5dea5c}=await import(_0x3207e7[_0x4690(0x9)]),React=await import('react');return new Promise((_0x232f7c,_0x31bf27)=>{let _0x5acd83=null;const _0x13cb88=(_0x400212,_0x4c8993,_0xc395b6)=>{const _0x448e92={'uCXzz':'❌\x20Onairos\x20flow\x20rejected:','pQuty':function(_0xe96c0,_0x54c4ae){return _0x3207e7['CzJGJ'](_0xe96c0,_0x54c4ae);},'tLxZD':function(_0x38ce4e,_0x5109ab){return _0x3207e7['qtsaV'](_0x38ce4e,_0x5109ab);},'lhKtd':_0x3207e7[_0x4690(0xa)]};_0x3207e7['VdDCW'](_0x3207e7[_0x4690(0xb)],_0x3207e7[_0x4690(0xb)])?(_0x4b81e0['log'](_0x448e92[_0x4690(0xc)],_0x26c98e),_0x20e472&&_0x3dcbf6[_0x4690(0xd)]&&_0x593c13[_0x4690(0xd)](),_0x24234d['onRejection']&&_0x2abe29[_0x4690(0xe)](_0x73f513),_0x448e92[_0x4690(0xf)](_0x39f9f6,new _0x192578(_0x448e92[_0x4690(0x10)](_0x59a6ea,_0x448e92[_0x4690(0x11)])))):(console[_0x4690(0x7)]('✅\x20Onairos\x20flow\x20completed\x20successfully'),_0x5acd83&&_0x5acd83['close']&&_0x5acd83['close'](),_0x2d26d0[_0x4690(0x12)]&&_0x2d26d0[_0x4690(0x12)](_0x400212,_0x4c8993,_0xc395b6),_0x3207e7[_0x4690(0x13)](_0x232f7c));},_0x547cee=_0x21e008=>{_0x3207e7[_0x4690(0x14)](_0x4690(0x15),_0x3207e7[_0x4690(0x16)])?(console[_0x4690(0x7)](_0x3207e7[_0x4690(0x17)],_0x21e008),_0x5acd83&&_0x5acd83['close']&&(_0x3207e7['VdDCW'](_0x3207e7[_0x4690(0x18)],_0x3207e7['TGWFc'])?_0x5acd83[_0x4690(0xd)]():_0x3ada2f['close']()),_0x2d26d0[_0x4690(0xe)]&&_0x2d26d0['onRejection'](_0x21e008),_0x31bf27(new Error(_0x3207e7[_0x4690(0x19)](_0x21e008,_0x3207e7['tUnRr'])))):_0x4734ab[_0x4690(0x12)](_0x4f58d9,_0x3a0cc5,_0x49b0dc);},_0x10bf7e=React['createElement'](_0x5dea5c,{'visible':!![],'onClose':()=>_0x547cee(_0x4690(0x1a)),'AppName':_0x2d26d0[_0x4690(0x1b)],'requestData':_0x2d26d0['requestData'],'returnLink':_0x2d26d0[_0x4690(0x1c)],'onComplete':_0x13cb88,'preferredPlatform':_0x2d26d0[_0x4690(0x1d)],'debug':_0x2d26d0['debug'],'testMode':_0x2d26d0[_0x4690(0x1e)]});_0x5acd83=_0x10bf7e,console[_0x4690(0x7)](_0x3207e7[_0x4690(0x1f)]);});}catch(_0x249df4){console[_0x4690(0x20)](_0x3207e7['chYfX'],_0x249df4);throw _0x249df4;}};function _0x4690(_0x3f84a7,_0x46907c){_0x3f84a7=_0x3f84a7-0x0;const _0x5ebf7c=_0x3f84();let _0x1149db=_0x5ebf7c[_0x3f84a7];return _0x1149db;}function _0x3f84(){const _0x491c48=['Onairos\x20flow\x20was\x20rejected','YHAAo','❌\x20Onairos\x20flow\x20rejected:','alQFE','jaiaD','../components/UniversalOnboarding','❌\x20Failed\x20to\x20execute\x20Onairos\x20flow:','log','yAUrG','iQIRj','tUnRr','qFFoQ','uCXzz','close','onRejection','pQuty','tLxZD','lhKtd','onResolved','AJeAT','UtfhY','sWDIK','FbKdQ','SJFtU','NiWFg','qtsaV','User\x20closed\x20the\x20modal','AppName','returnLink','preferredPlatform','testMode','rpXmr','error','❌\x20Pre-check\x20failed,\x20not\x20starting\x20Onairos\x20flow','Pre-check\x20failed','preCheck','UKeSj'];_0x3f84=function(){return _0x491c48;};return _0x3f84();}export const startOnairosFlow=async _0x170f5d=>{const _0x14e952={'UKeSj':_0x4690(0x21),'loLkE':_0x4690(0x22),'ZYXtx':function(_0x1211b0,_0xdc83a8){return _0x1211b0(_0xdc83a8);}};if(_0x170f5d[_0x4690(0x23)]){const _0x4eb65a=await _0x170f5d['preCheck']();if(!_0x4eb65a){console[_0x4690(0x7)](_0x14e952[_0x4690(0x24)]);_0x170f5d[_0x4690(0xe)]&&_0x170f5d[_0x4690(0xe)](_0x14e952['loLkE']);return;}}return _0x14e952['ZYXtx'](executeOnairosFlow,_0x170f5d);};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const DEFAULT_RETRY_OPTIONS={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1388,'exponentialBackoff':!![],'enableLogging':![],'shouldRetry':(_0xd8935b,_0x3f3829)=>{const _0x3fb1d4={'bcOdx':function(_0x2b72c6,_0x1dc1e7){return _0x2b72c6<=_0x1dc1e7;},'ODYRf':function(_0x4ea9f7,_0x4286ed){return _0x4ea9f7>=_0x4286ed;},'PFyGj':function(_0x5b9c6a,_0x1f6c25){return _0x5b9c6a!==_0x1f6c25;},'omkxf':'Network\x20request\x20failed','stMEU':'ENOTFOUND','eXirp':_0x4131(0x0),'LAlTr':function(_0x17e1ba,_0x32bf7d){return _0x17e1ba>=_0x32bf7d;},'Tqpcy':_0x4131(0x1),'uprbz':_0x4131(0x2),'EMzPc':'JSON\x20Parse\x20error','aMaBI':_0x4131(0x3),'GuZBC':_0x4131(0x4)};if(_0x3fb1d4['ODYRf'](_0xd8935b[_0x4131(0x5)],0x190)&&_0xd8935b[_0x4131(0x5)]<0x1f4&&_0x3fb1d4[_0x4131(0x6)](_0xd8935b[_0x4131(0x5)],0x198)&&_0xd8935b[_0x4131(0x5)]!==0x1ad)return![];if(_0xd8935b['name']===_0x4131(0x7)||_0xd8935b['message']['includes'](_0x3fb1d4[_0x4131(0x8)])||_0xd8935b['message'][_0x4131(0x9)]('fetch')||_0xd8935b[_0x4131(0xa)][_0x4131(0x9)](_0x3fb1d4[_0x4131(0xb)])||_0xd8935b['message']['includes'](_0x3fb1d4[_0x4131(0xc)])||_0x3fb1d4[_0x4131(0xd)](_0xd8935b[_0x4131(0x5)],0x1f4))return _0x3fb1d4[_0x4131(0xe)]===_0x3fb1d4[_0x4131(0xf)]?_0x3fb1d4[_0x4131(0x10)](_0x390d16,0x2):!![];if(_0xd8935b[_0x4131(0xa)]['includes'](_0x3fb1d4[_0x4131(0x11)])||_0xd8935b[_0x4131(0xa)][_0x4131(0x9)](_0x4131(0x12)))return _0x3fb1d4['PFyGj'](_0x3fb1d4[_0x4131(0x13)],_0x3fb1d4[_0x4131(0x14)])?!![]:!![];return![];}};export async function withRetry(_0x4e3735,_0x4afeed={}){const _0x3d08ce={'CnWRa':function(_0x28a9fa,_0x524179){return _0x28a9fa-_0x524179;},'jTGto':function(_0x353df7,_0x585d1d){return _0x353df7+_0x585d1d;},'HBskb':function(_0x46b8a3,_0x133eef){return _0x46b8a3===_0x133eef;},'pspbK':_0x4131(0x15),'KZBKW':function(_0x461c56,_0xe856c1){return _0x461c56+_0xe856c1;},'rtmWz':function(_0x4836eb){return _0x4836eb();},'QNyis':function(_0xf29db7,_0x1423d0){return _0xf29db7>_0x1423d0;},'RsTKZ':function(_0x11e400,_0x2755ac){return _0x11e400*_0x2755ac;},'aJpZu':function(_0xab1568,_0x49662d){return _0xab1568*_0x49662d;},'UMjIO':function(_0xe57f01,_0x21bdcf){return _0xe57f01!==_0x21bdcf;},'gOynM':_0x4131(0x16),'TCeNK':function(_0x1d4fcb,_0x2d3f38){return _0x1d4fcb+_0x2d3f38;},'iJYTH':'Unknown\x20error','jipny':function(_0x17183a,_0x4ca08c){return _0x17183a+_0x4ca08c;}},_0x1b9280={...DEFAULT_RETRY_OPTIONS,..._0x4afeed},_0x3b5218=Date[_0x4131(0x17)]();let _0x36f24e=null;for(let _0x5e864=0x1;_0x5e864<=_0x3d08ce[_0x4131(0x18)](_0x1b9280['maxRetries'],0x1);_0x5e864++){try{if(_0x1b9280['enableLogging']&&_0x5e864>0x1){if(_0x3d08ce[_0x4131(0x19)](_0x3d08ce['pspbK'],_0x4131(0x1a)))return!![];else console[_0x4131(0x1b)](_0x4131(0x1c)+_0x5e864+'/'+_0x3d08ce[_0x4131(0x1d)](_0x1b9280[_0x4131(0x1e)],0x1));}const _0x11db98=await _0x3d08ce[_0x4131(0x1f)](_0x4e3735);return{'success':!![],'data':_0x11db98,'attempts':_0x5e864,'totalDuration':Date[_0x4131(0x17)]()-_0x3b5218};}catch(_0x56862f){_0x36f24e=_0x56862f;const _0x3adb79=_0x1b9280[_0x4131(0x20)]?_0x1b9280['shouldRetry'](_0x56862f,_0x5e864):!![];if(_0x3d08ce['QNyis'](_0x5e864,_0x1b9280[_0x4131(0x1e)])||!_0x3adb79){_0x1b9280[_0x4131(0x21)]&&console['error'](_0x4131(0x22)+_0x56862f[_0x4131(0xa)]);break;}let _0x42d47e=_0x1b9280[_0x4131(0x23)];_0x1b9280[_0x4131(0x24)]&&(_0x42d47e=Math[_0x4131(0x25)](_0x3d08ce[_0x4131(0x26)](_0x1b9280['baseDelay'],Math[_0x4131(0x27)](0x2,_0x3d08ce['CnWRa'](_0x5e864,0x1))),_0x1b9280[_0x4131(0x28)]));const _0x52e926=_0x3d08ce['aJpZu'](_0x3d08ce[_0x4131(0x26)](Math['random'](),0.1),_0x42d47e);_0x42d47e=Math['floor'](_0x42d47e+_0x52e926);if(_0x1b9280[_0x4131(0x29)]){if(_0x3d08ce['UMjIO'](_0x3d08ce[_0x4131(0x2a)],_0x4131(0x16)))return{'reachable':![],'error':_0xfeb98a['message'],'duration':_0x3d08ce[_0x4131(0x2b)](_0x1f3370['now'](),_0xc01ce0)};else _0x1b9280['onRetry'](_0x56862f,_0x5e864,_0x42d47e);}_0x1b9280['enableLogging']&&console[_0x4131(0x1b)](_0x4131(0x2c)+_0x42d47e+'ms\x20before\x20retry\x20(attempt\x20'+_0x5e864+'/'+_0x3d08ce[_0x4131(0x2d)](_0x1b9280[_0x4131(0x1e)],0x1)+')'),await new Promise(_0x3db08d=>setTimeout(()=>_0x3db08d(),_0x42d47e));}}return{'success':![],'error':_0x36f24e||new Error(_0x3d08ce[_0x4131(0x2e)]),'attempts':_0x3d08ce['jipny'](_0x1b9280[_0x4131(0x1e)],0x1),'totalDuration':Date['now']()-_0x3b5218};}function _0x3f10(){const _0x242d04=['timeout','sEepz','lrgRG','FFMXD','iSeyO','status','PFyGj','AbortError','omkxf','includes','message','stMEU','eXirp','LAlTr','Tqpcy','uprbz','bcOdx','EMzPc','Unexpected\x20character','aMaBI','GuZBC','KzOCg','QUYnF','now','jTGto','HBskb','PvAOF','log','🔄\x20Retry\x20attempt\x20','KZBKW','maxRetries','rtmWz','shouldRetry','enableLogging','❌\x20All\x20retry\x20attempts\x20exhausted\x20or\x20error\x20not\x20retryable:\x20','baseDelay','exponentialBackoff','min','RsTKZ','pow','maxDelay','onRetry','gOynM','CnWRa','⏳\x20Waiting\x20','TCeNK','iJYTH','Network\x20request\x20failed','fetch','ENOTFOUND','JSON\x20Parse\x20error','FecTw','kzcKR','validation\x20endpoint','HTML\x20page\x20instead\x20of\x20JSON','fTgbB','RHubs','hkWVu','mKJUx','erpmZ','name','DoxCb','jYvYu','mlDXE','UNHeb','bFqLv','qXFMB','hKSZi','xaQxD','DfzvR','kIIlj','uKYYV','lUDUl','KOybQ','OBrPg','lTLWt','ZYGfF','warn','⚠️\x20API\x20call\x20failed\x20(attempt\x20','ms:\x20','DNS','WpJpm','woMdA','pnJgA','AvlsD','iuhIf','AsjTZ','success','dxiTj','yMJxt','azkXB','error','data','hXWOC','OnairosReactNative/HealthCheck','OOxea','LdqIJ','abort','yKsvV','signal','lurkN','SkfvL'];_0x3f10=function(){return _0x242d04;};return _0x3f10();}export const API_RETRY_OPTIONS={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1388,'exponentialBackoff':!![],'shouldRetry':(_0x1653cd,_0x2d0d98)=>{const _0x2ceab8={'mKJUx':function(_0x3674da,_0x2a45b9){return _0x3674da>=_0x2a45b9;},'xXbOD':function(_0x56a266,_0x22672c){return _0x56a266<_0x22672c;},'erpmZ':function(_0x4b7eab,_0x19186b){return _0x4b7eab!==_0x19186b;},'fTgbB':function(_0xd5b082,_0x358fbb){return _0xd5b082===_0x358fbb;},'DoxCb':'AbortError','jYvYu':_0x4131(0x2f),'mlDXE':_0x4131(0x30),'UNHeb':_0x4131(0x31),'bFqLv':_0x4131(0x0),'qXFMB':function(_0xd3907b,_0x20544b){return _0xd3907b>=_0x20544b;},'hKSZi':_0x4131(0x32),'xaQxD':_0x4131(0x12),'RHubs':_0x4131(0x33),'hkWVu':_0x4131(0x34),'DfzvR':_0x4131(0x35),'lUDUl':function(_0x5c3974,_0xb207){return _0x5c3974===_0xb207;},'KOybQ':function(_0x54d288,_0x5031d6){return _0x54d288<=_0x5031d6;},'OBrPg':function(_0x1ac2a7,_0x2607f6){return _0x1ac2a7>=_0x2607f6;},'lTLWt':function(_0x2b8438,_0x593178){return _0x2b8438===_0x593178;},'ZYGfF':_0x4131(0x36)};if(_0x2ceab8[_0x4131(0x37)](_0x1653cd[_0x4131(0x5)],0x191)||_0x1653cd[_0x4131(0x5)]===0x193){if(_0x2ceab8[_0x4131(0x38)]!==_0x2ceab8[_0x4131(0x39)])return![];else{if(_0x2ceab8[_0x4131(0x3a)](_0x585fb1[_0x4131(0x5)],0x190)&&_0x2ceab8['xXbOD'](_0x49e67e[_0x4131(0x5)],0x1f4)&&_0x2ceab8[_0x4131(0x3b)](_0x1bc3ce[_0x4131(0x5)],0x198)&&_0x2c4bb4['status']!==0x1ad)return![];if(_0x2ceab8[_0x4131(0x37)](_0x2d846a[_0x4131(0x3c)],_0x2ceab8[_0x4131(0x3d)])||_0xca2a73[_0x4131(0xa)]['includes'](_0x2ceab8[_0x4131(0x3e)])||_0x393ba0[_0x4131(0xa)]['includes'](_0x2ceab8[_0x4131(0x3f)])||_0x96992b[_0x4131(0xa)][_0x4131(0x9)](_0x2ceab8[_0x4131(0x40)])||_0x4c7323['message'][_0x4131(0x9)](_0x2ceab8[_0x4131(0x41)])||_0x2ceab8[_0x4131(0x42)](_0x1fd55c[_0x4131(0x5)],0x1f4))return!![];if(_0x1feec1[_0x4131(0xa)][_0x4131(0x9)](_0x2ceab8[_0x4131(0x43)])||_0x779dff['message'][_0x4131(0x9)](_0x2ceab8[_0x4131(0x44)]))return!![];return![];}}if(_0x2ceab8['fTgbB'](_0x1653cd[_0x4131(0x5)],0x190)||_0x2ceab8[_0x4131(0x37)](_0x1653cd[_0x4131(0x5)],0x194)&&!_0x1653cd['message'][_0x4131(0x9)](_0x2ceab8[_0x4131(0x45)]))return _0x2ceab8[_0x4131(0x3b)](_0x4131(0x46),_0x4131(0x47))?![]:!![];if(_0x2ceab8[_0x4131(0x48)](_0x1653cd['status'],0x1ad))return _0x2ceab8[_0x4131(0x49)](_0x2d0d98,0x2);if(_0x2ceab8[_0x4131(0x4a)](_0x1653cd[_0x4131(0x5)],0x1f4))return!![];if(_0x2ceab8[_0x4131(0x4b)](_0x1653cd['name'],_0x2ceab8[_0x4131(0x3d)])||_0x1653cd[_0x4131(0xa)][_0x4131(0x9)]('timeout')||_0x1653cd['message'][_0x4131(0x9)](_0x2ceab8[_0x4131(0x3e)])||_0x1653cd[_0x4131(0xa)]['includes'](_0x2ceab8[_0x4131(0x3f)])||_0x1653cd[_0x4131(0xa)]['includes'](_0x2ceab8[_0x4131(0x40)]))return!![];if(_0x1653cd[_0x4131(0xa)][_0x4131(0x9)](_0x2ceab8[_0x4131(0x43)])||_0x1653cd[_0x4131(0xa)][_0x4131(0x9)](_0x2ceab8[_0x4131(0x44)])||_0x1653cd[_0x4131(0xa)][_0x4131(0x9)](_0x2ceab8[_0x4131(0x4c)]))return!![];return![];},'onRetry':(_0x3ddf12,_0xfa8e34,_0x569d4b)=>{console[_0x4131(0x4d)](_0x4131(0x4e)+_0xfa8e34+'),\x20retrying\x20in\x20'+_0x569d4b+_0x4131(0x4f)+_0x3ddf12[_0x4131(0xa)]);}};export const NETWORK_RETRY_OPTIONS={'maxRetries':0x2,'baseDelay':0x7d0,'maxDelay':0x1f40,'exponentialBackoff':!![],'shouldRetry':(_0x5ece5e,_0x1872c0)=>{const _0xa9e593={'WpJpm':'Network\x20request\x20failed','woMdA':_0x4131(0x31),'pnJgA':_0x4131(0x50),'AvlsD':function(_0x113109,_0x1f9856){return _0x113109===_0x1f9856;},'iuhIf':_0x4131(0x7)};return _0x5ece5e[_0x4131(0xa)][_0x4131(0x9)](_0xa9e593[_0x4131(0x51)])||_0x5ece5e[_0x4131(0xa)]['includes'](_0xa9e593[_0x4131(0x52)])||_0x5ece5e['message'][_0x4131(0x9)](_0xa9e593[_0x4131(0x53)])||_0xa9e593[_0x4131(0x54)](_0x5ece5e[_0x4131(0x3c)],_0xa9e593[_0x4131(0x55)]);}};function _0x4131(_0x3f10ed,_0x41314c){_0x3f10ed=_0x3f10ed-0x0;const _0x28eb45=_0x3f10();let _0x4eea3a=_0x28eb45[_0x3f10ed];return _0x4eea3a;}export async function fetchWithRetry(_0x16f1d5,_0x5e9d27={},_0x4cbad5=API_RETRY_OPTIONS){const _0x251b59={'AsjTZ':function(_0x343cf2,_0x11fdd9,_0x559ae8){return _0x343cf2(_0x11fdd9,_0x559ae8);},'dxiTj':function(_0x564bd4,_0xefa154){return _0x564bd4!==_0xefa154;},'yMJxt':'CYQqh','azkXB':'styLS'},_0x2d2e7a=await _0x251b59[_0x4131(0x56)](withRetry,()=>fetch(_0x16f1d5,_0x5e9d27),_0x4cbad5);if(!_0x2d2e7a[_0x4131(0x57)]){if(_0x251b59[_0x4131(0x58)](_0x251b59[_0x4131(0x59)],_0x251b59[_0x4131(0x5a)]))throw _0x2d2e7a[_0x4131(0x5b)];else throw _0x24d1e1[_0x4131(0x5b)];}return _0x2d2e7a[_0x4131(0x5c)];}export async function healthCheck(_0xc9a32d,_0x5bc7e1=0x1388){const _0x36564a={'OOxea':_0x4131(0x5d),'LdqIJ':function(_0x4acc8c,_0x4b3691,_0x29b6a0){return _0x4acc8c(_0x4b3691,_0x29b6a0);},'yKsvV':function(_0x57bfee,_0x546823,_0x354ba2){return _0x57bfee(_0x546823,_0x354ba2);},'YvDqO':_0x4131(0x5e),'lurkN':function(_0x1a16e8,_0x30a1a0){return _0x1a16e8(_0x30a1a0);},'SkfvL':function(_0x1c8c9e,_0x424234){return _0x1c8c9e-_0x424234;}},_0x2665a7=Date['now']();try{if(_0x36564a[_0x4131(0x5f)]===_0x4131(0x5d)){const _0x21dab9=new AbortController(),_0x2ba69f=_0x36564a[_0x4131(0x60)](setTimeout,()=>_0x21dab9[_0x4131(0x61)](),_0x5bc7e1),_0x437adc=await _0x36564a[_0x4131(0x62)](fetch,_0xc9a32d,{'method':'GET','signal':_0x21dab9[_0x4131(0x63)],'headers':{'User-Agent':_0x36564a['YvDqO']}});return _0x36564a[_0x4131(0x64)](clearTimeout,_0x2ba69f),{'reachable':!![],'status':_0x437adc[_0x4131(0x5)],'duration':_0x36564a[_0x4131(0x65)](Date['now'](),_0x2665a7)};}else return!![];}catch(_0x43a277){return{'reachable':![],'error':_0x43a277[_0x4131(0xa)],'duration':_0x36564a[_0x4131(0x65)](Date[_0x4131(0x17)](),_0x2665a7)};}}
|
|
1
|
+
export const DEFAULT_RETRY_OPTIONS={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1388,'exponentialBackoff':!![],'enableLogging':![],'shouldRetry':(_0x2230ea,_0x45d083)=>{const _0x43be6d={'zwByH':_0x80e1(0x0),'ErJcx':'DNS','byepz':function(_0x2687c7,_0x5873ce){return _0x2687c7===_0x5873ce;},'SWpjT':_0x80e1(0x1),'TAINT':function(_0x5becb1,_0x50b4c8){return _0x5becb1>=_0x50b4c8;},'SLfys':function(_0x51a870,_0x5046b8){return _0x51a870<_0x5046b8;},'rxWwQ':function(_0x4143c0,_0x40d742){return _0x4143c0!==_0x40d742;},'rxlEz':_0x80e1(0x2),'bZYNY':_0x80e1(0x3),'JaHQn':_0x80e1(0x4),'cpkUB':function(_0x12cceb,_0x2373f1){return _0x12cceb>=_0x2373f1;},'OMtma':function(_0x32c284,_0x502e9c){return _0x32c284===_0x502e9c;},'tmtFC':_0x80e1(0x5),'ZMsrV':'TPfBf','aeJIJ':_0x80e1(0x6),'YIRmG':_0x80e1(0x7)};if(_0x43be6d[_0x80e1(0x8)](_0x2230ea['status'],0x190)&&_0x43be6d[_0x80e1(0x9)](_0x2230ea[_0x80e1(0xa)],0x1f4)&&_0x43be6d[_0x80e1(0xb)](_0x2230ea[_0x80e1(0xa)],0x198)&&_0x43be6d[_0x80e1(0xb)](_0x2230ea['status'],0x1ad))return _0x43be6d[_0x80e1(0xb)](_0x43be6d[_0x80e1(0xc)],_0x43be6d[_0x80e1(0xd)])?![]:_0x2fa45d[_0x80e1(0xe)][_0x80e1(0xf)](_0x43be6d[_0x80e1(0x10)])||_0x2eab2f[_0x80e1(0xe)][_0x80e1(0xf)](_0x80e1(0x4))||_0x58a0f3[_0x80e1(0xe)][_0x80e1(0xf)](_0x43be6d[_0x80e1(0x11)])||_0x43be6d['byepz'](_0x1e9bfd[_0x80e1(0x12)],_0x43be6d[_0x80e1(0x13)]);if(_0x43be6d[_0x80e1(0x14)](_0x2230ea[_0x80e1(0x12)],_0x43be6d[_0x80e1(0x13)])||_0x2230ea[_0x80e1(0xe)][_0x80e1(0xf)](_0x43be6d[_0x80e1(0x10)])||_0x2230ea[_0x80e1(0xe)][_0x80e1(0xf)]('fetch')||_0x2230ea['message'][_0x80e1(0xf)](_0x43be6d[_0x80e1(0x15)])||_0x2230ea['message'][_0x80e1(0xf)](_0x80e1(0x16))||_0x43be6d[_0x80e1(0x17)](_0x2230ea[_0x80e1(0xa)],0x1f4))return _0x43be6d[_0x80e1(0x18)](_0x43be6d[_0x80e1(0x19)],_0x43be6d[_0x80e1(0x1a)])?![]:!![];if(_0x2230ea[_0x80e1(0xe)][_0x80e1(0xf)](_0x43be6d[_0x80e1(0x1b)])||_0x2230ea[_0x80e1(0xe)][_0x80e1(0xf)](_0x43be6d['YIRmG']))return!![];return![];}};export async function withRetry(_0x336453,_0x28f4e7={}){const _0x39020a={'GLYHO':function(_0x5ecfb6,_0x478a8a){return _0x5ecfb6>=_0x478a8a;},'ourxR':function(_0x3bdf63,_0xf4bf3f){return _0x3bdf63!==_0xf4bf3f;},'DqGin':function(_0x1f78b4,_0x2f0aa1){return _0x1f78b4!==_0x2f0aa1;},'qybZz':function(_0x124280,_0x3fcbb3){return _0x124280===_0x3fcbb3;},'eBgwE':_0x80e1(0x1),'KTADQ':'Network\x20request\x20failed','ElIsW':_0x80e1(0x1c),'LrRlG':'ENOTFOUND','PQVky':_0x80e1(0x16),'vnFdh':'Unexpected\x20character','pwvrW':function(_0x2f76fc,_0x1fe563){return _0x2f76fc+_0x1fe563;},'IEnHv':function(_0x27cdf2,_0x20b4be){return _0x27cdf2<=_0x20b4be;},'BKeaE':function(_0x35d8a3,_0x33dbe2){return _0x35d8a3!==_0x33dbe2;},'jcsUE':_0x80e1(0x1d),'BqwbB':function(_0x3135a3,_0x50f063){return _0x3135a3!==_0x50f063;},'ytRaI':_0x80e1(0x1e),'gIAPA':_0x80e1(0x1f),'fjvEz':function(_0xf2ec88,_0x44a8a4){return _0xf2ec88>_0x44a8a4;},'VUCtD':function(_0x5f4b04){return _0x5f4b04();},'iNMZi':function(_0x40f62a,_0x31fc0f){return _0x40f62a===_0x31fc0f;},'LplIn':_0x80e1(0x20),'CAeAp':_0x80e1(0x21),'arKbI':function(_0x225385,_0x31c8ba){return _0x225385!==_0x31c8ba;},'FxiBo':_0x80e1(0x22),'gSitI':_0x80e1(0x23),'lvtfG':function(_0x4ffe3c,_0x374fdc){return _0x4ffe3c*_0x374fdc;},'ljXEg':_0x80e1(0x24),'sUUdE':function(_0x3b9daf,_0x21f02b){return _0x3b9daf-_0x21f02b;}},_0x55cd9e={...DEFAULT_RETRY_OPTIONS,..._0x28f4e7},_0xca0f8f=Date['now']();let _0x3e89a4=null;for(let _0x3d953c=0x1;_0x39020a[_0x80e1(0x25)](_0x3d953c,_0x39020a[_0x80e1(0x26)](_0x55cd9e[_0x80e1(0x27)],0x1));_0x3d953c++){if(_0x39020a['BKeaE'](_0x80e1(0x1d),_0x39020a['jcsUE']))_0x58cd92[_0x80e1(0x28)]('❌\x20All\x20retry\x20attempts\x20exhausted\x20or\x20error\x20not\x20retryable:\x20'+_0x483a35[_0x80e1(0xe)]);else try{if(_0x39020a[_0x80e1(0x29)](_0x39020a[_0x80e1(0x2a)],_0x39020a[_0x80e1(0x2b)])){_0x55cd9e[_0x80e1(0x2c)]&&_0x39020a[_0x80e1(0x2d)](_0x3d953c,0x1)&&console[_0x80e1(0x2e)]('🔄\x20Retry\x20attempt\x20'+_0x3d953c+'/'+_0x39020a[_0x80e1(0x26)](_0x55cd9e[_0x80e1(0x27)],0x1));const _0x28b020=await _0x39020a['VUCtD'](_0x336453);return{'success':!![],'data':_0x28b020,'attempts':_0x3d953c,'totalDuration':Date[_0x80e1(0x2f)]()-_0xca0f8f};}else{if(_0x39020a['GLYHO'](_0x50469['status'],0x190)&&_0x2a20fa[_0x80e1(0xa)]<0x1f4&&_0x39020a['ourxR'](_0x24d986[_0x80e1(0xa)],0x198)&&_0x39020a['DqGin'](_0x33dc3a[_0x80e1(0xa)],0x1ad))return![];if(_0x39020a['qybZz'](_0x105cf6[_0x80e1(0x12)],_0x39020a[_0x80e1(0x30)])||_0x397eec[_0x80e1(0xe)][_0x80e1(0xf)](_0x39020a[_0x80e1(0x31)])||_0xa31652['message']['includes'](_0x39020a[_0x80e1(0x32)])||_0x12f5e8[_0x80e1(0xe)]['includes'](_0x39020a[_0x80e1(0x33)])||_0x1ff2c8[_0x80e1(0xe)]['includes'](_0x39020a[_0x80e1(0x34)])||_0x17bbce['status']>=0x1f4)return!![];if(_0x4e2d8a[_0x80e1(0xe)][_0x80e1(0xf)](_0x80e1(0x6))||_0x2f885e[_0x80e1(0xe)]['includes'](_0x39020a[_0x80e1(0x35)]))return!![];return![];}}catch(_0x43f947){if(_0x39020a[_0x80e1(0x36)](_0x39020a['LplIn'],_0x39020a['CAeAp']))_0x563e28[_0x80e1(0x2e)](_0x80e1(0x37)+_0x2fd5ad+_0x80e1(0x38)+_0x4a7f67+'/'+_0x39020a[_0x80e1(0x26)](_0x926c46['maxRetries'],0x1)+')');else{_0x3e89a4=_0x43f947;const _0x3d883d=_0x55cd9e[_0x80e1(0x39)]?_0x55cd9e['shouldRetry'](_0x43f947,_0x3d953c):!![];if(_0x39020a[_0x80e1(0x2d)](_0x3d953c,_0x55cd9e[_0x80e1(0x27)])||!_0x3d883d){if(_0x39020a['arKbI'](_0x39020a[_0x80e1(0x3a)],'PtUYd')){_0x55cd9e[_0x80e1(0x2c)]&&console[_0x80e1(0x28)]('❌\x20All\x20retry\x20attempts\x20exhausted\x20or\x20error\x20not\x20retryable:\x20'+_0x43f947[_0x80e1(0xe)]);break;}else return _0x39020a[_0x80e1(0x25)](_0xdfad7d,0x2);}let _0x33bc7e=_0x55cd9e[_0x80e1(0x3b)];if(_0x55cd9e[_0x80e1(0x3c)]){if(_0x39020a[_0x80e1(0x3d)]===_0x80e1(0x23))_0x33bc7e=Math['min'](_0x39020a[_0x80e1(0x3e)](_0x55cd9e[_0x80e1(0x3b)],Math[_0x80e1(0x3f)](0x2,_0x3d953c-0x1)),_0x55cd9e[_0x80e1(0x40)]);else return!![];}const _0x40f478=_0x39020a[_0x80e1(0x3e)](_0x39020a[_0x80e1(0x3e)](Math[_0x80e1(0x41)](),0.1),_0x33bc7e);_0x33bc7e=Math['floor'](_0x39020a['pwvrW'](_0x33bc7e,_0x40f478)),_0x55cd9e[_0x80e1(0x42)]&&_0x55cd9e[_0x80e1(0x42)](_0x43f947,_0x3d953c,_0x33bc7e),_0x55cd9e['enableLogging']&&console[_0x80e1(0x2e)](_0x80e1(0x37)+_0x33bc7e+'ms\x20before\x20retry\x20(attempt\x20'+_0x3d953c+'/'+_0x39020a[_0x80e1(0x26)](_0x55cd9e[_0x80e1(0x27)],0x1)+')'),await new Promise(_0x22a388=>setTimeout(()=>_0x22a388(),_0x33bc7e));}}}return{'success':![],'error':_0x3e89a4||new Error(_0x39020a['ljXEg']),'attempts':_0x39020a[_0x80e1(0x26)](_0x55cd9e[_0x80e1(0x27)],0x1),'totalDuration':_0x39020a[_0x80e1(0x43)](Date['now'](),_0xca0f8f)};}function _0x80e1(_0x44987f,_0x80e1e1){_0x44987f=_0x44987f-0x0;const _0x65da8e=_0x4498();let _0x3849ad=_0x65da8e[_0x44987f];return _0x3849ad;}export const API_RETRY_OPTIONS={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1388,'exponentialBackoff':!![],'shouldRetry':(_0x17e5c8,_0x154301)=>{const _0x58517f={'UTLWJ':function(_0x35a055,_0x10f137){return _0x35a055*_0x10f137;},'FmmUk':function(_0x5c8b3c,_0x192ca0){return _0x5c8b3c-_0x192ca0;},'QtmuH':function(_0x3e29b4,_0x1d5b92){return _0x3e29b4===_0x1d5b92;},'zHCEg':'YpFac','ysFRK':_0x80e1(0x44),'GXVZX':_0x80e1(0x45),'rkOCL':function(_0x886220,_0x1c13e8){return _0x886220!==_0x1c13e8;},'nKiZl':_0x80e1(0x46),'WaPrL':_0x80e1(0x47),'yEcKR':function(_0xbb5c13,_0x325e8a){return _0xbb5c13<=_0x325e8a;},'lDtfG':_0x80e1(0x1),'LgUId':_0x80e1(0x0),'DTfhe':'fetch','GjylM':_0x80e1(0x4),'PikJV':function(_0x3f76fe,_0x40ca74){return _0x3f76fe===_0x40ca74;},'HnJan':_0x80e1(0x48),'yfgBi':_0x80e1(0x6),'TbuIT':_0x80e1(0x7)};if(_0x58517f['QtmuH'](_0x17e5c8['status'],0x191)||_0x58517f[_0x80e1(0x49)](_0x17e5c8['status'],0x193)){if(_0x58517f['QtmuH'](_0x58517f[_0x80e1(0x4a)],_0x58517f['ysFRK']))_0x105913[_0x80e1(0x4b)]('⚠️\x20API\x20call\x20failed\x20(attempt\x20'+_0x4a586e+_0x80e1(0x4c)+_0x548844+_0x80e1(0x4d)+_0x1ba910['message']);else return![];}if(_0x58517f[_0x80e1(0x49)](_0x17e5c8[_0x80e1(0xa)],0x190)||_0x58517f[_0x80e1(0x49)](_0x17e5c8[_0x80e1(0xa)],0x194)&&!_0x17e5c8[_0x80e1(0xe)][_0x80e1(0xf)](_0x58517f[_0x80e1(0x4e)]))return![];if(_0x17e5c8[_0x80e1(0xa)]===0x1ad)return _0x58517f[_0x80e1(0x4f)](_0x58517f['nKiZl'],_0x58517f[_0x80e1(0x50)])?_0x58517f[_0x80e1(0x51)](_0x154301,0x2):![];if(_0x17e5c8['status']>=0x1f4)return!![];if(_0x17e5c8['name']===_0x58517f[_0x80e1(0x52)]||_0x17e5c8[_0x80e1(0xe)][_0x80e1(0xf)](_0x80e1(0x16))||_0x17e5c8[_0x80e1(0xe)][_0x80e1(0xf)](_0x58517f[_0x80e1(0x53)])||_0x17e5c8['message'][_0x80e1(0xf)](_0x58517f['DTfhe'])||_0x17e5c8['message'][_0x80e1(0xf)](_0x58517f[_0x80e1(0x54)])){if(_0x58517f['PikJV']('VDcHK',_0x58517f['HnJan']))_0x55651d=_0x1172dc[_0x80e1(0x55)](_0x58517f[_0x80e1(0x56)](_0x14d341[_0x80e1(0x3b)],_0x5e5367[_0x80e1(0x3f)](0x2,_0x58517f['FmmUk'](_0x258804,0x1))),_0x32a3d1[_0x80e1(0x40)]);else return!![];}if(_0x17e5c8[_0x80e1(0xe)][_0x80e1(0xf)](_0x58517f[_0x80e1(0x57)])||_0x17e5c8[_0x80e1(0xe)]['includes'](_0x58517f[_0x80e1(0x58)])||_0x17e5c8[_0x80e1(0xe)][_0x80e1(0xf)](_0x80e1(0x59)))return!![];return![];},'onRetry':(_0xa5f06,_0x317f76,_0x15b27f)=>{console[_0x80e1(0x4b)](_0x80e1(0x5a)+_0x317f76+_0x80e1(0x4c)+_0x15b27f+_0x80e1(0x4d)+_0xa5f06[_0x80e1(0xe)]);}};export const NETWORK_RETRY_OPTIONS={'maxRetries':0x2,'baseDelay':0x7d0,'maxDelay':0x1f40,'exponentialBackoff':!![],'shouldRetry':(_0x2125b8,_0x22ef01)=>{const _0x5c6fa7={'RWUox':'Network\x20request\x20failed','xvQTR':_0x80e1(0x4),'hsYHa':function(_0x2e33f5,_0x10d399){return _0x2e33f5===_0x10d399;},'zhzBq':'AbortError'};return _0x2125b8[_0x80e1(0xe)][_0x80e1(0xf)](_0x5c6fa7['RWUox'])||_0x2125b8[_0x80e1(0xe)][_0x80e1(0xf)](_0x5c6fa7[_0x80e1(0x5b)])||_0x2125b8['message']['includes'](_0x80e1(0x5c))||_0x5c6fa7[_0x80e1(0x5d)](_0x2125b8[_0x80e1(0x12)],_0x5c6fa7[_0x80e1(0x5e)]);}};export async function fetchWithRetry(_0x221e7c,_0x3987de={},_0x4afb3c=API_RETRY_OPTIONS){const _0x6e58c4={'MARlA':function(_0x459051,_0x29c868,_0x474eb1){return _0x459051(_0x29c868,_0x474eb1);}},_0x1b957b=await _0x6e58c4[_0x80e1(0x5f)](withRetry,()=>fetch(_0x221e7c,_0x3987de),_0x4afb3c);if(!_0x1b957b[_0x80e1(0x60)])throw _0x1b957b['error'];return _0x1b957b[_0x80e1(0x61)];}function _0x4498(){const _0x4022fc=['Network\x20request\x20failed','AbortError','dFGYh','QKHHs','ENOTFOUND','aJnai','JSON\x20Parse\x20error','Unexpected\x20character','TAINT','SLfys','status','rxWwQ','rxlEz','bZYNY','message','includes','zwByH','ErJcx','name','SWpjT','byepz','JaHQn','timeout','cpkUB','OMtma','tmtFC','ZMsrV','aeJIJ','fetch','rYmJA','CPYAJ','BArni','qAHWn','WSVIt','SWbQI','ODeJf','Unknown\x20error','IEnHv','pwvrW','maxRetries','error','BqwbB','ytRaI','gIAPA','enableLogging','fjvEz','log','now','eBgwE','KTADQ','ElIsW','LrRlG','PQVky','vnFdh','iNMZi','⏳\x20Waiting\x20','ms\x20before\x20retry\x20(attempt\x20','shouldRetry','FxiBo','baseDelay','exponentialBackoff','gSitI','lvtfG','pow','maxDelay','random','onRetry','sUUdE','FfrXA','validation\x20endpoint','yWfWC','bMJdk','cXkMH','QtmuH','zHCEg','warn','),\x20retrying\x20in\x20','ms:\x20','GXVZX','rkOCL','WaPrL','yEcKR','lDtfG','LgUId','GjylM','min','UTLWJ','yfgBi','TbuIT','HTML\x20page\x20instead\x20of\x20JSON','⚠️\x20API\x20call\x20failed\x20(attempt\x20','xvQTR','DNS','hsYHa','zhzBq','MARlA','success','data','OnairosReactNative/HealthCheck','XNwYu','signal','jIpyP','Ussxo'];_0x4498=function(){return _0x4022fc;};return _0x4498();}export async function healthCheck(_0x4bae59,_0x5c2945=0x1388){const _0x1bc3e5={'XNwYu':function(_0x510845,_0x48ac8a,_0x5f1dc1){return _0x510845(_0x48ac8a,_0x5f1dc1);},'jIpyP':_0x80e1(0x62),'lprXS':function(_0x2033d5,_0x2b4a06){return _0x2033d5(_0x2b4a06);},'Ussxo':function(_0x38e325,_0x40371e){return _0x38e325-_0x40371e;}},_0x3ecdda=Date[_0x80e1(0x2f)]();try{const _0x4b9217=new AbortController(),_0x3316e9=_0x1bc3e5[_0x80e1(0x63)](setTimeout,()=>_0x4b9217['abort'](),_0x5c2945),_0x593e43=await fetch(_0x4bae59,{'method':'GET','signal':_0x4b9217[_0x80e1(0x64)],'headers':{'User-Agent':_0x1bc3e5[_0x80e1(0x65)]}});return _0x1bc3e5['lprXS'](clearTimeout,_0x3316e9),{'reachable':!![],'status':_0x593e43[_0x80e1(0xa)],'duration':_0x1bc3e5[_0x80e1(0x66)](Date['now'](),_0x3ecdda)};}catch(_0x46889a){return{'reachable':![],'error':_0x46889a['message'],'duration':_0x1bc3e5[_0x80e1(0x66)](Date[_0x80e1(0x2f)](),_0x3ecdda)};}}
|