decord/source/stores/native/IAPStore.android.tsx

262 lines
7 KiB
TypeScript
Raw Normal View History

2026-07-23 10:11:24 +00:00
// Module ID: 5621
// Function ID: 47951
2026-07-20 16:05:17 +00:00
// Name: _isNativeReflectConstruct
2026-07-23 10:11:24 +00:00
// Dependencies: [6, 7, 15, 17, 18, 5622, 482, 5618, 3791, 566, 686, 2]
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
// Module 5621 (_isNativeReflectConstruct)
import sum from "sum";
import formatSingleCurrencyPrice from "formatSingleCurrencyPrice";
import _possibleConstructorReturn from "_possibleConstructorReturn";
import _getPrototypeOf from "_getPrototypeOf";
import _inherits from "_inherits";
import GPlayConnectionState from "GPlayConnectionState";
import { CurrencyCodes } from "sum";
import set from "_possibleConstructorReturn";
const require = arg1;
2026-07-20 16:05:17 +00:00
function _isNativeReflectConstruct() {
let closure_0 = !valueOf.call(Reflect.construct(Boolean, [], () => {
}));
function _isNativeReflectConstruct() {
return closure_0;
}
const result = _isNativeReflectConstruct();
}
function updateProduct(currencyCode) {
const formatted = currencyCode.currencyCode.toLowerCase();
const result = currencyCode.price / 100;
2026-07-23 10:11:24 +00:00
if ("BG" === c19) {
2026-07-20 16:05:17 +00:00
if (formatted === CurrencyCodes.EUR) {
let obj = { convertToMajorUnits: false };
2026-07-23 10:11:24 +00:00
let formatDualPriceForBGResult = require(5618) /* formatSingleCurrencyPrice */.formatDualPriceForBG(result, obj);
const obj2 = require(5618) /* formatSingleCurrencyPrice */;
2026-07-20 16:05:17 +00:00
}
obj = {};
const merged = Object.assign(currencyCode);
obj["price"] = currencyCode.price;
obj["currencyCode"] = formatted;
obj["priceString"] = formatDualPriceForBGResult;
return obj;
}
2026-07-23 10:11:24 +00:00
obj = require(5618) /* formatSingleCurrencyPrice */;
2026-07-20 16:05:17 +00:00
formatDualPriceForBGResult = obj.formatSingleCurrencyPrice(result, formatted, { convertToMajorUnits: false });
}
function skusLoaded(arg0) {
let skus;
let skusType;
({ skus, skusType } = arg0);
2026-07-23 10:11:24 +00:00
let item = skus.forEach((identifier) => {
const result = outer1_12.set(identifier.identifier, identifier);
2026-07-20 16:05:17 +00:00
});
const arr = Array.from(map.values());
let found;
if (null != arr) {
found = arr.filter((arg0) => null != arg0);
}
2026-07-23 10:11:24 +00:00
let mapped = found;
2026-07-20 16:05:17 +00:00
if (null != found) {
const item1 = found.forEach((offerIds) => {
offerIds = undefined;
if (null != offerIds) {
offerIds = offerIds.offerIds;
}
if (null != offerIds) {
2026-07-23 10:11:24 +00:00
const item = offerIds.forEach((arg0) => outer2_13.add(arg0));
2026-07-20 16:05:17 +00:00
}
});
}
2026-07-23 10:11:24 +00:00
mapped = undefined;
if (null != mapped) {
mapped = mapped.map(updateProduct);
2026-07-20 16:05:17 +00:00
}
while (true) {
2026-07-23 10:11:24 +00:00
let arr3 = mapped;
if (null == mapped) {
2026-07-20 16:05:17 +00:00
break;
} else {
let tmp8 = tmp7;
let item2 = arr3.forEach((identifier) => {
2026-07-23 10:11:24 +00:00
const result = outer1_12.set(identifier.identifier, identifier);
2026-07-20 16:05:17 +00:00
});
2026-07-23 10:11:24 +00:00
break;
2026-07-20 16:05:17 +00:00
}
let tmp10 = skusType;
let tmp11 = GPlaySkusType;
if (GPlaySkusType.IN_APP === skusType) {
let flag2 = false;
2026-07-23 10:11:24 +00:00
let c17 = false;
2026-07-20 16:05:17 +00:00
} else {
let tmp12 = GPlaySkusType;
if (GPlaySkusType.SUBSCRIPTION === skusType) {
let flag = false;
2026-07-23 10:11:24 +00:00
let c18 = false;
2026-07-20 16:05:17 +00:00
}
}
}
}
2026-07-23 10:11:24 +00:00
GPlayConnectionState = GPlayConnectionState.GPlayConnectionState;
const GPlaySkusType = GPlayConnectionState.GPlaySkusType;
2026-07-20 16:05:17 +00:00
const DISCONNECTED = GPlayConnectionState.DISCONNECTED;
2026-07-23 10:11:24 +00:00
let c11 = null;
2026-07-20 16:05:17 +00:00
const map = new Map();
2026-07-23 10:11:24 +00:00
let set = new Set();
2026-07-20 16:05:17 +00:00
const set1 = new Set();
2026-07-23 10:11:24 +00:00
let c15 = null;
let c16 = false;
let c17 = false;
let c18 = false;
let c19 = null;
let tmp6 = ((Store) => {
2026-07-20 16:05:17 +00:00
class IAPStore {
constructor() {
self = this;
2026-07-23 10:11:24 +00:00
tmp = outer1_2(this, IAPStore);
obj = outer1_5(IAPStore);
tmp2 = outer1_4;
if (outer1_20()) {
2026-07-20 16:05:17 +00:00
tmp6 = globalThis;
_Reflect = Reflect;
2026-07-23 10:11:24 +00:00
tmp7 = outer1_5;
2026-07-20 16:05:17 +00:00
tmp8 = arguments;
2026-07-23 10:11:24 +00:00
constructResult = Reflect.construct(obj, arguments, outer1_5(self).constructor);
2026-07-20 16:05:17 +00:00
} else {
tmp3 = arguments;
tmp4 = arguments;
constructResult = obj(...arguments);
}
return tmp2(self, constructResult);
}
}
callback2(IAPStore, Store);
let obj = {
key: "getProducts",
value() {
2026-07-23 10:11:24 +00:00
return outer1_11;
2026-07-20 16:05:17 +00:00
}
};
const items = [obj, , , , , , , , , , ];
obj = {
key: "getOfferIds",
value() {
2026-07-23 10:11:24 +00:00
return outer1_13;
2026-07-20 16:05:17 +00:00
}
};
items[1] = obj;
obj = {
key: "getProduct",
value(arg0) {
2026-07-23 10:11:24 +00:00
const value = outer1_12.get(arg0);
2026-07-20 16:05:17 +00:00
let tmp2 = null;
if (null != value) {
tmp2 = value;
}
return tmp2;
}
};
items[2] = obj;
items[3] = {
key: "isBusy",
value() {
2026-07-23 10:11:24 +00:00
return outer1_14.size > 0 || outer1_16;
2026-07-20 16:05:17 +00:00
}
};
items[4] = {
key: "isPurchasingProduct",
value(arg0) {
2026-07-23 10:11:24 +00:00
return outer1_14.has(arg0);
2026-07-20 16:05:17 +00:00
}
};
items[5] = {
key: "isReady",
value() {
2026-07-23 10:11:24 +00:00
return outer1_10 === outer1_7.CONNECTED;
2026-07-20 16:05:17 +00:00
}
};
items[6] = {
key: "hasConnectionError",
value() {
2026-07-23 10:11:24 +00:00
return outer1_10 === outer1_7.ERROR;
2026-07-20 16:05:17 +00:00
}
};
items[7] = {
key: "getPendingDowngrade",
value() {
2026-07-23 10:11:24 +00:00
return outer1_15;
2026-07-20 16:05:17 +00:00
}
};
items[8] = {
key: "isFetchingGoogleSkus",
value() {
2026-07-23 10:11:24 +00:00
let tmp = outer1_18;
if (!outer1_18) {
tmp = outer1_17;
2026-07-20 16:05:17 +00:00
}
return tmp;
}
};
items[9] = {
key: "isFetchingProducts",
value() {
2026-07-23 10:11:24 +00:00
let tmp = outer1_18;
if (!outer1_18) {
tmp = outer1_17;
2026-07-20 16:05:17 +00:00
}
return tmp;
}
};
items[10] = {
key: "getUserCountry",
value() {
2026-07-23 10:11:24 +00:00
return outer1_19;
2026-07-20 16:05:17 +00:00
}
};
return callback(IAPStore, items);
2026-07-23 10:11:24 +00:00
})(require("initialize").Store);
2026-07-20 16:05:17 +00:00
tmp6.displayName = "IAPStore";
2026-07-23 10:11:24 +00:00
tmp6 = new tmp6(require("dispatcher"), {
2026-07-20 16:05:17 +00:00
GPLAY_UPDATE_CONNECTION_STATE: function updateConnectionState(connectionState) {
2026-07-23 10:11:24 +00:00
connectionState = connectionState.connectionState;
2026-07-20 16:05:17 +00:00
},
GPLAY_FETCH_SUBSCRIPTION_SKUS_START: function handleFetchSubscriptionSkusStart() {
2026-07-23 10:11:24 +00:00
let c18 = true;
2026-07-20 16:05:17 +00:00
},
GPLAY_SUBSCRIPTION_SKUS_LOADED: skusLoaded,
GPLAY_FETCH_SUBSCRIPTION_SKUS_FAILED: function handleFetchSubscriptionSkusFailed() {
2026-07-23 10:11:24 +00:00
let c18 = false;
2026-07-20 16:05:17 +00:00
},
GPLAY_FETCH_IN_APP_SKUS_START: function handleFetchInAppSkusStart() {
2026-07-23 10:11:24 +00:00
let c17 = true;
2026-07-20 16:05:17 +00:00
},
GPLAY_IN_APP_SKUS_LOADED: skusLoaded,
GPLAY_FETCH_IN_APP_SKUS_FAILED: function handleFetchInAppSkusFailed() {
2026-07-23 10:11:24 +00:00
let c17 = false;
2026-07-20 16:05:17 +00:00
},
GPLAY_VERIFICATION_START: function handleVerificationStart(productId) {
set1.add(productId.productId);
},
GPLAY_VERIFICATION_END: function handleVerificationEnd(productId) {
productId = productId.productId;
if (set1.has(productId)) {
set1.delete(productId);
} else {
const _Error = Error;
const _HermesInternal = HermesInternal;
const error = new Error("Tried verifying product without initialization: " + productId);
throw error;
}
},
GPLAY_UPDATE_PENDING_DOWNGRADE: function handleUpdatePendingDowngrade(pendingDowngrade) {
pendingDowngrade = pendingDowngrade.pendingDowngrade;
},
GPLAY_UPDATE_IS_DOWNGRADING: function handleUpdateIsDowngrading(isDowngrading) {
isDowngrading = isDowngrading.isDowngrading;
},
GPLAY_SET_USER_COUNTRY: function handleSetUserCountry(countryCode) {
countryCode = countryCode.countryCode;
}
});
2026-07-23 10:11:24 +00:00
let result = set.fileFinishedImporting("stores/native/IAPStore.android.tsx");
2026-07-20 16:05:17 +00:00
export default tmp6;