// Module ID: 7709 // Function ID: 7710 // Name: supportsFetch // Dependencies: [7598, 7596, 7597] // Module 7709 (supportsFetch) import getGlobalSingleton from "getGlobalSingleton" /* 7598 */; require = arg1; const dependencyMap = arg6; function supportsFetch() { if ("fetch" in getGlobalSingleton.GLOBAL_OBJ) { try { const _Headers = Headers; const headers = new Headers(); const _Request = Request; const request = new Request("http://www.example.com"); const _Response = Response; const response = new Response(); return true; } catch (err) { return false; } } else { return false; } } function isNativeFunction(arg0) { let isMatch = arg0; if (arg0) { isMatch = /^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(arg0.toString()); const obj = /^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/; } return isMatch; } arg5.isNativeFunction = isNativeFunction; arg5.supportsDOMError = function supportsDOMError() { try { const dOMError = new globalThis.DOMError(""); return true; } catch (err) { return false; } }; arg5.supportsDOMException = function supportsDOMException() { try { const dOMException = new globalThis.DOMException(""); return true; } catch (err) { return false; } }; arg5.supportsErrorEvent = function supportsErrorEvent() { try { const errorEvent = new globalThis.ErrorEvent(""); return true; } catch (err) { return false; } }; arg5.supportsFetch = supportsFetch; arg5.supportsNativeFetch = function supportsNativeFetch() { if (typeof globalThis.EdgeRuntime === "string") { return true; } else if (supportsFetch()) { if (isNativeFunction(getGlobalSingleton.GLOBAL_OBJ.fetch)) { return true; } else { let flag2 = false; const _document = tmp5(7598).GLOBAL_OBJ.document; if (_document) { if (typeof _document.createElement === "function") { try { const element =