Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,479 @@
|
||||
/* Metro module 7335; source: modules/checkout/native/stores/NativeCheckoutStoreProvider.tsx; dependencies: [5, 57, 31, 27, 7042, 4095, 33, 4501, 6518, 7299, 491, 1216, 2] */
|
||||
function _fun59041(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:6, offset: 0x016dfa19, size: 313 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value.ActivityIndicator;
|
||||
const env0_7 = value.View;
|
||||
value = require(7042) /* metro dependency 7042: NativeCheckoutStore */;
|
||||
const env0_8 = value.createNativeStore;
|
||||
const env0_9 = value.NativeCheckoutStoreContext;
|
||||
const env0_10 = (require(4095) /* metro dependency 4095: PaymentConstants */).ItemPurchaseType;
|
||||
const env0_11 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({loadingSpinnerContainer: {'display': 'flex',
|
||||
'alignItems': 'center', 'justifyContent': 'center', 'height': '100%'}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/checkout/native/stores/NativeCheckoutStoreProvider.tsx');
|
||||
exports.default = NativeCheckoutStoreProviderWrapper;
|
||||
}
|
||||
|
||||
function NativeCheckoutStoreProvider({checkoutInitParameters, order, children}) { // fn#59042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:396, offset: 0x016dfb52, size: 193 bytes, params: 2, frame: 18
|
||||
const env0_2 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun59043);
|
||||
const property = env0_4(env0_5.useState(_fun59044), 1)[0];
|
||||
var env0_4 = env0_5.useRef(order != null);
|
||||
env0_5.useEffect(_fun59045, [order, property]);
|
||||
return (
|
||||
<NativeCheckoutStoreContext value={property}>
|
||||
{children}
|
||||
</NativeCheckoutStoreContext>
|
||||
);
|
||||
}
|
||||
|
||||
function NativeCheckoutStoreProviderWrapper({waitAndCreateOrder, skuIds, paymentGateway, isGift, onOrderCreated, activeSubscription, children, defaultPlans}) { // fn#59046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:892, offset: 0x016dfd2b, size: 528 bytes, params: 2, frame: 30
|
||||
var value11;
|
||||
const env0_4 = defaultPlans;
|
||||
const styles = useStyles();
|
||||
let binding = env0_5;
|
||||
const value4 = env0_4(binding.useState(null), 2);
|
||||
const property = value4[0];
|
||||
var env0_5 = property;
|
||||
const env0_6 = value4[1];
|
||||
const [property2, env0_8] = env0_4(env0_5.useState(null), 2);
|
||||
const [property3, env0_9] = env0_4(env0_5.useState(waitAndCreateOrder), 2);
|
||||
const env0_10 = env0_5.useRef(false);
|
||||
const value9 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(skuIds.length > 0 ? skuIds[0] : null);
|
||||
if (value9 == null) {
|
||||
if (defaultPlans != null) {
|
||||
binding = env0_5;
|
||||
value11 = binding.useCallback(_fun59047(), [paymentGateway, onOrderCreated, isGift]);
|
||||
binding = env0_5;
|
||||
binding.useEffect(_fun59051, [value9, waitAndCreateOrder, property, value11, property2, defaultPlans]);
|
||||
return property3 ? <View style={styles.loadingSpinnerContainer}><ActivityIndicator animating size="large" /></View> : <NativeCheckoutStoreProvider checkoutInitParameters={{skuIds: skuIds,
|
||||
|
||||
|
||||
isGift: isGift, activeSubscription: activeSubscription,
|
||||
referralTrialOfferId: null}} order={property}>{children}</NativeCheckoutStoreProvider>;
|
||||
}
|
||||
if (waitAndCreateOrder) {
|
||||
throw global.Error('SkuIDs needs to a specified!');
|
||||
}
|
||||
}
|
||||
env0_5.useEffect(_fun59051, [value9, waitAndCreateOrder, property, env0_5.useCallback(_fun59047(), [paymentGateway,
|
||||
onOrderCreated, isGift]), property2, defaultPlans]);
|
||||
return property3 ? <View style={styles.loadingSpinnerContainer}><ActivityIndicator animating size="large" /></View> : <NativeCheckoutStoreProvider checkoutInitParameters={{skuIds: skuIds,
|
||||
isGift: isGift, activeSubscription: activeSubscription,
|
||||
referralTrialOfferId: null}} order={property}>{children}</NativeCheckoutStoreProvider>;
|
||||
}
|
||||
|
||||
function _fun59043() { // fn#59043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:495, offset: 0x016dfc13, size: 159 bytes, params: 1, frame: 15
|
||||
var object2;
|
||||
var r2;
|
||||
var value;
|
||||
const id = order?.id;
|
||||
if (id != null) {
|
||||
r2 = id;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
value = require(491) /* metro dependency 491 */;
|
||||
value = value.v4();
|
||||
r2 = value;
|
||||
}
|
||||
value = environment.__proto__;
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).addBreadcrumb({message: 'Checkout session ID: ' + r2});
|
||||
object2 = {loadId: r2};
|
||||
const Date = global.Date;
|
||||
object2.startTime = Date.now();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun59044() { // fn#59044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:672, offset: 0x016dfcb2, size: 48 bytes, params: 1, frame: 12
|
||||
return createNativeStore({order: order, checkoutInitParameters: checkoutInitParameters, contextMetadata: env0_2});
|
||||
}
|
||||
|
||||
function _fun59045() { // fn#59045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:786, offset: 0x016dfce2, size: 73 bytes, params: 1, frame: 12
|
||||
var state;
|
||||
if (!(env0_4.current || order == null)) {
|
||||
state = env0_3.getState();
|
||||
state.setOrder(order);
|
||||
env0_4.current = true;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun59047() { // fn#59047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:1326, offset: 0x016dff3b, size: 32 bytes, params: 1, frame: 12
|
||||
const env0_0 = env1_3(_fun59049);
|
||||
return _fun59050;
|
||||
}
|
||||
|
||||
function _fun59051() { // fn#59051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:1637, offset: 0x016e0080, size: 226 bytes, params: 1, frame: 16
|
||||
var environment;
|
||||
var defaultPlansBinding;
|
||||
var items3;
|
||||
var push;
|
||||
var value2;
|
||||
var value3;
|
||||
var items2;
|
||||
if (waitAndCreateOrder) {
|
||||
if (env0_11 != null) {
|
||||
if (env0_5 == null) {
|
||||
if (env0_7 == null) {
|
||||
if (!env0_10.current) {
|
||||
items3 = [];
|
||||
defaultPlansBinding = defaultPlans;
|
||||
if (defaultPlansBinding != null) {
|
||||
push = items3.push;
|
||||
defaultPlansBinding = defaultPlans;
|
||||
value3 = defaultPlansBinding.map(function(a0) {
|
||||
return {sku_id: a0.skuId, subscription_plan_id: a0.subscriptionPlanId,
|
||||
quantity: a0.quantity,
|
||||
purchase_type: ItemPurchaseType.SUBSCRIPTION};
|
||||
});
|
||||
items2 = [];
|
||||
arraySpread(items2, value3, 0, defaultPlansBinding);
|
||||
apply(push, items2, items3, defaultPlansBinding);
|
||||
} else if (env0_11 != null) {
|
||||
push = items3.push;
|
||||
value2 = environment.__proto__;
|
||||
Reflect.apply(push, items3, [{sku_id: env0_11, quantity: 1,
|
||||
purchase_type: ItemPurchaseType.ONE_TIME}]);
|
||||
}
|
||||
env0_10.current = true;
|
||||
env0_12({orderLineItems: items3});
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
defaultPlansBinding = defaultPlans;
|
||||
if (defaultPlansBinding != null) {
|
||||
if (env0_5 == null) {
|
||||
if (env0_7 == null) {
|
||||
if (!env0_10.current) {
|
||||
items3 = [];
|
||||
defaultPlansBinding = defaultPlans;
|
||||
if (defaultPlansBinding != null) {
|
||||
push = items3.push;
|
||||
defaultPlansBinding = defaultPlans;
|
||||
value3 = defaultPlansBinding.map(_fun59052);
|
||||
items2 = [];
|
||||
arraySpread(items2, value3, 0, defaultPlansBinding);
|
||||
apply(push, items2, items3, defaultPlansBinding);
|
||||
} else if (env0_11 != null) {
|
||||
push = items3.push;
|
||||
value2 = environment.__proto__;
|
||||
Reflect.apply(push, items3, [{sku_id: env0_11, quantity: 1,
|
||||
purchase_type: ItemPurchaseType.ONE_TIME}]);
|
||||
}
|
||||
env0_10.current = true;
|
||||
env0_12({orderLineItems: items3});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function _fun59049(a0) { // fn#59049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:1346, offset: 0x016dff6d, size: 275 bytes, params: 2, frame: 18
|
||||
var r2;
|
||||
var value;
|
||||
var value2;
|
||||
var orderLineItems;
|
||||
var value3;
|
||||
var value4;
|
||||
var binding;
|
||||
var binding2;
|
||||
var property;
|
||||
var value5;
|
||||
var createOrder;
|
||||
var object2;
|
||||
var order;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
var error;
|
||||
var createNativeStoreBinding;
|
||||
var Error;
|
||||
var value9;
|
||||
var String;
|
||||
var value10;
|
||||
var prototype;
|
||||
var value12;
|
||||
exceptionLanding51: while (true) {
|
||||
value = undefined;
|
||||
value2 = false;
|
||||
if (value2) {
|
||||
return value;
|
||||
}
|
||||
orderLineItems = a0.orderLineItems;
|
||||
await undefined;
|
||||
value = undefined;
|
||||
value3 = false;
|
||||
if (value3) {
|
||||
return value;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
NativeCheckoutStoreContext(true);
|
||||
value4 = environment.__proto__.__proto__.__proto__;
|
||||
reducibleJoin6: while (true) {
|
||||
reduciblePort50: while (true) {
|
||||
exceptionLanding31: while (true) {
|
||||
try {
|
||||
try {
|
||||
binding = env3_0;
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
break reducibleJoin6;
|
||||
}
|
||||
try {
|
||||
createNativeStoreBinding = createNativeStore;
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
try {
|
||||
Error = global.Error;
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
try {
|
||||
value9 = error instanceof Error;
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
if (value9) {
|
||||
r2 = error;
|
||||
} else {
|
||||
try {
|
||||
Error = global.Error;
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
try {
|
||||
String = global.String;
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
try {
|
||||
value10 = String(error);
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
try {
|
||||
prototype = Error.prototype;
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
try {
|
||||
error = new Error();
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
try {
|
||||
value12 = error instanceof Object ? error : undefined;
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
r2 = value12;
|
||||
}
|
||||
try {
|
||||
createNativeStoreBinding(r2);
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
break reduciblePort50;
|
||||
}
|
||||
NativeCheckoutStoreContext(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
binding2 = env3_2;
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
property = binding2[9];
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
value5 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
createOrder = value5.createOrder;
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
object2.orderLineItems = orderLineItems;
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
object2.paymentGateway = importDefault;
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
object2.isGift = dependencyMap;
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
order = Reflect.apply(createOrder, value5, [object2]);
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
await order;
|
||||
try {
|
||||
try {
|
||||
value6 = undefined;
|
||||
value7 = false;
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
if (value7) {
|
||||
NativeCheckoutStoreContext(false);
|
||||
return value6;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
ActivityIndicator(value6);
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
binding = env2_3;
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
value8 = binding == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
reducibleJoin29: while (true) {
|
||||
if (value8) {
|
||||
break reducibleJoin29;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
binding = env2_3;
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
try {
|
||||
try {
|
||||
binding(value6);
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
} catch (error) {
|
||||
break exceptionLanding51;
|
||||
}
|
||||
break reducibleJoin29;
|
||||
}
|
||||
NativeCheckoutStoreContext(false);
|
||||
return undefined;
|
||||
}
|
||||
NativeCheckoutStoreContext(false);
|
||||
throw error;
|
||||
}
|
||||
|
||||
function _fun59052({skuId, subscriptionPlanId, quantity}) { // fn#59052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7513:1732, offset: 0x016e0162, size: 57 bytes, params: 2, frame: 3
|
||||
const SUBSCRIPTION = ItemPurchaseType.SUBSCRIPTION;
|
||||
return {sku_id: skuId, subscription_plan_id: subscriptionPlanId, quantity: quantity, purchase_type: SUBSCRIPTION};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user