decord/stable/source/modules/skus/utils/getPricesFromServer.tsx

37 lines
1.1 KiB
TypeScript
Raw Normal View History

2026-10-06 22:12:49 +00:00
// Module ID: 5826
// Function ID: 5827
// Name: getPricesFromServer
2026-10-06 22:12:49 +00:00
// Dependencies: [4492, 2]
// Exports: default
2026-10-06 22:12:49 +00:00
// Module 5826 (getPricesFromServer)
import SubscriptionPlanRecord from "SubscriptionPlanRecord" /* 4492 */;
import size from "module_2" /* 2 */;
const getPriceFromServer = SubscriptionPlanRecord.getPriceFromServer;
const result = size.fileFinishedImporting("modules/skus/utils/getPricesFromServer.tsx");
export default function getPricesFromServer(arg0) {
2026-10-06 22:12:49 +00:00
let reduced;
if (null == arg0) {
2026-10-06 22:12:49 +00:00
reduced = {};
} else {
2026-10-06 22:12:49 +00:00
const tmp = globalThis;
const _Object = Object;
const entries = Object.entries(arg0);
reduced = entries.reduce((acc, item) => {
2026-10-06 22:12:49 +00:00
let obj2;
let prices;
let tmp;
let tmp2;
[tmp, tmp2] = item;
2026-10-06 22:12:49 +00:00
const obj = { countryPrices: obj2, paymentSourcePrices: {} };
obj2 = { countryCode: tmp2.country_prices.country_code, prices: prices.map((item) => closure_1_0(item, true)) };
prices = tmp2.country_prices.prices;
acc[tmp] = obj;
return acc;
}, {});
}
return reduced;
};