Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,106 @@
|
||||
/* Metro module 10114; source: modules/virtual_currency/checkout/OrbCheckoutModalContext.tsx; dependencies: [31, 1878, 4279, 33, 491, 566, 3802, 6833, 8461, 5133, 3817, 10073, 2] */
|
||||
function _fun78956(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10300:6, offset: 0x01e3e61f, size: 312 bytes, params: 8, frame: 19
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = require(31) /* metro dependency 31 */;
|
||||
const createContext = value.createContext;
|
||||
const env0_3 = value.useContext;
|
||||
const env0_4 = value.useCallback;
|
||||
const env0_5 = value.useMemo;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const skuStore = importDefault(4279) /* metro dependency 4279: SKUStore */;
|
||||
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
|
||||
object2 = {'skuId': '123', 'loadId': null, 'analyticsLocations': null, 'analyticsSourceLocation': null,
|
||||
'isRedeeming': false, 'orbRedemptionError': null, 'orbProductContext': null};
|
||||
object2.loadId = (require(491) /* metro dependency 491 */).v4();
|
||||
object2.analyticsLocations = [];
|
||||
object2.analyticsSourceLocation = undefined;
|
||||
object2.onRedeemVirtualCurrency = function() {
|
||||
};
|
||||
const env0_9 = createContext(object2);
|
||||
const closure = useOrbCheckoutModalContextProvider;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/virtual_currency/checkout/OrbCheckoutModalContext.tsx');
|
||||
exports.useOrbCheckoutModalContextProvider = closure;
|
||||
exports.OrbCheckoutModalContextProvider = OrbCheckoutModalContextProvider;
|
||||
exports.useOrbCheckoutModalContext = useOrbCheckoutModalContext;
|
||||
}
|
||||
|
||||
function useOrbCheckoutModalContextProvider({skuId, loadId, onCheckoutSuccess, onSignFailure, order}) { // fn#78958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10300:421, offset: 0x01e3e757, size: 473 bytes, params: 2, frame: 26
|
||||
const value = undefined;
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return importDefault(dependencyMap[6]).canUseShopDiscounts(UserStore.getCurrentUser());
|
||||
});
|
||||
const value5 = (require(6833) /* metro dependency 6833: StorefrontUtils */).useSKUOrbPrice({sku: (require(566) /* metro dependency 566: flux */).useStateFromStores([SKUStore],
|
||||
function() {
|
||||
return SKUStore.get(skuId);
|
||||
}, [skuId])});
|
||||
const useFetchCollectiblesProductModule = require(8461) /* metro dependency 8461: useFetchCollectiblesProduct */;
|
||||
const useFetchCollectiblesProduct = useFetchCollectiblesProductModule.useFetchCollectiblesProduct;
|
||||
const value6 = useMemo(_fun78961, [value5, Reflect.apply(useFetchCollectiblesProduct,
|
||||
useFetchCollectiblesProductModule, [skuId]).product, value3]);
|
||||
if ((value6 == null ? value : value6.orbPriceAmount) == null) {
|
||||
(require(3817) /* metro dependency 3817: BillingUtils */).captureBillingMessage('Orb price not found for product',
|
||||
|
||||
{tags: {sku_id: skuId}});
|
||||
}
|
||||
const value7 = (require(10073) /* metro dependency 10073: useRedeemVirtualCurrency */).useRedeemVirtualCurrency({skuId: skuId,
|
||||
loadId: loadId, order: order, onSignFailure: onSignFailure});
|
||||
return {skuId: skuId, loadId: loadId, orbProductContext: value6, onRedeemVirtualCurrency: useCallback(function(a0) {
|
||||
var env0_0 = a0;
|
||||
redeemVirtualCurrency(skuId, loadId, _fun78963);
|
||||
}, [skuId, loadId, value7.redeemVirtualCurrency, onCheckoutSuccess]), isRedeeming: value7.isSubmitting,
|
||||
orbRedemptionError: value7.error};
|
||||
}
|
||||
|
||||
function OrbCheckoutModalContextProvider({skuId, loadId, analyticsSourceLocation, analyticsLocations, onCheckoutSuccess, children}) { // fn#78964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10300:1563, offset: 0x01e3ea3e, size: 174 bytes, params: 2, frame: 23
|
||||
const {orbProductContext, onRedeemVirtualCurrency, isRedeeming,
|
||||
orbRedemptionError} = useOrbCheckoutModalContextProvider({skuId: skuId, loadId: loadId,
|
||||
onCheckoutSuccess: onCheckoutSuccess});
|
||||
const Provider = env0_9.Provider;
|
||||
return (
|
||||
<Provider
|
||||
value={{skuId: skuId, loadId: loadId, analyticsLocations: analyticsLocations ?? [],
|
||||
analyticsSourceLocation: analyticsSourceLocation, orbProductContext: orbProductContext,
|
||||
onRedeemVirtualCurrency: onRedeemVirtualCurrency, isRedeeming: isRedeeming,
|
||||
orbRedemptionError: orbRedemptionError}}
|
||||
>
|
||||
{children}
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
|
||||
function useOrbCheckoutModalContext() { // fn#78965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10300:2062, offset: 0x01e3eaec, size: 20 bytes, params: 1, frame: 11
|
||||
return useContext(env0_9);
|
||||
}
|
||||
|
||||
function _fun78961() { // fn#78961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10300:721, offset: 0x01e3e963, size: 119 bytes, params: 1, frame: 14
|
||||
var value3;
|
||||
var productOrbPrice;
|
||||
const value2 = null;
|
||||
if (value2 != env0_4) {
|
||||
return {orbPriceAmount: env0_4.amount};
|
||||
}
|
||||
if (value2 != product) {
|
||||
value3 = environment.__proto__;
|
||||
productOrbPrice = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductOrbPrice({product: product,
|
||||
|
||||
hasShopDiscount: env0_3});
|
||||
return {orbPriceAmount: value2 === productOrbPrice ? value2 : productOrbPrice.amount};
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun78962(a0) { // fn#78962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10300:1181, offset: 0x01e3e9da, size: 42 bytes, params: 2, frame: 15
|
||||
const env0_0 = a0;
|
||||
redeemVirtualCurrency(skuId, loadId, _fun78963);
|
||||
}
|
||||
|
||||
function _fun78963(a0) { // fn#78963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10300:1192, offset: 0x01e3ea04, size: 58 bytes, params: 2, frame: 13
|
||||
if (onCheckoutSuccess != null) {
|
||||
onCheckoutSuccess({entitlements: a0, skuId: skuId});
|
||||
}
|
||||
env0_0(a0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/* Metro module 6836; source: modules/virtual_currency/checkout/OrbCheckoutUtils.tsx; dependencies: [661, 663, 1244, 2] */
|
||||
function _fun53836(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7014:6, offset: 0x01356d46, size: 168 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_2 = constantsModule.CurrencyCodes;
|
||||
const env0_3 = constantsModule.MarketingURLs;
|
||||
const env0_4 = constantsModule.PriceSetAssignmentPurchaseTypes;
|
||||
const env0_5 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).EXTERNAL_PRODUCT_SKU_IDS;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/virtual_currency/checkout/OrbCheckoutUtils.tsx');
|
||||
exports.getOrbPriceFromPrices = getOrbPriceFromPrices;
|
||||
exports.getOrbCheckoutDisclaimerMessage = getOrbCheckoutDisclaimerMessage;
|
||||
}
|
||||
|
||||
function getOrbPriceFromPrices(a0, a1) { // fn#53837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7014:325, offset: 0x01356dee, size: 162 bytes, params: 3, frame: 15
|
||||
const r1 = a1 && a0[PriceSetAssignmentPurchaseTypes.PREMIUM_TIER_2] != null ? a0[PriceSetAssignmentPurchaseTypes.PREMIUM_TIER_2] : a0[PriceSetAssignmentPurchaseTypes.DEFAULT];
|
||||
const value = null;
|
||||
let r3 = value == r1 || value == r1.countryPrices || value == r1.countryPrices.prices ? undefined : r1.countryPrices.prices.slice(0,
|
||||
2);
|
||||
r3 = value == r3 ? [] : r3;
|
||||
const value4 = r3.find(function({currency}) {
|
||||
return currency === CurrencyCodes.DISCORD_ORB;
|
||||
});
|
||||
return value != value4 ? value4 : value;
|
||||
}
|
||||
|
||||
function getOrbCheckoutDisclaimerMessage(a0) { // fn#53839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7014:596, offset: 0x01356eac, size: 351 bytes, params: 2, frame: 22
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const format = intl.format;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const property = t['5qdUrO'];
|
||||
const intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const PAID_TERMS = MarketingURLs.PAID_TERMS;
|
||||
const PAID_TERMS_VIRTUAL_GOODS = MarketingURLs.PAID_TERMS_VIRTUAL_GOODS;
|
||||
const value2 = Reflect.apply(format, intl, [property, {buyButtonLabel: intl2.string(t['zLch/S']),
|
||||
paidServiceTermURL: PAID_TERMS, virtualGoodsURL: PAID_TERMS_VIRTUAL_GOODS}]);
|
||||
const value3 = intl.string(t['Sxed/G']);
|
||||
const ORB_PROFILE_BADGE = EXTERNAL_PRODUCT_SKU_IDS.ORB_PROFILE_BADGE;
|
||||
return [value2, ' ',
|
||||
a0 === ORB_PROFILE_BADGE ? intl.string(t.APcKRo) : a0 !== EXTERNAL_PRODUCT_SKU_IDS.FRACTIONAL_PREMIUM ? value3 : intl.string(t.FhJ74j)];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,311 @@
|
||||
/* Metro module 10113; source: modules/virtual_currency/checkout/native/OrbCheckoutModal.tsx; dependencies: [31, 661, 482, 33, 10114, 8461, 4572, 10115, 9489, 7295, 683, 10119, 5080, 6258, 6259, 10120, 44, 491, 1244, 5282, 10121, 2] */
|
||||
function _fun78941(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10299:6, offset: 0x01e3da58, size: 299 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(31) /* metro dependency 31 */;
|
||||
const env0_4 = value.useRef;
|
||||
const env0_5 = value.useEffect;
|
||||
const env0_6 = value.useCallback;
|
||||
const env0_7 = value.useMemo;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_8 = value.AnalyticEvents;
|
||||
const env0_9 = value.CurrencyCodes;
|
||||
const env0_10 = (require(482) /* metro dependency 482: Constants */).InternalPaymentGateways;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value.jsx;
|
||||
const env0_12 = value.jsxs;
|
||||
object = {MAIN: 'MAIN'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/virtual_currency/checkout/native/OrbCheckoutModal.tsx');
|
||||
exports.default = _default_78952;
|
||||
}
|
||||
|
||||
function OrbCheckoutModalContent({orbBalance}) { // fn#78942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10299:322, offset: 0x01e3db83, size: 287 bytes, params: 2, frame: 23
|
||||
const {skuId,
|
||||
orbRedemptionError} = (require(10114) /* metro dependency 10114: OrbCheckoutModalContext */).useOrbCheckoutModalContext();
|
||||
const useFetchCollectiblesProductModule = require(8461) /* metro dependency 8461: useFetchCollectiblesProduct */;
|
||||
const useFetchCollectiblesProduct = useFetchCollectiblesProductModule.useFetchCollectiblesProduct;
|
||||
const product = Reflect.apply(useFetchCollectiblesProduct, useFetchCollectiblesProductModule, [skuId]).product;
|
||||
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const items2 = [orbRedemptionError != null && ((OrbCheckoutErrorCard) => <OrbCheckoutErrorCard error={orbRedemptionError.message} />)((require(10115) /* metro dependency 10115: OrbCheckoutModalComponents */).OrbCheckoutErrorCard)];
|
||||
const OrbCheckoutOrderSummary = (require(10115) /* metro dependency 10115: OrbCheckoutModalComponents */).OrbCheckoutOrderSummary;
|
||||
items2[1] = <OrbCheckoutOrderSummary product={product ?? null} />;
|
||||
const OrbCheckoutPaymentSourceDetails = (require(10115) /* metro dependency 10115: OrbCheckoutModalComponents */).OrbCheckoutPaymentSourceDetails;
|
||||
items2[2] = <OrbCheckoutPaymentSourceDetails orbBalance={orbBalance} />;
|
||||
return (
|
||||
<Stack>
|
||||
{items2}
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
|
||||
function OrbCheckoutModalFooter({onPress}) { // fn#78943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10299:737, offset: 0x01e3dca2, size: 130 bytes, params: 2, frame: 21
|
||||
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const OrbCheckoutLegalFinePrint = (require(10115) /* metro dependency 10115: OrbCheckoutModalComponents */).OrbCheckoutLegalFinePrint;
|
||||
const orbCheckoutLegalFinePrint = <OrbCheckoutLegalFinePrint />;
|
||||
const OrbCheckoutPurchaseButton = (require(10115) /* metro dependency 10115: OrbCheckoutModalComponents */).OrbCheckoutPurchaseButton;
|
||||
return (
|
||||
<Stack>
|
||||
{orbCheckoutLegalFinePrint}
|
||||
<OrbCheckoutPurchaseButton onPress={onPress} />
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
|
||||
function OrbCheckoutModalScreen({startTime}) { // fn#78944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10299:894, offset: 0x01e3dd24, size: 392 bytes, params: 2, frame: 24
|
||||
const {onRedeemVirtualCurrency,
|
||||
orbRedemptionError} = (require(10114) /* metro dependency 10114: OrbCheckoutModalContext */).useOrbCheckoutModalContext();
|
||||
const emitOrbCheckoutPaymentFlowEvent = _fun78945(startTime).emitOrbCheckoutPaymentFlowEvent;
|
||||
const value3 = (require(10119) /* metro dependency 10119: useVirtualCurrencyBalance */).useVirtualCurrencyBalance();
|
||||
const value4 = useRef(value3);
|
||||
useEffect(function() {
|
||||
emitOrbCheckoutPaymentFlowEvent(AnalyticEvents.PAYMENT_FLOW_STARTED);
|
||||
}, [emitOrbCheckoutPaymentFlowEvent]);
|
||||
useEffect(_fun78949, [orbRedemptionError, emitOrbCheckoutPaymentFlowEvent]);
|
||||
const r14 = value4.current ?? value3;
|
||||
const value5 = useCallback(_fun78950, [emitOrbCheckoutPaymentFlowEvent, value3, onRedeemVirtualCurrency]);
|
||||
const ModalScreen = (require(6258) /* metro dependency 6258: ModalScreenNative */).ModalScreen;
|
||||
const ModalContent = (require(6259) /* metro dependency 6259: ModalContentNative */).ModalContent;
|
||||
const modalContent = <ModalContent><OrbCheckoutModalContent orbBalance={r14} /></ModalContent>;
|
||||
const ModalFooter = (require(10120) /* metro dependency 10120: ModalFooterNative */).ModalFooter;
|
||||
return (
|
||||
<ModalScreen>
|
||||
{modalContent}
|
||||
<ModalFooter>
|
||||
<OrbCheckoutModalFooter onPress={value5} />
|
||||
</ModalFooter>
|
||||
</ModalScreen>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_78952({skuId, onCheckoutSuccess, analyticsLocations}) { // fn#78952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10299:2604, offset: 0x01e3e2df, size: 445 bytes, params: 2, frame: 24
|
||||
var object4;
|
||||
(importDefault(44) /* metro dependency 44 */)(skuId, 'SKU ID is required');
|
||||
let binding = env0_3;
|
||||
let useRef = binding.useRef;
|
||||
const moduleValue = require(491) /* metro dependency 491 */;
|
||||
const current = Reflect.apply(useRef, binding, [moduleValue.v4()]).current;
|
||||
useRef = binding.useRef;
|
||||
const Date = global.Date;
|
||||
const current2 = Reflect.apply(useRef, binding, [Date.now()]).current;
|
||||
binding.useEffect(function() {
|
||||
var defaultImport = importDefault(dependencyMap[10]);
|
||||
var OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
|
||||
defaultImport.track(OPEN_MODAL, {type: 'Orb Checkout Modal', location_stack: analyticsLocations,
|
||||
sku_id: skuId});
|
||||
}, [analyticsLocations, skuId]);
|
||||
const value2 = binding.useCallback(_fun78954, [skuId, current, analyticsLocations, current2]);
|
||||
object4 = {};
|
||||
binding = env0_13;
|
||||
let MAIN = binding.MAIN;
|
||||
const object3 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object3.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q9EGps);
|
||||
object3.headerShown = true;
|
||||
object3.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderTextButton(intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']),
|
||||
value2);
|
||||
object3.render = render_78955;
|
||||
object4[MAIN] = object3;
|
||||
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
|
||||
MAIN = binding.MAIN;
|
||||
return (
|
||||
<Modal
|
||||
screens={object4}
|
||||
initialRouteName={MAIN}
|
||||
headerTitleAlign="center"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun78945(a0) { // fn#78945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10299:1011, offset: 0x01e3deac, size: 162 bytes, params: 2, frame: 19
|
||||
var object2;
|
||||
const env0_0 = a0;
|
||||
const value2 = (require(10114) /* metro dependency 10114: OrbCheckoutModalContext */).useOrbCheckoutModalContext();
|
||||
const value3 = useMemo(_fun78946, [value2.loadId, value2.skuId, value2.analyticsLocations,
|
||||
value2.orbProductContext]);
|
||||
object2 = {};
|
||||
object2.emitOrbCheckoutPaymentFlowEvent = useCallback(_fun78947, [a0, value3]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun78949() { // fn#78949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10299:2169, offset: 0x01e3e21c, size: 75 bytes, params: 1, frame: 15
|
||||
var emitOrbCheckoutPaymentFlowEventBinding;
|
||||
var value4;
|
||||
if (orbRedemptionError != null && env0_4.current !== null) {
|
||||
emitOrbCheckoutPaymentFlowEventBinding = emitOrbCheckoutPaymentFlowEvent;
|
||||
value4 = environment.__proto__;
|
||||
emitOrbCheckoutPaymentFlowEventBinding(AnalyticEvents.PAYMENT_FLOW_FAILED, orbRedemptionError);
|
||||
env0_4.current = null;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun78950() { // fn#78950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10299:2289, offset: 0x01e3e267, size: 61 bytes, params: 1, frame: 12
|
||||
const emitOrbCheckoutPaymentFlowEventBinding = emitOrbCheckoutPaymentFlowEvent;
|
||||
const PAYMENT_FLOW_COMPLETED = AnalyticEvents.PAYMENT_FLOW_COMPLETED;
|
||||
emitOrbCheckoutPaymentFlowEventBinding(PAYMENT_FLOW_COMPLETED);
|
||||
env0_4.current = env0_3;
|
||||
onRedeemVirtualCurrency(_fun78951);
|
||||
}
|
||||
|
||||
function _fun78954() { // fn#78954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10299:2892, offset: 0x01e3e4ed, size: 194 bytes, params: 1, frame: 22
|
||||
const Date = global.Date;
|
||||
const value = Date.now();
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const PAYMENT_FLOW_CANCELED = AnalyticEvents.PAYMENT_FLOW_CANCELED;
|
||||
const object2 = {};
|
||||
object2.load_id = current;
|
||||
const virtualCurrencyUtilsModule = require(9489) /* metro dependency 9489: VirtualCurrencyUtils */;
|
||||
const get1PShopApplicationIdForSKU = virtualCurrencyUtilsModule.get1PShopApplicationIdForSKU;
|
||||
const skuIdBinding = skuId;
|
||||
object2.application_id = Reflect.apply(get1PShopApplicationIdForSKU, virtualCurrencyUtilsModule, [skuIdBinding]);
|
||||
object2.location_stack = analyticsLocations;
|
||||
const VIRTUAL_CURRENCY = InternalPaymentGateways.VIRTUAL_CURRENCY;
|
||||
object2.payment_gateway = VIRTUAL_CURRENCY;
|
||||
object2.sku_id = skuIdBinding;
|
||||
const DISCORD_ORB = CurrencyCodes.DISCORD_ORB;
|
||||
object2.currency = DISCORD_ORB;
|
||||
object2.duration_ms = value - current;
|
||||
Reflect.apply(track, defaultImport, [PAYMENT_FLOW_CANCELED, object2]);
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
|
||||
}
|
||||
|
||||
function _default_78952Render() { // fn#78955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10299:3316, owner: _default_78952.render, offset: 0x01e3e5af, size: 112 bytes, params: 1, frame: 17
|
||||
const OrbCheckoutModalContextProvider = (require(10114) /* metro dependency 10114: OrbCheckoutModalContext */).OrbCheckoutModalContextProvider;
|
||||
return (
|
||||
<OrbCheckoutModalContextProvider
|
||||
skuId={skuId}
|
||||
loadId={current}
|
||||
onCheckoutSuccess={onCheckoutSuccess}
|
||||
analyticsLocations={analyticsLocations}
|
||||
>
|
||||
<OrbCheckoutModalScreen startTime={current} />
|
||||
</OrbCheckoutModalContextProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun78946() { // fn#78946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10299:1129, offset: 0x01e3df4e, size: 187 bytes, params: 1, frame: 18
|
||||
var r8;
|
||||
var r1;
|
||||
var object3;
|
||||
var orbPriceAmount;
|
||||
var value5;
|
||||
const object4 = {};
|
||||
object4.load_id = loadId;
|
||||
const value3 = undefined;
|
||||
const virtualCurrencyUtilsModule = require(9489) /* metro dependency 9489: VirtualCurrencyUtils */;
|
||||
const get1PShopApplicationIdForSKU = virtualCurrencyUtilsModule.get1PShopApplicationIdForSKU;
|
||||
const skuIdBinding = skuId;
|
||||
object4.application_id = Reflect.apply(get1PShopApplicationIdForSKU, virtualCurrencyUtilsModule, [skuIdBinding]);
|
||||
object4.location_stack = analyticsLocations;
|
||||
object4.sku_id = skuIdBinding;
|
||||
const DISCORD_ORB = CurrencyCodes.DISCORD_ORB;
|
||||
object4.currency = DISCORD_ORB;
|
||||
const VIRTUAL_CURRENCY = InternalPaymentGateways.VIRTUAL_CURRENCY;
|
||||
object4.payment_gateway = VIRTUAL_CURRENCY;
|
||||
const value4 = orbProductContext != null;
|
||||
if (value4) {
|
||||
object3 = {};
|
||||
orbPriceAmount = orbProductContext.orbPriceAmount;
|
||||
value5 = orbPriceAmount != null;
|
||||
object3.price = value5 ? orbPriceAmount : value3;
|
||||
orbPriceAmount = orbProductContext.orbPriceAmount;
|
||||
object3.regular_price = orbPriceAmount ?? value3;
|
||||
r1 = object3;
|
||||
r8 = value5;
|
||||
} else {
|
||||
r1 = value4;
|
||||
}
|
||||
copyDataProperties(object4, r1, r8);
|
||||
return object4;
|
||||
}
|
||||
|
||||
function _fun78947(a0, a1) { // fn#78947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10299:1460, offset: 0x01e3e009, size: 502 bytes, params: 3, frame: 20
|
||||
var r10;
|
||||
var object2;
|
||||
var PAYMENT_FLOW_COMPLETED;
|
||||
var PAYMENT_FLOW_SUCCEEDED;
|
||||
var PAYMENT_FLOW_CANCELED;
|
||||
var defaultImport;
|
||||
var track;
|
||||
var PAYMENT_FLOW_FAILED;
|
||||
var object3;
|
||||
var code;
|
||||
var defaultImport2;
|
||||
var defaultImport3;
|
||||
var defaultImport4;
|
||||
var trackPaymentFlowStartedAnalyticsAndCTP;
|
||||
const Date = global.Date;
|
||||
let value = Date.now();
|
||||
value -= env0_0;
|
||||
const PAYMENT_FLOW_STARTED = AnalyticEvents.PAYMENT_FLOW_STARTED;
|
||||
if (a0 === PAYMENT_FLOW_STARTED) {
|
||||
value = require(7295) /* metro dependency 7295: PaymentFlowStartedTriggerPoint */;
|
||||
trackPaymentFlowStartedAnalyticsAndCTP = value.trackPaymentFlowStartedAnalyticsAndCTP;
|
||||
object3 = {};
|
||||
copyDataProperties(object3, env0_5, r10);
|
||||
object3['has_saved_payment_source'] = false;
|
||||
object3['continue_session_initial_step'] = null;
|
||||
Reflect.apply(trackPaymentFlowStartedAnalyticsAndCTP, value, [object3]);
|
||||
} else {
|
||||
PAYMENT_FLOW_COMPLETED = AnalyticEvents.PAYMENT_FLOW_COMPLETED;
|
||||
if (a0 === PAYMENT_FLOW_COMPLETED) {
|
||||
defaultImport4 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport4.track;
|
||||
PAYMENT_FLOW_COMPLETED = AnalyticEvents.PAYMENT_FLOW_COMPLETED;
|
||||
object3 = {};
|
||||
copyDataProperties(object3, env0_5, r10);
|
||||
object3['duration_ms'] = value;
|
||||
Reflect.apply(track, defaultImport4, [PAYMENT_FLOW_COMPLETED, object3]);
|
||||
} else {
|
||||
PAYMENT_FLOW_SUCCEEDED = AnalyticEvents.PAYMENT_FLOW_SUCCEEDED;
|
||||
if (a0 === PAYMENT_FLOW_SUCCEEDED) {
|
||||
defaultImport3 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport3.track;
|
||||
PAYMENT_FLOW_SUCCEEDED = AnalyticEvents.PAYMENT_FLOW_SUCCEEDED;
|
||||
object3 = {};
|
||||
copyDataProperties(object3, env0_5, r10);
|
||||
object3['duration_ms'] = value;
|
||||
Reflect.apply(track, defaultImport3, [PAYMENT_FLOW_SUCCEEDED, object3]);
|
||||
} else {
|
||||
PAYMENT_FLOW_CANCELED = AnalyticEvents.PAYMENT_FLOW_CANCELED;
|
||||
if (a0 === PAYMENT_FLOW_CANCELED) {
|
||||
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport2.track;
|
||||
PAYMENT_FLOW_CANCELED = AnalyticEvents.PAYMENT_FLOW_CANCELED;
|
||||
object3 = {};
|
||||
copyDataProperties(object3, env0_5, r10);
|
||||
object3['duration_ms'] = value;
|
||||
Reflect.apply(track, defaultImport2, [PAYMENT_FLOW_CANCELED, object3]);
|
||||
} else {
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport.track;
|
||||
PAYMENT_FLOW_FAILED = AnalyticEvents.PAYMENT_FLOW_FAILED;
|
||||
object3 = {};
|
||||
copyDataProperties(object3, env0_5, r10);
|
||||
object3['duration_ms'] = value;
|
||||
if (a1 != null) {
|
||||
code = a1.code;
|
||||
object2 = {payment_error_code: code, error_message: a1.message};
|
||||
r10 = code;
|
||||
} else {
|
||||
object2 = {};
|
||||
}
|
||||
copyDataProperties(object3, object2, r10);
|
||||
Reflect.apply(track, defaultImport, [PAYMENT_FLOW_FAILED, object3]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun78951() { // fn#78951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10299:2337, offset: 0x01e3e2a4, size: 59 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__;
|
||||
const emitOrbCheckoutPaymentFlowEventBinding = emitOrbCheckoutPaymentFlowEvent;
|
||||
value = environment.__proto__.__proto__;
|
||||
const PAYMENT_FLOW_SUCCEEDED = AnalyticEvents.PAYMENT_FLOW_SUCCEEDED;
|
||||
emitOrbCheckoutPaymentFlowEventBinding(PAYMENT_FLOW_SUCCEEDED);
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
/* Metro module 10115; source: modules/virtual_currency/checkout/native/OrbCheckoutModalComponents.tsx; dependencies: [31, 27, 33, 4501, 697, 4572, 7684, 4573, 10116, 1244, 10118, 10114, 6836, 6766, 4048, 10119, 4578, 4002, 10076, 2] */
|
||||
function _fun78966(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10301:6, offset: 0x01e3eb00, size: 569 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.View;
|
||||
const env0_5 = value.ActivityIndicator;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {topRowWrapper: {'width': '100%', 'marginBottom': 10}, rowWrapper: {'width': '100%',
|
||||
'marginVertical': 10}};
|
||||
const object4 = {};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
|
||||
object4.backgroundColor = BACKGROUND_MOD_SUBTLE;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.padding = PX_16;
|
||||
object3.rowDetailsContainer = object4;
|
||||
object3.orbPaymentSourceDetails = {'flexDirection': 'row', 'justifyContent': 'space-between',
|
||||
'alignItems': 'center'};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.sectionTitle = {marginBottom: PX_8};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.spinner = {paddingVertical: PX_16, alignItems: 'center'};
|
||||
object3.disclaimer = {opacity: 0.5};
|
||||
const object5 = {};
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object5.padding = PX_12;
|
||||
const BACKGROUND_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_CRITICAL;
|
||||
object5.backgroundColor = BACKGROUND_FEEDBACK_CRITICAL;
|
||||
object3.errorCard = object5;
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/virtual_currency/checkout/native/OrbCheckoutModalComponents.tsx');
|
||||
exports.OrbCheckoutErrorCard = OrbCheckoutErrorCard;
|
||||
exports.OrbCheckoutOrderSummary = OrbCheckoutOrderSummary;
|
||||
exports.OrbCheckoutPaymentSourceDetails = OrbCheckoutPaymentSourceDetails;
|
||||
exports.OrbCheckoutLegalFinePrint = OrbCheckoutLegalFinePrint;
|
||||
exports.OrbCheckoutPurchaseButton = OrbCheckoutPurchaseButton;
|
||||
}
|
||||
|
||||
function OrbCheckoutErrorCard({error}) { // fn#78967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10301:915, offset: 0x01e3ed39, size: 198 bytes, params: 2, frame: 21
|
||||
const styles = useStyles();
|
||||
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const CircleErrorIcon = (require(7684) /* metro dependency 7684: CircleErrorIcon */).CircleErrorIcon;
|
||||
const circleErrorIcon = <CircleErrorIcon size="sm" color="mobile-text-heading-primary" />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.errorCard}>
|
||||
<Stack
|
||||
direction="horizontal"
|
||||
spacing={8}
|
||||
align="flex-start"
|
||||
>
|
||||
{circleErrorIcon}
|
||||
<Text variant="text-sm/medium" color="mobile-text-heading-primary">
|
||||
{error}
|
||||
</Text>
|
||||
</Stack>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function OrbCheckoutOrderSummary({product}) { // fn#78968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10301:1254, offset: 0x01e3edff, size: 298 bytes, params: 2, frame: 22
|
||||
const styles = useStyles();
|
||||
const r5 = product == null ? <View style={[styles.rowDetailsContainer,
|
||||
styles.spinner]}><ActivityIndicator size="small" /></View> : ((Component) => <Component product={product} useOrbPrice />)(importDefault(10116) /* metro dependency 10116: CollectiblesShopCheckoutDetails */);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<View style={styles.topRowWrapper}>
|
||||
<Text
|
||||
variant="heading-sm/bold"
|
||||
color="mobile-text-heading-primary"
|
||||
style={styles.sectionTitle}
|
||||
>
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hws7bC)}
|
||||
</Text>
|
||||
{r5}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function OrbCheckoutPaymentSourceDetails({orbBalance}) { // fn#78969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10301:1643, offset: 0x01e3ef29, size: 339 bytes, params: 2, frame: 26
|
||||
const styles = useStyles();
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<View style={styles.rowWrapper}>
|
||||
<Text
|
||||
variant="heading-sm/bold"
|
||||
color="mobile-text-heading-primary"
|
||||
style={styles.sectionTitle}
|
||||
>
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['zLch/S'])}
|
||||
</Text>
|
||||
<View style={[styles.rowDetailsContainer, styles.orbPaymentSourceDetails]}>
|
||||
<Text variant="text-md/medium" color="mobile-text-heading-primary">
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y0WGqP)}
|
||||
</Text>
|
||||
{((Component) => <Component orbAmount={orbBalance} />)(importDefault(10118) /* metro dependency 10118: OrbCheckoutAmountTag */)}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function OrbCheckoutLegalFinePrint() { // fn#78970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10301:2122, offset: 0x01e3f07c, size: 144 bytes, params: 1, frame: 19
|
||||
const styles = useStyles();
|
||||
const orbCheckoutModalContextModule = require(10114) /* metro dependency 10114: OrbCheckoutModalContext */;
|
||||
const useOrbCheckoutModalContext = orbCheckoutModalContextModule.useOrbCheckoutModalContext;
|
||||
const value2 = env0_3.useMemo(_fun78971, [Reflect.apply(useOrbCheckoutModalContext, orbCheckoutModalContextModule,
|
||||
[]).skuId]);
|
||||
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
||||
return (
|
||||
<TextWithIOSLinkWorkaround
|
||||
style={styles.disclaimer}
|
||||
variant="text-xxs/normal"
|
||||
color="interactive-text-active"
|
||||
>
|
||||
{value2}
|
||||
</TextWithIOSLinkWorkaround>
|
||||
);
|
||||
}
|
||||
|
||||
function OrbCheckoutPurchaseButton({onPress}) { // fn#78972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10301:2414, offset: 0x01e3f139, size: 384 bytes, params: 2, frame: 26
|
||||
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const {isRedeeming,
|
||||
orbProductContext} = (require(10114) /* metro dependency 10114: OrbCheckoutModalContext */).useOrbCheckoutModalContext();
|
||||
const value5 = (require(10119) /* metro dependency 10119: useVirtualCurrencyBalance */).useVirtualCurrencyBalance();
|
||||
const orbPriceAmount = orbProductContext?.orbPriceAmount;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const buttonProps = {variant: (require(4002) /* metro dependency 4002: shared */).isThemeDark(value3) ? 'primary-overlay' : 'primary',
|
||||
size: 'lg'};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
buttonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['zLch/S']);
|
||||
const OrbsIcon = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
|
||||
let value = require(4002) /* metro dependency 4002: shared */;
|
||||
value = value.isThemeDark(value3);
|
||||
buttonProps.icon = <OrbsIcon size="md" color={value ? 'control-overlay-primary-text-default' : 'control-primary-text-default'} />;
|
||||
buttonProps.iconPosition = 'start';
|
||||
buttonProps.loading = isRedeeming;
|
||||
buttonProps.onPress = onPress;
|
||||
let r4 = isRedeeming || orbPriceAmount == null;
|
||||
r4 = !r4 ? value5 == null : r4;
|
||||
r4 = !r4 ? value5 < orbPriceAmount : r4;
|
||||
buttonProps.disabled = r4;
|
||||
return <Button {...buttonProps} />;
|
||||
}
|
||||
|
||||
function _fun78971() { // fn#78971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10301:2196, offset: 0x01e3f10c, size: 45 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (require(6836) /* metro dependency 6836: OrbCheckoutUtils */).getOrbCheckoutDisclaimerMessage(skuId);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user