/* Metro module 7346; source: unknown; dependencies: [5, 27, 7338, 7339] */ function _fun59142(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7524:6, offset: 0x016e1ec0, size: 198 bytes, params: 8, frame: 18 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_2 = importDefault(5) /* metro dependency 5 */; let value = require(27) /* metro dependency 27 */; const env0_3 = value.Linking; const {RNIapModule, RNIapModule} = value.NativeModules; value = _fun59143(); const value2 = _fun59147(); exports.AndroidModule = RNIapModule; exports.getInstallSourceAndroid = function() { var property = require(dependencyMap[2]).InstallSourceAndroid; return RNIapModule ? property.GOOGLE_PLAY : property.AMAZON; }; exports.deepLinkToSubscriptionsAndroid = value; exports.validateReceiptAndroid = value2; exports.acknowledgePurchaseAndroid = acknowledgePurchaseAndroid; exports.isFeatureSupported = isFeatureSupported; } function _fun59143() { // fn#59143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7524:180, offset: 0x016e1f86, size: 32 bytes, params: 1, frame: 12 const env0_0 = env0_2(_fun59145); return deepLinkToSubscriptionsAndroid_59146; } function _fun59147() { // fn#59147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7524:470, offset: 0x016e2037, size: 32 bytes, params: 1, frame: 12 const env0_0 = env0_2(_fun59149); return validateReceiptAndroid; } function acknowledgePurchaseAndroid({token, developerPayload}) { // fn#59152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7524:1240, offset: 0x016e219c, size: 66 bytes, params: 2, frame: 14 let value = require(7339) /* metro dependency 7339 */; value = value.getAndroidModule(); return value.acknowledgePurchase(token, developerPayload); } function isFeatureSupported(a0) { // fn#59153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7524:1395, offset: 0x016e21de, size: 88 bytes, params: 2, frame: 12 return (require(7339) /* metro dependency 7339 */).isAndroid && RNIapModule ? RNIapModule.isFeatureSupported(a0) : global.Promise.reject('This is only available on Android clients'); } function* _fun59145({sku}) { // fn#59145, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7524:200, offset: 0x016e1faf, size: 136 bytes, params: 2, frame: 18 if (false) { return undefined; } value = environment.__proto__.__proto__; let binding = env2_0; binding(env2_1[3]).checkNativeAndroidAvailable(); binding = env2_3; const openURL = binding.openURL; const binding2 = env2_4; const getPackageName = binding2.getPackageName; yield Reflect.apply(getPackageName, binding2, []); value = undefined; if (false) { return value; } return Reflect.apply(openURL, binding, ['https://play.google.com/store/account/subscriptions?package=' + value + '&sku=' + sku]); } function* _fun59149({packageName, productId, productToken, accessToken, isSub}) { // fn#59149, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7524:490, offset: 0x016e2060, size: 262 bytes, params: 2, frame: 29 if (false) { return undefined; } yield global.fetch('https://androidpublisher.googleapis.com/androidpublisher/v3/applications/' + packageName + '/purchases/' + (isSub ? 'subscriptions' : 'products') + '/' + productId + '/tokens/' + productToken + '?access_token=' + accessToken, {method: 'GET', headers: {['Content-Type']: 'application/json'}}); value = undefined; if (false) { return value; } if (value.ok) { return value.json(); } const Object = global.Object; const assign = Object.assign; const Error = global.Error; throw Reflect.apply(assign, Object, [new Error(value.statusText), {statusCode: value.status}]); }