// Module ID: 16598 // Function ID: 16599 // Name: siteKey // Dependencies: [19, 17, 21, 6335] // Exports: default // Module 16598 (siteKey) import noopDefault from "noop" /* 19 */; import jsxProd from "jsxProd" /* 21 */; import noop from "noop" /* 19 */; import get_ActivityIndicator from "get ActivityIndicator" /* 17 */; ({ useMemo: obj1, useCallback: c3 } = noop); noopDefault; ({ Linking: c4, StyleSheet, View: c5, ActivityIndicator: closure_6 } = get_ActivityIndicator); const jsx = jsxProd.jsx; let closure_8 = "(" + String(() => { function patchedPostMessage(arg0, arg1, arg2) { postMessage(arg0, arg1, arg2); } patchedPostMessage.toString = () => String(Object.hasOwnProperty).replace("hasOwnProperty", "postMessage"); window.ReactNativeWebView.postMessage = patchedPostMessage; }) + ")();"; const styles = StyleSheet.create({ loadingOverlay: { bottom: 0, justifyContent: "center", left: 0, position: "absolute", right: 0, top: 0 } }); export default function _default(siteKey) { siteKey = siteKey.siteKey; ({ languageCode, cancelButtonText, loadingIndicatorColor } = siteKey); const backgroundColor = siteKey.backgroundColor; const theme = siteKey.theme; let combined = theme; const rqdata = siteKey.rqdata; closure_4 = rqdata; let text2; let str = siteKey; ({ onMessage, style, url, showLoading } = siteKey); if (!siteKey) { str = "missing-sitekey"; } const text = `https://hcaptcha.com/1/api.js?render=explicit&onload=onloadCallback${"&host=" + str + ".react-native.hcaptcha.com"}`; let text1 = text; if (languageCode) { text1 = `https://hcaptcha.com/1/api.js?render=explicit&onload=onloadCallback${"&host=" + str + ".react-native.hcaptcha.com"}${"&hl=" + languageCode}`; } text2 = text1; if (typeof theme === "object") { text2 = `${tmp2}&custom=true`; } let tmp4 = theme; if (theme) { tmp4 = typeof theme === "string"; } let tmp5 = theme; if (tmp4) { const _HermesInternal = HermesInternal; combined = "\"" + theme + "\""; tmp5 = combined; } let tmp7 = rqdata; if (rqdata) { tmp7 = typeof rqdata === "string"; } if (tmp7) { const _HermesInternal2 = HermesInternal; closure_4 = "\"" + rqdata + "\""; } let items = [siteKey, backgroundColor, tmp5]; const items1 = [loadingIndicatorColor]; const tmp8 = backgroundColor(() => { let str = siteKey; if (!siteKey) { str = ""; } return "\n \n \n \n \n \n \n \n \n \n
\n \n "; }, items); let obj = { originWhitelist: ["*"], onShouldStartLoadWithRequest(url) { url = url.url; let flag = "https://www.hcaptcha.com" !== url.slice(0, 24); if (!flag) { closure_4.openURL(url.url); flag = false; } return flag; }, mixedContentMode: "always", onMessage, javaScriptEnabled: true, injectedJavaScript: closure_8, automaticallyAdjustContentInsets: true, style: items2, source: null, renderLoading: null, startInLoadingState: null }; items2 = [{ backgroundColor: "transparent", width: "100%" }, style]; obj = { html: tmp8, baseUrl: null }; const tmp9 = combined(() => { obj = { style: items, children: closure_1_7(closure_1_6, obj) }; items = [closure_1_9.loadingOverlay]; obj = { size: "large", color: loadingIndicatorColor }; return closure_1_7(text2, obj); }, items1); obj[1] = "" + url; obj[8] = obj; obj[9] = tmp9; obj[10] = showLoading; return jsx(siteKey(loadingIndicatorColor[3]), { html: tmp8, baseUrl: null }); };