Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
167 lines
5.5 KiB
TypeScript
167 lines
5.5 KiB
TypeScript
// Module ID: 14856
|
|
// Function ID: 14857
|
|
// Name: useShouldShowInitialGoogleWalletBanner
|
|
// Dependencies: [5, 32, 19, 8548, 8537, 504, 1150, 8536, 8555, 1379, 8558, 2]
|
|
// Exports: useShouldShowInitialGoogleWalletBanner
|
|
|
|
// Module 14856 (useShouldShowInitialGoogleWalletBanner)
|
|
import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */;
|
|
import _slicedToArray from "module_32" /* 32 */;
|
|
import noop from "module_19" /* 19 */;
|
|
import SafetyHubStore from "SafetyHubStore" /* 8548 */;
|
|
|
|
const require = globalThis.__r;
|
|
|
|
const require = fn;
|
|
const AgeCheckStatus = fn(8537).AgeCheckStatus;
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/safety_hub/hooks/useShouldShowInitialGoogleWalletBanner.tsx");
|
|
|
|
export const useShouldShowInitialGoogleWalletBanner = function useShouldShowInitialGoogleWalletBanner() {
|
|
const items = [SafetyHubStore];
|
|
stateFromStores = require("initialize").useStateFromStores(items, () => SafetyHubStore.getAgeCheckStatus() === constants.NONE);
|
|
let obj = require("initialize");
|
|
const items1 = [SafetyHubStore];
|
|
const stateFromStores1 = require("initialize").useStateFromStores(items1, () => SafetyHubStore.getIsManualReviewFallbackEnabled());
|
|
const obj2 = require("initialize");
|
|
let obj3 = noop;
|
|
[tmp6, require] = noop.useState(false);
|
|
if (stateFromStores) {
|
|
stateFromStores = stateFromStores1;
|
|
}
|
|
if (stateFromStores) {
|
|
stateFromStores = tmp(tmp2[6]).isAndroid();
|
|
const tmpResult = tmp(tmp2[6]);
|
|
}
|
|
if (stateFromStores) {
|
|
stateFromStores = tmp(tmp2[7]).isCurrentUserSuspended();
|
|
const tmpResult2 = tmp(tmp2[7]);
|
|
}
|
|
const items2 = [stateFromStores];
|
|
const effect = obj3.useEffect(() => {
|
|
closure_1 = function _resolveGoogleWalletOnly() {
|
|
const self = this;
|
|
const tmp = asyncGeneratorStep(async (arg0, value) => {
|
|
if (c4 === 2) {
|
|
c4 = 3;
|
|
throw new TypeError("Generator functions may not be called on executing generators");
|
|
} else if (tmp6 === 3) {
|
|
if (arg0 === 1) {
|
|
throw value;
|
|
} else if (arg0 === 2) {
|
|
const obj3 = { value, done: true };
|
|
return obj3;
|
|
} else {
|
|
return { value: "HermesInternal", done: null };
|
|
}
|
|
} else {
|
|
try {
|
|
c4 = 2;
|
|
if (0 === c3) {
|
|
if (arg0 === 1) {
|
|
c4 = 3;
|
|
throw value;
|
|
} else if (arg0 === 2) {
|
|
c4 = 3;
|
|
const obj4 = { value, done: true };
|
|
return obj4;
|
|
} else {
|
|
closure_1 = tmp3;
|
|
closure_0 = tmp7;
|
|
let methods;
|
|
closure_128_1 = undefined;
|
|
c2 = 1;
|
|
c3 = 2;
|
|
c4 = 1;
|
|
const obj6 = { value: _true(8555).fetchAgeVerificationMethodsV2SuspendedUser(), done: false };
|
|
return obj6;
|
|
}
|
|
} else {
|
|
if (1 === tmp7) {
|
|
c2 = 0;
|
|
if (!closure_129_0) {
|
|
closure_0(false);
|
|
}
|
|
c4 = 3;
|
|
} else {
|
|
if (2 === tmp7) {
|
|
if (arg0 === 1) {
|
|
c4 = 3;
|
|
throw value;
|
|
} else if (arg0 === 2) {
|
|
c2 = 0;
|
|
c4 = 3;
|
|
const obj7 = { value, done: true };
|
|
return obj7;
|
|
} else {
|
|
methods = value.methods;
|
|
let everyResult = methods.length > 0;
|
|
if (everyResult) {
|
|
everyResult = methods.every((method) => method.method === closure_1_0(closure_1_1[9]).AgeAssuranceMethod.GOOGLE_WALLET);
|
|
}
|
|
let tmp8 = everyResult;
|
|
}
|
|
} else if (arg0 === 1) {
|
|
c4 = 3;
|
|
throw value;
|
|
} else {
|
|
tmp8 = value;
|
|
if (arg0 === 2) {
|
|
c2 = 0;
|
|
c4 = 3;
|
|
const obj = { value, done: true };
|
|
return obj;
|
|
}
|
|
}
|
|
closure_128_1 = tmp8;
|
|
if (!closure_129_0) {
|
|
closure_0(closure_128_1);
|
|
}
|
|
c2 = 0;
|
|
}
|
|
c3 = 3;
|
|
c4 = 1;
|
|
const obj8 = { value: _true(8558).checkGoogleWalletAvailable(), done: false };
|
|
return obj8;
|
|
}
|
|
} catch (tmp27) {
|
|
if (tmp4 === c2) {
|
|
c4 = tmp2;
|
|
throw tmp27;
|
|
} else {
|
|
c3 = tmp;
|
|
}
|
|
}
|
|
}
|
|
});
|
|
dependencyMap = tmp;
|
|
const apply = tmp.apply;
|
|
if (typeof apply === "unknown") {
|
|
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
|
|
} else {
|
|
applyArgumentsResult = apply(self, arguments);
|
|
}
|
|
return applyArgumentsResult;
|
|
};
|
|
if (closure_1) {
|
|
c0 = false;
|
|
(function resolveGoogleWalletOnly() {
|
|
const self = this;
|
|
const apply = closure_1.apply;
|
|
if (typeof apply === "unknown") {
|
|
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
|
|
} else {
|
|
applyArgumentsResult = apply(self, arguments);
|
|
}
|
|
return applyArgumentsResult;
|
|
})();
|
|
return () => {
|
|
c0 = true;
|
|
};
|
|
}
|
|
}, items2);
|
|
if (stateFromStores) {
|
|
stateFromStores = tmp6;
|
|
}
|
|
return stateFromStores;
|
|
};
|