58 lines
3.6 KiB
TypeScript
58 lines
3.6 KiB
TypeScript
/* Metro module 7024; source: modules/payments/utils/BillingStandaloneUtils.tsx; dependencies: [661, 1471, 491, 507, 2] */
|
|
function _fun55663(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7202:6, offset: 0x013ad61f, size: 164 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const closure = goToBillingStandalonePageWithHandoff;
|
|
const closure2 = goToStandalonePremiumCheckout;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
|
const env0_3 = constantsModule.Endpoints;
|
|
const env0_4 = constantsModule.Routes;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/payments/utils/BillingStandaloneUtils.tsx');
|
|
exports.goToBillingStandalonePageWithHandoff = closure;
|
|
exports.goToStandalonePremiumCheckout = closure2;
|
|
exports.goToStandalonePremiumCheckoutWeb = function(a0, a1) {
|
|
return goToStandalonePremiumCheckout(a0, _fun55669, a1);
|
|
};
|
|
}
|
|
|
|
function goToBillingStandalonePageWithHandoff(a0, a1, a2) { // fn#55664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7202:131, offset: 0x013ad6c3, size: 266 bytes, params: 4, frame: 21
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
const URL = global.URL;
|
|
const defaultImport = importDefault(1471) /* metro dependency 1471: URLUtils */;
|
|
const makeUrl = defaultImport.makeUrl;
|
|
const BILLING_LOGIN_HANDOFF = Routes.BILLING_LOGIN_HANDOFF;
|
|
const uRL = new URL(Reflect.apply(makeUrl, defaultImport, [BILLING_LOGIN_HANDOFF, false]));
|
|
const value4 = (require(491) /* metro dependency 491 */).v4();
|
|
uRL.searchParams.append('handoff_key', value4);
|
|
uRL.searchParams.append('redirect_to', a0);
|
|
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
|
const post = HTTP.post;
|
|
const HANDOFF = Endpoints.HANDOFF;
|
|
return Reflect.apply(post, HTTP, [{url: HANDOFF, body: {key: value4}, oldFormErrors: true,
|
|
rejectWithError: false}]).then(_fun55665, _fun55666);
|
|
}
|
|
|
|
function goToStandalonePremiumCheckout({planId, isGift, loadId, paymentMethodType, deepLinkType, usePresetOffer, flowType}, a1, a2) { // fn#55667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7202:457, offset: 0x013ad7fd, size: 94 bytes, params: 4, frame: 24
|
|
return goToBillingStandalonePageWithHandoff(Routes.BILLING_STANDALONE_CHECKOUT_PAGE(planId, isGift, loadId,
|
|
paymentMethodType, deepLinkType, usePresetOffer, flowType), a1, a2);
|
|
}
|
|
|
|
function goToStandalonePremiumCheckoutWeb(a0, a1) { // fn#55668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7202:948, offset: 0x013ad85b, size: 31 bytes, params: 3, frame: 15
|
|
return goToStandalonePremiumCheckout(a0, function(a0, a1) {
|
|
a1.searchParams.append('handoff_token', a0.body.handoff_token);
|
|
global.window.open(a1.href);
|
|
}, a1);
|
|
}
|
|
|
|
function _fun55665(a0) { // fn#55665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7202:433, offset: 0x013ad7cd, size: 24 bytes, params: 2, frame: 13
|
|
return require(a0, env0_3);
|
|
}
|
|
|
|
function _fun55666(a0) { // fn#55666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7202:445, offset: 0x013ad7e5, size: 24 bytes, params: 2, frame: 13
|
|
return importDefault(a0, env0_0);
|
|
}
|
|
|