/* Metro module 7347; source: unknown; dependencies: [5, 27, 7339] */ function _fun59154(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7525:6, offset: 0x016e2236, size: 266 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 NativeModules = value.NativeModules; const env0_4 = NativeModules.RNIapIos; value = _fun59155(); const value2 = _fun59159(); const value3 = _fun59163(); const env0_5 = _fun59167(); const env0_6 = _fun59171(); const value4 = _fun59175(); exports.getPendingPurchasesIOS = value; exports.getReceiptIOS = value2; exports.presentCodeRedemptionSheetIOS = value3; exports.getPromotedProductIOS = getPromotedProductIOS; exports.buyPromotedProductIOS = buyPromotedProductIOS; exports.validateReceiptIos = value4; exports.clearTransactionIOS = clearTransactionIOS; exports.clearProductsIOS = clearProductsIOS; exports.deepLinkToSubscriptionsIos = function() { return Linking.openURL('https://apps.apple.com/account/subscriptions'); }; } function _fun59155() { // fn#59155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7525:157, offset: 0x016e2340, size: 32 bytes, params: 1, frame: 12 const env0_0 = env0_2(_fun59157); return getPendingPurchasesIOS; } function _fun59159() { // fn#59159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7525:325, offset: 0x016e23a3, size: 32 bytes, params: 1, frame: 12 const env0_0 = env0_2(_fun59161); return getReceiptIOS; } function _fun59163() { // fn#59163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7525:553, offset: 0x016e2440, size: 32 bytes, params: 1, frame: 12 const env0_0 = env0_2(_fun59165); return presentCodeRedemptionSheetIOS; } function _fun59167() { // fn#59167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7525:732, offset: 0x016e24a5, size: 32 bytes, params: 1, frame: 12 const env0_0 = env0_2(_fun59169); return fetchJsonOrThrow; } function _fun59171() { // fn#59171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7525:1067, offset: 0x016e2588, size: 32 bytes, params: 1, frame: 12 const env0_0 = env0_2(_fun59173); return requestAgnosticReceiptValidationIos; } function _fun59175() { // fn#59175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7525:1346, offset: 0x016e261b, size: 32 bytes, params: 1, frame: 12 const env0_0 = env0_2(_fun59177); return validateReceiptIos; } function getPromotedProductIOS() { // fn#59179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7525:1740, offset: 0x016e26b3, size: 83 bytes, params: 1, frame: 12 const moduleValue = require(7339) /* metro dependency 7339 */; return moduleValue.isIosStorekit2() ? global.Promise.reject('Only available on Sk1') : RNIapIos.promotedProduct(); } function buyPromotedProductIOS() { // fn#59180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7525:1890, offset: 0x016e2706, size: 49 bytes, params: 1, frame: 11 let value = require(7339) /* metro dependency 7339 */; value = value.getIosModule(); return value.buyPromotedProduct(); } function clearTransactionIOS() { // fn#59181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7525:2020, offset: 0x016e2737, size: 49 bytes, params: 1, frame: 11 let value = require(7339) /* metro dependency 7339 */; value = value.getIosModule(); return value.clearTransaction(); } function clearProductsIOS() { // fn#59182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7525:2120, offset: 0x016e2768, size: 49 bytes, params: 1, frame: 11 let value = require(7339) /* metro dependency 7339 */; value = value.getIosModule(); return value.clearProducts(); } function* _fun59157() { // fn#59157, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7525:177, offset: 0x016e2369, size: 58 bytes, params: 1, frame: 12 if (false) { return undefined; } value = environment.__proto__.__proto__; value = env2_0(env2_1[2]); value = value.getIosModule(); return value.getPendingTransactions(); } function* _fun59161({forceRefresh}) { // fn#59161, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7525:345, offset: 0x016e23cc, size: 116 bytes, params: 2, frame: 14 var r1; var requestReceipt; if (false) { return undefined; } value = environment.__proto__.__proto__; let binding = env2_0; const value3 = binding(env2_1[2]); if (value3.isIosStorekit2()) { r1 = global.Promise.reject('Only available on Sk1'); } else { binding = env2_4; requestReceipt = binding.requestReceipt; value = forceRefresh != null; r1 = value && forceRefresh; value = Reflect.apply(requestReceipt, binding, [r1]); r1 = value; } return r1; } function* _fun59165() { // fn#59165, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7525:573, offset: 0x016e2469, size: 60 bytes, params: 1, frame: 12 if (false) { return undefined; } value = environment.__proto__.__proto__; value = env2_0(env2_1[2]); value = value.getIosModule(); return value.presentCodeRedemptionSheet(); } function* _fun59169(a0, a1) { // fn#59169, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7525:752, offset: 0x016e24ce, size: 186 bytes, params: 3, frame: 16 if (false) { return undefined; } const fetch = global.fetch; const object2 = {method: 'POST', headers: {'Accept': 'application/json', 'Content-Type': 'application/json'}}; const JSON = global.JSON; object2.body = JSON.stringify(a1); yield fetch(a0, object2); 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}]); } function* _fun59173(a0) { // fn#59173, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7525:1087, offset: 0x016e25b1, size: 106 bytes, params: 2, frame: 17 if (false) { return undefined; } value = environment.__proto__.__proto__; yield env2_5('https://buy.itunes.apple.com/verifyReceipt', a0); const value3 = undefined; if (true) { if (value3) { if (value3.status !== 21007) { return value3; } yield env2_5('https://sandbox.itunes.apple.com/verifyReceipt', a0); value = undefined; if (false) { return value; } return value; } } return value3; } function* _fun59177({receiptBody, isTest}) { // fn#59177, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7525:1366, offset: 0x016e2644, size: 111 bytes, params: 2, frame: 14 if (true) { if (isTest == null) { value = environment.__proto__.__proto__; yield env2_6(receiptBody); } else { var r4 = isTest ? 'https://sandbox.itunes.apple.com/verifyReceipt' : 'https://buy.itunes.apple.com/verifyReceipt'; value = environment.__proto__.__proto__; yield env2_5(r4, receiptBody); } } }