{"version":3,"file":"loadNetInfo.mjs","sources":["../../../src/moduleLoaders/loadNetInfo.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const loadNetInfo = () => {\n    try {\n        // metro bundler requires static string for loading module.\n        // See: https://facebook.github.io/metro/docs/configuration/#dynamicdepsinpackages\n        const module = require('@react-native-community/netinfo')\n            ?.default;\n        if (module) {\n            return module;\n        }\n        throw new Error('Ensure `@react-native-community/netinfo` is installed and linked.');\n    }\n    catch (e) {\n        // The error parsing logic cannot be extract as with metro the `require`\n        // would be confused when there is a `import` in the same file importing\n        // another module and that causes error\n        const message = e.message.replace(/undefined/g, '@react-native-community/netinfo');\n        throw new Error(message);\n    }\n};\n"],"names":[],"mappings":"AAAA;AACA;AACY,MAAC,WAAW,GAAG,MAAM;AACjC,IAAI,IAAI;AACR;AACA;AACA,QAAQ,MAAM,MAAM,GAAG,OAAO,CAAC,iCAAiC;AAChE,cAAc,OAAO;AACrB,QAAQ,IAAI,MAAM,EAAE;AACpB,YAAY,OAAO,MAAM;AACzB,QAAQ;AACR,QAAQ,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC;AAC5F,IAAI;AACJ,IAAI,OAAO,CAAC,EAAE;AACd;AACA;AACA;AACA,QAAQ,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE,iCAAiC,CAAC;AAC1F,QAAQ,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC;AAChC,IAAI;AACJ;;;;"}