From 0d4bda4ba69700574f298d17197648b1c6984550 Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Mon, 24 Nov 2025 15:07:36 +0530 Subject: [PATCH 01/12] Upgrade @react-native-community/netinfo to latest. Signed-off-by: krishna2323 --- package-lock.json | 445 +-- package.json | 2 +- ...community+netinfo+11.2.1+001+initial.patch | 8 - ...unity+netinfo+11.2.1+002+turbomodule.patch | 3086 ----------------- .../netinfo/details.md | 25 - 5 files changed, 5 insertions(+), 3561 deletions(-) delete mode 100644 patches/@react-native-community/netinfo/@react-native-community+netinfo+11.2.1+001+initial.patch delete mode 100644 patches/@react-native-community/netinfo/@react-native-community+netinfo+11.2.1+002+turbomodule.patch delete mode 100644 patches/@react-native-community/netinfo/details.md diff --git a/package-lock.json b/package-lock.json index 93536ada3b63..b2054882881e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,7 +38,7 @@ "@react-native-camera-roll/camera-roll": "7.4.0", "@react-native-clipboard/clipboard": "^1.15.0", "@react-native-community/geolocation": "3.3.0", - "@react-native-community/netinfo": "11.2.1", + "@react-native-community/netinfo": "^11.4.1", "@react-native-documents/picker": "^10.1.3", "@react-native-firebase/analytics": "^22.2.1", "@react-native-firebase/app": "^22.2.1", @@ -5121,45 +5121,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@electron/windows-sign": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@electron/windows-sign/-/windows-sign-1.2.2.tgz", - "integrity": "sha512-dfZeox66AvdPtb2lD8OsIIQh12Tp0GNCRUDfBHIKGpbmopZto2/A8nSpYYLoedPIHpqkeblZ/k8OV0Gy7PYuyQ==", - "dev": true, - "license": "BSD-2-Clause", - "optional": true, - "peer": true, - "dependencies": { - "cross-dirname": "^0.1.0", - "debug": "^4.3.4", - "fs-extra": "^11.1.1", - "minimist": "^1.2.8", - "postject": "^1.0.0-alpha.6" - }, - "bin": { - "electron-windows-sign": "bin/electron-windows-sign.js" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/@electron/windows-sign/node_modules/fs-extra": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", - "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, "node_modules/@es-joy/jsdoccomment": { "version": "0.65.2", "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.65.2.tgz", @@ -5479,170 +5440,6 @@ "sucrase": "3.35.0" } }, - "node_modules/@expo/config-plugins": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/@expo/config-plugins/-/config-plugins-10.1.2.tgz", - "integrity": "sha512-IMYCxBOcnuFStuK0Ay+FzEIBKrwW8OVUMc65+v0+i7YFIIe8aL342l7T4F8lR4oCfhXn7d6M5QPgXvjtc/gAcw==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@expo/config-types": "^53.0.5", - "@expo/json-file": "~9.1.5", - "@expo/plist": "^0.3.5", - "@expo/sdk-runtime-versions": "^1.0.0", - "chalk": "^4.1.2", - "debug": "^4.3.5", - "getenv": "^2.0.0", - "glob": "^10.4.2", - "resolve-from": "^5.0.0", - "semver": "^7.5.4", - "slash": "^3.0.0", - "slugify": "^1.6.6", - "xcode": "^3.0.1", - "xml2js": "0.6.0" - } - }, - "node_modules/@expo/config-plugins/node_modules/@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, - "node_modules/@expo/config-plugins/node_modules/@expo/config-types": { - "version": "53.0.5", - "resolved": "https://registry.npmjs.org/@expo/config-types/-/config-types-53.0.5.tgz", - "integrity": "sha512-kqZ0w44E+HEGBjy+Lpyn0BVL5UANg/tmNixxaRMLS6nf37YsDrLk2VMAmeKMMk5CKG0NmOdVv3ngeUjRQMsy9g==", - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/@expo/config-plugins/node_modules/@expo/json-file": { - "version": "9.1.5", - "resolved": "https://registry.npmjs.org/@expo/json-file/-/json-file-9.1.5.tgz", - "integrity": "sha512-prWBhLUlmcQtvN6Y7BpW2k9zXGd3ySa3R6rAguMJkp1z22nunLN64KYTUWfijFlprFoxm9r2VNnGkcbndAlgKA==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@babel/code-frame": "~7.10.4", - "json5": "^2.2.3" - } - }, - "node_modules/@expo/config-plugins/node_modules/@expo/plist": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@expo/plist/-/plist-0.3.5.tgz", - "integrity": "sha512-9RYVU1iGyCJ7vWfg3e7c/NVyMFs8wbl+dMWZphtFtsqyN9zppGREU3ctlD3i8KUE0sCUTVnLjCWr+VeUIDep2g==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@xmldom/xmldom": "^0.8.8", - "base64-js": "^1.2.3", - "xmlbuilder": "^15.1.1" - } - }, - "node_modules/@expo/config-plugins/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@expo/config-plugins/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@expo/config-plugins/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@expo/config-plugins/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/@expo/config-plugins/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@expo/config-plugins/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "license": "ISC", - "optional": true, - "peer": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@expo/config-plugins/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@expo/config-types": { "version": "54.0.8", "resolved": "https://registry.npmjs.org/@expo/config-types/-/config-types-54.0.8.tgz", @@ -11719,7 +11516,9 @@ } }, "node_modules/@react-native-community/netinfo": { - "version": "11.2.1", + "version": "11.4.1", + "resolved": "https://registry.npmjs.org/@react-native-community/netinfo/-/netinfo-11.4.1.tgz", + "integrity": "sha512-B0BYAkghz3Q2V09BF88RA601XursIEA111tnc2JOaN7axJWmNefmfjZqw/KdSxKZp7CZUuPpjBmz/WCR9uaHYg==", "license": "MIT", "peerDependencies": { "react-native": ">=0.59" @@ -17083,17 +16882,6 @@ "@types/react": "*" } }, - "node_modules/@types/react-native": { - "version": "0.72.8", - "resolved": "https://registry.npmjs.org/@types/react-native/-/react-native-0.72.8.tgz", - "integrity": "sha512-St6xA7+EoHN5mEYfdWnfYt0e8u6k2FR0P9s2arYgakQGFgU1f9FlPrIEcj0X24pLCF5c5i3WVuLCUdiCYHmOoA==", - "license": "MIT", - "peer": true, - "dependencies": { - "@react-native/virtualized-lists": "^0.72.4", - "@types/react": "*" - } - }, "node_modules/@types/react-native-web": { "version": "0.0.0", "dev": true, @@ -17103,20 +16891,6 @@ "react-native": "*" } }, - "node_modules/@types/react-native/node_modules/@react-native/virtualized-lists": { - "version": "0.72.8", - "resolved": "https://registry.npmjs.org/@react-native/virtualized-lists/-/virtualized-lists-0.72.8.tgz", - "integrity": "sha512-J3Q4Bkuo99k7mu+jPS9gSUSgq+lLRSI/+ahXNwV92XgJ/8UgOTxu2LPwhJnBk/sQKxq7E8WkZBnBiozukQMqrw==", - "license": "MIT", - "peer": true, - "dependencies": { - "invariant": "^2.2.4", - "nullthrows": "^1.1.1" - }, - "peerDependencies": { - "react-native": "*" - } - }, "node_modules/@types/react-test-renderer": { "version": "19.1.0", "dev": true, @@ -21577,15 +21351,6 @@ "node": ">=10" } }, - "node_modules/cross-dirname": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/cross-dirname/-/cross-dirname-0.1.0.tgz", - "integrity": "sha512-+R08/oI0nl3vfPcqftZRpytksBXDzOUveBq/NBVx0sUp1axwzPQrKinNx5yd5sxPu8j1wIy8AfnVQ+5eFdha6Q==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true - }, "node_modules/cross-fetch": { "version": "3.1.5", "license": "MIT", @@ -22739,19 +22504,6 @@ "node": ">=14.0.0" } }, - "node_modules/electron-builder-squirrel-windows": { - "version": "26.0.19", - "resolved": "https://registry.npmjs.org/electron-builder-squirrel-windows/-/electron-builder-squirrel-windows-26.0.19.tgz", - "integrity": "sha512-zddhAuxL4WknxTlbG9HxRWLar4jn6JkcD+K5kUK7YtoVPIweYgvq45BGNZEI4tbcgLsU7IF2wFyoqW8MyR7KBg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "app-builder-lib": "26.0.19", - "builder-util": "26.0.19", - "electron-winstaller": "5.4.0" - } - }, "node_modules/electron-builder/node_modules/ansi-styles": { "version": "4.3.0", "dev": true, @@ -22959,133 +22711,6 @@ "integrity": "sha512-ZCphxFW3Q1TVhcgS9blfut1PX8lusVi2SvXQgmEEnK4TCmE1JhH2JkjJN+DNt0pJJwfBri5AROBnz2b/C+YU9g==", "license": "ISC" }, - "node_modules/electron-winstaller": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/electron-winstaller/-/electron-winstaller-5.4.0.tgz", - "integrity": "sha512-bO3y10YikuUwUuDUQRM4KfwNkKhnpVO7IPdbsrejwN9/AABJzzTQ4GeHwyzNSrVO+tEH3/Np255a3sVZpZDjvg==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@electron/asar": "^3.2.1", - "debug": "^4.1.1", - "fs-extra": "^7.0.1", - "lodash": "^4.17.21", - "temp": "^0.9.0" - }, - "engines": { - "node": ">=8.0.0" - }, - "optionalDependencies": { - "@electron/windows-sign": "^1.1.2" - } - }, - "node_modules/electron-winstaller/node_modules/fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/electron-winstaller/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "peer": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/electron-winstaller/node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "license": "MIT", - "peer": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/electron-winstaller/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/electron-winstaller/node_modules/rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "license": "ISC", - "peer": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/electron-winstaller/node_modules/temp": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/temp/-/temp-0.9.4.tgz", - "integrity": "sha512-yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "mkdirp": "^0.5.1", - "rimraf": "~2.6.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/electron-winstaller/node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/electron/node_modules/@types/node": { "version": "22.17.2", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.17.2.tgz", @@ -25737,14 +25362,6 @@ "version": "3.1.3", "license": "MIT" }, - "node_modules/fast-diff": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", - "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", - "dev": true, - "license": "Apache-2.0", - "peer": true - }, "node_modules/fast-equals": { "version": "5.2.2", "license": "MIT", @@ -31617,14 +31234,6 @@ "version": "4.5.0", "license": "MIT" }, - "node_modules/lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/lodash.debounce": { "version": "4.0.8", "license": "MIT" @@ -34495,36 +34104,6 @@ "version": "4.2.0", "license": "MIT" }, - "node_modules/postject": { - "version": "1.0.0-alpha.6", - "resolved": "https://registry.npmjs.org/postject/-/postject-1.0.0-alpha.6.tgz", - "integrity": "sha512-b9Eb8h2eVqNE8edvKdwqkrY6O7kAwmI8kcnBv1NScolYJbo59XUF0noFq+lxbC1yN20bmC0WBEbDC5H/7ASb0A==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "commander": "^9.4.0" - }, - "bin": { - "postject": "dist/cli.js" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/postject/node_modules/commander": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", - "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": "^12.20.0 || >=14" - } - }, "node_modules/potpack": { "version": "2.0.0", "license": "ISC" @@ -34916,22 +34495,6 @@ "version": "2.0.0", "license": "ISC" }, - "node_modules/quill-delta": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/quill-delta/-/quill-delta-5.1.0.tgz", - "integrity": "sha512-X74oCeRI4/p0ucjb5Ma8adTXd9Scumz367kkMK5V/IatcX6A0vlgLgKbzXWy5nZmCGeNJm2oQX0d2Eqj+ZIlCA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "fast-diff": "^1.3.0", - "lodash.clonedeep": "^4.5.0", - "lodash.isequal": "^4.5.0" - }, - "engines": { - "node": ">= 12.0.0" - } - }, "node_modules/randombytes": { "version": "2.1.0", "license": "MIT", diff --git a/package.json b/package.json index 787da72418df..1b08d0fcba02 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "@react-native-camera-roll/camera-roll": "7.4.0", "@react-native-clipboard/clipboard": "^1.15.0", "@react-native-community/geolocation": "3.3.0", - "@react-native-community/netinfo": "11.2.1", + "@react-native-community/netinfo": "^11.4.1", "@react-native-documents/picker": "^10.1.3", "@react-native-firebase/analytics": "^22.2.1", "@react-native-firebase/app": "^22.2.1", diff --git a/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.2.1+001+initial.patch b/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.2.1+001+initial.patch deleted file mode 100644 index 9a5b031c6dc1..000000000000 --- a/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.2.1+001+initial.patch +++ /dev/null @@ -1,8 +0,0 @@ -diff --git a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModule.java b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java -similarity index 100% -rename from node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModule.java -rename to node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java -diff --git a/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.m b/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm -similarity index 100% -rename from node_modules/@react-native-community/netinfo/ios/RNCNetInfo.m -rename to node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm diff --git a/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.2.1+002+turbomodule.patch b/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.2.1+002+turbomodule.patch deleted file mode 100644 index 99e8108f8822..000000000000 --- a/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.2.1+002+turbomodule.patch +++ /dev/null @@ -1,3086 +0,0 @@ -diff --git a/node_modules/@react-native-community/netinfo/android/build.gradle b/node_modules/@react-native-community/netinfo/android/build.gradle -index 0d617ed..97439e6 100644 ---- a/node_modules/@react-native-community/netinfo/android/build.gradle -+++ b/node_modules/@react-native-community/netinfo/android/build.gradle -@@ -3,9 +3,10 @@ buildscript { - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - if (project == rootProject) { -- repositories { -- google() -- mavenCentral() -+ repositories { -+ google() -+ mavenCentral() -+ gradlePluginPortal() - } - - dependencies { -@@ -26,8 +27,54 @@ def getExtOrIntegerDefault(name) { - return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['ReactNativeNetInfo_' + name]).toInteger() - } - -+def isNewArchitectureEnabled() { -+ return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true" -+} -+ -+def resolveReactNativeDirectory() { -+ def reactNativeLocation = getExtOrInitialValue("REACT_NATIVE_NODE_MODULES_DIR", null) -+ if (reactNativeLocation != null) { -+ return file(reactNativeLocation) -+ } -+ -+ // monorepo workaround -+ // react-native can be hoisted or in project's own node_modules -+ def reactNativeFromProjectNodeModules = file("${rootProject.projectDir}/../node_modules/react-native") -+ if (reactNativeFromProjectNodeModules.exists()) { -+ return reactNativeFromProjectNodeModules -+ } -+ -+ def reactNativeFromNodeModulesWithRNCNetInfo = file("${projectDir}/../../react-native") -+ if (reactNativeFromNodeModulesWithRNCNetInfo.exists()) { -+ return reactNativeFromNodeModulesWithRNCNetInfo -+ } -+ -+ throw new Exception( -+ "[react-native-netinfo] Unable to resolve react-native location in " + -+ "node_modules. You should add project extension property (in app/build.gradle) " + -+ "`REACT_NATIVE_NODE_MODULES_DIR` with path to react-native." -+ ) -+} -+ -+def getReactNativeMinorVersion() { -+ def REACT_NATIVE_DIR = resolveReactNativeDirectory() -+ -+ def reactProperties = new Properties() -+ file("$REACT_NATIVE_DIR/ReactAndroid/gradle.properties").withInputStream { reactProperties.load(it) } -+ -+ def REACT_NATIVE_VERSION = reactProperties.getProperty("VERSION_NAME") -+ def REACT_NATIVE_MINOR_VERSION = REACT_NATIVE_VERSION.startsWith("0.0.0-") ? 1000 : REACT_NATIVE_VERSION.split("\\.")[1].toInteger() -+ -+ return REACT_NATIVE_MINOR_VERSION -+} -+ -+ - apply plugin: 'com.android.library' - -+if (isNewArchitectureEnabled()) { -+ apply plugin: 'com.facebook.react' -+} -+ - android { - compileSdkVersion getExtOrIntegerDefault('compileSdkVersion') - -@@ -45,10 +92,21 @@ android { - defaultConfig { - minSdkVersion getExtOrIntegerDefault('minSdkVersion') - targetSdkVersion getExtOrIntegerDefault('targetSdkVersion') -+ buildConfigField("boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()) -+ } -+ sourceSets { -+ main { -+ if (isNewArchitectureEnabled()) { -+ java.srcDirs += ['src/newarch'] -+ } else { -+ java.srcDirs += ['src/oldarch'] -+ } -+ } - } - lintOptions{ - abortOnError false - } -+ - } - - repositories { -@@ -63,6 +121,9 @@ repositories { - - dependencies { - //noinspection GradleDynamicVersion -- implementation 'com.facebook.react:react-native:+' -- -+ if (isNewArchitectureEnabled() && getReactNativeMinorVersion() < 71) { -+ implementation project(":ReactAndroid") -+ } else { -+ implementation 'com.facebook.react:react-native:+' -+ } - } -diff --git a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java -index 2c3280b..52ea692 100644 ---- a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java -+++ b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java -@@ -9,13 +9,11 @@ package com.reactnativecommunity.netinfo; - import android.os.Build; - import com.facebook.react.bridge.Promise; - import com.facebook.react.bridge.ReactApplicationContext; --import com.facebook.react.bridge.ReactContextBaseJavaModule; - import com.facebook.react.bridge.ReactMethod; - import com.facebook.react.module.annotations.ReactModule; - - /** Module that monitors and provides information about the connectivity state of the device. */ --@ReactModule(name = NetInfoModule.NAME) --public class NetInfoModule extends ReactContextBaseJavaModule implements AmazonFireDeviceConnectivityPoller.ConnectivityChangedCallback { -+public class NetInfoModuleImpl implements AmazonFireDeviceConnectivityPoller.ConnectivityChangedCallback { - public static final String NAME = "RNCNetInfo"; - - private final ConnectivityReceiver mConnectivityReceiver; -@@ -23,8 +21,7 @@ public class NetInfoModule extends ReactContextBaseJavaModule implements AmazonF - - private int numberOfListeners = 0; - -- public NetInfoModule(ReactApplicationContext reactContext) { -- super(reactContext); -+ public NetInfoModuleImpl(ReactApplicationContext reactContext) { - // Create the connectivity receiver based on the API level we are running on - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { - mConnectivityReceiver = new NetworkCallbackConnectivityReceiver(reactContext); -@@ -35,23 +32,17 @@ public class NetInfoModule extends ReactContextBaseJavaModule implements AmazonF - mAmazonConnectivityChecker = new AmazonFireDeviceConnectivityPoller(reactContext, this); - } - -- @Override -+ - public void initialize() { - mConnectivityReceiver.register(); - mAmazonConnectivityChecker.register(); - } - -- @Override -- public void onCatalystInstanceDestroy() { -+ public void invalidate() { - mAmazonConnectivityChecker.unregister(); - mConnectivityReceiver.unregister(); -- mConnectivityReceiver.hasListener = false; - } - -- @Override -- public String getName() { -- return NAME; -- } - - @ReactMethod - public void getCurrentState(final String requestedInterface, final Promise promise) { -@@ -63,14 +54,14 @@ public class NetInfoModule extends ReactContextBaseJavaModule implements AmazonF - mConnectivityReceiver.setIsInternetReachableOverride(isConnected); - } - -- @ReactMethod -+ - public void addListener(String eventName) { - numberOfListeners++; - mConnectivityReceiver.hasListener = true; - } - -- @ReactMethod -- public void removeListeners(Integer count) { -+ -+ public void removeListeners(double count) { - numberOfListeners -= count; - if (numberOfListeners == 0) { - mConnectivityReceiver.hasListener = false; -diff --git a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoPackage.java b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoPackage.java -index fcd4a5e..1bf0b62 100644 ---- a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoPackage.java -+++ b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoPackage.java -@@ -1,34 +1,46 @@ --/** -- * Copyright (c) Facebook, Inc. and its affiliates. -- * -- * This source code is licensed under the MIT license found in the -- * LICENSE file in the root directory of this source tree. -- */ - package com.reactnativecommunity.netinfo; - --import com.facebook.react.ReactPackage; --import com.facebook.react.bridge.JavaScriptModule; -+import androidx.annotation.Nullable; - import com.facebook.react.bridge.NativeModule; - import com.facebook.react.bridge.ReactApplicationContext; --import com.facebook.react.uimanager.ViewManager; --import java.util.Arrays; -+import com.facebook.react.module.model.ReactModuleInfo; -+import com.facebook.react.module.model.ReactModuleInfoProvider; -+import com.facebook.react.TurboReactPackage; -+ - import java.util.Collections; -+import java.util.HashMap; - import java.util.List; -+import java.util.Map; - --public class NetInfoPackage implements ReactPackage { -- @Override -- public List createNativeModules(ReactApplicationContext reactContext) { -- return Arrays.asList(new NetInfoModule(reactContext)); -- } -+public class NetInfoPackage extends TurboReactPackage { - -- // Deprecated from RN 0.47 -- public List> createJSModules() { -- return Collections.emptyList(); -- } -+ @Nullable -+ @Override -+ public NativeModule getModule(String name, ReactApplicationContext reactContext) { -+ if (name.equals(NetInfoModuleImpl.NAME)) { -+ return new NetInfoModule(reactContext); -+ } else { -+ return null; -+ } -+ } - -- @Override -- @SuppressWarnings("rawtypes") -- public List createViewManagers(ReactApplicationContext reactContext) { -- return Collections.emptyList(); -- } -+ @Override -+ public ReactModuleInfoProvider getReactModuleInfoProvider() { -+ return () -> { -+ final Map moduleInfos = new HashMap<>(); -+ boolean turboModulesEnabled = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; -+ moduleInfos.put( -+ NetInfoModuleImpl.NAME, -+ new ReactModuleInfo( -+ NetInfoModuleImpl.NAME, -+ NetInfoModuleImpl.NAME, -+ false, // canOverrideExistingModule -+ false, // needsEagerInit -+ true, // hasConstants -+ false, // isCxxModule -+ turboModulesEnabled // isTurboModule -+ )); -+ return moduleInfos; -+ }; -+ } - } -diff --git a/node_modules/@react-native-community/netinfo/android/src/newarch/com/reactnativecommunity/netinfo/NetInfoModule.java b/node_modules/@react-native-community/netinfo/android/src/newarch/com/reactnativecommunity/netinfo/NetInfoModule.java -new file mode 100644 -index 0000000..26c83b6 ---- /dev/null -+++ b/node_modules/@react-native-community/netinfo/android/src/newarch/com/reactnativecommunity/netinfo/NetInfoModule.java -@@ -0,0 +1,51 @@ -+package com.reactnativecommunity.netinfo; -+ -+import com.facebook.react.bridge.ReactApplicationContext; -+import com.facebook.react.bridge.Promise; -+import com.facebook.react.bridge.ReactMethod; -+import com.facebook.react.bridge.ReadableMap; -+ -+public class NetInfoModule extends NativeRNCNetInfoSpec { -+ -+ private NetInfoModuleImpl implementation; -+ -+ NetInfoModule(ReactApplicationContext context) { -+ super(context); -+ implementation = new NetInfoModuleImpl(context); -+ } -+ -+ @Override -+ public String getName() { -+ return NetInfoModuleImpl.NAME; -+ } -+ -+ @ReactMethod -+ public void getCurrentState(final String requestedInterface, final Promise promise) { -+ implementation.getCurrentState(requestedInterface, promise); -+ } -+ -+ @ReactMethod -+ public void configure(ReadableMap config) { -+ // iOS only -+ } -+ -+ @ReactMethod -+ public void addListener(String eventName) { -+ implementation.addListener(eventName); -+ } -+ -+ @ReactMethod -+ public void removeListeners(double count) { -+ implementation.removeListeners(count); -+ } -+ -+ @Override -+ public void invalidate() { -+ implementation.invalidate(); -+ } -+ -+ @Override -+ public void initialize() { -+ implementation.initialize(); -+ } -+} -diff --git a/node_modules/@react-native-community/netinfo/android/src/oldarch/com/reactnativecommunity/netinfo/NetInfoModule.java b/node_modules/@react-native-community/netinfo/android/src/oldarch/com/reactnativecommunity/netinfo/NetInfoModule.java -new file mode 100644 -index 0000000..c61a84d ---- /dev/null -+++ b/node_modules/@react-native-community/netinfo/android/src/oldarch/com/reactnativecommunity/netinfo/NetInfoModule.java -@@ -0,0 +1,59 @@ -+ -+ -+package com.reactnativecommunity.netinfo; -+ -+import com.facebook.react.bridge.NativeModule; -+import com.facebook.react.bridge.Promise; -+import com.facebook.react.bridge.ReactApplicationContext; -+import com.facebook.react.bridge.ReactContext; -+import com.facebook.react.bridge.ReactContextBaseJavaModule; -+import com.facebook.react.bridge.ReactMethod; -+import java.util.Map; -+import java.util.HashMap; -+import com.facebook.react.bridge.ReadableMap; -+ -+public class NetInfoModule extends ReactContextBaseJavaModule { -+ -+ private NetInfoModuleImpl implementation; -+ -+ NetInfoModule(ReactApplicationContext context) { -+ super(context); -+ implementation = new NetInfoModuleImpl(context); -+ } -+ -+ @Override -+ public String getName() { -+ return NetInfoModuleImpl.NAME; -+ } -+ -+ @ReactMethod -+ public void getCurrentState(final String requestedInterface, final Promise promise) { -+ implementation.getCurrentState(requestedInterface, promise); -+ } -+ -+ @Override -+ public void invalidate() { -+ implementation.invalidate(); -+ } -+ -+ -+ @Override -+ public void initialize() { -+ implementation.initialize(); -+ } -+ -+ @ReactMethod -+ public void addListener(String eventName) { -+ implementation.addListener(eventName); -+ } -+ -+ @ReactMethod -+ public void configure(ReadableMap config) { -+ // iOS only -+ } -+ -+ @ReactMethod -+ public void removeListeners(double count) { -+ implementation.removeListeners(count); -+ } -+} -diff --git a/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm b/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm -index e83b8c4..47fc8bb 100644 ---- a/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm -+++ b/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm -@@ -8,6 +8,10 @@ - #import "RNCNetInfo.h" - #import "RNCConnectionStateWatcher.h" - -+#ifdef RCT_NEW_ARCH_ENABLED -+#import "RNCNetInfoSpec.h" -+#endif -+ - #include - #include - -@@ -15,13 +19,18 @@ - #import - #import - #endif --@import SystemConfiguration.CaptiveNetwork; -+#import -+ - - #import - #import - #import - -+#ifdef RCT_NEW_ARCH_ENABLED -+@interface RNCNetInfo () -+#else - @interface RNCNetInfo () -+#endif - - @property (nonatomic, strong) RNCConnectionStateWatcher *connectionStateWatcher; - @property (nonatomic) BOOL isObserving; -@@ -90,13 +99,14 @@ - (void)connectionStateWatcher:(RNCConnectionStateWatcher *)connectionStateWatch - - #pragma mark - Public API - --RCT_EXPORT_METHOD(getCurrentState:(nullable NSString *)requestedInterface resolve:(RCTPromiseResolveBlock)resolve -+RCT_EXPORT_METHOD(getCurrentState:(NSString *)requestedInterface resolve:(RCTPromiseResolveBlock)resolve - reject:(__unused RCTPromiseRejectBlock)reject) - { - RNCConnectionState *state = [self.connectionStateWatcher currentState]; - resolve([self currentDictionaryFromUpdateState:state withInterface:requestedInterface]); - } - -+ - RCT_EXPORT_METHOD(configure:(NSDictionary *)config) - { - self.config = config; -@@ -265,4 +275,10 @@ - (NSString *)bssid - } - #endif - -+#ifdef RCT_NEW_ARCH_ENABLED -+- (std::shared_ptr)getTurboModule:(const facebook::react::ObjCTurboModule::InitParams &)params { -+ return std::make_shared(params); -+} -+#endif -+ - @end -diff --git a/node_modules/@react-native-community/netinfo/jest/netinfo-mock.js b/node_modules/@react-native-community/netinfo/jest/netinfo-mock.js -index 7f5769c..99b1aa3 100644 ---- a/node_modules/@react-native-community/netinfo/jest/netinfo-mock.js -+++ b/node_modules/@react-native-community/netinfo/jest/netinfo-mock.js -@@ -14,18 +14,17 @@ const defaultState = { - }; - - const NetInfoStateType = { -- unknown: "unknown", -- none: "none", -- cellular: "cellular", -- wifi: "wifi", -- bluetooth: "bluetooth", -- ethernet: "ethernet", -- wimax: "wimax", -- vpn: "vpn", -- other: "other", -+ unknown: 'unknown', -+ none: 'none', -+ cellular: 'cellular', -+ wifi: 'wifi', -+ bluetooth: 'bluetooth', -+ ethernet: 'ethernet', -+ wimax: 'wimax', -+ vpn: 'vpn', -+ other: 'other', - }; - -- - const RNCNetInfoMock = { - NetInfoStateType, - configure: jest.fn(), -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/index.js b/node_modules/@react-native-community/netinfo/lib/commonjs/index.js -index f5afe24..8f06bc8 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/index.js -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/index.js -@@ -11,26 +11,19 @@ var _exportNames = { - useNetInfo: true, - useNetInfoInstance: true - }; -+exports.addEventListener = addEventListener; - exports.configure = configure; -+exports.default = void 0; - exports.fetch = fetch; - exports.refresh = refresh; --exports.addEventListener = addEventListener; - exports.useNetInfo = useNetInfo; - exports.useNetInfoInstance = useNetInfoInstance; --exports.default = void 0; -- - var _react = require("react"); -- - var _reactNative = require("react-native"); -- - var _defaultConfiguration = _interopRequireDefault(require("./internal/defaultConfiguration")); -- - var _nativeInterface = _interopRequireDefault(require("./internal/nativeInterface")); -- - var _state2 = _interopRequireDefault(require("./internal/state")); -- - var Types = _interopRequireWildcard(require("./internal/types")); -- - Object.keys(Types).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; -@@ -42,13 +35,9 @@ Object.keys(Types).forEach(function (key) { - } - }); - }); -- --function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -- --function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -- -+function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } -+function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -- - /** - * Copyright (c) Facebook, Inc. and its affiliates. - * -@@ -57,14 +46,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de - * - * @format - */ -+ - // Stores the currently used configuration --let _configuration = _defaultConfiguration.default; // Stores the singleton reference to the state manager -+let _configuration = _defaultConfiguration.default; - -+// Stores the singleton reference to the state manager - let _state = null; -- - const createState = () => { - return new _state2.default(_configuration); - }; -+ - /** - * Configures the library with the given configuration. Note that calling this will stop all - * previously added listeners from being called again. It is best to call this right when your -@@ -72,23 +63,20 @@ const createState = () => { - * - * @param configuration The new configuration to set. - */ -- -- - function configure(configuration) { -- _configuration = { ..._defaultConfiguration.default, -+ _configuration = { -+ ..._defaultConfiguration.default, - ...configuration - }; -- - if (_state) { - _state.tearDown(); -- - _state = createState(); - } -- - if (_reactNative.Platform.OS === 'ios') { - _nativeInterface.default.configure(configuration); - } - } -+ - /** - * Returns a `Promise` that resolves to a `NetInfoState` object. - * This function operates on the global singleton instance configured using `configure()` -@@ -97,29 +85,25 @@ function configure(configuration) { - * - * @returns A Promise which contains the current connection state. - */ -- -- - function fetch(requestedInterface) { - if (!_state) { - _state = createState(); - } -- - return _state.latest(requestedInterface); - } -+ - /** - * Force-refreshes the internal state of the global singleton managed by this library. - * - * @returns A Promise which contains the updated connection state. - */ -- -- - function refresh() { - if (!_state) { - _state = createState(); - } -- - return _state._fetchCurrentState(); - } -+ - /** - * Subscribe to the global singleton's connection information. The callback is called with a parameter of type - * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener -@@ -131,19 +115,16 @@ function refresh() { - * - * @returns A function which can be called to unsubscribe. - */ -- -- - function addEventListener(listener) { - if (!_state) { - _state = createState(); - } -- - _state.add(listener); -- - return () => { - _state && _state.remove(listener); - }; - } -+ - /** - * A React Hook into this library's singleton which updates when the connection state changes. - * -@@ -151,13 +132,10 @@ function addEventListener(listener) { - * - * @returns The connection state. - */ -- -- - function useNetInfo(configuration) { - if (configuration) { - configure(configuration); - } -- - const [netInfo, setNetInfo] = (0, _react.useState)({ - type: Types.NetInfoStateType.unknown, - isConnected: null, -@@ -169,6 +147,7 @@ function useNetInfo(configuration) { - }, []); - return netInfo; - } -+ - /** - * A React Hook which manages an isolated instance of the network info manager. - * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener, -@@ -178,8 +157,6 @@ function useNetInfo(configuration) { - * - * @returns the netInfo state and a refresh function - */ -- -- - function useNetInfoInstance(isPaused = false, configuration) { - const [networkInfoManager, setNetworkInfoManager] = (0, _react.useState)(); - const [netInfo, setNetInfo] = (0, _react.useState)({ -@@ -192,8 +169,8 @@ function useNetInfoInstance(isPaused = false, configuration) { - if (isPaused) { - return; - } -- -- const config = { ..._defaultConfiguration.default, -+ const config = { -+ ..._defaultConfiguration.default, - ...configuration - }; - const state = new _state2.default(config); -@@ -209,8 +186,7 @@ function useNetInfoInstance(isPaused = false, configuration) { - refresh - }; - } -- --var _default = { -+var _default = exports.default = { - configure, - fetch, - refresh, -@@ -218,5 +194,4 @@ var _default = { - useNetInfo, - useNetInfoInstance - }; --exports.default = _default; - //# sourceMappingURL=index.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/index.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/index.js.map -index c778a40..51f1ed7 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/index.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/index.js.map -@@ -1 +1 @@ --{"version":3,"sources":["index.ts"],"names":["_configuration","DEFAULT_CONFIGURATION","_state","createState","State","configure","configuration","tearDown","Platform","OS","NativeInterface","fetch","requestedInterface","latest","refresh","_fetchCurrentState","addEventListener","listener","add","remove","useNetInfo","netInfo","setNetInfo","type","Types","NetInfoStateType","unknown","isConnected","isInternetReachable","details","useNetInfoInstance","isPaused","networkInfoManager","setNetworkInfoManager","config","state"],"mappings":";;;;;;;;;;;;;;;;;;;;;AASA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAkKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;AAhLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA,IAAIA,cAAc,GAAGC,6BAArB,C,CAEA;;AACA,IAAIC,MAAoB,GAAG,IAA3B;;AACA,MAAMC,WAAW,GAAG,MAAa;AAC/B,SAAO,IAAIC,eAAJ,CAAUJ,cAAV,CAAP;AACD,CAFD;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASK,SAAT,CACLC,aADK,EAEC;AACNN,EAAAA,cAAc,GAAG,EACf,GAAGC,6BADY;AAEf,OAAGK;AAFY,GAAjB;;AAKA,MAAIJ,MAAJ,EAAY;AACVA,IAAAA,MAAM,CAACK,QAAP;;AACAL,IAAAA,MAAM,GAAGC,WAAW,EAApB;AACD;;AAED,MAAIK,sBAASC,EAAT,KAAgB,KAApB,EAA2B;AACzBC,6BAAgBL,SAAhB,CAA0BC,aAA1B;AACD;AACF;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASK,KAAT,CACLC,kBADK,EAEwB;AAC7B,MAAI,CAACV,MAAL,EAAa;AACXA,IAAAA,MAAM,GAAGC,WAAW,EAApB;AACD;;AACD,SAAOD,MAAM,CAACW,MAAP,CAAcD,kBAAd,CAAP;AACD;AAED;AACA;AACA;AACA;AACA;;;AACO,SAASE,OAAT,GAAgD;AACrD,MAAI,CAACZ,MAAL,EAAa;AACXA,IAAAA,MAAM,GAAGC,WAAW,EAApB;AACD;;AACD,SAAOD,MAAM,CAACa,kBAAP,EAAP;AACD;AAED;AACA;AACA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c;AACZ;AACD;;AACD,UAAMG,MAAM,GAAG,EACb,GAAGjC,6BADU;AAEb,SAAGK;AAFU,KAAf;AAIA,UAAM6B,KAAK,GAAG,IAAI/B,eAAJ,CAAU8B,MAAV,CAAd;AACAD,IAAAA,qBAAqB,CAACE,KAAD,CAArB;AACAA,IAAAA,KAAK,CAACjB,GAAN,CAAUI,UAAV;AACA,WAAOa,KAAK,CAAC5B,QAAb;AACD,GAZD,EAYG,CAACwB,QAAD,EAAWzB,aAAX,CAZH;AAcA,QAAMQ,OAAO,GAAG,wBAAY,MAAM;AAChCkB,IAAAA,kBAAkB,IAAIA,kBAAkB,CAACjB,kBAAnB,EAAtB;AACD,GAFe,EAEb,CAACiB,kBAAD,CAFa,CAAhB;AAIA,SAAO;AACLX,IAAAA,OADK;AAELP,IAAAA;AAFK,GAAP;AAID;;eAIc;AACbT,EAAAA,SADa;AAEbM,EAAAA,KAFa;AAGbG,EAAAA,OAHa;AAIbE,EAAAA,gBAJa;AAKbI,EAAAA,UALa;AAMbU,EAAAA;AANa,C","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {useState, useEffect, useCallback} from 'react';\nimport {Platform} from 'react-native';\nimport DEFAULT_CONFIGURATION from './internal/defaultConfiguration';\nimport NativeInterface from './internal/nativeInterface';\nimport State from './internal/state';\nimport * as Types from './internal/types';\n\n// Stores the currently used configuration\nlet _configuration = DEFAULT_CONFIGURATION;\n\n// Stores the singleton reference to the state manager\nlet _state: State | null = null;\nconst createState = (): State => {\n return new State(_configuration);\n};\n\n/**\n * Configures the library with the given configuration. Note that calling this will stop all\n * previously added listeners from being called again. It is best to call this right when your\n * application is started to avoid issues. The configuration sets up a global singleton instance.\n *\n * @param configuration The new configuration to set.\n */\nexport function configure(\n configuration: Partial,\n): void {\n _configuration = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n\n if (_state) {\n _state.tearDown();\n _state = createState();\n }\n\n if (Platform.OS === 'ios') {\n NativeInterface.configure(configuration);\n }\n}\n\n/**\n * Returns a `Promise` that resolves to a `NetInfoState` object.\n * This function operates on the global singleton instance configured using `configure()`\n *\n * @param [requestedInterface] interface from which to obtain the information\n *\n * @returns A Promise which contains the current connection state.\n */\nexport function fetch(\n requestedInterface?: string,\n): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state.latest(requestedInterface);\n}\n\n/**\n * Force-refreshes the internal state of the global singleton managed by this library.\n *\n * @returns A Promise which contains the updated connection state.\n */\nexport function refresh(): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state._fetchCurrentState();\n}\n\n/**\n * Subscribe to the global singleton's connection information. The callback is called with a parameter of type\n * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener\n * will be called with the latest information soon after you subscribe and then with any\n * subsequent changes afterwards. You should not assume that the listener is called in the same\n * way across devices or platforms.\n *\n * @param listener The listener which is called when the network state changes.\n *\n * @returns A function which can be called to unsubscribe.\n */\nexport function addEventListener(\n listener: Types.NetInfoChangeHandler,\n): Types.NetInfoSubscription {\n if (!_state) {\n _state = createState();\n }\n\n _state.add(listener);\n return (): void => {\n _state && _state.remove(listener);\n };\n}\n\n/**\n * A React Hook into this library's singleton which updates when the connection state changes.\n *\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns The connection state.\n */\nexport function useNetInfo(\n configuration?: Partial,\n): Types.NetInfoState {\n if (configuration) {\n configure(configuration);\n }\n\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect((): (() => void) => {\n return addEventListener(setNetInfo);\n }, []);\n\n return netInfo;\n}\n\n/**\n * A React Hook which manages an isolated instance of the network info manager.\n * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener,\n * NetInfo.fetch, NetInfo.refresh are performed on a global singleton and have no affect on this hook.\n * @param {boolean} isPaused - Pause the internal network checks.\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns the netInfo state and a refresh function\n */\nexport function useNetInfoInstance(\n isPaused = false,\n configuration?: Partial,\n) {\n const [networkInfoManager, setNetworkInfoManager] = useState();\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect(() => {\n if (isPaused) {\n return;\n }\n const config = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n const state = new State(config);\n setNetworkInfoManager(state);\n state.add(setNetInfo);\n return state.tearDown;\n }, [isPaused, configuration]);\n\n const refresh = useCallback(() => {\n networkInfoManager && networkInfoManager._fetchCurrentState();\n }, [networkInfoManager]);\n\n return {\n netInfo,\n refresh,\n };\n}\n\nexport * from './internal/types';\n\nexport default {\n configure,\n fetch,\n refresh,\n addEventListener,\n useNetInfo,\n useNetInfoInstance,\n};\n"]} -\ No newline at end of file -+{"version":3,"names":["_react","require","_reactNative","_defaultConfiguration","_interopRequireDefault","_nativeInterface","_state2","Types","_interopRequireWildcard","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","n","__proto__","a","getOwnPropertyDescriptor","u","i","set","obj","_configuration","DEFAULT_CONFIGURATION","_state","createState","State","configure","configuration","tearDown","Platform","OS","NativeInterface","fetch","requestedInterface","latest","refresh","_fetchCurrentState","addEventListener","listener","add","remove","useNetInfo","netInfo","setNetInfo","useState","type","NetInfoStateType","unknown","isConnected","isInternetReachable","details","useEffect","useNetInfoInstance","isPaused","networkInfoManager","setNetworkInfoManager","config","state","useCallback","_default"],"sources":["index.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {useState, useEffect, useCallback} from 'react';\nimport {Platform} from 'react-native';\nimport DEFAULT_CONFIGURATION from './internal/defaultConfiguration';\nimport NativeInterface from './internal/nativeInterface';\nimport State from './internal/state';\nimport * as Types from './internal/types';\n\n// Stores the currently used configuration\nlet _configuration = DEFAULT_CONFIGURATION;\n\n// Stores the singleton reference to the state manager\nlet _state: State | null = null;\nconst createState = (): State => {\n return new State(_configuration);\n};\n\n/**\n * Configures the library with the given configuration. Note that calling this will stop all\n * previously added listeners from being called again. It is best to call this right when your\n * application is started to avoid issues. The configuration sets up a global singleton instance.\n *\n * @param configuration The new configuration to set.\n */\nexport function configure(\n configuration: Partial,\n): void {\n _configuration = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n\n if (_state) {\n _state.tearDown();\n _state = createState();\n }\n\n if (Platform.OS === 'ios') {\n NativeInterface.configure(configuration);\n }\n}\n\n/**\n * Returns a `Promise` that resolves to a `NetInfoState` object.\n * This function operates on the global singleton instance configured using `configure()`\n *\n * @param [requestedInterface] interface from which to obtain the information\n *\n * @returns A Promise which contains the current connection state.\n */\nexport function fetch(\n requestedInterface?: string,\n): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state.latest(requestedInterface);\n}\n\n/**\n * Force-refreshes the internal state of the global singleton managed by this library.\n *\n * @returns A Promise which contains the updated connection state.\n */\nexport function refresh(): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state._fetchCurrentState();\n}\n\n/**\n * Subscribe to the global singleton's connection information. The callback is called with a parameter of type\n * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener\n * will be called with the latest information soon after you subscribe and then with any\n * subsequent changes afterwards. You should not assume that the listener is called in the same\n * way across devices or platforms.\n *\n * @param listener The listener which is called when the network state changes.\n *\n * @returns A function which can be called to unsubscribe.\n */\nexport function addEventListener(\n listener: Types.NetInfoChangeHandler,\n): Types.NetInfoSubscription {\n if (!_state) {\n _state = createState();\n }\n\n _state.add(listener);\n return (): void => {\n _state && _state.remove(listener);\n };\n}\n\n/**\n * A React Hook into this library's singleton which updates when the connection state changes.\n *\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns The connection state.\n */\nexport function useNetInfo(\n configuration?: Partial,\n): Types.NetInfoState {\n if (configuration) {\n configure(configuration);\n }\n\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect((): (() => void) => {\n return addEventListener(setNetInfo);\n }, []);\n\n return netInfo;\n}\n\n/**\n * A React Hook which manages an isolated instance of the network info manager.\n * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener,\n * NetInfo.fetch, NetInfo.refresh are performed on a global singleton and have no affect on this hook.\n * @param {boolean} isPaused - Pause the internal network checks.\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns the netInfo state and a refresh function\n */\nexport function useNetInfoInstance(\n isPaused = false,\n configuration?: Partial,\n) {\n const [networkInfoManager, setNetworkInfoManager] = useState();\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect(() => {\n if (isPaused) {\n return;\n }\n const config = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n const state = new State(config);\n setNetworkInfoManager(state);\n state.add(setNetInfo);\n return state.tearDown;\n }, [isPaused, configuration]);\n\n const refresh = useCallback(() => {\n networkInfoManager && networkInfoManager._fetchCurrentState();\n }, [networkInfoManager]);\n\n return {\n netInfo,\n refresh,\n };\n}\n\nexport * from './internal/types';\n\nexport default {\n configure,\n fetch,\n refresh,\n addEventListener,\n useNetInfo,\n useNetInfoInstance,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AASA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,qBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,OAAA,G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U,CAAC,GAAG,IAAAC,eAAQ,EAAqB;IACzDC,IAAI,EAAEtD,KAAK,CAACuD,gBAAgB,CAACC,OAAO;IACpCC,WAAW,EAAE,IAAI;IACjBC,mBAAmB,EAAE,IAAI;IACzBC,OAAO,EAAE;EACX,CAAC,CAAC;EAEF,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAIE,QAAQ,EAAE;MACZ;IACF;IACA,MAAMG,MAAM,GAAG;MACb,GAAGlC,6BAAqB;MACxB,GAAGK;IACL,CAAC;IACD,MAAM8B,KAAK,GAAG,IAAIhC,eAAK,CAAC+B,MAAM,CAAC;IAC/BD,qBAAqB,CAACE,KAAK,CAAC;IAC5BA,KAAK,CAAClB,GAAG,CAACI,UAAU,CAAC;IACrB,OAAOc,KAAK,CAAC7B,QAAQ;EACvB,CAAC,EAAE,CAACyB,QAAQ,EAAE1B,aAAa,CAAC,CAAC;EAE7B,MAAMQ,OAAO,GAAG,IAAAuB,kBAAW,EAAC,MAAM;IAChCJ,kBAAkB,IAAIA,kBAAkB,CAAClB,kBAAkB,CAAC,CAAC;EAC/D,CAAC,EAAE,CAACkB,kBAAkB,CAAC,CAAC;EAExB,OAAO;IACLZ,OAAO;IACPP;EACF,CAAC;AACH;AAAC,IAAAwB,QAAA,GAAA1D,OAAA,CAAAU,OAAA,GAIc;EACbe,SAAS;EACTM,KAAK;EACLG,OAAO;EACPE,gBAAgB;EAChBI,UAAU;EACVW;AACF,CAAC"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/NativeRNCNetInfo.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/NativeRNCNetInfo.js -new file mode 100644 -index 0000000..e3949ec ---- /dev/null -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/NativeRNCNetInfo.js -@@ -0,0 +1,10 @@ -+"use strict"; -+ -+Object.defineProperty(exports, "__esModule", { -+ value: true -+}); -+exports.default = void 0; -+var _reactNative = require("react-native"); -+/* eslint-disable @typescript-eslint/ban-types */ -+var _default = exports.default = _reactNative.TurboModuleRegistry.getEnforcing('RNCNetInfo'); -+//# sourceMappingURL=NativeRNCNetInfo.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/NativeRNCNetInfo.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/NativeRNCNetInfo.js.map -new file mode 100644 -index 0000000..86d23d4 ---- /dev/null -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/NativeRNCNetInfo.js.map -@@ -0,0 +1 @@ -+{"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sources":["NativeRNCNetInfo.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-types */\nimport type { TurboModule } from 'react-native';\nimport { TurboModuleRegistry } from 'react-native';\n\nexport interface Spec extends TurboModule {\n configure: (config: Object) => void;\n getCurrentState(requestedInterface?: string): Promise;\n // Events\n addListener: (eventName: string) => void;\n removeListeners: (count: number) => void;\n}\n\nexport default TurboModuleRegistry.getEnforcing('RNCNetInfo');\n\n"],"mappings":";;;;;;AAEA,IAAAA,YAAA,GAAAC,OAAA;AAFA;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAYeC,gCAAmB,CAACC,YAAY,CAAO,YAAY,CAAC"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js -index 166a58d..c5b4e66 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js -@@ -19,6 +19,5 @@ const DEFAULT_CONFIGURATION = { - shouldFetchWiFiSSID: false, - useNativeReachability: true - }; --var _default = DEFAULT_CONFIGURATION; --exports.default = _default; -+var _default = exports.default = DEFAULT_CONFIGURATION; - //# sourceMappingURL=defaultConfiguration.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js.map -index 03f9097..be92be9 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js.map -@@ -1 +1 @@ --{"version":3,"sources":["defaultConfiguration.ts"],"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability"],"mappings":";;;;;;AAEA,MAAMA,qBAAiD,GAAG;AACxDC,EAAAA,eAAe,EAAE,0CADuC;AAExDC,EAAAA,kBAAkB,EAAE,MAFoC;AAGxDC,EAAAA,mBAAmB,EAAE,EAHmC;AAIxDC,EAAAA,gBAAgB,EAAGC,QAAD,IAChBC,OAAO,CAACC,OAAR,CAAgBF,QAAQ,CAACG,MAAT,KAAoB,GAApC,CALsD;AAMxDC,EAAAA,wBAAwB,EAAE,IAAI,IAN0B;AAMpB;AACpCC,EAAAA,uBAAuB,EAAE,KAAK,IAP0B;AAOpB;AACpCC,EAAAA,0BAA0B,EAAE,KAAK,IARuB;AAQjB;AACvCC,EAAAA,qBAAqB,EAAE,MAAe,IATkB;AAUxDC,EAAAA,mBAAmB,EAAE,KAVmC;AAWxDC,EAAAA,qBAAqB,EAAE;AAXiC,CAA1D;eAced,qB","sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: 'https://clients3.google.com/generate_204',\n reachabilityMethod: 'HEAD',\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 204),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: false,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION;"]} -\ No newline at end of file -+{"version":3,"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability","_default","exports","default"],"sources":["defaultConfiguration.ts"],"sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: 'https://clients3.google.com/generate_204',\n reachabilityMethod: 'HEAD',\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 204),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: false,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION;"],"mappings":";;;;;;AAEA,MAAMA,qBAAiD,GAAG;EACxDC,eAAe,EAAE,0CAA0C;EAC3DC,kBAAkB,EAAE,MAAM;EAC1BC,mBAAmB,EAAE,CAAC,CAAC;EACvBC,gBAAgB,EAAGC,QAAkB,IACnCC,OAAO,CAACC,OAAO,CAACF,QAAQ,CAACG,MAAM,KAAK,GAAG,CAAC;EAC1CC,wBAAwB,EAAE,CAAC,GAAG,IAAI;EAAE;EACpCC,uBAAuB,EAAE,EAAE,GAAG,IAAI;EAAE;EACpCC,0BAA0B,EAAE,EAAE,GAAG,IAAI;EAAE;EACvCC,qBAAqB,EAAEA,CAAA,KAAe,IAAI;EAC1CC,mBAAmB,EAAE,KAAK;EAC1BC,qBAAqB,EAAE;AACzB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEajB,qBAAqB"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js -index 410b7b0..a1e0456 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js -@@ -19,6 +19,5 @@ const DEFAULT_CONFIGURATION = { - shouldFetchWiFiSSID: true, - useNativeReachability: true - }; --var _default = DEFAULT_CONFIGURATION; --exports.default = _default; -+var _default = exports.default = DEFAULT_CONFIGURATION; - //# sourceMappingURL=defaultConfiguration.web.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js.map -index edf0c39..d6ee21a 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js.map -@@ -1 +1 @@ --{"version":3,"sources":["defaultConfiguration.web.ts"],"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability"],"mappings":";;;;;;AAEA,MAAMA,qBAAiD,GAAG;AACxDC,EAAAA,eAAe,EAAE,GADuC;AAExDC,EAAAA,kBAAkB,EAAE,MAFoC;AAGxDC,EAAAA,mBAAmB,EAAE,EAHmC;AAIxDC,EAAAA,gBAAgB,EAAGC,QAAD,IAChBC,OAAO,CAACC,OAAR,CAAgBF,QAAQ,CAACG,MAAT,KAAoB,GAApC,CALsD;AAMxDC,EAAAA,wBAAwB,EAAE,IAAI,IAN0B;AAMpB;AACpCC,EAAAA,uBAAuB,EAAE,KAAK,IAP0B;AAOpB;AACpCC,EAAAA,0BAA0B,EAAE,KAAK,IARuB;AAQjB;AACvCC,EAAAA,qBAAqB,EAAE,MAAe,IATkB;AAUxDC,EAAAA,mBAAmB,EAAE,IAVmC;AAWxDC,EAAAA,qBAAqB,EAAE;AAXiC,CAA1D;eAced,qB","sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: '/',\n reachabilityMethod: \"HEAD\",\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 200),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: true,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION"]} -\ No newline at end of file -+{"version":3,"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability","_default","exports","default"],"sources":["defaultConfiguration.web.ts"],"sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: '/',\n reachabilityMethod: \"HEAD\",\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 200),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: true,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION"],"mappings":";;;;;;AAEA,MAAMA,qBAAiD,GAAG;EACxDC,eAAe,EAAE,GAAG;EACpBC,kBAAkB,EAAE,MAAM;EAC1BC,mBAAmB,EAAE,CAAC,CAAC;EACvBC,gBAAgB,EAAGC,QAAkB,IACnCC,OAAO,CAACC,OAAO,CAACF,QAAQ,CAACG,MAAM,KAAK,GAAG,CAAC;EAC1CC,wBAAwB,EAAE,CAAC,GAAG,IAAI;EAAE;EACpCC,uBAAuB,EAAE,EAAE,GAAG,IAAI;EAAE;EACpCC,0BAA0B,EAAE,EAAE,GAAG,IAAI;EAAE;EACvCC,qBAAqB,EAAEA,CAAA,KAAe,IAAI;EAC1CC,mBAAmB,EAAE,IAAI;EACzBC,qBAAqB,EAAE;AACzB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEajB,qBAAqB"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js -index 45296d9..5169ed8 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js -@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.default = void 0; -- --function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -- -+function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -+function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -+function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } - /** - * Copyright (c) Facebook, Inc. and its affiliates. - * -@@ -15,57 +15,45 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope - * - * @format - */ -+ - class InternetReachability { - constructor(configuration, listener) { - _defineProperty(this, "_configuration", void 0); -- - _defineProperty(this, "_listener", void 0); -- - _defineProperty(this, "_isInternetReachable", undefined); -- - _defineProperty(this, "_currentInternetReachabilityCheckHandler", null); -- - _defineProperty(this, "_currentTimeoutHandle", null); -- - _defineProperty(this, "_setIsInternetReachable", isInternetReachable => { - if (this._isInternetReachable === isInternetReachable) { - return; - } -- - this._isInternetReachable = isInternetReachable; -- - this._listener(this._isInternetReachable); - }); -- - _defineProperty(this, "_setExpectsConnection", expectsConnection => { - // Cancel any pending check - if (this._currentInternetReachabilityCheckHandler !== null) { - this._currentInternetReachabilityCheckHandler.cancel(); -- - this._currentInternetReachabilityCheckHandler = null; -- } // Cancel any pending timeout -- -- -+ } -+ // Cancel any pending timeout - if (this._currentTimeoutHandle !== null) { - clearTimeout(this._currentTimeoutHandle); - this._currentTimeoutHandle = null; - } -- - if (expectsConnection && this._configuration.reachabilityShouldRun()) { - // If we expect a connection, start the process for finding if we have one - // Set the state to "null" if it was previously false - if (!this._isInternetReachable) { - this._setIsInternetReachable(null); -- } // Start a network request to check for internet -- -- -+ } -+ // Start a network request to check for internet - this._currentInternetReachabilityCheckHandler = this._checkInternetReachability(); - } else { - // If we don't expect a connection or don't run reachability check, just change the state to "false" - this._setIsInternetReachable(false); - } - }); -- - _defineProperty(this, "_checkInternetReachability", () => { - const controller = new AbortController(); - const responsePromise = fetch(this._configuration.reachabilityUrl, { -@@ -73,16 +61,17 @@ class InternetReachability { - method: this._configuration.reachabilityMethod, - cache: 'no-cache', - signal: controller.signal -- }); // Create promise that will reject after the request timeout has been reached -+ }); - -+ // Create promise that will reject after the request timeout has been reached - let timeoutHandle; -- const timeoutPromise = new Promise(() => { -- timeoutHandle = setTimeout(() => controller.abort('timedout'), this._configuration.reachabilityRequestTimeout); -- }); // Create promise that makes it possible to cancel a pending request through a reject -- // eslint-disable-next-line @typescript-eslint/no-empty-function -+ const timeoutPromise = new Promise((_, reject) => { -+ timeoutHandle = setTimeout(() => reject('timedout'), this._configuration.reachabilityRequestTimeout); -+ }); - -+ // Create promise that makes it possible to cancel a pending request through a reject -+ // eslint-disable-next-line @typescript-eslint/no-empty-function - let cancel = () => {}; -- - const cancelPromise = new Promise((_, reject) => { - cancel = () => reject('canceled'); - }); -@@ -90,18 +79,25 @@ class InternetReachability { - return this._configuration.reachabilityTest(response); - }).then(result => { - this._setIsInternetReachable(result); -- - const nextTimeoutInterval = this._isInternetReachable ? this._configuration.reachabilityLongTimeout : this._configuration.reachabilityShortTimeout; - this._currentTimeoutHandle = setTimeout(this._checkInternetReachability, nextTimeoutInterval); -+ }).catch(error => { -+ if (error !== 'canceled') { -+ this._setIsInternetReachable(false); -+ this._currentTimeoutHandle = setTimeout(this._checkInternetReachability, this._configuration.reachabilityShortTimeout); -+ } - }).catch(error => { - if ('canceled' === error) { - controller.abort(); - } else { -+ if ('timedout' === error) { -+ controller.abort(); -+ } - this._setIsInternetReachable(false); -- - this._currentTimeoutHandle = setTimeout(this._checkInternetReachability, this._configuration.reachabilityShortTimeout); - } -- }) // Clear request timeout and propagate any errors -+ }) -+ // Clear request timeout and propagate any errors - .then(() => { - clearTimeout(timeoutHandle); - }, error => { -@@ -113,7 +109,6 @@ class InternetReachability { - cancel - }; - }); -- - _defineProperty(this, "update", state => { - if (typeof state.isInternetReachable === 'boolean' && this._configuration.useNativeReachability) { - this._setIsInternetReachable(state.isInternetReachable); -@@ -121,31 +116,25 @@ class InternetReachability { - this._setExpectsConnection(state.isConnected); - } - }); -- - _defineProperty(this, "currentState", () => { - return this._isInternetReachable; - }); -- - _defineProperty(this, "tearDown", () => { - // Cancel any pending check - if (this._currentInternetReachabilityCheckHandler !== null) { - this._currentInternetReachabilityCheckHandler.cancel(); -- - this._currentInternetReachabilityCheckHandler = null; -- } // Cancel any pending timeout -- -+ } - -+ // Cancel any pending timeout - if (this._currentTimeoutHandle !== null) { - clearTimeout(this._currentTimeoutHandle); - this._currentTimeoutHandle = null; - } - }); -- - this._configuration = configuration; - this._listener = listener; - } -- - } -- - exports.default = InternetReachability; - //# sourceMappingURL=internetReachability.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js.map -index 6d12691..63bd2df 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js.map -@@ -1 +1 @@ --{"version":3,"sources":["internetReachability.ts"],"names":["InternetReachability","constructor","configuration","listener","undefined","isInternetReachable","_isInternetReachable","_listener","expectsConnection","_currentInternetReachabilityCheckHandler","cancel","_currentTimeoutHandle","clearTimeout","_configuration","reachabilityShouldRun","_setIsInternetReachable","_checkInternetReachability","controller","AbortController","responsePromise","fetch","reachabilityUrl","headers","reachabilityHeaders","method","reachabilityMethod","cache","signal","timeoutHandle","timeoutPromise","Promise","setTimeout","abort","reachabilityRequestTimeout","cancelPromise","_","reject","promise","race","then","response","reachabilityTest","result","nextTimeoutInterval","reachabilityLongTimeout","reachabilityShortTimeout","catch","error","state","useNativeReachability","_setExpectsConnection","isConnected"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUe,MAAMA,oBAAN,CAA2B;AAOxCC,EAAAA,WAAW,CACTC,aADS,EAETC,QAFS,EAGT;AAAA;;AAAA;;AAAA,kDAPyDC,SAOzD;;AAAA,sEAN0F,IAM1F;;AAAA,mDALoE,IAKpE;;AAAA,qDAMAC,mBADgC,IAEvB;AACT,UAAI,KAAKC,oBAAL,KAA8BD,mBAAlC,EAAuD;AACrD;AACD;;AAED,WAAKC,oBAAL,GAA4BD,mBAA5B;;AACA,WAAKE,SAAL,CAAe,KAAKD,oBAApB;AACD,KAdC;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AID,KAtHC;;AAAA,oCAwHesC,KAAD,IAAwD;AACtE,UACE,OAAOA,KAAK,CAAC3C,mBAAb,KAAqC,SAArC,IACA,KAAKQ,cAAL,CAAoBoC,qBAFtB,EAGE;AACA,aAAKlC,uBAAL,CAA6BiC,KAAK,CAAC3C,mBAAnC;AACD,OALD,MAKO;AACL,aAAK6C,qBAAL,CAA2BF,KAAK,CAACG,WAAjC;AACD;AACF,KAjIC;;AAAA,0CAmIoB,MAAkC;AACtD,aAAO,KAAK7C,oBAAZ;AACD,KArIC;;AAAA,sCAuIgB,MAAY;AAC5B;AACA,UAAI,KAAKG,wCAAL,KAAkD,IAAtD,EAA4D;AAC1D,aAAKA,wCAAL,CAA8CC,MAA9C;;AACA,aAAKD,wCAAL,GAAgD,IAAhD;AACD,OAL2B,CAO5B;;;AACA,UAAI,KAAKE,qBAAL,KAA+B,IAAnC,EAAyC;AACvCC,QAAAA,YAAY,CAAC,KAAKD,qBAAN,CAAZ;AACA,aAAKA,qBAAL,GAA6B,IAA7B;AACD;AACF,KAnJC;;AACA,SAAKE,cAAL,GAAsBX,aAAtB;AACA,SAAKK,SAAL,GAAiBJ,QAAjB;AACD;;AAbuC","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport * as PrivateTypes from './privateTypes';\nimport * as Types from './types';\n\ninterface InternetReachabilityCheckHandler {\n promise: Promise;\n cancel: () => void;\n}\n\nexport default class InternetReachability {\n private _configuration: Types.NetInfoConfiguration;\n private _listener: PrivateTypes.NetInfoInternetReachabilityChangeListener;\n private _isInternetReachable: boolean | null | undefined = undefined;\n private _currentInternetReachabilityCheckHandler: InternetReachabilityCheckHandler | null = null;\n private _currentTimeoutHandle: ReturnType | null = null;\n\n constructor(\n configuration: Types.NetInfoConfiguration,\n listener: PrivateTypes.NetInfoInternetReachabilityChangeListener,\n ) {\n this._configuration = configuration;\n this._listener = listener;\n }\n\n private _setIsInternetReachable = (\n isInternetReachable: boolean | null,\n ): void => {\n if (this._isInternetReachable === isInternetReachable) {\n return;\n }\n\n this._isInternetReachable = isInternetReachable;\n this._listener(this._isInternetReachable);\n };\n\n private _setExpectsConnection = (expectsConnection: boolean | null): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n\n if (expectsConnection && this._configuration.reachabilityShouldRun()) {\n // If we expect a connection, start the process for finding if we have one\n // Set the state to \"null\" if it was previously false\n if (!this._isInternetReachable) {\n this._setIsInternetReachable(null);\n }\n // Start a network request to check for internet\n this._currentInternetReachabilityCheckHandler = this._checkInternetReachability();\n } else {\n // If we don't expect a connection or don't run reachability check, just change the state to \"false\"\n this._setIsInternetReachable(false);\n }\n };\n\n private _checkInternetReachability = (): InternetReachabilityCheckHandler => {\n const controller = new AbortController();\n\n const responsePromise = fetch(this._configuration.reachabilityUrl, {\n headers: this._configuration.reachabilityHeaders,\n method: this._configuration.reachabilityMethod,\n cache: 'no-cache',\n signal: controller.signal,\n });\n\n // Create promise that will reject after the request timeout has been reached\n let timeoutHandle: ReturnType;\n const timeoutPromise = new Promise((): void => {\n timeoutHandle = setTimeout(\n (): void => controller.abort('timedout'),\n this._configuration.reachabilityRequestTimeout,\n );\n });\n\n // Create promise that makes it possible to cancel a pending request through a reject\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n let cancel: () => void = (): void => {};\n const cancelPromise = new Promise((_, reject): void => {\n cancel = (): void => reject('canceled');\n });\n\n const promise = Promise.race([\n responsePromise,\n timeoutPromise,\n cancelPromise,\n ])\n .then(\n (response): Promise => {\n return this._configuration.reachabilityTest(response);\n },\n )\n .then(\n (result): void => {\n this._setIsInternetReachable(result);\n const nextTimeoutInterval = this._isInternetReachable\n ? this._configuration.reachabilityLongTimeout\n : this._configuration.reachabilityShortTimeout;\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n nextTimeoutInterval,\n );\n },\n )\n .catch(\n (error: Error | 'timedout' | 'canceled'): void => {\n if ('canceled' === error) {\n controller.abort();\n } else {\n this._setIsInternetReachable(false);\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n this._configuration.reachabilityShortTimeout,\n );\n }\n },\n )\n // Clear request timeout and propagate any errors\n .then(\n (): void => {\n clearTimeout(timeoutHandle);\n },\n (error: Error): void => {\n clearTimeout(timeoutHandle);\n throw error;\n },\n );\n\n return {\n promise,\n cancel,\n };\n };\n\n public update = (state: PrivateTypes.NetInfoNativeModuleState): void => {\n if (\n typeof state.isInternetReachable === 'boolean' &&\n this._configuration.useNativeReachability\n ) {\n this._setIsInternetReachable(state.isInternetReachable);\n } else {\n this._setExpectsConnection(state.isConnected);\n }\n };\n\n public currentState = (): boolean | null | undefined => {\n return this._isInternetReachable;\n };\n\n public tearDown = (): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n };\n}\n"]} -\ No newline at end of file -+{"version":3,"names":["InternetReachability","constructor","configuration","listener","_defineProperty","undefined","isInternetReachable","_isInternetReachable","_listener","expectsConnection","_currentInternetReachabilityCheckHandler","cancel","_currentTimeoutHandle","clearTimeout","_configuration","reachabilityShouldRun","_setIsInternetReachable","_checkInternetReachability","controller","AbortController","responsePromise","fetch","reachabilityUrl","headers","reachabilityHeaders","method","reachabilityMethod","cache","signal","timeoutHandle","timeoutPromise","Promise","_","reject","setTimeout","reachabilityRequestTimeout","cancelPromise","promise","race","then","response","reachabilityTest","result","nextTimeoutInterval","reachabilityLongTimeout","reachabilityShortTimeout","catch","error","abort","state","useNativeReachability","_setExpectsConnection","isConnected","exports","default"],"sources":["internetReachability.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport * as PrivateTypes from './privateTypes';\nimport * as Types from './types';\n\ninterface InternetReachabilityCheckHandler {\n promise: Promise;\n cancel: () => void;\n}\n\nexport default class InternetReachability {\n private _configuration: Types.NetInfoConfiguration;\n private _listener: PrivateTypes.NetInfoInternetReachabilityChangeListener;\n private _isInternetReachable: boolean | null | undefined = undefined;\n private _currentInternetReachabilityCheckHandler: InternetReachabilityCheckHandler | null =\n null;\n private _currentTimeoutHandle: ReturnType | null = null;\n\n constructor(\n configuration: Types.NetInfoConfiguration,\n listener: PrivateTypes.NetInfoInternetReachabilityChangeListener,\n ) {\n this._configuration = configuration;\n this._listener = listener;\n }\n\n private _setIsInternetReachable = (\n isInternetReachable: boolean | null,\n ): void => {\n if (this._isInternetReachable === isInternetReachable) {\n return;\n }\n\n this._isInternetReachable = isInternetReachable;\n this._listener(this._isInternetReachable);\n };\n\n private _setExpectsConnection = (expectsConnection: boolean | null): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n\n if (expectsConnection && this._configuration.reachabilityShouldRun()) {\n // If we expect a connection, start the process for finding if we have one\n // Set the state to \"null\" if it was previously false\n if (!this._isInternetReachable) {\n this._setIsInternetReachable(null);\n }\n // Start a network request to check for internet\n this._currentInternetReachabilityCheckHandler =\n this._checkInternetReachability();\n } else {\n // If we don't expect a connection or don't run reachability check, just change the state to \"false\"\n this._setIsInternetReachable(false);\n }\n };\n\n private _checkInternetReachability = (): InternetReachabilityCheckHandler => {\n const controller = new AbortController();\n\n const responsePromise = fetch(this._configuration.reachabilityUrl, {\n headers: this._configuration.reachabilityHeaders,\n method: this._configuration.reachabilityMethod,\n cache: 'no-cache',\n signal: controller.signal,\n });\n\n // Create promise that will reject after the request timeout has been reached\n let timeoutHandle: ReturnType;\n const timeoutPromise = new Promise((_, reject): void => {\n timeoutHandle = setTimeout(\n (): void => reject('timedout'),\n this._configuration.reachabilityRequestTimeout,\n );\n });\n\n // Create promise that makes it possible to cancel a pending request through a reject\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n let cancel: () => void = (): void => {};\n const cancelPromise = new Promise((_, reject): void => {\n cancel = (): void => reject('canceled');\n });\n\n const promise = Promise.race([\n responsePromise,\n timeoutPromise,\n cancelPromise,\n ])\n .then((response): Promise => {\n return this._configuration.reachabilityTest(response);\n })\n .then((result): void => {\n this._setIsInternetReachable(result);\n const nextTimeoutInterval = this._isInternetReachable\n ? this._configuration.reachabilityLongTimeout\n : this._configuration.reachabilityShortTimeout;\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n nextTimeoutInterval,\n );\n })\n .catch((error: Error | 'timedout' | 'canceled'): void => {\n if (error !== 'canceled') {\n this._setIsInternetReachable(false);\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n this._configuration.reachabilityShortTimeout,\n );\n }\n })\n .catch(\n (error: Error | 'timedout' | 'canceled'): void => {\n if ('canceled' === error) {\n controller.abort();\n } else {\n if ('timedout' === error) {\n controller.abort();\n }\n \n this._setIsInternetReachable(false);\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n this._configuration.reachabilityShortTimeout,\n );\n }\n },\n )\n // Clear request timeout and propagate any errors\n .then(\n (): void => {\n clearTimeout(timeoutHandle);\n },\n (error: Error): void => {\n clearTimeout(timeoutHandle);\n throw error;\n },\n );\n\n return {\n promise,\n cancel,\n };\n };\n\n public update = (state: PrivateTypes.NetInfoNativeModuleState): void => {\n if (\n typeof state.isInternetReachable === 'boolean' &&\n this._configuration.useNativeReachability\n ) {\n this._setIsInternetReachable(state.isInternetReachable);\n } else {\n this._setExpectsConnection(state.isConnected);\n }\n };\n\n public currentState = (): boolean | null | undefined => {\n return this._isInternetReachable;\n };\n\n public tearDown = (): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n };\n}\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUe,MAAMA,oBAAoB,CAAC;EAQxCC,WAAWA,CACTC,aAAyC,EACzCC,QAAgE,EAChE;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA,+BARyDC,SAAS;IAAAD,eAAA,mDAElE,IAAI;IAAAA,eAAA,gCACgE,IAAI;IAAAA,eAAA,kCAWxEE,mBAAmC,IAC1B;MACT,IAAI,IAAI,CAACC,oBAAoB,KAAKD,mBAAmB,EAAE;QACrD;MACF;MAEA,IAAI,CAACC,oBAAoB,GAAGD,mBAAmB;MAC/C,IAAI,CAACE,SAAS,CAAC,IAAI,CAACD,oBAAoB,CAAC;IAC3C,CAAC;IAAAH,eAAA,gCAEgCK,iBAAiC,IAAW;MAC3E;MACA,IAAI,IAAI,CAACC,wCAAwC,KAAK,IAAI,EAAE;QAC1D,IAAI,CAACA,wCAAwC,CAACC,MAAM,CAAC,CAAC;QACtD,IAAI,CAACD,wCAAwC,GAAG,IAAI;MACtD;MACA;MACA,IAAI,IAAI,CAACE,qBAAqB,KAAK,IAAI,EAAE;QACvCC,YAAY,CAAC,IAAI,CAACD,qBAAqB,CAAC;QACxC,IAAI,CAACA,qBAAqB,GAAG,IAAI;MACnC;MAEA,IAAIH,iBAAiB,IAAI,IA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;QACLV,OAAO;QACP1B;MACF,CAAC;IACH,CAAC;IAAAP,eAAA,iBAEgB6C,KAA4C,IAAW;MACtE,IACE,OAAOA,KAAK,CAAC3C,mBAAmB,KAAK,SAAS,IAC9C,IAAI,CAACQ,cAAc,CAACoC,qBAAqB,EACzC;QACA,IAAI,CAAClC,uBAAuB,CAACiC,KAAK,CAAC3C,mBAAmB,CAAC;MACzD,CAAC,MAAM;QACL,IAAI,CAAC6C,qBAAqB,CAACF,KAAK,CAACG,WAAW,CAAC;MAC/C;IACF,CAAC;IAAAhD,eAAA,uBAEqB,MAAkC;MACtD,OAAO,IAAI,CAACG,oBAAoB;IAClC,CAAC;IAAAH,eAAA,mBAEiB,MAAY;MAC5B;MACA,IAAI,IAAI,CAACM,wCAAwC,KAAK,IAAI,EAAE;QAC1D,IAAI,CAACA,wCAAwC,CAACC,MAAM,CAAC,CAAC;QACtD,IAAI,CAACD,wCAAwC,GAAG,IAAI;MACtD;;MAEA;MACA,IAAI,IAAI,CAACE,qBAAqB,KAAK,IAAI,EAAE;QACvCC,YAAY,CAAC,IAAI,CAACD,qBAAqB,CAAC;QACxC,IAAI,CAACA,qBAAqB,GAAG,IAAI;MACnC;IACF,CAAC;IA5JC,IAAI,CAACE,cAAc,GAAGZ,aAAa;IACnC,IAAI,CAACM,SAAS,GAAGL,QAAQ;EAC3B;AA2JF;AAACkD,OAAA,CAAAC,OAAA,GAAAtD,oBAAA"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js -index 7a50da5..cb7d968 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js -@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.default = void 0; -- - var _reactNative = require("react-native"); -- - var _nativeModule = _interopRequireDefault(require("./nativeModule")); -- - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -- - /** - * Copyright (c) Facebook, Inc. and its affiliates. - * -@@ -19,6 +15,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de - * - * @format - */ -+ - // Produce an error if we don't have the native module - if (!_nativeModule.default) { - throw new Error(`@react-native-community/netinfo: NativeModule.RNCNetInfo is null. To fix this issue try these steps: -@@ -31,27 +28,26 @@ if (!_nativeModule.default) { - - If none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-netinfo`); - } -+ - /** - * We export the native interface in this way to give easy shared access to it between the - * JavaScript code and the tests - */ -- -- - let nativeEventEmitter = null; --var _default = { ..._nativeModule.default, -- -+var _default = exports.default = { -+ configure: _nativeModule.default.configure, -+ addListener: _nativeModule.default.addListener, -+ removeListeners: _nativeModule.default.removeListeners, -+ getCurrentState: _nativeModule.default.getCurrentState, - get eventEmitter() { - if (!nativeEventEmitter) { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - /// @ts-ignore - nativeEventEmitter = new _reactNative.NativeEventEmitter(_nativeModule.default); -- } // eslint-disable-next-line @typescript-eslint/ban-ts-comment -+ } -+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment - /// @ts-ignore -- -- - return nativeEventEmitter; - } -- - }; --exports.default = _default; - //# sourceMappingURL=nativeInterface.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js.map -index 1e7ac57..33b4bc0 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js.map -@@ -1 +1 @@ --{"version":3,"sources":["nativeInterface.ts"],"names":["RNCNetInfo","Error","nativeEventEmitter","eventEmitter","NativeEventEmitter"],"mappings":";;;;;;;AASA;;AACA;;;;AAVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA,IAAI,CAACA,qBAAL,EAAiB;AACf,QAAM,IAAIC,KAAJ,CAAW;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8IARQ,CAAN;AASD;AAED;AACA;AACA;AACA;;;AACA,IAAIC,kBAA6C,GAAG,IAApD;eACe,EACb,GAAGF,qBADU;;AAEb,MAAIG,YAAJ,GAAuC;AACrC,QAAI,CAACD,kBAAL,EAAyB;AACvB;AACA;AACAA,MAAAA,kBAAkB,GAAG,IAAIE,+BAAJ,CAAuBJ,qBAAvB,CAArB;AACD,KALoC,CAMrC;AACA;;;AACA,WAAOE,kBAAP;AACD;;AAXY,C","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\n\n// Produce an error if we don't have the native module\nif (!RNCNetInfo) {\n throw new Error(`@react-native-community/netinfo: NativeModule.RNCNetInfo is null. To fix this issue try these steps:\n\n• Run \\`react-native link @react-native-community/netinfo\\` in the project root.\n• Rebuild and re-run the app.\n• If you are using CocoaPods on iOS, run \\`pod install\\` in the \\`ios\\` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n• Check that the library was linked correctly when you used the link command by running through the manual installation instructions in the README.\n* If you are getting this error while unit testing you need to mock the native module. Follow the guide in the README.\n\nIf none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-netinfo`);\n}\n\n/**\n * We export the native interface in this way to give easy shared access to it between the\n * JavaScript code and the tests\n */\nlet nativeEventEmitter: NativeEventEmitter | null = null;\nexport default {\n ...RNCNetInfo,\n get eventEmitter(): NativeEventEmitter {\n if (!nativeEventEmitter) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n nativeEventEmitter = new NativeEventEmitter(RNCNetInfo);\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n return nativeEventEmitter;\n },\n};\n"]} -\ No newline at end of file -+{"version":3,"names":["_reactNative","require","_nativeModule","_interopRequireDefault","obj","__esModule","default","RNCNetInfo","Error","nativeEventEmitter","_default","exports","configure","addListener","removeListeners","getCurrentState","eventEmitter","NativeEventEmitter"],"sources":["nativeInterface.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\n\n// Produce an error if we don't have the native module\nif (!RNCNetInfo) {\n throw new Error(`@react-native-community/netinfo: NativeModule.RNCNetInfo is null. To fix this issue try these steps:\n\n• Run \\`react-native link @react-native-community/netinfo\\` in the project root.\n• Rebuild and re-run the app.\n• If you are using CocoaPods on iOS, run \\`pod install\\` in the \\`ios\\` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n• Check that the library was linked correctly when you used the link command by running through the manual installation instructions in the README.\n* If you are getting this error while unit testing you need to mock the native module. Follow the guide in the README.\n\nIf none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-netinfo`);\n}\n\n/**\n * We export the native interface in this way to give easy shared access to it between the\n * JavaScript code and the tests\n */\nlet nativeEventEmitter: NativeEventEmitter | null = null;\n\nexport default {\n configure: RNCNetInfo.configure,\n addListener: RNCNetInfo.addListener,\n removeListeners: RNCNetInfo.removeListeners,\n getCurrentState: RNCNetInfo.getCurrentState,\n get eventEmitter(): NativeEventEmitter {\n if (!nativeEventEmitter) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n nativeEventEmitter = new NativeEventEmitter(RNCNetInfo);\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n return nativeEventEmitter;\n },\n};\n"],"mappings":";;;;;;AASA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAwC,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAVxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACA,IAAI,CAACG,qBAAU,EAAE;EACf,MAAM,IAAIC,KAAK,CAAE;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8IAA8I,CAAC;AAC/I;;AAEA;AACA;AACA;AACA;AACA,IAAIC,kBAA6C,GAAG,IAAI;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAL,OAAA,GAE1C;EACbM,SAAS,EAAEL,qBAAU,CAACK,SAAS;EAC/BC,WAAW,EAAEN,qBAAU,CAACM,WAAW;EACnCC,eAAe,EAAEP,qBAAU,CAACO,eAAe;EAC3CC,eAAe,EAAER,qBAAU,CAACQ,eAAe;EAC3C,IAAIC,YAAYA,CAAA,EAAuB;IACrC,IAAI,CAACP,kBAAkB,EAAE;MACvB;MACA;MACAA,kBAAkB,GAAG,IAAIQ,+BAAkB,CAACV,qBAAU,CAAC;IACzD;IACA;IACA;IACA,OAAOE,kBAAkB;EAC3B;AACF,CAAC"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js -index 5e77388..d591606 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js -@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.default = void 0; -- - var _reactNative = require("react-native"); -- - var _nativeModule = _interopRequireDefault(require("./nativeModule")); -- - var _privateTypes = require("./privateTypes"); -- - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -- - /** - * Copyright (c) Facebook, Inc. and its affiliates. - * -@@ -21,14 +16,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de - * - * @format - */ --const nativeEventEmitter = new _reactNative.NativeEventEmitter(); // Listen to connectivity events - -+const nativeEventEmitter = new _reactNative.NativeEventEmitter(); -+ -+// Listen to connectivity events - _nativeModule.default.addListener(_privateTypes.DEVICE_CONNECTIVITY_EVENT, event => { - nativeEventEmitter.emit(_privateTypes.DEVICE_CONNECTIVITY_EVENT, event); - }); -- --var _default = { ..._nativeModule.default, -+var _default = exports.default = { -+ ..._nativeModule.default, - eventEmitter: nativeEventEmitter - }; --exports.default = _default; - //# sourceMappingURL=nativeInterface.web.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js.map -index 9fc4a6d..9b6f4b4 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js.map -@@ -1 +1 @@ --{"version":3,"sources":["nativeInterface.web.ts"],"names":["nativeEventEmitter","NativeEventEmitter","RNCNetInfo","addListener","DEVICE_CONNECTIVITY_EVENT","event","emit","eventEmitter"],"mappings":";;;;;;;AASA;;AACA;;AACA;;;;AAXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA,MAAMA,kBAAkB,GAAG,IAAIC,+BAAJ,EAA3B,C,CAEA;;AACAC,sBAAWC,WAAX,CACEC,uCADF,EAEGC,KAAD,IAAiB;AACfL,EAAAA,kBAAkB,CAACM,IAAnB,CAAwBF,uCAAxB,EAAmDC,KAAnD;AACD,CAJH;;eAOe,EACb,GAAGH,qBADU;AAEbK,EAAAA,YAAY,EAAEP;AAFD,C","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\nimport {DEVICE_CONNECTIVITY_EVENT} from './privateTypes';\n\nconst nativeEventEmitter = new NativeEventEmitter();\n\n// Listen to connectivity events\nRNCNetInfo.addListener(\n DEVICE_CONNECTIVITY_EVENT,\n (event): void => {\n nativeEventEmitter.emit(DEVICE_CONNECTIVITY_EVENT, event);\n },\n);\n\nexport default {\n ...RNCNetInfo,\n eventEmitter: nativeEventEmitter,\n};\n"]} -\ No newline at end of file -+{"version":3,"names":["_reactNative","require","_nativeModule","_interopRequireDefault","_privateTypes","obj","__esModule","default","nativeEventEmitter","NativeEventEmitter","RNCNetInfo","addListener","DEVICE_CONNECTIVITY_EVENT","event","emit","_default","exports","eventEmitter"],"sources":["nativeInterface.web.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\nimport {DEVICE_CONNECTIVITY_EVENT} from './privateTypes';\n\nconst nativeEventEmitter = new NativeEventEmitter();\n\n// Listen to connectivity events\nRNCNetInfo.addListener(DEVICE_CONNECTIVITY_EVENT, (event): void => {\n nativeEventEmitter.emit(DEVICE_CONNECTIVITY_EVENT, event);\n});\n\nexport default {\n ...RNCNetInfo,\n eventEmitter: nativeEventEmitter,\n};\n"],"mappings":";;;;;;AASA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AAAyD,SAAAE,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAXzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA,MAAMG,kBAAkB,GAAG,IAAIC,+BAAkB,CAAC,CAAC;;AAEnD;AACAC,qBAAU,CAACC,WAAW,CAACC,uCAAyB,EAAGC,KAAK,IAAW;EACjEL,kBAAkB,CAACM,IAAI,CAACF,uCAAyB,EAAEC,KAAK,CAAC;AAC3D,CAAC,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,CAAAT,OAAA,GAEY;EACb,GAAGG,qBAAU;EACbO,YAAY,EAAET;AAChB,CAAC"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js -index 8fd237d..6d06932 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js -@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.default = void 0; -- - var _reactNative = require("react-native"); -- - /** - * Copyright (c) Facebook, Inc. and its affiliates. - * -@@ -15,7 +13,15 @@ var _reactNative = require("react-native"); - * - * @format - */ --const RNCNetInfo = _reactNative.NativeModules.RNCNetInfo; --var _default = RNCNetInfo; --exports.default = _default; -+ -+// React Native sets `__turboModuleProxy` on global when TurboModules are enabled. -+// Currently, this is the recommended way to detect TurboModules. -+// https://reactnative.dev/docs/the-new-architecture/backward-compatibility-turbomodules#unify-the-javascript-specs -+// eslint-disable-next-line @typescript-eslint/ban-ts-comment -+// @ts-ignore -+const isTurboModuleEnabled = global.__turboModuleProxy != null; -+const RNCNetInfo = isTurboModuleEnabled ? -+// eslint-disable-next-line @typescript-eslint/no-var-requires -+require('./NativeRNCNetInfo').default : _reactNative.NativeModules.RNCNetInfo; -+var _default = exports.default = RNCNetInfo; - //# sourceMappingURL=nativeModule.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js.map -index dcf6159..5d5bb50 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js.map -@@ -1 +1 @@ --{"version":3,"sources":["nativeModule.ts"],"names":["RNCNetInfo","NativeModules"],"mappings":";;;;;;;AASA;;AATA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA,MAAMA,UAA+B,GAAGC,2BAAcD,UAAtD;eAEeA,U","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeModules} from 'react-native';\nimport {NetInfoNativeModule} from './privateTypes';\n\nconst RNCNetInfo: NetInfoNativeModule = NativeModules.RNCNetInfo;\n\nexport default RNCNetInfo;\n"]} -\ No newline at end of file -+{"version":3,"names":["_reactNative","require","isTurboModuleEnabled","global","__turboModuleProxy","RNCNetInfo","default","NativeModules","_default","exports"],"sources":["nativeModule.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeModules} from 'react-native';\nimport {NetInfoNativeModule} from './privateTypes';\n\n// React Native sets `__turboModuleProxy` on global when TurboModules are enabled.\n// Currently, this is the recommended way to detect TurboModules.\n// https://reactnative.dev/docs/the-new-architecture/backward-compatibility-turbomodules#unify-the-javascript-specs\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst isTurboModuleEnabled = global.__turboModuleProxy != null;\n\nconst RNCNetInfo: NetInfoNativeModule = isTurboModuleEnabled\n ? // eslint-disable-next-line @typescript-eslint/no-var-requires\n require('./NativeRNCNetInfo').default\n : NativeModules.RNCNetInfo;\n\nexport default RNCNetInfo;\n"],"mappings":";;;;;;AASA,IAAAA,YAAA,GAAAC,OAAA;AATA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA,MAAMC,oBAAoB,GAAGC,MAAM,CAACC,kBAAkB,IAAI,IAAI;AAE9D,MAAMC,UAA+B,GAAGH,oBAAoB;AACxD;AACAD,OAAO,CAAC,oBAAoB,CAAC,CAACK,OAAO,GACrCC,0BAAa,CAACF,UAAU;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAH,OAAA,GAEdD,UAAU"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js -index ad66cbe..0da582c 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js -@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.default = void 0; -- - var _privateTypes = require("./privateTypes"); -- - var _types = require("./types"); -- - /** - * Copyright (c) Facebook, Inc. and its affiliates. - * -@@ -17,12 +14,23 @@ var _types = require("./types"); - * - * @format - */ -+ -+// See https://wicg.github.io/netinfo/#dom-connectiontype -+ -+// See https://wicg.github.io/netinfo/#dom-effectiveconnectiontype -+ -+// https://wicg.github.io/netinfo/#dom-networkinformation-savedata -+ -+// Create (optional) connection APIs on navigator -+ - // Use a constant test of this form because in SSR on next.js, optional chaining is not sufficient, - // but this test correctly detects that window is not available and allows for conditionals before access --const isWindowPresent = typeof window !== 'undefined'; // Check if window exists and if the browser supports the connection API -+const isWindowPresent = typeof window !== 'undefined'; - --const connection = isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS') ? window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection : undefined; // Map browser types to native types -+// Check if window exists and if the browser supports the connection API -+const connection = isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS') ? window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection : undefined; - -+// Map browser types to native types - const typeMapping = { - bluetooth: _types.NetInfoStateType.bluetooth, - cellular: _types.NetInfoStateType.cellular, -@@ -39,17 +47,20 @@ const effectiveTypeMapping = { - '3g': _types.NetInfoCellularGeneration['3g'], - '4g': _types.NetInfoCellularGeneration['4g'], - 'slow-2g': _types.NetInfoCellularGeneration['2g'] --}; // Determine current state of connection -+}; - -+// Determine current state of connection - const getCurrentState = _requestedInterface => { - const isConnected = isWindowPresent ? navigator.onLine : false; - const baseState = { - isInternetReachable: null -- }; // If we don't have a connection object, we return minimal information -+ }; - -+ // If we don't have a connection object, we return minimal information - if (!connection) { - if (isConnected) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type: _types.NetInfoStateType.other, - details: { -@@ -58,22 +69,22 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } -- -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: false, - isInternetReachable: false, - type: _types.NetInfoStateType.none, - details: null - }; - return state; -- } // Otherwise try to return detailed information -- -+ } - -+ // Otherwise try to return detailed information - const isConnectionExpensive = connection.saveData; - const type = connection.type ? typeMapping[connection.type] : isConnected ? _types.NetInfoStateType.other : _types.NetInfoStateType.unknown; -- - if (type === _types.NetInfoStateType.bluetooth) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type, - details: { -@@ -82,7 +93,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === _types.NetInfoStateType.cellular) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type, - details: { -@@ -93,7 +105,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === _types.NetInfoStateType.ethernet) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type, - details: { -@@ -104,7 +117,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === _types.NetInfoStateType.wifi) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type, - details: { -@@ -122,7 +136,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === _types.NetInfoStateType.wimax) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type, - details: { -@@ -131,7 +146,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === _types.NetInfoStateType.none) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: false, - isInternetReachable: false, - type, -@@ -139,7 +155,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === _types.NetInfoStateType.unknown) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected, - isInternetReachable: null, - type, -@@ -147,8 +164,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } -- -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type: _types.NetInfoStateType.other, - details: { -@@ -157,7 +174,6 @@ const getCurrentState = _requestedInterface => { - }; - return state; - }; -- - const handlers = []; - const nativeHandlers = []; - const RNCNetInfo = { -@@ -168,7 +184,6 @@ const RNCNetInfo = { - const nativeHandler = () => { - handler(getCurrentState()); - }; -- - if (connection) { - connection.addEventListener('change', nativeHandler); - } else { -@@ -176,16 +191,15 @@ const RNCNetInfo = { - window.addEventListener('online', nativeHandler, false); - window.addEventListener('offline', nativeHandler, false); - } -- } // Remember handlers -- -+ } - -+ // Remember handlers - handlers.push(handler); - nativeHandlers.push(nativeHandler); - break; - } - } - }, -- - removeListeners(type, handler) { - switch (type) { - case _privateTypes.DEVICE_CONNECTIVITY_EVENT: -@@ -193,7 +207,6 @@ const RNCNetInfo = { - // Get native handler - const index = handlers.indexOf(handler); - const nativeHandler = nativeHandlers[index]; -- - if (connection) { - connection.removeEventListener('change', nativeHandler); - } else { -@@ -201,25 +214,21 @@ const RNCNetInfo = { - window.removeEventListener('online', nativeHandler); - window.removeEventListener('offline', nativeHandler); - } -- } // Remove handlers -- -+ } - -+ // Remove handlers - handlers.splice(index, 1); - nativeHandlers.splice(index, 1); - break; - } - } - }, -- - async getCurrentState(requestedInterface) { - return getCurrentState(requestedInterface); - }, -- - configure() { - return; - } -- - }; --var _default = RNCNetInfo; --exports.default = _default; -+var _default = exports.default = RNCNetInfo; - //# sourceMappingURL=nativeModule.web.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js.map -index 7dcfca9..a0632f9 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js.map -@@ -1 +1 @@ --{"version":3,"sources":["nativeModule.web.ts"],"names":["isWindowPresent","window","connection","hasOwnProperty","navigator","mozConnection","webkitConnection","undefined","typeMapping","bluetooth","NetInfoStateType","cellular","ethernet","none","other","unknown","wifi","wimax","mixed","effectiveTypeMapping","NetInfoCellularGeneration","getCurrentState","_requestedInterface","isConnected","onLine","baseState","isInternetReachable","state","type","details","isConnectionExpensive","saveData","cellularGeneration","effectiveType","carrier","ipAddress","subnet","ssid","bssid","strength","frequency","linkSpeed","rxLinkSpeed","txLinkSpeed","handlers","nativeHandlers","RNCNetInfo","addListener","handler","DEVICE_CONNECTIVITY_EVENT","nativeHandler","addEventListener","push","removeListeners","index","indexOf","removeEventListener","splice","requestedInterface","configure"],"mappings":";;;;;;;AASA;;AAKA;;AAdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAiEA;AACA;AACA,MAAMA,eAAe,GAAG,OAAOC,MAAP,KAAkB,WAA1C,C,CAEA;;AACA,MAAMC,UAAU,GAAIF,eAAe,IAAI,CAACC,MAAM,CAACE,cAAP,CAAsB,OAAtB,CAApB,IAAsD,CAACF,MAAM,CAACE,cAAP,CAAsB,OAAtB,CAAxD,GACfF,MAAM,CAACG,SAAP,CAAiBF,UAAjB,IACAD,MAAM,CAACG,SAAP,CAAiBC,aADjB,IAEAJ,MAAM,CAACG,SAAP,CA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K,GAAGV,QAAQ,CAACW,OAAT,CAAiBP,OAAjB,CAAd;AACA,gBAAME,aAAa,GAAGL,cAAc,CAACS,KAAD,CAApC;;AAEA,cAAIpD,UAAJ,EAAgB;AACdA,YAAAA,UAAU,CAACsD,mBAAX,CAA+B,QAA/B,EAAyCN,aAAzC;AACD,WAFD,MAEO;AACL,gBAAIlD,eAAJ,EAAqB;AACnBC,cAAAA,MAAM,CAACuD,mBAAP,CAA2B,QAA3B,EAAqCN,aAArC;AACAjD,cAAAA,MAAM,CAACuD,mBAAP,CAA2B,SAA3B,EAAsCN,aAAtC;AACD;AACF,WAZ6B,CAc9B;;;AACAN,UAAAA,QAAQ,CAACa,MAAT,CAAgBH,KAAhB,EAAuB,CAAvB;AACAT,UAAAA,cAAc,CAACY,MAAf,CAAsBH,KAAtB,EAA6B,CAA7B;AAEA;AACD;AApBH;AAsBD,GAjDqC;;AAmDtC,QAAMjC,eAAN,CAAsBqC,kBAAtB,EAA6E;AAC3E,WAAOrC,eAAe,CAACqC,kBAAD,CAAtB;AACD,GArDqC;;AAuDtCC,EAAAA,SAAS,GAAS;AAChB;AACD;;AAzDqC,CAAxC;eA4Deb,U","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {\n DEVICE_CONNECTIVITY_EVENT,\n NetInfoNativeModule,\n NetInfoNativeModuleState,\n} from './privateTypes';\nimport {\n NetInfoBluetoothState,\n NetInfoCellularGeneration,\n NetInfoCellularState,\n NetInfoEthernetState,\n NetInfoNoConnectionState,\n NetInfoOtherState,\n NetInfoState,\n NetInfoStateType,\n NetInfoUnknownState,\n NetInfoWifiState,\n NetInfoWimaxState,\n} from './types';\n\n// See https://wicg.github.io/netinfo/#dom-connectiontype\ntype ConnectionType =\n | 'bluetooth'\n | 'cellular'\n | 'ethernet'\n | 'mixed'\n | 'none'\n | 'other'\n | 'unknown'\n | 'wifi'\n | 'wimax';\n\n// See https://wicg.github.io/netinfo/#dom-effectiveconnectiontype\ntype ConnectionEffectiveType = '2g' | '3g' | '4g' | 'slow-2g';\n\n// https://wicg.github.io/netinfo/#dom-networkinformation-savedata\ntype ConnectionSaveData = boolean;\n\ninterface Events {\n change: Event;\n}\n\ninterface Connection {\n type: ConnectionType;\n effectiveType: ConnectionEffectiveType;\n saveData: ConnectionSaveData;\n addEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\n// Create (optional) connection APIs on navigator\ndeclare global {\n interface Navigator {\n connection?: Connection;\n mozConnection?: Connection;\n webkitConnection?: Connection;\n }\n}\n// Use a constant test of this form because in SSR on next.js, optional chaining is not sufficient,\n// but this test correctly detects that window is not available and allows for conditionals before access\nconst isWindowPresent = typeof window !== 'undefined';\n\n// Check if window exists and if the browser supports the connection API\nconst connection = (isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS'))\n ? window.navigator.connection ||\n window.navigator.mozConnection ||\n window.navigator.webkitConnection\n : undefined;\n\n// Map browser types to native types\nconst typeMapping: Record = {\n bluetooth: NetInfoStateType.bluetooth,\n cellular: NetInfoStateType.cellular,\n ethernet: NetInfoStateType.ethernet,\n none: NetInfoStateType.none,\n other: NetInfoStateType.other,\n unknown: NetInfoStateType.unknown,\n wifi: NetInfoStateType.wifi,\n wimax: NetInfoStateType.wimax,\n mixed: NetInfoStateType.other,\n};\nconst effectiveTypeMapping: Record<\n ConnectionEffectiveType,\n NetInfoCellularGeneration\n> = {\n '2g': NetInfoCellularGeneration['2g'],\n '3g': NetInfoCellularGeneration['3g'],\n '4g': NetInfoCellularGeneration['4g'],\n 'slow-2g': NetInfoCellularGeneration['2g'],\n};\n\n// Determine current state of connection\nconst getCurrentState = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _requestedInterface?: string,\n): Pick> => {\n const isConnected = isWindowPresent ? navigator.onLine : false;\n const baseState = {\n isInternetReachable: null,\n };\n\n // If we don't have a connection object, we return minimal information\n if (!connection) {\n if (isConnected) {\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive: false,\n },\n };\n return state;\n }\n\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type: NetInfoStateType.none,\n details: null,\n };\n return state;\n }\n\n // Otherwise try to return detailed information\n const isConnectionExpensive = connection.saveData;\n const type: NetInfoStateType = connection.type\n ? typeMapping[connection.type]\n : isConnected\n ? NetInfoStateType.other\n : NetInfoStateType.unknown;\n\n if (type === NetInfoStateType.bluetooth) {\n const state: NetInfoBluetoothState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.cellular) {\n const state: NetInfoCellularState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n cellularGeneration:\n effectiveTypeMapping[connection.effectiveType] || null,\n carrier: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.ethernet) {\n const state: NetInfoEthernetState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ipAddress: null,\n subnet: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wifi) {\n const state: NetInfoWifiState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ssid: null,\n bssid: null,\n strength: null,\n ipAddress: null,\n subnet: null,\n frequency: null,\n linkSpeed: null,\n rxLinkSpeed: null,\n txLinkSpeed: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wimax) {\n const state: NetInfoWimaxState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.none) {\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type,\n details: null,\n };\n return state;\n } else if (type === NetInfoStateType.unknown) {\n const state: NetInfoUnknownState = {\n ...baseState,\n isConnected,\n isInternetReachable: null,\n type,\n details: null,\n };\n return state;\n }\n\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n};\n\nconst handlers: ((state: NetInfoNativeModuleState) => void)[] = [];\nconst nativeHandlers: (() => void)[] = [];\n\nconst RNCNetInfo: NetInfoNativeModule = {\n addListener(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n const nativeHandler = (): void => {\n handler(getCurrentState());\n };\n\n if (connection) {\n connection.addEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.addEventListener('online', nativeHandler, false);\n window.addEventListener('offline', nativeHandler, false);\n }\n }\n\n // Remember handlers\n handlers.push(handler);\n nativeHandlers.push(nativeHandler);\n\n break;\n }\n }\n },\n\n removeListeners(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n // Get native handler\n const index = handlers.indexOf(handler);\n const nativeHandler = nativeHandlers[index];\n\n if (connection) {\n connection.removeEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.removeEventListener('online', nativeHandler);\n window.removeEventListener('offline', nativeHandler);\n }\n }\n\n // Remove handlers\n handlers.splice(index, 1);\n nativeHandlers.splice(index, 1);\n\n break;\n }\n }\n },\n\n async getCurrentState(requestedInterface): Promise {\n return getCurrentState(requestedInterface);\n },\n\n configure(): void {\n return;\n },\n};\n\nexport default RNCNetInfo;\n"]} -\ No newline at end of file -+{"version":3,"names":["_privateTypes","require","_types","isWindowPresent","window","connection","hasOwnProperty","navigator","mozConnection","webkitConnection","undefined","typeMapping","bluetooth","NetInfoStateType","cellular","ethernet","none","other","unknown","wifi","wimax","mixed","effectiveTypeMapping","NetInfoCellularGeneration","getCurrentState","_requestedInterface","isConnected","onLine","baseState","isInternetReachable","state","type","details","isConnectionExpensive","saveData","cellularGeneration","effectiveType","carrier","ipAddress","subnet","ssid","bssid","strength","frequency","linkSpeed","rxLinkSpeed","txLinkSpeed","handlers","nativeHandlers","RNCNetInfo","addListener","handler","DEVICE_CONNECTIVITY_EVENT","nativeHandler","addEventListener","push","removeListeners","index","indexOf","removeEventListener","splice","requestedInterface","configure","_default","exports","default"],"sources":["nativeModule.web.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {\n DEVICE_CONNECTIVITY_EVENT,\n NetInfoNativeModule,\n NetInfoNativeModuleState,\n} from './privateTypes';\nimport {\n NetInfoBluetoothState,\n NetInfoCellularGeneration,\n NetInfoCellularState,\n NetInfoEthernetState,\n NetInfoNoConnectionState,\n NetInfoOtherState,\n NetInfoState,\n NetInfoStateType,\n NetInfoUnknownState,\n NetInfoWifiState,\n NetInfoWimaxState,\n} from './types';\n\n// See https://wicg.github.io/netinfo/#dom-connectiontype\ntype ConnectionType =\n | 'bluetooth'\n | 'cellular'\n | 'ethernet'\n | 'mixed'\n | 'none'\n | 'other'\n | 'unknown'\n | 'wifi'\n | 'wimax';\n\n// See https://wicg.github.io/netinfo/#dom-effectiveconnectiontype\ntype ConnectionEffectiveType = '2g' | '3g' | '4g' | 'slow-2g';\n\n// https://wicg.github.io/netinfo/#dom-networkinformation-savedata\ntype ConnectionSaveData = boolean;\n\ninterface Events {\n change: Event;\n}\n\ninterface Connection {\n type: ConnectionType;\n effectiveType: ConnectionEffectiveType;\n saveData: ConnectionSaveData;\n addEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\n// Create (optional) connection APIs on navigator\ndeclare global {\n interface Navigator {\n connection?: Connection;\n mozConnection?: Connection;\n webkitConnection?: Connection;\n }\n}\n// Use a constant test of this form because in SSR on next.js, optional chaining is not sufficient,\n// but this test correctly detects that window is not available and allows for conditionals before access\nconst isWindowPresent = typeof window !== 'undefined';\n\n// Check if window exists and if the browser supports the connection API\nconst connection = (isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS'))\n ? window.navigator.connection ||\n window.navigator.mozConnection ||\n window.navigator.webkitConnection\n : undefined;\n\n// Map browser types to native types\nconst typeMapping: Record = {\n bluetooth: NetInfoStateType.bluetooth,\n cellular: NetInfoStateType.cellular,\n ethernet: NetInfoStateType.ethernet,\n none: NetInfoStateType.none,\n other: NetInfoStateType.other,\n unknown: NetInfoStateType.unknown,\n wifi: NetInfoStateType.wifi,\n wimax: NetInfoStateType.wimax,\n mixed: NetInfoStateType.other,\n};\nconst effectiveTypeMapping: Record<\n ConnectionEffectiveType,\n NetInfoCellularGeneration\n> = {\n '2g': NetInfoCellularGeneration['2g'],\n '3g': NetInfoCellularGeneration['3g'],\n '4g': NetInfoCellularGeneration['4g'],\n 'slow-2g': NetInfoCellularGeneration['2g'],\n};\n\n// Determine current state of connection\nconst getCurrentState = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _requestedInterface?: string,\n): Pick> => {\n const isConnected = isWindowPresent ? navigator.onLine : false;\n const baseState = {\n isInternetReachable: null,\n };\n\n // If we don't have a connection object, we return minimal information\n if (!connection) {\n if (isConnected) {\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive: false,\n },\n };\n return state;\n }\n\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type: NetInfoStateType.none,\n details: null,\n };\n return state;\n }\n\n // Otherwise try to return detailed information\n const isConnectionExpensive = connection.saveData;\n const type: NetInfoStateType = connection.type\n ? typeMapping[connection.type]\n : isConnected\n ? NetInfoStateType.other\n : NetInfoStateType.unknown;\n\n if (type === NetInfoStateType.bluetooth) {\n const state: NetInfoBluetoothState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.cellular) {\n const state: NetInfoCellularState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n cellularGeneration:\n effectiveTypeMapping[connection.effectiveType] || null,\n carrier: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.ethernet) {\n const state: NetInfoEthernetState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ipAddress: null,\n subnet: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wifi) {\n const state: NetInfoWifiState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ssid: null,\n bssid: null,\n strength: null,\n ipAddress: null,\n subnet: null,\n frequency: null,\n linkSpeed: null,\n rxLinkSpeed: null,\n txLinkSpeed: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wimax) {\n const state: NetInfoWimaxState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.none) {\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type,\n details: null,\n };\n return state;\n } else if (type === NetInfoStateType.unknown) {\n const state: NetInfoUnknownState = {\n ...baseState,\n isConnected,\n isInternetReachable: null,\n type,\n details: null,\n };\n return state;\n }\n\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n};\n\nconst handlers: ((state: NetInfoNativeModuleState) => void)[] = [];\nconst nativeHandlers: (() => void)[] = [];\n\nconst RNCNetInfo: NetInfoNativeModule = {\n addListener(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n const nativeHandler = (): void => {\n handler(getCurrentState());\n };\n\n if (connection) {\n connection.addEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.addEventListener('online', nativeHandler, false);\n window.addEventListener('offline', nativeHandler, false);\n }\n }\n\n // Remember handlers\n handlers.push(handler);\n nativeHandlers.push(nativeHandler);\n\n break;\n }\n }\n },\n\n removeListeners(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n // Get native handler\n const index = handlers.indexOf(handler);\n const nativeHandler = nativeHandlers[index];\n\n if (connection) {\n connection.removeEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.removeEventListener('online', nativeHandler);\n window.removeEventListener('offline', nativeHandler);\n }\n }\n\n // Remove handlers\n handlers.splice(index, 1);\n nativeHandlers.splice(index, 1);\n\n break;\n }\n }\n },\n\n async getCurrentState(requestedInterface): Promise {\n return getCurrentState(requestedInterface);\n },\n\n configure(): void {\n return;\n },\n};\n\nexport default RNCNetInfo;\n"],"mappings":";;;;;;AASA,IAAAA,aAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AAdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAqBA;;AAYA;;AAGA;;AAqBA;;AAQA;AACA;AACA,MAAME,eAAe,GAAG,OAAOC,MAAM,KAAK,WAAW;;AAErD;AACA,MAAMC,UAAU,GAAIF,eAAe,IAAI,CAACC,MAAM,CAACE,cAAc,CAAC,OAAO,CAAC,IAAI,CAACF,MAAM,CAACE,cAAc,CAAC,OAAO,CAAC,GACrGF,MAAM,CAACG,SAAS,CAACF,UAAU,IAC3BD,MAAM,CAACG,SAAS,CAACC,aAAa,IAC9BJ,MAAM,CAACG,SAAS,CAACE,gBAAgB,GACjCC,SAAS;;AAEb;AACA,MAAMC,WAAqD,GAAG;EAC5DC,SAAS,EAAEC,uBAAgB,CAACD,SAAS;EACrCE,QAAQ,EAAED,uBAAgB,CAACC,QAAQ;EACnCC,QAAQ,EAAEF,uBAAgB,CAACE,QAAQ;EACnCC,IAAI,EAAEH,uBAAgB,CAACG,IAAI;EAC3BC,KAAK,EAAEJ,uBAAgB,CAACI,KAAK;EAC7BC,OAAO,EAAEL,uBAAgB,CAACK,OAAO;EACjCC,IAAI,EAAEN,u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AC;cACvDjD,MAAM,CAACkD,gBAAgB,CAAC,SAAS,EAAED,aAAa,EAAE,KAAK,CAAC;YAC1D;UACF;;UAEA;UACAN,QAAQ,CAACQ,IAAI,CAACJ,OAAO,CAAC;UACtBH,cAAc,CAACO,IAAI,CAACF,aAAa,CAAC;UAElC;QACF;IACF;EACF,CAAC;EAEDG,eAAeA,CAACzB,IAAI,EAAEoB,OAAO,EAAQ;IACnC,QAAQpB,IAAI;MACV,KAAKqB,uCAAyB;QAAE;UAC9B;UACA,MAAMK,KAAK,GAAGV,QAAQ,CAACW,OAAO,CAACP,OAAO,CAAC;UACvC,MAAME,aAAa,GAAGL,cAAc,CAACS,KAAK,CAAC;UAE3C,IAAIpD,UAAU,EAAE;YACdA,UAAU,CAACsD,mBAAmB,CAAC,QAAQ,EAAEN,aAAa,CAAC;UACzD,CAAC,MAAM;YACL,IAAIlD,eAAe,EAAE;cACnBC,MAAM,CAACuD,mBAAmB,CAAC,QAAQ,EAAEN,aAAa,CAAC;cACnDjD,MAAM,CAACuD,mBAAmB,CAAC,SAAS,EAAEN,aAAa,CAAC;YACtD;UACF;;UAEA;UACAN,QAAQ,CAACa,MAAM,CAACH,KAAK,EAAE,CAAC,CAAC;UACzBT,cAAc,CAACY,MAAM,CAACH,KAAK,EAAE,CAAC,CAAC;UAE/B;QACF;IACF;EACF,CAAC;EAED,MAAMjC,eAAeA,CAACqC,kBAAkB,EAAqC;IAC3E,OAAOrC,eAAe,CAACqC,kBAAkB,CAAC;EAC5C,CAAC;EAEDC,SAASA,CAAA,EAAS;IAChB;EACF;AACF,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEahB,UAAU"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js -index 3112de1..ca209c1 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js -@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.DEVICE_CONNECTIVITY_EVENT = void 0; -- - /** - * Copyright (c) Facebook, Inc. and its affiliates. - * -@@ -13,7 +12,8 @@ exports.DEVICE_CONNECTIVITY_EVENT = void 0; - * - * @format - */ --const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange'; // Certain properties are optional when sent by the native module and are handled by the JS code - --exports.DEVICE_CONNECTIVITY_EVENT = DEVICE_CONNECTIVITY_EVENT; -+const DEVICE_CONNECTIVITY_EVENT = exports.DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange'; -+ -+// Certain properties are optional when sent by the native module and are handled by the JS code - //# sourceMappingURL=privateTypes.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js.map -index 2838e9a..a56f61c 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js.map -@@ -1 +1 @@ --{"version":3,"sources":["privateTypes.ts"],"names":["DEVICE_CONNECTIVITY_EVENT"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIO,MAAMA,yBAAyB,GAAG,gCAAlC,C,CAEP","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NetInfoConfiguration, NetInfoState} from './types';\n\nexport const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange';\n\n// Certain properties are optional when sent by the native module and are handled by the JS code\nexport type NetInfoNativeModuleState = Pick<\n NetInfoState,\n Exclude\n> & {isInternetReachable?: boolean};\n\nexport interface Events {\n [DEVICE_CONNECTIVITY_EVENT]: NetInfoNativeModuleState;\n}\n\nexport interface NetInfoNativeModule {\n configure: (config: Partial) => void;\n getCurrentState: (\n requestedInterface?: string,\n ) => Promise;\n addListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeListeners(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\nexport type NetInfoInternetReachabilityChangeListener = (\n isInternetReachable: boolean | null | undefined,\n) => void;\n"]} -\ No newline at end of file -+{"version":3,"names":["DEVICE_CONNECTIVITY_EVENT","exports"],"sources":["privateTypes.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NetInfoConfiguration, NetInfoState} from './types';\n\nexport const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange';\n\n// Certain properties are optional when sent by the native module and are handled by the JS code\nexport type NetInfoNativeModuleState = Pick<\n NetInfoState,\n Exclude\n> & {isInternetReachable?: boolean};\n\nexport interface Events {\n [DEVICE_CONNECTIVITY_EVENT]: NetInfoNativeModuleState;\n}\n\nexport interface NetInfoNativeModule {\n configure: (config: Partial) => void;\n getCurrentState: (\n requestedInterface?: string,\n ) => Promise;\n addListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeListeners(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\nexport type NetInfoInternetReachabilityChangeListener = (\n isInternetReachable: boolean | null | undefined,\n) => void;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIO,MAAMA,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,gCAAgC;;AAEzE"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js -index 80dce38..57b8fbf 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js -@@ -4,84 +4,73 @@ Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.default = void 0; -- - var _nativeInterface = _interopRequireDefault(require("./nativeInterface")); -- - var _internetReachability = _interopRequireDefault(require("./internetReachability")); -- - var PrivateTypes = _interopRequireWildcard(require("./privateTypes")); -- --function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -- --function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -- -+function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } -+function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -- --function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -- -+function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -+function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -+function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /** -+ * Copyright (c) Facebook, Inc. and its affiliates. -+ * -+ * This source code is licensed under the MIT license found in the -+ * LICENSE file in the root directory of this source tree. -+ * -+ * @format -+ */ - class State { - constructor(configuration) { - _defineProperty(this, "_nativeEventSubscription", null); -- - _defineProperty(this, "_subscriptions", new Set()); -- - _defineProperty(this, "_latestState", null); -- - _defineProperty(this, "_internetReachability", void 0); -- - _defineProperty(this, "_handleNativeStateUpdate", state => { - // Update the internet reachability module -- this._internetReachability.update(state); // Convert the state from native to JS shape -- -- -- const convertedState = this._convertState(state); // Update the listeners -+ this._internetReachability.update(state); - -+ // Convert the state from native to JS shape -+ const convertedState = this._convertState(state); - -+ // Update the listeners - this._latestState = convertedState; -- - this._subscriptions.forEach(handler => handler(convertedState)); - }); -- - _defineProperty(this, "_handleInternetReachabilityUpdate", isInternetReachable => { - if (!this._latestState) { - return; - } -- -- const nextState = { ...this._latestState, -+ const nextState = { -+ ...this._latestState, - isInternetReachable - }; - this._latestState = nextState; -- - this._subscriptions.forEach(handler => handler(nextState)); - }); -- - _defineProperty(this, "_fetchCurrentState", async requestedInterface => { -- const state = await _nativeInterface.default.getCurrentState(requestedInterface); // Update the internet reachability module -- -- this._internetReachability.update(state); // Convert and store the new state -- -+ const state = await _nativeInterface.default.getCurrentState(requestedInterface); - -+ // Update the internet reachability module -+ this._internetReachability.update(state); -+ // Convert and store the new state - const convertedState = this._convertState(state); -- - if (!requestedInterface) { - this._latestState = convertedState; -- - this._subscriptions.forEach(handler => handler(convertedState)); - } -- - return convertedState; - }); -- - _defineProperty(this, "_convertState", input => { - if (typeof input.isInternetReachable === 'boolean') { - return input; - } else { -- return { ...input, -+ return { -+ ...input, - isInternetReachable: this._internetReachability.currentState() - }; - } - }); -- - _defineProperty(this, "latest", requestedInterface => { - if (requestedInterface) { - return this._fetchCurrentState(requestedInterface); -@@ -91,44 +80,38 @@ class State { - return this._fetchCurrentState(); - } - }); -- - _defineProperty(this, "add", handler => { - // Add the subscription handler to our set -- this._subscriptions.add(handler); // Send it the latest data we have -- -+ this._subscriptions.add(handler); - -+ // Send it the latest data we have - if (this._latestState) { - handler(this._latestState); - } else { - this.latest().then(handler); - } - }); -- - _defineProperty(this, "remove", handler => { - this._subscriptions.delete(handler); - }); -- - _defineProperty(this, "tearDown", () => { - if (this._internetReachability) { - this._internetReachability.tearDown(); - } -- - if (this._nativeEventSubscription) { - this._nativeEventSubscription.remove(); - } -- - this._subscriptions.clear(); - }); -- - // Add the listener to the internet connectivity events -- this._internetReachability = new _internetReachability.default(configuration, this._handleInternetReachabilityUpdate); // Add the subscription to the native events -+ this._internetReachability = new _internetReachability.default(configuration, this._handleInternetReachabilityUpdate); - -- this._nativeEventSubscription = _nativeInterface.default.eventEmitter.addListener(PrivateTypes.DEVICE_CONNECTIVITY_EVENT, this._handleNativeStateUpdate); // Fetch the current state from the native module -+ // Add the subscription to the native events -+ this._nativeEventSubscription = _nativeInterface.default.eventEmitter.addListener(PrivateTypes.DEVICE_CONNECTIVITY_EVENT, this._handleNativeStateUpdate); - -+ // Fetch the current state from the native module - this._fetchCurrentState(); - } -- - } -- - exports.default = State; - //# sourceMappingURL=state.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js.map -index 40ae85c..473e940 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js.map -@@ -1 +1 @@ --{"version":3,"sources":["state.ts"],"names":["State","constructor","configuration","Set","state","_internetReachability","update","convertedState","_convertState","_latestState","_subscriptions","forEach","handler","isInternetReachable","nextState","requestedInterface","NativeInterface","getCurrentState","input","currentState","_fetchCurrentState","Promise","resolve","add","latest","then","delete","tearDown","_nativeEventSubscription","remove","clear","InternetReachability","_handleInternetReachabilityUpdate","eventEmitter","addListener","PrivateTypes","DEVICE_CONNECTIVITY_EVENT","_handleNativeStateUpdate"],"mappings":";;;;;;;AAUA;;AACA;;AAEA;;;;;;;;;;AAEe,MAAMA,KAAN,CAAY;AAMzBC,EAAAA,WAAW,CAACC,aAAD,EAA4C;AAAA,sDALY,IAKZ;;AAAA,4CAJ9B,IAAIC,GAAJ,EAI8B;;AAAA,0CAHL,IAGK;;AAAA;;AAAA,sDAkBrDC,KADiC,IAExB;AACT;AACA,WAAKC,qBAAL,CAA2BC,MAA3B,CAAkCF,KAAlC,EAFS,CAIT;;;AACA,YAAMG,cAAc,GAAG,KAAKC,aAAL,CAAmBJ,KAAnB,CAAvB,CALS,CAOT;;;AACA,WAAKK,YAAL,GAAoBF,cAApB;;AACA,WAAKG,cAAL,CAAoBC,OAApB,CAA6BC,OAAD,IAAmBA,OAAO,CAACL,cAAD,CAAtD;AACD,KA7BsD;;AAAA,+DAgCrDM,mBAD0C,IAEjC;AACT,UAAI,CAAC,KAAKJ,YAAV,EAAwB;AACtB;AACD;;AAED,YAAMK,SAAS,GAAG,EAChB,GAAG,KAAKL,YADQ;AAEhBI,QAAAA;AAFgB,OAAlB;AAIA,WAAKJ,YAAL,GAAoBK,SAAp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AN,CAAP;AACD,OAFD,MAEO;AACL,aAAKe,MAAL,GAAcC,IAAd,CAAmBb,OAAnB;AACD;AACF,KAlGsD;;AAAA,oCAoGtCA,OAAD,IAA+C;AAC7D,WAAKF,cAAL,CAAoBgB,MAApB,CAA2Bd,OAA3B;AACD,KAtGsD;;AAAA,sCAwGrC,MAAY;AAC5B,UAAI,KAAKP,qBAAT,EAAgC;AAC9B,aAAKA,qBAAL,CAA2BsB,QAA3B;AACD;;AAED,UAAI,KAAKC,wBAAT,EAAmC;AACjC,aAAKA,wBAAL,CAA8BC,MAA9B;AACD;;AAED,WAAKnB,cAAL,CAAoBoB,KAApB;AACD,KAlHsD;;AACrD;AACA,SAAKzB,qBAAL,GAA6B,IAAI0B,6BAAJ,CAC3B7B,aAD2B,EAE3B,KAAK8B,iCAFsB,CAA7B,CAFqD,CAOrD;;AACA,SAAKJ,wBAAL,GAAgCZ,yBAAgBiB,YAAhB,CAA6BC,WAA7B,CAC9BC,YAAY,CAACC,yBADiB,EAE9B,KAAKC,wBAFyB,CAAhC,CARqD,CAarD;;AACA,SAAKjB,kBAAL;AACD;;AArBwB","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventSubscription} from 'react-native';\nimport NativeInterface from './nativeInterface';\nimport InternetReachability from './internetReachability';\nimport * as Types from './types';\nimport * as PrivateTypes from './privateTypes';\n\nexport default class State {\n private _nativeEventSubscription: NativeEventSubscription | null = null;\n private _subscriptions = new Set();\n private _latestState: Types.NetInfoState | null = null;\n private _internetReachability: InternetReachability;\n\n constructor(configuration: Types.NetInfoConfiguration) {\n // Add the listener to the internet connectivity events\n this._internetReachability = new InternetReachability(\n configuration,\n this._handleInternetReachabilityUpdate,\n );\n\n // Add the subscription to the native events\n this._nativeEventSubscription = NativeInterface.eventEmitter.addListener(\n PrivateTypes.DEVICE_CONNECTIVITY_EVENT,\n this._handleNativeStateUpdate,\n );\n\n // Fetch the current state from the native module\n this._fetchCurrentState();\n }\n\n private _handleNativeStateUpdate = (\n state: PrivateTypes.NetInfoNativeModuleState,\n ): void => {\n // Update the internet reachability module\n this._internetReachability.update(state);\n\n // Convert the state from native to JS shape\n const convertedState = this._convertState(state);\n\n // Update the listeners\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n };\n\n private _handleInternetReachabilityUpdate = (\n isInternetReachable: boolean | null | undefined,\n ): void => {\n if (!this._latestState) {\n return;\n }\n\n const nextState = {\n ...this._latestState,\n isInternetReachable,\n } as Types.NetInfoState;\n this._latestState = nextState;\n this._subscriptions.forEach((handler): void => handler(nextState));\n };\n\n public _fetchCurrentState = async (\n requestedInterface?: string,\n ): Promise => {\n const state = await NativeInterface.getCurrentState(requestedInterface);\n\n // Update the internet reachability module\n this._internetReachability.update(state);\n // Convert and store the new state\n const convertedState = this._convertState(state);\n if (!requestedInterface) {\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n }\n\n return convertedState;\n };\n\n private _convertState = (\n input: PrivateTypes.NetInfoNativeModuleState,\n ): Types.NetInfoState => {\n if (typeof input.isInternetReachable === 'boolean') {\n return input as Types.NetInfoState;\n } else {\n return {\n ...input,\n isInternetReachable: this._internetReachability.currentState(),\n } as Types.NetInfoState;\n }\n };\n\n public latest = (\n requestedInterface?: string,\n ): Promise => {\n if (requestedInterface) {\n return this._fetchCurrentState(requestedInterface);\n } else if (this._latestState) {\n return Promise.resolve(this._latestState);\n } else {\n return this._fetchCurrentState();\n }\n };\n\n public add = (handler: Types.NetInfoChangeHandler): void => {\n // Add the subscription handler to our set\n this._subscriptions.add(handler);\n\n // Send it the latest data we have\n if (this._latestState) {\n handler(this._latestState);\n } else {\n this.latest().then(handler);\n }\n };\n\n public remove = (handler: Types.NetInfoChangeHandler): void => {\n this._subscriptions.delete(handler);\n };\n\n public tearDown = (): void => {\n if (this._internetReachability) {\n this._internetReachability.tearDown();\n }\n\n if (this._nativeEventSubscription) {\n this._nativeEventSubscription.remove();\n }\n\n this._subscriptions.clear();\n };\n}\n"]} -\ No newline at end of file -+{"version":3,"names":["_nativeInterface","_interopRequireDefault","require","_internetReachability","PrivateTypes","_interopRequireWildcard","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","_defineProperty","key","value","_toPropertyKey","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","State","constructor","configuration","Set","state","update","convertedState","_convertState","_latestState","_subscriptions","forEach","handler","isInternetReachable","nextState","requestedInterface","NativeInterface","getCurrentState","currentState","_fetchCurrentState","Promise","resolve","add","latest","then","delete","tearDown","_nativeEventSubscription","remove","clear","InternetReachability","_handleInternetReachabilityUpdate","eventEmitter","addListener","DEVICE_CONNECTIVITY_EVENT","_handleNativeStateUpdate","exports"],"sources":["state.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventSubscription} from 'react-native';\nimport NativeInterface from './nativeInterface';\nimport InternetReachability from './internetReachability';\nimport * as Types from './types';\nimport * as PrivateTypes from './privateTypes';\n\nexport default class State {\n private _nativeEventSubscription: NativeEventSubscription | null = null;\n private _subscriptions = new Set();\n private _latestState: Types.NetInfoState | null = null;\n private _internetReachability: InternetReachability;\n\n constructor(configuration: Types.NetInfoConfiguration) {\n // Add the listener to the internet connectivity events\n this._internetReachability = new InternetReachability(\n configuration,\n this._handleInternetReachabilityUpdate,\n );\n\n // Add the subscription to the native events\n this._nativeEventSubscription = NativeInterface.eventEmitter.addListener(\n PrivateTypes.DEVICE_CONNECTIVITY_EVENT,\n this._handleNativeStateUpdate,\n );\n\n // Fetch the current state from the native module\n this._fetchCurrentState();\n }\n\n private _handleNativeStateUpdate = (\n state: PrivateTypes.NetInfoNativeModuleState,\n ): void => {\n // Update the internet reachability module\n this._internetReachability.update(state);\n\n // Convert the state from native to JS shape\n const convertedState = this._convertState(state);\n\n // Update the listeners\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n };\n\n private _handleInternetReachabilityUpdate = (\n isInternetReachable: boolean | null | undefined,\n ): void => {\n if (!this._latestState) {\n return;\n }\n\n const nextState = {\n ...this._latestState,\n isInternetReachable,\n } as Types.NetInfoState;\n this._latestState = nextState;\n this._subscriptions.forEach((handler): void => handler(nextState));\n };\n\n public _fetchCurrentState = async (\n requestedInterface?: string,\n ): Promise => {\n const state = await NativeInterface.getCurrentState(requestedInterface);\n\n // Update the internet reachability module\n this._internetReachability.update(state);\n // Convert and store the new state\n const convertedState = this._convertState(state);\n if (!requestedInterface) {\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n }\n\n return convertedState;\n };\n\n private _convertState = (\n input: PrivateTypes.NetInfoNativeModuleState,\n ): Types.NetInfoState => {\n if (typeof input.isInternetReachable === 'boolean') {\n return input as Types.NetInfoState;\n } else {\n return {\n ...input,\n isInternetReachable: this._internetReachability.currentState(),\n } as Types.NetInfoState;\n }\n };\n\n public latest = (\n requestedInterface?: string,\n ): Promise => {\n if (requestedInterface) {\n return this._fetchCurrentState(requestedInterface);\n } else if (this._latestState) {\n return Promise.resolve(this._latestState);\n } else {\n return this._fetchCurrentState();\n }\n };\n\n public add = (handler: Types.NetInfoChangeHandler): void => {\n // Add the subscription handler to our set\n this._subscriptions.add(handler);\n\n // Send it the latest data we have\n if (this._latestState) {\n handler(this._latestState);\n } else {\n this.latest().then(handler);\n }\n };\n\n public remove = (handler: Types.NetInfoChangeHandler): void => {\n this._subscriptions.delete(handler);\n };\n\n public tearDown = (): void => {\n if (this._internetReachability) {\n this._internetReachability.tearDown();\n }\n\n if (this._nativeEventSubscription) {\n this._nativeEventSubscription.remove();\n }\n\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CAAC,CAAC;EAC3B;AAoGF;AAACiB,OAAA,CAAAtE,OAAA,GAAAmC,KAAA"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js -index 39e4871..92824aa 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js -@@ -3,8 +3,7 @@ - Object.defineProperty(exports, "__esModule", { - value: true - }); --exports.NetInfoCellularGeneration = exports.NetInfoStateType = void 0; -- -+exports.NetInfoStateType = exports.NetInfoCellularGeneration = void 0; - /** - * Copyright (c) Facebook, Inc. and its affiliates. - * -@@ -13,10 +12,7 @@ exports.NetInfoCellularGeneration = exports.NetInfoStateType = void 0; - * - * @format - */ --let NetInfoStateType; --exports.NetInfoStateType = NetInfoStateType; -- --(function (NetInfoStateType) { -+let NetInfoStateType = exports.NetInfoStateType = /*#__PURE__*/function (NetInfoStateType) { - NetInfoStateType["unknown"] = "unknown"; - NetInfoStateType["none"] = "none"; - NetInfoStateType["cellular"] = "cellular"; -@@ -26,15 +22,13 @@ exports.NetInfoStateType = NetInfoStateType; - NetInfoStateType["wimax"] = "wimax"; - NetInfoStateType["vpn"] = "vpn"; - NetInfoStateType["other"] = "other"; --})(NetInfoStateType || (exports.NetInfoStateType = NetInfoStateType = {})); -- --let NetInfoCellularGeneration; --exports.NetInfoCellularGeneration = NetInfoCellularGeneration; -- --(function (NetInfoCellularGeneration) { -+ return NetInfoStateType; -+}({}); -+let NetInfoCellularGeneration = exports.NetInfoCellularGeneration = /*#__PURE__*/function (NetInfoCellularGeneration) { - NetInfoCellularGeneration["2g"] = "2g"; - NetInfoCellularGeneration["3g"] = "3g"; - NetInfoCellularGeneration["4g"] = "4g"; - NetInfoCellularGeneration["5g"] = "5g"; --})(NetInfoCellularGeneration || (exports.NetInfoCellularGeneration = NetInfoCellularGeneration = {})); -+ return NetInfoCellularGeneration; -+}({}); - //# sourceMappingURL=types.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js.map -index 095dd3b..596ace1 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js.map -@@ -1 +1 @@ --{"version":3,"sources":["types.ts"],"names":["NetInfoStateType","NetInfoCellularGeneration"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IAEYA,gB;;;WAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;GAAAA,gB,gCAAAA,gB;;IAcAC,yB;;;WAAAA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;GAAAA,yB,yCAAAA,yB","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nexport enum NetInfoStateType {\n unknown = 'unknown',\n none = 'none',\n cellular = 'cellular',\n wifi = 'wifi',\n bluetooth = 'bluetooth',\n ethernet = 'ethernet',\n wimax = 'wimax',\n vpn = 'vpn',\n other = 'other',\n}\n\nexport type NetInfoMethodType = 'HEAD' | 'GET';\n\nexport enum NetInfoCellularGeneration {\n '2g' = '2g',\n '3g' = '3g',\n '4g' = '4g',\n '5g' = '5g',\n}\n\nexport interface NetInfoConnectedDetails {\n isConnectionExpensive: boolean;\n}\n\ninterface NetInfoConnectedState<\n T extends NetInfoStateType,\n D extends Record = Record\n> {\n type: T;\n isConnected: true;\n isInternetReachable: boolean | null;\n details: D & NetInfoConnectedDetails;\n isWifiEnabled?: boolean;\n}\n\ninterface NetInfoDisconnectedState {\n type: T;\n isConnected: false;\n isInternetReachable: false;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport interface NetInfoUnknownState {\n type: NetInfoStateType.unknown;\n isConnected: boolean | null;\n isInternetReachable: null;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport type NetInfoNoConnectionState = NetInfoDisconnectedState<\n NetInfoStateType.none\n>;\nexport type NetInfoDisconnectedStates =\n | NetInfoUnknownState\n | NetInfoNoConnectionState;\n\nexport type NetInfoCellularState = NetInfoConnectedState<\n NetInfoStateType.cellular,\n {\n cellularGeneration: NetInfoCellularGeneration | null;\n carrier: string | null;\n }\n>;\nexport type NetInfoWifiState = NetInfoConnectedState<\n NetInfoStateType.wifi,\n {\n ssid: string | null;\n bssid: string | null;\n strength: number | null;\n ipAddress: string | null;\n subnet: string | null;\n frequency: number | null;\n linkSpeed: number | null;\n rxLinkSpeed: number | null;\n txLinkSpeed: number | null;\n }\n>;\nexport type NetInfoBluetoothState = NetInfoConnectedState<\n NetInfoStateType.bluetooth\n>;\nexport type NetInfoEthernetState = NetInfoConnectedState<\n NetInfoStateType.ethernet,\n {\n ipAddress: string | null;\n subnet: string | null;\n }\n>;\nexport type NetInfoWimaxState = NetInfoConnectedState;\nexport type NetInfoVpnState = NetInfoConnectedState;\nexport type NetInfoOtherState = NetInfoConnectedState;\nexport type NetInfoConnectedStates =\n | NetInfoCellularState\n | NetInfoWifiState\n | NetInfoBluetoothState\n | NetInfoEthernetState\n | NetInfoWimaxState\n | NetInfoVpnState\n | NetInfoOtherState;\n\nexport type NetInfoState = NetInfoDisconnectedStates | NetInfoConnectedStates;\n\nexport type NetInfoChangeHandler = (state: NetInfoState) => void;\nexport type NetInfoSubscription = () => void;\n\nexport interface NetInfoConfiguration {\n reachabilityUrl: string;\n reachabilityMethod?: NetInfoMethodType;\n reachabilityHeaders?: Record;\n reachabilityTest: (response: Response) => Promise;\n reachabilityLongTimeout: number;\n reachabilityShortTimeout: number;\n reachabilityRequestTimeout: number;\n reachabilityShouldRun: () => boolean;\n shouldFetchWiFiSSID: boolean;\n useNativeReachability: boolean;\n}\n"]} -\ No newline at end of file -+{"version":3,"names":["NetInfoStateType","exports","NetInfoCellularGeneration"],"sources":["types.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nexport enum NetInfoStateType {\n unknown = 'unknown',\n none = 'none',\n cellular = 'cellular',\n wifi = 'wifi',\n bluetooth = 'bluetooth',\n ethernet = 'ethernet',\n wimax = 'wimax',\n vpn = 'vpn',\n other = 'other',\n}\n\nexport type NetInfoMethodType = 'HEAD' | 'GET';\n\nexport enum NetInfoCellularGeneration {\n '2g' = '2g',\n '3g' = '3g',\n '4g' = '4g',\n '5g' = '5g',\n}\n\nexport interface NetInfoConnectedDetails {\n isConnectionExpensive: boolean;\n}\n\ninterface NetInfoConnectedState<\n T extends NetInfoStateType,\n D extends Record = Record,\n> {\n type: T;\n isConnected: true;\n isInternetReachable: boolean | null;\n details: D & NetInfoConnectedDetails;\n isWifiEnabled?: boolean;\n}\n\ninterface NetInfoDisconnectedState {\n type: T;\n isConnected: false;\n isInternetReachable: false;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport interface NetInfoUnknownState {\n type: NetInfoStateType.unknown;\n isConnected: boolean | null;\n isInternetReachable: null;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport type NetInfoNoConnectionState =\n NetInfoDisconnectedState;\nexport type NetInfoDisconnectedStates =\n | NetInfoUnknownState\n | NetInfoNoConnectionState;\n\nexport type NetInfoCellularState = NetInfoConnectedState<\n NetInfoStateType.cellular,\n {\n cellularGeneration: NetInfoCellularGeneration | null;\n carrier: string | null;\n }\n>;\nexport type NetInfoWifiState = NetInfoConnectedState<\n NetInfoStateType.wifi,\n {\n ssid: string | null;\n bssid: string | null;\n strength: number | null;\n ipAddress: string | null;\n subnet: string | null;\n frequency: number | null;\n linkSpeed: number | null;\n rxLinkSpeed: number | null;\n txLinkSpeed: number | null;\n }\n>;\nexport type NetInfoBluetoothState =\n NetInfoConnectedState;\nexport type NetInfoEthernetState = NetInfoConnectedState<\n NetInfoStateType.ethernet,\n {\n ipAddress: string | null;\n subnet: string | null;\n }\n>;\nexport type NetInfoWimaxState = NetInfoConnectedState;\nexport type NetInfoVpnState = NetInfoConnectedState;\nexport type NetInfoOtherState = NetInfoConnectedState;\nexport type NetInfoConnectedStates =\n | NetInfoCellularState\n | NetInfoWifiState\n | NetInfoBluetoothState\n | NetInfoEthernetState\n | NetInfoWimaxState\n | NetInfoVpnState\n | NetInfoOtherState;\n\nexport type NetInfoState = NetInfoDisconnectedStates | NetInfoConnectedStates;\n\nexport type NetInfoChangeHandler = (state: NetInfoState) => void;\nexport type NetInfoSubscription = () => void;\n\nexport interface NetInfoConfiguration {\n reachabilityUrl: string;\n reachabilityMethod?: NetInfoMethodType;\n reachabilityHeaders?: Record;\n reachabilityTest: (response: Response) => Promise;\n reachabilityLongTimeout: number;\n reachabilityShortTimeout: number;\n reachabilityRequestTimeout: number;\n reachabilityShouldRun: () => boolean;\n shouldFetchWiFiSSID: boolean;\n useNativeReachability: boolean;\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,IASYA,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;AAAA,IAchBE,yBAAyB,GAAAD,OAAA,CAAAC,yBAAA,0BAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAA,OAAzBA,yBAAyB;AAAA"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/index.js b/node_modules/@react-native-community/netinfo/lib/module/index.js -index 147c72e..3574e44 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/index.js -+++ b/node_modules/@react-native-community/netinfo/lib/module/index.js -@@ -6,20 +6,27 @@ - * - * @format - */ -+ - import { useState, useEffect, useCallback } from 'react'; - import { Platform } from 'react-native'; - import DEFAULT_CONFIGURATION from './internal/defaultConfiguration'; - import NativeInterface from './internal/nativeInterface'; - import State from './internal/state'; --import * as Types from './internal/types'; // Stores the currently used configuration -+import * as Types from './internal/types'; - --let _configuration = DEFAULT_CONFIGURATION; // Stores the singleton reference to the state manager -+// Stores the currently used configuration -+let _configuration = DEFAULT_CONFIGURATION; - -+// Stores the singleton reference to the state manager - let _state = null; -- - const createState = () => { - return new State(_configuration); - }; -+ -+// Track ongoing requests -+let isRequestInProgress = false; -+let requestQueue = []; -+ - /** - * Configures the library with the given configuration. Note that calling this will stop all - * previously added listeners from being called again. It is best to call this right when your -@@ -27,23 +34,20 @@ const createState = () => { - * - * @param configuration The new configuration to set. - */ -- -- - export function configure(configuration) { -- _configuration = { ...DEFAULT_CONFIGURATION, -+ _configuration = { -+ ...DEFAULT_CONFIGURATION, - ...configuration - }; -- - if (_state) { - _state.tearDown(); -- - _state = createState(); - } -- - if (Platform.OS === 'ios') { - NativeInterface.configure(configuration); - } - } -+ - /** - * Returns a `Promise` that resolves to a `NetInfoState` object. - * This function operates on the global singleton instance configured using `configure()` -@@ -52,27 +56,41 @@ export function configure(configuration) { - * - * @returns A Promise which contains the current connection state. - */ -- - export function fetch(requestedInterface) { - if (!_state) { - _state = createState(); - } -- - return _state.latest(requestedInterface); - } -+ - /** - * Force-refreshes the internal state of the global singleton managed by this library. - * - * @returns A Promise which contains the updated connection state. - */ -- - export function refresh() { - if (!_state) { - _state = createState(); - } - -- return _state._fetchCurrentState(); -+ // If a request is already in progress, return a promise that will resolve when the current request finishes -+ if (isRequestInProgress) { -+ return new Promise((resolve) => { -+ requestQueue.push(resolve); -+ }); -+ } -+ -+ isRequestInProgress = true; -+ -+ return _state._fetchCurrentState().then((result) => { -+ requestQueue.forEach((resolve) => resolve(result)); -+ requestQueue = []; -+ return result; -+ }).finally(() => { -+ isRequestInProgress = false; -+ }); - } -+ - /** - * Subscribe to the global singleton's connection information. The callback is called with a parameter of type - * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener -@@ -84,18 +102,16 @@ export function refresh() { - * - * @returns A function which can be called to unsubscribe. - */ -- - export function addEventListener(listener) { - if (!_state) { - _state = createState(); - } -- - _state.add(listener); -- - return () => { - _state && _state.remove(listener); - }; - } -+ - /** - * A React Hook into this library's singleton which updates when the connection state changes. - * -@@ -103,12 +119,10 @@ export function addEventListener(listener) { - * - * @returns The connection state. - */ -- - export function useNetInfo(configuration) { - if (configuration) { - configure(configuration); - } -- - const [netInfo, setNetInfo] = useState({ - type: Types.NetInfoStateType.unknown, - isConnected: null, -@@ -120,6 +134,7 @@ export function useNetInfo(configuration) { - }, []); - return netInfo; - } -+ - /** - * A React Hook which manages an isolated instance of the network info manager. - * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener, -@@ -129,7 +144,6 @@ export function useNetInfo(configuration) { - * - * @returns the netInfo state and a refresh function - */ -- - export function useNetInfoInstance(isPaused = false, configuration) { - const [networkInfoManager, setNetworkInfoManager] = useState(); - const [netInfo, setNetInfo] = useState({ -@@ -142,8 +156,8 @@ export function useNetInfoInstance(isPaused = false, configuration) { - if (isPaused) { - return; - } -- -- const config = { ...DEFAULT_CONFIGURATION, -+ const config = { -+ ...DEFAULT_CONFIGURATION, - ...configuration - }; - const state = new State(config); -diff --git a/node_modules/@react-native-community/netinfo/lib/module/index.js.map b/node_modules/@react-native-community/netinfo/lib/module/index.js.map -index 937c538..268c26e 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/index.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/module/index.js.map -@@ -1 +1 @@ --{"version":3,"sources":["index.ts"],"names":["useState","useEffect","useCallback","Platform","DEFAULT_CONFIGURATION","NativeInterface","State","Types","_configuration","_state","createState","configure","configuration","tearDown","OS","fetch","requestedInterface","latest","refresh","_fetchCurrentState","addEventListener","listener","add","remove","useNetInfo","netInfo","setNetInfo","type","NetInfoStateType","unknown","isConnected","isInternetReachable","details","useNetInfoInstance","isPaused","networkInfoManager","setNetworkInfoManager","config","state"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAAQA,QAAR,EAAkBC,SAAlB,EAA6BC,WAA7B,QAA+C,OAA/C;AACA,SAAQC,QAAR,QAAuB,cAAvB;AACA,OAAOC,qBAAP,MAAkC,iCAAlC;AACA,OAAOC,eAAP,MAA4B,4BAA5B;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAO,KAAKC,KAAZ,MAAuB,kBAAvB,C,CAEA;;AACA,IAAIC,cAAc,GAAGJ,qBAArB,C,CAEA;;AACA,IAAIK,MAAoB,GAAG,IAA3B;;AACA,MAAMC,WAAW,GAAG,MAAa;AAC/B,SAAO,IAAIJ,KAAJ,CAAUE,cAAV,CAAP;AACD,CAFD;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,SAASG,SAAT,CACLC,aADK,EAEC;AACNJ,EAAAA,cAAc,GAAG,EACf,GAAGJ,qBADY;AAEf,OAAGQ;AAFY,GAAjB;;AAKA,MAAIH,MAAJ,EAAY;AACVA,IAAAA,MAAM,CAACI,QAAP;;AACAJ,IAAAA,MAAM,GAAGC,WAAW,EAApB;AACD;;AAED,MAAIP,QAAQ,CAACW,EAAT,KAAgB,KAApB,EAA2B;AACzBT,IAAAA,eAAe,CAACM,SAAhB,CAA0BC,aAA1B;AACD;AACF;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASG,KAAT,CACLC,kBADK,EAEwB;AA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GAAG,KADN,EAELtB,aAFK,EAGL;AACA,QAAM,CAACuB,kBAAD,EAAqBC,qBAArB,IAA8CpC,QAAQ,EAA5D;AACA,QAAM,CAACyB,OAAD,EAAUC,UAAV,IAAwB1B,QAAQ,CAAqB;AACzD2B,IAAAA,IAAI,EAAEpB,KAAK,CAACqB,gBAAN,CAAuBC,OAD4B;AAEzDC,IAAAA,WAAW,EAAE,IAF4C;AAGzDC,IAAAA,mBAAmB,EAAE,IAHoC;AAIzDC,IAAAA,OAAO,EAAE;AAJgD,GAArB,CAAtC;AAOA/B,EAAAA,SAAS,CAAC,MAAM;AACd,QAAIiC,QAAJ,EAAc;AACZ;AACD;;AACD,UAAMG,MAAM,GAAG,EACb,GAAGjC,qBADU;AAEb,SAAGQ;AAFU,KAAf;AAIA,UAAM0B,KAAK,GAAG,IAAIhC,KAAJ,CAAU+B,MAAV,CAAd;AACAD,IAAAA,qBAAqB,CAACE,KAAD,CAArB;AACAA,IAAAA,KAAK,CAAChB,GAAN,CAAUI,UAAV;AACA,WAAOY,KAAK,CAACzB,QAAb;AACD,GAZQ,EAYN,CAACqB,QAAD,EAAWtB,aAAX,CAZM,CAAT;AAcA,QAAMM,OAAO,GAAGhB,WAAW,CAAC,MAAM;AAChCiC,IAAAA,kBAAkB,IAAIA,kBAAkB,CAAChB,kBAAnB,EAAtB;AACD,GAF0B,EAExB,CAACgB,kBAAD,CAFwB,CAA3B;AAIA,SAAO;AACLV,IAAAA,OADK;AAELP,IAAAA;AAFK,GAAP;AAID;AAED,cAAc,kBAAd;AAEA,eAAe;AACbP,EAAAA,SADa;AAEbI,EAAAA,KAFa;AAGbG,EAAAA,OAHa;AAIbE,EAAAA,gBAJa;AAKbI,EAAAA,UALa;AAMbS,EAAAA;AANa,CAAf","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {useState, useEffect, useCallback} from 'react';\nimport {Platform} from 'react-native';\nimport DEFAULT_CONFIGURATION from './internal/defaultConfiguration';\nimport NativeInterface from './internal/nativeInterface';\nimport State from './internal/state';\nimport * as Types from './internal/types';\n\n// Stores the currently used configuration\nlet _configuration = DEFAULT_CONFIGURATION;\n\n// Stores the singleton reference to the state manager\nlet _state: State | null = null;\nconst createState = (): State => {\n return new State(_configuration);\n};\n\n/**\n * Configures the library with the given configuration. Note that calling this will stop all\n * previously added listeners from being called again. It is best to call this right when your\n * application is started to avoid issues. The configuration sets up a global singleton instance.\n *\n * @param configuration The new configuration to set.\n */\nexport function configure(\n configuration: Partial,\n): void {\n _configuration = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n\n if (_state) {\n _state.tearDown();\n _state = createState();\n }\n\n if (Platform.OS === 'ios') {\n NativeInterface.configure(configuration);\n }\n}\n\n/**\n * Returns a `Promise` that resolves to a `NetInfoState` object.\n * This function operates on the global singleton instance configured using `configure()`\n *\n * @param [requestedInterface] interface from which to obtain the information\n *\n * @returns A Promise which contains the current connection state.\n */\nexport function fetch(\n requestedInterface?: string,\n): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state.latest(requestedInterface);\n}\n\n/**\n * Force-refreshes the internal state of the global singleton managed by this library.\n *\n * @returns A Promise which contains the updated connection state.\n */\nexport function refresh(): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state._fetchCurrentState();\n}\n\n/**\n * Subscribe to the global singleton's connection information. The callback is called with a parameter of type\n * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener\n * will be called with the latest information soon after you subscribe and then with any\n * subsequent changes afterwards. You should not assume that the listener is called in the same\n * way across devices or platforms.\n *\n * @param listener The listener which is called when the network state changes.\n *\n * @returns A function which can be called to unsubscribe.\n */\nexport function addEventListener(\n listener: Types.NetInfoChangeHandler,\n): Types.NetInfoSubscription {\n if (!_state) {\n _state = createState();\n }\n\n _state.add(listener);\n return (): void => {\n _state && _state.remove(listener);\n };\n}\n\n/**\n * A React Hook into this library's singleton which updates when the connection state changes.\n *\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns The connection state.\n */\nexport function useNetInfo(\n configuration?: Partial,\n): Types.NetInfoState {\n if (configuration) {\n configure(configuration);\n }\n\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect((): (() => void) => {\n return addEventListener(setNetInfo);\n }, []);\n\n return netInfo;\n}\n\n/**\n * A React Hook which manages an isolated instance of the network info manager.\n * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener,\n * NetInfo.fetch, NetInfo.refresh are performed on a global singleton and have no affect on this hook.\n * @param {boolean} isPaused - Pause the internal network checks.\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns the netInfo state and a refresh function\n */\nexport function useNetInfoInstance(\n isPaused = false,\n configuration?: Partial,\n) {\n const [networkInfoManager, setNetworkInfoManager] = useState();\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect(() => {\n if (isPaused) {\n return;\n }\n const config = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n const state = new State(config);\n setNetworkInfoManager(state);\n state.add(setNetInfo);\n return state.tearDown;\n }, [isPaused, configuration]);\n\n const refresh = useCallback(() => {\n networkInfoManager && networkInfoManager._fetchCurrentState();\n }, [networkInfoManager]);\n\n return {\n netInfo,\n refresh,\n };\n}\n\nexport * from './internal/types';\n\nexport default {\n configure,\n fetch,\n refresh,\n addEventListener,\n useNetInfo,\n useNetInfoInstance,\n};\n"]} -\ No newline at end of file -+{"version":3,"names":["useState","useEffect","useCallback","Platform","DEFAULT_CONFIGURATION","NativeInterface","State","Types","_configuration","_state","createState","configure","configuration","tearDown","OS","fetch","requestedInterface","latest","refresh","_fetchCurrentState","addEventListener","listener","add","remove","useNetInfo","netInfo","setNetInfo","type","NetInfoStateType","unknown","isConnected","isInternetReachable","details","useNetInfoInstance","isPaused","networkInfoManager","setNetworkInfoManager","config","state"],"sources":["index.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {useState, useEffect, useCallback} from 'react';\nimport {Platform} from 'react-native';\nimport DEFAULT_CONFIGURATION from './internal/defaultConfiguration';\nimport NativeInterface from './internal/nativeInterface';\nimport State from './internal/state';\nimport * as Types from './internal/types';\n\n// Stores the currently used configuration\nlet _configuration = DEFAULT_CONFIGURATION;\n\n// Stores the singleton reference to the state manager\nlet _state: State | null = null;\nconst createState = (): State => {\n return new State(_configuration);\n};\n\n/**\n * Configures the library with the given configuration. Note that calling this will stop all\n * previously added listeners from being called again. It is best to call this right when your\n * application is started to avoid issues. The configuration sets up a global singleton instance.\n *\n * @param configuration The new configuration to set.\n */\nexport function configure(\n configuration: Partial,\n): void {\n _configuration = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n\n if (_state) {\n _state.tearDown();\n _state = createState();\n }\n\n if (Platform.OS === 'ios') {\n NativeInterface.configure(configuration);\n }\n}\n\n/**\n * Returns a `Promise` that resolves to a `NetInfoState` object.\n * This function operates on the global singleton instance configured using `configure()`\n *\n * @param [requestedInterface] interface from which to obtain the information\n *\n * @returns A Promise which contains the current connection state.\n */\nexport function fetch(\n requestedInterface?: string,\n): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state.latest(requestedInterface);\n}\n\n/**\n * Force-refreshes the internal state of the global singleton managed by this library.\n *\n * @returns A Promise which contains the updated connection state.\n */\nexport function refresh(): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state._fetchCurrentState();\n}\n\n/**\n * Subscribe to the global singleton's connection information. The callback is called with a parameter of type\n * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener\n * will be called with the latest information soon after you subscribe and then with any\n * subsequent changes afterwards. You should not assume that the listener is called in the same\n * way across devices or platforms.\n *\n * @param listener The listener which is called when the network state changes.\n *\n * @returns A function which can be called to unsubscribe.\n */\nexport function addEventListener(\n listener: Types.NetInfoChangeHandler,\n): Types.NetInfoSubscription {\n if (!_state) {\n _state = createState();\n }\n\n _state.add(listener);\n return (): void => {\n _state && _state.remove(listener);\n };\n}\n\n/**\n * A React Hook into this library's singleton which updates when the connection state changes.\n *\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns The connection state.\n */\nexport function useNetInfo(\n configuration?: Partial,\n): Types.NetInfoState {\n if (configuration) {\n configure(configuration);\n }\n\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect((): (() => void) => {\n return addEventListener(setNetInfo);\n }, []);\n\n return netInfo;\n}\n\n/**\n * A React Hook which manages an isolated instance of the network info manager.\n * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener,\n * NetInfo.fetch, NetInfo.refresh are performed on a global singleton and have no affect on this hook.\n * @param {boolean} isPaused - Pause the internal network checks.\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns the netInfo state and a refresh function\n */\nexport function useNetInfoInstance(\n isPaused = false,\n configuration?: Partial,\n) {\n const [networkInfoManager, setNetworkInfoManager] = useState();\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect(() => {\n if (isPaused) {\n return;\n }\n const config = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n const state = new State(config);\n setNetworkInfoManager(state);\n state.add(setNetInfo);\n return state.tearDown;\n }, [isPaused, configuration]);\n\n const refresh = useCallback(() => {\n networkInfoManager && networkInfoManager._fetchCurrentState();\n }, [networkInfoManager]);\n\n return {\n netInfo,\n refresh,\n };\n}\n\nexport * from './internal/types';\n\nexport default {\n configure,\n fetch,\n refresh,\n addEventListener,\n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,CAAC;EAEF/B,SAAS,CAAC,MAAM;IACd,IAAIiC,QAAQ,EAAE;MACZ;IACF;IACA,MAAMG,MAAM,GAAG;MACb,GAAGjC,qBAAqB;MACxB,GAAGQ;IACL,CAAC;IACD,MAAM0B,KAAK,GAAG,IAAIhC,KAAK,CAAC+B,MAAM,CAAC;IAC/BD,qBAAqB,CAACE,KAAK,CAAC;IAC5BA,KAAK,CAAChB,GAAG,CAACI,UAAU,CAAC;IACrB,OAAOY,KAAK,CAACzB,QAAQ;EACvB,CAAC,EAAE,CAACqB,QAAQ,EAAEtB,aAAa,CAAC,CAAC;EAE7B,MAAMM,OAAO,GAAGhB,WAAW,CAAC,MAAM;IAChCiC,kBAAkB,IAAIA,kBAAkB,CAAChB,kBAAkB,CAAC,CAAC;EAC/D,CAAC,EAAE,CAACgB,kBAAkB,CAAC,CAAC;EAExB,OAAO;IACLV,OAAO;IACPP;EACF,CAAC;AACH;AAEA,cAAc,kBAAkB;AAEhC,eAAe;EACbP,SAAS;EACTI,KAAK;EACLG,OAAO;EACPE,gBAAgB;EAChBI,UAAU;EACVS;AACF,CAAC"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js b/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js -new file mode 100644 -index 0000000..54a9e1b ---- /dev/null -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js -@@ -0,0 +1,5 @@ -+/* eslint-disable @typescript-eslint/ban-types */ -+ -+import { TurboModuleRegistry } from 'react-native'; -+export default TurboModuleRegistry.getEnforcing('RNCNetInfo'); -+//# sourceMappingURL=NativeRNCNetInfo.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js.map -new file mode 100644 -index 0000000..d366286 ---- /dev/null -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js.map -@@ -0,0 +1 @@ -+{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sources":["NativeRNCNetInfo.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-types */\nimport type { TurboModule } from 'react-native';\nimport { TurboModuleRegistry } from 'react-native';\n\nexport interface Spec extends TurboModule {\n configure: (config: Object) => void;\n getCurrentState(requestedInterface?: string): Promise;\n // Events\n addListener: (eventName: string) => void;\n removeListeners: (count: number) => void;\n}\n\nexport default TurboModuleRegistry.getEnforcing('RNCNetInfo');\n\n"],"mappings":"AAAA;;AAEA,SAASA,mBAAmB,QAAQ,cAAc;AAUlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,YAAY,CAAC"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.js.map -index 6a190c8..0ec7a12 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.js.map -@@ -1 +1 @@ --{"version":3,"sources":["defaultConfiguration.ts"],"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability"],"mappings":"AAEA,MAAMA,qBAAiD,GAAG;AACxDC,EAAAA,eAAe,EAAE,0CADuC;AAExDC,EAAAA,kBAAkB,EAAE,MAFoC;AAGxDC,EAAAA,mBAAmB,EAAE,EAHmC;AAIxDC,EAAAA,gBAAgB,EAAGC,QAAD,IAChBC,OAAO,CAACC,OAAR,CAAgBF,QAAQ,CAACG,MAAT,KAAoB,GAApC,CALsD;AAMxDC,EAAAA,wBAAwB,EAAE,IAAI,IAN0B;AAMpB;AACpCC,EAAAA,uBAAuB,EAAE,KAAK,IAP0B;AAOpB;AACpCC,EAAAA,0BAA0B,EAAE,KAAK,IARuB;AAQjB;AACvCC,EAAAA,qBAAqB,EAAE,MAAe,IATkB;AAUxDC,EAAAA,mBAAmB,EAAE,KAVmC;AAWxDC,EAAAA,qBAAqB,EAAE;AAXiC,CAA1D;AAcA,eAAed,qBAAf","sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: 'https://clients3.google.com/generate_204',\n reachabilityMethod: 'HEAD',\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 204),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: false,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION;"]} -\ No newline at end of file -+{"version":3,"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability"],"sources":["defaultConfiguration.ts"],"sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: 'https://clients3.google.com/generate_204',\n reachabilityMethod: 'HEAD',\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 204),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: false,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION;"],"mappings":"AAEA,MAAMA,qBAAiD,GAAG;EACxDC,eAAe,EAAE,0CAA0C;EAC3DC,kBAAkB,EAAE,MAAM;EAC1BC,mBAAmB,EAAE,CAAC,CAAC;EACvBC,gBAAgB,EAAGC,QAAkB,IACnCC,OAAO,CAACC,OAAO,CAACF,QAAQ,CAACG,MAAM,KAAK,GAAG,CAAC;EAC1CC,wBAAwB,EAAE,CAAC,GAAG,IAAI;EAAE;EACpCC,uBAAuB,EAAE,EAAE,GAAG,IAAI;EAAE;EACpCC,0BAA0B,EAAE,EAAE,GAAG,IAAI;EAAE;EACvCC,qBAAqB,EAAEA,CAAA,KAAe,IAAI;EAC1CC,mBAAmB,EAAE,KAAK;EAC1BC,qBAAqB,EAAE;AACzB,CAAC;AAED,eAAed,qBAAqB"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.web.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.web.js.map -index ba01d7a..011de62 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.web.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.web.js.map -@@ -1 +1 @@ --{"version":3,"sources":["defaultConfiguration.web.ts"],"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability"],"mappings":"AAEA,MAAMA,qBAAiD,GAAG;AACxDC,EAAAA,eAAe,EAAE,GADuC;AAExDC,EAAAA,kBAAkB,EAAE,MAFoC;AAGxDC,EAAAA,mBAAmB,EAAE,EAHmC;AAIxDC,EAAAA,gBAAgB,EAAGC,QAAD,IAChBC,OAAO,CAACC,OAAR,CAAgBF,QAAQ,CAACG,MAAT,KAAoB,GAApC,CALsD;AAMxDC,EAAAA,wBAAwB,EAAE,IAAI,IAN0B;AAMpB;AACpCC,EAAAA,uBAAuB,EAAE,KAAK,IAP0B;AAOpB;AACpCC,EAAAA,0BAA0B,EAAE,KAAK,IARuB;AAQjB;AACvCC,EAAAA,qBAAqB,EAAE,MAAe,IATkB;AAUxDC,EAAAA,mBAAmB,EAAE,IAVmC;AAWxDC,EAAAA,qBAAqB,EAAE;AAXiC,CAA1D;AAcA,eAAed,qBAAf","sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: '/',\n reachabilityMethod: \"HEAD\",\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 200),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: true,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION"]} -\ No newline at end of file -+{"version":3,"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability"],"sources":["defaultConfiguration.web.ts"],"sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: '/',\n reachabilityMethod: \"HEAD\",\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 200),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: true,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION"],"mappings":"AAEA,MAAMA,qBAAiD,GAAG;EACxDC,eAAe,EAAE,GAAG;EACpBC,kBAAkB,EAAE,MAAM;EAC1BC,mBAAmB,EAAE,CAAC,CAAC;EACvBC,gBAAgB,EAAGC,QAAkB,IACnCC,OAAO,CAACC,OAAO,CAACF,QAAQ,CAACG,MAAM,KAAK,GAAG,CAAC;EAC1CC,wBAAwB,EAAE,CAAC,GAAG,IAAI;EAAE;EACpCC,uBAAuB,EAAE,EAAE,GAAG,IAAI;EAAE;EACpCC,0BAA0B,EAAE,EAAE,GAAG,IAAI;EAAE;EACvCC,qBAAqB,EAAEA,CAAA,KAAe,IAAI;EAC1CC,mBAAmB,EAAE,IAAI;EACzBC,qBAAqB,EAAE;AACzB,CAAC;AAED,eAAed,qBAAqB"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js b/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js -index 408453a..e373eef 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js -@@ -1,5 +1,6 @@ --function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -- -+function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -+function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -+function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } - /** - * Copyright (c) Facebook, Inc. and its affiliates. - * -@@ -8,57 +9,45 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope - * - * @format - */ -+ - export default class InternetReachability { - constructor(configuration, listener) { - _defineProperty(this, "_configuration", void 0); -- - _defineProperty(this, "_listener", void 0); -- - _defineProperty(this, "_isInternetReachable", undefined); -- - _defineProperty(this, "_currentInternetReachabilityCheckHandler", null); -- - _defineProperty(this, "_currentTimeoutHandle", null); -- - _defineProperty(this, "_setIsInternetReachable", isInternetReachable => { - if (this._isInternetReachable === isInternetReachable) { - return; - } -- - this._isInternetReachable = isInternetReachable; -- - this._listener(this._isInternetReachable); - }); -- - _defineProperty(this, "_setExpectsConnection", expectsConnection => { - // Cancel any pending check - if (this._currentInternetReachabilityCheckHandler !== null) { - this._currentInternetReachabilityCheckHandler.cancel(); -- - this._currentInternetReachabilityCheckHandler = null; -- } // Cancel any pending timeout -- -- -+ } -+ // Cancel any pending timeout - if (this._currentTimeoutHandle !== null) { - clearTimeout(this._currentTimeoutHandle); - this._currentTimeoutHandle = null; - } -- - if (expectsConnection && this._configuration.reachabilityShouldRun()) { - // If we expect a connection, start the process for finding if we have one - // Set the state to "null" if it was previously false - if (!this._isInternetReachable) { - this._setIsInternetReachable(null); -- } // Start a network request to check for internet -- -- -+ } -+ // Start a network request to check for internet - this._currentInternetReachabilityCheckHandler = this._checkInternetReachability(); - } else { - // If we don't expect a connection or don't run reachability check, just change the state to "false" - this._setIsInternetReachable(false); - } - }); -- - _defineProperty(this, "_checkInternetReachability", () => { - const controller = new AbortController(); - const responsePromise = fetch(this._configuration.reachabilityUrl, { -@@ -66,16 +55,17 @@ export default class InternetReachability { - method: this._configuration.reachabilityMethod, - cache: 'no-cache', - signal: controller.signal -- }); // Create promise that will reject after the request timeout has been reached -+ }); - -+ // Create promise that will reject after the request timeout has been reached - let timeoutHandle; -- const timeoutPromise = new Promise(() => { -- timeoutHandle = setTimeout(() => controller.abort('timedout'), this._configuration.reachabilityRequestTimeout); -- }); // Create promise that makes it possible to cancel a pending request through a reject -- // eslint-disable-next-line @typescript-eslint/no-empty-function -+ const timeoutPromise = new Promise((_, reject) => { -+ timeoutHandle = setTimeout(() => reject('timedout'), this._configuration.reachabilityRequestTimeout); -+ }); - -+ // Create promise that makes it possible to cancel a pending request through a reject -+ // eslint-disable-next-line @typescript-eslint/no-empty-function - let cancel = () => {}; -- - const cancelPromise = new Promise((_, reject) => { - cancel = () => reject('canceled'); - }); -@@ -83,18 +73,25 @@ export default class InternetReachability { - return this._configuration.reachabilityTest(response); - }).then(result => { - this._setIsInternetReachable(result); -- - const nextTimeoutInterval = this._isInternetReachable ? this._configuration.reachabilityLongTimeout : this._configuration.reachabilityShortTimeout; - this._currentTimeoutHandle = setTimeout(this._checkInternetReachability, nextTimeoutInterval); -+ }).catch(error => { -+ if (error !== 'canceled') { -+ this._setIsInternetReachable(false); -+ this._currentTimeoutHandle = setTimeout(this._checkInternetReachability, this._configuration.reachabilityShortTimeout); -+ } - }).catch(error => { - if ('canceled' === error) { - controller.abort(); - } else { -+ if ('timedout' === error) { -+ controller.abort(); -+ } - this._setIsInternetReachable(false); -- - this._currentTimeoutHandle = setTimeout(this._checkInternetReachability, this._configuration.reachabilityShortTimeout); - } -- }) // Clear request timeout and propagate any errors -+ }) -+ // Clear request timeout and propagate any errors - .then(() => { - clearTimeout(timeoutHandle); - }, error => { -@@ -106,7 +103,6 @@ export default class InternetReachability { - cancel - }; - }); -- - _defineProperty(this, "update", state => { - if (typeof state.isInternetReachable === 'boolean' && this._configuration.useNativeReachability) { - this._setIsInternetReachable(state.isInternetReachable); -@@ -114,29 +110,24 @@ export default class InternetReachability { - this._setExpectsConnection(state.isConnected); - } - }); -- - _defineProperty(this, "currentState", () => { - return this._isInternetReachable; - }); -- - _defineProperty(this, "tearDown", () => { - // Cancel any pending check - if (this._currentInternetReachabilityCheckHandler !== null) { - this._currentInternetReachabilityCheckHandler.cancel(); -- - this._currentInternetReachabilityCheckHandler = null; -- } // Cancel any pending timeout -- -+ } - -+ // Cancel any pending timeout - if (this._currentTimeoutHandle !== null) { - clearTimeout(this._currentTimeoutHandle); - this._currentTimeoutHandle = null; - } - }); -- - this._configuration = configuration; - this._listener = listener; - } -- - } - //# sourceMappingURL=internetReachability.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js.map -index a998c5f..544e5cb 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js.map -@@ -1 +1 @@ --{"version":3,"sources":["internetReachability.ts"],"names":["InternetReachability","constructor","configuration","listener","undefined","isInternetReachable","_isInternetReachable","_listener","expectsConnection","_currentInternetReachabilityCheckHandler","cancel","_currentTimeoutHandle","clearTimeout","_configuration","reachabilityShouldRun","_setIsInternetReachable","_checkInternetReachability","controller","AbortController","responsePromise","fetch","reachabilityUrl","headers","reachabilityHeaders","method","reachabilityMethod","cache","signal","timeoutHandle","timeoutPromise","Promise","setTimeout","abort","reachabilityRequestTimeout","cancelPromise","_","reject","promise","race","then","response","reachabilityTest","result","nextTimeoutInterval","reachabilityLongTimeout","reachabilityShortTimeout","catch","error","state","useNativeReachability","_setExpectsConnection","isConnected"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUA,eAAe,MAAMA,oBAAN,CAA2B;AAOxCC,EAAAA,WAAW,CACTC,aADS,EAETC,QAFS,EAGT;AAAA;;AAAA;;AAAA,kDAPyDC,SAOzD;;AAAA,sEAN0F,IAM1F;;AAAA,mDALoE,IAKpE;;AAAA,qDAMAC,mBADgC,IAEvB;AACT,UAAI,KAAKC,oBAAL,KAA8BD,mBAAlC,EAAuD;AACrD;AACD;;AAED,WAAKC,oBAAL,GAA4BD,mBAA5B;;AACA,WAAKE,SAAL,CAAe,KAAKD,oBAApB;AACD,KAdC;;AAAA,mDAgB+BE,iBAAD,IAA6C;AAC3E;AACA,UAAI,KAAKC,wCAAL,KAAkD,IAAtD,EAA4D;AAC1D,aAAKA,wCAAL,CAA8CC,MAA9C;;AACA,aAAKD,wCAAL,GAAgD,IAAhD;AACD,OAL0E,CAM3E;;;AACA,UAAI,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ACD,OALD,MAKO;AACL,aAAK6C,qBAAL,CAA2BF,KAAK,CAACG,WAAjC;AACD;AACF,KAjIC;;AAAA,0CAmIoB,MAAkC;AACtD,aAAO,KAAK7C,oBAAZ;AACD,KArIC;;AAAA,sCAuIgB,MAAY;AAC5B;AACA,UAAI,KAAKG,wCAAL,KAAkD,IAAtD,EAA4D;AAC1D,aAAKA,wCAAL,CAA8CC,MAA9C;;AACA,aAAKD,wCAAL,GAAgD,IAAhD;AACD,OAL2B,CAO5B;;;AACA,UAAI,KAAKE,qBAAL,KAA+B,IAAnC,EAAyC;AACvCC,QAAAA,YAAY,CAAC,KAAKD,qBAAN,CAAZ;AACA,aAAKA,qBAAL,GAA6B,IAA7B;AACD;AACF,KAnJC;;AACA,SAAKE,cAAL,GAAsBX,aAAtB;AACA,SAAKK,SAAL,GAAiBJ,QAAjB;AACD;;AAbuC","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport * as PrivateTypes from './privateTypes';\nimport * as Types from './types';\n\ninterface InternetReachabilityCheckHandler {\n promise: Promise;\n cancel: () => void;\n}\n\nexport default class InternetReachability {\n private _configuration: Types.NetInfoConfiguration;\n private _listener: PrivateTypes.NetInfoInternetReachabilityChangeListener;\n private _isInternetReachable: boolean | null | undefined = undefined;\n private _currentInternetReachabilityCheckHandler: InternetReachabilityCheckHandler | null = null;\n private _currentTimeoutHandle: ReturnType | null = null;\n\n constructor(\n configuration: Types.NetInfoConfiguration,\n listener: PrivateTypes.NetInfoInternetReachabilityChangeListener,\n ) {\n this._configuration = configuration;\n this._listener = listener;\n }\n\n private _setIsInternetReachable = (\n isInternetReachable: boolean | null,\n ): void => {\n if (this._isInternetReachable === isInternetReachable) {\n return;\n }\n\n this._isInternetReachable = isInternetReachable;\n this._listener(this._isInternetReachable);\n };\n\n private _setExpectsConnection = (expectsConnection: boolean | null): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n\n if (expectsConnection && this._configuration.reachabilityShouldRun()) {\n // If we expect a connection, start the process for finding if we have one\n // Set the state to \"null\" if it was previously false\n if (!this._isInternetReachable) {\n this._setIsInternetReachable(null);\n }\n // Start a network request to check for internet\n this._currentInternetReachabilityCheckHandler = this._checkInternetReachability();\n } else {\n // If we don't expect a connection or don't run reachability check, just change the state to \"false\"\n this._setIsInternetReachable(false);\n }\n };\n\n private _checkInternetReachability = (): InternetReachabilityCheckHandler => {\n const controller = new AbortController();\n\n const responsePromise = fetch(this._configuration.reachabilityUrl, {\n headers: this._configuration.reachabilityHeaders,\n method: this._configuration.reachabilityMethod,\n cache: 'no-cache',\n signal: controller.signal,\n });\n\n // Create promise that will reject after the request timeout has been reached\n let timeoutHandle: ReturnType;\n const timeoutPromise = new Promise((): void => {\n timeoutHandle = setTimeout(\n (): void => controller.abort('timedout'),\n this._configuration.reachabilityRequestTimeout,\n );\n });\n\n // Create promise that makes it possible to cancel a pending request through a reject\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n let cancel: () => void = (): void => {};\n const cancelPromise = new Promise((_, reject): void => {\n cancel = (): void => reject('canceled');\n });\n\n const promise = Promise.race([\n responsePromise,\n timeoutPromise,\n cancelPromise,\n ])\n .then(\n (response): Promise => {\n return this._configuration.reachabilityTest(response);\n },\n )\n .then(\n (result): void => {\n this._setIsInternetReachable(result);\n const nextTimeoutInterval = this._isInternetReachable\n ? this._configuration.reachabilityLongTimeout\n : this._configuration.reachabilityShortTimeout;\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n nextTimeoutInterval,\n );\n },\n )\n .catch(\n (error: Error | 'timedout' | 'canceled'): void => {\n if ('canceled' === error) {\n controller.abort();\n } else {\n this._setIsInternetReachable(false);\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n this._configuration.reachabilityShortTimeout,\n );\n }\n },\n )\n // Clear request timeout and propagate any errors\n .then(\n (): void => {\n clearTimeout(timeoutHandle);\n },\n (error: Error): void => {\n clearTimeout(timeoutHandle);\n throw error;\n },\n );\n\n return {\n promise,\n cancel,\n };\n };\n\n public update = (state: PrivateTypes.NetInfoNativeModuleState): void => {\n if (\n typeof state.isInternetReachable === 'boolean' &&\n this._configuration.useNativeReachability\n ) {\n this._setIsInternetReachable(state.isInternetReachable);\n } else {\n this._setExpectsConnection(state.isConnected);\n }\n };\n\n public currentState = (): boolean | null | undefined => {\n return this._isInternetReachable;\n };\n\n public tearDown = (): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n };\n}\n"]} -\ No newline at end of file -+{"version":3,"names":["InternetReachability","constructor","configuration","listener","_defineProperty","undefined","isInternetReachable","_isInternetReachable","_listener","expectsConnection","_currentInternetReachabilityCheckHandler","cancel","_currentTimeoutHandle","clearTimeout","_configuration","reachabilityShouldRun","_setIsInternetReachable","_checkInternetReachability","controller","AbortController","responsePromise","fetch","reachabilityUrl","headers","reachabilityHeaders","method","reachabilityMethod","cache","signal","timeoutHandle","timeoutPromise","Promise","_","reject","setTimeout","reachabilityRequestTimeout","cancelPromise","promise","race","then","response","reachabilityTest","result","nextTimeoutInterval","reachabilityLongTimeout","reachabilityShortTimeout","catch","error","abort","state","useNativeReachability","_setExpectsConnection","isConnected"],"sources":["internetReachability.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport * as PrivateTypes from './privateTypes';\nimport * as Types from './types';\n\ninterface InternetReachabilityCheckHandler {\n promise: Promise;\n cancel: () => void;\n}\n\nexport default class InternetReachability {\n private _configuration: Types.NetInfoConfiguration;\n private _listener: PrivateTypes.NetInfoInternetReachabilityChangeListener;\n private _isInternetReachable: boolean | null | undefined = undefined;\n private _currentInternetReachabilityCheckHandler: InternetReachabilityCheckHandler | null =\n null;\n private _currentTimeoutHandle: ReturnType | null = null;\n\n constructor(\n configuration: Types.NetInfoConfiguration,\n listener: PrivateTypes.NetInfoInternetReachabilityChangeListener,\n ) {\n this._configuration = configuration;\n this._listener = listener;\n }\n\n private _setIsInternetReachable = (\n isInternetReachable: boolean | null,\n ): void => {\n if (this._isInternetReachable === isInternetReachable) {\n return;\n }\n\n this._isInternetReachable = isInternetReachable;\n this._listener(this._isInternetReachable);\n };\n\n private _setExpectsConnection = (expectsConnection: boolean | null): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n\n if (expectsConnection && this._configuration.reachabilityShouldRun()) {\n // If we expect a connection, start the process for finding if we have one\n // Set the state to \"null\" if it was previously false\n if (!this._isInternetReachable) {\n this._setIsInternetReachable(null);\n }\n // Start a network request to check for internet\n this._currentInternetReachabilityCheckHandler =\n this._checkInternetReachability();\n } else {\n // If we don't expect a connection or don't run reachability check, just change the state to \"false\"\n this._setIsInternetReachable(false);\n }\n };\n\n private _checkInternetReachability = (): InternetReachabilityCheckHandler => {\n const controller = new AbortController();\n\n const responsePromise = fetch(this._configuration.reachabilityUrl, {\n headers: this._configuration.reachabilityHeaders,\n method: this._configuration.reachabilityMethod,\n cache: 'no-cache',\n signal: controller.signal,\n });\n\n // Create promise that will reject after the request timeout has been reached\n let timeoutHandle: ReturnType;\n const timeoutPromise = new Promise((_, reject): void => {\n timeoutHandle = setTimeout(\n (): void => reject('timedout'),\n this._configuration.reachabilityRequestTimeout,\n );\n });\n\n // Create promise that makes it possible to cancel a pending request through a reject\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n let cancel: () => void = (): void => {};\n const cancelPromise = new Promise((_, reject): void => {\n cancel = (): void => reject('canceled');\n });\n\n const promise = Promise.race([\n responsePromise,\n timeoutPromise,\n cancelPromise,\n ])\n .then((response): Promise => {\n return this._configuration.reachabilityTest(response);\n })\n .then((result): void => {\n this._setIsInternetReachable(result);\n const nextTimeoutInterval = this._isInternetReachable\n ? this._configuration.reachabilityLongTimeout\n : this._configuration.reachabilityShortTimeout;\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n nextTimeoutInterval,\n );\n })\n .catch((error: Error | 'timedout' | 'canceled'): void => {\n if (error !== 'canceled') {\n this._setIsInternetReachable(false);\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n this._configuration.reachabilityShortTimeout,\n );\n }\n })\n .catch(\n (error: Error | 'timedout' | 'canceled'): void => {\n if ('canceled' === error) {\n controller.abort();\n } else {\n if ('timedout' === error) {\n controller.abort();\n }\n \n this._setIsInternetReachable(false);\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n this._configuration.reachabilityShortTimeout,\n );\n }\n },\n )\n // Clear request timeout and propagate any errors\n .then(\n (): void => {\n clearTimeout(timeoutHandle);\n },\n (error: Error): void => {\n clearTimeout(timeoutHandle);\n throw error;\n },\n );\n\n return {\n promise,\n cancel,\n };\n };\n\n public update = (state: PrivateTypes.NetInfoNativeModuleState): void => {\n if (\n typeof state.isInternetReachable === 'boolean' &&\n this._configuration.useNativeReachability\n ) {\n this._setIsInternetReachable(state.isInternetReachable);\n } else {\n this._setExpectsConnection(state.isConnected);\n }\n };\n\n public currentState = (): boolean | null | undefined => {\n return this._isInternetReachable;\n };\n\n public tearDown = (): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n };\n}\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,eAAe,MAAMA,oBAAoB,CAAC;EAQxCC,WAAWA,CACTC,aAAyC,EACzCC,QAAgE,EAChE;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA,+BARyDC,SAAS;IAAAD,eAAA,mDAElE,IAAI;IAAAA,eAAA,gCACgE,IAAI;IAAAA,eAAA,kCAWxEE,mBAAmC,IAC1B;MACT,IAAI,IAAI,CAACC,oBAAoB,KAAKD,mBAAmB,EAAE;QACrD;MACF;MAEA,IAAI,CAACC,oBAAoB,GAAGD,mBAAmB;MAC/C,IAAI,CAACE,SAAS,CAAC,IAAI,CAACD,oBAAoB,CAAC;IAC3C,CAAC;IAAAH,eAAA,gCAEgCK,iBAAiC,IAAW;MAC3E;MACA,IAAI,IAAI,CAACC,wCAAwC,KAAK,IAAI,EAAE;QAC1D,IAAI,CAACA,wCAAwC,CAACC,MAAM,CAAC,CAAC;QACtD,IAAI,CAACD,wCAAwC,GAAG,IAAI;MACtD;MACA;MACA,IAAI,IAAI,CAACE,qBAAqB,KAAK,IAAI,EAAE;QACvCC,YAAY,CAAC,IAAI,CAACD,qBAAqB,CAAC;QACxC,IAAI,CAACA,qBAAqB,GAAG,IAAI;MACnC;MAEA,IAAIH,iBAAiB,IAAI,IAAI,CAACK,cAAc,CAACC,qBAAqB,CAAC,CAAC,EAAE;QACpE;QACA;QACA,IAAI,CAAC,IAAI,CAACR,oBAAoB,EAAE;UAC9B,IAAI,CAACS,uBAAuB,CAAC,IAAI,CAAC;QACpC;QACA;QACA,IAAI,CAACN,wCAAwC,GAC3C,IAAI,C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uBAAuB,CAACiC,KAAK,CAAC3C,mBAAmB,CAAC;MACzD,CAAC,MAAM;QACL,IAAI,CAAC6C,qBAAqB,CAACF,KAAK,CAACG,WAAW,CAAC;MAC/C;IACF,CAAC;IAAAhD,eAAA,uBAEqB,MAAkC;MACtD,OAAO,IAAI,CAACG,oBAAoB;IAClC,CAAC;IAAAH,eAAA,mBAEiB,MAAY;MAC5B;MACA,IAAI,IAAI,CAACM,wCAAwC,KAAK,IAAI,EAAE;QAC1D,IAAI,CAACA,wCAAwC,CAACC,MAAM,CAAC,CAAC;QACtD,IAAI,CAACD,wCAAwC,GAAG,IAAI;MACtD;;MAEA;MACA,IAAI,IAAI,CAACE,qBAAqB,KAAK,IAAI,EAAE;QACvCC,YAAY,CAAC,IAAI,CAACD,qBAAqB,CAAC;QACxC,IAAI,CAACA,qBAAqB,GAAG,IAAI;MACnC;IACF,CAAC;IA5JC,IAAI,CAACE,cAAc,GAAGZ,aAAa;IACnC,IAAI,CAACM,SAAS,GAAGL,QAAQ;EAC3B;AA2JF"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js -index f9a0320..5c9c6bf 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js -@@ -6,9 +6,11 @@ - * - * @format - */ -+ - import { NativeEventEmitter } from 'react-native'; --import RNCNetInfo from './nativeModule'; // Produce an error if we don't have the native module -+import RNCNetInfo from './nativeModule'; - -+// Produce an error if we don't have the native module - if (!RNCNetInfo) { - throw new Error(`@react-native-community/netinfo: NativeModule.RNCNetInfo is null. To fix this issue try these steps: - -@@ -20,26 +22,26 @@ if (!RNCNetInfo) { - - If none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-netinfo`); - } -+ - /** - * We export the native interface in this way to give easy shared access to it between the - * JavaScript code and the tests - */ -- -- - let nativeEventEmitter = null; --export default { ...RNCNetInfo, -- -+export default { -+ configure: RNCNetInfo.configure, -+ addListener: RNCNetInfo.addListener, -+ removeListeners: RNCNetInfo.removeListeners, -+ getCurrentState: RNCNetInfo.getCurrentState, - get eventEmitter() { - if (!nativeEventEmitter) { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - /// @ts-ignore - nativeEventEmitter = new NativeEventEmitter(RNCNetInfo); -- } // eslint-disable-next-line @typescript-eslint/ban-ts-comment -+ } -+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment - /// @ts-ignore -- -- - return nativeEventEmitter; - } -- - }; - //# sourceMappingURL=nativeInterface.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js.map -index 084d180..be2bae7 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js.map -@@ -1 +1 @@ --{"version":3,"sources":["nativeInterface.ts"],"names":["NativeEventEmitter","RNCNetInfo","Error","nativeEventEmitter","eventEmitter"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAAQA,kBAAR,QAAiC,cAAjC;AACA,OAAOC,UAAP,MAAuB,gBAAvB,C,CAEA;;AACA,IAAI,CAACA,UAAL,EAAiB;AACf,QAAM,IAAIC,KAAJ,CAAW;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8IARQ,CAAN;AASD;AAED;AACA;AACA;AACA;;;AACA,IAAIC,kBAA6C,GAAG,IAApD;AACA,eAAe,EACb,GAAGF,UADU;;AAEb,MAAIG,YAAJ,GAAuC;AACrC,QAAI,CAACD,kBAAL,EAAyB;AACvB;AACA;AACAA,MAAAA,kBAAkB,GAAG,IAAIH,kBAAJ,CAAuBC,UAAvB,CAArB;AACD,KALoC,CAMrC;AACA;;;AACA,WAAOE,kBAAP;AACD;;AAXY,CAAf","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\n\n// Produce an error if we don't have the native module\nif (!RNCNetInfo) {\n throw new Error(`@react-native-community/netinfo: NativeModule.RNCNetInfo is null. To fix this issue try these steps:\n\n• Run \\`react-native link @react-native-community/netinfo\\` in the project root.\n• Rebuild and re-run the app.\n• If you are using CocoaPods on iOS, run \\`pod install\\` in the \\`ios\\` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n• Check that the library was linked correctly when you used the link command by running through the manual installation instructions in the README.\n* If you are getting this error while unit testing you need to mock the native module. Follow the guide in the README.\n\nIf none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-netinfo`);\n}\n\n/**\n * We export the native interface in this way to give easy shared access to it between the\n * JavaScript code and the tests\n */\nlet nativeEventEmitter: NativeEventEmitter | null = null;\nexport default {\n ...RNCNetInfo,\n get eventEmitter(): NativeEventEmitter {\n if (!nativeEventEmitter) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n nativeEventEmitter = new NativeEventEmitter(RNCNetInfo);\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n return nativeEventEmitter;\n },\n};\n"]} -\ No newline at end of file -+{"version":3,"names":["NativeEventEmitter","RNCNetInfo","Error","nativeEventEmitter","configure","addListener","removeListeners","getCurrentState","eventEmitter"],"sources":["nativeInterface.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\n\n// Produce an error if we don't have the native module\nif (!RNCNetInfo) {\n throw new Error(`@react-native-community/netinfo: NativeModule.RNCNetInfo is null. To fix this issue try these steps:\n\n• Run \\`react-native link @react-native-community/netinfo\\` in the project root.\n• Rebuild and re-run the app.\n• If you are using CocoaPods on iOS, run \\`pod install\\` in the \\`ios\\` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n• Check that the library was linked correctly when you used the link command by running through the manual installation instructions in the README.\n* If you are getting this error while unit testing you need to mock the native module. Follow the guide in the README.\n\nIf none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-netinfo`);\n}\n\n/**\n * We export the native interface in this way to give easy shared access to it between the\n * JavaScript code and the tests\n */\nlet nativeEventEmitter: NativeEventEmitter | null = null;\n\nexport default {\n configure: RNCNetInfo.configure,\n addListener: RNCNetInfo.addListener,\n removeListeners: RNCNetInfo.removeListeners,\n getCurrentState: RNCNetInfo.getCurrentState,\n get eventEmitter(): NativeEventEmitter {\n if (!nativeEventEmitter) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n nativeEventEmitter = new NativeEventEmitter(RNCNetInfo);\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n return nativeEventEmitter;\n },\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAQA,kBAAkB,QAAO,cAAc;AAC/C,OAAOC,UAAU,MAAM,gBAAgB;;AAEvC;AACA,IAAI,CAACA,UAAU,EAAE;EACf,MAAM,IAAIC,KAAK,CAAE;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8IAA8I,CAAC;AAC/I;;AAEA;AACA;AACA;AACA;AACA,IAAIC,kBAA6C,GAAG,IAAI;AAExD,eAAe;EACbC,SAAS,EAAEH,UAAU,CAACG,SAAS;EAC/BC,WAAW,EAAEJ,UAAU,CAACI,WAAW;EACnCC,eAAe,EAAEL,UAAU,CAACK,eAAe;EAC3CC,eAAe,EAAEN,UAAU,CAACM,eAAe;EAC3C,IAAIC,YAAYA,CAAA,EAAuB;IACrC,IAAI,CAACL,kBAAkB,EAAE;MACvB;MACA;MACAA,kBAAkB,GAAG,IAAIH,kBAAkB,CAACC,UAAU,CAAC;IACzD;IACA;IACA;IACA,OAAOE,kBAAkB;EAC3B;AACF,CAAC"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js -index 2effbe1..90042df 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js -@@ -6,15 +6,18 @@ - * - * @format - */ -+ - import { NativeEventEmitter } from 'react-native'; - import RNCNetInfo from './nativeModule'; - import { DEVICE_CONNECTIVITY_EVENT } from './privateTypes'; --const nativeEventEmitter = new NativeEventEmitter(); // Listen to connectivity events -+const nativeEventEmitter = new NativeEventEmitter(); - -+// Listen to connectivity events - RNCNetInfo.addListener(DEVICE_CONNECTIVITY_EVENT, event => { - nativeEventEmitter.emit(DEVICE_CONNECTIVITY_EVENT, event); - }); --export default { ...RNCNetInfo, -+export default { -+ ...RNCNetInfo, - eventEmitter: nativeEventEmitter - }; - //# sourceMappingURL=nativeInterface.web.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js.map -index 0a0bf4f..c0c0af8 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js.map -@@ -1 +1 @@ --{"version":3,"sources":["nativeInterface.web.ts"],"names":["NativeEventEmitter","RNCNetInfo","DEVICE_CONNECTIVITY_EVENT","nativeEventEmitter","addListener","event","emit","eventEmitter"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAAQA,kBAAR,QAAiC,cAAjC;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AACA,SAAQC,yBAAR,QAAwC,gBAAxC;AAEA,MAAMC,kBAAkB,GAAG,IAAIH,kBAAJ,EAA3B,C,CAEA;;AACAC,UAAU,CAACG,WAAX,CACEF,yBADF,EAEGG,KAAD,IAAiB;AACfF,EAAAA,kBAAkB,CAACG,IAAnB,CAAwBJ,yBAAxB,EAAmDG,KAAnD;AACD,CAJH;AAOA,eAAe,EACb,GAAGJ,UADU;AAEbM,EAAAA,YAAY,EAAEJ;AAFD,CAAf","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\nimport {DEVICE_CONNECTIVITY_EVENT} from './privateTypes';\n\nconst nativeEventEmitter = new NativeEventEmitter();\n\n// Listen to connectivity events\nRNCNetInfo.addListener(\n DEVICE_CONNECTIVITY_EVENT,\n (event): void => {\n nativeEventEmitter.emit(DEVICE_CONNECTIVITY_EVENT, event);\n },\n);\n\nexport default {\n ...RNCNetInfo,\n eventEmitter: nativeEventEmitter,\n};\n"]} -\ No newline at end of file -+{"version":3,"names":["NativeEventEmitter","RNCNetInfo","DEVICE_CONNECTIVITY_EVENT","nativeEventEmitter","addListener","event","emit","eventEmitter"],"sources":["nativeInterface.web.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\nimport {DEVICE_CONNECTIVITY_EVENT} from './privateTypes';\n\nconst nativeEventEmitter = new NativeEventEmitter();\n\n// Listen to connectivity events\nRNCNetInfo.addListener(DEVICE_CONNECTIVITY_EVENT, (event): void => {\n nativeEventEmitter.emit(DEVICE_CONNECTIVITY_EVENT, event);\n});\n\nexport default {\n ...RNCNetInfo,\n eventEmitter: nativeEventEmitter,\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAQA,kBAAkB,QAAO,cAAc;AAC/C,OAAOC,UAAU,MAAM,gBAAgB;AACvC,SAAQC,yBAAyB,QAAO,gBAAgB;AAExD,MAAMC,kBAAkB,GAAG,IAAIH,kBAAkB,CAAC,CAAC;;AAEnD;AACAC,UAAU,CAACG,WAAW,CAACF,yBAAyB,EAAGG,KAAK,IAAW;EACjEF,kBAAkB,CAACG,IAAI,CAACJ,yBAAyB,EAAEG,KAAK,CAAC;AAC3D,CAAC,CAAC;AAEF,eAAe;EACb,GAAGJ,UAAU;EACbM,YAAY,EAAEJ;AAChB,CAAC"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js -index 11b32ce..4d606d8 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js -@@ -6,7 +6,16 @@ - * - * @format - */ -+ - import { NativeModules } from 'react-native'; --const RNCNetInfo = NativeModules.RNCNetInfo; -+// React Native sets `__turboModuleProxy` on global when TurboModules are enabled. -+// Currently, this is the recommended way to detect TurboModules. -+// https://reactnative.dev/docs/the-new-architecture/backward-compatibility-turbomodules#unify-the-javascript-specs -+// eslint-disable-next-line @typescript-eslint/ban-ts-comment -+// @ts-ignore -+const isTurboModuleEnabled = global.__turboModuleProxy != null; -+const RNCNetInfo = isTurboModuleEnabled ? -+// eslint-disable-next-line @typescript-eslint/no-var-requires -+require('./NativeRNCNetInfo').default : NativeModules.RNCNetInfo; - export default RNCNetInfo; - //# sourceMappingURL=nativeModule.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js.map -index 4599032..7df218b 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js.map -@@ -1 +1 @@ --{"version":3,"sources":["nativeModule.ts"],"names":["NativeModules","RNCNetInfo"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAAQA,aAAR,QAA4B,cAA5B;AAGA,MAAMC,UAA+B,GAAGD,aAAa,CAACC,UAAtD;AAEA,eAAeA,UAAf","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeModules} from 'react-native';\nimport {NetInfoNativeModule} from './privateTypes';\n\nconst RNCNetInfo: NetInfoNativeModule = NativeModules.RNCNetInfo;\n\nexport default RNCNetInfo;\n"]} -\ No newline at end of file -+{"version":3,"names":["NativeModules","isTurboModuleEnabled","global","__turboModuleProxy","RNCNetInfo","require","default"],"sources":["nativeModule.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeModules} from 'react-native';\nimport {NetInfoNativeModule} from './privateTypes';\n\n// React Native sets `__turboModuleProxy` on global when TurboModules are enabled.\n// Currently, this is the recommended way to detect TurboModules.\n// https://reactnative.dev/docs/the-new-architecture/backward-compatibility-turbomodules#unify-the-javascript-specs\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst isTurboModuleEnabled = global.__turboModuleProxy != null;\n\nconst RNCNetInfo: NetInfoNativeModule = isTurboModuleEnabled\n ? // eslint-disable-next-line @typescript-eslint/no-var-requires\n require('./NativeRNCNetInfo').default\n : NativeModules.RNCNetInfo;\n\nexport default RNCNetInfo;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAQA,aAAa,QAAO,cAAc;AAG1C;AACA;AACA;AACA;AACA;AACA,MAAMC,oBAAoB,GAAGC,MAAM,CAACC,kBAAkB,IAAI,IAAI;AAE9D,MAAMC,UAA+B,GAAGH,oBAAoB;AACxD;AACAI,OAAO,CAAC,oBAAoB,CAAC,CAACC,OAAO,GACrCN,aAAa,CAACI,UAAU;AAE5B,eAAeA,UAAU"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js -index 32f2ca5..5547977 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js -@@ -6,15 +6,26 @@ - * - * @format - */ -+ - import { DEVICE_CONNECTIVITY_EVENT } from './privateTypes'; --import { NetInfoCellularGeneration, NetInfoStateType } from './types'; // See https://wicg.github.io/netinfo/#dom-connectiontype -+import { NetInfoCellularGeneration, NetInfoStateType } from './types'; -+ -+// See https://wicg.github.io/netinfo/#dom-connectiontype -+ -+// See https://wicg.github.io/netinfo/#dom-effectiveconnectiontype -+ -+// https://wicg.github.io/netinfo/#dom-networkinformation-savedata -+ -+// Create (optional) connection APIs on navigator - - // Use a constant test of this form because in SSR on next.js, optional chaining is not sufficient, - // but this test correctly detects that window is not available and allows for conditionals before access --const isWindowPresent = typeof window !== 'undefined'; // Check if window exists and if the browser supports the connection API -+const isWindowPresent = typeof window !== 'undefined'; - --const connection = isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS') ? window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection : undefined; // Map browser types to native types -+// Check if window exists and if the browser supports the connection API -+const connection = isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS') ? window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection : undefined; - -+// Map browser types to native types - const typeMapping = { - bluetooth: NetInfoStateType.bluetooth, - cellular: NetInfoStateType.cellular, -@@ -31,17 +42,20 @@ const effectiveTypeMapping = { - '3g': NetInfoCellularGeneration['3g'], - '4g': NetInfoCellularGeneration['4g'], - 'slow-2g': NetInfoCellularGeneration['2g'] --}; // Determine current state of connection -+}; - -+// Determine current state of connection - const getCurrentState = _requestedInterface => { - const isConnected = isWindowPresent ? navigator.onLine : false; - const baseState = { - isInternetReachable: null -- }; // If we don't have a connection object, we return minimal information -+ }; - -+ // If we don't have a connection object, we return minimal information - if (!connection) { - if (isConnected) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type: NetInfoStateType.other, - details: { -@@ -50,22 +64,22 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } -- -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: false, - isInternetReachable: false, - type: NetInfoStateType.none, - details: null - }; - return state; -- } // Otherwise try to return detailed information -- -+ } - -+ // Otherwise try to return detailed information - const isConnectionExpensive = connection.saveData; - const type = connection.type ? typeMapping[connection.type] : isConnected ? NetInfoStateType.other : NetInfoStateType.unknown; -- - if (type === NetInfoStateType.bluetooth) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type, - details: { -@@ -74,7 +88,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === NetInfoStateType.cellular) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type, - details: { -@@ -85,7 +100,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === NetInfoStateType.ethernet) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type, - details: { -@@ -96,7 +112,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === NetInfoStateType.wifi) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type, - details: { -@@ -114,7 +131,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === NetInfoStateType.wimax) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type, - details: { -@@ -123,7 +141,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === NetInfoStateType.none) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: false, - isInternetReachable: false, - type, -@@ -131,7 +150,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === NetInfoStateType.unknown) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected, - isInternetReachable: null, - type, -@@ -139,8 +159,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } -- -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type: NetInfoStateType.other, - details: { -@@ -149,7 +169,6 @@ const getCurrentState = _requestedInterface => { - }; - return state; - }; -- - const handlers = []; - const nativeHandlers = []; - const RNCNetInfo = { -@@ -160,7 +179,6 @@ const RNCNetInfo = { - const nativeHandler = () => { - handler(getCurrentState()); - }; -- - if (connection) { - connection.addEventListener('change', nativeHandler); - } else { -@@ -168,16 +186,15 @@ const RNCNetInfo = { - window.addEventListener('online', nativeHandler, false); - window.addEventListener('offline', nativeHandler, false); - } -- } // Remember handlers -- -+ } - -+ // Remember handlers - handlers.push(handler); - nativeHandlers.push(nativeHandler); - break; - } - } - }, -- - removeListeners(type, handler) { - switch (type) { - case DEVICE_CONNECTIVITY_EVENT: -@@ -185,7 +202,6 @@ const RNCNetInfo = { - // Get native handler - const index = handlers.indexOf(handler); - const nativeHandler = nativeHandlers[index]; -- - if (connection) { - connection.removeEventListener('change', nativeHandler); - } else { -@@ -193,24 +209,21 @@ const RNCNetInfo = { - window.removeEventListener('online', nativeHandler); - window.removeEventListener('offline', nativeHandler); - } -- } // Remove handlers -- -+ } - -+ // Remove handlers - handlers.splice(index, 1); - nativeHandlers.splice(index, 1); - break; - } - } - }, -- - async getCurrentState(requestedInterface) { - return getCurrentState(requestedInterface); - }, -- - configure() { - return; - } -- - }; - export default RNCNetInfo; - //# sourceMappingURL=nativeModule.web.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js.map -index 2b50d96..0bdd63e 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js.map -@@ -1 +1 @@ --{"version":3,"sources":["nativeModule.web.ts"],"names":["DEVICE_CONNECTIVITY_EVENT","NetInfoCellularGeneration","NetInfoStateType","isWindowPresent","window","connection","hasOwnProperty","navigator","mozConnection","webkitConnection","undefined","typeMapping","bluetooth","cellular","ethernet","none","other","unknown","wifi","wimax","mixed","effectiveTypeMapping","getCurrentState","_requestedInterface","isConnected","onLine","baseState","isInternetReachable","state","type","details","isConnectionExpensive","saveData","cellularGeneration","effectiveType","carrier","ipAddress","subnet","ssid","bssid","strength","frequency","linkSpeed","rxLinkSpeed","txLinkSpeed","handlers","nativeHandlers","RNCNetInfo","addListener","handler","nativeHandler","addEventListener","push","removeListeners","index","indexOf","removeEventListener","splice","requestedInterface","configure"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SACEA,yBADF,QAIO,gBAJP;AAKA,SAEEC,yBAFF,EAQEC,gBARF,QAYO,SAZP,C,CAcA;;AA4CA;AACA;AACA,MAAMC,eAAe,GAAG,OAAOC,MAAP,KAAkB,WAA1C,C,CAEA;;AACA,MAAMC,UAAU,GAAIF,eAAe,IAAI,CAACC,MAAM,CAACE,cAAP,CAAsB,OAAtB,CAApB,IAAsD,CAACF,MAAM,CAACE,cAAP,CAAsB,OAAtB,CAAxD,GACfF,MAAM,CAACG,SAAP,CAAiBF,UAAjB,IACAD,MAAM,CAACG,SAAP,CAAiBC,aADjB,IAEAJ,MAAM,CAACG,SAAP,CAAiBE,gBAHF,GAIfC,SAJJ,C,CAMA;;AACA,MAAMC,WAAqD,GAAG;AAC5DC,EAAAA,SAAS,EAAEV,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,WAAK7B,yBAAL;AAAgC;AAC9B;AACA,gBAAMsD,KAAK,GAAGT,QAAQ,CAACU,OAAT,CAAiBN,OAAjB,CAAd;AACA,gBAAMC,aAAa,GAAGJ,cAAc,CAACQ,KAAD,CAApC;;AAEA,cAAIjD,UAAJ,EAAgB;AACdA,YAAAA,UAAU,CAACmD,mBAAX,CAA+B,QAA/B,EAAyCN,aAAzC;AACD,WAFD,MAEO;AACL,gBAAI/C,eAAJ,EAAqB;AACnBC,cAAAA,MAAM,CAACoD,mBAAP,CAA2B,QAA3B,EAAqCN,aAArC;AACA9C,cAAAA,MAAM,CAACoD,mBAAP,CAA2B,SAA3B,EAAsCN,aAAtC;AACD;AACF,WAZ6B,CAc9B;;;AACAL,UAAAA,QAAQ,CAACY,MAAT,CAAgBH,KAAhB,EAAuB,CAAvB;AACAR,UAAAA,cAAc,CAACW,MAAf,CAAsBH,KAAtB,EAA6B,CAA7B;AAEA;AACD;AApBH;AAsBD,GAjDqC;;AAmDtC,QAAMhC,eAAN,CAAsBoC,kBAAtB,EAA6E;AAC3E,WAAOpC,eAAe,CAACoC,kBAAD,CAAtB;AACD,GArDqC;;AAuDtCC,EAAAA,SAAS,GAAS;AAChB;AACD;;AAzDqC,CAAxC;AA4DA,eAAeZ,UAAf","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {\n DEVICE_CONNECTIVITY_EVENT,\n NetInfoNativeModule,\n NetInfoNativeModuleState,\n} from './privateTypes';\nimport {\n NetInfoBluetoothState,\n NetInfoCellularGeneration,\n NetInfoCellularState,\n NetInfoEthernetState,\n NetInfoNoConnectionState,\n NetInfoOtherState,\n NetInfoState,\n NetInfoStateType,\n NetInfoUnknownState,\n NetInfoWifiState,\n NetInfoWimaxState,\n} from './types';\n\n// See https://wicg.github.io/netinfo/#dom-connectiontype\ntype ConnectionType =\n | 'bluetooth'\n | 'cellular'\n | 'ethernet'\n | 'mixed'\n | 'none'\n | 'other'\n | 'unknown'\n | 'wifi'\n | 'wimax';\n\n// See https://wicg.github.io/netinfo/#dom-effectiveconnectiontype\ntype ConnectionEffectiveType = '2g' | '3g' | '4g' | 'slow-2g';\n\n// https://wicg.github.io/netinfo/#dom-networkinformation-savedata\ntype ConnectionSaveData = boolean;\n\ninterface Events {\n change: Event;\n}\n\ninterface Connection {\n type: ConnectionType;\n effectiveType: ConnectionEffectiveType;\n saveData: ConnectionSaveData;\n addEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\n// Create (optional) connection APIs on navigator\ndeclare global {\n interface Navigator {\n connection?: Connection;\n mozConnection?: Connection;\n webkitConnection?: Connection;\n }\n}\n// Use a constant test of this form because in SSR on next.js, optional chaining is not sufficient,\n// but this test correctly detects that window is not available and allows for conditionals before access\nconst isWindowPresent = typeof window !== 'undefined';\n\n// Check if window exists and if the browser supports the connection API\nconst connection = (isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS'))\n ? window.navigator.connection ||\n window.navigator.mozConnection ||\n window.navigator.webkitConnection\n : undefined;\n\n// Map browser types to native types\nconst typeMapping: Record = {\n bluetooth: NetInfoStateType.bluetooth,\n cellular: NetInfoStateType.cellular,\n ethernet: NetInfoStateType.ethernet,\n none: NetInfoStateType.none,\n other: NetInfoStateType.other,\n unknown: NetInfoStateType.unknown,\n wifi: NetInfoStateType.wifi,\n wimax: NetInfoStateType.wimax,\n mixed: NetInfoStateType.other,\n};\nconst effectiveTypeMapping: Record<\n ConnectionEffectiveType,\n NetInfoCellularGeneration\n> = {\n '2g': NetInfoCellularGeneration['2g'],\n '3g': NetInfoCellularGeneration['3g'],\n '4g': NetInfoCellularGeneration['4g'],\n 'slow-2g': NetInfoCellularGeneration['2g'],\n};\n\n// Determine current state of connection\nconst getCurrentState = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _requestedInterface?: string,\n): Pick> => {\n const isConnected = isWindowPresent ? navigator.onLine : false;\n const baseState = {\n isInternetReachable: null,\n };\n\n // If we don't have a connection object, we return minimal information\n if (!connection) {\n if (isConnected) {\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive: false,\n },\n };\n return state;\n }\n\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type: NetInfoStateType.none,\n details: null,\n };\n return state;\n }\n\n // Otherwise try to return detailed information\n const isConnectionExpensive = connection.saveData;\n const type: NetInfoStateType = connection.type\n ? typeMapping[connection.type]\n : isConnected\n ? NetInfoStateType.other\n : NetInfoStateType.unknown;\n\n if (type === NetInfoStateType.bluetooth) {\n const state: NetInfoBluetoothState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.cellular) {\n const state: NetInfoCellularState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n cellularGeneration:\n effectiveTypeMapping[connection.effectiveType] || null,\n carrier: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.ethernet) {\n const state: NetInfoEthernetState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ipAddress: null,\n subnet: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wifi) {\n const state: NetInfoWifiState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ssid: null,\n bssid: null,\n strength: null,\n ipAddress: null,\n subnet: null,\n frequency: null,\n linkSpeed: null,\n rxLinkSpeed: null,\n txLinkSpeed: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wimax) {\n const state: NetInfoWimaxState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.none) {\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type,\n details: null,\n };\n return state;\n } else if (type === NetInfoStateType.unknown) {\n const state: NetInfoUnknownState = {\n ...baseState,\n isConnected,\n isInternetReachable: null,\n type,\n details: null,\n };\n return state;\n }\n\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n};\n\nconst handlers: ((state: NetInfoNativeModuleState) => void)[] = [];\nconst nativeHandlers: (() => void)[] = [];\n\nconst RNCNetInfo: NetInfoNativeModule = {\n addListener(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n const nativeHandler = (): void => {\n handler(getCurrentState());\n };\n\n if (connection) {\n connection.addEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.addEventListener('online', nativeHandler, false);\n window.addEventListener('offline', nativeHandler, false);\n }\n }\n\n // Remember handlers\n handlers.push(handler);\n nativeHandlers.push(nativeHandler);\n\n break;\n }\n }\n },\n\n removeListeners(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n // Get native handler\n const index = handlers.indexOf(handler);\n const nativeHandler = nativeHandlers[index];\n\n if (connection) {\n connection.removeEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.removeEventListener('online', nativeHandler);\n window.removeEventListener('offline', nativeHandler);\n }\n }\n\n // Remove handlers\n handlers.splice(index, 1);\n nativeHandlers.splice(index, 1);\n\n break;\n }\n }\n },\n\n async getCurrentState(requestedInterface): Promise {\n return getCurrentState(requestedInterface);\n },\n\n configure(): void {\n return;\n },\n};\n\nexport default RNCNetInfo;\n"]} -\ No newline at end of file -+{"version":3,"names":["DEVICE_CONNECTIVITY_EVENT","NetInfoCellularGeneration","NetInfoStateType","isWindowPresent","window","connection","hasOwnProperty","navigator","mozConnection","webkitConnection","undefined","typeMapping","bluetooth","cellular","ethernet","none","other","unknown","wifi","wimax","mixed","effectiveTypeMapping","getCurrentState","_requestedInterface","isConnected","onLine","baseState","isInternetReachable","state","type","details","isConnectionExpensive","saveData","cellularGeneration","effectiveType","carrier","ipAddress","subnet","ssid","bssid","strength","frequency","linkSpeed","rxLinkSpeed","txLinkSpeed","handlers","nativeHandlers","RNCNetInfo","addListener","handler","nativeHandler","addEventListener","push","removeListeners","index","indexOf","removeEventListener","splice","requestedInterface","configure"],"sources":["nativeModule.web.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {\n DEVICE_CONNECTIVITY_EVENT,\n NetInfoNativeModule,\n NetInfoNativeModuleState,\n} from './privateTypes';\nimport {\n NetInfoBluetoothState,\n NetInfoCellularGeneration,\n NetInfoCellularState,\n NetInfoEthernetState,\n NetInfoNoConnectionState,\n NetInfoOtherState,\n NetInfoState,\n NetInfoStateType,\n NetInfoUnknownState,\n NetInfoWifiState,\n NetInfoWimaxState,\n} from './types';\n\n// See https://wicg.github.io/netinfo/#dom-connectiontype\ntype ConnectionType =\n | 'bluetooth'\n | 'cellular'\n | 'ethernet'\n | 'mixed'\n | 'none'\n | 'other'\n | 'unknown'\n | 'wifi'\n | 'wimax';\n\n// See https://wicg.github.io/netinfo/#dom-effectiveconnectiontype\ntype ConnectionEffectiveType = '2g' | '3g' | '4g' | 'slow-2g';\n\n// https://wicg.github.io/netinfo/#dom-networkinformation-savedata\ntype ConnectionSaveData = boolean;\n\ninterface Events {\n change: Event;\n}\n\ninterface Connection {\n type: ConnectionType;\n effectiveType: ConnectionEffectiveType;\n saveData: ConnectionSaveData;\n addEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\n// Create (optional) connection APIs on navigator\ndeclare global {\n interface Navigator {\n connection?: Connection;\n mozConnection?: Connection;\n webkitConnection?: Connection;\n }\n}\n// Use a constant test of this form because in SSR on next.js, optional chaining is not sufficient,\n// but this test correctly detects that window is not available and allows for conditionals before access\nconst isWindowPresent = typeof window !== 'undefined';\n\n// Check if window exists and if the browser supports the connection API\nconst connection = (isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS'))\n ? window.navigator.connection ||\n window.navigator.mozConnection ||\n window.navigator.webkitConnection\n : undefined;\n\n// Map browser types to native types\nconst typeMapping: Record = {\n bluetooth: NetInfoStateType.bluetooth,\n cellular: NetInfoStateType.cellular,\n ethernet: NetInfoStateType.ethernet,\n none: NetInfoStateType.none,\n other: NetInfoStateType.other,\n unknown: NetInfoStateType.unknown,\n wifi: NetInfoStateType.wifi,\n wimax: NetInfoStateType.wimax,\n mixed: NetInfoStateType.other,\n};\nconst effectiveTypeMapping: Record<\n ConnectionEffectiveType,\n NetInfoCellularGeneration\n> = {\n '2g': NetInfoCellularGeneration['2g'],\n '3g': NetInfoCellularGeneration['3g'],\n '4g': NetInfoCellularGeneration['4g'],\n 'slow-2g': NetInfoCellularGeneration['2g'],\n};\n\n// Determine current state of connection\nconst getCurrentState = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _requestedInterface?: string,\n): Pick> => {\n const isConnected = isWindowPresent ? navigator.onLine : false;\n const baseState = {\n isInternetReachable: null,\n };\n\n // If we don't have a connection object, we return minimal information\n if (!connection) {\n if (isConnected) {\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive: false,\n },\n };\n return state;\n }\n\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type: NetInfoStateType.none,\n details: null,\n };\n return state;\n }\n\n // Otherwise try to return detailed information\n const isConnectionExpensive = connection.saveData;\n const type: NetInfoStateType = connection.type\n ? typeMapping[connection.type]\n : isConnected\n ? NetInfoStateType.other\n : NetInfoStateType.unknown;\n\n if (type === NetInfoStateType.bluetooth) {\n const state: NetInfoBluetoothState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.cellular) {\n const state: NetInfoCellularState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n cellularGeneration:\n effectiveTypeMapping[connection.effectiveType] || null,\n carrier: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.ethernet) {\n const state: NetInfoEthernetState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ipAddress: null,\n subnet: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wifi) {\n const state: NetInfoWifiState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ssid: null,\n bssid: null,\n strength: null,\n ipAddress: null,\n subnet: null,\n frequency: null,\n linkSpeed: null,\n rxLinkSpeed: null,\n txLinkSpeed: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wimax) {\n const state: NetInfoWimaxState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.none) {\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type,\n details: null,\n };\n return state;\n } else if (type === NetInfoStateType.unknown) {\n const state: NetInfoUnknownState = {\n ...baseState,\n isConnected,\n isInternetReachable: null,\n type,\n details: null,\n };\n return state;\n }\n\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n};\n\nconst handlers: ((state: NetInfoNativeModuleState) => void)[] = [];\nconst nativeHandlers: (() => void)[] = [];\n\nconst RNCNetInfo: NetInfoNativeModule = {\n addListener(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n const nativeHandler = (): void => {\n handler(getCurrentState());\n };\n\n if (connection) {\n connection.addEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.addEventListener('online', nativeHandler, false);\n window.addEventListener('offline', nativeHandler, false);\n }\n }\n\n // Remember handlers\n handlers.push(handler);\n nativeHandlers.push(nativeHandler);\n\n break;\n }\n }\n },\n\n removeListeners(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n // Get native handler\n const index = handlers.indexOf(handler);\n const nativeHandler = nativeHandlers[index];\n\n if (connection) {\n connection.removeEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.removeEventListener('online', nativeHandler);\n window.removeEventListener('offline', nativeHandler);\n }\n }\n\n // Remove handlers\n handlers.splice(index, 1);\n nativeHandlers.splice(index, 1);\n\n break;\n }\n }\n },\n\n async getCurrentState(requestedInterface): Promise {\n return getCurrentState(requestedInterface);\n },\n\n configure(): void {\n return;\n },\n};\n\nexport default RNCNetInfo;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,yBAAyB,QAGpB,gBAAgB;AACvB,SAEEC,yBAAyB,EAMzBC,gBAAgB,QAIX,SAAS;;AAEhB;;AAYA;;AAGA;;AAqBA;;AAQA;AACA;AACA,MAAMC,eAAe,GAAG,OAAOC,MAAM,KAAK,WAAW;;AAErD;AACA,MAAMC,UAAU,GAAIF,eAAe,IAAI,CAACC,MAAM,CAACE,cAAc,CAAC,OAAO,CAAC,IAAI,CAACF,MAAM,CAACE,cAAc,CAAC,OAAO,CAAC,GACrGF,MAAM,CAACG,SAAS,CAACF,UAAU,IAC3BD,MAAM,CAACG,SAAS,CAACC,aAAa,IAC9BJ,MAAM,CAACG,SAAS,CAACE,gBAAgB,GACjCC,SAAS;;AAEb;AACA,MAAMC,WAAqD,GAAG;EAC5DC,SAAS,EAAEV,gBAAgB,CAACU,SAAS;EACrCC,QAAQ,EAAEX,gBAAgB,CAACW,QAAQ;EACnCC,QAAQ,EAAEZ,gBAAgB,CAACY,QAAQ;EACnCC,IAAI,EAAEb,gBAAgB,CAACa,IAAI;EAC3BC,KAAK,EAAEd,gBAAgB,CAACc,KAAK;EAC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,EAAE;cACnBC,MAAM,CAAC+C,gBAAgB,CAAC,QAAQ,EAAED,aAAa,EAAE,KAAK,CAAC;cACvD9C,MAAM,CAAC+C,gBAAgB,CAAC,SAAS,EAAED,aAAa,EAAE,KAAK,CAAC;YAC1D;UACF;;UAEA;UACAL,QAAQ,CAACO,IAAI,CAACH,OAAO,CAAC;UACtBH,cAAc,CAACM,IAAI,CAACF,aAAa,CAAC;UAElC;QACF;IACF;EACF,CAAC;EAEDG,eAAeA,CAACxB,IAAI,EAAEoB,OAAO,EAAQ;IACnC,QAAQpB,IAAI;MACV,KAAK7B,yBAAyB;QAAE;UAC9B;UACA,MAAMsD,KAAK,GAAGT,QAAQ,CAACU,OAAO,CAACN,OAAO,CAAC;UACvC,MAAMC,aAAa,GAAGJ,cAAc,CAACQ,KAAK,CAAC;UAE3C,IAAIjD,UAAU,EAAE;YACdA,UAAU,CAACmD,mBAAmB,CAAC,QAAQ,EAAEN,aAAa,CAAC;UACzD,CAAC,MAAM;YACL,IAAI/C,eAAe,EAAE;cACnBC,MAAM,CAACoD,mBAAmB,CAAC,QAAQ,EAAEN,aAAa,CAAC;cACnD9C,MAAM,CAACoD,mBAAmB,CAAC,SAAS,EAAEN,aAAa,CAAC;YACtD;UACF;;UAEA;UACAL,QAAQ,CAACY,MAAM,CAACH,KAAK,EAAE,CAAC,CAAC;UACzBR,cAAc,CAACW,MAAM,CAACH,KAAK,EAAE,CAAC,CAAC;UAE/B;QACF;IACF;EACF,CAAC;EAED,MAAMhC,eAAeA,CAACoC,kBAAkB,EAAqC;IAC3E,OAAOpC,eAAe,CAACoC,kBAAkB,CAAC;EAC5C,CAAC;EAEDC,SAASA,CAAA,EAAS;IAChB;EACF;AACF,CAAC;AAED,eAAeZ,UAAU"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js b/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js -index 4b88052..64831b1 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js -@@ -6,5 +6,8 @@ - * - * @format - */ --export const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange'; // Certain properties are optional when sent by the native module and are handled by the JS code -+ -+export const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange'; -+ -+// Certain properties are optional when sent by the native module and are handled by the JS code - //# sourceMappingURL=privateTypes.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js.map -index db99fe3..9ef56cb 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js.map -@@ -1 +1 @@ --{"version":3,"sources":["privateTypes.ts"],"names":["DEVICE_CONNECTIVITY_EVENT"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA,OAAO,MAAMA,yBAAyB,GAAG,gCAAlC,C,CAEP","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NetInfoConfiguration, NetInfoState} from './types';\n\nexport const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange';\n\n// Certain properties are optional when sent by the native module and are handled by the JS code\nexport type NetInfoNativeModuleState = Pick<\n NetInfoState,\n Exclude\n> & {isInternetReachable?: boolean};\n\nexport interface Events {\n [DEVICE_CONNECTIVITY_EVENT]: NetInfoNativeModuleState;\n}\n\nexport interface NetInfoNativeModule {\n configure: (config: Partial) => void;\n getCurrentState: (\n requestedInterface?: string,\n ) => Promise;\n addListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeListeners(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\nexport type NetInfoInternetReachabilityChangeListener = (\n isInternetReachable: boolean | null | undefined,\n) => void;\n"]} -\ No newline at end of file -+{"version":3,"names":["DEVICE_CONNECTIVITY_EVENT"],"sources":["privateTypes.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NetInfoConfiguration, NetInfoState} from './types';\n\nexport const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange';\n\n// Certain properties are optional when sent by the native module and are handled by the JS code\nexport type NetInfoNativeModuleState = Pick<\n NetInfoState,\n Exclude\n> & {isInternetReachable?: boolean};\n\nexport interface Events {\n [DEVICE_CONNECTIVITY_EVENT]: NetInfoNativeModuleState;\n}\n\nexport interface NetInfoNativeModule {\n configure: (config: Partial) => void;\n getCurrentState: (\n requestedInterface?: string,\n ) => Promise;\n addListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeListeners(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\nexport type NetInfoInternetReachabilityChangeListener = (\n isInternetReachable: boolean | null | undefined,\n) => void;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAO,MAAMA,yBAAyB,GAAG,gCAAgC;;AAEzE"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/state.js b/node_modules/@react-native-community/netinfo/lib/module/internal/state.js -index 305d286..7d12f6a 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/state.js -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/state.js -@@ -1,5 +1,6 @@ --function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -- -+function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -+function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -+function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } - /** - * Copyright (c) Facebook, Inc. and its affiliates. - * -@@ -8,72 +9,61 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope - * - * @format - */ -+ - import NativeInterface from './nativeInterface'; - import InternetReachability from './internetReachability'; - import * as PrivateTypes from './privateTypes'; - export default class State { - constructor(configuration) { - _defineProperty(this, "_nativeEventSubscription", null); -- - _defineProperty(this, "_subscriptions", new Set()); -- - _defineProperty(this, "_latestState", null); -- - _defineProperty(this, "_internetReachability", void 0); -- - _defineProperty(this, "_handleNativeStateUpdate", state => { - // Update the internet reachability module -- this._internetReachability.update(state); // Convert the state from native to JS shape -- -- -- const convertedState = this._convertState(state); // Update the listeners -+ this._internetReachability.update(state); - -+ // Convert the state from native to JS shape -+ const convertedState = this._convertState(state); - -+ // Update the listeners - this._latestState = convertedState; -- - this._subscriptions.forEach(handler => handler(convertedState)); - }); -- - _defineProperty(this, "_handleInternetReachabilityUpdate", isInternetReachable => { - if (!this._latestState) { - return; - } -- -- const nextState = { ...this._latestState, -+ const nextState = { -+ ...this._latestState, - isInternetReachable - }; - this._latestState = nextState; -- - this._subscriptions.forEach(handler => handler(nextState)); - }); -- - _defineProperty(this, "_fetchCurrentState", async requestedInterface => { -- const state = await NativeInterface.getCurrentState(requestedInterface); // Update the internet reachability module -- -- this._internetReachability.update(state); // Convert and store the new state -- -+ const state = await NativeInterface.getCurrentState(requestedInterface); - -+ // Update the internet reachability module -+ this._internetReachability.update(state); -+ // Convert and store the new state - const convertedState = this._convertState(state); -- - if (!requestedInterface) { - this._latestState = convertedState; -- - this._subscriptions.forEach(handler => handler(convertedState)); - } -- - return convertedState; - }); -- - _defineProperty(this, "_convertState", input => { - if (typeof input.isInternetReachable === 'boolean') { - return input; - } else { -- return { ...input, -+ return { -+ ...input, - isInternetReachable: this._internetReachability.currentState() - }; - } - }); -- - _defineProperty(this, "latest", requestedInterface => { - if (requestedInterface) { - return this._fetchCurrentState(requestedInterface); -@@ -83,42 +73,37 @@ export default class State { - return this._fetchCurrentState(); - } - }); -- - _defineProperty(this, "add", handler => { - // Add the subscription handler to our set -- this._subscriptions.add(handler); // Send it the latest data we have -- -+ this._subscriptions.add(handler); - -+ // Send it the latest data we have - if (this._latestState) { - handler(this._latestState); - } else { - this.latest().then(handler); - } - }); -- - _defineProperty(this, "remove", handler => { - this._subscriptions.delete(handler); - }); -- - _defineProperty(this, "tearDown", () => { - if (this._internetReachability) { - this._internetReachability.tearDown(); - } -- - if (this._nativeEventSubscription) { - this._nativeEventSubscription.remove(); - } -- - this._subscriptions.clear(); - }); -- - // Add the listener to the internet connectivity events -- this._internetReachability = new InternetReachability(configuration, this._handleInternetReachabilityUpdate); // Add the subscription to the native events -+ this._internetReachability = new InternetReachability(configuration, this._handleInternetReachabilityUpdate); - -- this._nativeEventSubscription = NativeInterface.eventEmitter.addListener(PrivateTypes.DEVICE_CONNECTIVITY_EVENT, this._handleNativeStateUpdate); // Fetch the current state from the native module -+ // Add the subscription to the native events -+ this._nativeEventSubscription = NativeInterface.eventEmitter.addListener(PrivateTypes.DEVICE_CONNECTIVITY_EVENT, this._handleNativeStateUpdate); - -+ // Fetch the current state from the native module - this._fetchCurrentState(); - } -- - } - //# sourceMappingURL=state.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/state.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/state.js.map -index e6e8249..053e584 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/state.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/state.js.map -@@ -1 +1 @@ --{"version":3,"sources":["state.ts"],"names":["NativeInterface","InternetReachability","PrivateTypes","State","constructor","configuration","Set","state","_internetReachability","update","convertedState","_convertState","_latestState","_subscriptions","forEach","handler","isInternetReachable","nextState","requestedInterface","getCurrentState","input","currentState","_fetchCurrentState","Promise","resolve","add","latest","then","delete","tearDown","_nativeEventSubscription","remove","clear","_handleInternetReachabilityUpdate","eventEmitter","addListener","DEVICE_CONNECTIVITY_EVENT","_handleNativeStateUpdate"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,OAAOA,eAAP,MAA4B,mBAA5B;AACA,OAAOC,oBAAP,MAAiC,wBAAjC;AAEA,OAAO,KAAKC,YAAZ,MAA8B,gBAA9B;AAEA,eAAe,MAAMC,KAAN,CAAY;AAMzBC,EAAAA,WAAW,CAACC,aAAD,EAA4C;AAAA,sDALY,IAKZ;;AAAA,4CAJ9B,IAAIC,GAAJ,EAI8B;;AAAA,0CAHL,IAGK;;AAAA;;AAAA,sDAkBrDC,KADiC,IAExB;AACT;AACA,WAAKC,qBAAL,CAA2BC,MAA3B,CAAkCF,KAAlC,EAFS,CAIT;;;AACA,YAAMG,cAAc,GAAG,KAAKC,aAAL,CAAmBJ,KAAnB,CAAvB,CALS,CAOT;;;AACA,WAAKK,YAAL,GAAoBF,cAApB;;AACA,WAAKG,cAAL,CAAoBC,OAApB,CAA6BC,OAAD,IAAmBA,OAAO,CAACL,cAAD,CAAtD;AACD,KA7BsD;;AAAA,+DAgCrDM,mBAD0C,IAEjC;AACT,UAAI,CAAC,KAAKJ,YAAV,EAAwB;AACtB;AACD;;AAED,YAAMK,SAAS,GAAG,EAChB,GAAG,KAAKL,YADQ;AAEhBI,QAAAA;AAFgB,OAAlB;AAIA,WAAKJ,YAAL,GAAoBK,SAApB;;AACA,WAAKJ,cAAL,CAAoBC,OAApB,CAA6BC,OAAD,IAAmBA,OAAO,CAACE,SAAD,CAAtD;AACD,KA5CsD;;AAAA,gDA8C3B,MAC1BC,kBAD0B,IAEM;AAChC,YAAM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L,CAAoBe,MAApB,CAA2Bb,OAA3B;AACD,KAtGsD;;AAAA,sCAwGrC,MAAY;AAC5B,UAAI,KAAKP,qBAAT,EAAgC;AAC9B,aAAKA,qBAAL,CAA2BqB,QAA3B;AACD;;AAED,UAAI,KAAKC,wBAAT,EAAmC;AACjC,aAAKA,wBAAL,CAA8BC,MAA9B;AACD;;AAED,WAAKlB,cAAL,CAAoBmB,KAApB;AACD,KAlHsD;;AACrD;AACA,SAAKxB,qBAAL,GAA6B,IAAIP,oBAAJ,CAC3BI,aAD2B,EAE3B,KAAK4B,iCAFsB,CAA7B,CAFqD,CAOrD;;AACA,SAAKH,wBAAL,GAAgC9B,eAAe,CAACkC,YAAhB,CAA6BC,WAA7B,CAC9BjC,YAAY,CAACkC,yBADiB,EAE9B,KAAKC,wBAFyB,CAAhC,CARqD,CAarD;;AACA,SAAKf,kBAAL;AACD;;AArBwB","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventSubscription} from 'react-native';\nimport NativeInterface from './nativeInterface';\nimport InternetReachability from './internetReachability';\nimport * as Types from './types';\nimport * as PrivateTypes from './privateTypes';\n\nexport default class State {\n private _nativeEventSubscription: NativeEventSubscription | null = null;\n private _subscriptions = new Set();\n private _latestState: Types.NetInfoState | null = null;\n private _internetReachability: InternetReachability;\n\n constructor(configuration: Types.NetInfoConfiguration) {\n // Add the listener to the internet connectivity events\n this._internetReachability = new InternetReachability(\n configuration,\n this._handleInternetReachabilityUpdate,\n );\n\n // Add the subscription to the native events\n this._nativeEventSubscription = NativeInterface.eventEmitter.addListener(\n PrivateTypes.DEVICE_CONNECTIVITY_EVENT,\n this._handleNativeStateUpdate,\n );\n\n // Fetch the current state from the native module\n this._fetchCurrentState();\n }\n\n private _handleNativeStateUpdate = (\n state: PrivateTypes.NetInfoNativeModuleState,\n ): void => {\n // Update the internet reachability module\n this._internetReachability.update(state);\n\n // Convert the state from native to JS shape\n const convertedState = this._convertState(state);\n\n // Update the listeners\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n };\n\n private _handleInternetReachabilityUpdate = (\n isInternetReachable: boolean | null | undefined,\n ): void => {\n if (!this._latestState) {\n return;\n }\n\n const nextState = {\n ...this._latestState,\n isInternetReachable,\n } as Types.NetInfoState;\n this._latestState = nextState;\n this._subscriptions.forEach((handler): void => handler(nextState));\n };\n\n public _fetchCurrentState = async (\n requestedInterface?: string,\n ): Promise => {\n const state = await NativeInterface.getCurrentState(requestedInterface);\n\n // Update the internet reachability module\n this._internetReachability.update(state);\n // Convert and store the new state\n const convertedState = this._convertState(state);\n if (!requestedInterface) {\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n }\n\n return convertedState;\n };\n\n private _convertState = (\n input: PrivateTypes.NetInfoNativeModuleState,\n ): Types.NetInfoState => {\n if (typeof input.isInternetReachable === 'boolean') {\n return input as Types.NetInfoState;\n } else {\n return {\n ...input,\n isInternetReachable: this._internetReachability.currentState(),\n } as Types.NetInfoState;\n }\n };\n\n public latest = (\n requestedInterface?: string,\n ): Promise => {\n if (requestedInterface) {\n return this._fetchCurrentState(requestedInterface);\n } else if (this._latestState) {\n return Promise.resolve(this._latestState);\n } else {\n return this._fetchCurrentState();\n }\n };\n\n public add = (handler: Types.NetInfoChangeHandler): void => {\n // Add the subscription handler to our set\n this._subscriptions.add(handler);\n\n // Send it the latest data we have\n if (this._latestState) {\n handler(this._latestState);\n } else {\n this.latest().then(handler);\n }\n };\n\n public remove = (handler: Types.NetInfoChangeHandler): void => {\n this._subscriptions.delete(handler);\n };\n\n public tearDown = (): void => {\n if (this._internetReachability) {\n this._internetReachability.tearDown();\n }\n\n if (this._nativeEventSubscription) {\n this._nativeEventSubscription.remove();\n }\n\n this._subscriptions.clear();\n };\n}\n"]} -\ No newline at end of file -+{"version":3,"names":["NativeInterface","InternetReachability","PrivateTypes","State","constructor","configuration","_defineProperty","Set","state","_internetReachability","update","convertedState","_convertState","_latestState","_subscriptions","forEach","handler","isInternetReachable","nextState","requestedInterface","getCurrentState","input","currentState","_fetchCurrentState","Promise","resolve","add","latest","then","delete","tearDown","_nativeEventSubscription","remove","clear","_handleInternetReachabilityUpdate","eventEmitter","addListener","DEVICE_CONNECTIVITY_EVENT","_handleNativeStateUpdate"],"sources":["state.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventSubscription} from 'react-native';\nimport NativeInterface from './nativeInterface';\nimport InternetReachability from './internetReachability';\nimport * as Types from './types';\nimport * as PrivateTypes from './privateTypes';\n\nexport default class State {\n private _nativeEventSubscription: NativeEventSubscription | null = null;\n private _subscriptions = new Set();\n private _latestState: Types.NetInfoState | null = null;\n private _internetReachability: InternetReachability;\n\n constructor(configuration: Types.NetInfoConfiguration) {\n // Add the listener to the internet connectivity events\n this._internetReachability = new InternetReachability(\n configuration,\n this._handleInternetReachabilityUpdate,\n );\n\n // Add the subscription to the native events\n this._nativeEventSubscription = NativeInterface.eventEmitter.addListener(\n PrivateTypes.DEVICE_CONNECTIVITY_EVENT,\n this._handleNativeStateUpdate,\n );\n\n // Fetch the current state from the native module\n this._fetchCurrentState();\n }\n\n private _handleNativeStateUpdate = (\n state: PrivateTypes.NetInfoNativeModuleState,\n ): void => {\n // Update the internet reachability module\n this._internetReachability.update(state);\n\n // Convert the state from native to JS shape\n const convertedState = this._convertState(state);\n\n // Update the listeners\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n };\n\n private _handleInternetReachabilityUpdate = (\n isInternetReachable: boolean | null | undefined,\n ): void => {\n if (!this._latestState) {\n return;\n }\n\n const nextState = {\n ...this._latestState,\n isInternetReachable,\n } as Types.NetInfoState;\n this._latestState = nextState;\n this._subscriptions.forEach((handler): void => handler(nextState));\n };\n\n public _fetchCurrentState = async (\n requestedInterface?: string,\n ): Promise => {\n const state = await NativeInterface.getCurrentState(requestedInterface);\n\n // Update the internet reachability module\n this._internetReachability.update(state);\n // Convert and store the new state\n const convertedState = this._convertState(state);\n if (!requestedInterface) {\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n }\n\n return convertedState;\n };\n\n private _convertState = (\n input: PrivateTypes.NetInfoNativeModuleState,\n ): Types.NetInfoState => {\n if (typeof input.isInternetReachable === 'boolean') {\n return input as Types.NetInfoState;\n } else {\n return {\n ...input,\n isInternetReachable: this._internetReachability.currentState(),\n } as Types.NetInfoState;\n }\n };\n\n public latest = (\n requestedInterface?: string,\n ): Promise => {\n if (requestedInterface) {\n return this._fetchCurrentState(requestedInterface);\n } else if (this._latestState) {\n return Promise.resolve(this._latestState);\n } else {\n return this._fetchCurrentState();\n }\n };\n\n public add = (handler: Types.NetInfoChangeHandler): void => {\n // Add the subscription handler to our set\n this._subscriptions.add(handler);\n\n // Send it the latest data we have\n if (this._latestState) {\n handler(this._latestState);\n } else {\n this.latest().then(handler);\n }\n };\n\n public remove = (handler: Types.NetInfoChangeHandler): void => {\n this._subscriptions.delete(handler);\n };\n\n public tearDown = (): void => {\n if (this._internetReachability) {\n this._internetReachability.tearDown();\n }\n\n if (this._nativeEventSubscription) {\n this._nativeEventSubscription.remove();\n }\n\n this._subscriptions.clear();\n };\n}\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAOA,eAAe,MAAM,mBAAmB;AAC/C,OAAOC,oBAAoB,MAAM,wBAAwB;AAEzD,OAAO,KAAKC,YAAY,MAAM,gBAAgB;AAE9C,eAAe,MAAMC,KAAK,CAAC;EAMzBC,WAAWA,CAACC,aAAyC,EAAE;IAAAC,eAAA,mCALY,IAAI;IAAAA,eAAA,yBAC9C,IAAIC,GAAG,CAA6B,CAAC;IAAAD,eAAA,uBACZ,IAAI;IAAAA,eAAA;IAAAA,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CAACmC,yBAAyB,EACtC,IAAI,CAACC,wBACP,CAAC;;IAED;IACA,IAAI,CAACf,kBAAkB,CAAC,CAAC;EAC3B;AAoGF"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/types.js b/node_modules/@react-native-community/netinfo/lib/module/internal/types.js -index ac35a3d..ebe70e5 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/types.js -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/types.js -@@ -6,9 +6,8 @@ - * - * @format - */ --export let NetInfoStateType; - --(function (NetInfoStateType) { -+export let NetInfoStateType = /*#__PURE__*/function (NetInfoStateType) { - NetInfoStateType["unknown"] = "unknown"; - NetInfoStateType["none"] = "none"; - NetInfoStateType["cellular"] = "cellular"; -@@ -18,14 +17,13 @@ export let NetInfoStateType; - NetInfoStateType["wimax"] = "wimax"; - NetInfoStateType["vpn"] = "vpn"; - NetInfoStateType["other"] = "other"; --})(NetInfoStateType || (NetInfoStateType = {})); -- --export let NetInfoCellularGeneration; -- --(function (NetInfoCellularGeneration) { -+ return NetInfoStateType; -+}({}); -+export let NetInfoCellularGeneration = /*#__PURE__*/function (NetInfoCellularGeneration) { - NetInfoCellularGeneration["2g"] = "2g"; - NetInfoCellularGeneration["3g"] = "3g"; - NetInfoCellularGeneration["4g"] = "4g"; - NetInfoCellularGeneration["5g"] = "5g"; --})(NetInfoCellularGeneration || (NetInfoCellularGeneration = {})); -+ return NetInfoCellularGeneration; -+}({}); - //# sourceMappingURL=types.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/types.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/types.js.map -index 340dc4a..afd20ec 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/types.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/types.js.map -@@ -1 +1 @@ --{"version":3,"sources":["types.ts"],"names":["NetInfoStateType","NetInfoCellularGeneration"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,WAAYA,gBAAZ;;WAAYA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;GAAAA,gB,KAAAA,gB;;AAcZ,WAAYC,yBAAZ;;WAAYA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;GAAAA,yB,KAAAA,yB","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nexport enum NetInfoStateType {\n unknown = 'unknown',\n none = 'none',\n cellular = 'cellular',\n wifi = 'wifi',\n bluetooth = 'bluetooth',\n ethernet = 'ethernet',\n wimax = 'wimax',\n vpn = 'vpn',\n other = 'other',\n}\n\nexport type NetInfoMethodType = 'HEAD' | 'GET';\n\nexport enum NetInfoCellularGeneration {\n '2g' = '2g',\n '3g' = '3g',\n '4g' = '4g',\n '5g' = '5g',\n}\n\nexport interface NetInfoConnectedDetails {\n isConnectionExpensive: boolean;\n}\n\ninterface NetInfoConnectedState<\n T extends NetInfoStateType,\n D extends Record = Record\n> {\n type: T;\n isConnected: true;\n isInternetReachable: boolean | null;\n details: D & NetInfoConnectedDetails;\n isWifiEnabled?: boolean;\n}\n\ninterface NetInfoDisconnectedState {\n type: T;\n isConnected: false;\n isInternetReachable: false;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport interface NetInfoUnknownState {\n type: NetInfoStateType.unknown;\n isConnected: boolean | null;\n isInternetReachable: null;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport type NetInfoNoConnectionState = NetInfoDisconnectedState<\n NetInfoStateType.none\n>;\nexport type NetInfoDisconnectedStates =\n | NetInfoUnknownState\n | NetInfoNoConnectionState;\n\nexport type NetInfoCellularState = NetInfoConnectedState<\n NetInfoStateType.cellular,\n {\n cellularGeneration: NetInfoCellularGeneration | null;\n carrier: string | null;\n }\n>;\nexport type NetInfoWifiState = NetInfoConnectedState<\n NetInfoStateType.wifi,\n {\n ssid: string | null;\n bssid: string | null;\n strength: number | null;\n ipAddress: string | null;\n subnet: string | null;\n frequency: number | null;\n linkSpeed: number | null;\n rxLinkSpeed: number | null;\n txLinkSpeed: number | null;\n }\n>;\nexport type NetInfoBluetoothState = NetInfoConnectedState<\n NetInfoStateType.bluetooth\n>;\nexport type NetInfoEthernetState = NetInfoConnectedState<\n NetInfoStateType.ethernet,\n {\n ipAddress: string | null;\n subnet: string | null;\n }\n>;\nexport type NetInfoWimaxState = NetInfoConnectedState;\nexport type NetInfoVpnState = NetInfoConnectedState;\nexport type NetInfoOtherState = NetInfoConnectedState;\nexport type NetInfoConnectedStates =\n | NetInfoCellularState\n | NetInfoWifiState\n | NetInfoBluetoothState\n | NetInfoEthernetState\n | NetInfoWimaxState\n | NetInfoVpnState\n | NetInfoOtherState;\n\nexport type NetInfoState = NetInfoDisconnectedStates | NetInfoConnectedStates;\n\nexport type NetInfoChangeHandler = (state: NetInfoState) => void;\nexport type NetInfoSubscription = () => void;\n\nexport interface NetInfoConfiguration {\n reachabilityUrl: string;\n reachabilityMethod?: NetInfoMethodType;\n reachabilityHeaders?: Record;\n reachabilityTest: (response: Response) => Promise;\n reachabilityLongTimeout: number;\n reachabilityShortTimeout: number;\n reachabilityRequestTimeout: number;\n reachabilityShouldRun: () => boolean;\n shouldFetchWiFiSSID: boolean;\n useNativeReachability: boolean;\n}\n"]} -\ No newline at end of file -+{"version":3,"names":["NetInfoStateType","NetInfoCellularGeneration"],"sources":["types.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nexport enum NetInfoStateType {\n unknown = 'unknown',\n none = 'none',\n cellular = 'cellular',\n wifi = 'wifi',\n bluetooth = 'bluetooth',\n ethernet = 'ethernet',\n wimax = 'wimax',\n vpn = 'vpn',\n other = 'other',\n}\n\nexport type NetInfoMethodType = 'HEAD' | 'GET';\n\nexport enum NetInfoCellularGeneration {\n '2g' = '2g',\n '3g' = '3g',\n '4g' = '4g',\n '5g' = '5g',\n}\n\nexport interface NetInfoConnectedDetails {\n isConnectionExpensive: boolean;\n}\n\ninterface NetInfoConnectedState<\n T extends NetInfoStateType,\n D extends Record = Record,\n> {\n type: T;\n isConnected: true;\n isInternetReachable: boolean | null;\n details: D & NetInfoConnectedDetails;\n isWifiEnabled?: boolean;\n}\n\ninterface NetInfoDisconnectedState {\n type: T;\n isConnected: false;\n isInternetReachable: false;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport interface NetInfoUnknownState {\n type: NetInfoStateType.unknown;\n isConnected: boolean | null;\n isInternetReachable: null;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport type NetInfoNoConnectionState =\n NetInfoDisconnectedState;\nexport type NetInfoDisconnectedStates =\n | NetInfoUnknownState\n | NetInfoNoConnectionState;\n\nexport type NetInfoCellularState = NetInfoConnectedState<\n NetInfoStateType.cellular,\n {\n cellularGeneration: NetInfoCellularGeneration | null;\n carrier: string | null;\n }\n>;\nexport type NetInfoWifiState = NetInfoConnectedState<\n NetInfoStateType.wifi,\n {\n ssid: string | null;\n bssid: string | null;\n strength: number | null;\n ipAddress: string | null;\n subnet: string | null;\n frequency: number | null;\n linkSpeed: number | null;\n rxLinkSpeed: number | null;\n txLinkSpeed: number | null;\n }\n>;\nexport type NetInfoBluetoothState =\n NetInfoConnectedState;\nexport type NetInfoEthernetState = NetInfoConnectedState<\n NetInfoStateType.ethernet,\n {\n ipAddress: string | null;\n subnet: string | null;\n }\n>;\nexport type NetInfoWimaxState = NetInfoConnectedState;\nexport type NetInfoVpnState = NetInfoConnectedState;\nexport type NetInfoOtherState = NetInfoConnectedState;\nexport type NetInfoConnectedStates =\n | NetInfoCellularState\n | NetInfoWifiState\n | NetInfoBluetoothState\n | NetInfoEthernetState\n | NetInfoWimaxState\n | NetInfoVpnState\n | NetInfoOtherState;\n\nexport type NetInfoState = NetInfoDisconnectedStates | NetInfoConnectedStates;\n\nexport type NetInfoChangeHandler = (state: NetInfoState) => void;\nexport type NetInfoSubscription = () => void;\n\nexport interface NetInfoConfiguration {\n reachabilityUrl: string;\n reachabilityMethod?: NetInfoMethodType;\n reachabilityHeaders?: Record;\n reachabilityTest: (response: Response) => Promise;\n reachabilityLongTimeout: number;\n reachabilityShortTimeout: number;\n reachabilityRequestTimeout: number;\n reachabilityShouldRun: () => boolean;\n shouldFetchWiFiSSID: boolean;\n useNativeReachability: boolean;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAYA,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;AAc5B,WAAYC,yBAAyB,0BAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAA,OAAzBA,yBAAyB;AAAA"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/typescript/src/internal/NativeRNCNetInfo.d.ts b/node_modules/@react-native-community/netinfo/lib/typescript/src/internal/NativeRNCNetInfo.d.ts -new file mode 100644 -index 0000000..b5db384 ---- /dev/null -+++ b/node_modules/@react-native-community/netinfo/lib/typescript/src/internal/NativeRNCNetInfo.d.ts -@@ -0,0 +1,9 @@ -+import type { TurboModule } from 'react-native'; -+export interface Spec extends TurboModule { -+ configure: (config: Object) => void; -+ getCurrentState(requestedInterface?: string): Promise; -+ addListener: (eventName: string) => void; -+ removeListeners: (count: number) => void; -+} -+declare const _default: Spec; -+export default _default; -diff --git a/node_modules/@react-native-community/netinfo/lib/typescript/src/internal/nativeInterface.d.ts b/node_modules/@react-native-community/netinfo/lib/typescript/src/internal/nativeInterface.d.ts -index 6982220..b515270 100644 ---- a/node_modules/@react-native-community/netinfo/lib/typescript/src/internal/nativeInterface.d.ts -+++ b/node_modules/@react-native-community/netinfo/lib/typescript/src/internal/nativeInterface.d.ts -@@ -8,10 +8,10 @@ - */ - import { NativeEventEmitter } from 'react-native'; - declare const _default: { -- eventEmitter: NativeEventEmitter; - configure: (config: Partial) => void; -+ addListener: (type: K, listener: (event: import("./privateTypes").Events[K]) => void) => void; -+ removeListeners: (type: K_1, listener: (event: import("./privateTypes").Events[K_1]) => void) => void; - getCurrentState: (requestedInterface?: string | undefined) => Promise; -- addListener(type: K, listener: (event: import("./privateTypes").Events[K]) => void): void; -- removeListeners(type: K_1, listener: (event: import("./privateTypes").Events[K_1]) => void): void; -+ readonly eventEmitter: NativeEventEmitter; - }; - export default _default; -diff --git a/node_modules/@react-native-community/netinfo/package.json b/node_modules/@react-native-community/netinfo/package.json -index 3c80db2..15d214d 100644 ---- a/node_modules/@react-native-community/netinfo/package.json -+++ b/node_modules/@react-native-community/netinfo/package.json -@@ -97,6 +97,14 @@ - "webpack-cli": "^3.3.10", - "webpack-dev-server": "^3.11.3" - }, -+ "codegenConfig": { -+ "name": "RNCNetInfoSpec", -+ "type": "modules", -+ "jsSrcsDir": "src/internal", -+ "android": { -+ "javaPackageName": "com.reactnativecommunity.netinfo" -+ } -+ }, - "repository": { - "type": "git", - "url": "https://github.com/react-native-netinfo/react-native-netinfo.git" -diff --git a/node_modules/@react-native-community/netinfo/react-native-netinfo.podspec b/node_modules/@react-native-community/netinfo/react-native-netinfo.podspec -index e34e728..9090eb1 100644 ---- a/node_modules/@react-native-community/netinfo/react-native-netinfo.podspec -+++ b/node_modules/@react-native-community/netinfo/react-native-netinfo.podspec -@@ -2,6 +2,8 @@ require 'json' - - package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) - -+is_new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1' -+ - Pod::Spec.new do |s| - s.name = "react-native-netinfo" - s.version = package['version'] -@@ -13,7 +15,11 @@ Pod::Spec.new do |s| - s.platforms = { :ios => "9.0", :tvos => "9.2", :osx => "10.14" } - - s.source = { :git => "https://github.com/react-native-community/react-native-netinfo.git", :tag => "v#{s.version}" } -- s.source_files = "ios/**/*.{h,m}" -+ s.source_files = "ios/**/*.{h,m,mm,swift}" - -- s.dependency 'React-Core' -+ if is_new_arch_enabled -+ install_modules_dependencies(s) -+ else -+ s.dependency 'React-Core' -+ end - end -diff --git a/node_modules/@react-native-community/netinfo/src/__tests__/eventListenerCallbacks.spec.ts b/node_modules/@react-native-community/netinfo/src/__tests__/eventListenerCallbacks.spec.ts -index 4ba58e9..9f87df7 100644 ---- a/node_modules/@react-native-community/netinfo/src/__tests__/eventListenerCallbacks.spec.ts -+++ b/node_modules/@react-native-community/netinfo/src/__tests__/eventListenerCallbacks.spec.ts -@@ -32,7 +32,7 @@ beforeAll(() => { - - describe('@react-native-community/netinfo listener', () => { - describe('Event listener callbacks', () => { -- it('should call the listener on listening', done => { -+ it('should call the listener on listening', (done) => { - const listener = jest.fn(); - NetInfo.addEventListener(listener); - -@@ -42,7 +42,7 @@ describe('@react-native-community/netinfo listener', () => { - }, 0); - }); - -- it('should call the listener on listening with multiple listeners', done => { -+ it('should call the listener on listening with multiple listeners', (done) => { - const listener1 = jest.fn(); - const listener2 = jest.fn(); - NetInfo.addEventListener(listener1); -@@ -303,7 +303,7 @@ describe('@react-native-community/netinfo listener', () => { - ]; - } - -- dataProvider().forEach(testCase => { -+ dataProvider().forEach((testCase) => { - it(testCase.description, () => { - NetInfo.configure(testCase.configuration); - -diff --git a/node_modules/@react-native-community/netinfo/src/__tests__/fetch.spec.ts b/node_modules/@react-native-community/netinfo/src/__tests__/fetch.spec.ts -index 4b56e4f..b790659 100644 ---- a/node_modules/@react-native-community/netinfo/src/__tests__/fetch.spec.ts -+++ b/node_modules/@react-native-community/netinfo/src/__tests__/fetch.spec.ts -@@ -69,7 +69,7 @@ describe('@react-native-community/netinfo fetch', () => { - ]; - } - -- dataProvider().forEach(testCase => { -+ dataProvider().forEach((testCase) => { - it(testCase.description, () => { - mockNativeModule.getCurrentState.mockResolvedValue( - testCase.expectedConnectionInfo, -@@ -131,7 +131,7 @@ describe('@react-native-community/netinfo fetch', () => { - ]; - } - -- dataProvider().forEach(testCase => { -+ dataProvider().forEach((testCase) => { - it(testCase.description, () => { - mockNativeModule.getCurrentState.mockResolvedValue( - testCase.expectedConnectionInfo, -@@ -193,7 +193,7 @@ describe('@react-native-community/netinfo fetch', () => { - ]; - } - -- dataProvider().forEach(testCase => { -+ dataProvider().forEach((testCase) => { - it(testCase.description, () => { - mockNativeModule.getCurrentState.mockResolvedValue( - testCase.expectedConnectionInfo, -@@ -255,7 +255,7 @@ describe('@react-native-community/netinfo fetch', () => { - ]; - } - -- dataProvider().forEach(testCase => { -+ dataProvider().forEach((testCase) => { - it(testCase.description, () => { - mockNativeModule.getCurrentState.mockResolvedValue( - testCase.expectedConnectionInfo, -@@ -317,7 +317,7 @@ describe('@react-native-community/netinfo fetch', () => { - ]; - } - -- dataProvider().forEach(testCase => { -+ dataProvider().forEach((testCase) => { - it(testCase.description, () => { - mockNativeModule.getCurrentState.mockResolvedValue( - testCase.expectedConnectionInfo, -@@ -361,7 +361,7 @@ describe('@react-native-community/netinfo fetch', () => { - ]; - } - -- dataProvider().forEach(testCase => { -+ dataProvider().forEach((testCase) => { - it(testCase.description, () => { - mockNativeModule.getCurrentState.mockResolvedValue( - testCase.expectedConnectionInfo, -@@ -455,7 +455,7 @@ describe('@react-native-community/netinfo fetch', () => { - ]; - } - -- dataProvider().forEach(testCase => { -+ dataProvider().forEach((testCase) => { - it(testCase.description, async () => { - mockNativeModule.getCurrentState.mockResolvedValue( - testCase.expectedConnectionInfo, -diff --git a/node_modules/@react-native-community/netinfo/src/internal/NativeRNCNetInfo.ts b/node_modules/@react-native-community/netinfo/src/internal/NativeRNCNetInfo.ts -new file mode 100644 -index 0000000..deada41 ---- /dev/null -+++ b/node_modules/@react-native-community/netinfo/src/internal/NativeRNCNetInfo.ts -@@ -0,0 +1,14 @@ -+/* eslint-disable @typescript-eslint/ban-types */ -+import type { TurboModule } from 'react-native'; -+import { TurboModuleRegistry } from 'react-native'; -+ -+export interface Spec extends TurboModule { -+ configure: (config: Object) => void; -+ getCurrentState(requestedInterface?: string): Promise; -+ // Events -+ addListener: (eventName: string) => void; -+ removeListeners: (count: number) => void; -+} -+ -+export default TurboModuleRegistry.getEnforcing('RNCNetInfo'); -+ -diff --git a/node_modules/@react-native-community/netinfo/src/internal/internetReachability.ts b/node_modules/@react-native-community/netinfo/src/internal/internetReachability.ts -index 5cf797b..f9940a5 100644 ---- a/node_modules/@react-native-community/netinfo/src/internal/internetReachability.ts -+++ b/node_modules/@react-native-community/netinfo/src/internal/internetReachability.ts -@@ -19,7 +19,8 @@ export default class InternetReachability { - private _configuration: Types.NetInfoConfiguration; - private _listener: PrivateTypes.NetInfoInternetReachabilityChangeListener; - private _isInternetReachable: boolean | null | undefined = undefined; -- private _currentInternetReachabilityCheckHandler: InternetReachabilityCheckHandler | null = null; -+ private _currentInternetReachabilityCheckHandler: InternetReachabilityCheckHandler | null = -+ null; - private _currentTimeoutHandle: ReturnType | null = null; - - constructor( -@@ -60,7 +61,8 @@ export default class InternetReachability { - this._setIsInternetReachable(null); - } - // Start a network request to check for internet -- this._currentInternetReachabilityCheckHandler = this._checkInternetReachability(); -+ this._currentInternetReachabilityCheckHandler = -+ this._checkInternetReachability(); - } else { - // If we don't expect a connection or don't run reachability check, just change the state to "false" - this._setIsInternetReachable(false); -@@ -79,9 +81,9 @@ export default class InternetReachability { - - // Create promise that will reject after the request timeout has been reached - let timeoutHandle: ReturnType; -- const timeoutPromise = new Promise((): void => { -+ const timeoutPromise = new Promise((_, reject): void => { - timeoutHandle = setTimeout( -- (): void => controller.abort('timedout'), -+ (): void => reject('timedout'), - this._configuration.reachabilityRequestTimeout, - ); - }); -@@ -98,28 +100,37 @@ export default class InternetReachability { - timeoutPromise, - cancelPromise, - ]) -- .then( -- (response): Promise => { -- return this._configuration.reachabilityTest(response); -- }, -- ) -- .then( -- (result): void => { -- this._setIsInternetReachable(result); -- const nextTimeoutInterval = this._isInternetReachable -- ? this._configuration.reachabilityLongTimeout -- : this._configuration.reachabilityShortTimeout; -+ .then((response): Promise => { -+ return this._configuration.reachabilityTest(response); -+ }) -+ .then((result): void => { -+ this._setIsInternetReachable(result); -+ const nextTimeoutInterval = this._isInternetReachable -+ ? this._configuration.reachabilityLongTimeout -+ : this._configuration.reachabilityShortTimeout; -+ this._currentTimeoutHandle = setTimeout( -+ this._checkInternetReachability, -+ nextTimeoutInterval, -+ ); -+ }) -+ .catch((error: Error | 'timedout' | 'canceled'): void => { -+ if (error !== 'canceled') { -+ this._setIsInternetReachable(false); - this._currentTimeoutHandle = setTimeout( - this._checkInternetReachability, -- nextTimeoutInterval, -+ this._configuration.reachabilityShortTimeout, - ); -- }, -- ) -+ } -+ }) - .catch( - (error: Error | 'timedout' | 'canceled'): void => { - if ('canceled' === error) { - controller.abort(); - } else { -+ if ('timedout' === error) { -+ controller.abort(); -+ } -+ - this._setIsInternetReachable(false); - this._currentTimeoutHandle = setTimeout( - this._checkInternetReachability, -diff --git a/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.ts b/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.ts -index c0d9ec4..912a903 100644 ---- a/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.ts -+++ b/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.ts -@@ -28,8 +28,12 @@ If none of these fix the issue, please open an issue on the Github repository: h - * JavaScript code and the tests - */ - let nativeEventEmitter: NativeEventEmitter | null = null; -+ - export default { -- ...RNCNetInfo, -+ configure: RNCNetInfo.configure, -+ addListener: RNCNetInfo.addListener, -+ removeListeners: RNCNetInfo.removeListeners, -+ getCurrentState: RNCNetInfo.getCurrentState, - get eventEmitter(): NativeEventEmitter { - if (!nativeEventEmitter) { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment -diff --git a/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.web.ts b/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.web.ts -index b665235..41863a4 100644 ---- a/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.web.ts -+++ b/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.web.ts -@@ -14,12 +14,9 @@ import {DEVICE_CONNECTIVITY_EVENT} from './privateTypes'; - const nativeEventEmitter = new NativeEventEmitter(); - - // Listen to connectivity events --RNCNetInfo.addListener( -- DEVICE_CONNECTIVITY_EVENT, -- (event): void => { -- nativeEventEmitter.emit(DEVICE_CONNECTIVITY_EVENT, event); -- }, --); -+RNCNetInfo.addListener(DEVICE_CONNECTIVITY_EVENT, (event): void => { -+ nativeEventEmitter.emit(DEVICE_CONNECTIVITY_EVENT, event); -+}); - - export default { - ...RNCNetInfo, -diff --git a/node_modules/@react-native-community/netinfo/src/internal/nativeModule.ts b/node_modules/@react-native-community/netinfo/src/internal/nativeModule.ts -index 206a69a..7aff149 100644 ---- a/node_modules/@react-native-community/netinfo/src/internal/nativeModule.ts -+++ b/node_modules/@react-native-community/netinfo/src/internal/nativeModule.ts -@@ -10,6 +10,16 @@ - import {NativeModules} from 'react-native'; - import {NetInfoNativeModule} from './privateTypes'; - --const RNCNetInfo: NetInfoNativeModule = NativeModules.RNCNetInfo; -+// React Native sets `__turboModuleProxy` on global when TurboModules are enabled. -+// Currently, this is the recommended way to detect TurboModules. -+// https://reactnative.dev/docs/the-new-architecture/backward-compatibility-turbomodules#unify-the-javascript-specs -+// eslint-disable-next-line @typescript-eslint/ban-ts-comment -+// @ts-ignore -+const isTurboModuleEnabled = global.__turboModuleProxy != null; -+ -+const RNCNetInfo: NetInfoNativeModule = isTurboModuleEnabled -+ ? // eslint-disable-next-line @typescript-eslint/no-var-requires -+ require('./NativeRNCNetInfo').default -+ : NativeModules.RNCNetInfo; - - export default RNCNetInfo; -diff --git a/node_modules/@react-native-community/netinfo/src/internal/types.ts b/node_modules/@react-native-community/netinfo/src/internal/types.ts -index 427db82..6a8f94a 100644 ---- a/node_modules/@react-native-community/netinfo/src/internal/types.ts -+++ b/node_modules/@react-native-community/netinfo/src/internal/types.ts -@@ -34,7 +34,7 @@ export interface NetInfoConnectedDetails { - - interface NetInfoConnectedState< - T extends NetInfoStateType, -- D extends Record = Record -+ D extends Record = Record, - > { - type: T; - isConnected: true; -@@ -59,9 +59,8 @@ export interface NetInfoUnknownState { - isWifiEnabled?: boolean; - } - --export type NetInfoNoConnectionState = NetInfoDisconnectedState< -- NetInfoStateType.none -->; -+export type NetInfoNoConnectionState = -+ NetInfoDisconnectedState; - export type NetInfoDisconnectedStates = - | NetInfoUnknownState - | NetInfoNoConnectionState; -@@ -87,9 +86,8 @@ export type NetInfoWifiState = NetInfoConnectedState< - txLinkSpeed: number | null; - } - >; --export type NetInfoBluetoothState = NetInfoConnectedState< -- NetInfoStateType.bluetooth -->; -+export type NetInfoBluetoothState = -+ NetInfoConnectedState; - export type NetInfoEthernetState = NetInfoConnectedState< - NetInfoStateType.ethernet, - { -diff --git a/node_modules/@react-native-community/netinfo/windows/.npmignore b/node_modules/@react-native-community/netinfo/windows/.npmignore -deleted file mode 100644 -index 878f7ba..0000000 ---- a/node_modules/@react-native-community/netinfo/windows/.npmignore -+++ /dev/null -@@ -1,92 +0,0 @@ --*AppPackages* --*BundleArtifacts* -- --#OS junk files --[Tt]humbs.db --*.DS_Store -- --#Visual Studio files --*.[Oo]bj --*.user --*.aps --*.pch --*.vspscc --*.vssscc --*_i.c --*_p.c --*.ncb --*.suo --*.tlb --*.tlh --*.bak --*.[Cc]ache --*.ilk --*.log --*.lib --*.sbr --*.sdf --*.opensdf --*.opendb --*.unsuccessfulbuild --ipch/ --[Oo]bj/ --[Bb]in --[Dd]ebug*/ --[Rr]elease*/ --Ankh.NoLoad -- --# Visual C++ cache files --ipch/ --*.aps --*.ncb --*.opendb --*.opensdf --*.sdf --*.cachefile --*.VC.db --*.VC.VC.opendb -- --#MonoDevelop --*.pidb --*.userprefs -- --#Tooling --_ReSharper*/ --*.resharper --[Tt]est[Rr]esult* --*.sass-cache -- --#Project files --[Bb]uild/ -- --#Subversion files --.svn -- --# Office Temp Files --~$* -- --# vim Temp Files --*~ -- --#NuGet --packages/ --*.nupkg -- --#ncrunch --*ncrunch* --*crunch*.local.xml -- --# visual studio database projects --*.dbmdl -- --#Test files --*.testsettings -- --#Other files --*.DotSettings --.vs/ --*project.lock.json -- --#Files generated by the VS build --**/Generated Files/** -- diff --git a/patches/@react-native-community/netinfo/details.md b/patches/@react-native-community/netinfo/details.md deleted file mode 100644 index f5b3931f9832..000000000000 --- a/patches/@react-native-community/netinfo/details.md +++ /dev/null @@ -1,25 +0,0 @@ -# `@react-native-community/netinfo` patches - -### [@react-native-community+netinfo+11.2.1+001+initial.patch](@react-native-community+netinfo+11.2.1+001+initial.patch) - -- Reason: - - ``` - This patch makes the library support new architecture. It deliberately renames the file before modifying it to avoid this known issue: https://github.com/ds300/patch-package/issues/518 - ``` - -- Upstream PR/issue: https://github.com/react-native-netinfo/react-native-netinfo/pull/655 -- E/App issue: https://github.com/Expensify/App/issues/8503 -- PR introducing patch: https://github.com/Expensify/App/pull/13767 - -### [@react-native-community+netinfo+11.2.1+002+turbomodule.patch](@react-native-community+netinfo+11.2.1+002+turbomodule.patch) - -- Reason: - - ``` - This patch makes the library support new architecture. - ``` - -- Upstream PR/issue: https://github.com/react-native-netinfo/react-native-netinfo/pull/655 -- E/App issue: https://github.com/Expensify/App/issues/8503 -- PR introducing patch: https://github.com/Expensify/App/pull/13767 \ No newline at end of file From 0e7318d527f85850f4e82f01423e4cc845719d66 Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Tue, 25 Nov 2025 13:21:55 +0530 Subject: [PATCH 02/12] revert changes in package-lock.json. Signed-off-by: krishna2323 --- package-lock.json | 447 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 442 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index e51cd0c82185..64f6fdf0be23 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,7 +38,7 @@ "@react-native-camera-roll/camera-roll": "7.4.0", "@react-native-clipboard/clipboard": "^1.15.0", "@react-native-community/geolocation": "3.3.0", - "@react-native-community/netinfo": "^11.4.1", + "@react-native-community/netinfo": "11.2.1", "@react-native-documents/picker": "^10.1.3", "@react-native-firebase/analytics": "^22.2.1", "@react-native-firebase/app": "^22.2.1", @@ -5121,6 +5121,45 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/@electron/windows-sign": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@electron/windows-sign/-/windows-sign-1.2.2.tgz", + "integrity": "sha512-dfZeox66AvdPtb2lD8OsIIQh12Tp0GNCRUDfBHIKGpbmopZto2/A8nSpYYLoedPIHpqkeblZ/k8OV0Gy7PYuyQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "peer": true, + "dependencies": { + "cross-dirname": "^0.1.0", + "debug": "^4.3.4", + "fs-extra": "^11.1.1", + "minimist": "^1.2.8", + "postject": "^1.0.0-alpha.6" + }, + "bin": { + "electron-windows-sign": "bin/electron-windows-sign.js" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/@electron/windows-sign/node_modules/fs-extra": { + "version": "11.3.2", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", + "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, "node_modules/@es-joy/jsdoccomment": { "version": "0.65.2", "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.65.2.tgz", @@ -5440,6 +5479,170 @@ "sucrase": "3.35.0" } }, + "node_modules/@expo/config-plugins": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/@expo/config-plugins/-/config-plugins-10.1.2.tgz", + "integrity": "sha512-IMYCxBOcnuFStuK0Ay+FzEIBKrwW8OVUMc65+v0+i7YFIIe8aL342l7T4F8lR4oCfhXn7d6M5QPgXvjtc/gAcw==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@expo/config-types": "^53.0.5", + "@expo/json-file": "~9.1.5", + "@expo/plist": "^0.3.5", + "@expo/sdk-runtime-versions": "^1.0.0", + "chalk": "^4.1.2", + "debug": "^4.3.5", + "getenv": "^2.0.0", + "glob": "^10.4.2", + "resolve-from": "^5.0.0", + "semver": "^7.5.4", + "slash": "^3.0.0", + "slugify": "^1.6.6", + "xcode": "^3.0.1", + "xml2js": "0.6.0" + } + }, + "node_modules/@expo/config-plugins/node_modules/@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@babel/highlight": "^7.10.4" + } + }, + "node_modules/@expo/config-plugins/node_modules/@expo/config-types": { + "version": "53.0.5", + "resolved": "https://registry.npmjs.org/@expo/config-types/-/config-types-53.0.5.tgz", + "integrity": "sha512-kqZ0w44E+HEGBjy+Lpyn0BVL5UANg/tmNixxaRMLS6nf37YsDrLk2VMAmeKMMk5CKG0NmOdVv3ngeUjRQMsy9g==", + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/@expo/config-plugins/node_modules/@expo/json-file": { + "version": "9.1.5", + "resolved": "https://registry.npmjs.org/@expo/json-file/-/json-file-9.1.5.tgz", + "integrity": "sha512-prWBhLUlmcQtvN6Y7BpW2k9zXGd3ySa3R6rAguMJkp1z22nunLN64KYTUWfijFlprFoxm9r2VNnGkcbndAlgKA==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@babel/code-frame": "~7.10.4", + "json5": "^2.2.3" + } + }, + "node_modules/@expo/config-plugins/node_modules/@expo/plist": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@expo/plist/-/plist-0.3.5.tgz", + "integrity": "sha512-9RYVU1iGyCJ7vWfg3e7c/NVyMFs8wbl+dMWZphtFtsqyN9zppGREU3ctlD3i8KUE0sCUTVnLjCWr+VeUIDep2g==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@xmldom/xmldom": "^0.8.8", + "base64-js": "^1.2.3", + "xmlbuilder": "^15.1.1" + } + }, + "node_modules/@expo/config-plugins/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@expo/config-plugins/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@expo/config-plugins/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@expo/config-plugins/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/@expo/config-plugins/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@expo/config-plugins/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "license": "ISC", + "optional": true, + "peer": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@expo/config-plugins/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/@expo/config-types": { "version": "54.0.8", "resolved": "https://registry.npmjs.org/@expo/config-types/-/config-types-54.0.8.tgz", @@ -11516,9 +11719,7 @@ } }, "node_modules/@react-native-community/netinfo": { - "version": "11.4.1", - "resolved": "https://registry.npmjs.org/@react-native-community/netinfo/-/netinfo-11.4.1.tgz", - "integrity": "sha512-B0BYAkghz3Q2V09BF88RA601XursIEA111tnc2JOaN7axJWmNefmfjZqw/KdSxKZp7CZUuPpjBmz/WCR9uaHYg==", + "version": "11.2.1", "license": "MIT", "peerDependencies": { "react-native": ">=0.59" @@ -16882,6 +17083,17 @@ "@types/react": "*" } }, + "node_modules/@types/react-native": { + "version": "0.72.8", + "resolved": "https://registry.npmjs.org/@types/react-native/-/react-native-0.72.8.tgz", + "integrity": "sha512-St6xA7+EoHN5mEYfdWnfYt0e8u6k2FR0P9s2arYgakQGFgU1f9FlPrIEcj0X24pLCF5c5i3WVuLCUdiCYHmOoA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@react-native/virtualized-lists": "^0.72.4", + "@types/react": "*" + } + }, "node_modules/@types/react-native-web": { "version": "0.0.0", "dev": true, @@ -16891,6 +17103,20 @@ "react-native": "*" } }, + "node_modules/@types/react-native/node_modules/@react-native/virtualized-lists": { + "version": "0.72.8", + "resolved": "https://registry.npmjs.org/@react-native/virtualized-lists/-/virtualized-lists-0.72.8.tgz", + "integrity": "sha512-J3Q4Bkuo99k7mu+jPS9gSUSgq+lLRSI/+ahXNwV92XgJ/8UgOTxu2LPwhJnBk/sQKxq7E8WkZBnBiozukQMqrw==", + "license": "MIT", + "peer": true, + "dependencies": { + "invariant": "^2.2.4", + "nullthrows": "^1.1.1" + }, + "peerDependencies": { + "react-native": "*" + } + }, "node_modules/@types/react-test-renderer": { "version": "19.1.0", "dev": true, @@ -21351,6 +21577,15 @@ "node": ">=10" } }, + "node_modules/cross-dirname": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/cross-dirname/-/cross-dirname-0.1.0.tgz", + "integrity": "sha512-+R08/oI0nl3vfPcqftZRpytksBXDzOUveBq/NBVx0sUp1axwzPQrKinNx5yd5sxPu8j1wIy8AfnVQ+5eFdha6Q==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, "node_modules/cross-fetch": { "version": "3.1.5", "license": "MIT", @@ -22504,6 +22739,19 @@ "node": ">=14.0.0" } }, + "node_modules/electron-builder-squirrel-windows": { + "version": "26.0.19", + "resolved": "https://registry.npmjs.org/electron-builder-squirrel-windows/-/electron-builder-squirrel-windows-26.0.19.tgz", + "integrity": "sha512-zddhAuxL4WknxTlbG9HxRWLar4jn6JkcD+K5kUK7YtoVPIweYgvq45BGNZEI4tbcgLsU7IF2wFyoqW8MyR7KBg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "app-builder-lib": "26.0.19", + "builder-util": "26.0.19", + "electron-winstaller": "5.4.0" + } + }, "node_modules/electron-builder/node_modules/ansi-styles": { "version": "4.3.0", "dev": true, @@ -22711,6 +22959,133 @@ "integrity": "sha512-ZCphxFW3Q1TVhcgS9blfut1PX8lusVi2SvXQgmEEnK4TCmE1JhH2JkjJN+DNt0pJJwfBri5AROBnz2b/C+YU9g==", "license": "ISC" }, + "node_modules/electron-winstaller": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/electron-winstaller/-/electron-winstaller-5.4.0.tgz", + "integrity": "sha512-bO3y10YikuUwUuDUQRM4KfwNkKhnpVO7IPdbsrejwN9/AABJzzTQ4GeHwyzNSrVO+tEH3/Np255a3sVZpZDjvg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@electron/asar": "^3.2.1", + "debug": "^4.1.1", + "fs-extra": "^7.0.1", + "lodash": "^4.17.21", + "temp": "^0.9.0" + }, + "engines": { + "node": ">=8.0.0" + }, + "optionalDependencies": { + "@electron/windows-sign": "^1.1.2" + } + }, + "node_modules/electron-winstaller/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/electron-winstaller/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/electron-winstaller/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "peer": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/electron-winstaller/node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/electron-winstaller/node_modules/rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/electron-winstaller/node_modules/temp": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/temp/-/temp-0.9.4.tgz", + "integrity": "sha512-yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "mkdirp": "^0.5.1", + "rimraf": "~2.6.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/electron-winstaller/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/electron/node_modules/@types/node": { "version": "22.17.2", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.17.2.tgz", @@ -25362,6 +25737,14 @@ "version": "3.1.3", "license": "MIT" }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true, + "license": "Apache-2.0", + "peer": true + }, "node_modules/fast-equals": { "version": "5.2.2", "license": "MIT", @@ -31234,6 +31617,14 @@ "version": "4.5.0", "license": "MIT" }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "dev": true, + "license": "MIT", + "peer": true + }, "node_modules/lodash.debounce": { "version": "4.0.8", "license": "MIT" @@ -34104,6 +34495,36 @@ "version": "4.2.0", "license": "MIT" }, + "node_modules/postject": { + "version": "1.0.0-alpha.6", + "resolved": "https://registry.npmjs.org/postject/-/postject-1.0.0-alpha.6.tgz", + "integrity": "sha512-b9Eb8h2eVqNE8edvKdwqkrY6O7kAwmI8kcnBv1NScolYJbo59XUF0noFq+lxbC1yN20bmC0WBEbDC5H/7ASb0A==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "commander": "^9.4.0" + }, + "bin": { + "postject": "dist/cli.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/postject/node_modules/commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": "^12.20.0 || >=14" + } + }, "node_modules/potpack": { "version": "2.0.0", "license": "ISC" @@ -34495,6 +34916,22 @@ "version": "2.0.0", "license": "ISC" }, + "node_modules/quill-delta": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/quill-delta/-/quill-delta-5.1.0.tgz", + "integrity": "sha512-X74oCeRI4/p0ucjb5Ma8adTXd9Scumz367kkMK5V/IatcX6A0vlgLgKbzXWy5nZmCGeNJm2oQX0d2Eqj+ZIlCA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "fast-diff": "^1.3.0", + "lodash.clonedeep": "^4.5.0", + "lodash.isequal": "^4.5.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, "node_modules/randombytes": { "version": "2.1.0", "license": "MIT", @@ -40925,4 +41362,4 @@ } } } -} +} \ No newline at end of file From e532582eddf864e5369afa77f640a7dc34457c02 Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Tue, 25 Nov 2025 13:38:47 +0530 Subject: [PATCH 03/12] update package-lock.json. Signed-off-by: krishna2323 --- package-lock.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 64f6fdf0be23..44d8c55b88a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,7 +38,7 @@ "@react-native-camera-roll/camera-roll": "7.4.0", "@react-native-clipboard/clipboard": "^1.15.0", "@react-native-community/geolocation": "3.3.0", - "@react-native-community/netinfo": "11.2.1", + "@react-native-community/netinfo": "^11.4.1", "@react-native-documents/picker": "^10.1.3", "@react-native-firebase/analytics": "^22.2.1", "@react-native-firebase/app": "^22.2.1", @@ -11719,7 +11719,9 @@ } }, "node_modules/@react-native-community/netinfo": { - "version": "11.2.1", + "version": "11.4.1", + "resolved": "https://registry.npmjs.org/@react-native-community/netinfo/-/netinfo-11.4.1.tgz", + "integrity": "sha512-B0BYAkghz3Q2V09BF88RA601XursIEA111tnc2JOaN7axJWmNefmfjZqw/KdSxKZp7CZUuPpjBmz/WCR9uaHYg==", "license": "MIT", "peerDependencies": { "react-native": ">=0.59" From c11dc8f3a726065e5494961a99740980f389cdaf Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Tue, 25 Nov 2025 14:11:27 +0530 Subject: [PATCH 04/12] update podfile. Signed-off-by: krishna2323 --- ios/Podfile.lock | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 9bf5c5834b4d..65b2a53628fe 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2550,34 +2550,8 @@ PODS: - Yoga - react-native-launch-arguments (4.0.2): - React - - react-native-netinfo (11.2.1): - - boost - - DoubleConversion - - fast_float - - fmt - - glog - - hermes-engine - - RCT-Folly - - RCT-Folly/Fabric - - RCTRequired - - RCTTypeSafety + - react-native-netinfo (11.4.1): - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-jsi - - React-NativeModulesApple - - React-RCTFabric - - React-renderercss - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - SocketRocket - - Yoga - react-native-pager-view (6.9.1): - boost - DoubleConversion @@ -4741,7 +4715,7 @@ SPEC CHECKSUMS: react-native-key-command: 7538df85ed26502b2a929c0584235459b26c7a91 react-native-keyboard-controller: c4ca61f44d66c2f8987a7e67e9b78e80dc965c45 react-native-launch-arguments: d4759f7591e2766e6c5ec746b7032429edaf7058 - react-native-netinfo: b88a57a1f93f4d63aeab839d51c746484641564b + react-native-netinfo: cec9c4e86083cb5b6aba0e0711f563e2fbbff187 react-native-pager-view: 0e228ec2dfdd87807d125c7bbfb83299edede19c react-native-pdf: 6a09a9be0e7ee954ea671437483316f9a28f8572 react-native-performance: d77c7992b9ebf63be75f95bcdcafd12048fac487 @@ -4753,7 +4727,7 @@ SPEC CHECKSUMS: react-native-webview: cdce419e8022d0ef6f07db21890631258e7a9e6e React-NativeModulesApple: 8c7eb6057b00c191a11ad5ced41826ec5a0e4d78 React-oscompat: 93b5535ea7f7dff46aaee4f78309a70979bdde9d - React-perflogger: 5536d2df3d18fe0920263466f7b46a56351c0510 + React-perflogger: e7dcbfcb796d346be7936b75740c3e27a4bb3977 React-performancetimeline: c6c9393c1a0453a51e1852e3531defe60790b36c React-RCTActionSheet: 42195ae666e6d79b4af2346770f765b7c29435b9 React-RCTAnimation: fa103ccc3503b1ed8dedca7e62e7823937748843 @@ -4768,7 +4742,7 @@ SPEC CHECKSUMS: React-RCTSettings: 71f5c7fd7b5f4e725a4e2114a4b4373d0e46048f React-RCTText: b94d4699b49285bee22b8ebf768924d607eccee3 React-RCTVibration: 6e3993c4f6c36a3899059f9a9ead560ddaf5a7d7 - React-rendererconsistency: 612d0f6603d9837bb1236d7fd5194203b35c8799 + React-rendererconsistency: bef28690433e2b4bb00c2f884b22b86e61a430f2 React-renderercss: e5c2c3b84976f7a587cde8423c671db07a6a77da React-rendererdebug: cc7a6131733605b8897754f72c0c35c79f77da9e React-RuntimeApple: 3f96102fc1ebf738d36719cdce5422a5769293fb From 168f4f3d913b63915fecbba7a25755ba7a96ba27 Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Sat, 29 Nov 2025 15:50:10 +0530 Subject: [PATCH 05/12] add patch files back. Signed-off-by: krishna2323 --- ...community+netinfo+11.4.1+001+initial.patch | 8 + ...unity+netinfo+11.4.1+002+turbomodule.patch | 3086 +++++++++++++++++ .../netinfo/details.md | 25 + 3 files changed, 3119 insertions(+) create mode 100644 patches/@react-native-community/netinfo/@react-native-community+netinfo+11.4.1+001+initial.patch create mode 100644 patches/@react-native-community/netinfo/@react-native-community+netinfo+11.4.1+002+turbomodule.patch create mode 100644 patches/@react-native-community/netinfo/details.md diff --git a/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.4.1+001+initial.patch b/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.4.1+001+initial.patch new file mode 100644 index 000000000000..9a5b031c6dc1 --- /dev/null +++ b/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.4.1+001+initial.patch @@ -0,0 +1,8 @@ +diff --git a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModule.java b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java +similarity index 100% +rename from node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModule.java +rename to node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java +diff --git a/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.m b/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm +similarity index 100% +rename from node_modules/@react-native-community/netinfo/ios/RNCNetInfo.m +rename to node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm diff --git a/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.4.1+002+turbomodule.patch b/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.4.1+002+turbomodule.patch new file mode 100644 index 000000000000..99e8108f8822 --- /dev/null +++ b/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.4.1+002+turbomodule.patch @@ -0,0 +1,3086 @@ +diff --git a/node_modules/@react-native-community/netinfo/android/build.gradle b/node_modules/@react-native-community/netinfo/android/build.gradle +index 0d617ed..97439e6 100644 +--- a/node_modules/@react-native-community/netinfo/android/build.gradle ++++ b/node_modules/@react-native-community/netinfo/android/build.gradle +@@ -3,9 +3,10 @@ buildscript { + // This avoids unnecessary downloads and potential conflicts when the library is included as a + // module dependency in an application project. + if (project == rootProject) { +- repositories { +- google() +- mavenCentral() ++ repositories { ++ google() ++ mavenCentral() ++ gradlePluginPortal() + } + + dependencies { +@@ -26,8 +27,54 @@ def getExtOrIntegerDefault(name) { + return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['ReactNativeNetInfo_' + name]).toInteger() + } + ++def isNewArchitectureEnabled() { ++ return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true" ++} ++ ++def resolveReactNativeDirectory() { ++ def reactNativeLocation = getExtOrInitialValue("REACT_NATIVE_NODE_MODULES_DIR", null) ++ if (reactNativeLocation != null) { ++ return file(reactNativeLocation) ++ } ++ ++ // monorepo workaround ++ // react-native can be hoisted or in project's own node_modules ++ def reactNativeFromProjectNodeModules = file("${rootProject.projectDir}/../node_modules/react-native") ++ if (reactNativeFromProjectNodeModules.exists()) { ++ return reactNativeFromProjectNodeModules ++ } ++ ++ def reactNativeFromNodeModulesWithRNCNetInfo = file("${projectDir}/../../react-native") ++ if (reactNativeFromNodeModulesWithRNCNetInfo.exists()) { ++ return reactNativeFromNodeModulesWithRNCNetInfo ++ } ++ ++ throw new Exception( ++ "[react-native-netinfo] Unable to resolve react-native location in " + ++ "node_modules. You should add project extension property (in app/build.gradle) " + ++ "`REACT_NATIVE_NODE_MODULES_DIR` with path to react-native." ++ ) ++} ++ ++def getReactNativeMinorVersion() { ++ def REACT_NATIVE_DIR = resolveReactNativeDirectory() ++ ++ def reactProperties = new Properties() ++ file("$REACT_NATIVE_DIR/ReactAndroid/gradle.properties").withInputStream { reactProperties.load(it) } ++ ++ def REACT_NATIVE_VERSION = reactProperties.getProperty("VERSION_NAME") ++ def REACT_NATIVE_MINOR_VERSION = REACT_NATIVE_VERSION.startsWith("0.0.0-") ? 1000 : REACT_NATIVE_VERSION.split("\\.")[1].toInteger() ++ ++ return REACT_NATIVE_MINOR_VERSION ++} ++ ++ + apply plugin: 'com.android.library' + ++if (isNewArchitectureEnabled()) { ++ apply plugin: 'com.facebook.react' ++} ++ + android { + compileSdkVersion getExtOrIntegerDefault('compileSdkVersion') + +@@ -45,10 +92,21 @@ android { + defaultConfig { + minSdkVersion getExtOrIntegerDefault('minSdkVersion') + targetSdkVersion getExtOrIntegerDefault('targetSdkVersion') ++ buildConfigField("boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()) ++ } ++ sourceSets { ++ main { ++ if (isNewArchitectureEnabled()) { ++ java.srcDirs += ['src/newarch'] ++ } else { ++ java.srcDirs += ['src/oldarch'] ++ } ++ } + } + lintOptions{ + abortOnError false + } ++ + } + + repositories { +@@ -63,6 +121,9 @@ repositories { + + dependencies { + //noinspection GradleDynamicVersion +- implementation 'com.facebook.react:react-native:+' +- ++ if (isNewArchitectureEnabled() && getReactNativeMinorVersion() < 71) { ++ implementation project(":ReactAndroid") ++ } else { ++ implementation 'com.facebook.react:react-native:+' ++ } + } +diff --git a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java +index 2c3280b..52ea692 100644 +--- a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java ++++ b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java +@@ -9,13 +9,11 @@ package com.reactnativecommunity.netinfo; + import android.os.Build; + import com.facebook.react.bridge.Promise; + import com.facebook.react.bridge.ReactApplicationContext; +-import com.facebook.react.bridge.ReactContextBaseJavaModule; + import com.facebook.react.bridge.ReactMethod; + import com.facebook.react.module.annotations.ReactModule; + + /** Module that monitors and provides information about the connectivity state of the device. */ +-@ReactModule(name = NetInfoModule.NAME) +-public class NetInfoModule extends ReactContextBaseJavaModule implements AmazonFireDeviceConnectivityPoller.ConnectivityChangedCallback { ++public class NetInfoModuleImpl implements AmazonFireDeviceConnectivityPoller.ConnectivityChangedCallback { + public static final String NAME = "RNCNetInfo"; + + private final ConnectivityReceiver mConnectivityReceiver; +@@ -23,8 +21,7 @@ public class NetInfoModule extends ReactContextBaseJavaModule implements AmazonF + + private int numberOfListeners = 0; + +- public NetInfoModule(ReactApplicationContext reactContext) { +- super(reactContext); ++ public NetInfoModuleImpl(ReactApplicationContext reactContext) { + // Create the connectivity receiver based on the API level we are running on + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { + mConnectivityReceiver = new NetworkCallbackConnectivityReceiver(reactContext); +@@ -35,23 +32,17 @@ public class NetInfoModule extends ReactContextBaseJavaModule implements AmazonF + mAmazonConnectivityChecker = new AmazonFireDeviceConnectivityPoller(reactContext, this); + } + +- @Override ++ + public void initialize() { + mConnectivityReceiver.register(); + mAmazonConnectivityChecker.register(); + } + +- @Override +- public void onCatalystInstanceDestroy() { ++ public void invalidate() { + mAmazonConnectivityChecker.unregister(); + mConnectivityReceiver.unregister(); +- mConnectivityReceiver.hasListener = false; + } + +- @Override +- public String getName() { +- return NAME; +- } + + @ReactMethod + public void getCurrentState(final String requestedInterface, final Promise promise) { +@@ -63,14 +54,14 @@ public class NetInfoModule extends ReactContextBaseJavaModule implements AmazonF + mConnectivityReceiver.setIsInternetReachableOverride(isConnected); + } + +- @ReactMethod ++ + public void addListener(String eventName) { + numberOfListeners++; + mConnectivityReceiver.hasListener = true; + } + +- @ReactMethod +- public void removeListeners(Integer count) { ++ ++ public void removeListeners(double count) { + numberOfListeners -= count; + if (numberOfListeners == 0) { + mConnectivityReceiver.hasListener = false; +diff --git a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoPackage.java b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoPackage.java +index fcd4a5e..1bf0b62 100644 +--- a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoPackage.java ++++ b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoPackage.java +@@ -1,34 +1,46 @@ +-/** +- * Copyright (c) Facebook, Inc. and its affiliates. +- * +- * This source code is licensed under the MIT license found in the +- * LICENSE file in the root directory of this source tree. +- */ + package com.reactnativecommunity.netinfo; + +-import com.facebook.react.ReactPackage; +-import com.facebook.react.bridge.JavaScriptModule; ++import androidx.annotation.Nullable; + import com.facebook.react.bridge.NativeModule; + import com.facebook.react.bridge.ReactApplicationContext; +-import com.facebook.react.uimanager.ViewManager; +-import java.util.Arrays; ++import com.facebook.react.module.model.ReactModuleInfo; ++import com.facebook.react.module.model.ReactModuleInfoProvider; ++import com.facebook.react.TurboReactPackage; ++ + import java.util.Collections; ++import java.util.HashMap; + import java.util.List; ++import java.util.Map; + +-public class NetInfoPackage implements ReactPackage { +- @Override +- public List createNativeModules(ReactApplicationContext reactContext) { +- return Arrays.asList(new NetInfoModule(reactContext)); +- } ++public class NetInfoPackage extends TurboReactPackage { + +- // Deprecated from RN 0.47 +- public List> createJSModules() { +- return Collections.emptyList(); +- } ++ @Nullable ++ @Override ++ public NativeModule getModule(String name, ReactApplicationContext reactContext) { ++ if (name.equals(NetInfoModuleImpl.NAME)) { ++ return new NetInfoModule(reactContext); ++ } else { ++ return null; ++ } ++ } + +- @Override +- @SuppressWarnings("rawtypes") +- public List createViewManagers(ReactApplicationContext reactContext) { +- return Collections.emptyList(); +- } ++ @Override ++ public ReactModuleInfoProvider getReactModuleInfoProvider() { ++ return () -> { ++ final Map moduleInfos = new HashMap<>(); ++ boolean turboModulesEnabled = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; ++ moduleInfos.put( ++ NetInfoModuleImpl.NAME, ++ new ReactModuleInfo( ++ NetInfoModuleImpl.NAME, ++ NetInfoModuleImpl.NAME, ++ false, // canOverrideExistingModule ++ false, // needsEagerInit ++ true, // hasConstants ++ false, // isCxxModule ++ turboModulesEnabled // isTurboModule ++ )); ++ return moduleInfos; ++ }; ++ } + } +diff --git a/node_modules/@react-native-community/netinfo/android/src/newarch/com/reactnativecommunity/netinfo/NetInfoModule.java b/node_modules/@react-native-community/netinfo/android/src/newarch/com/reactnativecommunity/netinfo/NetInfoModule.java +new file mode 100644 +index 0000000..26c83b6 +--- /dev/null ++++ b/node_modules/@react-native-community/netinfo/android/src/newarch/com/reactnativecommunity/netinfo/NetInfoModule.java +@@ -0,0 +1,51 @@ ++package com.reactnativecommunity.netinfo; ++ ++import com.facebook.react.bridge.ReactApplicationContext; ++import com.facebook.react.bridge.Promise; ++import com.facebook.react.bridge.ReactMethod; ++import com.facebook.react.bridge.ReadableMap; ++ ++public class NetInfoModule extends NativeRNCNetInfoSpec { ++ ++ private NetInfoModuleImpl implementation; ++ ++ NetInfoModule(ReactApplicationContext context) { ++ super(context); ++ implementation = new NetInfoModuleImpl(context); ++ } ++ ++ @Override ++ public String getName() { ++ return NetInfoModuleImpl.NAME; ++ } ++ ++ @ReactMethod ++ public void getCurrentState(final String requestedInterface, final Promise promise) { ++ implementation.getCurrentState(requestedInterface, promise); ++ } ++ ++ @ReactMethod ++ public void configure(ReadableMap config) { ++ // iOS only ++ } ++ ++ @ReactMethod ++ public void addListener(String eventName) { ++ implementation.addListener(eventName); ++ } ++ ++ @ReactMethod ++ public void removeListeners(double count) { ++ implementation.removeListeners(count); ++ } ++ ++ @Override ++ public void invalidate() { ++ implementation.invalidate(); ++ } ++ ++ @Override ++ public void initialize() { ++ implementation.initialize(); ++ } ++} +diff --git a/node_modules/@react-native-community/netinfo/android/src/oldarch/com/reactnativecommunity/netinfo/NetInfoModule.java b/node_modules/@react-native-community/netinfo/android/src/oldarch/com/reactnativecommunity/netinfo/NetInfoModule.java +new file mode 100644 +index 0000000..c61a84d +--- /dev/null ++++ b/node_modules/@react-native-community/netinfo/android/src/oldarch/com/reactnativecommunity/netinfo/NetInfoModule.java +@@ -0,0 +1,59 @@ ++ ++ ++package com.reactnativecommunity.netinfo; ++ ++import com.facebook.react.bridge.NativeModule; ++import com.facebook.react.bridge.Promise; ++import com.facebook.react.bridge.ReactApplicationContext; ++import com.facebook.react.bridge.ReactContext; ++import com.facebook.react.bridge.ReactContextBaseJavaModule; ++import com.facebook.react.bridge.ReactMethod; ++import java.util.Map; ++import java.util.HashMap; ++import com.facebook.react.bridge.ReadableMap; ++ ++public class NetInfoModule extends ReactContextBaseJavaModule { ++ ++ private NetInfoModuleImpl implementation; ++ ++ NetInfoModule(ReactApplicationContext context) { ++ super(context); ++ implementation = new NetInfoModuleImpl(context); ++ } ++ ++ @Override ++ public String getName() { ++ return NetInfoModuleImpl.NAME; ++ } ++ ++ @ReactMethod ++ public void getCurrentState(final String requestedInterface, final Promise promise) { ++ implementation.getCurrentState(requestedInterface, promise); ++ } ++ ++ @Override ++ public void invalidate() { ++ implementation.invalidate(); ++ } ++ ++ ++ @Override ++ public void initialize() { ++ implementation.initialize(); ++ } ++ ++ @ReactMethod ++ public void addListener(String eventName) { ++ implementation.addListener(eventName); ++ } ++ ++ @ReactMethod ++ public void configure(ReadableMap config) { ++ // iOS only ++ } ++ ++ @ReactMethod ++ public void removeListeners(double count) { ++ implementation.removeListeners(count); ++ } ++} +diff --git a/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm b/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm +index e83b8c4..47fc8bb 100644 +--- a/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm ++++ b/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm +@@ -8,6 +8,10 @@ + #import "RNCNetInfo.h" + #import "RNCConnectionStateWatcher.h" + ++#ifdef RCT_NEW_ARCH_ENABLED ++#import "RNCNetInfoSpec.h" ++#endif ++ + #include + #include + +@@ -15,13 +19,18 @@ + #import + #import + #endif +-@import SystemConfiguration.CaptiveNetwork; ++#import ++ + + #import + #import + #import + ++#ifdef RCT_NEW_ARCH_ENABLED ++@interface RNCNetInfo () ++#else + @interface RNCNetInfo () ++#endif + + @property (nonatomic, strong) RNCConnectionStateWatcher *connectionStateWatcher; + @property (nonatomic) BOOL isObserving; +@@ -90,13 +99,14 @@ - (void)connectionStateWatcher:(RNCConnectionStateWatcher *)connectionStateWatch + + #pragma mark - Public API + +-RCT_EXPORT_METHOD(getCurrentState:(nullable NSString *)requestedInterface resolve:(RCTPromiseResolveBlock)resolve ++RCT_EXPORT_METHOD(getCurrentState:(NSString *)requestedInterface resolve:(RCTPromiseResolveBlock)resolve + reject:(__unused RCTPromiseRejectBlock)reject) + { + RNCConnectionState *state = [self.connectionStateWatcher currentState]; + resolve([self currentDictionaryFromUpdateState:state withInterface:requestedInterface]); + } + ++ + RCT_EXPORT_METHOD(configure:(NSDictionary *)config) + { + self.config = config; +@@ -265,4 +275,10 @@ - (NSString *)bssid + } + #endif + ++#ifdef RCT_NEW_ARCH_ENABLED ++- (std::shared_ptr)getTurboModule:(const facebook::react::ObjCTurboModule::InitParams &)params { ++ return std::make_shared(params); ++} ++#endif ++ + @end +diff --git a/node_modules/@react-native-community/netinfo/jest/netinfo-mock.js b/node_modules/@react-native-community/netinfo/jest/netinfo-mock.js +index 7f5769c..99b1aa3 100644 +--- a/node_modules/@react-native-community/netinfo/jest/netinfo-mock.js ++++ b/node_modules/@react-native-community/netinfo/jest/netinfo-mock.js +@@ -14,18 +14,17 @@ const defaultState = { + }; + + const NetInfoStateType = { +- unknown: "unknown", +- none: "none", +- cellular: "cellular", +- wifi: "wifi", +- bluetooth: "bluetooth", +- ethernet: "ethernet", +- wimax: "wimax", +- vpn: "vpn", +- other: "other", ++ unknown: 'unknown', ++ none: 'none', ++ cellular: 'cellular', ++ wifi: 'wifi', ++ bluetooth: 'bluetooth', ++ ethernet: 'ethernet', ++ wimax: 'wimax', ++ vpn: 'vpn', ++ other: 'other', + }; + +- + const RNCNetInfoMock = { + NetInfoStateType, + configure: jest.fn(), +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/index.js b/node_modules/@react-native-community/netinfo/lib/commonjs/index.js +index f5afe24..8f06bc8 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/index.js ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/index.js +@@ -11,26 +11,19 @@ var _exportNames = { + useNetInfo: true, + useNetInfoInstance: true + }; ++exports.addEventListener = addEventListener; + exports.configure = configure; ++exports.default = void 0; + exports.fetch = fetch; + exports.refresh = refresh; +-exports.addEventListener = addEventListener; + exports.useNetInfo = useNetInfo; + exports.useNetInfoInstance = useNetInfoInstance; +-exports.default = void 0; +- + var _react = require("react"); +- + var _reactNative = require("react-native"); +- + var _defaultConfiguration = _interopRequireDefault(require("./internal/defaultConfiguration")); +- + var _nativeInterface = _interopRequireDefault(require("./internal/nativeInterface")); +- + var _state2 = _interopRequireDefault(require("./internal/state")); +- + var Types = _interopRequireWildcard(require("./internal/types")); +- + Object.keys(Types).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; +@@ -42,13 +35,9 @@ Object.keys(Types).forEach(function (key) { + } + }); + }); +- +-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +- +-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +- ++function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } ++function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +- + /** + * Copyright (c) Facebook, Inc. and its affiliates. + * +@@ -57,14 +46,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de + * + * @format + */ ++ + // Stores the currently used configuration +-let _configuration = _defaultConfiguration.default; // Stores the singleton reference to the state manager ++let _configuration = _defaultConfiguration.default; + ++// Stores the singleton reference to the state manager + let _state = null; +- + const createState = () => { + return new _state2.default(_configuration); + }; ++ + /** + * Configures the library with the given configuration. Note that calling this will stop all + * previously added listeners from being called again. It is best to call this right when your +@@ -72,23 +63,20 @@ const createState = () => { + * + * @param configuration The new configuration to set. + */ +- +- + function configure(configuration) { +- _configuration = { ..._defaultConfiguration.default, ++ _configuration = { ++ ..._defaultConfiguration.default, + ...configuration + }; +- + if (_state) { + _state.tearDown(); +- + _state = createState(); + } +- + if (_reactNative.Platform.OS === 'ios') { + _nativeInterface.default.configure(configuration); + } + } ++ + /** + * Returns a `Promise` that resolves to a `NetInfoState` object. + * This function operates on the global singleton instance configured using `configure()` +@@ -97,29 +85,25 @@ function configure(configuration) { + * + * @returns A Promise which contains the current connection state. + */ +- +- + function fetch(requestedInterface) { + if (!_state) { + _state = createState(); + } +- + return _state.latest(requestedInterface); + } ++ + /** + * Force-refreshes the internal state of the global singleton managed by this library. + * + * @returns A Promise which contains the updated connection state. + */ +- +- + function refresh() { + if (!_state) { + _state = createState(); + } +- + return _state._fetchCurrentState(); + } ++ + /** + * Subscribe to the global singleton's connection information. The callback is called with a parameter of type + * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener +@@ -131,19 +115,16 @@ function refresh() { + * + * @returns A function which can be called to unsubscribe. + */ +- +- + function addEventListener(listener) { + if (!_state) { + _state = createState(); + } +- + _state.add(listener); +- + return () => { + _state && _state.remove(listener); + }; + } ++ + /** + * A React Hook into this library's singleton which updates when the connection state changes. + * +@@ -151,13 +132,10 @@ function addEventListener(listener) { + * + * @returns The connection state. + */ +- +- + function useNetInfo(configuration) { + if (configuration) { + configure(configuration); + } +- + const [netInfo, setNetInfo] = (0, _react.useState)({ + type: Types.NetInfoStateType.unknown, + isConnected: null, +@@ -169,6 +147,7 @@ function useNetInfo(configuration) { + }, []); + return netInfo; + } ++ + /** + * A React Hook which manages an isolated instance of the network info manager. + * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener, +@@ -178,8 +157,6 @@ function useNetInfo(configuration) { + * + * @returns the netInfo state and a refresh function + */ +- +- + function useNetInfoInstance(isPaused = false, configuration) { + const [networkInfoManager, setNetworkInfoManager] = (0, _react.useState)(); + const [netInfo, setNetInfo] = (0, _react.useState)({ +@@ -192,8 +169,8 @@ function useNetInfoInstance(isPaused = false, configuration) { + if (isPaused) { + return; + } +- +- const config = { ..._defaultConfiguration.default, ++ const config = { ++ ..._defaultConfiguration.default, + ...configuration + }; + const state = new _state2.default(config); +@@ -209,8 +186,7 @@ function useNetInfoInstance(isPaused = false, configuration) { + refresh + }; + } +- +-var _default = { ++var _default = exports.default = { + configure, + fetch, + refresh, +@@ -218,5 +194,4 @@ var _default = { + useNetInfo, + useNetInfoInstance + }; +-exports.default = _default; + //# sourceMappingURL=index.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/index.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/index.js.map +index c778a40..51f1ed7 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/index.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/index.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["index.ts"],"names":["_configuration","DEFAULT_CONFIGURATION","_state","createState","State","configure","configuration","tearDown","Platform","OS","NativeInterface","fetch","requestedInterface","latest","refresh","_fetchCurrentState","addEventListener","listener","add","remove","useNetInfo","netInfo","setNetInfo","type","Types","NetInfoStateType","unknown","isConnected","isInternetReachable","details","useNetInfoInstance","isPaused","networkInfoManager","setNetworkInfoManager","config","state"],"mappings":";;;;;;;;;;;;;;;;;;;;;AASA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAkKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;AAhLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA,IAAIA,cAAc,GAAGC,6BAArB,C,CAEA;;AACA,IAAIC,MAAoB,GAAG,IAA3B;;AACA,MAAMC,WAAW,GAAG,MAAa;AAC/B,SAAO,IAAIC,eAAJ,CAAUJ,cAAV,CAAP;AACD,CAFD;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASK,SAAT,CACLC,aADK,EAEC;AACNN,EAAAA,cAAc,GAAG,EACf,GAAGC,6BADY;AAEf,OAAGK;AAFY,GAAjB;;AAKA,MAAIJ,MAAJ,EAAY;AACVA,IAAAA,MAAM,CAACK,QAAP;;AACAL,IAAAA,MAAM,GAAGC,WAAW,EAApB;AACD;;AAED,MAAIK,sBAASC,EAAT,KAAgB,KAApB,EAA2B;AACzBC,6BAAgBL,SAAhB,CAA0BC,aAA1B;AACD;AACF;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASK,KAAT,CACLC,kBADK,EAEwB;AAC7B,MAAI,CAACV,MAAL,EAAa;AACXA,IAAAA,MAAM,GAAGC,WAAW,EAApB;AACD;;AACD,SAAOD,MAAM,CAACW,MAAP,CAAcD,kBAAd,CAAP;AACD;AAED;AACA;AACA;AACA;AACA;;;AACO,SAASE,OAAT,GAAgD;AACrD,MAAI,CAACZ,MAAL,EAAa;AACXA,IAAAA,MAAM,GAAGC,WAAW,EAApB;AACD;;AACD,SAAOD,MAAM,CAACa,kBAAP,E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AACd,QAAIE,QAAJ,EAAc;AACZ;AACD;;AACD,UAAMG,MAAM,GAAG,EACb,GAAGjC,6BADU;AAEb,SAAGK;AAFU,KAAf;AAIA,UAAM6B,KAAK,GAAG,IAAI/B,eAAJ,CAAU8B,MAAV,CAAd;AACAD,IAAAA,qBAAqB,CAACE,KAAD,CAArB;AACAA,IAAAA,KAAK,CAACjB,GAAN,CAAUI,UAAV;AACA,WAAOa,KAAK,CAAC5B,QAAb;AACD,GAZD,EAYG,CAACwB,QAAD,EAAWzB,aAAX,CAZH;AAcA,QAAMQ,OAAO,GAAG,wBAAY,MAAM;AAChCkB,IAAAA,kBAAkB,IAAIA,kBAAkB,CAACjB,kBAAnB,EAAtB;AACD,GAFe,EAEb,CAACiB,kBAAD,CAFa,CAAhB;AAIA,SAAO;AACLX,IAAAA,OADK;AAELP,IAAAA;AAFK,GAAP;AAID;;eAIc;AACbT,EAAAA,SADa;AAEbM,EAAAA,KAFa;AAGbG,EAAAA,OAHa;AAIbE,EAAAA,gBAJa;AAKbI,EAAAA,UALa;AAMbU,EAAAA;AANa,C","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {useState, useEffect, useCallback} from 'react';\nimport {Platform} from 'react-native';\nimport DEFAULT_CONFIGURATION from './internal/defaultConfiguration';\nimport NativeInterface from './internal/nativeInterface';\nimport State from './internal/state';\nimport * as Types from './internal/types';\n\n// Stores the currently used configuration\nlet _configuration = DEFAULT_CONFIGURATION;\n\n// Stores the singleton reference to the state manager\nlet _state: State | null = null;\nconst createState = (): State => {\n return new State(_configuration);\n};\n\n/**\n * Configures the library with the given configuration. Note that calling this will stop all\n * previously added listeners from being called again. It is best to call this right when your\n * application is started to avoid issues. The configuration sets up a global singleton instance.\n *\n * @param configuration The new configuration to set.\n */\nexport function configure(\n configuration: Partial,\n): void {\n _configuration = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n\n if (_state) {\n _state.tearDown();\n _state = createState();\n }\n\n if (Platform.OS === 'ios') {\n NativeInterface.configure(configuration);\n }\n}\n\n/**\n * Returns a `Promise` that resolves to a `NetInfoState` object.\n * This function operates on the global singleton instance configured using `configure()`\n *\n * @param [requestedInterface] interface from which to obtain the information\n *\n * @returns A Promise which contains the current connection state.\n */\nexport function fetch(\n requestedInterface?: string,\n): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state.latest(requestedInterface);\n}\n\n/**\n * Force-refreshes the internal state of the global singleton managed by this library.\n *\n * @returns A Promise which contains the updated connection state.\n */\nexport function refresh(): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state._fetchCurrentState();\n}\n\n/**\n * Subscribe to the global singleton's connection information. The callback is called with a parameter of type\n * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener\n * will be called with the latest information soon after you subscribe and then with any\n * subsequent changes afterwards. You should not assume that the listener is called in the same\n * way across devices or platforms.\n *\n * @param listener The listener which is called when the network state changes.\n *\n * @returns A function which can be called to unsubscribe.\n */\nexport function addEventListener(\n listener: Types.NetInfoChangeHandler,\n): Types.NetInfoSubscription {\n if (!_state) {\n _state = createState();\n }\n\n _state.add(listener);\n return (): void => {\n _state && _state.remove(listener);\n };\n}\n\n/**\n * A React Hook into this library's singleton which updates when the connection state changes.\n *\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns The connection state.\n */\nexport function useNetInfo(\n configuration?: Partial,\n): Types.NetInfoState {\n if (configuration) {\n configure(configuration);\n }\n\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect((): (() => void) => {\n return addEventListener(setNetInfo);\n }, []);\n\n return netInfo;\n}\n\n/**\n * A React Hook which manages an isolated instance of the network info manager.\n * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener,\n * NetInfo.fetch, NetInfo.refresh are performed on a global singleton and have no affect on this hook.\n * @param {boolean} isPaused - Pause the internal network checks.\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns the netInfo state and a refresh function\n */\nexport function useNetInfoInstance(\n isPaused = false,\n configuration?: Partial,\n) {\n const [networkInfoManager, setNetworkInfoManager] = useState();\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect(() => {\n if (isPaused) {\n return;\n }\n const config = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n const state = new State(config);\n setNetworkInfoManager(state);\n state.add(setNetInfo);\n return state.tearDown;\n }, [isPaused, configuration]);\n\n const refresh = useCallback(() => {\n networkInfoManager && networkInfoManager._fetchCurrentState();\n }, [networkInfoManager]);\n\n return {\n netInfo,\n refresh,\n };\n}\n\nexport * from './internal/types';\n\nexport default {\n configure,\n fetch,\n refresh,\n addEventListener,\n useNetInfo,\n useNetInfoInstance,\n};\n"]} +\ No newline at end of file ++{"version":3,"names":["_react","require","_reactNative","_defaultConfiguration","_interopRequireDefault","_nativeInterface","_state2","Types","_interopRequireWildcard","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","n","__proto__","a","getOwnPropertyDescriptor","u","i","set","obj","_configuration","DEFAULT_CONFIGURATION","_state","createState","State","configure","configuration","tearDown","Platform","OS","NativeInterface","fetch","requestedInterface","latest","refresh","_fetchCurrentState","addEventListener","listener","add","remove","useNetInfo","netInfo","setNetInfo","useState","type","NetInfoStateType","unknown","isConnected","isInternetReachable","details","useEffect","useNetInfoInstance","isPaused","networkInfoManager","setNetworkInfoManager","config","state","useCallback","_default"],"sources":["index.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {useState, useEffect, useCallback} from 'react';\nimport {Platform} from 'react-native';\nimport DEFAULT_CONFIGURATION from './internal/defaultConfiguration';\nimport NativeInterface from './internal/nativeInterface';\nimport State from './internal/state';\nimport * as Types from './internal/types';\n\n// Stores the currently used configuration\nlet _configuration = DEFAULT_CONFIGURATION;\n\n// Stores the singleton reference to the state manager\nlet _state: State | null = null;\nconst createState = (): State => {\n return new State(_configuration);\n};\n\n/**\n * Configures the library with the given configuration. Note that calling this will stop all\n * previously added listeners from being called again. It is best to call this right when your\n * application is started to avoid issues. The configuration sets up a global singleton instance.\n *\n * @param configuration The new configuration to set.\n */\nexport function configure(\n configuration: Partial,\n): void {\n _configuration = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n\n if (_state) {\n _state.tearDown();\n _state = createState();\n }\n\n if (Platform.OS === 'ios') {\n NativeInterface.configure(configuration);\n }\n}\n\n/**\n * Returns a `Promise` that resolves to a `NetInfoState` object.\n * This function operates on the global singleton instance configured using `configure()`\n *\n * @param [requestedInterface] interface from which to obtain the information\n *\n * @returns A Promise which contains the current connection state.\n */\nexport function fetch(\n requestedInterface?: string,\n): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state.latest(requestedInterface);\n}\n\n/**\n * Force-refreshes the internal state of the global singleton managed by this library.\n *\n * @returns A Promise which contains the updated connection state.\n */\nexport function refresh(): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state._fetchCurrentState();\n}\n\n/**\n * Subscribe to the global singleton's connection information. The callback is called with a parameter of type\n * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener\n * will be called with the latest information soon after you subscribe and then with any\n * subsequent changes afterwards. You should not assume that the listener is called in the same\n * way across devices or platforms.\n *\n * @param listener The listener which is called when the network state changes.\n *\n * @returns A function which can be called to unsubscribe.\n */\nexport function addEventListener(\n listener: Types.NetInfoChangeHandler,\n): Types.NetInfoSubscription {\n if (!_state) {\n _state = createState();\n }\n\n _state.add(listener);\n return (): void => {\n _state && _state.remove(listener);\n };\n}\n\n/**\n * A React Hook into this library's singleton which updates when the connection state changes.\n *\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns The connection state.\n */\nexport function useNetInfo(\n configuration?: Partial,\n): Types.NetInfoState {\n if (configuration) {\n configure(configuration);\n }\n\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect((): (() => void) => {\n return addEventListener(setNetInfo);\n }, []);\n\n return netInfo;\n}\n\n/**\n * A React Hook which manages an isolated instance of the network info manager.\n * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener,\n * NetInfo.fetch, NetInfo.refresh are performed on a global singleton and have no affect on this hook.\n * @param {boolean} isPaused - Pause the internal network checks.\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns the netInfo state and a refresh function\n */\nexport function useNetInfoInstance(\n isPaused = false,\n configuration?: Partial,\n) {\n const [networkInfoManager, setNetworkInfoManager] = useState();\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect(() => {\n if (isPaused) {\n return;\n }\n const config = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n const state = new State(config);\n setNetworkInfoManager(state);\n state.add(setNetInfo);\n return state.tearDown;\n }, [isPaused, configuration]);\n\n const refresh = useCallback(() => {\n networkInfoManager && networkInfoManager._fetchCurrentState();\n }, [networkInfoManager]);\n\n return {\n netInfo,\n refresh,\n };\n}\n\nexport * from './internal/types';\n\nexport default {\n configure,\n fetch,\n refresh,\n addEventListener,\n useNetInfo,\n useNetInfoInstance,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AASA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,qBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAD,sBAAA,CAAAH,OA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CAACF,OAAO,EAAEC,UAAU,CAAC,GAAG,IAAAC,eAAQ,EAAqB;IACzDC,IAAI,EAAEtD,KAAK,CAACuD,gBAAgB,CAACC,OAAO;IACpCC,WAAW,EAAE,IAAI;IACjBC,mBAAmB,EAAE,IAAI;IACzBC,OAAO,EAAE;EACX,CAAC,CAAC;EAEF,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAIE,QAAQ,EAAE;MACZ;IACF;IACA,MAAMG,MAAM,GAAG;MACb,GAAGlC,6BAAqB;MACxB,GAAGK;IACL,CAAC;IACD,MAAM8B,KAAK,GAAG,IAAIhC,eAAK,CAAC+B,MAAM,CAAC;IAC/BD,qBAAqB,CAACE,KAAK,CAAC;IAC5BA,KAAK,CAAClB,GAAG,CAACI,UAAU,CAAC;IACrB,OAAOc,KAAK,CAAC7B,QAAQ;EACvB,CAAC,EAAE,CAACyB,QAAQ,EAAE1B,aAAa,CAAC,CAAC;EAE7B,MAAMQ,OAAO,GAAG,IAAAuB,kBAAW,EAAC,MAAM;IAChCJ,kBAAkB,IAAIA,kBAAkB,CAAClB,kBAAkB,CAAC,CAAC;EAC/D,CAAC,EAAE,CAACkB,kBAAkB,CAAC,CAAC;EAExB,OAAO;IACLZ,OAAO;IACPP;EACF,CAAC;AACH;AAAC,IAAAwB,QAAA,GAAA1D,OAAA,CAAAU,OAAA,GAIc;EACbe,SAAS;EACTM,KAAK;EACLG,OAAO;EACPE,gBAAgB;EAChBI,UAAU;EACVW;AACF,CAAC"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/NativeRNCNetInfo.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/NativeRNCNetInfo.js +new file mode 100644 +index 0000000..e3949ec +--- /dev/null ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/NativeRNCNetInfo.js +@@ -0,0 +1,10 @@ ++"use strict"; ++ ++Object.defineProperty(exports, "__esModule", { ++ value: true ++}); ++exports.default = void 0; ++var _reactNative = require("react-native"); ++/* eslint-disable @typescript-eslint/ban-types */ ++var _default = exports.default = _reactNative.TurboModuleRegistry.getEnforcing('RNCNetInfo'); ++//# sourceMappingURL=NativeRNCNetInfo.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/NativeRNCNetInfo.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/NativeRNCNetInfo.js.map +new file mode 100644 +index 0000000..86d23d4 +--- /dev/null ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/NativeRNCNetInfo.js.map +@@ -0,0 +1 @@ ++{"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sources":["NativeRNCNetInfo.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-types */\nimport type { TurboModule } from 'react-native';\nimport { TurboModuleRegistry } from 'react-native';\n\nexport interface Spec extends TurboModule {\n configure: (config: Object) => void;\n getCurrentState(requestedInterface?: string): Promise;\n // Events\n addListener: (eventName: string) => void;\n removeListeners: (count: number) => void;\n}\n\nexport default TurboModuleRegistry.getEnforcing('RNCNetInfo');\n\n"],"mappings":";;;;;;AAEA,IAAAA,YAAA,GAAAC,OAAA;AAFA;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAYeC,gCAAmB,CAACC,YAAY,CAAO,YAAY,CAAC"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js +index 166a58d..c5b4e66 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js +@@ -19,6 +19,5 @@ const DEFAULT_CONFIGURATION = { + shouldFetchWiFiSSID: false, + useNativeReachability: true + }; +-var _default = DEFAULT_CONFIGURATION; +-exports.default = _default; ++var _default = exports.default = DEFAULT_CONFIGURATION; + //# sourceMappingURL=defaultConfiguration.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js.map +index 03f9097..be92be9 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["defaultConfiguration.ts"],"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability"],"mappings":";;;;;;AAEA,MAAMA,qBAAiD,GAAG;AACxDC,EAAAA,eAAe,EAAE,0CADuC;AAExDC,EAAAA,kBAAkB,EAAE,MAFoC;AAGxDC,EAAAA,mBAAmB,EAAE,EAHmC;AAIxDC,EAAAA,gBAAgB,EAAGC,QAAD,IAChBC,OAAO,CAACC,OAAR,CAAgBF,QAAQ,CAACG,MAAT,KAAoB,GAApC,CALsD;AAMxDC,EAAAA,wBAAwB,EAAE,IAAI,IAN0B;AAMpB;AACpCC,EAAAA,uBAAuB,EAAE,KAAK,IAP0B;AAOpB;AACpCC,EAAAA,0BAA0B,EAAE,KAAK,IARuB;AAQjB;AACvCC,EAAAA,qBAAqB,EAAE,MAAe,IATkB;AAUxDC,EAAAA,mBAAmB,EAAE,KAVmC;AAWxDC,EAAAA,qBAAqB,EAAE;AAXiC,CAA1D;eAced,qB","sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: 'https://clients3.google.com/generate_204',\n reachabilityMethod: 'HEAD',\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 204),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: false,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION;"]} +\ No newline at end of file ++{"version":3,"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability","_default","exports","default"],"sources":["defaultConfiguration.ts"],"sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: 'https://clients3.google.com/generate_204',\n reachabilityMethod: 'HEAD',\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 204),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: false,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION;"],"mappings":";;;;;;AAEA,MAAMA,qBAAiD,GAAG;EACxDC,eAAe,EAAE,0CAA0C;EAC3DC,kBAAkB,EAAE,MAAM;EAC1BC,mBAAmB,EAAE,CAAC,CAAC;EACvBC,gBAAgB,EAAGC,QAAkB,IACnCC,OAAO,CAACC,OAAO,CAACF,QAAQ,CAACG,MAAM,KAAK,GAAG,CAAC;EAC1CC,wBAAwB,EAAE,CAAC,GAAG,IAAI;EAAE;EACpCC,uBAAuB,EAAE,EAAE,GAAG,IAAI;EAAE;EACpCC,0BAA0B,EAAE,EAAE,GAAG,IAAI;EAAE;EACvCC,qBAAqB,EAAEA,CAAA,KAAe,IAAI;EAC1CC,mBAAmB,EAAE,KAAK;EAC1BC,qBAAqB,EAAE;AACzB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEajB,qBAAqB"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js +index 410b7b0..a1e0456 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js +@@ -19,6 +19,5 @@ const DEFAULT_CONFIGURATION = { + shouldFetchWiFiSSID: true, + useNativeReachability: true + }; +-var _default = DEFAULT_CONFIGURATION; +-exports.default = _default; ++var _default = exports.default = DEFAULT_CONFIGURATION; + //# sourceMappingURL=defaultConfiguration.web.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js.map +index edf0c39..d6ee21a 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["defaultConfiguration.web.ts"],"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability"],"mappings":";;;;;;AAEA,MAAMA,qBAAiD,GAAG;AACxDC,EAAAA,eAAe,EAAE,GADuC;AAExDC,EAAAA,kBAAkB,EAAE,MAFoC;AAGxDC,EAAAA,mBAAmB,EAAE,EAHmC;AAIxDC,EAAAA,gBAAgB,EAAGC,QAAD,IAChBC,OAAO,CAACC,OAAR,CAAgBF,QAAQ,CAACG,MAAT,KAAoB,GAApC,CALsD;AAMxDC,EAAAA,wBAAwB,EAAE,IAAI,IAN0B;AAMpB;AACpCC,EAAAA,uBAAuB,EAAE,KAAK,IAP0B;AAOpB;AACpCC,EAAAA,0BAA0B,EAAE,KAAK,IARuB;AAQjB;AACvCC,EAAAA,qBAAqB,EAAE,MAAe,IATkB;AAUxDC,EAAAA,mBAAmB,EAAE,IAVmC;AAWxDC,EAAAA,qBAAqB,EAAE;AAXiC,CAA1D;eAced,qB","sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: '/',\n reachabilityMethod: \"HEAD\",\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 200),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: true,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION"]} +\ No newline at end of file ++{"version":3,"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability","_default","exports","default"],"sources":["defaultConfiguration.web.ts"],"sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: '/',\n reachabilityMethod: \"HEAD\",\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 200),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: true,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION"],"mappings":";;;;;;AAEA,MAAMA,qBAAiD,GAAG;EACxDC,eAAe,EAAE,GAAG;EACpBC,kBAAkB,EAAE,MAAM;EAC1BC,mBAAmB,EAAE,CAAC,CAAC;EACvBC,gBAAgB,EAAGC,QAAkB,IACnCC,OAAO,CAACC,OAAO,CAACF,QAAQ,CAACG,MAAM,KAAK,GAAG,CAAC;EAC1CC,wBAAwB,EAAE,CAAC,GAAG,IAAI;EAAE;EACpCC,uBAAuB,EAAE,EAAE,GAAG,IAAI;EAAE;EACpCC,0BAA0B,EAAE,EAAE,GAAG,IAAI;EAAE;EACvCC,qBAAqB,EAAEA,CAAA,KAAe,IAAI;EAC1CC,mBAAmB,EAAE,IAAI;EACzBC,qBAAqB,EAAE;AACzB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEajB,qBAAqB"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js +index 45296d9..5169ed8 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js +@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; +- +-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +- ++function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } ++function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } ++function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } + /** + * Copyright (c) Facebook, Inc. and its affiliates. + * +@@ -15,57 +15,45 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope + * + * @format + */ ++ + class InternetReachability { + constructor(configuration, listener) { + _defineProperty(this, "_configuration", void 0); +- + _defineProperty(this, "_listener", void 0); +- + _defineProperty(this, "_isInternetReachable", undefined); +- + _defineProperty(this, "_currentInternetReachabilityCheckHandler", null); +- + _defineProperty(this, "_currentTimeoutHandle", null); +- + _defineProperty(this, "_setIsInternetReachable", isInternetReachable => { + if (this._isInternetReachable === isInternetReachable) { + return; + } +- + this._isInternetReachable = isInternetReachable; +- + this._listener(this._isInternetReachable); + }); +- + _defineProperty(this, "_setExpectsConnection", expectsConnection => { + // Cancel any pending check + if (this._currentInternetReachabilityCheckHandler !== null) { + this._currentInternetReachabilityCheckHandler.cancel(); +- + this._currentInternetReachabilityCheckHandler = null; +- } // Cancel any pending timeout +- +- ++ } ++ // Cancel any pending timeout + if (this._currentTimeoutHandle !== null) { + clearTimeout(this._currentTimeoutHandle); + this._currentTimeoutHandle = null; + } +- + if (expectsConnection && this._configuration.reachabilityShouldRun()) { + // If we expect a connection, start the process for finding if we have one + // Set the state to "null" if it was previously false + if (!this._isInternetReachable) { + this._setIsInternetReachable(null); +- } // Start a network request to check for internet +- +- ++ } ++ // Start a network request to check for internet + this._currentInternetReachabilityCheckHandler = this._checkInternetReachability(); + } else { + // If we don't expect a connection or don't run reachability check, just change the state to "false" + this._setIsInternetReachable(false); + } + }); +- + _defineProperty(this, "_checkInternetReachability", () => { + const controller = new AbortController(); + const responsePromise = fetch(this._configuration.reachabilityUrl, { +@@ -73,16 +61,17 @@ class InternetReachability { + method: this._configuration.reachabilityMethod, + cache: 'no-cache', + signal: controller.signal +- }); // Create promise that will reject after the request timeout has been reached ++ }); + ++ // Create promise that will reject after the request timeout has been reached + let timeoutHandle; +- const timeoutPromise = new Promise(() => { +- timeoutHandle = setTimeout(() => controller.abort('timedout'), this._configuration.reachabilityRequestTimeout); +- }); // Create promise that makes it possible to cancel a pending request through a reject +- // eslint-disable-next-line @typescript-eslint/no-empty-function ++ const timeoutPromise = new Promise((_, reject) => { ++ timeoutHandle = setTimeout(() => reject('timedout'), this._configuration.reachabilityRequestTimeout); ++ }); + ++ // Create promise that makes it possible to cancel a pending request through a reject ++ // eslint-disable-next-line @typescript-eslint/no-empty-function + let cancel = () => {}; +- + const cancelPromise = new Promise((_, reject) => { + cancel = () => reject('canceled'); + }); +@@ -90,18 +79,25 @@ class InternetReachability { + return this._configuration.reachabilityTest(response); + }).then(result => { + this._setIsInternetReachable(result); +- + const nextTimeoutInterval = this._isInternetReachable ? this._configuration.reachabilityLongTimeout : this._configuration.reachabilityShortTimeout; + this._currentTimeoutHandle = setTimeout(this._checkInternetReachability, nextTimeoutInterval); ++ }).catch(error => { ++ if (error !== 'canceled') { ++ this._setIsInternetReachable(false); ++ this._currentTimeoutHandle = setTimeout(this._checkInternetReachability, this._configuration.reachabilityShortTimeout); ++ } + }).catch(error => { + if ('canceled' === error) { + controller.abort(); + } else { ++ if ('timedout' === error) { ++ controller.abort(); ++ } + this._setIsInternetReachable(false); +- + this._currentTimeoutHandle = setTimeout(this._checkInternetReachability, this._configuration.reachabilityShortTimeout); + } +- }) // Clear request timeout and propagate any errors ++ }) ++ // Clear request timeout and propagate any errors + .then(() => { + clearTimeout(timeoutHandle); + }, error => { +@@ -113,7 +109,6 @@ class InternetReachability { + cancel + }; + }); +- + _defineProperty(this, "update", state => { + if (typeof state.isInternetReachable === 'boolean' && this._configuration.useNativeReachability) { + this._setIsInternetReachable(state.isInternetReachable); +@@ -121,31 +116,25 @@ class InternetReachability { + this._setExpectsConnection(state.isConnected); + } + }); +- + _defineProperty(this, "currentState", () => { + return this._isInternetReachable; + }); +- + _defineProperty(this, "tearDown", () => { + // Cancel any pending check + if (this._currentInternetReachabilityCheckHandler !== null) { + this._currentInternetReachabilityCheckHandler.cancel(); +- + this._currentInternetReachabilityCheckHandler = null; +- } // Cancel any pending timeout +- ++ } + ++ // Cancel any pending timeout + if (this._currentTimeoutHandle !== null) { + clearTimeout(this._currentTimeoutHandle); + this._currentTimeoutHandle = null; + } + }); +- + this._configuration = configuration; + this._listener = listener; + } +- + } +- + exports.default = InternetReachability; + //# sourceMappingURL=internetReachability.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js.map +index 6d12691..63bd2df 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["internetReachability.ts"],"names":["InternetReachability","constructor","configuration","listener","undefined","isInternetReachable","_isInternetReachable","_listener","expectsConnection","_currentInternetReachabilityCheckHandler","cancel","_currentTimeoutHandle","clearTimeout","_configuration","reachabilityShouldRun","_setIsInternetReachable","_checkInternetReachability","controller","AbortController","responsePromise","fetch","reachabilityUrl","headers","reachabilityHeaders","method","reachabilityMethod","cache","signal","timeoutHandle","timeoutPromise","Promise","setTimeout","abort","reachabilityRequestTimeout","cancelPromise","_","reject","promise","race","then","response","reachabilityTest","result","nextTimeoutInterval","reachabilityLongTimeout","reachabilityShortTimeout","catch","error","state","useNativeReachability","_setExpectsConnection","isConnected"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUe,MAAMA,oBAAN,CAA2B;AAOxCC,EAAAA,WAAW,CACTC,aADS,EAETC,QAFS,EAGT;AAAA;;AAAA;;AAAA,kDAPyDC,SAOzD;;AAAA,sEAN0F,IAM1F;;AAAA,mDALoE,IAKpE;;AAAA,qDAMAC,mBADgC,IAEvB;AACT,UAAI,KAAKC,oBAAL,KAA8BD,mBAAlC,EAAuD;AACrD;AACD;;AAED,WAAKC,oBAAL,GAA4BD,mBAA5B;;AACA,WAAKE,SAAL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ADK;AAEL3B,QAAAA;AAFK,OAAP;AAID,KAtHC;;AAAA,oCAwHesC,KAAD,IAAwD;AACtE,UACE,OAAOA,KAAK,CAAC3C,mBAAb,KAAqC,SAArC,IACA,KAAKQ,cAAL,CAAoBoC,qBAFtB,EAGE;AACA,aAAKlC,uBAAL,CAA6BiC,KAAK,CAAC3C,mBAAnC;AACD,OALD,MAKO;AACL,aAAK6C,qBAAL,CAA2BF,KAAK,CAACG,WAAjC;AACD;AACF,KAjIC;;AAAA,0CAmIoB,MAAkC;AACtD,aAAO,KAAK7C,oBAAZ;AACD,KArIC;;AAAA,sCAuIgB,MAAY;AAC5B;AACA,UAAI,KAAKG,wCAAL,KAAkD,IAAtD,EAA4D;AAC1D,aAAKA,wCAAL,CAA8CC,MAA9C;;AACA,aAAKD,wCAAL,GAAgD,IAAhD;AACD,OAL2B,CAO5B;;;AACA,UAAI,KAAKE,qBAAL,KAA+B,IAAnC,EAAyC;AACvCC,QAAAA,YAAY,CAAC,KAAKD,qBAAN,CAAZ;AACA,aAAKA,qBAAL,GAA6B,IAA7B;AACD;AACF,KAnJC;;AACA,SAAKE,cAAL,GAAsBX,aAAtB;AACA,SAAKK,SAAL,GAAiBJ,QAAjB;AACD;;AAbuC","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport * as PrivateTypes from './privateTypes';\nimport * as Types from './types';\n\ninterface InternetReachabilityCheckHandler {\n promise: Promise;\n cancel: () => void;\n}\n\nexport default class InternetReachability {\n private _configuration: Types.NetInfoConfiguration;\n private _listener: PrivateTypes.NetInfoInternetReachabilityChangeListener;\n private _isInternetReachable: boolean | null | undefined = undefined;\n private _currentInternetReachabilityCheckHandler: InternetReachabilityCheckHandler | null = null;\n private _currentTimeoutHandle: ReturnType | null = null;\n\n constructor(\n configuration: Types.NetInfoConfiguration,\n listener: PrivateTypes.NetInfoInternetReachabilityChangeListener,\n ) {\n this._configuration = configuration;\n this._listener = listener;\n }\n\n private _setIsInternetReachable = (\n isInternetReachable: boolean | null,\n ): void => {\n if (this._isInternetReachable === isInternetReachable) {\n return;\n }\n\n this._isInternetReachable = isInternetReachable;\n this._listener(this._isInternetReachable);\n };\n\n private _setExpectsConnection = (expectsConnection: boolean | null): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n\n if (expectsConnection && this._configuration.reachabilityShouldRun()) {\n // If we expect a connection, start the process for finding if we have one\n // Set the state to \"null\" if it was previously false\n if (!this._isInternetReachable) {\n this._setIsInternetReachable(null);\n }\n // Start a network request to check for internet\n this._currentInternetReachabilityCheckHandler = this._checkInternetReachability();\n } else {\n // If we don't expect a connection or don't run reachability check, just change the state to \"false\"\n this._setIsInternetReachable(false);\n }\n };\n\n private _checkInternetReachability = (): InternetReachabilityCheckHandler => {\n const controller = new AbortController();\n\n const responsePromise = fetch(this._configuration.reachabilityUrl, {\n headers: this._configuration.reachabilityHeaders,\n method: this._configuration.reachabilityMethod,\n cache: 'no-cache',\n signal: controller.signal,\n });\n\n // Create promise that will reject after the request timeout has been reached\n let timeoutHandle: ReturnType;\n const timeoutPromise = new Promise((): void => {\n timeoutHandle = setTimeout(\n (): void => controller.abort('timedout'),\n this._configuration.reachabilityRequestTimeout,\n );\n });\n\n // Create promise that makes it possible to cancel a pending request through a reject\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n let cancel: () => void = (): void => {};\n const cancelPromise = new Promise((_, reject): void => {\n cancel = (): void => reject('canceled');\n });\n\n const promise = Promise.race([\n responsePromise,\n timeoutPromise,\n cancelPromise,\n ])\n .then(\n (response): Promise => {\n return this._configuration.reachabilityTest(response);\n },\n )\n .then(\n (result): void => {\n this._setIsInternetReachable(result);\n const nextTimeoutInterval = this._isInternetReachable\n ? this._configuration.reachabilityLongTimeout\n : this._configuration.reachabilityShortTimeout;\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n nextTimeoutInterval,\n );\n },\n )\n .catch(\n (error: Error | 'timedout' | 'canceled'): void => {\n if ('canceled' === error) {\n controller.abort();\n } else {\n this._setIsInternetReachable(false);\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n this._configuration.reachabilityShortTimeout,\n );\n }\n },\n )\n // Clear request timeout and propagate any errors\n .then(\n (): void => {\n clearTimeout(timeoutHandle);\n },\n (error: Error): void => {\n clearTimeout(timeoutHandle);\n throw error;\n },\n );\n\n return {\n promise,\n cancel,\n };\n };\n\n public update = (state: PrivateTypes.NetInfoNativeModuleState): void => {\n if (\n typeof state.isInternetReachable === 'boolean' &&\n this._configuration.useNativeReachability\n ) {\n this._setIsInternetReachable(state.isInternetReachable);\n } else {\n this._setExpectsConnection(state.isConnected);\n }\n };\n\n public currentState = (): boolean | null | undefined => {\n return this._isInternetReachable;\n };\n\n public tearDown = (): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n };\n}\n"]} +\ No newline at end of file ++{"version":3,"names":["InternetReachability","constructor","configuration","listener","_defineProperty","undefined","isInternetReachable","_isInternetReachable","_listener","expectsConnection","_currentInternetReachabilityCheckHandler","cancel","_currentTimeoutHandle","clearTimeout","_configuration","reachabilityShouldRun","_setIsInternetReachable","_checkInternetReachability","controller","AbortController","responsePromise","fetch","reachabilityUrl","headers","reachabilityHeaders","method","reachabilityMethod","cache","signal","timeoutHandle","timeoutPromise","Promise","_","reject","setTimeout","reachabilityRequestTimeout","cancelPromise","promise","race","then","response","reachabilityTest","result","nextTimeoutInterval","reachabilityLongTimeout","reachabilityShortTimeout","catch","error","abort","state","useNativeReachability","_setExpectsConnection","isConnected","exports","default"],"sources":["internetReachability.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport * as PrivateTypes from './privateTypes';\nimport * as Types from './types';\n\ninterface InternetReachabilityCheckHandler {\n promise: Promise;\n cancel: () => void;\n}\n\nexport default class InternetReachability {\n private _configuration: Types.NetInfoConfiguration;\n private _listener: PrivateTypes.NetInfoInternetReachabilityChangeListener;\n private _isInternetReachable: boolean | null | undefined = undefined;\n private _currentInternetReachabilityCheckHandler: InternetReachabilityCheckHandler | null =\n null;\n private _currentTimeoutHandle: ReturnType | null = null;\n\n constructor(\n configuration: Types.NetInfoConfiguration,\n listener: PrivateTypes.NetInfoInternetReachabilityChangeListener,\n ) {\n this._configuration = configuration;\n this._listener = listener;\n }\n\n private _setIsInternetReachable = (\n isInternetReachable: boolean | null,\n ): void => {\n if (this._isInternetReachable === isInternetReachable) {\n return;\n }\n\n this._isInternetReachable = isInternetReachable;\n this._listener(this._isInternetReachable);\n };\n\n private _setExpectsConnection = (expectsConnection: boolean | null): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n\n if (expectsConnection && this._configuration.reachabilityShouldRun()) {\n // If we expect a connection, start the process for finding if we have one\n // Set the state to \"null\" if it was previously false\n if (!this._isInternetReachable) {\n this._setIsInternetReachable(null);\n }\n // Start a network request to check for internet\n this._currentInternetReachabilityCheckHandler =\n this._checkInternetReachability();\n } else {\n // If we don't expect a connection or don't run reachability check, just change the state to \"false\"\n this._setIsInternetReachable(false);\n }\n };\n\n private _checkInternetReachability = (): InternetReachabilityCheckHandler => {\n const controller = new AbortController();\n\n const responsePromise = fetch(this._configuration.reachabilityUrl, {\n headers: this._configuration.reachabilityHeaders,\n method: this._configuration.reachabilityMethod,\n cache: 'no-cache',\n signal: controller.signal,\n });\n\n // Create promise that will reject after the request timeout has been reached\n let timeoutHandle: ReturnType;\n const timeoutPromise = new Promise((_, reject): void => {\n timeoutHandle = setTimeout(\n (): void => reject('timedout'),\n this._configuration.reachabilityRequestTimeout,\n );\n });\n\n // Create promise that makes it possible to cancel a pending request through a reject\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n let cancel: () => void = (): void => {};\n const cancelPromise = new Promise((_, reject): void => {\n cancel = (): void => reject('canceled');\n });\n\n const promise = Promise.race([\n responsePromise,\n timeoutPromise,\n cancelPromise,\n ])\n .then((response): Promise => {\n return this._configuration.reachabilityTest(response);\n })\n .then((result): void => {\n this._setIsInternetReachable(result);\n const nextTimeoutInterval = this._isInternetReachable\n ? this._configuration.reachabilityLongTimeout\n : this._configuration.reachabilityShortTimeout;\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n nextTimeoutInterval,\n );\n })\n .catch((error: Error | 'timedout' | 'canceled'): void => {\n if (error !== 'canceled') {\n this._setIsInternetReachable(false);\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n this._configuration.reachabilityShortTimeout,\n );\n }\n })\n .catch(\n (error: Error | 'timedout' | 'canceled'): void => {\n if ('canceled' === error) {\n controller.abort();\n } else {\n if ('timedout' === error) {\n controller.abort();\n }\n \n this._setIsInternetReachable(false);\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n this._configuration.reachabilityShortTimeout,\n );\n }\n },\n )\n // Clear request timeout and propagate any errors\n .then(\n (): void => {\n clearTimeout(timeoutHandle);\n },\n (error: Error): void => {\n clearTimeout(timeoutHandle);\n throw error;\n },\n );\n\n return {\n promise,\n cancel,\n };\n };\n\n public update = (state: PrivateTypes.NetInfoNativeModuleState): void => {\n if (\n typeof state.isInternetReachable === 'boolean' &&\n this._configuration.useNativeReachability\n ) {\n this._setIsInternetReachable(state.isInternetReachable);\n } else {\n this._setExpectsConnection(state.isConnected);\n }\n };\n\n public currentState = (): boolean | null | undefined => {\n return this._isInternetReachable;\n };\n\n public tearDown = (): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n };\n}\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUe,MAAMA,oBAAoB,CAAC;EAQxCC,WAAWA,CACTC,aAAyC,EACzCC,QAAgE,EAChE;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA,+BARyDC,SAAS;IAAAD,eAAA,mDAElE,IAAI;IAAAA,eAAA,gCACgE,IAAI;IAAAA,eAAA,kCAWxEE,mBAAmC,IAC1B;MACT,IAAI,IAAI,CAACC,oBAAoB,KAAKD,mBAAmB,EAAE;QACrD;MACF;MAEA,IAAI,CAACC,oBAAoB,GAAGD,mBAAmB;MAC/C,IAAI,CAACE,SAAS,CAAC,IAAI,CAACD,oBAAoB,CAAC;IAC3C,CAAC;IAAAH,eAAA,gCAEgCK,iBAAiC,IAAW;MAC3E;MACA,IAAI,IAAI,CAACC,wCAAwC,KAAK,IAAI,EAAE;QAC1D,IAAI,CAACA,wCAAwC,CAACC,MAAM,CAAC,CAAC;QACtD,IAAI,CAACD,wCAAwC,GAAG,IAAI;MACtD;MACA;MACA,IAAI,IAAI,CAACE,qBAAqB,KAAK,IAAI,EAAE;QACvCC,YAAY,CAAC,IAAI,CAACD,qBAAqB,CAAC;QACxC,IAAI,CAACA,qBAAqB,GAAG,IAAI;MACn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KAAK;MACb,CACF,CAAC;MAEH,OAAO;QACLV,OAAO;QACP1B;MACF,CAAC;IACH,CAAC;IAAAP,eAAA,iBAEgB6C,KAA4C,IAAW;MACtE,IACE,OAAOA,KAAK,CAAC3C,mBAAmB,KAAK,SAAS,IAC9C,IAAI,CAACQ,cAAc,CAACoC,qBAAqB,EACzC;QACA,IAAI,CAAClC,uBAAuB,CAACiC,KAAK,CAAC3C,mBAAmB,CAAC;MACzD,CAAC,MAAM;QACL,IAAI,CAAC6C,qBAAqB,CAACF,KAAK,CAACG,WAAW,CAAC;MAC/C;IACF,CAAC;IAAAhD,eAAA,uBAEqB,MAAkC;MACtD,OAAO,IAAI,CAACG,oBAAoB;IAClC,CAAC;IAAAH,eAAA,mBAEiB,MAAY;MAC5B;MACA,IAAI,IAAI,CAACM,wCAAwC,KAAK,IAAI,EAAE;QAC1D,IAAI,CAACA,wCAAwC,CAACC,MAAM,CAAC,CAAC;QACtD,IAAI,CAACD,wCAAwC,GAAG,IAAI;MACtD;;MAEA;MACA,IAAI,IAAI,CAACE,qBAAqB,KAAK,IAAI,EAAE;QACvCC,YAAY,CAAC,IAAI,CAACD,qBAAqB,CAAC;QACxC,IAAI,CAACA,qBAAqB,GAAG,IAAI;MACnC;IACF,CAAC;IA5JC,IAAI,CAACE,cAAc,GAAGZ,aAAa;IACnC,IAAI,CAACM,SAAS,GAAGL,QAAQ;EAC3B;AA2JF;AAACkD,OAAA,CAAAC,OAAA,GAAAtD,oBAAA"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js +index 7a50da5..cb7d968 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js +@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; +- + var _reactNative = require("react-native"); +- + var _nativeModule = _interopRequireDefault(require("./nativeModule")); +- + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +- + /** + * Copyright (c) Facebook, Inc. and its affiliates. + * +@@ -19,6 +15,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de + * + * @format + */ ++ + // Produce an error if we don't have the native module + if (!_nativeModule.default) { + throw new Error(`@react-native-community/netinfo: NativeModule.RNCNetInfo is null. To fix this issue try these steps: +@@ -31,27 +28,26 @@ if (!_nativeModule.default) { + + If none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-netinfo`); + } ++ + /** + * We export the native interface in this way to give easy shared access to it between the + * JavaScript code and the tests + */ +- +- + let nativeEventEmitter = null; +-var _default = { ..._nativeModule.default, +- ++var _default = exports.default = { ++ configure: _nativeModule.default.configure, ++ addListener: _nativeModule.default.addListener, ++ removeListeners: _nativeModule.default.removeListeners, ++ getCurrentState: _nativeModule.default.getCurrentState, + get eventEmitter() { + if (!nativeEventEmitter) { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + /// @ts-ignore + nativeEventEmitter = new _reactNative.NativeEventEmitter(_nativeModule.default); +- } // eslint-disable-next-line @typescript-eslint/ban-ts-comment ++ } ++ // eslint-disable-next-line @typescript-eslint/ban-ts-comment + /// @ts-ignore +- +- + return nativeEventEmitter; + } +- + }; +-exports.default = _default; + //# sourceMappingURL=nativeInterface.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js.map +index 1e7ac57..33b4bc0 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["nativeInterface.ts"],"names":["RNCNetInfo","Error","nativeEventEmitter","eventEmitter","NativeEventEmitter"],"mappings":";;;;;;;AASA;;AACA;;;;AAVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA,IAAI,CAACA,qBAAL,EAAiB;AACf,QAAM,IAAIC,KAAJ,CAAW;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8IARQ,CAAN;AASD;AAED;AACA;AACA;AACA;;;AACA,IAAIC,kBAA6C,GAAG,IAApD;eACe,EACb,GAAGF,qBADU;;AAEb,MAAIG,YAAJ,GAAuC;AACrC,QAAI,CAACD,kBAAL,EAAyB;AACvB;AACA;AACAA,MAAAA,kBAAkB,GAAG,IAAIE,+BAAJ,CAAuBJ,qBAAvB,CAArB;AACD,KALoC,CAMrC;AACA;;;AACA,WAAOE,kBAAP;AACD;;AAXY,C","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\n\n// Produce an error if we don't have the native module\nif (!RNCNetInfo) {\n throw new Error(`@react-native-community/netinfo: NativeModule.RNCNetInfo is null. To fix this issue try these steps:\n\n• Run \\`react-native link @react-native-community/netinfo\\` in the project root.\n• Rebuild and re-run the app.\n• If you are using CocoaPods on iOS, run \\`pod install\\` in the \\`ios\\` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n• Check that the library was linked correctly when you used the link command by running through the manual installation instructions in the README.\n* If you are getting this error while unit testing you need to mock the native module. Follow the guide in the README.\n\nIf none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-netinfo`);\n}\n\n/**\n * We export the native interface in this way to give easy shared access to it between the\n * JavaScript code and the tests\n */\nlet nativeEventEmitter: NativeEventEmitter | null = null;\nexport default {\n ...RNCNetInfo,\n get eventEmitter(): NativeEventEmitter {\n if (!nativeEventEmitter) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n nativeEventEmitter = new NativeEventEmitter(RNCNetInfo);\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n return nativeEventEmitter;\n },\n};\n"]} +\ No newline at end of file ++{"version":3,"names":["_reactNative","require","_nativeModule","_interopRequireDefault","obj","__esModule","default","RNCNetInfo","Error","nativeEventEmitter","_default","exports","configure","addListener","removeListeners","getCurrentState","eventEmitter","NativeEventEmitter"],"sources":["nativeInterface.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\n\n// Produce an error if we don't have the native module\nif (!RNCNetInfo) {\n throw new Error(`@react-native-community/netinfo: NativeModule.RNCNetInfo is null. To fix this issue try these steps:\n\n• Run \\`react-native link @react-native-community/netinfo\\` in the project root.\n• Rebuild and re-run the app.\n• If you are using CocoaPods on iOS, run \\`pod install\\` in the \\`ios\\` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n• Check that the library was linked correctly when you used the link command by running through the manual installation instructions in the README.\n* If you are getting this error while unit testing you need to mock the native module. Follow the guide in the README.\n\nIf none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-netinfo`);\n}\n\n/**\n * We export the native interface in this way to give easy shared access to it between the\n * JavaScript code and the tests\n */\nlet nativeEventEmitter: NativeEventEmitter | null = null;\n\nexport default {\n configure: RNCNetInfo.configure,\n addListener: RNCNetInfo.addListener,\n removeListeners: RNCNetInfo.removeListeners,\n getCurrentState: RNCNetInfo.getCurrentState,\n get eventEmitter(): NativeEventEmitter {\n if (!nativeEventEmitter) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n nativeEventEmitter = new NativeEventEmitter(RNCNetInfo);\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n return nativeEventEmitter;\n },\n};\n"],"mappings":";;;;;;AASA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAwC,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAVxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACA,IAAI,CAACG,qBAAU,EAAE;EACf,MAAM,IAAIC,KAAK,CAAE;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8IAA8I,CAAC;AAC/I;;AAEA;AACA;AACA;AACA;AACA,IAAIC,kBAA6C,GAAG,IAAI;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAL,OAAA,GAE1C;EACbM,SAAS,EAAEL,qBAAU,CAACK,SAAS;EAC/BC,WAAW,EAAEN,qBAAU,CAACM,WAAW;EACnCC,eAAe,EAAEP,qBAAU,CAACO,eAAe;EAC3CC,eAAe,EAAER,qBAAU,CAACQ,eAAe;EAC3C,IAAIC,YAAYA,CAAA,EAAuB;IACrC,IAAI,CAACP,kBAAkB,EAAE;MACvB;MACA;MACAA,kBAAkB,GAAG,IAAIQ,+BAAkB,CAACV,qBAAU,CAAC;IACzD;IACA;IACA;IACA,OAAOE,kBAAkB;EAC3B;AACF,CAAC"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js +index 5e77388..d591606 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js +@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; +- + var _reactNative = require("react-native"); +- + var _nativeModule = _interopRequireDefault(require("./nativeModule")); +- + var _privateTypes = require("./privateTypes"); +- + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +- + /** + * Copyright (c) Facebook, Inc. and its affiliates. + * +@@ -21,14 +16,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de + * + * @format + */ +-const nativeEventEmitter = new _reactNative.NativeEventEmitter(); // Listen to connectivity events + ++const nativeEventEmitter = new _reactNative.NativeEventEmitter(); ++ ++// Listen to connectivity events + _nativeModule.default.addListener(_privateTypes.DEVICE_CONNECTIVITY_EVENT, event => { + nativeEventEmitter.emit(_privateTypes.DEVICE_CONNECTIVITY_EVENT, event); + }); +- +-var _default = { ..._nativeModule.default, ++var _default = exports.default = { ++ ..._nativeModule.default, + eventEmitter: nativeEventEmitter + }; +-exports.default = _default; + //# sourceMappingURL=nativeInterface.web.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js.map +index 9fc4a6d..9b6f4b4 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["nativeInterface.web.ts"],"names":["nativeEventEmitter","NativeEventEmitter","RNCNetInfo","addListener","DEVICE_CONNECTIVITY_EVENT","event","emit","eventEmitter"],"mappings":";;;;;;;AASA;;AACA;;AACA;;;;AAXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA,MAAMA,kBAAkB,GAAG,IAAIC,+BAAJ,EAA3B,C,CAEA;;AACAC,sBAAWC,WAAX,CACEC,uCADF,EAEGC,KAAD,IAAiB;AACfL,EAAAA,kBAAkB,CAACM,IAAnB,CAAwBF,uCAAxB,EAAmDC,KAAnD;AACD,CAJH;;eAOe,EACb,GAAGH,qBADU;AAEbK,EAAAA,YAAY,EAAEP;AAFD,C","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\nimport {DEVICE_CONNECTIVITY_EVENT} from './privateTypes';\n\nconst nativeEventEmitter = new NativeEventEmitter();\n\n// Listen to connectivity events\nRNCNetInfo.addListener(\n DEVICE_CONNECTIVITY_EVENT,\n (event): void => {\n nativeEventEmitter.emit(DEVICE_CONNECTIVITY_EVENT, event);\n },\n);\n\nexport default {\n ...RNCNetInfo,\n eventEmitter: nativeEventEmitter,\n};\n"]} +\ No newline at end of file ++{"version":3,"names":["_reactNative","require","_nativeModule","_interopRequireDefault","_privateTypes","obj","__esModule","default","nativeEventEmitter","NativeEventEmitter","RNCNetInfo","addListener","DEVICE_CONNECTIVITY_EVENT","event","emit","_default","exports","eventEmitter"],"sources":["nativeInterface.web.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\nimport {DEVICE_CONNECTIVITY_EVENT} from './privateTypes';\n\nconst nativeEventEmitter = new NativeEventEmitter();\n\n// Listen to connectivity events\nRNCNetInfo.addListener(DEVICE_CONNECTIVITY_EVENT, (event): void => {\n nativeEventEmitter.emit(DEVICE_CONNECTIVITY_EVENT, event);\n});\n\nexport default {\n ...RNCNetInfo,\n eventEmitter: nativeEventEmitter,\n};\n"],"mappings":";;;;;;AASA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AAAyD,SAAAE,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAXzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA,MAAMG,kBAAkB,GAAG,IAAIC,+BAAkB,CAAC,CAAC;;AAEnD;AACAC,qBAAU,CAACC,WAAW,CAACC,uCAAyB,EAAGC,KAAK,IAAW;EACjEL,kBAAkB,CAACM,IAAI,CAACF,uCAAyB,EAAEC,KAAK,CAAC;AAC3D,CAAC,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,CAAAT,OAAA,GAEY;EACb,GAAGG,qBAAU;EACbO,YAAY,EAAET;AAChB,CAAC"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js +index 8fd237d..6d06932 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js +@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; +- + var _reactNative = require("react-native"); +- + /** + * Copyright (c) Facebook, Inc. and its affiliates. + * +@@ -15,7 +13,15 @@ var _reactNative = require("react-native"); + * + * @format + */ +-const RNCNetInfo = _reactNative.NativeModules.RNCNetInfo; +-var _default = RNCNetInfo; +-exports.default = _default; ++ ++// React Native sets `__turboModuleProxy` on global when TurboModules are enabled. ++// Currently, this is the recommended way to detect TurboModules. ++// https://reactnative.dev/docs/the-new-architecture/backward-compatibility-turbomodules#unify-the-javascript-specs ++// eslint-disable-next-line @typescript-eslint/ban-ts-comment ++// @ts-ignore ++const isTurboModuleEnabled = global.__turboModuleProxy != null; ++const RNCNetInfo = isTurboModuleEnabled ? ++// eslint-disable-next-line @typescript-eslint/no-var-requires ++require('./NativeRNCNetInfo').default : _reactNative.NativeModules.RNCNetInfo; ++var _default = exports.default = RNCNetInfo; + //# sourceMappingURL=nativeModule.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js.map +index dcf6159..5d5bb50 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["nativeModule.ts"],"names":["RNCNetInfo","NativeModules"],"mappings":";;;;;;;AASA;;AATA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA,MAAMA,UAA+B,GAAGC,2BAAcD,UAAtD;eAEeA,U","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeModules} from 'react-native';\nimport {NetInfoNativeModule} from './privateTypes';\n\nconst RNCNetInfo: NetInfoNativeModule = NativeModules.RNCNetInfo;\n\nexport default RNCNetInfo;\n"]} +\ No newline at end of file ++{"version":3,"names":["_reactNative","require","isTurboModuleEnabled","global","__turboModuleProxy","RNCNetInfo","default","NativeModules","_default","exports"],"sources":["nativeModule.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeModules} from 'react-native';\nimport {NetInfoNativeModule} from './privateTypes';\n\n// React Native sets `__turboModuleProxy` on global when TurboModules are enabled.\n// Currently, this is the recommended way to detect TurboModules.\n// https://reactnative.dev/docs/the-new-architecture/backward-compatibility-turbomodules#unify-the-javascript-specs\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst isTurboModuleEnabled = global.__turboModuleProxy != null;\n\nconst RNCNetInfo: NetInfoNativeModule = isTurboModuleEnabled\n ? // eslint-disable-next-line @typescript-eslint/no-var-requires\n require('./NativeRNCNetInfo').default\n : NativeModules.RNCNetInfo;\n\nexport default RNCNetInfo;\n"],"mappings":";;;;;;AASA,IAAAA,YAAA,GAAAC,OAAA;AATA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA,MAAMC,oBAAoB,GAAGC,MAAM,CAACC,kBAAkB,IAAI,IAAI;AAE9D,MAAMC,UAA+B,GAAGH,oBAAoB;AACxD;AACAD,OAAO,CAAC,oBAAoB,CAAC,CAACK,OAAO,GACrCC,0BAAa,CAACF,UAAU;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAH,OAAA,GAEdD,UAAU"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js +index ad66cbe..0da582c 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js +@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; +- + var _privateTypes = require("./privateTypes"); +- + var _types = require("./types"); +- + /** + * Copyright (c) Facebook, Inc. and its affiliates. + * +@@ -17,12 +14,23 @@ var _types = require("./types"); + * + * @format + */ ++ ++// See https://wicg.github.io/netinfo/#dom-connectiontype ++ ++// See https://wicg.github.io/netinfo/#dom-effectiveconnectiontype ++ ++// https://wicg.github.io/netinfo/#dom-networkinformation-savedata ++ ++// Create (optional) connection APIs on navigator ++ + // Use a constant test of this form because in SSR on next.js, optional chaining is not sufficient, + // but this test correctly detects that window is not available and allows for conditionals before access +-const isWindowPresent = typeof window !== 'undefined'; // Check if window exists and if the browser supports the connection API ++const isWindowPresent = typeof window !== 'undefined'; + +-const connection = isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS') ? window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection : undefined; // Map browser types to native types ++// Check if window exists and if the browser supports the connection API ++const connection = isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS') ? window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection : undefined; + ++// Map browser types to native types + const typeMapping = { + bluetooth: _types.NetInfoStateType.bluetooth, + cellular: _types.NetInfoStateType.cellular, +@@ -39,17 +47,20 @@ const effectiveTypeMapping = { + '3g': _types.NetInfoCellularGeneration['3g'], + '4g': _types.NetInfoCellularGeneration['4g'], + 'slow-2g': _types.NetInfoCellularGeneration['2g'] +-}; // Determine current state of connection ++}; + ++// Determine current state of connection + const getCurrentState = _requestedInterface => { + const isConnected = isWindowPresent ? navigator.onLine : false; + const baseState = { + isInternetReachable: null +- }; // If we don't have a connection object, we return minimal information ++ }; + ++ // If we don't have a connection object, we return minimal information + if (!connection) { + if (isConnected) { +- const state = { ...baseState, ++ const state = { ++ ...baseState, + isConnected: true, + type: _types.NetInfoStateType.other, + details: { +@@ -58,22 +69,22 @@ const getCurrentState = _requestedInterface => { + }; + return state; + } +- +- const state = { ...baseState, ++ const state = { ++ ...baseState, + isConnected: false, + isInternetReachable: false, + type: _types.NetInfoStateType.none, + details: null + }; + return state; +- } // Otherwise try to return detailed information +- ++ } + ++ // Otherwise try to return detailed information + const isConnectionExpensive = connection.saveData; + const type = connection.type ? typeMapping[connection.type] : isConnected ? _types.NetInfoStateType.other : _types.NetInfoStateType.unknown; +- + if (type === _types.NetInfoStateType.bluetooth) { +- const state = { ...baseState, ++ const state = { ++ ...baseState, + isConnected: true, + type, + details: { +@@ -82,7 +93,8 @@ const getCurrentState = _requestedInterface => { + }; + return state; + } else if (type === _types.NetInfoStateType.cellular) { +- const state = { ...baseState, ++ const state = { ++ ...baseState, + isConnected: true, + type, + details: { +@@ -93,7 +105,8 @@ const getCurrentState = _requestedInterface => { + }; + return state; + } else if (type === _types.NetInfoStateType.ethernet) { +- const state = { ...baseState, ++ const state = { ++ ...baseState, + isConnected: true, + type, + details: { +@@ -104,7 +117,8 @@ const getCurrentState = _requestedInterface => { + }; + return state; + } else if (type === _types.NetInfoStateType.wifi) { +- const state = { ...baseState, ++ const state = { ++ ...baseState, + isConnected: true, + type, + details: { +@@ -122,7 +136,8 @@ const getCurrentState = _requestedInterface => { + }; + return state; + } else if (type === _types.NetInfoStateType.wimax) { +- const state = { ...baseState, ++ const state = { ++ ...baseState, + isConnected: true, + type, + details: { +@@ -131,7 +146,8 @@ const getCurrentState = _requestedInterface => { + }; + return state; + } else if (type === _types.NetInfoStateType.none) { +- const state = { ...baseState, ++ const state = { ++ ...baseState, + isConnected: false, + isInternetReachable: false, + type, +@@ -139,7 +155,8 @@ const getCurrentState = _requestedInterface => { + }; + return state; + } else if (type === _types.NetInfoStateType.unknown) { +- const state = { ...baseState, ++ const state = { ++ ...baseState, + isConnected, + isInternetReachable: null, + type, +@@ -147,8 +164,8 @@ const getCurrentState = _requestedInterface => { + }; + return state; + } +- +- const state = { ...baseState, ++ const state = { ++ ...baseState, + isConnected: true, + type: _types.NetInfoStateType.other, + details: { +@@ -157,7 +174,6 @@ const getCurrentState = _requestedInterface => { + }; + return state; + }; +- + const handlers = []; + const nativeHandlers = []; + const RNCNetInfo = { +@@ -168,7 +184,6 @@ const RNCNetInfo = { + const nativeHandler = () => { + handler(getCurrentState()); + }; +- + if (connection) { + connection.addEventListener('change', nativeHandler); + } else { +@@ -176,16 +191,15 @@ const RNCNetInfo = { + window.addEventListener('online', nativeHandler, false); + window.addEventListener('offline', nativeHandler, false); + } +- } // Remember handlers +- ++ } + ++ // Remember handlers + handlers.push(handler); + nativeHandlers.push(nativeHandler); + break; + } + } + }, +- + removeListeners(type, handler) { + switch (type) { + case _privateTypes.DEVICE_CONNECTIVITY_EVENT: +@@ -193,7 +207,6 @@ const RNCNetInfo = { + // Get native handler + const index = handlers.indexOf(handler); + const nativeHandler = nativeHandlers[index]; +- + if (connection) { + connection.removeEventListener('change', nativeHandler); + } else { +@@ -201,25 +214,21 @@ const RNCNetInfo = { + window.removeEventListener('online', nativeHandler); + window.removeEventListener('offline', nativeHandler); + } +- } // Remove handlers +- ++ } + ++ // Remove handlers + handlers.splice(index, 1); + nativeHandlers.splice(index, 1); + break; + } + } + }, +- + async getCurrentState(requestedInterface) { + return getCurrentState(requestedInterface); + }, +- + configure() { + return; + } +- + }; +-var _default = RNCNetInfo; +-exports.default = _default; ++var _default = exports.default = RNCNetInfo; + //# sourceMappingURL=nativeModule.web.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js.map +index 7dcfca9..a0632f9 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["nativeModule.web.ts"],"names":["isWindowPresent","window","connection","hasOwnProperty","navigator","mozConnection","webkitConnection","undefined","typeMapping","bluetooth","NetInfoStateType","cellular","ethernet","none","other","unknown","wifi","wimax","mixed","effectiveTypeMapping","NetInfoCellularGeneration","getCurrentState","_requestedInterface","isConnected","onLine","baseState","isInternetReachable","state","type","details","isConnectionExpensive","saveData","cellularGeneration","effectiveType","carrier","ipAddress","subnet","ssid","bssid","strength","frequency","linkSpeed","rxLinkSpeed","txLinkSpeed","handlers","nativeHandlers","RNCNetInfo","addListener","handler","DEVICE_CONNECTIVITY_EVENT","nativeHandler","addEventListener","push","removeListeners","index","indexOf","removeEventListener","splice","requestedInterface","configure"],"mappings":";;;;;;;AASA;;AAKA;;AAdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAiEA;AACA;AACA,MAAMA,eAAe,GAAG,OAAOC,MAAP,KAAkB,WAA1C,C,CAEA;;AACA,MAAMC,UAAU,GAAIF,eAAe,IAAI,CAACC,MAAM,CAACE,cAAP,CAAsB,OAAtB,CAApB,IAAsD,CAACF,MAAM,CAACE,cAAP,CAAsB,OAAtB,CAAxD,GACfF,MAAM,CAACG,SAAP,CAAiBF,UAAjB,IACAD,MAAM,CA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;AACE,WAAKqB,uCAAL;AAAgC;AAC9B;AACA,gBAAMK,KAAK,GAAGV,QAAQ,CAACW,OAAT,CAAiBP,OAAjB,CAAd;AACA,gBAAME,aAAa,GAAGL,cAAc,CAACS,KAAD,CAApC;;AAEA,cAAIpD,UAAJ,EAAgB;AACdA,YAAAA,UAAU,CAACsD,mBAAX,CAA+B,QAA/B,EAAyCN,aAAzC;AACD,WAFD,MAEO;AACL,gBAAIlD,eAAJ,EAAqB;AACnBC,cAAAA,MAAM,CAACuD,mBAAP,CAA2B,QAA3B,EAAqCN,aAArC;AACAjD,cAAAA,MAAM,CAACuD,mBAAP,CAA2B,SAA3B,EAAsCN,aAAtC;AACD;AACF,WAZ6B,CAc9B;;;AACAN,UAAAA,QAAQ,CAACa,MAAT,CAAgBH,KAAhB,EAAuB,CAAvB;AACAT,UAAAA,cAAc,CAACY,MAAf,CAAsBH,KAAtB,EAA6B,CAA7B;AAEA;AACD;AApBH;AAsBD,GAjDqC;;AAmDtC,QAAMjC,eAAN,CAAsBqC,kBAAtB,EAA6E;AAC3E,WAAOrC,eAAe,CAACqC,kBAAD,CAAtB;AACD,GArDqC;;AAuDtCC,EAAAA,SAAS,GAAS;AAChB;AACD;;AAzDqC,CAAxC;eA4Deb,U","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {\n DEVICE_CONNECTIVITY_EVENT,\n NetInfoNativeModule,\n NetInfoNativeModuleState,\n} from './privateTypes';\nimport {\n NetInfoBluetoothState,\n NetInfoCellularGeneration,\n NetInfoCellularState,\n NetInfoEthernetState,\n NetInfoNoConnectionState,\n NetInfoOtherState,\n NetInfoState,\n NetInfoStateType,\n NetInfoUnknownState,\n NetInfoWifiState,\n NetInfoWimaxState,\n} from './types';\n\n// See https://wicg.github.io/netinfo/#dom-connectiontype\ntype ConnectionType =\n | 'bluetooth'\n | 'cellular'\n | 'ethernet'\n | 'mixed'\n | 'none'\n | 'other'\n | 'unknown'\n | 'wifi'\n | 'wimax';\n\n// See https://wicg.github.io/netinfo/#dom-effectiveconnectiontype\ntype ConnectionEffectiveType = '2g' | '3g' | '4g' | 'slow-2g';\n\n// https://wicg.github.io/netinfo/#dom-networkinformation-savedata\ntype ConnectionSaveData = boolean;\n\ninterface Events {\n change: Event;\n}\n\ninterface Connection {\n type: ConnectionType;\n effectiveType: ConnectionEffectiveType;\n saveData: ConnectionSaveData;\n addEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\n// Create (optional) connection APIs on navigator\ndeclare global {\n interface Navigator {\n connection?: Connection;\n mozConnection?: Connection;\n webkitConnection?: Connection;\n }\n}\n// Use a constant test of this form because in SSR on next.js, optional chaining is not sufficient,\n// but this test correctly detects that window is not available and allows for conditionals before access\nconst isWindowPresent = typeof window !== 'undefined';\n\n// Check if window exists and if the browser supports the connection API\nconst connection = (isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS'))\n ? window.navigator.connection ||\n window.navigator.mozConnection ||\n window.navigator.webkitConnection\n : undefined;\n\n// Map browser types to native types\nconst typeMapping: Record = {\n bluetooth: NetInfoStateType.bluetooth,\n cellular: NetInfoStateType.cellular,\n ethernet: NetInfoStateType.ethernet,\n none: NetInfoStateType.none,\n other: NetInfoStateType.other,\n unknown: NetInfoStateType.unknown,\n wifi: NetInfoStateType.wifi,\n wimax: NetInfoStateType.wimax,\n mixed: NetInfoStateType.other,\n};\nconst effectiveTypeMapping: Record<\n ConnectionEffectiveType,\n NetInfoCellularGeneration\n> = {\n '2g': NetInfoCellularGeneration['2g'],\n '3g': NetInfoCellularGeneration['3g'],\n '4g': NetInfoCellularGeneration['4g'],\n 'slow-2g': NetInfoCellularGeneration['2g'],\n};\n\n// Determine current state of connection\nconst getCurrentState = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _requestedInterface?: string,\n): Pick> => {\n const isConnected = isWindowPresent ? navigator.onLine : false;\n const baseState = {\n isInternetReachable: null,\n };\n\n // If we don't have a connection object, we return minimal information\n if (!connection) {\n if (isConnected) {\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive: false,\n },\n };\n return state;\n }\n\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type: NetInfoStateType.none,\n details: null,\n };\n return state;\n }\n\n // Otherwise try to return detailed information\n const isConnectionExpensive = connection.saveData;\n const type: NetInfoStateType = connection.type\n ? typeMapping[connection.type]\n : isConnected\n ? NetInfoStateType.other\n : NetInfoStateType.unknown;\n\n if (type === NetInfoStateType.bluetooth) {\n const state: NetInfoBluetoothState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.cellular) {\n const state: NetInfoCellularState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n cellularGeneration:\n effectiveTypeMapping[connection.effectiveType] || null,\n carrier: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.ethernet) {\n const state: NetInfoEthernetState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ipAddress: null,\n subnet: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wifi) {\n const state: NetInfoWifiState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ssid: null,\n bssid: null,\n strength: null,\n ipAddress: null,\n subnet: null,\n frequency: null,\n linkSpeed: null,\n rxLinkSpeed: null,\n txLinkSpeed: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wimax) {\n const state: NetInfoWimaxState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.none) {\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type,\n details: null,\n };\n return state;\n } else if (type === NetInfoStateType.unknown) {\n const state: NetInfoUnknownState = {\n ...baseState,\n isConnected,\n isInternetReachable: null,\n type,\n details: null,\n };\n return state;\n }\n\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n};\n\nconst handlers: ((state: NetInfoNativeModuleState) => void)[] = [];\nconst nativeHandlers: (() => void)[] = [];\n\nconst RNCNetInfo: NetInfoNativeModule = {\n addListener(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n const nativeHandler = (): void => {\n handler(getCurrentState());\n };\n\n if (connection) {\n connection.addEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.addEventListener('online', nativeHandler, false);\n window.addEventListener('offline', nativeHandler, false);\n }\n }\n\n // Remember handlers\n handlers.push(handler);\n nativeHandlers.push(nativeHandler);\n\n break;\n }\n }\n },\n\n removeListeners(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n // Get native handler\n const index = handlers.indexOf(handler);\n const nativeHandler = nativeHandlers[index];\n\n if (connection) {\n connection.removeEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.removeEventListener('online', nativeHandler);\n window.removeEventListener('offline', nativeHandler);\n }\n }\n\n // Remove handlers\n handlers.splice(index, 1);\n nativeHandlers.splice(index, 1);\n\n break;\n }\n }\n },\n\n async getCurrentState(requestedInterface): Promise {\n return getCurrentState(requestedInterface);\n },\n\n configure(): void {\n return;\n },\n};\n\nexport default RNCNetInfo;\n"]} +\ No newline at end of file ++{"version":3,"names":["_privateTypes","require","_types","isWindowPresent","window","connection","hasOwnProperty","navigator","mozConnection","webkitConnection","undefined","typeMapping","bluetooth","NetInfoStateType","cellular","ethernet","none","other","unknown","wifi","wimax","mixed","effectiveTypeMapping","NetInfoCellularGeneration","getCurrentState","_requestedInterface","isConnected","onLine","baseState","isInternetReachable","state","type","details","isConnectionExpensive","saveData","cellularGeneration","effectiveType","carrier","ipAddress","subnet","ssid","bssid","strength","frequency","linkSpeed","rxLinkSpeed","txLinkSpeed","handlers","nativeHandlers","RNCNetInfo","addListener","handler","DEVICE_CONNECTIVITY_EVENT","nativeHandler","addEventListener","push","removeListeners","index","indexOf","removeEventListener","splice","requestedInterface","configure","_default","exports","default"],"sources":["nativeModule.web.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {\n DEVICE_CONNECTIVITY_EVENT,\n NetInfoNativeModule,\n NetInfoNativeModuleState,\n} from './privateTypes';\nimport {\n NetInfoBluetoothState,\n NetInfoCellularGeneration,\n NetInfoCellularState,\n NetInfoEthernetState,\n NetInfoNoConnectionState,\n NetInfoOtherState,\n NetInfoState,\n NetInfoStateType,\n NetInfoUnknownState,\n NetInfoWifiState,\n NetInfoWimaxState,\n} from './types';\n\n// See https://wicg.github.io/netinfo/#dom-connectiontype\ntype ConnectionType =\n | 'bluetooth'\n | 'cellular'\n | 'ethernet'\n | 'mixed'\n | 'none'\n | 'other'\n | 'unknown'\n | 'wifi'\n | 'wimax';\n\n// See https://wicg.github.io/netinfo/#dom-effectiveconnectiontype\ntype ConnectionEffectiveType = '2g' | '3g' | '4g' | 'slow-2g';\n\n// https://wicg.github.io/netinfo/#dom-networkinformation-savedata\ntype ConnectionSaveData = boolean;\n\ninterface Events {\n change: Event;\n}\n\ninterface Connection {\n type: ConnectionType;\n effectiveType: ConnectionEffectiveType;\n saveData: ConnectionSaveData;\n addEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\n// Create (optional) connection APIs on navigator\ndeclare global {\n interface Navigator {\n connection?: Connection;\n mozConnection?: Connection;\n webkitConnection?: Connection;\n }\n}\n// Use a constant test of this form because in SSR on next.js, optional chaining is not sufficient,\n// but this test correctly detects that window is not available and allows for conditionals before access\nconst isWindowPresent = typeof window !== 'undefined';\n\n// Check if window exists and if the browser supports the connection API\nconst connection = (isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS'))\n ? window.navigator.connection ||\n window.navigator.mozConnection ||\n window.navigator.webkitConnection\n : undefined;\n\n// Map browser types to native types\nconst typeMapping: Record = {\n bluetooth: NetInfoStateType.bluetooth,\n cellular: NetInfoStateType.cellular,\n ethernet: NetInfoStateType.ethernet,\n none: NetInfoStateType.none,\n other: NetInfoStateType.other,\n unknown: NetInfoStateType.unknown,\n wifi: NetInfoStateType.wifi,\n wimax: NetInfoStateType.wimax,\n mixed: NetInfoStateType.other,\n};\nconst effectiveTypeMapping: Record<\n ConnectionEffectiveType,\n NetInfoCellularGeneration\n> = {\n '2g': NetInfoCellularGeneration['2g'],\n '3g': NetInfoCellularGeneration['3g'],\n '4g': NetInfoCellularGeneration['4g'],\n 'slow-2g': NetInfoCellularGeneration['2g'],\n};\n\n// Determine current state of connection\nconst getCurrentState = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _requestedInterface?: string,\n): Pick> => {\n const isConnected = isWindowPresent ? navigator.onLine : false;\n const baseState = {\n isInternetReachable: null,\n };\n\n // If we don't have a connection object, we return minimal information\n if (!connection) {\n if (isConnected) {\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive: false,\n },\n };\n return state;\n }\n\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type: NetInfoStateType.none,\n details: null,\n };\n return state;\n }\n\n // Otherwise try to return detailed information\n const isConnectionExpensive = connection.saveData;\n const type: NetInfoStateType = connection.type\n ? typeMapping[connection.type]\n : isConnected\n ? NetInfoStateType.other\n : NetInfoStateType.unknown;\n\n if (type === NetInfoStateType.bluetooth) {\n const state: NetInfoBluetoothState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.cellular) {\n const state: NetInfoCellularState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n cellularGeneration:\n effectiveTypeMapping[connection.effectiveType] || null,\n carrier: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.ethernet) {\n const state: NetInfoEthernetState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ipAddress: null,\n subnet: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wifi) {\n const state: NetInfoWifiState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ssid: null,\n bssid: null,\n strength: null,\n ipAddress: null,\n subnet: null,\n frequency: null,\n linkSpeed: null,\n rxLinkSpeed: null,\n txLinkSpeed: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wimax) {\n const state: NetInfoWimaxState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.none) {\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type,\n details: null,\n };\n return state;\n } else if (type === NetInfoStateType.unknown) {\n const state: NetInfoUnknownState = {\n ...baseState,\n isConnected,\n isInternetReachable: null,\n type,\n details: null,\n };\n return state;\n }\n\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n};\n\nconst handlers: ((state: NetInfoNativeModuleState) => void)[] = [];\nconst nativeHandlers: (() => void)[] = [];\n\nconst RNCNetInfo: NetInfoNativeModule = {\n addListener(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n const nativeHandler = (): void => {\n handler(getCurrentState());\n };\n\n if (connection) {\n connection.addEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.addEventListener('online', nativeHandler, false);\n window.addEventListener('offline', nativeHandler, false);\n }\n }\n\n // Remember handlers\n handlers.push(handler);\n nativeHandlers.push(nativeHandler);\n\n break;\n }\n }\n },\n\n removeListeners(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n // Get native handler\n const index = handlers.indexOf(handler);\n const nativeHandler = nativeHandlers[index];\n\n if (connection) {\n connection.removeEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.removeEventListener('online', nativeHandler);\n window.removeEventListener('offline', nativeHandler);\n }\n }\n\n // Remove handlers\n handlers.splice(index, 1);\n nativeHandlers.splice(index, 1);\n\n break;\n }\n }\n },\n\n async getCurrentState(requestedInterface): Promise {\n return getCurrentState(requestedInterface);\n },\n\n configure(): void {\n return;\n },\n};\n\nexport default RNCNetInfo;\n"],"mappings":";;;;;;AASA,IAAAA,aAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AAdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAqBA;;AAYA;;AAGA;;AAqBA;;AAQA;AACA;AACA,MAAME,eAAe,GAAG,OAAOC,MAAM,KAAK,WAAW;;AAErD;AACA,MAAMC,UAAU,GAAIF,eAAe,IAAI,CAACC,MAAM,CAACE,cAAc,CAAC,OAAO,CAAC,IAAI,CAACF,MAAM,CAACE,cAAc,CAAC,OAAO,CAAC,GACrGF,MAAM,CAACG,SAAS,CAACF,UAAU,IAC3BD,MAAM,CAACG,SAAS,CAACC,aAAa,IAC9BJ,MAAM,CAACG,SAAS,CAACE,gBAAgB,GACjCC,SAAS;;AAEb;AACA,MAAMC,WAAqD,GAAG;EAC5DC,SAAS,EAAEC,uBAAgB,CAACD,SAAS;EACrCE,QAAQ,EAAED,uBAAgB,CAACC,QAAQ;EACnCC,QAAQ,EAAEF,uBAAgB,CAACE,QAAQ;EACnCC,IAAI,EAAEH,uBAAgB,CAACG,IAAI;EAC3BC,KAAK,EAAEJ,uBAAgB,CAACI,KAAK;EAC7BC,OA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ACkD,gBAAgB,CAAC,QAAQ,EAAED,aAAa,EAAE,KAAK,CAAC;cACvDjD,MAAM,CAACkD,gBAAgB,CAAC,SAAS,EAAED,aAAa,EAAE,KAAK,CAAC;YAC1D;UACF;;UAEA;UACAN,QAAQ,CAACQ,IAAI,CAACJ,OAAO,CAAC;UACtBH,cAAc,CAACO,IAAI,CAACF,aAAa,CAAC;UAElC;QACF;IACF;EACF,CAAC;EAEDG,eAAeA,CAACzB,IAAI,EAAEoB,OAAO,EAAQ;IACnC,QAAQpB,IAAI;MACV,KAAKqB,uCAAyB;QAAE;UAC9B;UACA,MAAMK,KAAK,GAAGV,QAAQ,CAACW,OAAO,CAACP,OAAO,CAAC;UACvC,MAAME,aAAa,GAAGL,cAAc,CAACS,KAAK,CAAC;UAE3C,IAAIpD,UAAU,EAAE;YACdA,UAAU,CAACsD,mBAAmB,CAAC,QAAQ,EAAEN,aAAa,CAAC;UACzD,CAAC,MAAM;YACL,IAAIlD,eAAe,EAAE;cACnBC,MAAM,CAACuD,mBAAmB,CAAC,QAAQ,EAAEN,aAAa,CAAC;cACnDjD,MAAM,CAACuD,mBAAmB,CAAC,SAAS,EAAEN,aAAa,CAAC;YACtD;UACF;;UAEA;UACAN,QAAQ,CAACa,MAAM,CAACH,KAAK,EAAE,CAAC,CAAC;UACzBT,cAAc,CAACY,MAAM,CAACH,KAAK,EAAE,CAAC,CAAC;UAE/B;QACF;IACF;EACF,CAAC;EAED,MAAMjC,eAAeA,CAACqC,kBAAkB,EAAqC;IAC3E,OAAOrC,eAAe,CAACqC,kBAAkB,CAAC;EAC5C,CAAC;EAEDC,SAASA,CAAA,EAAS;IAChB;EACF;AACF,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEahB,UAAU"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js +index 3112de1..ca209c1 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js +@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.DEVICE_CONNECTIVITY_EVENT = void 0; +- + /** + * Copyright (c) Facebook, Inc. and its affiliates. + * +@@ -13,7 +12,8 @@ exports.DEVICE_CONNECTIVITY_EVENT = void 0; + * + * @format + */ +-const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange'; // Certain properties are optional when sent by the native module and are handled by the JS code + +-exports.DEVICE_CONNECTIVITY_EVENT = DEVICE_CONNECTIVITY_EVENT; ++const DEVICE_CONNECTIVITY_EVENT = exports.DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange'; ++ ++// Certain properties are optional when sent by the native module and are handled by the JS code + //# sourceMappingURL=privateTypes.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js.map +index 2838e9a..a56f61c 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["privateTypes.ts"],"names":["DEVICE_CONNECTIVITY_EVENT"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIO,MAAMA,yBAAyB,GAAG,gCAAlC,C,CAEP","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NetInfoConfiguration, NetInfoState} from './types';\n\nexport const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange';\n\n// Certain properties are optional when sent by the native module and are handled by the JS code\nexport type NetInfoNativeModuleState = Pick<\n NetInfoState,\n Exclude\n> & {isInternetReachable?: boolean};\n\nexport interface Events {\n [DEVICE_CONNECTIVITY_EVENT]: NetInfoNativeModuleState;\n}\n\nexport interface NetInfoNativeModule {\n configure: (config: Partial) => void;\n getCurrentState: (\n requestedInterface?: string,\n ) => Promise;\n addListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeListeners(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\nexport type NetInfoInternetReachabilityChangeListener = (\n isInternetReachable: boolean | null | undefined,\n) => void;\n"]} +\ No newline at end of file ++{"version":3,"names":["DEVICE_CONNECTIVITY_EVENT","exports"],"sources":["privateTypes.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NetInfoConfiguration, NetInfoState} from './types';\n\nexport const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange';\n\n// Certain properties are optional when sent by the native module and are handled by the JS code\nexport type NetInfoNativeModuleState = Pick<\n NetInfoState,\n Exclude\n> & {isInternetReachable?: boolean};\n\nexport interface Events {\n [DEVICE_CONNECTIVITY_EVENT]: NetInfoNativeModuleState;\n}\n\nexport interface NetInfoNativeModule {\n configure: (config: Partial) => void;\n getCurrentState: (\n requestedInterface?: string,\n ) => Promise;\n addListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeListeners(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\nexport type NetInfoInternetReachabilityChangeListener = (\n isInternetReachable: boolean | null | undefined,\n) => void;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIO,MAAMA,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,gCAAgC;;AAEzE"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js +index 80dce38..57b8fbf 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js +@@ -4,84 +4,73 @@ Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = void 0; +- + var _nativeInterface = _interopRequireDefault(require("./nativeInterface")); +- + var _internetReachability = _interopRequireDefault(require("./internetReachability")); +- + var PrivateTypes = _interopRequireWildcard(require("./privateTypes")); +- +-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +- +-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +- ++function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } ++function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +- +-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +- ++function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } ++function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } ++function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /** ++ * Copyright (c) Facebook, Inc. and its affiliates. ++ * ++ * This source code is licensed under the MIT license found in the ++ * LICENSE file in the root directory of this source tree. ++ * ++ * @format ++ */ + class State { + constructor(configuration) { + _defineProperty(this, "_nativeEventSubscription", null); +- + _defineProperty(this, "_subscriptions", new Set()); +- + _defineProperty(this, "_latestState", null); +- + _defineProperty(this, "_internetReachability", void 0); +- + _defineProperty(this, "_handleNativeStateUpdate", state => { + // Update the internet reachability module +- this._internetReachability.update(state); // Convert the state from native to JS shape +- +- +- const convertedState = this._convertState(state); // Update the listeners ++ this._internetReachability.update(state); + ++ // Convert the state from native to JS shape ++ const convertedState = this._convertState(state); + ++ // Update the listeners + this._latestState = convertedState; +- + this._subscriptions.forEach(handler => handler(convertedState)); + }); +- + _defineProperty(this, "_handleInternetReachabilityUpdate", isInternetReachable => { + if (!this._latestState) { + return; + } +- +- const nextState = { ...this._latestState, ++ const nextState = { ++ ...this._latestState, + isInternetReachable + }; + this._latestState = nextState; +- + this._subscriptions.forEach(handler => handler(nextState)); + }); +- + _defineProperty(this, "_fetchCurrentState", async requestedInterface => { +- const state = await _nativeInterface.default.getCurrentState(requestedInterface); // Update the internet reachability module +- +- this._internetReachability.update(state); // Convert and store the new state +- ++ const state = await _nativeInterface.default.getCurrentState(requestedInterface); + ++ // Update the internet reachability module ++ this._internetReachability.update(state); ++ // Convert and store the new state + const convertedState = this._convertState(state); +- + if (!requestedInterface) { + this._latestState = convertedState; +- + this._subscriptions.forEach(handler => handler(convertedState)); + } +- + return convertedState; + }); +- + _defineProperty(this, "_convertState", input => { + if (typeof input.isInternetReachable === 'boolean') { + return input; + } else { +- return { ...input, ++ return { ++ ...input, + isInternetReachable: this._internetReachability.currentState() + }; + } + }); +- + _defineProperty(this, "latest", requestedInterface => { + if (requestedInterface) { + return this._fetchCurrentState(requestedInterface); +@@ -91,44 +80,38 @@ class State { + return this._fetchCurrentState(); + } + }); +- + _defineProperty(this, "add", handler => { + // Add the subscription handler to our set +- this._subscriptions.add(handler); // Send it the latest data we have +- ++ this._subscriptions.add(handler); + ++ // Send it the latest data we have + if (this._latestState) { + handler(this._latestState); + } else { + this.latest().then(handler); + } + }); +- + _defineProperty(this, "remove", handler => { + this._subscriptions.delete(handler); + }); +- + _defineProperty(this, "tearDown", () => { + if (this._internetReachability) { + this._internetReachability.tearDown(); + } +- + if (this._nativeEventSubscription) { + this._nativeEventSubscription.remove(); + } +- + this._subscriptions.clear(); + }); +- + // Add the listener to the internet connectivity events +- this._internetReachability = new _internetReachability.default(configuration, this._handleInternetReachabilityUpdate); // Add the subscription to the native events ++ this._internetReachability = new _internetReachability.default(configuration, this._handleInternetReachabilityUpdate); + +- this._nativeEventSubscription = _nativeInterface.default.eventEmitter.addListener(PrivateTypes.DEVICE_CONNECTIVITY_EVENT, this._handleNativeStateUpdate); // Fetch the current state from the native module ++ // Add the subscription to the native events ++ this._nativeEventSubscription = _nativeInterface.default.eventEmitter.addListener(PrivateTypes.DEVICE_CONNECTIVITY_EVENT, this._handleNativeStateUpdate); + ++ // Fetch the current state from the native module + this._fetchCurrentState(); + } +- + } +- + exports.default = State; + //# sourceMappingURL=state.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js.map +index 40ae85c..473e940 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["state.ts"],"names":["State","constructor","configuration","Set","state","_internetReachability","update","convertedState","_convertState","_latestState","_subscriptions","forEach","handler","isInternetReachable","nextState","requestedInterface","NativeInterface","getCurrentState","input","currentState","_fetchCurrentState","Promise","resolve","add","latest","then","delete","tearDown","_nativeEventSubscription","remove","clear","InternetReachability","_handleInternetReachabilityUpdate","eventEmitter","addListener","PrivateTypes","DEVICE_CONNECTIVITY_EVENT","_handleNativeStateUpdate"],"mappings":";;;;;;;AAUA;;AACA;;AAEA;;;;;;;;;;AAEe,MAAMA,KAAN,CAAY;AAMzBC,EAAAA,WAAW,CAACC,aAAD,EAA4C;AAAA,sDALY,IAKZ;;AAAA,4CAJ9B,IAAIC,GAAJ,EAI8B;;AAAA,0CAHL,IAGK;;AAAA;;AAAA,sDAkBrDC,KADiC,IAExB;AACT;AACA,WAAKC,qBAAL,CAA2BC,MAA3B,CAAkCF,KAAlC,EAFS,CAIT;;;AACA,YAAMG,cAAc,GAAG,KAAKC,aAAL,CAAmBJ,KAAnB,CAAvB,CALS,CAOT;;;AACA,WAAKK,YAAL,GAAoBF,cAApB;;AACA,WAAKG,cAAL,CAAoBC,OAApB,CAA6BC,OAAD,IAAmBA,OAAO,CAACL,cAAD,CAAtD;AACD,KA7BsD;;AAAA,+DAgCrDM,mBAD0C,IAEjC;AACT,UAAI,CAAC,KAAKJ,YAAV,EAAwB;AACtB;AACD;;AAED,YAAMK,SAAS,GAAG,EAChB,GAAG,KAAKL,YADQ;A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AAI,KAAKH,YAAT,EAAuB;AACrBG,QAAAA,OAAO,CAAC,KAAKH,YAAN,CAAP;AACD,OAFD,MAEO;AACL,aAAKe,MAAL,GAAcC,IAAd,CAAmBb,OAAnB;AACD;AACF,KAlGsD;;AAAA,oCAoGtCA,OAAD,IAA+C;AAC7D,WAAKF,cAAL,CAAoBgB,MAApB,CAA2Bd,OAA3B;AACD,KAtGsD;;AAAA,sCAwGrC,MAAY;AAC5B,UAAI,KAAKP,qBAAT,EAAgC;AAC9B,aAAKA,qBAAL,CAA2BsB,QAA3B;AACD;;AAED,UAAI,KAAKC,wBAAT,EAAmC;AACjC,aAAKA,wBAAL,CAA8BC,MAA9B;AACD;;AAED,WAAKnB,cAAL,CAAoBoB,KAApB;AACD,KAlHsD;;AACrD;AACA,SAAKzB,qBAAL,GAA6B,IAAI0B,6BAAJ,CAC3B7B,aAD2B,EAE3B,KAAK8B,iCAFsB,CAA7B,CAFqD,CAOrD;;AACA,SAAKJ,wBAAL,GAAgCZ,yBAAgBiB,YAAhB,CAA6BC,WAA7B,CAC9BC,YAAY,CAACC,yBADiB,EAE9B,KAAKC,wBAFyB,CAAhC,CARqD,CAarD;;AACA,SAAKjB,kBAAL;AACD;;AArBwB","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventSubscription} from 'react-native';\nimport NativeInterface from './nativeInterface';\nimport InternetReachability from './internetReachability';\nimport * as Types from './types';\nimport * as PrivateTypes from './privateTypes';\n\nexport default class State {\n private _nativeEventSubscription: NativeEventSubscription | null = null;\n private _subscriptions = new Set();\n private _latestState: Types.NetInfoState | null = null;\n private _internetReachability: InternetReachability;\n\n constructor(configuration: Types.NetInfoConfiguration) {\n // Add the listener to the internet connectivity events\n this._internetReachability = new InternetReachability(\n configuration,\n this._handleInternetReachabilityUpdate,\n );\n\n // Add the subscription to the native events\n this._nativeEventSubscription = NativeInterface.eventEmitter.addListener(\n PrivateTypes.DEVICE_CONNECTIVITY_EVENT,\n this._handleNativeStateUpdate,\n );\n\n // Fetch the current state from the native module\n this._fetchCurrentState();\n }\n\n private _handleNativeStateUpdate = (\n state: PrivateTypes.NetInfoNativeModuleState,\n ): void => {\n // Update the internet reachability module\n this._internetReachability.update(state);\n\n // Convert the state from native to JS shape\n const convertedState = this._convertState(state);\n\n // Update the listeners\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n };\n\n private _handleInternetReachabilityUpdate = (\n isInternetReachable: boolean | null | undefined,\n ): void => {\n if (!this._latestState) {\n return;\n }\n\n const nextState = {\n ...this._latestState,\n isInternetReachable,\n } as Types.NetInfoState;\n this._latestState = nextState;\n this._subscriptions.forEach((handler): void => handler(nextState));\n };\n\n public _fetchCurrentState = async (\n requestedInterface?: string,\n ): Promise => {\n const state = await NativeInterface.getCurrentState(requestedInterface);\n\n // Update the internet reachability module\n this._internetReachability.update(state);\n // Convert and store the new state\n const convertedState = this._convertState(state);\n if (!requestedInterface) {\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n }\n\n return convertedState;\n };\n\n private _convertState = (\n input: PrivateTypes.NetInfoNativeModuleState,\n ): Types.NetInfoState => {\n if (typeof input.isInternetReachable === 'boolean') {\n return input as Types.NetInfoState;\n } else {\n return {\n ...input,\n isInternetReachable: this._internetReachability.currentState(),\n } as Types.NetInfoState;\n }\n };\n\n public latest = (\n requestedInterface?: string,\n ): Promise => {\n if (requestedInterface) {\n return this._fetchCurrentState(requestedInterface);\n } else if (this._latestState) {\n return Promise.resolve(this._latestState);\n } else {\n return this._fetchCurrentState();\n }\n };\n\n public add = (handler: Types.NetInfoChangeHandler): void => {\n // Add the subscription handler to our set\n this._subscriptions.add(handler);\n\n // Send it the latest data we have\n if (this._latestState) {\n handler(this._latestState);\n } else {\n this.latest().then(handler);\n }\n };\n\n public remove = (handler: Types.NetInfoChangeHandler): void => {\n this._subscriptions.delete(handler);\n };\n\n public tearDown = (): void => {\n if (this._internetReachability) {\n this._internetReachability.tearDown();\n }\n\n if (this._nativeEventSubscription) {\n this._nativeEventSubscription.remove();\n }\n\n this._subscriptions.clear();\n };\n}\n"]} +\ No newline at end of file ++{"version":3,"names":["_nativeInterface","_interopRequireDefault","require","_internetReachability","PrivateTypes","_interopRequireWildcard","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","_defineProperty","key","value","_toPropertyKey","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","State","constructor","configuration","Set","state","update","convertedState","_convertState","_latestState","_subscriptions","forEach","handler","isInternetReachable","nextState","requestedInterface","NativeInterface","getCurrentState","currentState","_fetchCurrentState","Promise","resolve","add","latest","then","delete","tearDown","_nativeEventSubscription","remove","clear","InternetReachability","_handleInternetReachabilityUpdate","eventEmitter","addListener","DEVICE_CONNECTIVITY_EVENT","_handleNativeStateUpdate","exports"],"sources":["state.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventSubscription} from 'react-native';\nimport NativeInterface from './nativeInterface';\nimport InternetReachability from './internetReachability';\nimport * as Types from './types';\nimport * as PrivateTypes from './privateTypes';\n\nexport default class State {\n private _nativeEventSubscription: NativeEventSubscription | null = null;\n private _subscriptions = new Set();\n private _latestState: Types.NetInfoState | null = null;\n private _internetReachability: InternetReachability;\n\n constructor(configuration: Types.NetInfoConfiguration) {\n // Add the listener to the internet connectivity events\n this._internetReachability = new InternetReachability(\n configuration,\n this._handleInternetReachabilityUpdate,\n );\n\n // Add the subscription to the native events\n this._nativeEventSubscription = NativeInterface.eventEmitter.addListener(\n PrivateTypes.DEVICE_CONNECTIVITY_EVENT,\n this._handleNativeStateUpdate,\n );\n\n // Fetch the current state from the native module\n this._fetchCurrentState();\n }\n\n private _handleNativeStateUpdate = (\n state: PrivateTypes.NetInfoNativeModuleState,\n ): void => {\n // Update the internet reachability module\n this._internetReachability.update(state);\n\n // Convert the state from native to JS shape\n const convertedState = this._convertState(state);\n\n // Update the listeners\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n };\n\n private _handleInternetReachabilityUpdate = (\n isInternetReachable: boolean | null | undefined,\n ): void => {\n if (!this._latestState) {\n return;\n }\n\n const nextState = {\n ...this._latestState,\n isInternetReachable,\n } as Types.NetInfoState;\n this._latestState = nextState;\n this._subscriptions.forEach((handler): void => handler(nextState));\n };\n\n public _fetchCurrentState = async (\n requestedInterface?: string,\n ): Promise => {\n const state = await NativeInterface.getCurrentState(requestedInterface);\n\n // Update the internet reachability module\n this._internetReachability.update(state);\n // Convert and store the new state\n const convertedState = this._convertState(state);\n if (!requestedInterface) {\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n }\n\n return convertedState;\n };\n\n private _convertState = (\n input: PrivateTypes.NetInfoNativeModuleState,\n ): Types.NetInfoState => {\n if (typeof input.isInternetReachable === 'boolean') {\n return input as Types.NetInfoState;\n } else {\n return {\n ...input,\n isInternetReachable: this._internetReachability.currentState(),\n } as Types.NetInfoState;\n }\n };\n\n public latest = (\n requestedInterface?: string,\n ): Promise => {\n if (requestedInterface) {\n return this._fetchCurrentState(requestedInterface);\n } else if (this._latestState) {\n return Promise.resolve(this._latestState);\n } else {\n return this._fetchCurrentState();\n }\n };\n\n public add = (handler: Types.NetInfoChangeHandler): void => {\n // Add the subscription handler to our set\n this._subscriptions.add(handler);\n\n // Send it the latest data we have\n if (this._latestState) {\n handler(this._latestState);\n } else {\n this.latest().then(handler);\n }\n };\n\n public remove = (handler: Types.NetInfoChangeHandler): void => {\n this._subscriptions.delete(handler);\n };\n\n public tearDown = (): void => {\n if (this._internetReachability) {\n this._internetReachability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ACtC,IAAI,CAACC,wBACP,CAAC;;IAED;IACA,IAAI,CAAChB,kBAAkB,CAAC,CAAC;EAC3B;AAoGF;AAACiB,OAAA,CAAAtE,OAAA,GAAAmC,KAAA"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js +index 39e4871..92824aa 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js +@@ -3,8 +3,7 @@ + Object.defineProperty(exports, "__esModule", { + value: true + }); +-exports.NetInfoCellularGeneration = exports.NetInfoStateType = void 0; +- ++exports.NetInfoStateType = exports.NetInfoCellularGeneration = void 0; + /** + * Copyright (c) Facebook, Inc. and its affiliates. + * +@@ -13,10 +12,7 @@ exports.NetInfoCellularGeneration = exports.NetInfoStateType = void 0; + * + * @format + */ +-let NetInfoStateType; +-exports.NetInfoStateType = NetInfoStateType; +- +-(function (NetInfoStateType) { ++let NetInfoStateType = exports.NetInfoStateType = /*#__PURE__*/function (NetInfoStateType) { + NetInfoStateType["unknown"] = "unknown"; + NetInfoStateType["none"] = "none"; + NetInfoStateType["cellular"] = "cellular"; +@@ -26,15 +22,13 @@ exports.NetInfoStateType = NetInfoStateType; + NetInfoStateType["wimax"] = "wimax"; + NetInfoStateType["vpn"] = "vpn"; + NetInfoStateType["other"] = "other"; +-})(NetInfoStateType || (exports.NetInfoStateType = NetInfoStateType = {})); +- +-let NetInfoCellularGeneration; +-exports.NetInfoCellularGeneration = NetInfoCellularGeneration; +- +-(function (NetInfoCellularGeneration) { ++ return NetInfoStateType; ++}({}); ++let NetInfoCellularGeneration = exports.NetInfoCellularGeneration = /*#__PURE__*/function (NetInfoCellularGeneration) { + NetInfoCellularGeneration["2g"] = "2g"; + NetInfoCellularGeneration["3g"] = "3g"; + NetInfoCellularGeneration["4g"] = "4g"; + NetInfoCellularGeneration["5g"] = "5g"; +-})(NetInfoCellularGeneration || (exports.NetInfoCellularGeneration = NetInfoCellularGeneration = {})); ++ return NetInfoCellularGeneration; ++}({}); + //# sourceMappingURL=types.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js.map +index 095dd3b..596ace1 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["types.ts"],"names":["NetInfoStateType","NetInfoCellularGeneration"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IAEYA,gB;;;WAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;GAAAA,gB,gCAAAA,gB;;IAcAC,yB;;;WAAAA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;GAAAA,yB,yCAAAA,yB","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nexport enum NetInfoStateType {\n unknown = 'unknown',\n none = 'none',\n cellular = 'cellular',\n wifi = 'wifi',\n bluetooth = 'bluetooth',\n ethernet = 'ethernet',\n wimax = 'wimax',\n vpn = 'vpn',\n other = 'other',\n}\n\nexport type NetInfoMethodType = 'HEAD' | 'GET';\n\nexport enum NetInfoCellularGeneration {\n '2g' = '2g',\n '3g' = '3g',\n '4g' = '4g',\n '5g' = '5g',\n}\n\nexport interface NetInfoConnectedDetails {\n isConnectionExpensive: boolean;\n}\n\ninterface NetInfoConnectedState<\n T extends NetInfoStateType,\n D extends Record = Record\n> {\n type: T;\n isConnected: true;\n isInternetReachable: boolean | null;\n details: D & NetInfoConnectedDetails;\n isWifiEnabled?: boolean;\n}\n\ninterface NetInfoDisconnectedState {\n type: T;\n isConnected: false;\n isInternetReachable: false;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport interface NetInfoUnknownState {\n type: NetInfoStateType.unknown;\n isConnected: boolean | null;\n isInternetReachable: null;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport type NetInfoNoConnectionState = NetInfoDisconnectedState<\n NetInfoStateType.none\n>;\nexport type NetInfoDisconnectedStates =\n | NetInfoUnknownState\n | NetInfoNoConnectionState;\n\nexport type NetInfoCellularState = NetInfoConnectedState<\n NetInfoStateType.cellular,\n {\n cellularGeneration: NetInfoCellularGeneration | null;\n carrier: string | null;\n }\n>;\nexport type NetInfoWifiState = NetInfoConnectedState<\n NetInfoStateType.wifi,\n {\n ssid: string | null;\n bssid: string | null;\n strength: number | null;\n ipAddress: string | null;\n subnet: string | null;\n frequency: number | null;\n linkSpeed: number | null;\n rxLinkSpeed: number | null;\n txLinkSpeed: number | null;\n }\n>;\nexport type NetInfoBluetoothState = NetInfoConnectedState<\n NetInfoStateType.bluetooth\n>;\nexport type NetInfoEthernetState = NetInfoConnectedState<\n NetInfoStateType.ethernet,\n {\n ipAddress: string | null;\n subnet: string | null;\n }\n>;\nexport type NetInfoWimaxState = NetInfoConnectedState;\nexport type NetInfoVpnState = NetInfoConnectedState;\nexport type NetInfoOtherState = NetInfoConnectedState;\nexport type NetInfoConnectedStates =\n | NetInfoCellularState\n | NetInfoWifiState\n | NetInfoBluetoothState\n | NetInfoEthernetState\n | NetInfoWimaxState\n | NetInfoVpnState\n | NetInfoOtherState;\n\nexport type NetInfoState = NetInfoDisconnectedStates | NetInfoConnectedStates;\n\nexport type NetInfoChangeHandler = (state: NetInfoState) => void;\nexport type NetInfoSubscription = () => void;\n\nexport interface NetInfoConfiguration {\n reachabilityUrl: string;\n reachabilityMethod?: NetInfoMethodType;\n reachabilityHeaders?: Record;\n reachabilityTest: (response: Response) => Promise;\n reachabilityLongTimeout: number;\n reachabilityShortTimeout: number;\n reachabilityRequestTimeout: number;\n reachabilityShouldRun: () => boolean;\n shouldFetchWiFiSSID: boolean;\n useNativeReachability: boolean;\n}\n"]} +\ No newline at end of file ++{"version":3,"names":["NetInfoStateType","exports","NetInfoCellularGeneration"],"sources":["types.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nexport enum NetInfoStateType {\n unknown = 'unknown',\n none = 'none',\n cellular = 'cellular',\n wifi = 'wifi',\n bluetooth = 'bluetooth',\n ethernet = 'ethernet',\n wimax = 'wimax',\n vpn = 'vpn',\n other = 'other',\n}\n\nexport type NetInfoMethodType = 'HEAD' | 'GET';\n\nexport enum NetInfoCellularGeneration {\n '2g' = '2g',\n '3g' = '3g',\n '4g' = '4g',\n '5g' = '5g',\n}\n\nexport interface NetInfoConnectedDetails {\n isConnectionExpensive: boolean;\n}\n\ninterface NetInfoConnectedState<\n T extends NetInfoStateType,\n D extends Record = Record,\n> {\n type: T;\n isConnected: true;\n isInternetReachable: boolean | null;\n details: D & NetInfoConnectedDetails;\n isWifiEnabled?: boolean;\n}\n\ninterface NetInfoDisconnectedState {\n type: T;\n isConnected: false;\n isInternetReachable: false;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport interface NetInfoUnknownState {\n type: NetInfoStateType.unknown;\n isConnected: boolean | null;\n isInternetReachable: null;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport type NetInfoNoConnectionState =\n NetInfoDisconnectedState;\nexport type NetInfoDisconnectedStates =\n | NetInfoUnknownState\n | NetInfoNoConnectionState;\n\nexport type NetInfoCellularState = NetInfoConnectedState<\n NetInfoStateType.cellular,\n {\n cellularGeneration: NetInfoCellularGeneration | null;\n carrier: string | null;\n }\n>;\nexport type NetInfoWifiState = NetInfoConnectedState<\n NetInfoStateType.wifi,\n {\n ssid: string | null;\n bssid: string | null;\n strength: number | null;\n ipAddress: string | null;\n subnet: string | null;\n frequency: number | null;\n linkSpeed: number | null;\n rxLinkSpeed: number | null;\n txLinkSpeed: number | null;\n }\n>;\nexport type NetInfoBluetoothState =\n NetInfoConnectedState;\nexport type NetInfoEthernetState = NetInfoConnectedState<\n NetInfoStateType.ethernet,\n {\n ipAddress: string | null;\n subnet: string | null;\n }\n>;\nexport type NetInfoWimaxState = NetInfoConnectedState;\nexport type NetInfoVpnState = NetInfoConnectedState;\nexport type NetInfoOtherState = NetInfoConnectedState;\nexport type NetInfoConnectedStates =\n | NetInfoCellularState\n | NetInfoWifiState\n | NetInfoBluetoothState\n | NetInfoEthernetState\n | NetInfoWimaxState\n | NetInfoVpnState\n | NetInfoOtherState;\n\nexport type NetInfoState = NetInfoDisconnectedStates | NetInfoConnectedStates;\n\nexport type NetInfoChangeHandler = (state: NetInfoState) => void;\nexport type NetInfoSubscription = () => void;\n\nexport interface NetInfoConfiguration {\n reachabilityUrl: string;\n reachabilityMethod?: NetInfoMethodType;\n reachabilityHeaders?: Record;\n reachabilityTest: (response: Response) => Promise;\n reachabilityLongTimeout: number;\n reachabilityShortTimeout: number;\n reachabilityRequestTimeout: number;\n reachabilityShouldRun: () => boolean;\n shouldFetchWiFiSSID: boolean;\n useNativeReachability: boolean;\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,IASYA,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;AAAA,IAchBE,yBAAyB,GAAAD,OAAA,CAAAC,yBAAA,0BAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAA,OAAzBA,yBAAyB;AAAA"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/module/index.js b/node_modules/@react-native-community/netinfo/lib/module/index.js +index 147c72e..3574e44 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/index.js ++++ b/node_modules/@react-native-community/netinfo/lib/module/index.js +@@ -6,20 +6,27 @@ + * + * @format + */ ++ + import { useState, useEffect, useCallback } from 'react'; + import { Platform } from 'react-native'; + import DEFAULT_CONFIGURATION from './internal/defaultConfiguration'; + import NativeInterface from './internal/nativeInterface'; + import State from './internal/state'; +-import * as Types from './internal/types'; // Stores the currently used configuration ++import * as Types from './internal/types'; + +-let _configuration = DEFAULT_CONFIGURATION; // Stores the singleton reference to the state manager ++// Stores the currently used configuration ++let _configuration = DEFAULT_CONFIGURATION; + ++// Stores the singleton reference to the state manager + let _state = null; +- + const createState = () => { + return new State(_configuration); + }; ++ ++// Track ongoing requests ++let isRequestInProgress = false; ++let requestQueue = []; ++ + /** + * Configures the library with the given configuration. Note that calling this will stop all + * previously added listeners from being called again. It is best to call this right when your +@@ -27,23 +34,20 @@ const createState = () => { + * + * @param configuration The new configuration to set. + */ +- +- + export function configure(configuration) { +- _configuration = { ...DEFAULT_CONFIGURATION, ++ _configuration = { ++ ...DEFAULT_CONFIGURATION, + ...configuration + }; +- + if (_state) { + _state.tearDown(); +- + _state = createState(); + } +- + if (Platform.OS === 'ios') { + NativeInterface.configure(configuration); + } + } ++ + /** + * Returns a `Promise` that resolves to a `NetInfoState` object. + * This function operates on the global singleton instance configured using `configure()` +@@ -52,27 +56,41 @@ export function configure(configuration) { + * + * @returns A Promise which contains the current connection state. + */ +- + export function fetch(requestedInterface) { + if (!_state) { + _state = createState(); + } +- + return _state.latest(requestedInterface); + } ++ + /** + * Force-refreshes the internal state of the global singleton managed by this library. + * + * @returns A Promise which contains the updated connection state. + */ +- + export function refresh() { + if (!_state) { + _state = createState(); + } + +- return _state._fetchCurrentState(); ++ // If a request is already in progress, return a promise that will resolve when the current request finishes ++ if (isRequestInProgress) { ++ return new Promise((resolve) => { ++ requestQueue.push(resolve); ++ }); ++ } ++ ++ isRequestInProgress = true; ++ ++ return _state._fetchCurrentState().then((result) => { ++ requestQueue.forEach((resolve) => resolve(result)); ++ requestQueue = []; ++ return result; ++ }).finally(() => { ++ isRequestInProgress = false; ++ }); + } ++ + /** + * Subscribe to the global singleton's connection information. The callback is called with a parameter of type + * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener +@@ -84,18 +102,16 @@ export function refresh() { + * + * @returns A function which can be called to unsubscribe. + */ +- + export function addEventListener(listener) { + if (!_state) { + _state = createState(); + } +- + _state.add(listener); +- + return () => { + _state && _state.remove(listener); + }; + } ++ + /** + * A React Hook into this library's singleton which updates when the connection state changes. + * +@@ -103,12 +119,10 @@ export function addEventListener(listener) { + * + * @returns The connection state. + */ +- + export function useNetInfo(configuration) { + if (configuration) { + configure(configuration); + } +- + const [netInfo, setNetInfo] = useState({ + type: Types.NetInfoStateType.unknown, + isConnected: null, +@@ -120,6 +134,7 @@ export function useNetInfo(configuration) { + }, []); + return netInfo; + } ++ + /** + * A React Hook which manages an isolated instance of the network info manager. + * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener, +@@ -129,7 +144,6 @@ export function useNetInfo(configuration) { + * + * @returns the netInfo state and a refresh function + */ +- + export function useNetInfoInstance(isPaused = false, configuration) { + const [networkInfoManager, setNetworkInfoManager] = useState(); + const [netInfo, setNetInfo] = useState({ +@@ -142,8 +156,8 @@ export function useNetInfoInstance(isPaused = false, configuration) { + if (isPaused) { + return; + } +- +- const config = { ...DEFAULT_CONFIGURATION, ++ const config = { ++ ...DEFAULT_CONFIGURATION, + ...configuration + }; + const state = new State(config); +diff --git a/node_modules/@react-native-community/netinfo/lib/module/index.js.map b/node_modules/@react-native-community/netinfo/lib/module/index.js.map +index 937c538..268c26e 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/index.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/module/index.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["index.ts"],"names":["useState","useEffect","useCallback","Platform","DEFAULT_CONFIGURATION","NativeInterface","State","Types","_configuration","_state","createState","configure","configuration","tearDown","OS","fetch","requestedInterface","latest","refresh","_fetchCurrentState","addEventListener","listener","add","remove","useNetInfo","netInfo","setNetInfo","type","NetInfoStateType","unknown","isConnected","isInternetReachable","details","useNetInfoInstance","isPaused","networkInfoManager","setNetworkInfoManager","config","state"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAAQA,QAAR,EAAkBC,SAAlB,EAA6BC,WAA7B,QAA+C,OAA/C;AACA,SAAQC,QAAR,QAAuB,cAAvB;AACA,OAAOC,qBAAP,MAAkC,iCAAlC;AACA,OAAOC,eAAP,MAA4B,4BAA5B;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAO,KAAKC,KAAZ,MAAuB,kBAAvB,C,CAEA;;AACA,IAAIC,cAAc,GAAGJ,qBAArB,C,CAEA;;AACA,IAAIK,MAAoB,GAAG,IAA3B;;AACA,MAAMC,WAAW,GAAG,MAAa;AAC/B,SAAO,IAAIJ,KAAJ,CAAUE,cAAV,CAAP;AACD,CAFD;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,SAASG,SAAT,CACLC,aADK,EAEC;AACNJ,EAAAA,cAAc,GAAG,EACf,GAAGJ,qBADY;AAEf,OAAGQ;AAFY,GAAjB;;AAKA,MAAIH,MAAJ,EAAY;AACVA,IAAAA,MAAM,CAACI,QAAP;;AACAJ,IAAAA,MAAM,GAAGC,WAAW,EAApB;AACD;;AAED,MAAIP,QAAQ,CAACW,EAAT,KAAgB,KAApB,EAA2B;AACzBT,IAAAA,eAAe,CAACM,SAAhB,CAA0BC,aAA1B;AACD;AACF;AAED;AAC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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASQ,kBAAT,CACLC,QAAQ,GAAG,KADN,EAELtB,aAFK,EAGL;AACA,QAAM,CAACuB,kBAAD,EAAqBC,qBAArB,IAA8CpC,QAAQ,EAA5D;AACA,QAAM,CAACyB,OAAD,EAAUC,UAAV,IAAwB1B,QAAQ,CAAqB;AACzD2B,IAAAA,IAAI,EAAEpB,KAAK,CAACqB,gBAAN,CAAuBC,OAD4B;AAEzDC,IAAAA,WAAW,EAAE,IAF4C;AAGzDC,IAAAA,mBAAmB,EAAE,IAHoC;AAIzDC,IAAAA,OAAO,EAAE;AAJgD,GAArB,CAAtC;AAOA/B,EAAAA,SAAS,CAAC,MAAM;AACd,QAAIiC,QAAJ,EAAc;AACZ;AACD;;AACD,UAAMG,MAAM,GAAG,EACb,GAAGjC,qBADU;AAEb,SAAGQ;AAFU,KAAf;AAIA,UAAM0B,KAAK,GAAG,IAAIhC,KAAJ,CAAU+B,MAAV,CAAd;AACAD,IAAAA,qBAAqB,CAACE,KAAD,CAArB;AACAA,IAAAA,KAAK,CAAChB,GAAN,CAAUI,UAAV;AACA,WAAOY,KAAK,CAACzB,QAAb;AACD,GAZQ,EAYN,CAACqB,QAAD,EAAWtB,aAAX,CAZM,CAAT;AAcA,QAAMM,OAAO,GAAGhB,WAAW,CAAC,MAAM;AAChCiC,IAAAA,kBAAkB,IAAIA,kBAAkB,CAAChB,kBAAnB,EAAtB;AACD,GAF0B,EAExB,CAACgB,kBAAD,CAFwB,CAA3B;AAIA,SAAO;AACLV,IAAAA,OADK;AAELP,IAAAA;AAFK,GAAP;AAID;AAED,cAAc,kBAAd;AAEA,eAAe;AACbP,EAAAA,SADa;AAEbI,EAAAA,KAFa;AAGbG,EAAAA,OAHa;AAIbE,EAAAA,gBAJa;AAKbI,EAAAA,UALa;AAMbS,EAAAA;AANa,CAAf","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {useState, useEffect, useCallback} from 'react';\nimport {Platform} from 'react-native';\nimport DEFAULT_CONFIGURATION from './internal/defaultConfiguration';\nimport NativeInterface from './internal/nativeInterface';\nimport State from './internal/state';\nimport * as Types from './internal/types';\n\n// Stores the currently used configuration\nlet _configuration = DEFAULT_CONFIGURATION;\n\n// Stores the singleton reference to the state manager\nlet _state: State | null = null;\nconst createState = (): State => {\n return new State(_configuration);\n};\n\n/**\n * Configures the library with the given configuration. Note that calling this will stop all\n * previously added listeners from being called again. It is best to call this right when your\n * application is started to avoid issues. The configuration sets up a global singleton instance.\n *\n * @param configuration The new configuration to set.\n */\nexport function configure(\n configuration: Partial,\n): void {\n _configuration = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n\n if (_state) {\n _state.tearDown();\n _state = createState();\n }\n\n if (Platform.OS === 'ios') {\n NativeInterface.configure(configuration);\n }\n}\n\n/**\n * Returns a `Promise` that resolves to a `NetInfoState` object.\n * This function operates on the global singleton instance configured using `configure()`\n *\n * @param [requestedInterface] interface from which to obtain the information\n *\n * @returns A Promise which contains the current connection state.\n */\nexport function fetch(\n requestedInterface?: string,\n): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state.latest(requestedInterface);\n}\n\n/**\n * Force-refreshes the internal state of the global singleton managed by this library.\n *\n * @returns A Promise which contains the updated connection state.\n */\nexport function refresh(): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state._fetchCurrentState();\n}\n\n/**\n * Subscribe to the global singleton's connection information. The callback is called with a parameter of type\n * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener\n * will be called with the latest information soon after you subscribe and then with any\n * subsequent changes afterwards. You should not assume that the listener is called in the same\n * way across devices or platforms.\n *\n * @param listener The listener which is called when the network state changes.\n *\n * @returns A function which can be called to unsubscribe.\n */\nexport function addEventListener(\n listener: Types.NetInfoChangeHandler,\n): Types.NetInfoSubscription {\n if (!_state) {\n _state = createState();\n }\n\n _state.add(listener);\n return (): void => {\n _state && _state.remove(listener);\n };\n}\n\n/**\n * A React Hook into this library's singleton which updates when the connection state changes.\n *\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns The connection state.\n */\nexport function useNetInfo(\n configuration?: Partial,\n): Types.NetInfoState {\n if (configuration) {\n configure(configuration);\n }\n\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect((): (() => void) => {\n return addEventListener(setNetInfo);\n }, []);\n\n return netInfo;\n}\n\n/**\n * A React Hook which manages an isolated instance of the network info manager.\n * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener,\n * NetInfo.fetch, NetInfo.refresh are performed on a global singleton and have no affect on this hook.\n * @param {boolean} isPaused - Pause the internal network checks.\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns the netInfo state and a refresh function\n */\nexport function useNetInfoInstance(\n isPaused = false,\n configuration?: Partial,\n) {\n const [networkInfoManager, setNetworkInfoManager] = useState();\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect(() => {\n if (isPaused) {\n return;\n }\n const config = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n const state = new State(config);\n setNetworkInfoManager(state);\n state.add(setNetInfo);\n return state.tearDown;\n }, [isPaused, configuration]);\n\n const refresh = useCallback(() => {\n networkInfoManager && networkInfoManager._fetchCurrentState();\n }, [networkInfoManager]);\n\n return {\n netInfo,\n refresh,\n };\n}\n\nexport * from './internal/types';\n\nexport default {\n configure,\n fetch,\n refresh,\n addEventListener,\n useNetInfo,\n useNetInfoInstance,\n};\n"]} +\ No newline at end of file ++{"version":3,"names":["useState","useEffect","useCallback","Platform","DEFAULT_CONFIGURATION","NativeInterface","State","Types","_configuration","_state","createState","configure","configuration","tearDown","OS","fetch","requestedInterface","latest","refresh","_fetchCurrentState","addEventListener","listener","add","remove","useNetInfo","netInfo","setNetInfo","type","NetInfoStateType","unknown","isConnected","isInternetReachable","details","useNetInfoInstance","isPaused","networkInfoManager","setNetworkInfoManager","config","state"],"sources":["index.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {useState, useEffect, useCallback} from 'react';\nimport {Platform} from 'react-native';\nimport DEFAULT_CONFIGURATION from './internal/defaultConfiguration';\nimport NativeInterface from './internal/nativeInterface';\nimport State from './internal/state';\nimport * as Types from './internal/types';\n\n// Stores the currently used configuration\nlet _configuration = DEFAULT_CONFIGURATION;\n\n// Stores the singleton reference to the state manager\nlet _state: State | null = null;\nconst createState = (): State => {\n return new State(_configuration);\n};\n\n/**\n * Configures the library with the given configuration. Note that calling this will stop all\n * previously added listeners from being called again. It is best to call this right when your\n * application is started to avoid issues. The configuration sets up a global singleton instance.\n *\n * @param configuration The new configuration to set.\n */\nexport function configure(\n configuration: Partial,\n): void {\n _configuration = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n\n if (_state) {\n _state.tearDown();\n _state = createState();\n }\n\n if (Platform.OS === 'ios') {\n NativeInterface.configure(configuration);\n }\n}\n\n/**\n * Returns a `Promise` that resolves to a `NetInfoState` object.\n * This function operates on the global singleton instance configured using `configure()`\n *\n * @param [requestedInterface] interface from which to obtain the information\n *\n * @returns A Promise which contains the current connection state.\n */\nexport function fetch(\n requestedInterface?: string,\n): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state.latest(requestedInterface);\n}\n\n/**\n * Force-refreshes the internal state of the global singleton managed by this library.\n *\n * @returns A Promise which contains the updated connection state.\n */\nexport function refresh(): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state._fetchCurrentState();\n}\n\n/**\n * Subscribe to the global singleton's connection information. The callback is called with a parameter of type\n * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener\n * will be called with the latest information soon after you subscribe and then with any\n * subsequent changes afterwards. You should not assume that the listener is called in the same\n * way across devices or platforms.\n *\n * @param listener The listener which is called when the network state changes.\n *\n * @returns A function which can be called to unsubscribe.\n */\nexport function addEventListener(\n listener: Types.NetInfoChangeHandler,\n): Types.NetInfoSubscription {\n if (!_state) {\n _state = createState();\n }\n\n _state.add(listener);\n return (): void => {\n _state && _state.remove(listener);\n };\n}\n\n/**\n * A React Hook into this library's singleton which updates when the connection state changes.\n *\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns The connection state.\n */\nexport function useNetInfo(\n configuration?: Partial,\n): Types.NetInfoState {\n if (configuration) {\n configure(configuration);\n }\n\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect((): (() => void) => {\n return addEventListener(setNetInfo);\n }, []);\n\n return netInfo;\n}\n\n/**\n * A React Hook which manages an isolated instance of the network info manager.\n * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener,\n * NetInfo.fetch, NetInfo.refresh are performed on a global singleton and have no affect on this hook.\n * @param {boolean} isPaused - Pause the internal network checks.\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns the netInfo state and a refresh function\n */\nexport function useNetInfoInstance(\n isPaused = false,\n configuration?: Partial,\n) {\n const [networkInfoManager, setNetworkInfoManager] = useState();\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect(() => {\n if (isPaused) {\n return;\n }\n const config = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n const state = new State(config);\n setNetworkInfoManager(state);\n state.add(setNetInfo);\n return state.tearDown;\n }, [isPaused, configuration]);\n\n const refresh = useCallback(() => {\n networkInfoManager && networkInfoManager._fetchCurrentState();\n }, [networkInfoManager]);\n\n return {\n netInfo,\n refresh,\n };\n}\n\nexport * from './internal/types';\n\nexport default {\n configure,\n fetch,\n refresh,\n addEventListener,\n useNetInfo,\n useNetInfoInstance,\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAQA,QAAQ,EAAEC,SAAS,EAAEC,WAAW,QAAO,OAAO;AACtD,SAAQC,QAAQ,QAAO,cAAc;AACrC,OAAOC,qBAAqB,MAAM,iCAAiC;AACnE,OAAOC,eAAe,MAAM,4BAA4B;AACxD,OAAOC,KAAK,MAAM,kBAAkB;AACpC,OAAO,KAAKC,KAAK,MAAM,kBAAkB;;AAEzC;AACA,IAAIC,cAAc,GAAGJ,qBAAqB;;AAE1C;AACA,IAAIK,MAAoB,GAAG,IAAI;AAC/B,MAAMC,WAAW,GAAGA,CAAA,KAAa;EAC/B,OAAO,IAAIJ,KAAK,CAACE,cAAc,CAAC;AAClC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,SAASA,CACvBC,aAAkD,EAC5C;EACNJ,cAAc,GAAG;IACf,GAAGJ,qBAAqB;IACxB,GAAGQ;EACL,CAAC;EAED,IAAIH,MAAM,EAAE;IACVA,MAAM,CAACI,QAAQ,CAAC,CAAC;IACjBJ,MAAM,GAAGC,WAAW,CAAC,CAAC;EACxB;EAEA,IAAIP,QAAQ,CAACW,EAAE,KAAK,KAAK,EAAE;IACzBT,eAAe,CAACM,SAAS,CAACC,aAAa,CAAC;EAC1C;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,KAAKA,CACnBC,kBAA2B,EACE;EAC7B,IAAI,CAACP,MAAM,EAAE;IACXA,MAAM,GAAGC,WAAW,CAAC,CAAC;EACxB;EACA,OAAOD,MAAM,CAACQ,MAAM,CAACD,kBAAkB,CAAC;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,OAAOA,CAAA,EAAgC;EACrD,IAAI,CAACT,M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C,WAAW,EAAE,IAAI;IACjBC,mBAAmB,EAAE,IAAI;IACzBC,OAAO,EAAE;EACX,CAAC,CAAC;EAEF/B,SAAS,CAAC,MAAM;IACd,IAAIiC,QAAQ,EAAE;MACZ;IACF;IACA,MAAMG,MAAM,GAAG;MACb,GAAGjC,qBAAqB;MACxB,GAAGQ;IACL,CAAC;IACD,MAAM0B,KAAK,GAAG,IAAIhC,KAAK,CAAC+B,MAAM,CAAC;IAC/BD,qBAAqB,CAACE,KAAK,CAAC;IAC5BA,KAAK,CAAChB,GAAG,CAACI,UAAU,CAAC;IACrB,OAAOY,KAAK,CAACzB,QAAQ;EACvB,CAAC,EAAE,CAACqB,QAAQ,EAAEtB,aAAa,CAAC,CAAC;EAE7B,MAAMM,OAAO,GAAGhB,WAAW,CAAC,MAAM;IAChCiC,kBAAkB,IAAIA,kBAAkB,CAAChB,kBAAkB,CAAC,CAAC;EAC/D,CAAC,EAAE,CAACgB,kBAAkB,CAAC,CAAC;EAExB,OAAO;IACLV,OAAO;IACPP;EACF,CAAC;AACH;AAEA,cAAc,kBAAkB;AAEhC,eAAe;EACbP,SAAS;EACTI,KAAK;EACLG,OAAO;EACPE,gBAAgB;EAChBI,UAAU;EACVS;AACF,CAAC"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js b/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js +new file mode 100644 +index 0000000..54a9e1b +--- /dev/null ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js +@@ -0,0 +1,5 @@ ++/* eslint-disable @typescript-eslint/ban-types */ ++ ++import { TurboModuleRegistry } from 'react-native'; ++export default TurboModuleRegistry.getEnforcing('RNCNetInfo'); ++//# sourceMappingURL=NativeRNCNetInfo.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js.map +new file mode 100644 +index 0000000..d366286 +--- /dev/null ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js.map +@@ -0,0 +1 @@ ++{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sources":["NativeRNCNetInfo.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-types */\nimport type { TurboModule } from 'react-native';\nimport { TurboModuleRegistry } from 'react-native';\n\nexport interface Spec extends TurboModule {\n configure: (config: Object) => void;\n getCurrentState(requestedInterface?: string): Promise;\n // Events\n addListener: (eventName: string) => void;\n removeListeners: (count: number) => void;\n}\n\nexport default TurboModuleRegistry.getEnforcing('RNCNetInfo');\n\n"],"mappings":"AAAA;;AAEA,SAASA,mBAAmB,QAAQ,cAAc;AAUlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,YAAY,CAAC"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.js.map +index 6a190c8..0ec7a12 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["defaultConfiguration.ts"],"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability"],"mappings":"AAEA,MAAMA,qBAAiD,GAAG;AACxDC,EAAAA,eAAe,EAAE,0CADuC;AAExDC,EAAAA,kBAAkB,EAAE,MAFoC;AAGxDC,EAAAA,mBAAmB,EAAE,EAHmC;AAIxDC,EAAAA,gBAAgB,EAAGC,QAAD,IAChBC,OAAO,CAACC,OAAR,CAAgBF,QAAQ,CAACG,MAAT,KAAoB,GAApC,CALsD;AAMxDC,EAAAA,wBAAwB,EAAE,IAAI,IAN0B;AAMpB;AACpCC,EAAAA,uBAAuB,EAAE,KAAK,IAP0B;AAOpB;AACpCC,EAAAA,0BAA0B,EAAE,KAAK,IARuB;AAQjB;AACvCC,EAAAA,qBAAqB,EAAE,MAAe,IATkB;AAUxDC,EAAAA,mBAAmB,EAAE,KAVmC;AAWxDC,EAAAA,qBAAqB,EAAE;AAXiC,CAA1D;AAcA,eAAed,qBAAf","sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: 'https://clients3.google.com/generate_204',\n reachabilityMethod: 'HEAD',\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 204),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: false,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION;"]} +\ No newline at end of file ++{"version":3,"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability"],"sources":["defaultConfiguration.ts"],"sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: 'https://clients3.google.com/generate_204',\n reachabilityMethod: 'HEAD',\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 204),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: false,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION;"],"mappings":"AAEA,MAAMA,qBAAiD,GAAG;EACxDC,eAAe,EAAE,0CAA0C;EAC3DC,kBAAkB,EAAE,MAAM;EAC1BC,mBAAmB,EAAE,CAAC,CAAC;EACvBC,gBAAgB,EAAGC,QAAkB,IACnCC,OAAO,CAACC,OAAO,CAACF,QAAQ,CAACG,MAAM,KAAK,GAAG,CAAC;EAC1CC,wBAAwB,EAAE,CAAC,GAAG,IAAI;EAAE;EACpCC,uBAAuB,EAAE,EAAE,GAAG,IAAI;EAAE;EACpCC,0BAA0B,EAAE,EAAE,GAAG,IAAI;EAAE;EACvCC,qBAAqB,EAAEA,CAAA,KAAe,IAAI;EAC1CC,mBAAmB,EAAE,KAAK;EAC1BC,qBAAqB,EAAE;AACzB,CAAC;AAED,eAAed,qBAAqB"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.web.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.web.js.map +index ba01d7a..011de62 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.web.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.web.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["defaultConfiguration.web.ts"],"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability"],"mappings":"AAEA,MAAMA,qBAAiD,GAAG;AACxDC,EAAAA,eAAe,EAAE,GADuC;AAExDC,EAAAA,kBAAkB,EAAE,MAFoC;AAGxDC,EAAAA,mBAAmB,EAAE,EAHmC;AAIxDC,EAAAA,gBAAgB,EAAGC,QAAD,IAChBC,OAAO,CAACC,OAAR,CAAgBF,QAAQ,CAACG,MAAT,KAAoB,GAApC,CALsD;AAMxDC,EAAAA,wBAAwB,EAAE,IAAI,IAN0B;AAMpB;AACpCC,EAAAA,uBAAuB,EAAE,KAAK,IAP0B;AAOpB;AACpCC,EAAAA,0BAA0B,EAAE,KAAK,IARuB;AAQjB;AACvCC,EAAAA,qBAAqB,EAAE,MAAe,IATkB;AAUxDC,EAAAA,mBAAmB,EAAE,IAVmC;AAWxDC,EAAAA,qBAAqB,EAAE;AAXiC,CAA1D;AAcA,eAAed,qBAAf","sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: '/',\n reachabilityMethod: \"HEAD\",\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 200),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: true,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION"]} +\ No newline at end of file ++{"version":3,"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability"],"sources":["defaultConfiguration.web.ts"],"sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: '/',\n reachabilityMethod: \"HEAD\",\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 200),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: true,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION"],"mappings":"AAEA,MAAMA,qBAAiD,GAAG;EACxDC,eAAe,EAAE,GAAG;EACpBC,kBAAkB,EAAE,MAAM;EAC1BC,mBAAmB,EAAE,CAAC,CAAC;EACvBC,gBAAgB,EAAGC,QAAkB,IACnCC,OAAO,CAACC,OAAO,CAACF,QAAQ,CAACG,MAAM,KAAK,GAAG,CAAC;EAC1CC,wBAAwB,EAAE,CAAC,GAAG,IAAI;EAAE;EACpCC,uBAAuB,EAAE,EAAE,GAAG,IAAI;EAAE;EACpCC,0BAA0B,EAAE,EAAE,GAAG,IAAI;EAAE;EACvCC,qBAAqB,EAAEA,CAAA,KAAe,IAAI;EAC1CC,mBAAmB,EAAE,IAAI;EACzBC,qBAAqB,EAAE;AACzB,CAAC;AAED,eAAed,qBAAqB"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js b/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js +index 408453a..e373eef 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js +@@ -1,5 +1,6 @@ +-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +- ++function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } ++function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } ++function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } + /** + * Copyright (c) Facebook, Inc. and its affiliates. + * +@@ -8,57 +9,45 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope + * + * @format + */ ++ + export default class InternetReachability { + constructor(configuration, listener) { + _defineProperty(this, "_configuration", void 0); +- + _defineProperty(this, "_listener", void 0); +- + _defineProperty(this, "_isInternetReachable", undefined); +- + _defineProperty(this, "_currentInternetReachabilityCheckHandler", null); +- + _defineProperty(this, "_currentTimeoutHandle", null); +- + _defineProperty(this, "_setIsInternetReachable", isInternetReachable => { + if (this._isInternetReachable === isInternetReachable) { + return; + } +- + this._isInternetReachable = isInternetReachable; +- + this._listener(this._isInternetReachable); + }); +- + _defineProperty(this, "_setExpectsConnection", expectsConnection => { + // Cancel any pending check + if (this._currentInternetReachabilityCheckHandler !== null) { + this._currentInternetReachabilityCheckHandler.cancel(); +- + this._currentInternetReachabilityCheckHandler = null; +- } // Cancel any pending timeout +- +- ++ } ++ // Cancel any pending timeout + if (this._currentTimeoutHandle !== null) { + clearTimeout(this._currentTimeoutHandle); + this._currentTimeoutHandle = null; + } +- + if (expectsConnection && this._configuration.reachabilityShouldRun()) { + // If we expect a connection, start the process for finding if we have one + // Set the state to "null" if it was previously false + if (!this._isInternetReachable) { + this._setIsInternetReachable(null); +- } // Start a network request to check for internet +- +- ++ } ++ // Start a network request to check for internet + this._currentInternetReachabilityCheckHandler = this._checkInternetReachability(); + } else { + // If we don't expect a connection or don't run reachability check, just change the state to "false" + this._setIsInternetReachable(false); + } + }); +- + _defineProperty(this, "_checkInternetReachability", () => { + const controller = new AbortController(); + const responsePromise = fetch(this._configuration.reachabilityUrl, { +@@ -66,16 +55,17 @@ export default class InternetReachability { + method: this._configuration.reachabilityMethod, + cache: 'no-cache', + signal: controller.signal +- }); // Create promise that will reject after the request timeout has been reached ++ }); + ++ // Create promise that will reject after the request timeout has been reached + let timeoutHandle; +- const timeoutPromise = new Promise(() => { +- timeoutHandle = setTimeout(() => controller.abort('timedout'), this._configuration.reachabilityRequestTimeout); +- }); // Create promise that makes it possible to cancel a pending request through a reject +- // eslint-disable-next-line @typescript-eslint/no-empty-function ++ const timeoutPromise = new Promise((_, reject) => { ++ timeoutHandle = setTimeout(() => reject('timedout'), this._configuration.reachabilityRequestTimeout); ++ }); + ++ // Create promise that makes it possible to cancel a pending request through a reject ++ // eslint-disable-next-line @typescript-eslint/no-empty-function + let cancel = () => {}; +- + const cancelPromise = new Promise((_, reject) => { + cancel = () => reject('canceled'); + }); +@@ -83,18 +73,25 @@ export default class InternetReachability { + return this._configuration.reachabilityTest(response); + }).then(result => { + this._setIsInternetReachable(result); +- + const nextTimeoutInterval = this._isInternetReachable ? this._configuration.reachabilityLongTimeout : this._configuration.reachabilityShortTimeout; + this._currentTimeoutHandle = setTimeout(this._checkInternetReachability, nextTimeoutInterval); ++ }).catch(error => { ++ if (error !== 'canceled') { ++ this._setIsInternetReachable(false); ++ this._currentTimeoutHandle = setTimeout(this._checkInternetReachability, this._configuration.reachabilityShortTimeout); ++ } + }).catch(error => { + if ('canceled' === error) { + controller.abort(); + } else { ++ if ('timedout' === error) { ++ controller.abort(); ++ } + this._setIsInternetReachable(false); +- + this._currentTimeoutHandle = setTimeout(this._checkInternetReachability, this._configuration.reachabilityShortTimeout); + } +- }) // Clear request timeout and propagate any errors ++ }) ++ // Clear request timeout and propagate any errors + .then(() => { + clearTimeout(timeoutHandle); + }, error => { +@@ -106,7 +103,6 @@ export default class InternetReachability { + cancel + }; + }); +- + _defineProperty(this, "update", state => { + if (typeof state.isInternetReachable === 'boolean' && this._configuration.useNativeReachability) { + this._setIsInternetReachable(state.isInternetReachable); +@@ -114,29 +110,24 @@ export default class InternetReachability { + this._setExpectsConnection(state.isConnected); + } + }); +- + _defineProperty(this, "currentState", () => { + return this._isInternetReachable; + }); +- + _defineProperty(this, "tearDown", () => { + // Cancel any pending check + if (this._currentInternetReachabilityCheckHandler !== null) { + this._currentInternetReachabilityCheckHandler.cancel(); +- + this._currentInternetReachabilityCheckHandler = null; +- } // Cancel any pending timeout +- ++ } + ++ // Cancel any pending timeout + if (this._currentTimeoutHandle !== null) { + clearTimeout(this._currentTimeoutHandle); + this._currentTimeoutHandle = null; + } + }); +- + this._configuration = configuration; + this._listener = listener; + } +- + } + //# sourceMappingURL=internetReachability.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js.map +index a998c5f..544e5cb 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["internetReachability.ts"],"names":["InternetReachability","constructor","configuration","listener","undefined","isInternetReachable","_isInternetReachable","_listener","expectsConnection","_currentInternetReachabilityCheckHandler","cancel","_currentTimeoutHandle","clearTimeout","_configuration","reachabilityShouldRun","_setIsInternetReachable","_checkInternetReachability","controller","AbortController","responsePromise","fetch","reachabilityUrl","headers","reachabilityHeaders","method","reachabilityMethod","cache","signal","timeoutHandle","timeoutPromise","Promise","setTimeout","abort","reachabilityRequestTimeout","cancelPromise","_","reject","promise","race","then","response","reachabilityTest","result","nextTimeoutInterval","reachabilityLongTimeout","reachabilityShortTimeout","catch","error","state","useNativeReachability","_setExpectsConnection","isConnected"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUA,eAAe,MAAMA,oBAAN,CAA2B;AAOxCC,EAAAA,WAAW,CACTC,aADS,EAETC,QAFS,EAGT;AAAA;;AAAA;;AAAA,kDAPyDC,SAOzD;;AAAA,sEAN0F,IAM1F;;AAAA,mDALoE,IAKpE;;AAAA,qDAMAC,mBADgC,IAEvB;AACT,UAAI,KAAKC,oBAAL,KAA8BD,mBAAlC,EAAuD;AACrD;AACD;;AAED,WAAKC,oBAAL,GAA4BD,mBAA5B;;AACA,WAAKE,SAAL,CAAe,KAAKD,oBAApB;AACD,KAdC;;AAAA,mDAgB+BE,iBAAD,IAA6C;AAC3E;AACA,UAAI,KAAKC,wCAAL,KAAkD,IAAtD,EAA4D;AAC1D,aAAKA,wCAAL,C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AL,CAAoBoC,qBAFtB,EAGE;AACA,aAAKlC,uBAAL,CAA6BiC,KAAK,CAAC3C,mBAAnC;AACD,OALD,MAKO;AACL,aAAK6C,qBAAL,CAA2BF,KAAK,CAACG,WAAjC;AACD;AACF,KAjIC;;AAAA,0CAmIoB,MAAkC;AACtD,aAAO,KAAK7C,oBAAZ;AACD,KArIC;;AAAA,sCAuIgB,MAAY;AAC5B;AACA,UAAI,KAAKG,wCAAL,KAAkD,IAAtD,EAA4D;AAC1D,aAAKA,wCAAL,CAA8CC,MAA9C;;AACA,aAAKD,wCAAL,GAAgD,IAAhD;AACD,OAL2B,CAO5B;;;AACA,UAAI,KAAKE,qBAAL,KAA+B,IAAnC,EAAyC;AACvCC,QAAAA,YAAY,CAAC,KAAKD,qBAAN,CAAZ;AACA,aAAKA,qBAAL,GAA6B,IAA7B;AACD;AACF,KAnJC;;AACA,SAAKE,cAAL,GAAsBX,aAAtB;AACA,SAAKK,SAAL,GAAiBJ,QAAjB;AACD;;AAbuC","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport * as PrivateTypes from './privateTypes';\nimport * as Types from './types';\n\ninterface InternetReachabilityCheckHandler {\n promise: Promise;\n cancel: () => void;\n}\n\nexport default class InternetReachability {\n private _configuration: Types.NetInfoConfiguration;\n private _listener: PrivateTypes.NetInfoInternetReachabilityChangeListener;\n private _isInternetReachable: boolean | null | undefined = undefined;\n private _currentInternetReachabilityCheckHandler: InternetReachabilityCheckHandler | null = null;\n private _currentTimeoutHandle: ReturnType | null = null;\n\n constructor(\n configuration: Types.NetInfoConfiguration,\n listener: PrivateTypes.NetInfoInternetReachabilityChangeListener,\n ) {\n this._configuration = configuration;\n this._listener = listener;\n }\n\n private _setIsInternetReachable = (\n isInternetReachable: boolean | null,\n ): void => {\n if (this._isInternetReachable === isInternetReachable) {\n return;\n }\n\n this._isInternetReachable = isInternetReachable;\n this._listener(this._isInternetReachable);\n };\n\n private _setExpectsConnection = (expectsConnection: boolean | null): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n\n if (expectsConnection && this._configuration.reachabilityShouldRun()) {\n // If we expect a connection, start the process for finding if we have one\n // Set the state to \"null\" if it was previously false\n if (!this._isInternetReachable) {\n this._setIsInternetReachable(null);\n }\n // Start a network request to check for internet\n this._currentInternetReachabilityCheckHandler = this._checkInternetReachability();\n } else {\n // If we don't expect a connection or don't run reachability check, just change the state to \"false\"\n this._setIsInternetReachable(false);\n }\n };\n\n private _checkInternetReachability = (): InternetReachabilityCheckHandler => {\n const controller = new AbortController();\n\n const responsePromise = fetch(this._configuration.reachabilityUrl, {\n headers: this._configuration.reachabilityHeaders,\n method: this._configuration.reachabilityMethod,\n cache: 'no-cache',\n signal: controller.signal,\n });\n\n // Create promise that will reject after the request timeout has been reached\n let timeoutHandle: ReturnType;\n const timeoutPromise = new Promise((): void => {\n timeoutHandle = setTimeout(\n (): void => controller.abort('timedout'),\n this._configuration.reachabilityRequestTimeout,\n );\n });\n\n // Create promise that makes it possible to cancel a pending request through a reject\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n let cancel: () => void = (): void => {};\n const cancelPromise = new Promise((_, reject): void => {\n cancel = (): void => reject('canceled');\n });\n\n const promise = Promise.race([\n responsePromise,\n timeoutPromise,\n cancelPromise,\n ])\n .then(\n (response): Promise => {\n return this._configuration.reachabilityTest(response);\n },\n )\n .then(\n (result): void => {\n this._setIsInternetReachable(result);\n const nextTimeoutInterval = this._isInternetReachable\n ? this._configuration.reachabilityLongTimeout\n : this._configuration.reachabilityShortTimeout;\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n nextTimeoutInterval,\n );\n },\n )\n .catch(\n (error: Error | 'timedout' | 'canceled'): void => {\n if ('canceled' === error) {\n controller.abort();\n } else {\n this._setIsInternetReachable(false);\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n this._configuration.reachabilityShortTimeout,\n );\n }\n },\n )\n // Clear request timeout and propagate any errors\n .then(\n (): void => {\n clearTimeout(timeoutHandle);\n },\n (error: Error): void => {\n clearTimeout(timeoutHandle);\n throw error;\n },\n );\n\n return {\n promise,\n cancel,\n };\n };\n\n public update = (state: PrivateTypes.NetInfoNativeModuleState): void => {\n if (\n typeof state.isInternetReachable === 'boolean' &&\n this._configuration.useNativeReachability\n ) {\n this._setIsInternetReachable(state.isInternetReachable);\n } else {\n this._setExpectsConnection(state.isConnected);\n }\n };\n\n public currentState = (): boolean | null | undefined => {\n return this._isInternetReachable;\n };\n\n public tearDown = (): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n };\n}\n"]} +\ No newline at end of file ++{"version":3,"names":["InternetReachability","constructor","configuration","listener","_defineProperty","undefined","isInternetReachable","_isInternetReachable","_listener","expectsConnection","_currentInternetReachabilityCheckHandler","cancel","_currentTimeoutHandle","clearTimeout","_configuration","reachabilityShouldRun","_setIsInternetReachable","_checkInternetReachability","controller","AbortController","responsePromise","fetch","reachabilityUrl","headers","reachabilityHeaders","method","reachabilityMethod","cache","signal","timeoutHandle","timeoutPromise","Promise","_","reject","setTimeout","reachabilityRequestTimeout","cancelPromise","promise","race","then","response","reachabilityTest","result","nextTimeoutInterval","reachabilityLongTimeout","reachabilityShortTimeout","catch","error","abort","state","useNativeReachability","_setExpectsConnection","isConnected"],"sources":["internetReachability.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport * as PrivateTypes from './privateTypes';\nimport * as Types from './types';\n\ninterface InternetReachabilityCheckHandler {\n promise: Promise;\n cancel: () => void;\n}\n\nexport default class InternetReachability {\n private _configuration: Types.NetInfoConfiguration;\n private _listener: PrivateTypes.NetInfoInternetReachabilityChangeListener;\n private _isInternetReachable: boolean | null | undefined = undefined;\n private _currentInternetReachabilityCheckHandler: InternetReachabilityCheckHandler | null =\n null;\n private _currentTimeoutHandle: ReturnType | null = null;\n\n constructor(\n configuration: Types.NetInfoConfiguration,\n listener: PrivateTypes.NetInfoInternetReachabilityChangeListener,\n ) {\n this._configuration = configuration;\n this._listener = listener;\n }\n\n private _setIsInternetReachable = (\n isInternetReachable: boolean | null,\n ): void => {\n if (this._isInternetReachable === isInternetReachable) {\n return;\n }\n\n this._isInternetReachable = isInternetReachable;\n this._listener(this._isInternetReachable);\n };\n\n private _setExpectsConnection = (expectsConnection: boolean | null): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n\n if (expectsConnection && this._configuration.reachabilityShouldRun()) {\n // If we expect a connection, start the process for finding if we have one\n // Set the state to \"null\" if it was previously false\n if (!this._isInternetReachable) {\n this._setIsInternetReachable(null);\n }\n // Start a network request to check for internet\n this._currentInternetReachabilityCheckHandler =\n this._checkInternetReachability();\n } else {\n // If we don't expect a connection or don't run reachability check, just change the state to \"false\"\n this._setIsInternetReachable(false);\n }\n };\n\n private _checkInternetReachability = (): InternetReachabilityCheckHandler => {\n const controller = new AbortController();\n\n const responsePromise = fetch(this._configuration.reachabilityUrl, {\n headers: this._configuration.reachabilityHeaders,\n method: this._configuration.reachabilityMethod,\n cache: 'no-cache',\n signal: controller.signal,\n });\n\n // Create promise that will reject after the request timeout has been reached\n let timeoutHandle: ReturnType;\n const timeoutPromise = new Promise((_, reject): void => {\n timeoutHandle = setTimeout(\n (): void => reject('timedout'),\n this._configuration.reachabilityRequestTimeout,\n );\n });\n\n // Create promise that makes it possible to cancel a pending request through a reject\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n let cancel: () => void = (): void => {};\n const cancelPromise = new Promise((_, reject): void => {\n cancel = (): void => reject('canceled');\n });\n\n const promise = Promise.race([\n responsePromise,\n timeoutPromise,\n cancelPromise,\n ])\n .then((response): Promise => {\n return this._configuration.reachabilityTest(response);\n })\n .then((result): void => {\n this._setIsInternetReachable(result);\n const nextTimeoutInterval = this._isInternetReachable\n ? this._configuration.reachabilityLongTimeout\n : this._configuration.reachabilityShortTimeout;\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n nextTimeoutInterval,\n );\n })\n .catch((error: Error | 'timedout' | 'canceled'): void => {\n if (error !== 'canceled') {\n this._setIsInternetReachable(false);\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n this._configuration.reachabilityShortTimeout,\n );\n }\n })\n .catch(\n (error: Error | 'timedout' | 'canceled'): void => {\n if ('canceled' === error) {\n controller.abort();\n } else {\n if ('timedout' === error) {\n controller.abort();\n }\n \n this._setIsInternetReachable(false);\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n this._configuration.reachabilityShortTimeout,\n );\n }\n },\n )\n // Clear request timeout and propagate any errors\n .then(\n (): void => {\n clearTimeout(timeoutHandle);\n },\n (error: Error): void => {\n clearTimeout(timeoutHandle);\n throw error;\n },\n );\n\n return {\n promise,\n cancel,\n };\n };\n\n public update = (state: PrivateTypes.NetInfoNativeModuleState): void => {\n if (\n typeof state.isInternetReachable === 'boolean' &&\n this._configuration.useNativeReachability\n ) {\n this._setIsInternetReachable(state.isInternetReachable);\n } else {\n this._setExpectsConnection(state.isConnected);\n }\n };\n\n public currentState = (): boolean | null | undefined => {\n return this._isInternetReachable;\n };\n\n public tearDown = (): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n };\n}\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,eAAe,MAAMA,oBAAoB,CAAC;EAQxCC,WAAWA,CACTC,aAAyC,EACzCC,QAAgE,EAChE;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA,+BARyDC,SAAS;IAAAD,eAAA,mDAElE,IAAI;IAAAA,eAAA,gCACgE,IAAI;IAAAA,eAAA,kCAWxEE,mBAAmC,IAC1B;MACT,IAAI,IAAI,CAACC,oBAAoB,KAAKD,mBAAmB,EAAE;QACrD;MACF;MAEA,IAAI,CAACC,oBAAoB,GAAGD,mBAAmB;MAC/C,IAAI,CAACE,SAAS,CAAC,IAAI,CAACD,oBAAoB,CAAC;IAC3C,CAAC;IAAAH,eAAA,gCAEgCK,iBAAiC,IAAW;MAC3E;MACA,IAAI,IAAI,CAACC,wCAAwC,KAAK,IAAI,EAAE;QAC1D,IAAI,CAACA,wCAAwC,CAACC,MAAM,CAAC,CAAC;QACtD,IAAI,CAACD,wCAAwC,GAAG,IAAI;MACtD;MACA;MACA,IAAI,IAAI,CAACE,qBAAqB,KAAK,IAAI,EAAE;QACvCC,YAAY,CAAC,IAAI,CAACD,qBAAqB,CAAC;QACxC,IAAI,CAACA,qBAAqB,GAAG,IAAI;MACnC;MAEA,IAAIH,iBAAiB,IAAI,IAAI,CAACK,cAAc,CAACC,qBAAqB,CAAC,CAAC,EAAE;QACpE;QACA;QACA,IAAI,CAAC,IAAI,CAACR,oBAAoB,EAAE;UAC9B,IAAI,C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mB,KAAK,SAAS,IAC9C,IAAI,CAACQ,cAAc,CAACoC,qBAAqB,EACzC;QACA,IAAI,CAAClC,uBAAuB,CAACiC,KAAK,CAAC3C,mBAAmB,CAAC;MACzD,CAAC,MAAM;QACL,IAAI,CAAC6C,qBAAqB,CAACF,KAAK,CAACG,WAAW,CAAC;MAC/C;IACF,CAAC;IAAAhD,eAAA,uBAEqB,MAAkC;MACtD,OAAO,IAAI,CAACG,oBAAoB;IAClC,CAAC;IAAAH,eAAA,mBAEiB,MAAY;MAC5B;MACA,IAAI,IAAI,CAACM,wCAAwC,KAAK,IAAI,EAAE;QAC1D,IAAI,CAACA,wCAAwC,CAACC,MAAM,CAAC,CAAC;QACtD,IAAI,CAACD,wCAAwC,GAAG,IAAI;MACtD;;MAEA;MACA,IAAI,IAAI,CAACE,qBAAqB,KAAK,IAAI,EAAE;QACvCC,YAAY,CAAC,IAAI,CAACD,qBAAqB,CAAC;QACxC,IAAI,CAACA,qBAAqB,GAAG,IAAI;MACnC;IACF,CAAC;IA5JC,IAAI,CAACE,cAAc,GAAGZ,aAAa;IACnC,IAAI,CAACM,SAAS,GAAGL,QAAQ;EAC3B;AA2JF"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js +index f9a0320..5c9c6bf 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js +@@ -6,9 +6,11 @@ + * + * @format + */ ++ + import { NativeEventEmitter } from 'react-native'; +-import RNCNetInfo from './nativeModule'; // Produce an error if we don't have the native module ++import RNCNetInfo from './nativeModule'; + ++// Produce an error if we don't have the native module + if (!RNCNetInfo) { + throw new Error(`@react-native-community/netinfo: NativeModule.RNCNetInfo is null. To fix this issue try these steps: + +@@ -20,26 +22,26 @@ if (!RNCNetInfo) { + + If none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-netinfo`); + } ++ + /** + * We export the native interface in this way to give easy shared access to it between the + * JavaScript code and the tests + */ +- +- + let nativeEventEmitter = null; +-export default { ...RNCNetInfo, +- ++export default { ++ configure: RNCNetInfo.configure, ++ addListener: RNCNetInfo.addListener, ++ removeListeners: RNCNetInfo.removeListeners, ++ getCurrentState: RNCNetInfo.getCurrentState, + get eventEmitter() { + if (!nativeEventEmitter) { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + /// @ts-ignore + nativeEventEmitter = new NativeEventEmitter(RNCNetInfo); +- } // eslint-disable-next-line @typescript-eslint/ban-ts-comment ++ } ++ // eslint-disable-next-line @typescript-eslint/ban-ts-comment + /// @ts-ignore +- +- + return nativeEventEmitter; + } +- + }; + //# sourceMappingURL=nativeInterface.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js.map +index 084d180..be2bae7 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["nativeInterface.ts"],"names":["NativeEventEmitter","RNCNetInfo","Error","nativeEventEmitter","eventEmitter"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAAQA,kBAAR,QAAiC,cAAjC;AACA,OAAOC,UAAP,MAAuB,gBAAvB,C,CAEA;;AACA,IAAI,CAACA,UAAL,EAAiB;AACf,QAAM,IAAIC,KAAJ,CAAW;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8IARQ,CAAN;AASD;AAED;AACA;AACA;AACA;;;AACA,IAAIC,kBAA6C,GAAG,IAApD;AACA,eAAe,EACb,GAAGF,UADU;;AAEb,MAAIG,YAAJ,GAAuC;AACrC,QAAI,CAACD,kBAAL,EAAyB;AACvB;AACA;AACAA,MAAAA,kBAAkB,GAAG,IAAIH,kBAAJ,CAAuBC,UAAvB,CAArB;AACD,KALoC,CAMrC;AACA;;;AACA,WAAOE,kBAAP;AACD;;AAXY,CAAf","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\n\n// Produce an error if we don't have the native module\nif (!RNCNetInfo) {\n throw new Error(`@react-native-community/netinfo: NativeModule.RNCNetInfo is null. To fix this issue try these steps:\n\n• Run \\`react-native link @react-native-community/netinfo\\` in the project root.\n• Rebuild and re-run the app.\n• If you are using CocoaPods on iOS, run \\`pod install\\` in the \\`ios\\` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n• Check that the library was linked correctly when you used the link command by running through the manual installation instructions in the README.\n* If you are getting this error while unit testing you need to mock the native module. Follow the guide in the README.\n\nIf none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-netinfo`);\n}\n\n/**\n * We export the native interface in this way to give easy shared access to it between the\n * JavaScript code and the tests\n */\nlet nativeEventEmitter: NativeEventEmitter | null = null;\nexport default {\n ...RNCNetInfo,\n get eventEmitter(): NativeEventEmitter {\n if (!nativeEventEmitter) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n nativeEventEmitter = new NativeEventEmitter(RNCNetInfo);\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n return nativeEventEmitter;\n },\n};\n"]} +\ No newline at end of file ++{"version":3,"names":["NativeEventEmitter","RNCNetInfo","Error","nativeEventEmitter","configure","addListener","removeListeners","getCurrentState","eventEmitter"],"sources":["nativeInterface.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\n\n// Produce an error if we don't have the native module\nif (!RNCNetInfo) {\n throw new Error(`@react-native-community/netinfo: NativeModule.RNCNetInfo is null. To fix this issue try these steps:\n\n• Run \\`react-native link @react-native-community/netinfo\\` in the project root.\n• Rebuild and re-run the app.\n• If you are using CocoaPods on iOS, run \\`pod install\\` in the \\`ios\\` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n• Check that the library was linked correctly when you used the link command by running through the manual installation instructions in the README.\n* If you are getting this error while unit testing you need to mock the native module. Follow the guide in the README.\n\nIf none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-netinfo`);\n}\n\n/**\n * We export the native interface in this way to give easy shared access to it between the\n * JavaScript code and the tests\n */\nlet nativeEventEmitter: NativeEventEmitter | null = null;\n\nexport default {\n configure: RNCNetInfo.configure,\n addListener: RNCNetInfo.addListener,\n removeListeners: RNCNetInfo.removeListeners,\n getCurrentState: RNCNetInfo.getCurrentState,\n get eventEmitter(): NativeEventEmitter {\n if (!nativeEventEmitter) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n nativeEventEmitter = new NativeEventEmitter(RNCNetInfo);\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n return nativeEventEmitter;\n },\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAQA,kBAAkB,QAAO,cAAc;AAC/C,OAAOC,UAAU,MAAM,gBAAgB;;AAEvC;AACA,IAAI,CAACA,UAAU,EAAE;EACf,MAAM,IAAIC,KAAK,CAAE;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8IAA8I,CAAC;AAC/I;;AAEA;AACA;AACA;AACA;AACA,IAAIC,kBAA6C,GAAG,IAAI;AAExD,eAAe;EACbC,SAAS,EAAEH,UAAU,CAACG,SAAS;EAC/BC,WAAW,EAAEJ,UAAU,CAACI,WAAW;EACnCC,eAAe,EAAEL,UAAU,CAACK,eAAe;EAC3CC,eAAe,EAAEN,UAAU,CAACM,eAAe;EAC3C,IAAIC,YAAYA,CAAA,EAAuB;IACrC,IAAI,CAACL,kBAAkB,EAAE;MACvB;MACA;MACAA,kBAAkB,GAAG,IAAIH,kBAAkB,CAACC,UAAU,CAAC;IACzD;IACA;IACA;IACA,OAAOE,kBAAkB;EAC3B;AACF,CAAC"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js +index 2effbe1..90042df 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js +@@ -6,15 +6,18 @@ + * + * @format + */ ++ + import { NativeEventEmitter } from 'react-native'; + import RNCNetInfo from './nativeModule'; + import { DEVICE_CONNECTIVITY_EVENT } from './privateTypes'; +-const nativeEventEmitter = new NativeEventEmitter(); // Listen to connectivity events ++const nativeEventEmitter = new NativeEventEmitter(); + ++// Listen to connectivity events + RNCNetInfo.addListener(DEVICE_CONNECTIVITY_EVENT, event => { + nativeEventEmitter.emit(DEVICE_CONNECTIVITY_EVENT, event); + }); +-export default { ...RNCNetInfo, ++export default { ++ ...RNCNetInfo, + eventEmitter: nativeEventEmitter + }; + //# sourceMappingURL=nativeInterface.web.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js.map +index 0a0bf4f..c0c0af8 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["nativeInterface.web.ts"],"names":["NativeEventEmitter","RNCNetInfo","DEVICE_CONNECTIVITY_EVENT","nativeEventEmitter","addListener","event","emit","eventEmitter"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAAQA,kBAAR,QAAiC,cAAjC;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AACA,SAAQC,yBAAR,QAAwC,gBAAxC;AAEA,MAAMC,kBAAkB,GAAG,IAAIH,kBAAJ,EAA3B,C,CAEA;;AACAC,UAAU,CAACG,WAAX,CACEF,yBADF,EAEGG,KAAD,IAAiB;AACfF,EAAAA,kBAAkB,CAACG,IAAnB,CAAwBJ,yBAAxB,EAAmDG,KAAnD;AACD,CAJH;AAOA,eAAe,EACb,GAAGJ,UADU;AAEbM,EAAAA,YAAY,EAAEJ;AAFD,CAAf","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\nimport {DEVICE_CONNECTIVITY_EVENT} from './privateTypes';\n\nconst nativeEventEmitter = new NativeEventEmitter();\n\n// Listen to connectivity events\nRNCNetInfo.addListener(\n DEVICE_CONNECTIVITY_EVENT,\n (event): void => {\n nativeEventEmitter.emit(DEVICE_CONNECTIVITY_EVENT, event);\n },\n);\n\nexport default {\n ...RNCNetInfo,\n eventEmitter: nativeEventEmitter,\n};\n"]} +\ No newline at end of file ++{"version":3,"names":["NativeEventEmitter","RNCNetInfo","DEVICE_CONNECTIVITY_EVENT","nativeEventEmitter","addListener","event","emit","eventEmitter"],"sources":["nativeInterface.web.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\nimport {DEVICE_CONNECTIVITY_EVENT} from './privateTypes';\n\nconst nativeEventEmitter = new NativeEventEmitter();\n\n// Listen to connectivity events\nRNCNetInfo.addListener(DEVICE_CONNECTIVITY_EVENT, (event): void => {\n nativeEventEmitter.emit(DEVICE_CONNECTIVITY_EVENT, event);\n});\n\nexport default {\n ...RNCNetInfo,\n eventEmitter: nativeEventEmitter,\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAQA,kBAAkB,QAAO,cAAc;AAC/C,OAAOC,UAAU,MAAM,gBAAgB;AACvC,SAAQC,yBAAyB,QAAO,gBAAgB;AAExD,MAAMC,kBAAkB,GAAG,IAAIH,kBAAkB,CAAC,CAAC;;AAEnD;AACAC,UAAU,CAACG,WAAW,CAACF,yBAAyB,EAAGG,KAAK,IAAW;EACjEF,kBAAkB,CAACG,IAAI,CAACJ,yBAAyB,EAAEG,KAAK,CAAC;AAC3D,CAAC,CAAC;AAEF,eAAe;EACb,GAAGJ,UAAU;EACbM,YAAY,EAAEJ;AAChB,CAAC"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js +index 11b32ce..4d606d8 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js +@@ -6,7 +6,16 @@ + * + * @format + */ ++ + import { NativeModules } from 'react-native'; +-const RNCNetInfo = NativeModules.RNCNetInfo; ++// React Native sets `__turboModuleProxy` on global when TurboModules are enabled. ++// Currently, this is the recommended way to detect TurboModules. ++// https://reactnative.dev/docs/the-new-architecture/backward-compatibility-turbomodules#unify-the-javascript-specs ++// eslint-disable-next-line @typescript-eslint/ban-ts-comment ++// @ts-ignore ++const isTurboModuleEnabled = global.__turboModuleProxy != null; ++const RNCNetInfo = isTurboModuleEnabled ? ++// eslint-disable-next-line @typescript-eslint/no-var-requires ++require('./NativeRNCNetInfo').default : NativeModules.RNCNetInfo; + export default RNCNetInfo; + //# sourceMappingURL=nativeModule.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js.map +index 4599032..7df218b 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["nativeModule.ts"],"names":["NativeModules","RNCNetInfo"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAAQA,aAAR,QAA4B,cAA5B;AAGA,MAAMC,UAA+B,GAAGD,aAAa,CAACC,UAAtD;AAEA,eAAeA,UAAf","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeModules} from 'react-native';\nimport {NetInfoNativeModule} from './privateTypes';\n\nconst RNCNetInfo: NetInfoNativeModule = NativeModules.RNCNetInfo;\n\nexport default RNCNetInfo;\n"]} +\ No newline at end of file ++{"version":3,"names":["NativeModules","isTurboModuleEnabled","global","__turboModuleProxy","RNCNetInfo","require","default"],"sources":["nativeModule.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeModules} from 'react-native';\nimport {NetInfoNativeModule} from './privateTypes';\n\n// React Native sets `__turboModuleProxy` on global when TurboModules are enabled.\n// Currently, this is the recommended way to detect TurboModules.\n// https://reactnative.dev/docs/the-new-architecture/backward-compatibility-turbomodules#unify-the-javascript-specs\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst isTurboModuleEnabled = global.__turboModuleProxy != null;\n\nconst RNCNetInfo: NetInfoNativeModule = isTurboModuleEnabled\n ? // eslint-disable-next-line @typescript-eslint/no-var-requires\n require('./NativeRNCNetInfo').default\n : NativeModules.RNCNetInfo;\n\nexport default RNCNetInfo;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAQA,aAAa,QAAO,cAAc;AAG1C;AACA;AACA;AACA;AACA;AACA,MAAMC,oBAAoB,GAAGC,MAAM,CAACC,kBAAkB,IAAI,IAAI;AAE9D,MAAMC,UAA+B,GAAGH,oBAAoB;AACxD;AACAI,OAAO,CAAC,oBAAoB,CAAC,CAACC,OAAO,GACrCN,aAAa,CAACI,UAAU;AAE5B,eAAeA,UAAU"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js +index 32f2ca5..5547977 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js +@@ -6,15 +6,26 @@ + * + * @format + */ ++ + import { DEVICE_CONNECTIVITY_EVENT } from './privateTypes'; +-import { NetInfoCellularGeneration, NetInfoStateType } from './types'; // See https://wicg.github.io/netinfo/#dom-connectiontype ++import { NetInfoCellularGeneration, NetInfoStateType } from './types'; ++ ++// See https://wicg.github.io/netinfo/#dom-connectiontype ++ ++// See https://wicg.github.io/netinfo/#dom-effectiveconnectiontype ++ ++// https://wicg.github.io/netinfo/#dom-networkinformation-savedata ++ ++// Create (optional) connection APIs on navigator + + // Use a constant test of this form because in SSR on next.js, optional chaining is not sufficient, + // but this test correctly detects that window is not available and allows for conditionals before access +-const isWindowPresent = typeof window !== 'undefined'; // Check if window exists and if the browser supports the connection API ++const isWindowPresent = typeof window !== 'undefined'; + +-const connection = isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS') ? window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection : undefined; // Map browser types to native types ++// Check if window exists and if the browser supports the connection API ++const connection = isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS') ? window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection : undefined; + ++// Map browser types to native types + const typeMapping = { + bluetooth: NetInfoStateType.bluetooth, + cellular: NetInfoStateType.cellular, +@@ -31,17 +42,20 @@ const effectiveTypeMapping = { + '3g': NetInfoCellularGeneration['3g'], + '4g': NetInfoCellularGeneration['4g'], + 'slow-2g': NetInfoCellularGeneration['2g'] +-}; // Determine current state of connection ++}; + ++// Determine current state of connection + const getCurrentState = _requestedInterface => { + const isConnected = isWindowPresent ? navigator.onLine : false; + const baseState = { + isInternetReachable: null +- }; // If we don't have a connection object, we return minimal information ++ }; + ++ // If we don't have a connection object, we return minimal information + if (!connection) { + if (isConnected) { +- const state = { ...baseState, ++ const state = { ++ ...baseState, + isConnected: true, + type: NetInfoStateType.other, + details: { +@@ -50,22 +64,22 @@ const getCurrentState = _requestedInterface => { + }; + return state; + } +- +- const state = { ...baseState, ++ const state = { ++ ...baseState, + isConnected: false, + isInternetReachable: false, + type: NetInfoStateType.none, + details: null + }; + return state; +- } // Otherwise try to return detailed information +- ++ } + ++ // Otherwise try to return detailed information + const isConnectionExpensive = connection.saveData; + const type = connection.type ? typeMapping[connection.type] : isConnected ? NetInfoStateType.other : NetInfoStateType.unknown; +- + if (type === NetInfoStateType.bluetooth) { +- const state = { ...baseState, ++ const state = { ++ ...baseState, + isConnected: true, + type, + details: { +@@ -74,7 +88,8 @@ const getCurrentState = _requestedInterface => { + }; + return state; + } else if (type === NetInfoStateType.cellular) { +- const state = { ...baseState, ++ const state = { ++ ...baseState, + isConnected: true, + type, + details: { +@@ -85,7 +100,8 @@ const getCurrentState = _requestedInterface => { + }; + return state; + } else if (type === NetInfoStateType.ethernet) { +- const state = { ...baseState, ++ const state = { ++ ...baseState, + isConnected: true, + type, + details: { +@@ -96,7 +112,8 @@ const getCurrentState = _requestedInterface => { + }; + return state; + } else if (type === NetInfoStateType.wifi) { +- const state = { ...baseState, ++ const state = { ++ ...baseState, + isConnected: true, + type, + details: { +@@ -114,7 +131,8 @@ const getCurrentState = _requestedInterface => { + }; + return state; + } else if (type === NetInfoStateType.wimax) { +- const state = { ...baseState, ++ const state = { ++ ...baseState, + isConnected: true, + type, + details: { +@@ -123,7 +141,8 @@ const getCurrentState = _requestedInterface => { + }; + return state; + } else if (type === NetInfoStateType.none) { +- const state = { ...baseState, ++ const state = { ++ ...baseState, + isConnected: false, + isInternetReachable: false, + type, +@@ -131,7 +150,8 @@ const getCurrentState = _requestedInterface => { + }; + return state; + } else if (type === NetInfoStateType.unknown) { +- const state = { ...baseState, ++ const state = { ++ ...baseState, + isConnected, + isInternetReachable: null, + type, +@@ -139,8 +159,8 @@ const getCurrentState = _requestedInterface => { + }; + return state; + } +- +- const state = { ...baseState, ++ const state = { ++ ...baseState, + isConnected: true, + type: NetInfoStateType.other, + details: { +@@ -149,7 +169,6 @@ const getCurrentState = _requestedInterface => { + }; + return state; + }; +- + const handlers = []; + const nativeHandlers = []; + const RNCNetInfo = { +@@ -160,7 +179,6 @@ const RNCNetInfo = { + const nativeHandler = () => { + handler(getCurrentState()); + }; +- + if (connection) { + connection.addEventListener('change', nativeHandler); + } else { +@@ -168,16 +186,15 @@ const RNCNetInfo = { + window.addEventListener('online', nativeHandler, false); + window.addEventListener('offline', nativeHandler, false); + } +- } // Remember handlers +- ++ } + ++ // Remember handlers + handlers.push(handler); + nativeHandlers.push(nativeHandler); + break; + } + } + }, +- + removeListeners(type, handler) { + switch (type) { + case DEVICE_CONNECTIVITY_EVENT: +@@ -185,7 +202,6 @@ const RNCNetInfo = { + // Get native handler + const index = handlers.indexOf(handler); + const nativeHandler = nativeHandlers[index]; +- + if (connection) { + connection.removeEventListener('change', nativeHandler); + } else { +@@ -193,24 +209,21 @@ const RNCNetInfo = { + window.removeEventListener('online', nativeHandler); + window.removeEventListener('offline', nativeHandler); + } +- } // Remove handlers +- ++ } + ++ // Remove handlers + handlers.splice(index, 1); + nativeHandlers.splice(index, 1); + break; + } + } + }, +- + async getCurrentState(requestedInterface) { + return getCurrentState(requestedInterface); + }, +- + configure() { + return; + } +- + }; + export default RNCNetInfo; + //# sourceMappingURL=nativeModule.web.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js.map +index 2b50d96..0bdd63e 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["nativeModule.web.ts"],"names":["DEVICE_CONNECTIVITY_EVENT","NetInfoCellularGeneration","NetInfoStateType","isWindowPresent","window","connection","hasOwnProperty","navigator","mozConnection","webkitConnection","undefined","typeMapping","bluetooth","cellular","ethernet","none","other","unknown","wifi","wimax","mixed","effectiveTypeMapping","getCurrentState","_requestedInterface","isConnected","onLine","baseState","isInternetReachable","state","type","details","isConnectionExpensive","saveData","cellularGeneration","effectiveType","carrier","ipAddress","subnet","ssid","bssid","strength","frequency","linkSpeed","rxLinkSpeed","txLinkSpeed","handlers","nativeHandlers","RNCNetInfo","addListener","handler","nativeHandler","addEventListener","push","removeListeners","index","indexOf","removeEventListener","splice","requestedInterface","configure"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SACEA,yBADF,QAIO,gBAJP;AAKA,SAEEC,yBAFF,EAQEC,gBARF,QAYO,SAZP,C,CAcA;;AA4CA;AACA;AACA,MAAMC,eAAe,GAAG,OAAOC,MAAP,KAAkB,WAA1C,C,CAEA;;AACA,MAAMC,UAAU,GAAIF,eAAe,IAAI,CAACC,MAAM,CAACE,cAAP,CAAsB,OAAtB,CAApB,IAAsD,CAACF,MAAM,CAACE,cAAP,CAAsB,OAAtB,CAAxD,GACfF,MAAM,CAACG,SAAP,CAAiBF,UAAjB,IACAD,MAAM,CAACG,SAAP,CAAiBC,aADjB,IAEAJ,MAAM,CAACG,SA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AsBD,GAxBqC;;AA0BtCG,EAAAA,eAAe,CAACxB,IAAD,EAAOoB,OAAP,EAAsB;AACnC,YAAQpB,IAAR;AACE,WAAK7B,yBAAL;AAAgC;AAC9B;AACA,gBAAMsD,KAAK,GAAGT,QAAQ,CAACU,OAAT,CAAiBN,OAAjB,CAAd;AACA,gBAAMC,aAAa,GAAGJ,cAAc,CAACQ,KAAD,CAApC;;AAEA,cAAIjD,UAAJ,EAAgB;AACdA,YAAAA,UAAU,CAACmD,mBAAX,CAA+B,QAA/B,EAAyCN,aAAzC;AACD,WAFD,MAEO;AACL,gBAAI/C,eAAJ,EAAqB;AACnBC,cAAAA,MAAM,CAACoD,mBAAP,CAA2B,QAA3B,EAAqCN,aAArC;AACA9C,cAAAA,MAAM,CAACoD,mBAAP,CAA2B,SAA3B,EAAsCN,aAAtC;AACD;AACF,WAZ6B,CAc9B;;;AACAL,UAAAA,QAAQ,CAACY,MAAT,CAAgBH,KAAhB,EAAuB,CAAvB;AACAR,UAAAA,cAAc,CAACW,MAAf,CAAsBH,KAAtB,EAA6B,CAA7B;AAEA;AACD;AApBH;AAsBD,GAjDqC;;AAmDtC,QAAMhC,eAAN,CAAsBoC,kBAAtB,EAA6E;AAC3E,WAAOpC,eAAe,CAACoC,kBAAD,CAAtB;AACD,GArDqC;;AAuDtCC,EAAAA,SAAS,GAAS;AAChB;AACD;;AAzDqC,CAAxC;AA4DA,eAAeZ,UAAf","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {\n DEVICE_CONNECTIVITY_EVENT,\n NetInfoNativeModule,\n NetInfoNativeModuleState,\n} from './privateTypes';\nimport {\n NetInfoBluetoothState,\n NetInfoCellularGeneration,\n NetInfoCellularState,\n NetInfoEthernetState,\n NetInfoNoConnectionState,\n NetInfoOtherState,\n NetInfoState,\n NetInfoStateType,\n NetInfoUnknownState,\n NetInfoWifiState,\n NetInfoWimaxState,\n} from './types';\n\n// See https://wicg.github.io/netinfo/#dom-connectiontype\ntype ConnectionType =\n | 'bluetooth'\n | 'cellular'\n | 'ethernet'\n | 'mixed'\n | 'none'\n | 'other'\n | 'unknown'\n | 'wifi'\n | 'wimax';\n\n// See https://wicg.github.io/netinfo/#dom-effectiveconnectiontype\ntype ConnectionEffectiveType = '2g' | '3g' | '4g' | 'slow-2g';\n\n// https://wicg.github.io/netinfo/#dom-networkinformation-savedata\ntype ConnectionSaveData = boolean;\n\ninterface Events {\n change: Event;\n}\n\ninterface Connection {\n type: ConnectionType;\n effectiveType: ConnectionEffectiveType;\n saveData: ConnectionSaveData;\n addEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\n// Create (optional) connection APIs on navigator\ndeclare global {\n interface Navigator {\n connection?: Connection;\n mozConnection?: Connection;\n webkitConnection?: Connection;\n }\n}\n// Use a constant test of this form because in SSR on next.js, optional chaining is not sufficient,\n// but this test correctly detects that window is not available and allows for conditionals before access\nconst isWindowPresent = typeof window !== 'undefined';\n\n// Check if window exists and if the browser supports the connection API\nconst connection = (isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS'))\n ? window.navigator.connection ||\n window.navigator.mozConnection ||\n window.navigator.webkitConnection\n : undefined;\n\n// Map browser types to native types\nconst typeMapping: Record = {\n bluetooth: NetInfoStateType.bluetooth,\n cellular: NetInfoStateType.cellular,\n ethernet: NetInfoStateType.ethernet,\n none: NetInfoStateType.none,\n other: NetInfoStateType.other,\n unknown: NetInfoStateType.unknown,\n wifi: NetInfoStateType.wifi,\n wimax: NetInfoStateType.wimax,\n mixed: NetInfoStateType.other,\n};\nconst effectiveTypeMapping: Record<\n ConnectionEffectiveType,\n NetInfoCellularGeneration\n> = {\n '2g': NetInfoCellularGeneration['2g'],\n '3g': NetInfoCellularGeneration['3g'],\n '4g': NetInfoCellularGeneration['4g'],\n 'slow-2g': NetInfoCellularGeneration['2g'],\n};\n\n// Determine current state of connection\nconst getCurrentState = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _requestedInterface?: string,\n): Pick> => {\n const isConnected = isWindowPresent ? navigator.onLine : false;\n const baseState = {\n isInternetReachable: null,\n };\n\n // If we don't have a connection object, we return minimal information\n if (!connection) {\n if (isConnected) {\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive: false,\n },\n };\n return state;\n }\n\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type: NetInfoStateType.none,\n details: null,\n };\n return state;\n }\n\n // Otherwise try to return detailed information\n const isConnectionExpensive = connection.saveData;\n const type: NetInfoStateType = connection.type\n ? typeMapping[connection.type]\n : isConnected\n ? NetInfoStateType.other\n : NetInfoStateType.unknown;\n\n if (type === NetInfoStateType.bluetooth) {\n const state: NetInfoBluetoothState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.cellular) {\n const state: NetInfoCellularState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n cellularGeneration:\n effectiveTypeMapping[connection.effectiveType] || null,\n carrier: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.ethernet) {\n const state: NetInfoEthernetState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ipAddress: null,\n subnet: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wifi) {\n const state: NetInfoWifiState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ssid: null,\n bssid: null,\n strength: null,\n ipAddress: null,\n subnet: null,\n frequency: null,\n linkSpeed: null,\n rxLinkSpeed: null,\n txLinkSpeed: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wimax) {\n const state: NetInfoWimaxState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.none) {\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type,\n details: null,\n };\n return state;\n } else if (type === NetInfoStateType.unknown) {\n const state: NetInfoUnknownState = {\n ...baseState,\n isConnected,\n isInternetReachable: null,\n type,\n details: null,\n };\n return state;\n }\n\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n};\n\nconst handlers: ((state: NetInfoNativeModuleState) => void)[] = [];\nconst nativeHandlers: (() => void)[] = [];\n\nconst RNCNetInfo: NetInfoNativeModule = {\n addListener(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n const nativeHandler = (): void => {\n handler(getCurrentState());\n };\n\n if (connection) {\n connection.addEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.addEventListener('online', nativeHandler, false);\n window.addEventListener('offline', nativeHandler, false);\n }\n }\n\n // Remember handlers\n handlers.push(handler);\n nativeHandlers.push(nativeHandler);\n\n break;\n }\n }\n },\n\n removeListeners(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n // Get native handler\n const index = handlers.indexOf(handler);\n const nativeHandler = nativeHandlers[index];\n\n if (connection) {\n connection.removeEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.removeEventListener('online', nativeHandler);\n window.removeEventListener('offline', nativeHandler);\n }\n }\n\n // Remove handlers\n handlers.splice(index, 1);\n nativeHandlers.splice(index, 1);\n\n break;\n }\n }\n },\n\n async getCurrentState(requestedInterface): Promise {\n return getCurrentState(requestedInterface);\n },\n\n configure(): void {\n return;\n },\n};\n\nexport default RNCNetInfo;\n"]} +\ No newline at end of file ++{"version":3,"names":["DEVICE_CONNECTIVITY_EVENT","NetInfoCellularGeneration","NetInfoStateType","isWindowPresent","window","connection","hasOwnProperty","navigator","mozConnection","webkitConnection","undefined","typeMapping","bluetooth","cellular","ethernet","none","other","unknown","wifi","wimax","mixed","effectiveTypeMapping","getCurrentState","_requestedInterface","isConnected","onLine","baseState","isInternetReachable","state","type","details","isConnectionExpensive","saveData","cellularGeneration","effectiveType","carrier","ipAddress","subnet","ssid","bssid","strength","frequency","linkSpeed","rxLinkSpeed","txLinkSpeed","handlers","nativeHandlers","RNCNetInfo","addListener","handler","nativeHandler","addEventListener","push","removeListeners","index","indexOf","removeEventListener","splice","requestedInterface","configure"],"sources":["nativeModule.web.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {\n DEVICE_CONNECTIVITY_EVENT,\n NetInfoNativeModule,\n NetInfoNativeModuleState,\n} from './privateTypes';\nimport {\n NetInfoBluetoothState,\n NetInfoCellularGeneration,\n NetInfoCellularState,\n NetInfoEthernetState,\n NetInfoNoConnectionState,\n NetInfoOtherState,\n NetInfoState,\n NetInfoStateType,\n NetInfoUnknownState,\n NetInfoWifiState,\n NetInfoWimaxState,\n} from './types';\n\n// See https://wicg.github.io/netinfo/#dom-connectiontype\ntype ConnectionType =\n | 'bluetooth'\n | 'cellular'\n | 'ethernet'\n | 'mixed'\n | 'none'\n | 'other'\n | 'unknown'\n | 'wifi'\n | 'wimax';\n\n// See https://wicg.github.io/netinfo/#dom-effectiveconnectiontype\ntype ConnectionEffectiveType = '2g' | '3g' | '4g' | 'slow-2g';\n\n// https://wicg.github.io/netinfo/#dom-networkinformation-savedata\ntype ConnectionSaveData = boolean;\n\ninterface Events {\n change: Event;\n}\n\ninterface Connection {\n type: ConnectionType;\n effectiveType: ConnectionEffectiveType;\n saveData: ConnectionSaveData;\n addEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\n// Create (optional) connection APIs on navigator\ndeclare global {\n interface Navigator {\n connection?: Connection;\n mozConnection?: Connection;\n webkitConnection?: Connection;\n }\n}\n// Use a constant test of this form because in SSR on next.js, optional chaining is not sufficient,\n// but this test correctly detects that window is not available and allows for conditionals before access\nconst isWindowPresent = typeof window !== 'undefined';\n\n// Check if window exists and if the browser supports the connection API\nconst connection = (isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS'))\n ? window.navigator.connection ||\n window.navigator.mozConnection ||\n window.navigator.webkitConnection\n : undefined;\n\n// Map browser types to native types\nconst typeMapping: Record = {\n bluetooth: NetInfoStateType.bluetooth,\n cellular: NetInfoStateType.cellular,\n ethernet: NetInfoStateType.ethernet,\n none: NetInfoStateType.none,\n other: NetInfoStateType.other,\n unknown: NetInfoStateType.unknown,\n wifi: NetInfoStateType.wifi,\n wimax: NetInfoStateType.wimax,\n mixed: NetInfoStateType.other,\n};\nconst effectiveTypeMapping: Record<\n ConnectionEffectiveType,\n NetInfoCellularGeneration\n> = {\n '2g': NetInfoCellularGeneration['2g'],\n '3g': NetInfoCellularGeneration['3g'],\n '4g': NetInfoCellularGeneration['4g'],\n 'slow-2g': NetInfoCellularGeneration['2g'],\n};\n\n// Determine current state of connection\nconst getCurrentState = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _requestedInterface?: string,\n): Pick> => {\n const isConnected = isWindowPresent ? navigator.onLine : false;\n const baseState = {\n isInternetReachable: null,\n };\n\n // If we don't have a connection object, we return minimal information\n if (!connection) {\n if (isConnected) {\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive: false,\n },\n };\n return state;\n }\n\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type: NetInfoStateType.none,\n details: null,\n };\n return state;\n }\n\n // Otherwise try to return detailed information\n const isConnectionExpensive = connection.saveData;\n const type: NetInfoStateType = connection.type\n ? typeMapping[connection.type]\n : isConnected\n ? NetInfoStateType.other\n : NetInfoStateType.unknown;\n\n if (type === NetInfoStateType.bluetooth) {\n const state: NetInfoBluetoothState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.cellular) {\n const state: NetInfoCellularState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n cellularGeneration:\n effectiveTypeMapping[connection.effectiveType] || null,\n carrier: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.ethernet) {\n const state: NetInfoEthernetState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ipAddress: null,\n subnet: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wifi) {\n const state: NetInfoWifiState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ssid: null,\n bssid: null,\n strength: null,\n ipAddress: null,\n subnet: null,\n frequency: null,\n linkSpeed: null,\n rxLinkSpeed: null,\n txLinkSpeed: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wimax) {\n const state: NetInfoWimaxState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.none) {\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type,\n details: null,\n };\n return state;\n } else if (type === NetInfoStateType.unknown) {\n const state: NetInfoUnknownState = {\n ...baseState,\n isConnected,\n isInternetReachable: null,\n type,\n details: null,\n };\n return state;\n }\n\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n};\n\nconst handlers: ((state: NetInfoNativeModuleState) => void)[] = [];\nconst nativeHandlers: (() => void)[] = [];\n\nconst RNCNetInfo: NetInfoNativeModule = {\n addListener(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n const nativeHandler = (): void => {\n handler(getCurrentState());\n };\n\n if (connection) {\n connection.addEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.addEventListener('online', nativeHandler, false);\n window.addEventListener('offline', nativeHandler, false);\n }\n }\n\n // Remember handlers\n handlers.push(handler);\n nativeHandlers.push(nativeHandler);\n\n break;\n }\n }\n },\n\n removeListeners(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n // Get native handler\n const index = handlers.indexOf(handler);\n const nativeHandler = nativeHandlers[index];\n\n if (connection) {\n connection.removeEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.removeEventListener('online', nativeHandler);\n window.removeEventListener('offline', nativeHandler);\n }\n }\n\n // Remove handlers\n handlers.splice(index, 1);\n nativeHandlers.splice(index, 1);\n\n break;\n }\n }\n },\n\n async getCurrentState(requestedInterface): Promise {\n return getCurrentState(requestedInterface);\n },\n\n configure(): void {\n return;\n },\n};\n\nexport default RNCNetInfo;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,yBAAyB,QAGpB,gBAAgB;AACvB,SAEEC,yBAAyB,EAMzBC,gBAAgB,QAIX,SAAS;;AAEhB;;AAYA;;AAGA;;AAqBA;;AAQA;AACA;AACA,MAAMC,eAAe,GAAG,OAAOC,MAAM,KAAK,WAAW;;AAErD;AACA,MAAMC,UAAU,GAAIF,eAAe,IAAI,CAACC,MAAM,CAACE,cAAc,CAAC,OAAO,CAAC,IAAI,CAACF,MAAM,CAACE,cAAc,CAAC,OAAO,CAAC,GACrGF,MAAM,CAACG,SAAS,CAACF,UAAU,IAC3BD,MAAM,CAACG,SAAS,CAACC,aAAa,IAC9BJ,MAAM,CAACG,SAAS,CAACE,gBAAgB,GACjCC,SAAS;;AAEb;AACA,MAAMC,WAAqD,GAAG;EAC5DC,SAAS,EAAEV,gBAAgB,CAACU,SAAS;EACrCC,QAAQ,EAAEX,gBAAgB,CAACW,QAAQ;EACnCC,QAAQ,EAAEZ,gBAAgB,CA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;YACdA,UAAU,CAAC8C,gBAAgB,CAAC,QAAQ,EAAED,aAAa,CAAC;UACtD,CAAC,MAAM;YACL,IAAI/C,eAAe,EAAE;cACnBC,MAAM,CAAC+C,gBAAgB,CAAC,QAAQ,EAAED,aAAa,EAAE,KAAK,CAAC;cACvD9C,MAAM,CAAC+C,gBAAgB,CAAC,SAAS,EAAED,aAAa,EAAE,KAAK,CAAC;YAC1D;UACF;;UAEA;UACAL,QAAQ,CAACO,IAAI,CAACH,OAAO,CAAC;UACtBH,cAAc,CAACM,IAAI,CAACF,aAAa,CAAC;UAElC;QACF;IACF;EACF,CAAC;EAEDG,eAAeA,CAACxB,IAAI,EAAEoB,OAAO,EAAQ;IACnC,QAAQpB,IAAI;MACV,KAAK7B,yBAAyB;QAAE;UAC9B;UACA,MAAMsD,KAAK,GAAGT,QAAQ,CAACU,OAAO,CAACN,OAAO,CAAC;UACvC,MAAMC,aAAa,GAAGJ,cAAc,CAACQ,KAAK,CAAC;UAE3C,IAAIjD,UAAU,EAAE;YACdA,UAAU,CAACmD,mBAAmB,CAAC,QAAQ,EAAEN,aAAa,CAAC;UACzD,CAAC,MAAM;YACL,IAAI/C,eAAe,EAAE;cACnBC,MAAM,CAACoD,mBAAmB,CAAC,QAAQ,EAAEN,aAAa,CAAC;cACnD9C,MAAM,CAACoD,mBAAmB,CAAC,SAAS,EAAEN,aAAa,CAAC;YACtD;UACF;;UAEA;UACAL,QAAQ,CAACY,MAAM,CAACH,KAAK,EAAE,CAAC,CAAC;UACzBR,cAAc,CAACW,MAAM,CAACH,KAAK,EAAE,CAAC,CAAC;UAE/B;QACF;IACF;EACF,CAAC;EAED,MAAMhC,eAAeA,CAACoC,kBAAkB,EAAqC;IAC3E,OAAOpC,eAAe,CAACoC,kBAAkB,CAAC;EAC5C,CAAC;EAEDC,SAASA,CAAA,EAAS;IAChB;EACF;AACF,CAAC;AAED,eAAeZ,UAAU"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js b/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js +index 4b88052..64831b1 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js +@@ -6,5 +6,8 @@ + * + * @format + */ +-export const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange'; // Certain properties are optional when sent by the native module and are handled by the JS code ++ ++export const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange'; ++ ++// Certain properties are optional when sent by the native module and are handled by the JS code + //# sourceMappingURL=privateTypes.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js.map +index db99fe3..9ef56cb 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["privateTypes.ts"],"names":["DEVICE_CONNECTIVITY_EVENT"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA,OAAO,MAAMA,yBAAyB,GAAG,gCAAlC,C,CAEP","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NetInfoConfiguration, NetInfoState} from './types';\n\nexport const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange';\n\n// Certain properties are optional when sent by the native module and are handled by the JS code\nexport type NetInfoNativeModuleState = Pick<\n NetInfoState,\n Exclude\n> & {isInternetReachable?: boolean};\n\nexport interface Events {\n [DEVICE_CONNECTIVITY_EVENT]: NetInfoNativeModuleState;\n}\n\nexport interface NetInfoNativeModule {\n configure: (config: Partial) => void;\n getCurrentState: (\n requestedInterface?: string,\n ) => Promise;\n addListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeListeners(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\nexport type NetInfoInternetReachabilityChangeListener = (\n isInternetReachable: boolean | null | undefined,\n) => void;\n"]} +\ No newline at end of file ++{"version":3,"names":["DEVICE_CONNECTIVITY_EVENT"],"sources":["privateTypes.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NetInfoConfiguration, NetInfoState} from './types';\n\nexport const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange';\n\n// Certain properties are optional when sent by the native module and are handled by the JS code\nexport type NetInfoNativeModuleState = Pick<\n NetInfoState,\n Exclude\n> & {isInternetReachable?: boolean};\n\nexport interface Events {\n [DEVICE_CONNECTIVITY_EVENT]: NetInfoNativeModuleState;\n}\n\nexport interface NetInfoNativeModule {\n configure: (config: Partial) => void;\n getCurrentState: (\n requestedInterface?: string,\n ) => Promise;\n addListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeListeners(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\nexport type NetInfoInternetReachabilityChangeListener = (\n isInternetReachable: boolean | null | undefined,\n) => void;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAO,MAAMA,yBAAyB,GAAG,gCAAgC;;AAEzE"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/state.js b/node_modules/@react-native-community/netinfo/lib/module/internal/state.js +index 305d286..7d12f6a 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/internal/state.js ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/state.js +@@ -1,5 +1,6 @@ +-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +- ++function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } ++function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } ++function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } + /** + * Copyright (c) Facebook, Inc. and its affiliates. + * +@@ -8,72 +9,61 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope + * + * @format + */ ++ + import NativeInterface from './nativeInterface'; + import InternetReachability from './internetReachability'; + import * as PrivateTypes from './privateTypes'; + export default class State { + constructor(configuration) { + _defineProperty(this, "_nativeEventSubscription", null); +- + _defineProperty(this, "_subscriptions", new Set()); +- + _defineProperty(this, "_latestState", null); +- + _defineProperty(this, "_internetReachability", void 0); +- + _defineProperty(this, "_handleNativeStateUpdate", state => { + // Update the internet reachability module +- this._internetReachability.update(state); // Convert the state from native to JS shape +- +- +- const convertedState = this._convertState(state); // Update the listeners ++ this._internetReachability.update(state); + ++ // Convert the state from native to JS shape ++ const convertedState = this._convertState(state); + ++ // Update the listeners + this._latestState = convertedState; +- + this._subscriptions.forEach(handler => handler(convertedState)); + }); +- + _defineProperty(this, "_handleInternetReachabilityUpdate", isInternetReachable => { + if (!this._latestState) { + return; + } +- +- const nextState = { ...this._latestState, ++ const nextState = { ++ ...this._latestState, + isInternetReachable + }; + this._latestState = nextState; +- + this._subscriptions.forEach(handler => handler(nextState)); + }); +- + _defineProperty(this, "_fetchCurrentState", async requestedInterface => { +- const state = await NativeInterface.getCurrentState(requestedInterface); // Update the internet reachability module +- +- this._internetReachability.update(state); // Convert and store the new state +- ++ const state = await NativeInterface.getCurrentState(requestedInterface); + ++ // Update the internet reachability module ++ this._internetReachability.update(state); ++ // Convert and store the new state + const convertedState = this._convertState(state); +- + if (!requestedInterface) { + this._latestState = convertedState; +- + this._subscriptions.forEach(handler => handler(convertedState)); + } +- + return convertedState; + }); +- + _defineProperty(this, "_convertState", input => { + if (typeof input.isInternetReachable === 'boolean') { + return input; + } else { +- return { ...input, ++ return { ++ ...input, + isInternetReachable: this._internetReachability.currentState() + }; + } + }); +- + _defineProperty(this, "latest", requestedInterface => { + if (requestedInterface) { + return this._fetchCurrentState(requestedInterface); +@@ -83,42 +73,37 @@ export default class State { + return this._fetchCurrentState(); + } + }); +- + _defineProperty(this, "add", handler => { + // Add the subscription handler to our set +- this._subscriptions.add(handler); // Send it the latest data we have +- ++ this._subscriptions.add(handler); + ++ // Send it the latest data we have + if (this._latestState) { + handler(this._latestState); + } else { + this.latest().then(handler); + } + }); +- + _defineProperty(this, "remove", handler => { + this._subscriptions.delete(handler); + }); +- + _defineProperty(this, "tearDown", () => { + if (this._internetReachability) { + this._internetReachability.tearDown(); + } +- + if (this._nativeEventSubscription) { + this._nativeEventSubscription.remove(); + } +- + this._subscriptions.clear(); + }); +- + // Add the listener to the internet connectivity events +- this._internetReachability = new InternetReachability(configuration, this._handleInternetReachabilityUpdate); // Add the subscription to the native events ++ this._internetReachability = new InternetReachability(configuration, this._handleInternetReachabilityUpdate); + +- this._nativeEventSubscription = NativeInterface.eventEmitter.addListener(PrivateTypes.DEVICE_CONNECTIVITY_EVENT, this._handleNativeStateUpdate); // Fetch the current state from the native module ++ // Add the subscription to the native events ++ this._nativeEventSubscription = NativeInterface.eventEmitter.addListener(PrivateTypes.DEVICE_CONNECTIVITY_EVENT, this._handleNativeStateUpdate); + ++ // Fetch the current state from the native module + this._fetchCurrentState(); + } +- + } + //# sourceMappingURL=state.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/state.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/state.js.map +index e6e8249..053e584 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/internal/state.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/state.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["state.ts"],"names":["NativeInterface","InternetReachability","PrivateTypes","State","constructor","configuration","Set","state","_internetReachability","update","convertedState","_convertState","_latestState","_subscriptions","forEach","handler","isInternetReachable","nextState","requestedInterface","getCurrentState","input","currentState","_fetchCurrentState","Promise","resolve","add","latest","then","delete","tearDown","_nativeEventSubscription","remove","clear","_handleInternetReachabilityUpdate","eventEmitter","addListener","DEVICE_CONNECTIVITY_EVENT","_handleNativeStateUpdate"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,OAAOA,eAAP,MAA4B,mBAA5B;AACA,OAAOC,oBAAP,MAAiC,wBAAjC;AAEA,OAAO,KAAKC,YAAZ,MAA8B,gBAA9B;AAEA,eAAe,MAAMC,KAAN,CAAY;AAMzBC,EAAAA,WAAW,CAACC,aAAD,EAA4C;AAAA,sDALY,IAKZ;;AAAA,4CAJ9B,IAAIC,GAAJ,EAI8B;;AAAA,0CAHL,IAGK;;AAAA;;AAAA,sDAkBrDC,KADiC,IAExB;AACT;AACA,WAAKC,qBAAL,CAA2BC,MAA3B,CAAkCF,KAAlC,EAFS,CAIT;;;AACA,YAAMG,cAAc,GAAG,KAAKC,aAAL,CAAmBJ,KAAnB,CAAvB,CALS,CAOT;;;AACA,WAAKK,YAAL,GAAoBF,cAApB;;AACA,WAAKG,cAAL,CAAoBC,OAApB,CAA6BC,OAAD,IAAmBA,OAAO,CAACL,cAAD,CAAtD;AACD,KA7BsD;;AAAA,+DAgCrDM,mBAD0C,IAEjC;AACT,UAAI,CAAC,KAAKJ,YAAV,EAAwB;AACtB;AACD;;AAED,YAAMK,SAAS,GAAG,EAChB,GAAG,KAAKL,YADQ;AAEhBI,QAAAA;AAFgB,OAAlB;AAIA,WAAKJ,YAAL,GAAoBK,SAApB;;AACA,WAAKJ,cAAL,CAAoBC,OAApB,CAA6BC,O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AAL,GAAcC,IAAd,CAAmBZ,OAAnB;AACD;AACF,KAlGsD;;AAAA,oCAoGtCA,OAAD,IAA+C;AAC7D,WAAKF,cAAL,CAAoBe,MAApB,CAA2Bb,OAA3B;AACD,KAtGsD;;AAAA,sCAwGrC,MAAY;AAC5B,UAAI,KAAKP,qBAAT,EAAgC;AAC9B,aAAKA,qBAAL,CAA2BqB,QAA3B;AACD;;AAED,UAAI,KAAKC,wBAAT,EAAmC;AACjC,aAAKA,wBAAL,CAA8BC,MAA9B;AACD;;AAED,WAAKlB,cAAL,CAAoBmB,KAApB;AACD,KAlHsD;;AACrD;AACA,SAAKxB,qBAAL,GAA6B,IAAIP,oBAAJ,CAC3BI,aAD2B,EAE3B,KAAK4B,iCAFsB,CAA7B,CAFqD,CAOrD;;AACA,SAAKH,wBAAL,GAAgC9B,eAAe,CAACkC,YAAhB,CAA6BC,WAA7B,CAC9BjC,YAAY,CAACkC,yBADiB,EAE9B,KAAKC,wBAFyB,CAAhC,CARqD,CAarD;;AACA,SAAKf,kBAAL;AACD;;AArBwB","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventSubscription} from 'react-native';\nimport NativeInterface from './nativeInterface';\nimport InternetReachability from './internetReachability';\nimport * as Types from './types';\nimport * as PrivateTypes from './privateTypes';\n\nexport default class State {\n private _nativeEventSubscription: NativeEventSubscription | null = null;\n private _subscriptions = new Set();\n private _latestState: Types.NetInfoState | null = null;\n private _internetReachability: InternetReachability;\n\n constructor(configuration: Types.NetInfoConfiguration) {\n // Add the listener to the internet connectivity events\n this._internetReachability = new InternetReachability(\n configuration,\n this._handleInternetReachabilityUpdate,\n );\n\n // Add the subscription to the native events\n this._nativeEventSubscription = NativeInterface.eventEmitter.addListener(\n PrivateTypes.DEVICE_CONNECTIVITY_EVENT,\n this._handleNativeStateUpdate,\n );\n\n // Fetch the current state from the native module\n this._fetchCurrentState();\n }\n\n private _handleNativeStateUpdate = (\n state: PrivateTypes.NetInfoNativeModuleState,\n ): void => {\n // Update the internet reachability module\n this._internetReachability.update(state);\n\n // Convert the state from native to JS shape\n const convertedState = this._convertState(state);\n\n // Update the listeners\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n };\n\n private _handleInternetReachabilityUpdate = (\n isInternetReachable: boolean | null | undefined,\n ): void => {\n if (!this._latestState) {\n return;\n }\n\n const nextState = {\n ...this._latestState,\n isInternetReachable,\n } as Types.NetInfoState;\n this._latestState = nextState;\n this._subscriptions.forEach((handler): void => handler(nextState));\n };\n\n public _fetchCurrentState = async (\n requestedInterface?: string,\n ): Promise => {\n const state = await NativeInterface.getCurrentState(requestedInterface);\n\n // Update the internet reachability module\n this._internetReachability.update(state);\n // Convert and store the new state\n const convertedState = this._convertState(state);\n if (!requestedInterface) {\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n }\n\n return convertedState;\n };\n\n private _convertState = (\n input: PrivateTypes.NetInfoNativeModuleState,\n ): Types.NetInfoState => {\n if (typeof input.isInternetReachable === 'boolean') {\n return input as Types.NetInfoState;\n } else {\n return {\n ...input,\n isInternetReachable: this._internetReachability.currentState(),\n } as Types.NetInfoState;\n }\n };\n\n public latest = (\n requestedInterface?: string,\n ): Promise => {\n if (requestedInterface) {\n return this._fetchCurrentState(requestedInterface);\n } else if (this._latestState) {\n return Promise.resolve(this._latestState);\n } else {\n return this._fetchCurrentState();\n }\n };\n\n public add = (handler: Types.NetInfoChangeHandler): void => {\n // Add the subscription handler to our set\n this._subscriptions.add(handler);\n\n // Send it the latest data we have\n if (this._latestState) {\n handler(this._latestState);\n } else {\n this.latest().then(handler);\n }\n };\n\n public remove = (handler: Types.NetInfoChangeHandler): void => {\n this._subscriptions.delete(handler);\n };\n\n public tearDown = (): void => {\n if (this._internetReachability) {\n this._internetReachability.tearDown();\n }\n\n if (this._nativeEventSubscription) {\n this._nativeEventSubscription.remove();\n }\n\n this._subscriptions.clear();\n };\n}\n"]} +\ No newline at end of file ++{"version":3,"names":["NativeInterface","InternetReachability","PrivateTypes","State","constructor","configuration","_defineProperty","Set","state","_internetReachability","update","convertedState","_convertState","_latestState","_subscriptions","forEach","handler","isInternetReachable","nextState","requestedInterface","getCurrentState","input","currentState","_fetchCurrentState","Promise","resolve","add","latest","then","delete","tearDown","_nativeEventSubscription","remove","clear","_handleInternetReachabilityUpdate","eventEmitter","addListener","DEVICE_CONNECTIVITY_EVENT","_handleNativeStateUpdate"],"sources":["state.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventSubscription} from 'react-native';\nimport NativeInterface from './nativeInterface';\nimport InternetReachability from './internetReachability';\nimport * as Types from './types';\nimport * as PrivateTypes from './privateTypes';\n\nexport default class State {\n private _nativeEventSubscription: NativeEventSubscription | null = null;\n private _subscriptions = new Set();\n private _latestState: Types.NetInfoState | null = null;\n private _internetReachability: InternetReachability;\n\n constructor(configuration: Types.NetInfoConfiguration) {\n // Add the listener to the internet connectivity events\n this._internetReachability = new InternetReachability(\n configuration,\n this._handleInternetReachabilityUpdate,\n );\n\n // Add the subscription to the native events\n this._nativeEventSubscription = NativeInterface.eventEmitter.addListener(\n PrivateTypes.DEVICE_CONNECTIVITY_EVENT,\n this._handleNativeStateUpdate,\n );\n\n // Fetch the current state from the native module\n this._fetchCurrentState();\n }\n\n private _handleNativeStateUpdate = (\n state: PrivateTypes.NetInfoNativeModuleState,\n ): void => {\n // Update the internet reachability module\n this._internetReachability.update(state);\n\n // Convert the state from native to JS shape\n const convertedState = this._convertState(state);\n\n // Update the listeners\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n };\n\n private _handleInternetReachabilityUpdate = (\n isInternetReachable: boolean | null | undefined,\n ): void => {\n if (!this._latestState) {\n return;\n }\n\n const nextState = {\n ...this._latestState,\n isInternetReachable,\n } as Types.NetInfoState;\n this._latestState = nextState;\n this._subscriptions.forEach((handler): void => handler(nextState));\n };\n\n public _fetchCurrentState = async (\n requestedInterface?: string,\n ): Promise => {\n const state = await NativeInterface.getCurrentState(requestedInterface);\n\n // Update the internet reachability module\n this._internetReachability.update(state);\n // Convert and store the new state\n const convertedState = this._convertState(state);\n if (!requestedInterface) {\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n }\n\n return convertedState;\n };\n\n private _convertState = (\n input: PrivateTypes.NetInfoNativeModuleState,\n ): Types.NetInfoState => {\n if (typeof input.isInternetReachable === 'boolean') {\n return input as Types.NetInfoState;\n } else {\n return {\n ...input,\n isInternetReachable: this._internetReachability.currentState(),\n } as Types.NetInfoState;\n }\n };\n\n public latest = (\n requestedInterface?: string,\n ): Promise => {\n if (requestedInterface) {\n return this._fetchCurrentState(requestedInterface);\n } else if (this._latestState) {\n return Promise.resolve(this._latestState);\n } else {\n return this._fetchCurrentState();\n }\n };\n\n public add = (handler: Types.NetInfoChangeHandler): void => {\n // Add the subscription handler to our set\n this._subscriptions.add(handler);\n\n // Send it the latest data we have\n if (this._latestState) {\n handler(this._latestState);\n } else {\n this.latest().then(handler);\n }\n };\n\n public remove = (handler: Types.NetInfoChangeHandler): void => {\n this._subscriptions.delete(handler);\n };\n\n public tearDown = (): void => {\n if (this._internetReachability) {\n this._internetReachability.tearDown();\n }\n\n if (this._nativeEventSubscription) {\n this._nativeEventSubscription.remove();\n }\n\n this._subscriptions.clear();\n };\n}\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAOA,eAAe,MAAM,mBAAmB;AAC/C,OAAOC,oBAAoB,MAAM,wBAAwB;AAEzD,OAAO,KAAKC,YAAY,MAAM,gBAAgB;AAE9C,eAAe,MAAMC,KAAK,CAAC;EAMzBC,WAAWA,CAACC,aAAyC,EAAE;IAAAC,eAAA,mCALY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AC6B,iCACP,CAAC;;IAED;IACA,IAAI,CAACH,wBAAwB,GAAG/B,eAAe,CAACmC,YAAY,CAACC,WAAW,CACtElC,YAAY,CAACmC,yBAAyB,EACtC,IAAI,CAACC,wBACP,CAAC;;IAED;IACA,IAAI,CAACf,kBAAkB,CAAC,CAAC;EAC3B;AAoGF"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/types.js b/node_modules/@react-native-community/netinfo/lib/module/internal/types.js +index ac35a3d..ebe70e5 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/internal/types.js ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/types.js +@@ -6,9 +6,8 @@ + * + * @format + */ +-export let NetInfoStateType; + +-(function (NetInfoStateType) { ++export let NetInfoStateType = /*#__PURE__*/function (NetInfoStateType) { + NetInfoStateType["unknown"] = "unknown"; + NetInfoStateType["none"] = "none"; + NetInfoStateType["cellular"] = "cellular"; +@@ -18,14 +17,13 @@ export let NetInfoStateType; + NetInfoStateType["wimax"] = "wimax"; + NetInfoStateType["vpn"] = "vpn"; + NetInfoStateType["other"] = "other"; +-})(NetInfoStateType || (NetInfoStateType = {})); +- +-export let NetInfoCellularGeneration; +- +-(function (NetInfoCellularGeneration) { ++ return NetInfoStateType; ++}({}); ++export let NetInfoCellularGeneration = /*#__PURE__*/function (NetInfoCellularGeneration) { + NetInfoCellularGeneration["2g"] = "2g"; + NetInfoCellularGeneration["3g"] = "3g"; + NetInfoCellularGeneration["4g"] = "4g"; + NetInfoCellularGeneration["5g"] = "5g"; +-})(NetInfoCellularGeneration || (NetInfoCellularGeneration = {})); ++ return NetInfoCellularGeneration; ++}({}); + //# sourceMappingURL=types.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/types.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/types.js.map +index 340dc4a..afd20ec 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/internal/types.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/types.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["types.ts"],"names":["NetInfoStateType","NetInfoCellularGeneration"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,WAAYA,gBAAZ;;WAAYA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;GAAAA,gB,KAAAA,gB;;AAcZ,WAAYC,yBAAZ;;WAAYA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;GAAAA,yB,KAAAA,yB","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nexport enum NetInfoStateType {\n unknown = 'unknown',\n none = 'none',\n cellular = 'cellular',\n wifi = 'wifi',\n bluetooth = 'bluetooth',\n ethernet = 'ethernet',\n wimax = 'wimax',\n vpn = 'vpn',\n other = 'other',\n}\n\nexport type NetInfoMethodType = 'HEAD' | 'GET';\n\nexport enum NetInfoCellularGeneration {\n '2g' = '2g',\n '3g' = '3g',\n '4g' = '4g',\n '5g' = '5g',\n}\n\nexport interface NetInfoConnectedDetails {\n isConnectionExpensive: boolean;\n}\n\ninterface NetInfoConnectedState<\n T extends NetInfoStateType,\n D extends Record = Record\n> {\n type: T;\n isConnected: true;\n isInternetReachable: boolean | null;\n details: D & NetInfoConnectedDetails;\n isWifiEnabled?: boolean;\n}\n\ninterface NetInfoDisconnectedState {\n type: T;\n isConnected: false;\n isInternetReachable: false;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport interface NetInfoUnknownState {\n type: NetInfoStateType.unknown;\n isConnected: boolean | null;\n isInternetReachable: null;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport type NetInfoNoConnectionState = NetInfoDisconnectedState<\n NetInfoStateType.none\n>;\nexport type NetInfoDisconnectedStates =\n | NetInfoUnknownState\n | NetInfoNoConnectionState;\n\nexport type NetInfoCellularState = NetInfoConnectedState<\n NetInfoStateType.cellular,\n {\n cellularGeneration: NetInfoCellularGeneration | null;\n carrier: string | null;\n }\n>;\nexport type NetInfoWifiState = NetInfoConnectedState<\n NetInfoStateType.wifi,\n {\n ssid: string | null;\n bssid: string | null;\n strength: number | null;\n ipAddress: string | null;\n subnet: string | null;\n frequency: number | null;\n linkSpeed: number | null;\n rxLinkSpeed: number | null;\n txLinkSpeed: number | null;\n }\n>;\nexport type NetInfoBluetoothState = NetInfoConnectedState<\n NetInfoStateType.bluetooth\n>;\nexport type NetInfoEthernetState = NetInfoConnectedState<\n NetInfoStateType.ethernet,\n {\n ipAddress: string | null;\n subnet: string | null;\n }\n>;\nexport type NetInfoWimaxState = NetInfoConnectedState;\nexport type NetInfoVpnState = NetInfoConnectedState;\nexport type NetInfoOtherState = NetInfoConnectedState;\nexport type NetInfoConnectedStates =\n | NetInfoCellularState\n | NetInfoWifiState\n | NetInfoBluetoothState\n | NetInfoEthernetState\n | NetInfoWimaxState\n | NetInfoVpnState\n | NetInfoOtherState;\n\nexport type NetInfoState = NetInfoDisconnectedStates | NetInfoConnectedStates;\n\nexport type NetInfoChangeHandler = (state: NetInfoState) => void;\nexport type NetInfoSubscription = () => void;\n\nexport interface NetInfoConfiguration {\n reachabilityUrl: string;\n reachabilityMethod?: NetInfoMethodType;\n reachabilityHeaders?: Record;\n reachabilityTest: (response: Response) => Promise;\n reachabilityLongTimeout: number;\n reachabilityShortTimeout: number;\n reachabilityRequestTimeout: number;\n reachabilityShouldRun: () => boolean;\n shouldFetchWiFiSSID: boolean;\n useNativeReachability: boolean;\n}\n"]} +\ No newline at end of file ++{"version":3,"names":["NetInfoStateType","NetInfoCellularGeneration"],"sources":["types.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nexport enum NetInfoStateType {\n unknown = 'unknown',\n none = 'none',\n cellular = 'cellular',\n wifi = 'wifi',\n bluetooth = 'bluetooth',\n ethernet = 'ethernet',\n wimax = 'wimax',\n vpn = 'vpn',\n other = 'other',\n}\n\nexport type NetInfoMethodType = 'HEAD' | 'GET';\n\nexport enum NetInfoCellularGeneration {\n '2g' = '2g',\n '3g' = '3g',\n '4g' = '4g',\n '5g' = '5g',\n}\n\nexport interface NetInfoConnectedDetails {\n isConnectionExpensive: boolean;\n}\n\ninterface NetInfoConnectedState<\n T extends NetInfoStateType,\n D extends Record = Record,\n> {\n type: T;\n isConnected: true;\n isInternetReachable: boolean | null;\n details: D & NetInfoConnectedDetails;\n isWifiEnabled?: boolean;\n}\n\ninterface NetInfoDisconnectedState {\n type: T;\n isConnected: false;\n isInternetReachable: false;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport interface NetInfoUnknownState {\n type: NetInfoStateType.unknown;\n isConnected: boolean | null;\n isInternetReachable: null;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport type NetInfoNoConnectionState =\n NetInfoDisconnectedState;\nexport type NetInfoDisconnectedStates =\n | NetInfoUnknownState\n | NetInfoNoConnectionState;\n\nexport type NetInfoCellularState = NetInfoConnectedState<\n NetInfoStateType.cellular,\n {\n cellularGeneration: NetInfoCellularGeneration | null;\n carrier: string | null;\n }\n>;\nexport type NetInfoWifiState = NetInfoConnectedState<\n NetInfoStateType.wifi,\n {\n ssid: string | null;\n bssid: string | null;\n strength: number | null;\n ipAddress: string | null;\n subnet: string | null;\n frequency: number | null;\n linkSpeed: number | null;\n rxLinkSpeed: number | null;\n txLinkSpeed: number | null;\n }\n>;\nexport type NetInfoBluetoothState =\n NetInfoConnectedState;\nexport type NetInfoEthernetState = NetInfoConnectedState<\n NetInfoStateType.ethernet,\n {\n ipAddress: string | null;\n subnet: string | null;\n }\n>;\nexport type NetInfoWimaxState = NetInfoConnectedState;\nexport type NetInfoVpnState = NetInfoConnectedState;\nexport type NetInfoOtherState = NetInfoConnectedState;\nexport type NetInfoConnectedStates =\n | NetInfoCellularState\n | NetInfoWifiState\n | NetInfoBluetoothState\n | NetInfoEthernetState\n | NetInfoWimaxState\n | NetInfoVpnState\n | NetInfoOtherState;\n\nexport type NetInfoState = NetInfoDisconnectedStates | NetInfoConnectedStates;\n\nexport type NetInfoChangeHandler = (state: NetInfoState) => void;\nexport type NetInfoSubscription = () => void;\n\nexport interface NetInfoConfiguration {\n reachabilityUrl: string;\n reachabilityMethod?: NetInfoMethodType;\n reachabilityHeaders?: Record;\n reachabilityTest: (response: Response) => Promise;\n reachabilityLongTimeout: number;\n reachabilityShortTimeout: number;\n reachabilityRequestTimeout: number;\n reachabilityShouldRun: () => boolean;\n shouldFetchWiFiSSID: boolean;\n useNativeReachability: boolean;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAYA,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;AAc5B,WAAYC,yBAAyB,0BAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAA,OAAzBA,yBAAyB;AAAA"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/typescript/src/internal/NativeRNCNetInfo.d.ts b/node_modules/@react-native-community/netinfo/lib/typescript/src/internal/NativeRNCNetInfo.d.ts +new file mode 100644 +index 0000000..b5db384 +--- /dev/null ++++ b/node_modules/@react-native-community/netinfo/lib/typescript/src/internal/NativeRNCNetInfo.d.ts +@@ -0,0 +1,9 @@ ++import type { TurboModule } from 'react-native'; ++export interface Spec extends TurboModule { ++ configure: (config: Object) => void; ++ getCurrentState(requestedInterface?: string): Promise; ++ addListener: (eventName: string) => void; ++ removeListeners: (count: number) => void; ++} ++declare const _default: Spec; ++export default _default; +diff --git a/node_modules/@react-native-community/netinfo/lib/typescript/src/internal/nativeInterface.d.ts b/node_modules/@react-native-community/netinfo/lib/typescript/src/internal/nativeInterface.d.ts +index 6982220..b515270 100644 +--- a/node_modules/@react-native-community/netinfo/lib/typescript/src/internal/nativeInterface.d.ts ++++ b/node_modules/@react-native-community/netinfo/lib/typescript/src/internal/nativeInterface.d.ts +@@ -8,10 +8,10 @@ + */ + import { NativeEventEmitter } from 'react-native'; + declare const _default: { +- eventEmitter: NativeEventEmitter; + configure: (config: Partial) => void; ++ addListener: (type: K, listener: (event: import("./privateTypes").Events[K]) => void) => void; ++ removeListeners: (type: K_1, listener: (event: import("./privateTypes").Events[K_1]) => void) => void; + getCurrentState: (requestedInterface?: string | undefined) => Promise; +- addListener(type: K, listener: (event: import("./privateTypes").Events[K]) => void): void; +- removeListeners(type: K_1, listener: (event: import("./privateTypes").Events[K_1]) => void): void; ++ readonly eventEmitter: NativeEventEmitter; + }; + export default _default; +diff --git a/node_modules/@react-native-community/netinfo/package.json b/node_modules/@react-native-community/netinfo/package.json +index 3c80db2..15d214d 100644 +--- a/node_modules/@react-native-community/netinfo/package.json ++++ b/node_modules/@react-native-community/netinfo/package.json +@@ -97,6 +97,14 @@ + "webpack-cli": "^3.3.10", + "webpack-dev-server": "^3.11.3" + }, ++ "codegenConfig": { ++ "name": "RNCNetInfoSpec", ++ "type": "modules", ++ "jsSrcsDir": "src/internal", ++ "android": { ++ "javaPackageName": "com.reactnativecommunity.netinfo" ++ } ++ }, + "repository": { + "type": "git", + "url": "https://github.com/react-native-netinfo/react-native-netinfo.git" +diff --git a/node_modules/@react-native-community/netinfo/react-native-netinfo.podspec b/node_modules/@react-native-community/netinfo/react-native-netinfo.podspec +index e34e728..9090eb1 100644 +--- a/node_modules/@react-native-community/netinfo/react-native-netinfo.podspec ++++ b/node_modules/@react-native-community/netinfo/react-native-netinfo.podspec +@@ -2,6 +2,8 @@ require 'json' + + package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) + ++is_new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1' ++ + Pod::Spec.new do |s| + s.name = "react-native-netinfo" + s.version = package['version'] +@@ -13,7 +15,11 @@ Pod::Spec.new do |s| + s.platforms = { :ios => "9.0", :tvos => "9.2", :osx => "10.14" } + + s.source = { :git => "https://github.com/react-native-community/react-native-netinfo.git", :tag => "v#{s.version}" } +- s.source_files = "ios/**/*.{h,m}" ++ s.source_files = "ios/**/*.{h,m,mm,swift}" + +- s.dependency 'React-Core' ++ if is_new_arch_enabled ++ install_modules_dependencies(s) ++ else ++ s.dependency 'React-Core' ++ end + end +diff --git a/node_modules/@react-native-community/netinfo/src/__tests__/eventListenerCallbacks.spec.ts b/node_modules/@react-native-community/netinfo/src/__tests__/eventListenerCallbacks.spec.ts +index 4ba58e9..9f87df7 100644 +--- a/node_modules/@react-native-community/netinfo/src/__tests__/eventListenerCallbacks.spec.ts ++++ b/node_modules/@react-native-community/netinfo/src/__tests__/eventListenerCallbacks.spec.ts +@@ -32,7 +32,7 @@ beforeAll(() => { + + describe('@react-native-community/netinfo listener', () => { + describe('Event listener callbacks', () => { +- it('should call the listener on listening', done => { ++ it('should call the listener on listening', (done) => { + const listener = jest.fn(); + NetInfo.addEventListener(listener); + +@@ -42,7 +42,7 @@ describe('@react-native-community/netinfo listener', () => { + }, 0); + }); + +- it('should call the listener on listening with multiple listeners', done => { ++ it('should call the listener on listening with multiple listeners', (done) => { + const listener1 = jest.fn(); + const listener2 = jest.fn(); + NetInfo.addEventListener(listener1); +@@ -303,7 +303,7 @@ describe('@react-native-community/netinfo listener', () => { + ]; + } + +- dataProvider().forEach(testCase => { ++ dataProvider().forEach((testCase) => { + it(testCase.description, () => { + NetInfo.configure(testCase.configuration); + +diff --git a/node_modules/@react-native-community/netinfo/src/__tests__/fetch.spec.ts b/node_modules/@react-native-community/netinfo/src/__tests__/fetch.spec.ts +index 4b56e4f..b790659 100644 +--- a/node_modules/@react-native-community/netinfo/src/__tests__/fetch.spec.ts ++++ b/node_modules/@react-native-community/netinfo/src/__tests__/fetch.spec.ts +@@ -69,7 +69,7 @@ describe('@react-native-community/netinfo fetch', () => { + ]; + } + +- dataProvider().forEach(testCase => { ++ dataProvider().forEach((testCase) => { + it(testCase.description, () => { + mockNativeModule.getCurrentState.mockResolvedValue( + testCase.expectedConnectionInfo, +@@ -131,7 +131,7 @@ describe('@react-native-community/netinfo fetch', () => { + ]; + } + +- dataProvider().forEach(testCase => { ++ dataProvider().forEach((testCase) => { + it(testCase.description, () => { + mockNativeModule.getCurrentState.mockResolvedValue( + testCase.expectedConnectionInfo, +@@ -193,7 +193,7 @@ describe('@react-native-community/netinfo fetch', () => { + ]; + } + +- dataProvider().forEach(testCase => { ++ dataProvider().forEach((testCase) => { + it(testCase.description, () => { + mockNativeModule.getCurrentState.mockResolvedValue( + testCase.expectedConnectionInfo, +@@ -255,7 +255,7 @@ describe('@react-native-community/netinfo fetch', () => { + ]; + } + +- dataProvider().forEach(testCase => { ++ dataProvider().forEach((testCase) => { + it(testCase.description, () => { + mockNativeModule.getCurrentState.mockResolvedValue( + testCase.expectedConnectionInfo, +@@ -317,7 +317,7 @@ describe('@react-native-community/netinfo fetch', () => { + ]; + } + +- dataProvider().forEach(testCase => { ++ dataProvider().forEach((testCase) => { + it(testCase.description, () => { + mockNativeModule.getCurrentState.mockResolvedValue( + testCase.expectedConnectionInfo, +@@ -361,7 +361,7 @@ describe('@react-native-community/netinfo fetch', () => { + ]; + } + +- dataProvider().forEach(testCase => { ++ dataProvider().forEach((testCase) => { + it(testCase.description, () => { + mockNativeModule.getCurrentState.mockResolvedValue( + testCase.expectedConnectionInfo, +@@ -455,7 +455,7 @@ describe('@react-native-community/netinfo fetch', () => { + ]; + } + +- dataProvider().forEach(testCase => { ++ dataProvider().forEach((testCase) => { + it(testCase.description, async () => { + mockNativeModule.getCurrentState.mockResolvedValue( + testCase.expectedConnectionInfo, +diff --git a/node_modules/@react-native-community/netinfo/src/internal/NativeRNCNetInfo.ts b/node_modules/@react-native-community/netinfo/src/internal/NativeRNCNetInfo.ts +new file mode 100644 +index 0000000..deada41 +--- /dev/null ++++ b/node_modules/@react-native-community/netinfo/src/internal/NativeRNCNetInfo.ts +@@ -0,0 +1,14 @@ ++/* eslint-disable @typescript-eslint/ban-types */ ++import type { TurboModule } from 'react-native'; ++import { TurboModuleRegistry } from 'react-native'; ++ ++export interface Spec extends TurboModule { ++ configure: (config: Object) => void; ++ getCurrentState(requestedInterface?: string): Promise; ++ // Events ++ addListener: (eventName: string) => void; ++ removeListeners: (count: number) => void; ++} ++ ++export default TurboModuleRegistry.getEnforcing('RNCNetInfo'); ++ +diff --git a/node_modules/@react-native-community/netinfo/src/internal/internetReachability.ts b/node_modules/@react-native-community/netinfo/src/internal/internetReachability.ts +index 5cf797b..f9940a5 100644 +--- a/node_modules/@react-native-community/netinfo/src/internal/internetReachability.ts ++++ b/node_modules/@react-native-community/netinfo/src/internal/internetReachability.ts +@@ -19,7 +19,8 @@ export default class InternetReachability { + private _configuration: Types.NetInfoConfiguration; + private _listener: PrivateTypes.NetInfoInternetReachabilityChangeListener; + private _isInternetReachable: boolean | null | undefined = undefined; +- private _currentInternetReachabilityCheckHandler: InternetReachabilityCheckHandler | null = null; ++ private _currentInternetReachabilityCheckHandler: InternetReachabilityCheckHandler | null = ++ null; + private _currentTimeoutHandle: ReturnType | null = null; + + constructor( +@@ -60,7 +61,8 @@ export default class InternetReachability { + this._setIsInternetReachable(null); + } + // Start a network request to check for internet +- this._currentInternetReachabilityCheckHandler = this._checkInternetReachability(); ++ this._currentInternetReachabilityCheckHandler = ++ this._checkInternetReachability(); + } else { + // If we don't expect a connection or don't run reachability check, just change the state to "false" + this._setIsInternetReachable(false); +@@ -79,9 +81,9 @@ export default class InternetReachability { + + // Create promise that will reject after the request timeout has been reached + let timeoutHandle: ReturnType; +- const timeoutPromise = new Promise((): void => { ++ const timeoutPromise = new Promise((_, reject): void => { + timeoutHandle = setTimeout( +- (): void => controller.abort('timedout'), ++ (): void => reject('timedout'), + this._configuration.reachabilityRequestTimeout, + ); + }); +@@ -98,28 +100,37 @@ export default class InternetReachability { + timeoutPromise, + cancelPromise, + ]) +- .then( +- (response): Promise => { +- return this._configuration.reachabilityTest(response); +- }, +- ) +- .then( +- (result): void => { +- this._setIsInternetReachable(result); +- const nextTimeoutInterval = this._isInternetReachable +- ? this._configuration.reachabilityLongTimeout +- : this._configuration.reachabilityShortTimeout; ++ .then((response): Promise => { ++ return this._configuration.reachabilityTest(response); ++ }) ++ .then((result): void => { ++ this._setIsInternetReachable(result); ++ const nextTimeoutInterval = this._isInternetReachable ++ ? this._configuration.reachabilityLongTimeout ++ : this._configuration.reachabilityShortTimeout; ++ this._currentTimeoutHandle = setTimeout( ++ this._checkInternetReachability, ++ nextTimeoutInterval, ++ ); ++ }) ++ .catch((error: Error | 'timedout' | 'canceled'): void => { ++ if (error !== 'canceled') { ++ this._setIsInternetReachable(false); + this._currentTimeoutHandle = setTimeout( + this._checkInternetReachability, +- nextTimeoutInterval, ++ this._configuration.reachabilityShortTimeout, + ); +- }, +- ) ++ } ++ }) + .catch( + (error: Error | 'timedout' | 'canceled'): void => { + if ('canceled' === error) { + controller.abort(); + } else { ++ if ('timedout' === error) { ++ controller.abort(); ++ } ++ + this._setIsInternetReachable(false); + this._currentTimeoutHandle = setTimeout( + this._checkInternetReachability, +diff --git a/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.ts b/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.ts +index c0d9ec4..912a903 100644 +--- a/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.ts ++++ b/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.ts +@@ -28,8 +28,12 @@ If none of these fix the issue, please open an issue on the Github repository: h + * JavaScript code and the tests + */ + let nativeEventEmitter: NativeEventEmitter | null = null; ++ + export default { +- ...RNCNetInfo, ++ configure: RNCNetInfo.configure, ++ addListener: RNCNetInfo.addListener, ++ removeListeners: RNCNetInfo.removeListeners, ++ getCurrentState: RNCNetInfo.getCurrentState, + get eventEmitter(): NativeEventEmitter { + if (!nativeEventEmitter) { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment +diff --git a/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.web.ts b/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.web.ts +index b665235..41863a4 100644 +--- a/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.web.ts ++++ b/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.web.ts +@@ -14,12 +14,9 @@ import {DEVICE_CONNECTIVITY_EVENT} from './privateTypes'; + const nativeEventEmitter = new NativeEventEmitter(); + + // Listen to connectivity events +-RNCNetInfo.addListener( +- DEVICE_CONNECTIVITY_EVENT, +- (event): void => { +- nativeEventEmitter.emit(DEVICE_CONNECTIVITY_EVENT, event); +- }, +-); ++RNCNetInfo.addListener(DEVICE_CONNECTIVITY_EVENT, (event): void => { ++ nativeEventEmitter.emit(DEVICE_CONNECTIVITY_EVENT, event); ++}); + + export default { + ...RNCNetInfo, +diff --git a/node_modules/@react-native-community/netinfo/src/internal/nativeModule.ts b/node_modules/@react-native-community/netinfo/src/internal/nativeModule.ts +index 206a69a..7aff149 100644 +--- a/node_modules/@react-native-community/netinfo/src/internal/nativeModule.ts ++++ b/node_modules/@react-native-community/netinfo/src/internal/nativeModule.ts +@@ -10,6 +10,16 @@ + import {NativeModules} from 'react-native'; + import {NetInfoNativeModule} from './privateTypes'; + +-const RNCNetInfo: NetInfoNativeModule = NativeModules.RNCNetInfo; ++// React Native sets `__turboModuleProxy` on global when TurboModules are enabled. ++// Currently, this is the recommended way to detect TurboModules. ++// https://reactnative.dev/docs/the-new-architecture/backward-compatibility-turbomodules#unify-the-javascript-specs ++// eslint-disable-next-line @typescript-eslint/ban-ts-comment ++// @ts-ignore ++const isTurboModuleEnabled = global.__turboModuleProxy != null; ++ ++const RNCNetInfo: NetInfoNativeModule = isTurboModuleEnabled ++ ? // eslint-disable-next-line @typescript-eslint/no-var-requires ++ require('./NativeRNCNetInfo').default ++ : NativeModules.RNCNetInfo; + + export default RNCNetInfo; +diff --git a/node_modules/@react-native-community/netinfo/src/internal/types.ts b/node_modules/@react-native-community/netinfo/src/internal/types.ts +index 427db82..6a8f94a 100644 +--- a/node_modules/@react-native-community/netinfo/src/internal/types.ts ++++ b/node_modules/@react-native-community/netinfo/src/internal/types.ts +@@ -34,7 +34,7 @@ export interface NetInfoConnectedDetails { + + interface NetInfoConnectedState< + T extends NetInfoStateType, +- D extends Record = Record ++ D extends Record = Record, + > { + type: T; + isConnected: true; +@@ -59,9 +59,8 @@ export interface NetInfoUnknownState { + isWifiEnabled?: boolean; + } + +-export type NetInfoNoConnectionState = NetInfoDisconnectedState< +- NetInfoStateType.none +->; ++export type NetInfoNoConnectionState = ++ NetInfoDisconnectedState; + export type NetInfoDisconnectedStates = + | NetInfoUnknownState + | NetInfoNoConnectionState; +@@ -87,9 +86,8 @@ export type NetInfoWifiState = NetInfoConnectedState< + txLinkSpeed: number | null; + } + >; +-export type NetInfoBluetoothState = NetInfoConnectedState< +- NetInfoStateType.bluetooth +->; ++export type NetInfoBluetoothState = ++ NetInfoConnectedState; + export type NetInfoEthernetState = NetInfoConnectedState< + NetInfoStateType.ethernet, + { +diff --git a/node_modules/@react-native-community/netinfo/windows/.npmignore b/node_modules/@react-native-community/netinfo/windows/.npmignore +deleted file mode 100644 +index 878f7ba..0000000 +--- a/node_modules/@react-native-community/netinfo/windows/.npmignore ++++ /dev/null +@@ -1,92 +0,0 @@ +-*AppPackages* +-*BundleArtifacts* +- +-#OS junk files +-[Tt]humbs.db +-*.DS_Store +- +-#Visual Studio files +-*.[Oo]bj +-*.user +-*.aps +-*.pch +-*.vspscc +-*.vssscc +-*_i.c +-*_p.c +-*.ncb +-*.suo +-*.tlb +-*.tlh +-*.bak +-*.[Cc]ache +-*.ilk +-*.log +-*.lib +-*.sbr +-*.sdf +-*.opensdf +-*.opendb +-*.unsuccessfulbuild +-ipch/ +-[Oo]bj/ +-[Bb]in +-[Dd]ebug*/ +-[Rr]elease*/ +-Ankh.NoLoad +- +-# Visual C++ cache files +-ipch/ +-*.aps +-*.ncb +-*.opendb +-*.opensdf +-*.sdf +-*.cachefile +-*.VC.db +-*.VC.VC.opendb +- +-#MonoDevelop +-*.pidb +-*.userprefs +- +-#Tooling +-_ReSharper*/ +-*.resharper +-[Tt]est[Rr]esult* +-*.sass-cache +- +-#Project files +-[Bb]uild/ +- +-#Subversion files +-.svn +- +-# Office Temp Files +-~$* +- +-# vim Temp Files +-*~ +- +-#NuGet +-packages/ +-*.nupkg +- +-#ncrunch +-*ncrunch* +-*crunch*.local.xml +- +-# visual studio database projects +-*.dbmdl +- +-#Test files +-*.testsettings +- +-#Other files +-*.DotSettings +-.vs/ +-*project.lock.json +- +-#Files generated by the VS build +-**/Generated Files/** +- diff --git a/patches/@react-native-community/netinfo/details.md b/patches/@react-native-community/netinfo/details.md new file mode 100644 index 000000000000..3c6d6ce215b6 --- /dev/null +++ b/patches/@react-native-community/netinfo/details.md @@ -0,0 +1,25 @@ +# `@react-native-community/netinfo` patches + +### [@react-native-community+netinfo+11.4.1+001+initial.patch](@react-native-community+netinfo+11.4.1+001+initial.patch) + +- Reason: + + ``` + This patch makes the library support new architecture. It deliberately renames the file before modifying it to avoid this known issue: https://github.com/ds300/patch-package/issues/518 + ``` + +- Upstream PR/issue: https://github.com/react-native-netinfo/react-native-netinfo/pull/655 +- E/App issue: https://github.com/Expensify/App/issues/8503 +- PR introducing patch: https://github.com/Expensify/App/pull/13767 + +### [@react-native-community+netinfo+11.4.1+002+turbomodule.patch](@react-native-community+netinfo+11.4.1+002+turbomodule.patch) + +- Reason: + + ``` + This patch makes the library support new architecture. + ``` + +- Upstream PR/issue: https://github.com/react-native-netinfo/react-native-netinfo/pull/655 +- E/App issue: https://github.com/Expensify/App/issues/8503 +- PR introducing patch: https://github.com/Expensify/App/pull/13767 \ No newline at end of file From 7f50b1aecd04b1c5470d61f668b222253f4e9d62 Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Sat, 29 Nov 2025 15:55:16 +0530 Subject: [PATCH 06/12] update Podfile. Signed-off-by: krishna2323 --- ios/Podfile.lock | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 65b2a53628fe..1bc91aa0d86a 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2551,7 +2551,33 @@ PODS: - react-native-launch-arguments (4.0.2): - React - react-native-netinfo (11.4.1): + - boost + - DoubleConversion + - fast_float + - fmt + - glog + - hermes-engine + - RCT-Folly + - RCT-Folly/Fabric + - RCTRequired + - RCTTypeSafety - React-Core + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-renderercss + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - SocketRocket + - Yoga - react-native-pager-view (6.9.1): - boost - DoubleConversion From 6dce598233d708963d549ad95a9eb33adccef44f Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Sun, 14 Dec 2025 01:37:39 +0530 Subject: [PATCH 07/12] fix merge conflicts. Signed-off-by: krishna2323 --- package-lock.json | 6 ++---- package.json | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index d3c24bbceae8..b724b79805ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,7 +38,7 @@ "@react-native-camera-roll/camera-roll": "7.4.0", "@react-native-clipboard/clipboard": "^1.15.0", "@react-native-community/geolocation": "3.3.0", - "@react-native-community/netinfo": "^11.4.1", + "@react-native-community/netinfo": "11.2.1", "@react-native-documents/picker": "^10.1.3", "@react-native-firebase/analytics": "^22.2.1", "@react-native-firebase/app": "^22.2.1", @@ -11717,9 +11717,7 @@ } }, "node_modules/@react-native-community/netinfo": { - "version": "11.4.1", - "resolved": "https://registry.npmjs.org/@react-native-community/netinfo/-/netinfo-11.4.1.tgz", - "integrity": "sha512-B0BYAkghz3Q2V09BF88RA601XursIEA111tnc2JOaN7axJWmNefmfjZqw/KdSxKZp7CZUuPpjBmz/WCR9uaHYg==", + "version": "11.2.1", "license": "MIT", "peerDependencies": { "react-native": ">=0.59" diff --git a/package.json b/package.json index 03988ebba4d3..9ef6b53a7f9b 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "@react-native-camera-roll/camera-roll": "7.4.0", "@react-native-clipboard/clipboard": "^1.15.0", "@react-native-community/geolocation": "3.3.0", - "@react-native-community/netinfo": "^11.4.1", + "@react-native-community/netinfo": "11.2.1", "@react-native-documents/picker": "^10.1.3", "@react-native-firebase/analytics": "^22.2.1", "@react-native-firebase/app": "^22.2.1", From 8c92da9bab85f7e692ceae25c661a15a90827a55 Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Sun, 14 Dec 2025 04:00:55 +0530 Subject: [PATCH 08/12] update patch file. Signed-off-by: krishna2323 --- package-lock.json | 8 +- package.json | 2 +- ...unity+netinfo+11.4.1+002+turbomodule.patch | 2648 +++-------------- 3 files changed, 502 insertions(+), 2156 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3668c4ba0ae3..dbac6a3c118a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "@pusher/pusher-websocket-react-native": "^1.3.1", "@react-native-camera-roll/camera-roll": "7.4.0", "@react-native-clipboard/clipboard": "^1.15.0", - "@react-native-community/netinfo": "11.2.1", + "@react-native-community/netinfo": "11.4.1", "@react-native-documents/picker": "^10.1.3", "@react-native-firebase/analytics": "^22.2.1", "@react-native-firebase/app": "^22.2.1", @@ -11699,14 +11699,16 @@ }, "node_modules/@react-native-community/cli/node_modules/universalify": { "version": "0.1.2", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">= 4.0.0" } }, "node_modules/@react-native-community/netinfo": { - "version": "11.2.1", + "version": "11.4.1", + "resolved": "https://registry.npmjs.org/@react-native-community/netinfo/-/netinfo-11.4.1.tgz", + "integrity": "sha512-B0BYAkghz3Q2V09BF88RA601XursIEA111tnc2JOaN7axJWmNefmfjZqw/KdSxKZp7CZUuPpjBmz/WCR9uaHYg==", "license": "MIT", "peerDependencies": { "react-native": ">=0.59" diff --git a/package.json b/package.json index af8b6abcf48e..9d5ea982ff5a 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "@pusher/pusher-websocket-react-native": "^1.3.1", "@react-native-camera-roll/camera-roll": "7.4.0", "@react-native-clipboard/clipboard": "^1.15.0", - "@react-native-community/netinfo": "11.2.1", + "@react-native-community/netinfo": "11.4.1", "@react-native-documents/picker": "^10.1.3", "@react-native-firebase/analytics": "^22.2.1", "@react-native-firebase/app": "^22.2.1", diff --git a/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.4.1+002+turbomodule.patch b/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.4.1+002+turbomodule.patch index 99e8108f8822..037741958c7f 100644 --- a/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.4.1+002+turbomodule.patch +++ b/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.4.1+002+turbomodule.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/@react-native-community/netinfo/android/build.gradle b/node_modules/@react-native-community/netinfo/android/build.gradle -index 0d617ed..97439e6 100644 +index 36757f7..7b098fd 100644 --- a/node_modules/@react-native-community/netinfo/android/build.gradle +++ b/node_modules/@react-native-community/netinfo/android/build.gradle @@ -3,9 +3,10 @@ buildscript { @@ -16,7 +16,7 @@ index 0d617ed..97439e6 100644 } dependencies { -@@ -26,8 +27,54 @@ def getExtOrIntegerDefault(name) { +@@ -26,8 +27,53 @@ def getExtOrIntegerDefault(name) { return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['ReactNativeNetInfo_' + name]).toInteger() } @@ -60,7 +60,6 @@ index 0d617ed..97439e6 100644 + + return REACT_NATIVE_MINOR_VERSION +} -+ + apply plugin: 'com.android.library' @@ -71,7 +70,7 @@ index 0d617ed..97439e6 100644 android { compileSdkVersion getExtOrIntegerDefault('compileSdkVersion') -@@ -45,10 +92,21 @@ android { +@@ -45,6 +91,16 @@ android { defaultConfig { minSdkVersion getExtOrIntegerDefault('minSdkVersion') targetSdkVersion getExtOrIntegerDefault('targetSdkVersion') @@ -88,12 +87,7 @@ index 0d617ed..97439e6 100644 } lintOptions{ abortOnError false - } -+ - } - - repositories { -@@ -63,6 +121,9 @@ repositories { +@@ -72,6 +128,9 @@ repositories { dependencies { //noinspection GradleDynamicVersion @@ -105,84 +99,212 @@ index 0d617ed..97439e6 100644 + implementation 'com.facebook.react:react-native:+' + } } -diff --git a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java -index 2c3280b..52ea692 100644 ---- a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java -+++ b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java -@@ -9,13 +9,11 @@ package com.reactnativecommunity.netinfo; - import android.os.Build; - import com.facebook.react.bridge.Promise; +diff --git a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModule.java b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModule.java +index 626134a..c6b15a0 100644 +--- a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModule.java ++++ b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModule.java +@@ -1,88 +1,51 @@ +-/** +- * Copyright (c) Facebook, Inc. and its affiliates. +- * +- * This source code is licensed under the MIT license found in the +- * LICENSE file in the root directory of this source tree. +- */ + package com.reactnativecommunity.netinfo; + +-import android.os.Build; +-import com.facebook.react.bridge.Promise; import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.bridge.ReactContextBaseJavaModule; ++import com.facebook.react.bridge.Promise; import com.facebook.react.bridge.ReactMethod; - import com.facebook.react.module.annotations.ReactModule; - - /** Module that monitors and provides information about the connectivity state of the device. */ +-import com.facebook.react.module.annotations.ReactModule; +- +-/** Module that monitors and provides information about the connectivity state of the device. */ -@ReactModule(name = NetInfoModule.NAME) -public class NetInfoModule extends ReactContextBaseJavaModule implements AmazonFireDeviceConnectivityPoller.ConnectivityChangedCallback { -+public class NetInfoModuleImpl implements AmazonFireDeviceConnectivityPoller.ConnectivityChangedCallback { - public static final String NAME = "RNCNetInfo"; +- public static final String NAME = "RNCNetInfo"; ++import com.facebook.react.bridge.ReadableMap; - private final ConnectivityReceiver mConnectivityReceiver; -@@ -23,8 +21,7 @@ public class NetInfoModule extends ReactContextBaseJavaModule implements AmazonF +- private final ConnectivityReceiver mConnectivityReceiver; +- private final AmazonFireDeviceConnectivityPoller mAmazonConnectivityChecker; ++public class NetInfoModule extends NativeRNCNetInfoSpec { - private int numberOfListeners = 0; +- private int numberOfListeners = 0; ++ private NetInfoModuleImpl implementation; - public NetInfoModule(ReactApplicationContext reactContext) { - super(reactContext); -+ public NetInfoModuleImpl(ReactApplicationContext reactContext) { - // Create the connectivity receiver based on the API level we are running on - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { - mConnectivityReceiver = new NetworkCallbackConnectivityReceiver(reactContext); -@@ -35,23 +32,17 @@ public class NetInfoModule extends ReactContextBaseJavaModule implements AmazonF - mAmazonConnectivityChecker = new AmazonFireDeviceConnectivityPoller(reactContext, this); - } - -- @Override -+ - public void initialize() { - mConnectivityReceiver.register(); - mAmazonConnectivityChecker.register(); - } - +- // Create the connectivity receiver based on the API level we are running on +- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { +- mConnectivityReceiver = new NetworkCallbackConnectivityReceiver(reactContext); +- } else { +- mConnectivityReceiver = new BroadcastReceiverConnectivityReceiver(reactContext); +- } +- +- mAmazonConnectivityChecker = new AmazonFireDeviceConnectivityPoller(reactContext, this); +- } +- - @Override +- public void initialize() { +- mConnectivityReceiver.register(); +- mAmazonConnectivityChecker.register(); +- } +- +- // the upstream method was removed in react-native 0.74 +- // this stub remains for backwards compatibility so that react-native < 0.74 +- // (which will still call onCatalystInstanceDestroy) will continue to function - public void onCatalystInstanceDestroy() { -+ public void invalidate() { - mAmazonConnectivityChecker.unregister(); - mConnectivityReceiver.unregister(); +- invalidate(); +- } +- +- // This should have an `@Override` tag, but the method does not exist until +- // react-native >= 0.74, which would cause linting errors across versions +- // once minimum supported react-native here is 0.74+, add the tag +- public void invalidate() { +- mAmazonConnectivityChecker.unregister(); +- mConnectivityReceiver.unregister(); - mConnectivityReceiver.hasListener = false; ++ NetInfoModule(ReactApplicationContext context) { ++ super(context); ++ implementation = new NetInfoModuleImpl(context); } -- @Override -- public String getName() { + @Override + public String getName() { - return NAME; -- } ++ return NetInfoModuleImpl.NAME; + } @ReactMethod public void getCurrentState(final String requestedInterface, final Promise promise) { -@@ -63,14 +54,14 @@ public class NetInfoModule extends ReactContextBaseJavaModule implements AmazonF - mConnectivityReceiver.setIsInternetReachableOverride(isConnected); +- mConnectivityReceiver.getCurrentState(requestedInterface, promise); ++ implementation.getCurrentState(requestedInterface, promise); } -- @ReactMethod -+ +- @Override +- public void onAmazonFireDeviceConnectivityChanged(boolean isConnected) { +- mConnectivityReceiver.setIsInternetReachableOverride(isConnected); ++ @ReactMethod ++ public void configure(ReadableMap config) { ++ // iOS only + } + + @ReactMethod public void addListener(String eventName) { - numberOfListeners++; - mConnectivityReceiver.hasListener = true; +- numberOfListeners++; +- mConnectivityReceiver.hasListener = true; ++ implementation.addListener(eventName); } -- @ReactMethod + @ReactMethod - public void removeListeners(Integer count) { +- numberOfListeners -= count; +- if (numberOfListeners == 0) { +- mConnectivityReceiver.hasListener = false; +- } ++ public void removeListeners(double count) { ++ implementation.removeListeners(count); ++ } ++ ++ @Override ++ public void invalidate() { ++ implementation.invalidate(); ++ } ++ ++ @Override ++ public void initialize() { ++ implementation.initialize(); + } + } +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java +new file mode 100644 +index 0000000..a5d3a36 +--- /dev/null ++++ b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java +@@ -0,0 +1,76 @@ ++/** ++ * Copyright (c) Facebook, Inc. and its affiliates. ++ * ++ * This source code is licensed under the MIT license found in the ++ * LICENSE file in the root directory of this source tree. ++ */ ++package com.reactnativecommunity.netinfo; ++ ++import android.os.Build; ++import com.facebook.react.bridge.Promise; ++import com.facebook.react.bridge.ReactApplicationContext; ++import com.facebook.react.bridge.ReactMethod; ++import com.facebook.react.module.annotations.ReactModule; ++ ++/** Module that monitors and provides information about the connectivity state of the device. */ ++public class NetInfoModuleImpl implements AmazonFireDeviceConnectivityPoller.ConnectivityChangedCallback { ++ public static final String NAME = "RNCNetInfo"; ++ ++ private final ConnectivityReceiver mConnectivityReceiver; ++ private final AmazonFireDeviceConnectivityPoller mAmazonConnectivityChecker; ++ ++ private int numberOfListeners = 0; ++ ++ public NetInfoModuleImpl(ReactApplicationContext reactContext) { ++ // Create the connectivity receiver based on the API level we are running on ++ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { ++ mConnectivityReceiver = new NetworkCallbackConnectivityReceiver(reactContext); ++ } else { ++ mConnectivityReceiver = new BroadcastReceiverConnectivityReceiver(reactContext); ++ } ++ ++ mAmazonConnectivityChecker = new AmazonFireDeviceConnectivityPoller(reactContext, this); ++ } ++ ++ public void initialize() { ++ mConnectivityReceiver.register(); ++ mAmazonConnectivityChecker.register(); ++ } ++ ++ // the upstream method was removed in react-native 0.74 ++ // this stub remains for backwards compatibility so that react-native < 0.74 ++ // (which will still call onCatalystInstanceDestroy) will continue to function ++ public void onCatalystInstanceDestroy() { ++ invalidate(); ++ } ++ ++ // This should have an `@Override` tag, but the method does not exist until ++ // react-native >= 0.74, which would cause linting errors across versions ++ // once minimum supported react-native here is 0.74+, add the tag ++ public void invalidate() { ++ mAmazonConnectivityChecker.unregister(); ++ mConnectivityReceiver.unregister(); ++ } ++ ++ @ReactMethod ++ public void getCurrentState(final String requestedInterface, final Promise promise) { ++ mConnectivityReceiver.getCurrentState(requestedInterface, promise); ++ } ++ ++ @Override ++ public void onAmazonFireDeviceConnectivityChanged(boolean isConnected) { ++ mConnectivityReceiver.setIsInternetReachableOverride(isConnected); ++ } ++ ++ public void addListener(String eventName) { ++ numberOfListeners++; ++ mConnectivityReceiver.hasListener = true; ++ } + + public void removeListeners(double count) { - numberOfListeners -= count; - if (numberOfListeners == 0) { - mConnectivityReceiver.hasListener = false; ++ numberOfListeners -= count; ++ if (numberOfListeners == 0) { ++ mConnectivityReceiver.hasListener = false; ++ } ++ } ++} diff --git a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoPackage.java b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoPackage.java -index fcd4a5e..1bf0b62 100644 +index fcd4a5e..cc44776 100644 --- a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoPackage.java +++ b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoPackage.java -@@ -1,34 +1,46 @@ +@@ -1,34 +1,44 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * @@ -201,7 +323,6 @@ index fcd4a5e..1bf0b62 100644 +import com.facebook.react.module.model.ReactModuleInfo; +import com.facebook.react.module.model.ReactModuleInfoProvider; +import com.facebook.react.TurboReactPackage; -+ import java.util.Collections; +import java.util.HashMap; import java.util.List; @@ -213,11 +334,6 @@ index fcd4a5e..1bf0b62 100644 - return Arrays.asList(new NetInfoModule(reactContext)); - } +public class NetInfoPackage extends TurboReactPackage { - -- // Deprecated from RN 0.47 -- public List> createJSModules() { -- return Collections.emptyList(); -- } + @Nullable + @Override + public NativeModule getModule(String name, ReactApplicationContext reactContext) { @@ -228,6 +344,11 @@ index fcd4a5e..1bf0b62 100644 + } + } +- // Deprecated from RN 0.47 +- public List> createJSModules() { +- return Collections.emptyList(); +- } +- - @Override - @SuppressWarnings("rawtypes") - public List createViewManagers(ReactApplicationContext reactContext) { @@ -253,66 +374,9 @@ index fcd4a5e..1bf0b62 100644 + }; + } } -diff --git a/node_modules/@react-native-community/netinfo/android/src/newarch/com/reactnativecommunity/netinfo/NetInfoModule.java b/node_modules/@react-native-community/netinfo/android/src/newarch/com/reactnativecommunity/netinfo/NetInfoModule.java -new file mode 100644 -index 0000000..26c83b6 ---- /dev/null -+++ b/node_modules/@react-native-community/netinfo/android/src/newarch/com/reactnativecommunity/netinfo/NetInfoModule.java -@@ -0,0 +1,51 @@ -+package com.reactnativecommunity.netinfo; -+ -+import com.facebook.react.bridge.ReactApplicationContext; -+import com.facebook.react.bridge.Promise; -+import com.facebook.react.bridge.ReactMethod; -+import com.facebook.react.bridge.ReadableMap; -+ -+public class NetInfoModule extends NativeRNCNetInfoSpec { -+ -+ private NetInfoModuleImpl implementation; -+ -+ NetInfoModule(ReactApplicationContext context) { -+ super(context); -+ implementation = new NetInfoModuleImpl(context); -+ } -+ -+ @Override -+ public String getName() { -+ return NetInfoModuleImpl.NAME; -+ } -+ -+ @ReactMethod -+ public void getCurrentState(final String requestedInterface, final Promise promise) { -+ implementation.getCurrentState(requestedInterface, promise); -+ } -+ -+ @ReactMethod -+ public void configure(ReadableMap config) { -+ // iOS only -+ } -+ -+ @ReactMethod -+ public void addListener(String eventName) { -+ implementation.addListener(eventName); -+ } -+ -+ @ReactMethod -+ public void removeListeners(double count) { -+ implementation.removeListeners(count); -+ } -+ -+ @Override -+ public void invalidate() { -+ implementation.invalidate(); -+ } -+ -+ @Override -+ public void initialize() { -+ implementation.initialize(); -+ } -+} diff --git a/node_modules/@react-native-community/netinfo/android/src/oldarch/com/reactnativecommunity/netinfo/NetInfoModule.java b/node_modules/@react-native-community/netinfo/android/src/oldarch/com/reactnativecommunity/netinfo/NetInfoModule.java new file mode 100644 -index 0000000..c61a84d +index 0000000..2c5256e --- /dev/null +++ b/node_modules/@react-native-community/netinfo/android/src/oldarch/com/reactnativecommunity/netinfo/NetInfoModule.java @@ -0,0 +1,59 @@ @@ -375,9 +439,13 @@ index 0000000..c61a84d + implementation.removeListeners(count); + } +} -diff --git a/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm b/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm -index e83b8c4..47fc8bb 100644 ---- a/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.m b/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm +similarity index 93% +rename from node_modules/@react-native-community/netinfo/ios/RNCNetInfo.m +rename to node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm +index ee759ba..3822258 100644 +--- a/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.m +++ b/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm @@ -8,6 +8,10 @@ #import "RNCNetInfo.h" @@ -390,13 +458,12 @@ index e83b8c4..47fc8bb 100644 #include #include -@@ -15,13 +19,18 @@ +@@ -15,13 +19,17 @@ #import #import #endif -@import SystemConfiguration.CaptiveNetwork; +#import -+ #import #import @@ -410,7 +477,7 @@ index e83b8c4..47fc8bb 100644 @property (nonatomic, strong) RNCConnectionStateWatcher *connectionStateWatcher; @property (nonatomic) BOOL isObserving; -@@ -90,13 +99,14 @@ - (void)connectionStateWatcher:(RNCConnectionStateWatcher *)connectionStateWatch +@@ -90,7 +98,7 @@ RCT_EXPORT_MODULE() #pragma mark - Public API @@ -419,14 +486,7 @@ index e83b8c4..47fc8bb 100644 reject:(__unused RCTPromiseRejectBlock)reject) { RNCConnectionState *state = [self.connectionStateWatcher currentState]; - resolve([self currentDictionaryFromUpdateState:state withInterface:requestedInterface]); - } - -+ - RCT_EXPORT_METHOD(configure:(NSDictionary *)config) - { - self.config = config; -@@ -265,4 +275,10 @@ - (NSString *)bssid +@@ -265,4 +273,10 @@ RCT_EXPORT_METHOD(configure:(NSDictionary *)config) } #endif @@ -437,43 +497,11 @@ index e83b8c4..47fc8bb 100644 +#endif + @end -diff --git a/node_modules/@react-native-community/netinfo/jest/netinfo-mock.js b/node_modules/@react-native-community/netinfo/jest/netinfo-mock.js -index 7f5769c..99b1aa3 100644 ---- a/node_modules/@react-native-community/netinfo/jest/netinfo-mock.js -+++ b/node_modules/@react-native-community/netinfo/jest/netinfo-mock.js -@@ -14,18 +14,17 @@ const defaultState = { - }; - - const NetInfoStateType = { -- unknown: "unknown", -- none: "none", -- cellular: "cellular", -- wifi: "wifi", -- bluetooth: "bluetooth", -- ethernet: "ethernet", -- wimax: "wimax", -- vpn: "vpn", -- other: "other", -+ unknown: 'unknown', -+ none: 'none', -+ cellular: 'cellular', -+ wifi: 'wifi', -+ bluetooth: 'bluetooth', -+ ethernet: 'ethernet', -+ wimax: 'wimax', -+ vpn: 'vpn', -+ other: 'other', - }; - -- - const RNCNetInfoMock = { - NetInfoStateType, - configure: jest.fn(), diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/index.js b/node_modules/@react-native-community/netinfo/lib/commonjs/index.js -index f5afe24..8f06bc8 100644 +index 304a6be..08cf9ba 100644 --- a/node_modules/@react-native-community/netinfo/lib/commonjs/index.js +++ b/node_modules/@react-native-community/netinfo/lib/commonjs/index.js -@@ -11,26 +11,19 @@ var _exportNames = { +@@ -11,13 +11,13 @@ var _exportNames = { useNetInfo: true, useNetInfoInstance: true }; @@ -486,212 +514,64 @@ index f5afe24..8f06bc8 100644 exports.useNetInfo = useNetInfo; exports.useNetInfoInstance = useNetInfoInstance; -exports.default = void 0; -- + var _react = require("react"); -- - var _reactNative = require("react-native"); -- - var _defaultConfiguration = _interopRequireDefault(require("./internal/defaultConfiguration")); -- - var _nativeInterface = _interopRequireDefault(require("./internal/nativeInterface")); -- - var _state2 = _interopRequireDefault(require("./internal/state")); -- - var Types = _interopRequireWildcard(require("./internal/types")); -- - Object.keys(Types).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; -@@ -42,13 +35,9 @@ Object.keys(Types).forEach(function (key) { - } + +@@ -43,9 +43,9 @@ Object.keys(Types).forEach(function (key) { }); }); -- + -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -- --function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -- +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } + +-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -- - /** - * Copyright (c) Facebook, Inc. and its affiliates. - * -@@ -57,14 +46,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de - * + +@@ -58,8 +58,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * @format */ -+ // Stores the currently used configuration -let _configuration = _defaultConfiguration.default; // Stores the singleton reference to the state manager +let _configuration = _defaultConfiguration.default; +// Stores the singleton reference to the state manager let _state = null; -- + const createState = () => { - return new _state2.default(_configuration); - }; -+ - /** - * Configures the library with the given configuration. Note that calling this will stop all - * previously added listeners from being called again. It is best to call this right when your -@@ -72,23 +63,20 @@ const createState = () => { - * - * @param configuration The new configuration to set. - */ -- -- - function configure(configuration) { -- _configuration = { ..._defaultConfiguration.default, -+ _configuration = { -+ ..._defaultConfiguration.default, - ...configuration +@@ -234,7 +235,7 @@ function useNetInfoInstance(isPaused = false, configuration) { }; -- - if (_state) { - _state.tearDown(); -- - _state = createState(); - } -- - if (_reactNative.Platform.OS === 'ios') { - _nativeInterface.default.configure(configuration); - } } -+ - /** - * Returns a `Promise` that resolves to a `NetInfoState` object. - * This function operates on the global singleton instance configured using `configure()` -@@ -97,29 +85,25 @@ function configure(configuration) { - * - * @returns A Promise which contains the current connection state. - */ -- -- - function fetch(requestedInterface) { - if (!_state) { - _state = createState(); - } -- - return _state.latest(requestedInterface); - } -+ - /** - * Force-refreshes the internal state of the global singleton managed by this library. - * - * @returns A Promise which contains the updated connection state. - */ -- -- - function refresh() { - if (!_state) { - _state = createState(); - } -- - return _state._fetchCurrentState(); - } -+ - /** - * Subscribe to the global singleton's connection information. The callback is called with a parameter of type - * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener -@@ -131,19 +115,16 @@ function refresh() { - * - * @returns A function which can be called to unsubscribe. - */ -- -- - function addEventListener(listener) { - if (!_state) { - _state = createState(); - } -- - _state.add(listener); -- - return () => { - _state && _state.remove(listener); - }; - } -+ - /** - * A React Hook into this library's singleton which updates when the connection state changes. - * -@@ -151,13 +132,10 @@ function addEventListener(listener) { - * - * @returns The connection state. - */ -- -- - function useNetInfo(configuration) { - if (configuration) { - configure(configuration); - } -- - const [netInfo, setNetInfo] = (0, _react.useState)({ - type: Types.NetInfoStateType.unknown, - isConnected: null, -@@ -169,6 +147,7 @@ function useNetInfo(configuration) { - }, []); - return netInfo; - } -+ - /** - * A React Hook which manages an isolated instance of the network info manager. - * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener, -@@ -178,8 +157,6 @@ function useNetInfo(configuration) { - * - * @returns the netInfo state and a refresh function - */ -- -- - function useNetInfoInstance(isPaused = false, configuration) { - const [networkInfoManager, setNetworkInfoManager] = (0, _react.useState)(); - const [netInfo, setNetInfo] = (0, _react.useState)({ -@@ -192,8 +169,8 @@ function useNetInfoInstance(isPaused = false, configuration) { - if (isPaused) { - return; - } -- -- const config = { ..._defaultConfiguration.default, -+ const config = { -+ ..._defaultConfiguration.default, - ...configuration - }; - const state = new _state2.default(config); -@@ -209,8 +186,7 @@ function useNetInfoInstance(isPaused = false, configuration) { - refresh - }; - } -- --var _default = { -+var _default = exports.default = { - configure, - fetch, - refresh, -@@ -218,5 +194,4 @@ var _default = { - useNetInfo, - useNetInfoInstance - }; --exports.default = _default; - //# sourceMappingURL=index.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/index.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/index.js.map -index c778a40..51f1ed7 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/index.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/index.js.map -@@ -1 +1 @@ --{"version":3,"sources":["index.ts"],"names":["_configuration","DEFAULT_CONFIGURATION","_state","createState","State","configure","configuration","tearDown","Platform","OS","NativeInterface","fetch","requestedInterface","latest","refresh","_fetchCurrentState","addEventListener","listener","add","remove","useNetInfo","netInfo","setNetInfo","type","Types","NetInfoStateType","unknown","isConnected","isInternetReachable","details","useNetInfoInstance","isPaused","networkInfoManager","setNetworkInfoManager","config","state"],"mappings":";;;;;;;;;;;;;;;;;;;;;AASA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAkKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;AAhLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA,IAAIA,cAAc,GAAGC,6BAArB,C,CAEA;;AACA,IAAIC,MAAoB,GAAG,IAA3B;;AACA,MAAMC,WAAW,GAAG,MAAa;AAC/B,SAAO,IAAIC,eAAJ,CAAUJ,cAAV,CAAP;AACD,CAFD;AAIA;AACA;AACA;AAC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ID;;eAIc;AACbT,EAAAA,SADa;AAEbM,EAAAA,KAFa;AAGbG,EAAAA,OAHa;AAIbE,EAAAA,gBAJa;AAKbI,EAAAA,UALa;AAMbU,EAAAA;AANa,C","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {useState, useEffect, useCallback} from 'react';\nimport {Platform} from 'react-native';\nimport DEFAULT_CONFIGURATION from './internal/defaultConfiguration';\nimport NativeInterface from './internal/nativeInterface';\nimport State from './internal/state';\nimport * as Types from './internal/types';\n\n// Stores the currently used configuration\nlet _configuration = DEFAULT_CONFIGURATION;\n\n// Stores the singleton reference to the state manager\nlet _state: State | null = null;\nconst createState = (): State => {\n return new State(_configuration);\n};\n\n/**\n * Configures the library with the given configuration. Note that calling this will stop all\n * previously added listeners from being called again. It is best to call this right when your\n * application is started to avoid issues. The configuration sets up a global singleton instance.\n *\n * @param configuration The new configuration to set.\n */\nexport function configure(\n configuration: Partial,\n): void {\n _configuration = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n\n if (_state) {\n _state.tearDown();\n _state = createState();\n }\n\n if (Platform.OS === 'ios') {\n NativeInterface.configure(configuration);\n }\n}\n\n/**\n * Returns a `Promise` that resolves to a `NetInfoState` object.\n * This function operates on the global singleton instance configured using `configure()`\n *\n * @param [requestedInterface] interface from which to obtain the information\n *\n * @returns A Promise which contains the current connection state.\n */\nexport function fetch(\n requestedInterface?: string,\n): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state.latest(requestedInterface);\n}\n\n/**\n * Force-refreshes the internal state of the global singleton managed by this library.\n *\n * @returns A Promise which contains the updated connection state.\n */\nexport function refresh(): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state._fetchCurrentState();\n}\n\n/**\n * Subscribe to the global singleton's connection information. The callback is called with a parameter of type\n * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener\n * will be called with the latest information soon after you subscribe and then with any\n * subsequent changes afterwards. You should not assume that the listener is called in the same\n * way across devices or platforms.\n *\n * @param listener The listener which is called when the network state changes.\n *\n * @returns A function which can be called to unsubscribe.\n */\nexport function addEventListener(\n listener: Types.NetInfoChangeHandler,\n): Types.NetInfoSubscription {\n if (!_state) {\n _state = createState();\n }\n\n _state.add(listener);\n return (): void => {\n _state && _state.remove(listener);\n };\n}\n\n/**\n * A React Hook into this library's singleton which updates when the connection state changes.\n *\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns The connection state.\n */\nexport function useNetInfo(\n configuration?: Partial,\n): Types.NetInfoState {\n if (configuration) {\n configure(configuration);\n }\n\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect((): (() => void) => {\n return addEventListener(setNetInfo);\n }, []);\n\n return netInfo;\n}\n\n/**\n * A React Hook which manages an isolated instance of the network info manager.\n * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener,\n * NetInfo.fetch, NetInfo.refresh are performed on a global singleton and have no affect on this hook.\n * @param {boolean} isPaused - Pause the internal network checks.\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns the netInfo state and a refresh function\n */\nexport function useNetInfoInstance(\n isPaused = false,\n configuration?: Partial,\n) {\n const [networkInfoManager, setNetworkInfoManager] = useState();\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect(() => {\n if (isPaused) {\n return;\n }\n const config = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n const state = new State(config);\n setNetworkInfoManager(state);\n state.add(setNetInfo);\n return state.tearDown;\n }, [isPaused, configuration]);\n\n const refresh = useCallback(() => {\n networkInfoManager && networkInfoManager._fetchCurrentState();\n }, [networkInfoManager]);\n\n return {\n netInfo,\n refresh,\n };\n}\n\nexport * from './internal/types';\n\nexport default {\n configure,\n fetch,\n refresh,\n addEventListener,\n useNetInfo,\n useNetInfoInstance,\n};\n"]} -\ No newline at end of file -+{"version":3,"names":["_react","require","_reactNative","_defaultConfiguration","_interopRequireDefault","_nativeInterface","_state2","Types","_interopRequireWildcard","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","n","__proto__","a","getOwnPropertyDescriptor","u","i","set","obj","_configuration","DEFAULT_CONFIGURATION","_state","createState","State","configure","configuration","tearDown","Platform","OS","NativeInterface","fetch","requestedInterface","latest","refresh","_fetchCurrentState","addEventListener","listener","add","remove","useNetInfo","netInfo","setNetInfo","useState","type","NetInfoStateType","unknown","isConnected","isInternetReachable","details","useEffect","useNetInfoInstance","isPaused","networkInfoManager","setNetworkInfoManager","config","state","useCallback","_default"],"sources":["index.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {useState, useEffect, useCallback} from 'react';\nimport {Platform} from 'react-native';\nimport DEFAULT_CONFIGURATION from './internal/defaultConfiguration';\nimport NativeInterface from './internal/nativeInterface';\nimport State from './internal/state';\nimport * as Types from './internal/types';\n\n// Stores the currently used configuration\nlet _configuration = DEFAULT_CONFIGURATION;\n\n// Stores the singleton reference to the state manager\nlet _state: State | null = null;\nconst createState = (): State => {\n return new State(_configuration);\n};\n\n/**\n * Configures the library with the given configuration. Note that calling this will stop all\n * previously added listeners from being called again. It is best to call this right when your\n * application is started to avoid issues. The configuration sets up a global singleton instance.\n *\n * @param configuration The new configuration to set.\n */\nexport function configure(\n configuration: Partial,\n): void {\n _configuration = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n\n if (_state) {\n _state.tearDown();\n _state = createState();\n }\n\n if (Platform.OS === 'ios') {\n NativeInterface.configure(configuration);\n }\n}\n\n/**\n * Returns a `Promise` that resolves to a `NetInfoState` object.\n * This function operates on the global singleton instance configured using `configure()`\n *\n * @param [requestedInterface] interface from which to obtain the information\n *\n * @returns A Promise which contains the current connection state.\n */\nexport function fetch(\n requestedInterface?: string,\n): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state.latest(requestedInterface);\n}\n\n/**\n * Force-refreshes the internal state of the global singleton managed by this library.\n *\n * @returns A Promise which contains the updated connection state.\n */\nexport function refresh(): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state._fetchCurrentState();\n}\n\n/**\n * Subscribe to the global singleton's connection information. The callback is called with a parameter of type\n * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener\n * will be called with the latest information soon after you subscribe and then with any\n * subsequent changes afterwards. You should not assume that the listener is called in the same\n * way across devices or platforms.\n *\n * @param listener The listener which is called when the network state changes.\n *\n * @returns A function which can be called to unsubscribe.\n */\nexport function addEventListener(\n listener: Types.NetInfoChangeHandler,\n): Types.NetInfoSubscription {\n if (!_state) {\n _state = createState();\n }\n\n _state.add(listener);\n return (): void => {\n _state && _state.remove(listener);\n };\n}\n\n/**\n * A React Hook into this library's singleton which updates when the connection state changes.\n *\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns The connection state.\n */\nexport function useNetInfo(\n configuration?: Partial,\n): Types.NetInfoState {\n if (configuration) {\n configure(configuration);\n }\n\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect((): (() => void) => {\n return addEventListener(setNetInfo);\n }, []);\n\n return netInfo;\n}\n\n/**\n * A React Hook which manages an isolated instance of the network info manager.\n * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener,\n * NetInfo.fetch, NetInfo.refresh are performed on a global singleton and have no affect on this hook.\n * @param {boolean} isPaused - Pause the internal network checks.\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns the netInfo state and a refresh function\n */\nexport function useNetInfoInstance(\n isPaused = false,\n configuration?: Partial,\n) {\n const [networkInfoManager, setNetworkInfoManager] = useState();\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect(() => {\n if (isPaused) {\n return;\n }\n const config = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n const state = new State(config);\n setNetworkInfoManager(state);\n state.add(setNetInfo);\n return state.tearDown;\n }, [isPaused, configuration]);\n\n const refresh = useCallback(() => {\n networkInfoManager && networkInfoManager._fetchCurrentState();\n }, [networkInfoManager]);\n\n return {\n netInfo,\n refresh,\n };\n}\n\nexport * from './internal/types';\n\nexport default {\n configure,\n fetch,\n refresh,\n addEventListener,\n useNetInfo,\n useNetInfoInstance,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AASA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,qBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,OAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,KAAA,GAAAC,uBAAA,CAAAP,OAAA;AAkKAQ,MAAA,CAAAC,IAAA,CAAAH,KAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,KAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,KAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AAAiC,SAAAS,yBAAAC,CAAA,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,QAAQ,EAAE1B,aAAa,CAAC,CAAC;EAE7B,MAAMQ,OAAO,GAAG,IAAAuB,kBAAW,EAAC,MAAM;IAChCJ,kBAAkB,IAAIA,kBAAkB,CAAClB,kBAAkB,CAAC,CAAC;EAC/D,CAAC,EAAE,CAACkB,kBAAkB,CAAC,CAAC;EAExB,OAAO;IACLZ,OAAO;IACPP;EACF,CAAC;AACH;AAAC,IAAAwB,QAAA,GAAA1D,OAAA,CAAAU,OAAA,GAIc;EACbe,SAAS;EACTM,KAAK;EACLG,OAAO;EACPE,gBAAgB;EAChBI,UAAU;EACVW;AACF,CAAC"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/NativeRNCNetInfo.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/NativeRNCNetInfo.js -new file mode 100644 -index 0000000..e3949ec ---- /dev/null -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/NativeRNCNetInfo.js -@@ -0,0 +1,10 @@ -+"use strict"; + +-var _default = { ++var _default = exports.default = { + configure, + fetch, + refresh, +@@ -242,5 +243,4 @@ var _default = { + useNetInfo, + useNetInfoInstance + }; +-exports.default = _default; + //# sourceMappingURL=index.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/index.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/index.js.map +index 954cf04..51f1ed7 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/index.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/index.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["index.ts"],"names":["_configuration","DEFAULT_CONFIGURATION","_state","createState","State","isRequestInProgress","requestQueue","configure","configuration","tearDown","Platform","OS","NativeInterface","fetch","requestedInterface","latest","refresh","Promise","resolve","push","_fetchCurrentState","then","result","forEach","finally","addEventListener","listener","add","remove","useNetInfo","netInfo","setNetInfo","type","Types","NetInfoStateType","unknown","isConnected","isInternetReachable","details","unsubscribe","useNetInfoInstance","isPaused","networkInfoManager","setNetworkInfoManager","config","state"],"mappings":";;;;;;;;;;;;;;;;;;;;;AASA;;AACA;;AACA;;AACA;;AACA;;AACA;;AA4LA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;AA1MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA,IAAIA,cAAc,GAAGC,6BAArB,C,CAEA;;AACA,IAAIC,MAAoB,GAAG,IAA3B;;AACA,MAAMC,WAAW,GAAG,MAAa;AAC/B,SAAO,IAAIC,eAAJ,CAAUJ,cAAV,CAAP;AACD,CAFD,C,CAIA;;;AACA,IAAIK,mBAAmB,GAAG,KAA1B;AACA,IAAIC,YAAqD,GAAG,EAA5D;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACO,SAASC,SAAT,CACLC,aADK,EAEC;AACNR,EAAAA,cAAc,GAAG,EACf,GAAGC,6BADY;AAEf,OAAGO;AAFY,GAAjB;;AAKA,MAAIN,MAAJ,EAAY;AACVA,IAAAA,MAAM,CAACO,QAAP;;AACAP,IAAAA,MAAM,GAAGC,WAAW,EAApB;AACD;;AAED,MAAIO,sBAASC,EAAT,KAAgB,KAApB,EAA2B;AACzBC,6BAAgBL,SAAhB,CAA0BC,aAA1B;AACD;AACF;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASK,KAAT,CACLC,kBADK,EAEwB;AAC7B,MAAI,CAACZ,MAAL,EAAa;AACXA,IAAAA,MAAM,GAAGC,WAAW,EAApB;AACD;;AACD,SAAOD,MAAM,CAACa,MAAP,CAAcD,kBAAd,CAAP;AACD;AAED;AACA;AACA;AACA;AACA;;;AACO,SAASE,OAAT,GAAgD;AACrD,MAAI,CAACd,MAAL,EAAa;AACXA,IAAAA,MAAM,GAAGC,WAAW,EAApB;AACD,GAHoD,CAKtD;;;AACC,MAAIE,mBAAJ,EAAyB;AACvB,WAAO,IAAIY,OAAJ,CAAaC,OAAD,IAAa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I,EAAAA,UALa;AAMbW,EAAAA;AANa,C","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {useState, useEffect, useCallback} from 'react';\nimport {Platform} from 'react-native';\nimport DEFAULT_CONFIGURATION from './internal/defaultConfiguration';\nimport NativeInterface from './internal/nativeInterface';\nimport State from './internal/state';\nimport * as Types from './internal/types';\n\n// Stores the currently used configuration\nlet _configuration = DEFAULT_CONFIGURATION;\n\n// Stores the singleton reference to the state manager\nlet _state: State | null = null;\nconst createState = (): State => {\n return new State(_configuration);\n};\n\n// Track ongoing requests\nlet isRequestInProgress = false;\nlet requestQueue: ((state: Types.NetInfoState) => void)[] = [];\n\n/**\n * Configures the library with the given configuration. Note that calling this will stop all\n * previously added listeners from being called again. It is best to call this right when your\n * application is started to avoid issues. The configuration sets up a global singleton instance.\n *\n * @param configuration The new configuration to set.\n */\nexport function configure(\n configuration: Partial,\n): void {\n _configuration = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n\n if (_state) {\n _state.tearDown();\n _state = createState();\n }\n\n if (Platform.OS === 'ios') {\n NativeInterface.configure(configuration);\n }\n}\n\n/**\n * Returns a `Promise` that resolves to a `NetInfoState` object.\n * This function operates on the global singleton instance configured using `configure()`\n *\n * @param [requestedInterface] interface from which to obtain the information\n *\n * @returns A Promise which contains the current connection state.\n */\nexport function fetch(\n requestedInterface?: string,\n): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state.latest(requestedInterface);\n}\n\n/**\n * Force-refreshes the internal state of the global singleton managed by this library.\n *\n * @returns A Promise which contains the updated connection state.\n */\nexport function refresh(): Promise {\n if (!_state) {\n _state = createState();\n }\n\n // If a request is already in progress, return a promise that will resolve when the current request finishes\n if (isRequestInProgress) {\n return new Promise((resolve) => {\n requestQueue.push(resolve);\n });\n }\n\n isRequestInProgress = true;\n\n return _state._fetchCurrentState().then((result) => {\n requestQueue.forEach((resolve) => resolve(result));\n requestQueue = [];\n return result;\n }).finally(() => {\n isRequestInProgress = false;\n });\n}\n\n/**\n * Subscribe to the global singleton's connection information. The callback is called with a parameter of type\n * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener\n * will be called with the latest information soon after you subscribe and then with any\n * subsequent changes afterwards. You should not assume that the listener is called in the same\n * way across devices or platforms.\n *\n * @param listener The listener which is called when the network state changes.\n *\n * @returns A function which can be called to unsubscribe.\n */\nexport function addEventListener(\n listener: Types.NetInfoChangeHandler,\n): Types.NetInfoSubscription {\n if (!_state) {\n _state = createState();\n }\n\n _state.add(listener);\n return (): void => {\n _state && _state.remove(listener);\n };\n}\n\n/**\n * A React Hook into this library's singleton which updates when the connection state changes.\n *\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns The connection state.\n */\nexport function useNetInfo(\n configuration?: Partial,\n): Types.NetInfoState {\n if (configuration) {\n configure(configuration);\n }\n\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect((): (() => void) => {\n const unsubscribe = addEventListener(setNetInfo);\n return () => unsubscribe();\n }, []);\n\n return netInfo;\n}\n\n/**\n * A React Hook which manages an isolated instance of the network info manager.\n * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener,\n * NetInfo.fetch, NetInfo.refresh are performed on a global singleton and have no affect on this hook.\n * @param {boolean} isPaused - Pause the internal network checks.\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns the netInfo state and a refresh function\n */\nexport function useNetInfoInstance(\n isPaused = false,\n configuration?: Partial,\n) {\n const [networkInfoManager, setNetworkInfoManager] = useState();\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect(() => {\n if (isPaused) {\n return;\n }\n const config = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n const state = new State(config);\n setNetworkInfoManager(state);\n state.add(setNetInfo);\n return state.tearDown;\n }, [isPaused, configuration]);\n\n const refresh = useCallback(() => {\n if (networkInfoManager && !isRequestInProgress) {\n isRequestInProgress = true;\n networkInfoManager._fetchCurrentState().finally(() => {\n isRequestInProgress = false;\n });\n }\n }, [networkInfoManager]);\n\n return {\n netInfo,\n refresh,\n };\n}\n\nexport * from './internal/types';\n\nexport default {\n configure,\n fetch,\n refresh,\n addEventListener,\n useNetInfo,\n useNetInfoInstance,\n};\n"]} +\ No newline at end of file ++{"version":3,"names":["_react","require","_reactNative","_defaultConfiguration","_interopRequireDefault","_nativeInterface","_state2","Types","_interopRequireWildcard","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","n","__proto__","a","getOwnPropertyDescriptor","u","i","set","obj","_configuration","DEFAULT_CONFIGURATION","_state","createState","State","configure","configuration","tearDown","Platform","OS","NativeInterface","fetch","requestedInterface","latest","refresh","_fetchCurrentState","addEventListener","listener","add","remove","useNetInfo","netInfo","setNetInfo","useState","type","NetInfoStateType","unknown","isConnected","isInternetReachable","details","useEffect","useNetInfoInstance","isPaused","networkInfoManager","setNetworkInfoManager","config","state","useCallback","_default"],"sources":["index.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {useState, useEffect, useCallback} from 'react';\nimport {Platform} from 'react-native';\nimport DEFAULT_CONFIGURATION from './internal/defaultConfiguration';\nimport NativeInterface from './internal/nativeInterface';\nimport State from './internal/state';\nimport * as Types from './internal/types';\n\n// Stores the currently used configuration\nlet _configuration = DEFAULT_CONFIGURATION;\n\n// Stores the singleton reference to the state manager\nlet _state: State | null = null;\nconst createState = (): State => {\n return new State(_configuration);\n};\n\n/**\n * Configures the library with the given configuration. Note that calling this will stop all\n * previously added listeners from being called again. It is best to call this right when your\n * application is started to avoid issues. The configuration sets up a global singleton instance.\n *\n * @param configuration The new configuration to set.\n */\nexport function configure(\n configuration: Partial,\n): void {\n _configuration = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n\n if (_state) {\n _state.tearDown();\n _state = createState();\n }\n\n if (Platform.OS === 'ios') {\n NativeInterface.configure(configuration);\n }\n}\n\n/**\n * Returns a `Promise` that resolves to a `NetInfoState` object.\n * This function operates on the global singleton instance configured using `configure()`\n *\n * @param [requestedInterface] interface from which to obtain the information\n *\n * @returns A Promise which contains the current connection state.\n */\nexport function fetch(\n requestedInterface?: string,\n): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state.latest(requestedInterface);\n}\n\n/**\n * Force-refreshes the internal state of the global singleton managed by this library.\n *\n * @returns A Promise which contains the updated connection state.\n */\nexport function refresh(): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state._fetchCurrentState();\n}\n\n/**\n * Subscribe to the global singleton's connection information. The callback is called with a parameter of type\n * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener\n * will be called with the latest information soon after you subscribe and then with any\n * subsequent changes afterwards. You should not assume that the listener is called in the same\n * way across devices or platforms.\n *\n * @param listener The listener which is called when the network state changes.\n *\n * @returns A function which can be called to unsubscribe.\n */\nexport function addEventListener(\n listener: Types.NetInfoChangeHandler,\n): Types.NetInfoSubscription {\n if (!_state) {\n _state = createState();\n }\n\n _state.add(listener);\n return (): void => {\n _state && _state.remove(listener);\n };\n}\n\n/**\n * A React Hook into this library's singleton which updates when the connection state changes.\n *\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns The connection state.\n */\nexport function useNetInfo(\n configuration?: Partial,\n): Types.NetInfoState {\n if (configuration) {\n configure(configuration);\n }\n\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect((): (() => void) => {\n return addEventListener(setNetInfo);\n }, []);\n\n return netInfo;\n}\n\n/**\n * A React Hook which manages an isolated instance of the network info manager.\n * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener,\n * NetInfo.fetch, NetInfo.refresh are performed on a global singleton and have no affect on this hook.\n * @param {boolean} isPaused - Pause the internal network checks.\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns the netInfo state and a refresh function\n */\nexport function useNetInfoInstance(\n isPaused = false,\n configuration?: Partial,\n) {\n const [networkInfoManager, setNetworkInfoManager] = useState();\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect(() => {\n if (isPaused) {\n return;\n }\n const config = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n const state = new State(config);\n setNetworkInfoManager(state);\n state.add(setNetInfo);\n return state.tearDown;\n }, [isPaused, configuration]);\n\n const refresh = useCallback(() => {\n networkInfoManager && networkInfoManager._fetchCurrentState();\n }, [networkInfoManager]);\n\n return {\n netInfo,\n refresh,\n };\n}\n\nexport * from './internal/types';\n\nexport default {\n configure,\n fetch,\n refresh,\n addEventListener,\n useNetInfo,\n useNetInfoInstance,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AASA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,qBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,OAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,KAAA,GAAAC,uBAAA,CAAAP,OAAA;AAkKAQ,MAAA,CAAAC,IAAA,CAAAH,KAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,G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AMG,MAAM,GAAG;MACb,GAAGlC,6BAAqB;MACxB,GAAGK;IACL,CAAC;IACD,MAAM8B,KAAK,GAAG,IAAIhC,eAAK,CAAC+B,MAAM,CAAC;IAC/BD,qBAAqB,CAACE,KAAK,CAAC;IAC5BA,KAAK,CAAClB,GAAG,CAACI,UAAU,CAAC;IACrB,OAAOc,KAAK,CAAC7B,QAAQ;EACvB,CAAC,EAAE,CAACyB,QAAQ,EAAE1B,aAAa,CAAC,CAAC;EAE7B,MAAMQ,OAAO,GAAG,IAAAuB,kBAAW,EAAC,MAAM;IAChCJ,kBAAkB,IAAIA,kBAAkB,CAAClB,kBAAkB,CAAC,CAAC;EAC/D,CAAC,EAAE,CAACkB,kBAAkB,CAAC,CAAC;EAExB,OAAO;IACLZ,OAAO;IACPP;EACF,CAAC;AACH;AAAC,IAAAwB,QAAA,GAAA1D,OAAA,CAAAU,OAAA,GAIc;EACbe,SAAS;EACTM,KAAK;EACLG,OAAO;EACPE,gBAAgB;EAChBI,UAAU;EACVW;AACF,CAAC"} +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/NativeRNCNetInfo.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/NativeRNCNetInfo.js +new file mode 100644 +index 0000000..e3949ec +--- /dev/null ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/NativeRNCNetInfo.js +@@ -0,0 +1,10 @@ ++"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true @@ -704,12 +584,11 @@ index 0000000..e3949ec \ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/NativeRNCNetInfo.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/NativeRNCNetInfo.js.map new file mode 100644 -index 0000000..86d23d4 +index 0000000..ee23239 --- /dev/null +++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/NativeRNCNetInfo.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sources":["NativeRNCNetInfo.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-types */\nimport type { TurboModule } from 'react-native';\nimport { TurboModuleRegistry } from 'react-native';\n\nexport interface Spec extends TurboModule {\n configure: (config: Object) => void;\n getCurrentState(requestedInterface?: string): Promise;\n // Events\n addListener: (eventName: string) => void;\n removeListeners: (count: number) => void;\n}\n\nexport default TurboModuleRegistry.getEnforcing('RNCNetInfo');\n\n"],"mappings":";;;;;;AAEA,IAAAA,YAAA,GAAAC,OAAA;AAFA;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAYeC,gCAAmB,CAACC,YAAY,CAAO,YAAY,CAAC"} -\ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js index 166a58d..c5b4e66 100644 --- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js @@ -724,14 +603,13 @@ index 166a58d..c5b4e66 100644 //# sourceMappingURL=defaultConfiguration.js.map \ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js.map -index 03f9097..be92be9 100644 +index 03f9097..ef3e8f2 100644 --- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js.map +++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.js.map @@ -1 +1 @@ -{"version":3,"sources":["defaultConfiguration.ts"],"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability"],"mappings":";;;;;;AAEA,MAAMA,qBAAiD,GAAG;AACxDC,EAAAA,eAAe,EAAE,0CADuC;AAExDC,EAAAA,kBAAkB,EAAE,MAFoC;AAGxDC,EAAAA,mBAAmB,EAAE,EAHmC;AAIxDC,EAAAA,gBAAgB,EAAGC,QAAD,IAChBC,OAAO,CAACC,OAAR,CAAgBF,QAAQ,CAACG,MAAT,KAAoB,GAApC,CALsD;AAMxDC,EAAAA,wBAAwB,EAAE,IAAI,IAN0B;AAMpB;AACpCC,EAAAA,uBAAuB,EAAE,KAAK,IAP0B;AAOpB;AACpCC,EAAAA,0BAA0B,EAAE,KAAK,IARuB;AAQjB;AACvCC,EAAAA,qBAAqB,EAAE,MAAe,IATkB;AAUxDC,EAAAA,mBAAmB,EAAE,KAVmC;AAWxDC,EAAAA,qBAAqB,EAAE;AAXiC,CAA1D;eAced,qB","sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: 'https://clients3.google.com/generate_204',\n reachabilityMethod: 'HEAD',\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 204),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: false,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION;"]} \ No newline at end of file +{"version":3,"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability","_default","exports","default"],"sources":["defaultConfiguration.ts"],"sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: 'https://clients3.google.com/generate_204',\n reachabilityMethod: 'HEAD',\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 204),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: false,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION;"],"mappings":";;;;;;AAEA,MAAMA,qBAAiD,GAAG;EACxDC,eAAe,EAAE,0CAA0C;EAC3DC,kBAAkB,EAAE,MAAM;EAC1BC,mBAAmB,EAAE,CAAC,CAAC;EACvBC,gBAAgB,EAAGC,QAAkB,IACnCC,OAAO,CAACC,OAAO,CAACF,QAAQ,CAACG,MAAM,KAAK,GAAG,CAAC;EAC1CC,wBAAwB,EAAE,CAAC,GAAG,IAAI;EAAE;EACpCC,uBAAuB,EAAE,EAAE,GAAG,IAAI;EAAE;EACpCC,0BAA0B,EAAE,EAAE,GAAG,IAAI;EAAE;EACvCC,qBAAqB,EAAEA,CAAA,KAAe,IAAI;EAC1CC,mBAAmB,EAAE,KAAK;EAC1BC,qBAAqB,EAAE;AACzB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEajB,qBAAqB"} -\ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js index 410b7b0..a1e0456 100644 --- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js @@ -746,240 +624,112 @@ index 410b7b0..a1e0456 100644 //# sourceMappingURL=defaultConfiguration.web.js.map \ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js.map -index edf0c39..d6ee21a 100644 +index edf0c39..87f5164 100644 --- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js.map +++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/defaultConfiguration.web.js.map @@ -1 +1 @@ -{"version":3,"sources":["defaultConfiguration.web.ts"],"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability"],"mappings":";;;;;;AAEA,MAAMA,qBAAiD,GAAG;AACxDC,EAAAA,eAAe,EAAE,GADuC;AAExDC,EAAAA,kBAAkB,EAAE,MAFoC;AAGxDC,EAAAA,mBAAmB,EAAE,EAHmC;AAIxDC,EAAAA,gBAAgB,EAAGC,QAAD,IAChBC,OAAO,CAACC,OAAR,CAAgBF,QAAQ,CAACG,MAAT,KAAoB,GAApC,CALsD;AAMxDC,EAAAA,wBAAwB,EAAE,IAAI,IAN0B;AAMpB;AACpCC,EAAAA,uBAAuB,EAAE,KAAK,IAP0B;AAOpB;AACpCC,EAAAA,0BAA0B,EAAE,KAAK,IARuB;AAQjB;AACvCC,EAAAA,qBAAqB,EAAE,MAAe,IATkB;AAUxDC,EAAAA,mBAAmB,EAAE,IAVmC;AAWxDC,EAAAA,qBAAqB,EAAE;AAXiC,CAA1D;eAced,qB","sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: '/',\n reachabilityMethod: \"HEAD\",\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 200),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: true,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION"]} \ No newline at end of file +{"version":3,"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability","_default","exports","default"],"sources":["defaultConfiguration.web.ts"],"sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: '/',\n reachabilityMethod: \"HEAD\",\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 200),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: true,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION"],"mappings":";;;;;;AAEA,MAAMA,qBAAiD,GAAG;EACxDC,eAAe,EAAE,GAAG;EACpBC,kBAAkB,EAAE,MAAM;EAC1BC,mBAAmB,EAAE,CAAC,CAAC;EACvBC,gBAAgB,EAAGC,QAAkB,IACnCC,OAAO,CAACC,OAAO,CAACF,QAAQ,CAACG,MAAM,KAAK,GAAG,CAAC;EAC1CC,wBAAwB,EAAE,CAAC,GAAG,IAAI;EAAE;EACpCC,uBAAuB,EAAE,EAAE,GAAG,IAAI;EAAE;EACpCC,0BAA0B,EAAE,EAAE,GAAG,IAAI;EAAE;EACvCC,qBAAqB,EAAEA,CAAA,KAAe,IAAI;EAC1CC,mBAAmB,EAAE,IAAI;EACzBC,qBAAqB,EAAE;AACzB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEajB,qBAAqB"} -\ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js -index 45296d9..5169ed8 100644 +index 61df951..837ce33 100644 --- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js +++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js -@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", { - value: true +@@ -5,7 +5,9 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = void 0; -- + -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -- +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } + /** * Copyright (c) Facebook, Inc. and its affiliates. - * -@@ -15,57 +15,45 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope - * - * @format - */ -+ - class InternetReachability { - constructor(configuration, listener) { - _defineProperty(this, "_configuration", void 0); -- - _defineProperty(this, "_listener", void 0); -- - _defineProperty(this, "_isInternetReachable", undefined); -- - _defineProperty(this, "_currentInternetReachabilityCheckHandler", null); -- - _defineProperty(this, "_currentTimeoutHandle", null); -- - _defineProperty(this, "_setIsInternetReachable", isInternetReachable => { - if (this._isInternetReachable === isInternetReachable) { - return; - } -- - this._isInternetReachable = isInternetReachable; -- - this._listener(this._isInternetReachable); - }); -- - _defineProperty(this, "_setExpectsConnection", expectsConnection => { - // Cancel any pending check - if (this._currentInternetReachabilityCheckHandler !== null) { +@@ -43,9 +45,9 @@ class InternetReachability { this._currentInternetReachabilityCheckHandler.cancel(); -- + this._currentInternetReachabilityCheckHandler = null; - } // Cancel any pending timeout - -- -+ } -+ // Cancel any pending timeout ++ } + ++ // Cancel any pending timeout if (this._currentTimeoutHandle !== null) { clearTimeout(this._currentTimeoutHandle); this._currentTimeoutHandle = null; - } -- - if (expectsConnection && this._configuration.reachabilityShouldRun()) { - // If we expect a connection, start the process for finding if we have one +@@ -56,9 +58,9 @@ class InternetReachability { // Set the state to "null" if it was previously false if (!this._isInternetReachable) { this._setIsInternetReachable(null); - } // Start a network request to check for internet - -- -+ } ++ } + + // Start a network request to check for internet this._currentInternetReachabilityCheckHandler = this._checkInternetReachability(); } else { // If we don't expect a connection or don't run reachability check, just change the state to "false" - this._setIsInternetReachable(false); - } - }); -- - _defineProperty(this, "_checkInternetReachability", () => { - const controller = new AbortController(); - const responsePromise = fetch(this._configuration.reachabilityUrl, { -@@ -73,16 +61,17 @@ class InternetReachability { +@@ -73,14 +75,15 @@ class InternetReachability { method: this._configuration.reachabilityMethod, cache: 'no-cache', signal: controller.signal - }); // Create promise that will reject after the request timeout has been reached +- + }); - + // Create promise that will reject after the request timeout has been reached let timeoutHandle; -- const timeoutPromise = new Promise(() => { -- timeoutHandle = setTimeout(() => controller.abort('timedout'), this._configuration.reachabilityRequestTimeout); + const timeoutPromise = new Promise((_, reject) => { + timeoutHandle = setTimeout(() => reject('timedout'), this._configuration.reachabilityRequestTimeout); - }); // Create promise that makes it possible to cancel a pending request through a reject - // eslint-disable-next-line @typescript-eslint/no-empty-function -+ const timeoutPromise = new Promise((_, reject) => { -+ timeoutHandle = setTimeout(() => reject('timedout'), this._configuration.reachabilityRequestTimeout); + }); - + + // Create promise that makes it possible to cancel a pending request through a reject + // eslint-disable-next-line @typescript-eslint/no-empty-function let cancel = () => {}; -- + const cancelPromise = new Promise((_, reject) => { - cancel = () => reject('canceled'); - }); -@@ -90,18 +79,25 @@ class InternetReachability { - return this._configuration.reachabilityTest(response); - }).then(result => { - this._setIsInternetReachable(result); -- +@@ -94,6 +97,11 @@ class InternetReachability { const nextTimeoutInterval = this._isInternetReachable ? this._configuration.reachabilityLongTimeout : this._configuration.reachabilityShortTimeout; this._currentTimeoutHandle = setTimeout(this._checkInternetReachability, nextTimeoutInterval); -+ }).catch(error => { -+ if (error !== 'canceled') { -+ this._setIsInternetReachable(false); -+ this._currentTimeoutHandle = setTimeout(this._checkInternetReachability, this._configuration.reachabilityShortTimeout); -+ } }).catch(error => { ++ if (error !== 'canceled') { ++ this._setIsInternetReachable(false); ++ this._currentTimeoutHandle = setTimeout(this._checkInternetReachability, this._configuration.reachabilityShortTimeout); ++ } ++ }).catch(error => { if ('canceled' === error) { controller.abort(); } else { -+ if ('timedout' === error) { -+ controller.abort(); -+ } - this._setIsInternetReachable(false); -- +@@ -105,7 +113,8 @@ class InternetReachability { + this._currentTimeoutHandle = setTimeout(this._checkInternetReachability, this._configuration.reachabilityShortTimeout); } - }) // Clear request timeout and propagate any errors -+ }) ++ }) + // Clear request timeout and propagate any errors .then(() => { clearTimeout(timeoutHandle); }, error => { -@@ -113,7 +109,6 @@ class InternetReachability { - cancel - }; - }); -- - _defineProperty(this, "update", state => { - if (typeof state.isInternetReachable === 'boolean' && this._configuration.useNativeReachability) { - this._setIsInternetReachable(state.isInternetReachable); -@@ -121,31 +116,25 @@ class InternetReachability { - this._setExpectsConnection(state.isConnected); - } - }); -- - _defineProperty(this, "currentState", () => { - return this._isInternetReachable; - }); -- - _defineProperty(this, "tearDown", () => { - // Cancel any pending check - if (this._currentInternetReachabilityCheckHandler !== null) { - this._currentInternetReachabilityCheckHandler.cancel(); -- - this._currentInternetReachabilityCheckHandler = null; -- } // Cancel any pending timeout -- -+ } - -+ // Cancel any pending timeout - if (this._currentTimeoutHandle !== null) { - clearTimeout(this._currentTimeoutHandle); - this._currentTimeoutHandle = null; - } - }); -- - this._configuration = configuration; - this._listener = listener; - } -- - } -- - exports.default = InternetReachability; - //# sourceMappingURL=internetReachability.js.map -\ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js.map -index 6d12691..63bd2df 100644 +index 8a9a159..1a97379 100644 --- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js.map +++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/internetReachability.js.map @@ -1 +1 @@ --{"version":3,"sources":["internetReachability.ts"],"names":["InternetReachability","constructor","configuration","listener","undefined","isInternetReachable","_isInternetReachable","_listener","expectsConnection","_currentInternetReachabilityCheckHandler","cancel","_currentTimeoutHandle","clearTimeout","_configuration","reachabilityShouldRun","_setIsInternetReachable","_checkInternetReachability","controller","AbortController","responsePromise","fetch","reachabilityUrl","headers","reachabilityHeaders","method","reachabilityMethod","cache","signal","timeoutHandle","timeoutPromise","Promise","setTimeout","abort","reachabilityRequestTimeout","cancelPromise","_","reject","promise","race","then","response","reachabilityTest","result","nextTimeoutInterval","reachabilityLongTimeout","reachabilityShortTimeout","catch","error","state","useNativeReachability","_setExpectsConnection","isConnected"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUe,MAAMA,oBAAN,CAA2B;AAOxCC,EAAAA,WAAW,CACTC,aADS,EAETC,QAFS,EAGT;AAAA;;AAAA;;AAAA,kDAPyDC,SAOzD;;AAAA,sEAN0F,IAM1F;;AAAA,mDALoE,IAKpE;;AAAA,qDAMAC,mBADgC,IAEvB;AACT,UAAI,KAAKC,oBAAL,KAA8BD,mBAAlC,EAAuD;AACrD;AACD;;AAED,WAAKC,oBAAL,GAA4BD,mBAA5B;;AACA,WAAKE,SAAL,CAAe,KAAKD,oBAApB;AACD,KAdC;;AAAA,mDAgB+BE,iBAAD,IAA6C;AAC3E;AACA,UAAI,KAAKC,wCAAL,KAAkD,IAAtD,EAA4D;AAC1D,aAAKA,wCAAL,CAA8CC,MAA9C;;AACA,aAAKD,wCAAL,GAAgD,IAAhD;AACD,OAL0E,CAM3E;;;AACA,UAAI,KAAKE,qBAAL,KAA+B,IAAnC,EAAyC;AACvCC,QAAAA,YAAY,CAAC,KAAKD,qBAAN,CAAZ;AACA,aAAKA,q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AAkC;AACtD,aAAO,KAAK7C,oBAAZ;AACD,KArIC;;AAAA,sCAuIgB,MAAY;AAC5B;AACA,UAAI,KAAKG,wCAAL,KAAkD,IAAtD,EAA4D;AAC1D,aAAKA,wCAAL,CAA8CC,MAA9C;;AACA,aAAKD,wCAAL,GAAgD,IAAhD;AACD,OAL2B,CAO5B;;;AACA,UAAI,KAAKE,qBAAL,KAA+B,IAAnC,EAAyC;AACvCC,QAAAA,YAAY,CAAC,KAAKD,qBAAN,CAAZ;AACA,aAAKA,qBAAL,GAA6B,IAA7B;AACD;AACF,KAnJC;;AACA,SAAKE,cAAL,GAAsBX,aAAtB;AACA,SAAKK,SAAL,GAAiBJ,QAAjB;AACD;;AAbuC","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport * as PrivateTypes from './privateTypes';\nimport * as Types from './types';\n\ninterface InternetReachabilityCheckHandler {\n promise: Promise;\n cancel: () => void;\n}\n\nexport default class InternetReachability {\n private _configuration: Types.NetInfoConfiguration;\n private _listener: PrivateTypes.NetInfoInternetReachabilityChangeListener;\n private _isInternetReachable: boolean | null | undefined = undefined;\n private _currentInternetReachabilityCheckHandler: InternetReachabilityCheckHandler | null = null;\n private _currentTimeoutHandle: ReturnType | null = null;\n\n constructor(\n configuration: Types.NetInfoConfiguration,\n listener: PrivateTypes.NetInfoInternetReachabilityChangeListener,\n ) {\n this._configuration = configuration;\n this._listener = listener;\n }\n\n private _setIsInternetReachable = (\n isInternetReachable: boolean | null,\n ): void => {\n if (this._isInternetReachable === isInternetReachable) {\n return;\n }\n\n this._isInternetReachable = isInternetReachable;\n this._listener(this._isInternetReachable);\n };\n\n private _setExpectsConnection = (expectsConnection: boolean | null): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n\n if (expectsConnection && this._configuration.reachabilityShouldRun()) {\n // If we expect a connection, start the process for finding if we have one\n // Set the state to \"null\" if it was previously false\n if (!this._isInternetReachable) {\n this._setIsInternetReachable(null);\n }\n // Start a network request to check for internet\n this._currentInternetReachabilityCheckHandler = this._checkInternetReachability();\n } else {\n // If we don't expect a connection or don't run reachability check, just change the state to \"false\"\n this._setIsInternetReachable(false);\n }\n };\n\n private _checkInternetReachability = (): InternetReachabilityCheckHandler => {\n const controller = new AbortController();\n\n const responsePromise = fetch(this._configuration.reachabilityUrl, {\n headers: this._configuration.reachabilityHeaders,\n method: this._configuration.reachabilityMethod,\n cache: 'no-cache',\n signal: controller.signal,\n });\n\n // Create promise that will reject after the request timeout has been reached\n let timeoutHandle: ReturnType;\n const timeoutPromise = new Promise((): void => {\n timeoutHandle = setTimeout(\n (): void => controller.abort('timedout'),\n this._configuration.reachabilityRequestTimeout,\n );\n });\n\n // Create promise that makes it possible to cancel a pending request through a reject\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n let cancel: () => void = (): void => {};\n const cancelPromise = new Promise((_, reject): void => {\n cancel = (): void => reject('canceled');\n });\n\n const promise = Promise.race([\n responsePromise,\n timeoutPromise,\n cancelPromise,\n ])\n .then(\n (response): Promise => {\n return this._configuration.reachabilityTest(response);\n },\n )\n .then(\n (result): void => {\n this._setIsInternetReachable(result);\n const nextTimeoutInterval = this._isInternetReachable\n ? this._configuration.reachabilityLongTimeout\n : this._configuration.reachabilityShortTimeout;\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n nextTimeoutInterval,\n );\n },\n )\n .catch(\n (error: Error | 'timedout' | 'canceled'): void => {\n if ('canceled' === error) {\n controller.abort();\n } else {\n this._setIsInternetReachable(false);\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n this._configuration.reachabilityShortTimeout,\n );\n }\n },\n )\n // Clear request timeout and propagate any errors\n .then(\n (): void => {\n clearTimeout(timeoutHandle);\n },\n (error: Error): void => {\n clearTimeout(timeoutHandle);\n throw error;\n },\n );\n\n return {\n promise,\n cancel,\n };\n };\n\n public update = (state: PrivateTypes.NetInfoNativeModuleState): void => {\n if (\n typeof state.isInternetReachable === 'boolean' &&\n this._configuration.useNativeReachability\n ) {\n this._setIsInternetReachable(state.isInternetReachable);\n } else {\n this._setExpectsConnection(state.isConnected);\n }\n };\n\n public currentState = (): boolean | null | undefined => {\n return this._isInternetReachable;\n };\n\n public tearDown = (): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n };\n}\n"]} +-{"version":3,"sources":["internetReachability.ts"],"names":["InternetReachability","constructor","configuration","listener","undefined","isInternetReachable","_isInternetReachable","_listener","expectsConnection","_currentInternetReachabilityCheckHandler","cancel","_currentTimeoutHandle","clearTimeout","_configuration","reachabilityShouldRun","_setIsInternetReachable","_checkInternetReachability","controller","AbortController","responsePromise","fetch","reachabilityUrl","headers","reachabilityHeaders","method","reachabilityMethod","cache","signal","timeoutHandle","timeoutPromise","Promise","_","reject","setTimeout","reachabilityRequestTimeout","cancelPromise","promise","race","then","response","reachabilityTest","result","nextTimeoutInterval","reachabilityLongTimeout","reachabilityShortTimeout","catch","error","abort","state","useNativeReachability","_setExpectsConnection","isConnected"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUe,MAAMA,oBAAN,CAA2B;AAOxCC,EAAAA,WAAW,CACTC,aADS,EAETC,QAFS,EAGT;AAAA;;AAAA;;AAAA,kDAPyDC,SAOzD;;AAAA,sEAN0F,IAM1F;;AAAA,mDALoE,IAKpE;;A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OArCW,EAuCd;AAvCc,OAwCbN,IAxCa,CAyCZ,MAAY;AACV1B,QAAAA,YAAY,CAACgB,aAAD,CAAZ;AACD,OA3CW,EA4CXkB,KAAD,IAAwB;AACtBlC,QAAAA,YAAY,CAACgB,aAAD,CAAZ;AACA,cAAMkB,KAAN;AACD,OA/CW,CAAhB;AAkDA,aAAO;AACLV,QAAAA,OADK;AAEL1B,QAAAA;AAFK,OAAP;AAID,KA1HC;;AAAA,oCA4HesC,KAAD,IAAwD;AACtE,UACE,OAAOA,KAAK,CAAC3C,mBAAb,KAAqC,SAArC,IACA,KAAKQ,cAAL,CAAoBoC,qBAFtB,EAGE;AACA,aAAKlC,uBAAL,CAA6BiC,KAAK,CAAC3C,mBAAnC;AACD,OALD,MAKO;AACL,aAAK6C,qBAAL,CAA2BF,KAAK,CAACG,WAAjC;AACD;AACF,KArIC;;AAAA,0CAuIoB,MAAkC;AACtD,aAAO,KAAK7C,oBAAZ;AACD,KAzIC;;AAAA,sCA2IgB,MAAY;AAC5B;AACA,UAAI,KAAKG,wCAAL,KAAkD,IAAtD,EAA4D;AAC1D,aAAKA,wCAAL,CAA8CC,MAA9C;;AACA,aAAKD,wCAAL,GAAgD,IAAhD;AACD,OAL2B,CAO5B;;;AACA,UAAI,KAAKE,qBAAL,KAA+B,IAAnC,EAAyC;AACvCC,QAAAA,YAAY,CAAC,KAAKD,qBAAN,CAAZ;AACA,aAAKA,qBAAL,GAA6B,IAA7B;AACD;AACF,KAvJC;;AACA,SAAKE,cAAL,GAAsBX,aAAtB;AACA,SAAKK,SAAL,GAAiBJ,QAAjB;AACD;;AAbuC","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport * as PrivateTypes from './privateTypes';\nimport * as Types from './types';\n\ninterface InternetReachabilityCheckHandler {\n promise: Promise;\n cancel: () => void;\n}\n\nexport default class InternetReachability {\n private _configuration: Types.NetInfoConfiguration;\n private _listener: PrivateTypes.NetInfoInternetReachabilityChangeListener;\n private _isInternetReachable: boolean | null | undefined = undefined;\n private _currentInternetReachabilityCheckHandler: InternetReachabilityCheckHandler | null = null;\n private _currentTimeoutHandle: ReturnType | null = null;\n\n constructor(\n configuration: Types.NetInfoConfiguration,\n listener: PrivateTypes.NetInfoInternetReachabilityChangeListener,\n ) {\n this._configuration = configuration;\n this._listener = listener;\n }\n\n private _setIsInternetReachable = (\n isInternetReachable: boolean | null,\n ): void => {\n if (this._isInternetReachable === isInternetReachable) {\n return;\n }\n\n this._isInternetReachable = isInternetReachable;\n this._listener(this._isInternetReachable);\n };\n\n private _setExpectsConnection = (expectsConnection: boolean | null): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n\n if (expectsConnection && this._configuration.reachabilityShouldRun()) {\n // If we expect a connection, start the process for finding if we have one\n // Set the state to \"null\" if it was previously false\n if (!this._isInternetReachable) {\n this._setIsInternetReachable(null);\n }\n // Start a network request to check for internet\n this._currentInternetReachabilityCheckHandler = this._checkInternetReachability();\n } else {\n // If we don't expect a connection or don't run reachability check, just change the state to \"false\"\n this._setIsInternetReachable(false);\n }\n };\n\n private _checkInternetReachability = (): InternetReachabilityCheckHandler => {\n const controller = new AbortController();\n\n const responsePromise = fetch(this._configuration.reachabilityUrl, {\n headers: this._configuration.reachabilityHeaders,\n method: this._configuration.reachabilityMethod,\n cache: 'no-cache',\n signal: controller.signal,\n });\n\n // Create promise that will reject after the request timeout has been reached\n let timeoutHandle: ReturnType;\n const timeoutPromise = new Promise((_, reject): void => {\n timeoutHandle = setTimeout(\n (): void => reject('timedout'),\n this._configuration.reachabilityRequestTimeout,\n );\n });\n\n // Create promise that makes it possible to cancel a pending request through a reject\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n let cancel: () => void = (): void => {};\n const cancelPromise = new Promise((_, reject): void => {\n cancel = (): void => reject('canceled');\n });\n\n const promise = Promise.race([\n responsePromise,\n timeoutPromise,\n cancelPromise,\n ])\n .then(\n (response): Promise => {\n return this._configuration.reachabilityTest(response);\n },\n )\n .then(\n (result): void => {\n this._setIsInternetReachable(result);\n const nextTimeoutInterval = this._isInternetReachable\n ? this._configuration.reachabilityLongTimeout\n : this._configuration.reachabilityShortTimeout;\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n nextTimeoutInterval,\n );\n },\n )\n .catch(\n (error: Error | 'timedout' | 'canceled'): void => {\n if ('canceled' === error) {\n controller.abort();\n } else {\n if ('timedout' === error) {\n controller.abort();\n }\n \n this._setIsInternetReachable(false);\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n this._configuration.reachabilityShortTimeout,\n );\n }\n },\n )\n // Clear request timeout and propagate any errors\n .then(\n (): void => {\n clearTimeout(timeoutHandle);\n },\n (error: Error): void => {\n clearTimeout(timeoutHandle);\n throw error;\n },\n );\n\n return {\n promise,\n cancel,\n };\n };\n\n public update = (state: PrivateTypes.NetInfoNativeModuleState): void => {\n if (\n typeof state.isInternetReachable === 'boolean' &&\n this._configuration.useNativeReachability\n ) {\n this._setIsInternetReachable(state.isInternetReachable);\n } else {\n this._setExpectsConnection(state.isConnected);\n }\n };\n\n public currentState = (): boolean | null | undefined => {\n return this._isInternetReachable;\n };\n\n public tearDown = (): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n };\n}\n"]} \ No newline at end of file +{"version":3,"names":["InternetReachability","constructor","configuration","listener","_defineProperty","undefined","isInternetReachable","_isInternetReachable","_listener","expectsConnection","_currentInternetReachabilityCheckHandler","cancel","_currentTimeoutHandle","clearTimeout","_configuration","reachabilityShouldRun","_setIsInternetReachable","_checkInternetReachability","controller","AbortController","responsePromise","fetch","reachabilityUrl","headers","reachabilityHeaders","method","reachabilityMethod","cache","signal","timeoutHandle","timeoutPromise","Promise","_","reject","setTimeout","reachabilityRequestTimeout","cancelPromise","promise","race","then","response","reachabilityTest","result","nextTimeoutInterval","reachabilityLongTimeout","reachabilityShortTimeout","catch","error","abort","state","useNativeReachability","_setExpectsConnection","isConnected","exports","default"],"sources":["internetReachability.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport * as PrivateTypes from './privateTypes';\nimport * as Types from './types';\n\ninterface InternetReachabilityCheckHandler {\n promise: Promise;\n cancel: () => void;\n}\n\nexport default class InternetReachability {\n private _configuration: Types.NetInfoConfiguration;\n private _listener: PrivateTypes.NetInfoInternetReachabilityChangeListener;\n private _isInternetReachable: boolean | null | undefined = undefined;\n private _currentInternetReachabilityCheckHandler: InternetReachabilityCheckHandler | null =\n null;\n private _currentTimeoutHandle: ReturnType | null = null;\n\n constructor(\n configuration: Types.NetInfoConfiguration,\n listener: PrivateTypes.NetInfoInternetReachabilityChangeListener,\n ) {\n this._configuration = configuration;\n this._listener = listener;\n }\n\n private _setIsInternetReachable = (\n isInternetReachable: boolean | null,\n ): void => {\n if (this._isInternetReachable === isInternetReachable) {\n return;\n }\n\n this._isInternetReachable = isInternetReachable;\n this._listener(this._isInternetReachable);\n };\n\n private _setExpectsConnection = (expectsConnection: boolean | null): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n\n if (expectsConnection && this._configuration.reachabilityShouldRun()) {\n // If we expect a connection, start the process for finding if we have one\n // Set the state to \"null\" if it was previously false\n if (!this._isInternetReachable) {\n this._setIsInternetReachable(null);\n }\n // Start a network request to check for internet\n this._currentInternetReachabilityCheckHandler =\n this._checkInternetReachability();\n } else {\n // If we don't expect a connection or don't run reachability check, just change the state to \"false\"\n this._setIsInternetReachable(false);\n }\n };\n\n private _checkInternetReachability = (): InternetReachabilityCheckHandler => {\n const controller = new AbortController();\n\n const responsePromise = fetch(this._configuration.reachabilityUrl, {\n headers: this._configuration.reachabilityHeaders,\n method: this._configuration.reachabilityMethod,\n cache: 'no-cache',\n signal: controller.signal,\n });\n\n // Create promise that will reject after the request timeout has been reached\n let timeoutHandle: ReturnType;\n const timeoutPromise = new Promise((_, reject): void => {\n timeoutHandle = setTimeout(\n (): void => reject('timedout'),\n this._configuration.reachabilityRequestTimeout,\n );\n });\n\n // Create promise that makes it possible to cancel a pending request through a reject\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n let cancel: () => void = (): void => {};\n const cancelPromise = new Promise((_, reject): void => {\n cancel = (): void => reject('canceled');\n });\n\n const promise = Promise.race([\n responsePromise,\n timeoutPromise,\n cancelPromise,\n ])\n .then((response): Promise => {\n return this._configuration.reachabilityTest(response);\n })\n .then((result): void => {\n this._setIsInternetReachable(result);\n const nextTimeoutInterval = this._isInternetReachable\n ? this._configuration.reachabilityLongTimeout\n : this._configuration.reachabilityShortTimeout;\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n nextTimeoutInterval,\n );\n })\n .catch((error: Error | 'timedout' | 'canceled'): void => {\n if (error !== 'canceled') {\n this._setIsInternetReachable(false);\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n this._configuration.reachabilityShortTimeout,\n );\n }\n })\n .catch(\n (error: Error | 'timedout' | 'canceled'): void => {\n if ('canceled' === error) {\n controller.abort();\n } else {\n if ('timedout' === error) {\n controller.abort();\n }\n \n this._setIsInternetReachable(false);\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n this._configuration.reachabilityShortTimeout,\n );\n }\n },\n )\n // Clear request timeout and propagate any errors\n .then(\n (): void => {\n clearTimeout(timeoutHandle);\n },\n (error: Error): void => {\n clearTimeout(timeoutHandle);\n throw error;\n },\n );\n\n return {\n promise,\n cancel,\n };\n };\n\n public update = (state: PrivateTypes.NetInfoNativeModuleState): void => {\n if (\n typeof state.isInternetReachable === 'boolean' &&\n this._configuration.useNativeReachability\n ) {\n this._setIsInternetReachable(state.isInternetReachable);\n } else {\n this._setExpectsConnection(state.isConnected);\n }\n };\n\n public currentState = (): boolean | null | undefined => {\n return this._isInternetReachable;\n };\n\n public tearDown = (): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n };\n}\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUe,MAAMA,oBAAoB,CAAC;EAQxCC,WAAWA,CACTC,aAAyC,EACzCC,QAAgE,EAChE;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA,+BARyDC,SAAS;IAAAD,eAAA,mDAElE,IAAI;IAAAA,eAAA,gCACgE,IAAI;IAAAA,eAAA,kCAWxEE,mBAAmC,IAC1B;MACT,IAAI,IAAI,CAACC,oBAAoB,KAAKD,mBAAmB,EAAE;QACrD;MACF;MAEA,IAAI,CAACC,oBAAoB,GAAGD,mBAAmB;MAC/C,IAAI,CAACE,SAAS,CAAC,IAAI,CAACD,oBAAoB,CAAC;IAC3C,CAAC;IAAAH,eAAA,gCAEgCK,iBAAiC,IAAW;MAC3E;MACA,IAAI,IAAI,CAACC,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ACJ,qBAAqB,GAAGsB,UAAU,CACrC,IAAI,CAACjB,0BAA0B,EAC/B,IAAI,CAACH,cAAc,CAAC+B,wBACtB,CAAC;QACH;MACF,CACF;MACA;MAAA,CACCN,IAAI,CACH,MAAY;QACV1B,YAAY,CAACgB,aAAa,CAAC;MAC7B,CAAC,EACAkB,KAAY,IAAW;QACtBlC,YAAY,CAACgB,aAAa,CAAC;QAC3B,MAAMkB,KAAK;MACb,CACF,CAAC;MAEH,OAAO;QACLV,OAAO;QACP1B;MACF,CAAC;IACH,CAAC;IAAAP,eAAA,iBAEgB6C,KAA4C,IAAW;MACtE,IACE,OAAOA,KAAK,CAAC3C,mBAAmB,KAAK,SAAS,IAC9C,IAAI,CAACQ,cAAc,CAACoC,qBAAqB,EACzC;QACA,IAAI,CAAClC,uBAAuB,CAACiC,KAAK,CAAC3C,mBAAmB,CAAC;MACzD,CAAC,MAAM;QACL,IAAI,CAAC6C,qBAAqB,CAACF,KAAK,CAACG,WAAW,CAAC;MAC/C;IACF,CAAC;IAAAhD,eAAA,uBAEqB,MAAkC;MACtD,OAAO,IAAI,CAACG,oBAAoB;IAClC,CAAC;IAAAH,eAAA,mBAEiB,MAAY;MAC5B;MACA,IAAI,IAAI,CAACM,wCAAwC,KAAK,IAAI,EAAE;QAC1D,IAAI,CAACA,wCAAwC,CAACC,MAAM,CAAC,CAAC;QACtD,IAAI,CAACD,wCAAwC,GAAG,IAAI;MACtD;;MAEA;MACA,IAAI,IAAI,CAACE,qBAAqB,KAAK,IAAI,EAAE;QACvCC,YAAY,CAAC,IAAI,CAACD,qBAAqB,CAAC;QACxC,IAAI,CAACA,qBAAqB,GAAG,IAAI;MACnC;IACF,CAAC;IA5JC,IAAI,CAACE,cAAc,GAAGZ,aAAa;IACnC,IAAI,CAACM,SAAS,GAAGL,QAAQ;EAC3B;AA2JF;AAACkD,OAAA,CAAAC,OAAA,GAAAtD,oBAAA"} -\ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js -index 7a50da5..cb7d968 100644 +index e26cbb0..a9d5a0e 100644 --- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js +++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js -@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.default = void 0; -- - var _reactNative = require("react-native"); -- - var _nativeModule = _interopRequireDefault(require("./nativeModule")); -- - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -- - /** - * Copyright (c) Facebook, Inc. and its affiliates. - * -@@ -19,6 +15,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de - * - * @format - */ -+ - // Produce an error if we don't have the native module - if (!_nativeModule.default) { - throw new Error(`@react-native-community/netinfo: NativeModule.RNCNetInfo is null. To fix this issue try these steps: -@@ -31,27 +28,26 @@ if (!_nativeModule.default) { +@@ -38,20 +38,24 @@ If none of these fix the issue, please open an issue on the Github repository: h + - If none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-netinfo`); - } -+ - /** - * We export the native interface in this way to give easy shared access to it between the - * JavaScript code and the tests - */ -- -- let nativeEventEmitter = null; --var _default = { ..._nativeModule.default, -- -+var _default = exports.default = { +-const nativeInterface = Object.assign(_nativeModule.default, { ++const nativeInterface = { + configure: _nativeModule.default.configure, + addListener: _nativeModule.default.addListener, + removeListeners: _nativeModule.default.removeListeners, @@ -993,96 +743,44 @@ index 7a50da5..cb7d968 100644 + } + // eslint-disable-next-line @typescript-eslint/ban-ts-comment /// @ts-ignore -- -- + + return nativeEventEmitter; } - - }; --exports.default = _default; +-}); ++}; + var _default = nativeInterface; + exports.default = _default; //# sourceMappingURL=nativeInterface.js.map \ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js.map -index 1e7ac57..33b4bc0 100644 +index 75bb2d2..f2c8ea1 100644 --- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js.map +++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.js.map @@ -1 +1 @@ --{"version":3,"sources":["nativeInterface.ts"],"names":["RNCNetInfo","Error","nativeEventEmitter","eventEmitter","NativeEventEmitter"],"mappings":";;;;;;;AASA;;AACA;;;;AAVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA,IAAI,CAACA,qBAAL,EAAiB;AACf,QAAM,IAAIC,KAAJ,CAAW;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8IARQ,CAAN;AASD;AAED;AACA;AACA;AACA;;;AACA,IAAIC,kBAA6C,GAAG,IAApD;eACe,EACb,GAAGF,qBADU;;AAEb,MAAIG,YAAJ,GAAuC;AACrC,QAAI,CAACD,kBAAL,EAAyB;AACvB;AACA;AACAA,MAAAA,kBAAkB,GAAG,IAAIE,+BAAJ,CAAuBJ,qBAAvB,CAArB;AACD,KALoC,CAMrC;AACA;;;AACA,WAAOE,kBAAP;AACD;;AAXY,C","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\n\n// Produce an error if we don't have the native module\nif (!RNCNetInfo) {\n throw new Error(`@react-native-community/netinfo: NativeModule.RNCNetInfo is null. To fix this issue try these steps:\n\n• Run \\`react-native link @react-native-community/netinfo\\` in the project root.\n• Rebuild and re-run the app.\n• If you are using CocoaPods on iOS, run \\`pod install\\` in the \\`ios\\` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n• Check that the library was linked correctly when you used the link command by running through the manual installation instructions in the README.\n* If you are getting this error while unit testing you need to mock the native module. Follow the guide in the README.\n\nIf none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-netinfo`);\n}\n\n/**\n * We export the native interface in this way to give easy shared access to it between the\n * JavaScript code and the tests\n */\nlet nativeEventEmitter: NativeEventEmitter | null = null;\nexport default {\n ...RNCNetInfo,\n get eventEmitter(): NativeEventEmitter {\n if (!nativeEventEmitter) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n nativeEventEmitter = new NativeEventEmitter(RNCNetInfo);\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n return nativeEventEmitter;\n },\n};\n"]} +-{"version":3,"sources":["nativeInterface.ts"],"names":["RNCNetInfo","Error","nativeEventEmitter","nativeInterface","Object","assign","eventEmitter","NativeEventEmitter"],"mappings":";;;;;;;AASA;;AACA;;;;AAVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA,IAAI,CAACA,qBAAL,EAAiB;AACf,QAAM,IAAIC,KAAJ,CAAW;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8IARQ,CAAN;AASD;AAED;AACA;AACA;AACA;;;AACA,IAAIC,kBAA6C,GAAG,IAApD;AACA,MAAMC,eAAe,GAAGC,MAAM,CAACC,MAAP,CAAcL,qBAAd,EAA0B;AAChD,MAAIM,YAAJ,GAAuC;AACrC,QAAI,CAACJ,kBAAL,EAAyB;AACvB;AACA;AACAA,MAAAA,kBAAkB,GAAG,IAAIK,+BAAJ,CAAuBP,qBAAvB,CAArB;AACD,KALoC,CAMrC;AACA;;;AACA,WAAOE,kBAAP;AACD;;AAV+C,CAA1B,CAAxB;eAYeC,e","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\n\n// Produce an error if we don't have the native module\nif (!RNCNetInfo) {\n throw new Error(`@react-native-community/netinfo: NativeModule.RNCNetInfo is null. To fix this issue try these steps:\n\n• Run \\`react-native link @react-native-community/netinfo\\` in the project root.\n• Rebuild and re-run the app.\n• If you are using CocoaPods on iOS, run \\`pod install\\` in the \\`ios\\` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n• Check that the library was linked correctly when you used the link command by running through the manual installation instructions in the README.\n* If you are getting this error while unit testing you need to mock the native module. Follow the guide in the README.\n\nIf none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-netinfo`);\n}\n\n/**\n * We export the native interface in this way to give easy shared access to it between the\n * JavaScript code and the tests\n */\nlet nativeEventEmitter: NativeEventEmitter | null = null;\nconst nativeInterface = Object.assign(RNCNetInfo, {\n get eventEmitter(): NativeEventEmitter {\n if (!nativeEventEmitter) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n nativeEventEmitter = new NativeEventEmitter(RNCNetInfo);\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n return nativeEventEmitter;\n },\n});\nexport default nativeInterface;\n"]} \ No newline at end of file +{"version":3,"names":["_reactNative","require","_nativeModule","_interopRequireDefault","obj","__esModule","default","RNCNetInfo","Error","nativeEventEmitter","_default","exports","configure","addListener","removeListeners","getCurrentState","eventEmitter","NativeEventEmitter"],"sources":["nativeInterface.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\n\n// Produce an error if we don't have the native module\nif (!RNCNetInfo) {\n throw new Error(`@react-native-community/netinfo: NativeModule.RNCNetInfo is null. To fix this issue try these steps:\n\n• Run \\`react-native link @react-native-community/netinfo\\` in the project root.\n• Rebuild and re-run the app.\n• If you are using CocoaPods on iOS, run \\`pod install\\` in the \\`ios\\` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n• Check that the library was linked correctly when you used the link command by running through the manual installation instructions in the README.\n* If you are getting this error while unit testing you need to mock the native module. Follow the guide in the README.\n\nIf none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-netinfo`);\n}\n\n/**\n * We export the native interface in this way to give easy shared access to it between the\n * JavaScript code and the tests\n */\nlet nativeEventEmitter: NativeEventEmitter | null = null;\n\nexport default {\n configure: RNCNetInfo.configure,\n addListener: RNCNetInfo.addListener,\n removeListeners: RNCNetInfo.removeListeners,\n getCurrentState: RNCNetInfo.getCurrentState,\n get eventEmitter(): NativeEventEmitter {\n if (!nativeEventEmitter) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n nativeEventEmitter = new NativeEventEmitter(RNCNetInfo);\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n return nativeEventEmitter;\n },\n};\n"],"mappings":";;;;;;AASA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAwC,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAVxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACA,IAAI,CAACG,qBAAU,EAAE;EACf,MAAM,IAAIC,KAAK,CAAE;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8IAA8I,CAAC;AAC/I;;AAEA;AACA;AACA;AACA;AACA,IAAIC,kBAA6C,GAAG,IAAI;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAL,OAAA,GAE1C;EACbM,SAAS,EAAEL,qBAAU,CAACK,SAAS;EAC/BC,WAAW,EAAEN,qBAAU,CAACM,WAAW;EACnCC,eAAe,EAAEP,qBAAU,CAACO,eAAe;EAC3CC,eAAe,EAAER,qBAAU,CAACQ,eAAe;EAC3C,IAAIC,YAAYA,CAAA,EAAuB;IACrC,IAAI,CAACP,kBAAkB,EAAE;MACvB;MACA;MACAA,kBAAkB,GAAG,IAAIQ,+BAAkB,CAACV,qBAAU,CAAC;IACzD;IACA;IACA;IACA,OAAOE,kBAAkB;EAC3B;AACF,CAAC"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js -index 5e77388..d591606 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js -@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.default = void 0; -- - var _reactNative = require("react-native"); -- - var _nativeModule = _interopRequireDefault(require("./nativeModule")); -- - var _privateTypes = require("./privateTypes"); -- - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -- - /** - * Copyright (c) Facebook, Inc. and its affiliates. - * -@@ -21,14 +16,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de - * - * @format - */ --const nativeEventEmitter = new _reactNative.NativeEventEmitter(); // Listen to connectivity events - -+const nativeEventEmitter = new _reactNative.NativeEventEmitter(); -+ -+// Listen to connectivity events - _nativeModule.default.addListener(_privateTypes.DEVICE_CONNECTIVITY_EVENT, event => { - nativeEventEmitter.emit(_privateTypes.DEVICE_CONNECTIVITY_EVENT, event); - }); -- --var _default = { ..._nativeModule.default, -+var _default = exports.default = { -+ ..._nativeModule.default, - eventEmitter: nativeEventEmitter - }; --exports.default = _default; - //# sourceMappingURL=nativeInterface.web.js.map -\ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js.map -index 9fc4a6d..9b6f4b4 100644 +index 9fc4a6d..b9de090 100644 --- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js.map +++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeInterface.web.js.map @@ -1 +1 @@ -{"version":3,"sources":["nativeInterface.web.ts"],"names":["nativeEventEmitter","NativeEventEmitter","RNCNetInfo","addListener","DEVICE_CONNECTIVITY_EVENT","event","emit","eventEmitter"],"mappings":";;;;;;;AASA;;AACA;;AACA;;;;AAXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA,MAAMA,kBAAkB,GAAG,IAAIC,+BAAJ,EAA3B,C,CAEA;;AACAC,sBAAWC,WAAX,CACEC,uCADF,EAEGC,KAAD,IAAiB;AACfL,EAAAA,kBAAkB,CAACM,IAAnB,CAAwBF,uCAAxB,EAAmDC,KAAnD;AACD,CAJH;;eAOe,EACb,GAAGH,qBADU;AAEbK,EAAAA,YAAY,EAAEP;AAFD,C","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\nimport {DEVICE_CONNECTIVITY_EVENT} from './privateTypes';\n\nconst nativeEventEmitter = new NativeEventEmitter();\n\n// Listen to connectivity events\nRNCNetInfo.addListener(\n DEVICE_CONNECTIVITY_EVENT,\n (event): void => {\n nativeEventEmitter.emit(DEVICE_CONNECTIVITY_EVENT, event);\n },\n);\n\nexport default {\n ...RNCNetInfo,\n eventEmitter: nativeEventEmitter,\n};\n"]} \ No newline at end of file +{"version":3,"names":["_reactNative","require","_nativeModule","_interopRequireDefault","_privateTypes","obj","__esModule","default","nativeEventEmitter","NativeEventEmitter","RNCNetInfo","addListener","DEVICE_CONNECTIVITY_EVENT","event","emit","_default","exports","eventEmitter"],"sources":["nativeInterface.web.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\nimport {DEVICE_CONNECTIVITY_EVENT} from './privateTypes';\n\nconst nativeEventEmitter = new NativeEventEmitter();\n\n// Listen to connectivity events\nRNCNetInfo.addListener(DEVICE_CONNECTIVITY_EVENT, (event): void => {\n nativeEventEmitter.emit(DEVICE_CONNECTIVITY_EVENT, event);\n});\n\nexport default {\n ...RNCNetInfo,\n eventEmitter: nativeEventEmitter,\n};\n"],"mappings":";;;;;;AASA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AAAyD,SAAAE,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAXzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA,MAAMG,kBAAkB,GAAG,IAAIC,+BAAkB,CAAC,CAAC;;AAEnD;AACAC,qBAAU,CAACC,WAAW,CAACC,uCAAyB,EAAGC,KAAK,IAAW;EACjEL,kBAAkB,CAACM,IAAI,CAACF,uCAAyB,EAAEC,KAAK,CAAC;AAC3D,CAAC,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,CAAAT,OAAA,GAEY;EACb,GAAGG,qBAAU;EACbO,YAAY,EAAET;AAChB,CAAC"} -\ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js -index 8fd237d..6d06932 100644 +index 8fd237d..809b67c 100644 --- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js +++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js -@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.default = void 0; -- - var _reactNative = require("react-native"); -- - /** - * Copyright (c) Facebook, Inc. and its affiliates. - * -@@ -15,7 +13,15 @@ var _reactNative = require("react-native"); +@@ -15,7 +15,14 @@ var _reactNative = require("react-native"); * * @format */ -const RNCNetInfo = _reactNative.NativeModules.RNCNetInfo; -var _default = RNCNetInfo; -exports.default = _default; -+ +// React Native sets `__turboModuleProxy` on global when TurboModules are enabled. +// Currently, this is the recommended way to detect TurboModules. +// https://reactnative.dev/docs/the-new-architecture/backward-compatibility-turbomodules#unify-the-javascript-specs @@ -1096,31 +794,18 @@ index 8fd237d..6d06932 100644 //# sourceMappingURL=nativeModule.js.map \ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js.map -index dcf6159..5d5bb50 100644 +index dcf6159..cc4cc7a 100644 --- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js.map +++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.js.map @@ -1 +1 @@ -{"version":3,"sources":["nativeModule.ts"],"names":["RNCNetInfo","NativeModules"],"mappings":";;;;;;;AASA;;AATA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA,MAAMA,UAA+B,GAAGC,2BAAcD,UAAtD;eAEeA,U","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeModules} from 'react-native';\nimport {NetInfoNativeModule} from './privateTypes';\n\nconst RNCNetInfo: NetInfoNativeModule = NativeModules.RNCNetInfo;\n\nexport default RNCNetInfo;\n"]} \ No newline at end of file +{"version":3,"names":["_reactNative","require","isTurboModuleEnabled","global","__turboModuleProxy","RNCNetInfo","default","NativeModules","_default","exports"],"sources":["nativeModule.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeModules} from 'react-native';\nimport {NetInfoNativeModule} from './privateTypes';\n\n// React Native sets `__turboModuleProxy` on global when TurboModules are enabled.\n// Currently, this is the recommended way to detect TurboModules.\n// https://reactnative.dev/docs/the-new-architecture/backward-compatibility-turbomodules#unify-the-javascript-specs\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst isTurboModuleEnabled = global.__turboModuleProxy != null;\n\nconst RNCNetInfo: NetInfoNativeModule = isTurboModuleEnabled\n ? // eslint-disable-next-line @typescript-eslint/no-var-requires\n require('./NativeRNCNetInfo').default\n : NativeModules.RNCNetInfo;\n\nexport default RNCNetInfo;\n"],"mappings":";;;;;;AASA,IAAAA,YAAA,GAAAC,OAAA;AATA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA,MAAMC,oBAAoB,GAAGC,MAAM,CAACC,kBAAkB,IAAI,IAAI;AAE9D,MAAMC,UAA+B,GAAGH,oBAAoB;AACxD;AACAD,OAAO,CAAC,oBAAoB,CAAC,CAACK,OAAO,GACrCC,0BAAa,CAACF,UAAU;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAH,OAAA,GAEdD,UAAU"} -\ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js -index ad66cbe..0da582c 100644 +index ad66cbe..22f56b3 100644 --- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js +++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js -@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.default = void 0; -- - var _privateTypes = require("./privateTypes"); -- - var _types = require("./types"); -- - /** - * Copyright (c) Facebook, Inc. and its affiliates. - * -@@ -17,12 +14,23 @@ var _types = require("./types"); +@@ -17,6 +17,15 @@ var _types = require("./types"); * * @format */ @@ -1135,280 +820,40 @@ index ad66cbe..0da582c 100644 + // Use a constant test of this form because in SSR on next.js, optional chaining is not sufficient, // but this test correctly detects that window is not available and allows for conditionals before access --const isWindowPresent = typeof window !== 'undefined'; // Check if window exists and if the browser supports the connection API -+const isWindowPresent = typeof window !== 'undefined'; - --const connection = isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS') ? window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection : undefined; // Map browser types to native types -+// Check if window exists and if the browser supports the connection API -+const connection = isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS') ? window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection : undefined; + const isWindowPresent = typeof window !== 'undefined'; // Check if window exists and if the browser supports the connection API +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js.map +index 7dcfca9..e7acad4 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["nativeModule.web.ts"],"names":["isWindowPresent","window","connection","hasOwnProperty","navigator","mozConnection","webkitConnection","undefined","typeMapping","bluetooth","NetInfoStateType","cellular","ethernet","none","other","unknown","wifi","wimax","mixed","effectiveTypeMapping","NetInfoCellularGeneration","getCurrentState","_requestedInterface","isConnected","onLine","baseState","isInternetReachable","state","type","details","isConnectionExpensive","saveData","cellularGeneration","effectiveType","carrier","ipAddress","subnet","ssid","bssid","strength","frequency","linkSpeed","rxLinkSpeed","txLinkSpeed","handlers","nativeHandlers","RNCNetInfo","addListener","handler","DEVICE_CONNECTIVITY_EVENT","nativeHandler","addEventListener","push","removeListeners","index","indexOf","removeEventListener","splice","requestedInterface","configure"],"mappings":";;;;;;;AASA;;AAKA;;AAdA;AACA;AACA;AACA;AACA;AACA;AACA;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AxB,EAAmCD,aAAnC,EAAkD,KAAlD;AACD;AACF,WAZ6B,CAc9B;;;AACAN,UAAAA,QAAQ,CAACQ,IAAT,CAAcJ,OAAd;AACAH,UAAAA,cAAc,CAACO,IAAf,CAAoBF,aAApB;AAEA;AACD;AApBH;AAsBD,GAxBqC;;AA0BtCG,EAAAA,eAAe,CAACzB,IAAD,EAAOoB,OAAP,EAAsB;AACnC,YAAQpB,IAAR;AACE,WAAKqB,uCAAL;AAAgC;AAC9B;AACA,gBAAMK,KAAK,GAAGV,QAAQ,CAACW,OAAT,CAAiBP,OAAjB,CAAd;AACA,gBAAME,aAAa,GAAGL,cAAc,CAACS,KAAD,CAApC;;AAEA,cAAIpD,UAAJ,EAAgB;AACdA,YAAAA,UAAU,CAACsD,mBAAX,CAA+B,QAA/B,EAAyCN,aAAzC;AACD,WAFD,MAEO;AACL,gBAAIlD,eAAJ,EAAqB;AACnBC,cAAAA,MAAM,CAACuD,mBAAP,CAA2B,QAA3B,EAAqCN,aAArC;AACAjD,cAAAA,MAAM,CAACuD,mBAAP,CAA2B,SAA3B,EAAsCN,aAAtC;AACD;AACF,WAZ6B,CAc9B;;;AACAN,UAAAA,QAAQ,CAACa,MAAT,CAAgBH,KAAhB,EAAuB,CAAvB;AACAT,UAAAA,cAAc,CAACY,MAAf,CAAsBH,KAAtB,EAA6B,CAA7B;AAEA;AACD;AApBH;AAsBD,GAjDqC;;AAmDtC,QAAMjC,eAAN,CAAsBqC,kBAAtB,EAA6E;AAC3E,WAAOrC,eAAe,CAACqC,kBAAD,CAAtB;AACD,GArDqC;;AAuDtCC,EAAAA,SAAS,GAAS;AAChB;AACD;;AAzDqC,CAAxC;eA4Deb,U","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {\n DEVICE_CONNECTIVITY_EVENT,\n NetInfoNativeModule,\n NetInfoNativeModuleState,\n} from './privateTypes';\nimport {\n NetInfoBluetoothState,\n NetInfoCellularGeneration,\n NetInfoCellularState,\n NetInfoEthernetState,\n NetInfoNoConnectionState,\n NetInfoOtherState,\n NetInfoState,\n NetInfoStateType,\n NetInfoUnknownState,\n NetInfoWifiState,\n NetInfoWimaxState,\n} from './types';\n\n// See https://wicg.github.io/netinfo/#dom-connectiontype\ntype ConnectionType =\n | 'bluetooth'\n | 'cellular'\n | 'ethernet'\n | 'mixed'\n | 'none'\n | 'other'\n | 'unknown'\n | 'wifi'\n | 'wimax';\n\n// See https://wicg.github.io/netinfo/#dom-effectiveconnectiontype\ntype ConnectionEffectiveType = '2g' | '3g' | '4g' | 'slow-2g';\n\n// https://wicg.github.io/netinfo/#dom-networkinformation-savedata\ntype ConnectionSaveData = boolean;\n\ninterface Events {\n change: Event;\n}\n\ninterface Connection {\n type: ConnectionType;\n effectiveType: ConnectionEffectiveType;\n saveData: ConnectionSaveData;\n addEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\n// Create (optional) connection APIs on navigator\ndeclare global {\n interface Navigator {\n connection?: Connection;\n mozConnection?: Connection;\n webkitConnection?: Connection;\n }\n}\n// Use a constant test of this form because in SSR on next.js, optional chaining is not sufficient,\n// but this test correctly detects that window is not available and allows for conditionals before access\nconst isWindowPresent = typeof window !== 'undefined';\n\n// Check if window exists and if the browser supports the connection API\nconst connection = (isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS'))\n ? window.navigator.connection ||\n window.navigator.mozConnection ||\n window.navigator.webkitConnection\n : undefined;\n\n// Map browser types to native types\nconst typeMapping: Record = {\n bluetooth: NetInfoStateType.bluetooth,\n cellular: NetInfoStateType.cellular,\n ethernet: NetInfoStateType.ethernet,\n none: NetInfoStateType.none,\n other: NetInfoStateType.other,\n unknown: NetInfoStateType.unknown,\n wifi: NetInfoStateType.wifi,\n wimax: NetInfoStateType.wimax,\n mixed: NetInfoStateType.other,\n};\nconst effectiveTypeMapping: Record<\n ConnectionEffectiveType,\n NetInfoCellularGeneration\n> = {\n '2g': NetInfoCellularGeneration['2g'],\n '3g': NetInfoCellularGeneration['3g'],\n '4g': NetInfoCellularGeneration['4g'],\n 'slow-2g': NetInfoCellularGeneration['2g'],\n};\n\n// Determine current state of connection\nconst getCurrentState = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _requestedInterface?: string,\n): Pick> => {\n const isConnected = isWindowPresent ? navigator.onLine : false;\n const baseState = {\n isInternetReachable: null,\n };\n\n // If we don't have a connection object, we return minimal information\n if (!connection) {\n if (isConnected) {\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive: false,\n },\n };\n return state;\n }\n\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type: NetInfoStateType.none,\n details: null,\n };\n return state;\n }\n\n // Otherwise try to return detailed information\n const isConnectionExpensive = connection.saveData;\n const type: NetInfoStateType = connection.type\n ? typeMapping[connection.type]\n : isConnected\n ? NetInfoStateType.other\n : NetInfoStateType.unknown;\n\n if (type === NetInfoStateType.bluetooth) {\n const state: NetInfoBluetoothState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.cellular) {\n const state: NetInfoCellularState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n cellularGeneration:\n effectiveTypeMapping[connection.effectiveType] || null,\n carrier: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.ethernet) {\n const state: NetInfoEthernetState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ipAddress: null,\n subnet: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wifi) {\n const state: NetInfoWifiState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ssid: null,\n bssid: null,\n strength: null,\n ipAddress: null,\n subnet: null,\n frequency: null,\n linkSpeed: null,\n rxLinkSpeed: null,\n txLinkSpeed: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wimax) {\n const state: NetInfoWimaxState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.none) {\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type,\n details: null,\n };\n return state;\n } else if (type === NetInfoStateType.unknown) {\n const state: NetInfoUnknownState = {\n ...baseState,\n isConnected,\n isInternetReachable: null,\n type,\n details: null,\n };\n return state;\n }\n\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n};\n\nconst handlers: ((state: NetInfoNativeModuleState) => void)[] = [];\nconst nativeHandlers: (() => void)[] = [];\n\nconst RNCNetInfo: NetInfoNativeModule = {\n addListener(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n const nativeHandler = (): void => {\n handler(getCurrentState());\n };\n\n if (connection) {\n connection.addEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.addEventListener('online', nativeHandler, false);\n window.addEventListener('offline', nativeHandler, false);\n }\n }\n\n // Remember handlers\n handlers.push(handler);\n nativeHandlers.push(nativeHandler);\n\n break;\n }\n }\n },\n\n removeListeners(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n // Get native handler\n const index = handlers.indexOf(handler);\n const nativeHandler = nativeHandlers[index];\n\n if (connection) {\n connection.removeEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.removeEventListener('online', nativeHandler);\n window.removeEventListener('offline', nativeHandler);\n }\n }\n\n // Remove handlers\n handlers.splice(index, 1);\n nativeHandlers.splice(index, 1);\n\n break;\n }\n }\n },\n\n async getCurrentState(requestedInterface): Promise {\n return getCurrentState(requestedInterface);\n },\n\n configure(): void {\n return;\n },\n};\n\nexport default RNCNetInfo;\n"]} +\ No newline at end of file ++{"version":3,"names":["_privateTypes","require","_types","isWindowPresent","window","connection","hasOwnProperty","navigator","mozConnection","webkitConnection","undefined","typeMapping","bluetooth","NetInfoStateType","cellular","ethernet","none","other","unknown","wifi","wimax","mixed","effectiveTypeMapping","NetInfoCellularGeneration","getCurrentState","_requestedInterface","isConnected","onLine","baseState","isInternetReachable","state","type","details","isConnectionExpensive","saveData","cellularGeneration","effectiveType","carrier","ipAddress","subnet","ssid","bssid","strength","frequency","linkSpeed","rxLinkSpeed","txLinkSpeed","handlers","nativeHandlers","RNCNetInfo","addListener","handler","DEVICE_CONNECTIVITY_EVENT","nativeHandler","addEventListener","push","removeListeners","index","indexOf","removeEventListener","splice","requestedInterface","configure","_default","exports","default"],"sources":["nativeModule.web.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {\n DEVICE_CONNECTIVITY_EVENT,\n NetInfoNativeModule,\n NetInfoNativeModuleState,\n} from './privateTypes';\nimport {\n NetInfoBluetoothState,\n NetInfoCellularGeneration,\n NetInfoCellularState,\n NetInfoEthernetState,\n NetInfoNoConnectionState,\n NetInfoOtherState,\n NetInfoState,\n NetInfoStateType,\n NetInfoUnknownState,\n NetInfoWifiState,\n NetInfoWimaxState,\n} from './types';\n\n// See https://wicg.github.io/netinfo/#dom-connectiontype\ntype ConnectionType =\n | 'bluetooth'\n | 'cellular'\n | 'ethernet'\n | 'mixed'\n | 'none'\n | 'other'\n | 'unknown'\n | 'wifi'\n | 'wimax';\n\n// See https://wicg.github.io/netinfo/#dom-effectiveconnectiontype\ntype ConnectionEffectiveType = '2g' | '3g' | '4g' | 'slow-2g';\n\n// https://wicg.github.io/netinfo/#dom-networkinformation-savedata\ntype ConnectionSaveData = boolean;\n\ninterface Events {\n change: Event;\n}\n\ninterface Connection {\n type: ConnectionType;\n effectiveType: ConnectionEffectiveType;\n saveData: ConnectionSaveData;\n addEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\n// Create (optional) connection APIs on navigator\ndeclare global {\n interface Navigator {\n connection?: Connection;\n mozConnection?: Connection;\n webkitConnection?: Connection;\n }\n}\n// Use a constant test of this form because in SSR on next.js, optional chaining is not sufficient,\n// but this test correctly detects that window is not available and allows for conditionals before access\nconst isWindowPresent = typeof window !== 'undefined';\n\n// Check if window exists and if the browser supports the connection API\nconst connection = (isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS'))\n ? window.navigator.connection ||\n window.navigator.mozConnection ||\n window.navigator.webkitConnection\n : undefined;\n\n// Map browser types to native types\nconst typeMapping: Record = {\n bluetooth: NetInfoStateType.bluetooth,\n cellular: NetInfoStateType.cellular,\n ethernet: NetInfoStateType.ethernet,\n none: NetInfoStateType.none,\n other: NetInfoStateType.other,\n unknown: NetInfoStateType.unknown,\n wifi: NetInfoStateType.wifi,\n wimax: NetInfoStateType.wimax,\n mixed: NetInfoStateType.other,\n};\nconst effectiveTypeMapping: Record<\n ConnectionEffectiveType,\n NetInfoCellularGeneration\n> = {\n '2g': NetInfoCellularGeneration['2g'],\n '3g': NetInfoCellularGeneration['3g'],\n '4g': NetInfoCellularGeneration['4g'],\n 'slow-2g': NetInfoCellularGeneration['2g'],\n};\n\n// Determine current state of connection\nconst getCurrentState = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _requestedInterface?: string,\n): Pick> => {\n const isConnected = isWindowPresent ? navigator.onLine : false;\n const baseState = {\n isInternetReachable: null,\n };\n\n // If we don't have a connection object, we return minimal information\n if (!connection) {\n if (isConnected) {\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive: false,\n },\n };\n return state;\n }\n\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type: NetInfoStateType.none,\n details: null,\n };\n return state;\n }\n\n // Otherwise try to return detailed information\n const isConnectionExpensive = connection.saveData;\n const type: NetInfoStateType = connection.type\n ? typeMapping[connection.type]\n : isConnected\n ? NetInfoStateType.other\n : NetInfoStateType.unknown;\n\n if (type === NetInfoStateType.bluetooth) {\n const state: NetInfoBluetoothState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.cellular) {\n const state: NetInfoCellularState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n cellularGeneration:\n effectiveTypeMapping[connection.effectiveType] || null,\n carrier: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.ethernet) {\n const state: NetInfoEthernetState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ipAddress: null,\n subnet: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wifi) {\n const state: NetInfoWifiState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ssid: null,\n bssid: null,\n strength: null,\n ipAddress: null,\n subnet: null,\n frequency: null,\n linkSpeed: null,\n rxLinkSpeed: null,\n txLinkSpeed: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wimax) {\n const state: NetInfoWimaxState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.none) {\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type,\n details: null,\n };\n return state;\n } else if (type === NetInfoStateType.unknown) {\n const state: NetInfoUnknownState = {\n ...baseState,\n isConnected,\n isInternetReachable: null,\n type,\n details: null,\n };\n return state;\n }\n\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n};\n\nconst handlers: ((state: NetInfoNativeModuleState) => void)[] = [];\nconst nativeHandlers: (() => void)[] = [];\n\nconst RNCNetInfo: NetInfoNativeModule = {\n addListener(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n const nativeHandler = (): void => {\n handler(getCurrentState());\n };\n\n if (connection) {\n connection.addEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.addEventListener('online', nativeHandler, false);\n window.addEventListener('offline', nativeHandler, false);\n }\n }\n\n // Remember handlers\n handlers.push(handler);\n nativeHandlers.push(nativeHandler);\n\n break;\n }\n }\n },\n\n removeListeners(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n // Get native handler\n const index = handlers.indexOf(handler);\n const nativeHandler = nativeHandlers[index];\n\n if (connection) {\n connection.removeEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.removeEventListener('online', nativeHandler);\n window.removeEventListener('offline', nativeHandler);\n }\n }\n\n // Remove handlers\n handlers.splice(index, 1);\n nativeHandlers.splice(index, 1);\n\n break;\n }\n }\n },\n\n async getCurrentState(requestedInterface): Promise {\n return getCurrentState(requestedInterface);\n },\n\n configure(): void {\n return;\n },\n};\n\nexport default RNCNetInfo;\n"],"mappings":";;;;;;AASA,IAAAA,aAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AAdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAqBA;;AAYA;;AAGA;;AAqBA;;AAQA;AACA;AACA,MAAME,eAAe,GAAG,OAAOC,MAAM,KAAK,WAAW;;AAErD;AACA,MAAMC,UAAU,GAAIF,eAAe,IAAI,CAACC,MAAM,CAACE,cAAc,CAAC,OAAO,CAAC,IAAI,CAACF,MAAM,CAACE,cAAc,CAAC,OAAO,CAAC,GACrGF,MAAM,CAACG,SAAS,CAACF,UAAU,IAC3BD,MAAM,CAACG,SAAS,CAACC,aAAa,IAC9BJ,MAAM,CAACG,SAAS,CAACE,gBAAgB,G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AAkB,CAAC;EAC5C,CAAC;EAEDC,SAASA,CAAA,EAAS;IAChB;EACF;AACF,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEahB,UAAU"} +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js.map +index 2838e9a..1ce5dbb 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["privateTypes.ts"],"names":["DEVICE_CONNECTIVITY_EVENT"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIO,MAAMA,yBAAyB,GAAG,gCAAlC,C,CAEP","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NetInfoConfiguration, NetInfoState} from './types';\n\nexport const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange';\n\n// Certain properties are optional when sent by the native module and are handled by the JS code\nexport type NetInfoNativeModuleState = Pick<\n NetInfoState,\n Exclude\n> & {isInternetReachable?: boolean};\n\nexport interface Events {\n [DEVICE_CONNECTIVITY_EVENT]: NetInfoNativeModuleState;\n}\n\nexport interface NetInfoNativeModule {\n configure: (config: Partial) => void;\n getCurrentState: (\n requestedInterface?: string,\n ) => Promise;\n addListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeListeners(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\nexport type NetInfoInternetReachabilityChangeListener = (\n isInternetReachable: boolean | null | undefined,\n) => void;\n"]} +\ No newline at end of file ++{"version":3,"names":["DEVICE_CONNECTIVITY_EVENT","exports"],"sources":["privateTypes.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NetInfoConfiguration, NetInfoState} from './types';\n\nexport const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange';\n\n// Certain properties are optional when sent by the native module and are handled by the JS code\nexport type NetInfoNativeModuleState = Pick<\n NetInfoState,\n Exclude\n> & {isInternetReachable?: boolean};\n\nexport interface Events {\n [DEVICE_CONNECTIVITY_EVENT]: NetInfoNativeModuleState;\n}\n\nexport interface NetInfoNativeModule {\n configure: (config: Partial) => void;\n getCurrentState: (\n requestedInterface?: string,\n ) => Promise;\n addListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeListeners(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\nexport type NetInfoInternetReachabilityChangeListener = (\n isInternetReachable: boolean | null | undefined,\n) => void;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIO,MAAMA,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,gCAAgC;;AAEzE"} +diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js +index 80dce38..dbbb9e3 100644 +--- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js ++++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js +@@ -11,14 +11,20 @@ var _internetReachability = _interopRequireDefault(require("./internetReachabili -+// Map browser types to native types - const typeMapping = { - bluetooth: _types.NetInfoStateType.bluetooth, - cellular: _types.NetInfoStateType.cellular, -@@ -39,17 +47,20 @@ const effectiveTypeMapping = { - '3g': _types.NetInfoCellularGeneration['3g'], - '4g': _types.NetInfoCellularGeneration['4g'], - 'slow-2g': _types.NetInfoCellularGeneration['2g'] --}; // Determine current state of connection -+}; + var PrivateTypes = _interopRequireWildcard(require("./privateTypes")); -+// Determine current state of connection - const getCurrentState = _requestedInterface => { - const isConnected = isWindowPresent ? navigator.onLine : false; - const baseState = { - isInternetReachable: null -- }; // If we don't have a connection object, we return minimal information -+ }; - -+ // If we don't have a connection object, we return minimal information - if (!connection) { - if (isConnected) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type: _types.NetInfoStateType.other, - details: { -@@ -58,22 +69,22 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } +-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: false, - isInternetReachable: false, - type: _types.NetInfoStateType.none, - details: null - }; - return state; -- } // Otherwise try to return detailed information +-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -+ } ++function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } ++function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -+ // Otherwise try to return detailed information - const isConnectionExpensive = connection.saveData; - const type = connection.type ? typeMapping[connection.type] : isConnected ? _types.NetInfoStateType.other : _types.NetInfoStateType.unknown; -- - if (type === _types.NetInfoStateType.bluetooth) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type, - details: { -@@ -82,7 +93,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === _types.NetInfoStateType.cellular) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type, - details: { -@@ -93,7 +105,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === _types.NetInfoStateType.ethernet) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type, - details: { -@@ -104,7 +117,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === _types.NetInfoStateType.wifi) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type, - details: { -@@ -122,7 +136,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === _types.NetInfoStateType.wimax) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type, - details: { -@@ -131,7 +146,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === _types.NetInfoStateType.none) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: false, - isInternetReachable: false, - type, -@@ -139,7 +155,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === _types.NetInfoStateType.unknown) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected, - isInternetReachable: null, - type, -@@ -147,8 +164,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } -- -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type: _types.NetInfoStateType.other, - details: { -@@ -157,7 +174,6 @@ const getCurrentState = _requestedInterface => { - }; - return state; - }; -- - const handlers = []; - const nativeHandlers = []; - const RNCNetInfo = { -@@ -168,7 +184,6 @@ const RNCNetInfo = { - const nativeHandler = () => { - handler(getCurrentState()); - }; -- - if (connection) { - connection.addEventListener('change', nativeHandler); - } else { -@@ -176,16 +191,15 @@ const RNCNetInfo = { - window.addEventListener('online', nativeHandler, false); - window.addEventListener('offline', nativeHandler, false); - } -- } // Remember handlers -- -+ } - -+ // Remember handlers - handlers.push(handler); - nativeHandlers.push(nativeHandler); - break; - } - } - }, -- - removeListeners(type, handler) { - switch (type) { - case _privateTypes.DEVICE_CONNECTIVITY_EVENT: -@@ -193,7 +207,6 @@ const RNCNetInfo = { - // Get native handler - const index = handlers.indexOf(handler); - const nativeHandler = nativeHandlers[index]; -- - if (connection) { - connection.removeEventListener('change', nativeHandler); - } else { -@@ -201,25 +214,21 @@ const RNCNetInfo = { - window.removeEventListener('online', nativeHandler); - window.removeEventListener('offline', nativeHandler); - } -- } // Remove handlers -- -+ } - -+ // Remove handlers - handlers.splice(index, 1); - nativeHandlers.splice(index, 1); - break; - } - } - }, -- - async getCurrentState(requestedInterface) { - return getCurrentState(requestedInterface); - }, -- - configure() { - return; - } -- - }; --var _default = RNCNetInfo; --exports.default = _default; -+var _default = exports.default = RNCNetInfo; - //# sourceMappingURL=nativeModule.web.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js.map -index 7dcfca9..a0632f9 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/nativeModule.web.js.map -@@ -1 +1 @@ --{"version":3,"sources":["nativeModule.web.ts"],"names":["isWindowPresent","window","connection","hasOwnProperty","navigator","mozConnection","webkitConnection","undefined","typeMapping","bluetooth","NetInfoStateType","cellular","ethernet","none","other","unknown","wifi","wimax","mixed","effectiveTypeMapping","NetInfoCellularGeneration","getCurrentState","_requestedInterface","isConnected","onLine","baseState","isInternetReachable","state","type","details","isConnectionExpensive","saveData","cellularGeneration","effectiveType","carrier","ipAddress","subnet","ssid","bssid","strength","frequency","linkSpeed","rxLinkSpeed","txLinkSpeed","handlers","nativeHandlers","RNCNetInfo","addListener","handler","DEVICE_CONNECTIVITY_EVENT","nativeHandler","addEventListener","push","removeListeners","index","indexOf","removeEventListener","splice","requestedInterface","configure"],"mappings":";;;;;;;AASA;;AAKA;;AAdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAiEA;AACA;AACA,MAAMA,eAAe,GAAG,OAAOC,MAAP,KAAkB,WAA1C,C,CAEA;;AACA,MAAMC,UAAU,GAAIF,eAAe,IAAI,CAACC,MAAM,CAACE,cAAP,CAAsB,OAAtB,CAApB,IAAsD,CAACF,MAAM,CAACE,cAAP,CAAsB,OAAtB,CAAxD,GACfF,MAAM,CAACG,SAAP,CAAiBF,UAAjB,IACAD,MAAM,CAACG,SAAP,CAAiBC,aADjB,IAEAJ,MAAM,CAACG,SAAP,CAAiBE,gBAHF,GAIfC,SAJJ,C,CAMA;;AACA,MAAMC,WAAqD,GAAG;AAC5DC,EAAAA,SAAS,EAAEC,wBAAiBD,SADgC;AAE5DE,EAAAA,QAAQ,EAAED,wBAAiBC,QAFiC;AAG5DC,EAAAA,QAAQ,EAAEF,wBAAiBE,QAHiC;AAI5DC,EAAAA,IAAI,EAAEH,wBAAiBG,IAJqC;AAK5DC,EAAAA,KAAK,EAAEJ,wBAAiBI,KALoC;AAM5DC,EAAAA,OAAO,EAAEL,wBAAiBK,OANkC;AAO5DC,EAAAA,IAAI,EAAEN,wBAAiBM,IAPqC;AAQ5DC,EAAAA,KAAK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AAAA,QAAQ,CAACa,MAAT,CAAgBH,KAAhB,EAAuB,CAAvB;AACAT,UAAAA,cAAc,CAACY,MAAf,CAAsBH,KAAtB,EAA6B,CAA7B;AAEA;AACD;AApBH;AAsBD,GAjDqC;;AAmDtC,QAAMjC,eAAN,CAAsBqC,kBAAtB,EAA6E;AAC3E,WAAOrC,eAAe,CAACqC,kBAAD,CAAtB;AACD,GArDqC;;AAuDtCC,EAAAA,SAAS,GAAS;AAChB;AACD;;AAzDqC,CAAxC;eA4Deb,U","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {\n DEVICE_CONNECTIVITY_EVENT,\n NetInfoNativeModule,\n NetInfoNativeModuleState,\n} from './privateTypes';\nimport {\n NetInfoBluetoothState,\n NetInfoCellularGeneration,\n NetInfoCellularState,\n NetInfoEthernetState,\n NetInfoNoConnectionState,\n NetInfoOtherState,\n NetInfoState,\n NetInfoStateType,\n NetInfoUnknownState,\n NetInfoWifiState,\n NetInfoWimaxState,\n} from './types';\n\n// See https://wicg.github.io/netinfo/#dom-connectiontype\ntype ConnectionType =\n | 'bluetooth'\n | 'cellular'\n | 'ethernet'\n | 'mixed'\n | 'none'\n | 'other'\n | 'unknown'\n | 'wifi'\n | 'wimax';\n\n// See https://wicg.github.io/netinfo/#dom-effectiveconnectiontype\ntype ConnectionEffectiveType = '2g' | '3g' | '4g' | 'slow-2g';\n\n// https://wicg.github.io/netinfo/#dom-networkinformation-savedata\ntype ConnectionSaveData = boolean;\n\ninterface Events {\n change: Event;\n}\n\ninterface Connection {\n type: ConnectionType;\n effectiveType: ConnectionEffectiveType;\n saveData: ConnectionSaveData;\n addEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\n// Create (optional) connection APIs on navigator\ndeclare global {\n interface Navigator {\n connection?: Connection;\n mozConnection?: Connection;\n webkitConnection?: Connection;\n }\n}\n// Use a constant test of this form because in SSR on next.js, optional chaining is not sufficient,\n// but this test correctly detects that window is not available and allows for conditionals before access\nconst isWindowPresent = typeof window !== 'undefined';\n\n// Check if window exists and if the browser supports the connection API\nconst connection = (isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS'))\n ? window.navigator.connection ||\n window.navigator.mozConnection ||\n window.navigator.webkitConnection\n : undefined;\n\n// Map browser types to native types\nconst typeMapping: Record = {\n bluetooth: NetInfoStateType.bluetooth,\n cellular: NetInfoStateType.cellular,\n ethernet: NetInfoStateType.ethernet,\n none: NetInfoStateType.none,\n other: NetInfoStateType.other,\n unknown: NetInfoStateType.unknown,\n wifi: NetInfoStateType.wifi,\n wimax: NetInfoStateType.wimax,\n mixed: NetInfoStateType.other,\n};\nconst effectiveTypeMapping: Record<\n ConnectionEffectiveType,\n NetInfoCellularGeneration\n> = {\n '2g': NetInfoCellularGeneration['2g'],\n '3g': NetInfoCellularGeneration['3g'],\n '4g': NetInfoCellularGeneration['4g'],\n 'slow-2g': NetInfoCellularGeneration['2g'],\n};\n\n// Determine current state of connection\nconst getCurrentState = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _requestedInterface?: string,\n): Pick> => {\n const isConnected = isWindowPresent ? navigator.onLine : false;\n const baseState = {\n isInternetReachable: null,\n };\n\n // If we don't have a connection object, we return minimal information\n if (!connection) {\n if (isConnected) {\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive: false,\n },\n };\n return state;\n }\n\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type: NetInfoStateType.none,\n details: null,\n };\n return state;\n }\n\n // Otherwise try to return detailed information\n const isConnectionExpensive = connection.saveData;\n const type: NetInfoStateType = connection.type\n ? typeMapping[connection.type]\n : isConnected\n ? NetInfoStateType.other\n : NetInfoStateType.unknown;\n\n if (type === NetInfoStateType.bluetooth) {\n const state: NetInfoBluetoothState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.cellular) {\n const state: NetInfoCellularState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n cellularGeneration:\n effectiveTypeMapping[connection.effectiveType] || null,\n carrier: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.ethernet) {\n const state: NetInfoEthernetState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ipAddress: null,\n subnet: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wifi) {\n const state: NetInfoWifiState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ssid: null,\n bssid: null,\n strength: null,\n ipAddress: null,\n subnet: null,\n frequency: null,\n linkSpeed: null,\n rxLinkSpeed: null,\n txLinkSpeed: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wimax) {\n const state: NetInfoWimaxState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.none) {\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type,\n details: null,\n };\n return state;\n } else if (type === NetInfoStateType.unknown) {\n const state: NetInfoUnknownState = {\n ...baseState,\n isConnected,\n isInternetReachable: null,\n type,\n details: null,\n };\n return state;\n }\n\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n};\n\nconst handlers: ((state: NetInfoNativeModuleState) => void)[] = [];\nconst nativeHandlers: (() => void)[] = [];\n\nconst RNCNetInfo: NetInfoNativeModule = {\n addListener(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n const nativeHandler = (): void => {\n handler(getCurrentState());\n };\n\n if (connection) {\n connection.addEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.addEventListener('online', nativeHandler, false);\n window.addEventListener('offline', nativeHandler, false);\n }\n }\n\n // Remember handlers\n handlers.push(handler);\n nativeHandlers.push(nativeHandler);\n\n break;\n }\n }\n },\n\n removeListeners(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n // Get native handler\n const index = handlers.indexOf(handler);\n const nativeHandler = nativeHandlers[index];\n\n if (connection) {\n connection.removeEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.removeEventListener('online', nativeHandler);\n window.removeEventListener('offline', nativeHandler);\n }\n }\n\n // Remove handlers\n handlers.splice(index, 1);\n nativeHandlers.splice(index, 1);\n\n break;\n }\n }\n },\n\n async getCurrentState(requestedInterface): Promise {\n return getCurrentState(requestedInterface);\n },\n\n configure(): void {\n return;\n },\n};\n\nexport default RNCNetInfo;\n"]} -\ No newline at end of file -+{"version":3,"names":["_privateTypes","require","_types","isWindowPresent","window","connection","hasOwnProperty","navigator","mozConnection","webkitConnection","undefined","typeMapping","bluetooth","NetInfoStateType","cellular","ethernet","none","other","unknown","wifi","wimax","mixed","effectiveTypeMapping","NetInfoCellularGeneration","getCurrentState","_requestedInterface","isConnected","onLine","baseState","isInternetReachable","state","type","details","isConnectionExpensive","saveData","cellularGeneration","effectiveType","carrier","ipAddress","subnet","ssid","bssid","strength","frequency","linkSpeed","rxLinkSpeed","txLinkSpeed","handlers","nativeHandlers","RNCNetInfo","addListener","handler","DEVICE_CONNECTIVITY_EVENT","nativeHandler","addEventListener","push","removeListeners","index","indexOf","removeEventListener","splice","requestedInterface","configure","_default","exports","default"],"sources":["nativeModule.web.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {\n DEVICE_CONNECTIVITY_EVENT,\n NetInfoNativeModule,\n NetInfoNativeModuleState,\n} from './privateTypes';\nimport {\n NetInfoBluetoothState,\n NetInfoCellularGeneration,\n NetInfoCellularState,\n NetInfoEthernetState,\n NetInfoNoConnectionState,\n NetInfoOtherState,\n NetInfoState,\n NetInfoStateType,\n NetInfoUnknownState,\n NetInfoWifiState,\n NetInfoWimaxState,\n} from './types';\n\n// See https://wicg.github.io/netinfo/#dom-connectiontype\ntype ConnectionType =\n | 'bluetooth'\n | 'cellular'\n | 'ethernet'\n | 'mixed'\n | 'none'\n | 'other'\n | 'unknown'\n | 'wifi'\n | 'wimax';\n\n// See https://wicg.github.io/netinfo/#dom-effectiveconnectiontype\ntype ConnectionEffectiveType = '2g' | '3g' | '4g' | 'slow-2g';\n\n// https://wicg.github.io/netinfo/#dom-networkinformation-savedata\ntype ConnectionSaveData = boolean;\n\ninterface Events {\n change: Event;\n}\n\ninterface Connection {\n type: ConnectionType;\n effectiveType: ConnectionEffectiveType;\n saveData: ConnectionSaveData;\n addEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\n// Create (optional) connection APIs on navigator\ndeclare global {\n interface Navigator {\n connection?: Connection;\n mozConnection?: Connection;\n webkitConnection?: Connection;\n }\n}\n// Use a constant test of this form because in SSR on next.js, optional chaining is not sufficient,\n// but this test correctly detects that window is not available and allows for conditionals before access\nconst isWindowPresent = typeof window !== 'undefined';\n\n// Check if window exists and if the browser supports the connection API\nconst connection = (isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS'))\n ? window.navigator.connection ||\n window.navigator.mozConnection ||\n window.navigator.webkitConnection\n : undefined;\n\n// Map browser types to native types\nconst typeMapping: Record = {\n bluetooth: NetInfoStateType.bluetooth,\n cellular: NetInfoStateType.cellular,\n ethernet: NetInfoStateType.ethernet,\n none: NetInfoStateType.none,\n other: NetInfoStateType.other,\n unknown: NetInfoStateType.unknown,\n wifi: NetInfoStateType.wifi,\n wimax: NetInfoStateType.wimax,\n mixed: NetInfoStateType.other,\n};\nconst effectiveTypeMapping: Record<\n ConnectionEffectiveType,\n NetInfoCellularGeneration\n> = {\n '2g': NetInfoCellularGeneration['2g'],\n '3g': NetInfoCellularGeneration['3g'],\n '4g': NetInfoCellularGeneration['4g'],\n 'slow-2g': NetInfoCellularGeneration['2g'],\n};\n\n// Determine current state of connection\nconst getCurrentState = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _requestedInterface?: string,\n): Pick> => {\n const isConnected = isWindowPresent ? navigator.onLine : false;\n const baseState = {\n isInternetReachable: null,\n };\n\n // If we don't have a connection object, we return minimal information\n if (!connection) {\n if (isConnected) {\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive: false,\n },\n };\n return state;\n }\n\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type: NetInfoStateType.none,\n details: null,\n };\n return state;\n }\n\n // Otherwise try to return detailed information\n const isConnectionExpensive = connection.saveData;\n const type: NetInfoStateType = connection.type\n ? typeMapping[connection.type]\n : isConnected\n ? NetInfoStateType.other\n : NetInfoStateType.unknown;\n\n if (type === NetInfoStateType.bluetooth) {\n const state: NetInfoBluetoothState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.cellular) {\n const state: NetInfoCellularState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n cellularGeneration:\n effectiveTypeMapping[connection.effectiveType] || null,\n carrier: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.ethernet) {\n const state: NetInfoEthernetState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ipAddress: null,\n subnet: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wifi) {\n const state: NetInfoWifiState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ssid: null,\n bssid: null,\n strength: null,\n ipAddress: null,\n subnet: null,\n frequency: null,\n linkSpeed: null,\n rxLinkSpeed: null,\n txLinkSpeed: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wimax) {\n const state: NetInfoWimaxState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.none) {\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type,\n details: null,\n };\n return state;\n } else if (type === NetInfoStateType.unknown) {\n const state: NetInfoUnknownState = {\n ...baseState,\n isConnected,\n isInternetReachable: null,\n type,\n details: null,\n };\n return state;\n }\n\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n};\n\nconst handlers: ((state: NetInfoNativeModuleState) => void)[] = [];\nconst nativeHandlers: (() => void)[] = [];\n\nconst RNCNetInfo: NetInfoNativeModule = {\n addListener(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n const nativeHandler = (): void => {\n handler(getCurrentState());\n };\n\n if (connection) {\n connection.addEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.addEventListener('online', nativeHandler, false);\n window.addEventListener('offline', nativeHandler, false);\n }\n }\n\n // Remember handlers\n handlers.push(handler);\n nativeHandlers.push(nativeHandler);\n\n break;\n }\n }\n },\n\n removeListeners(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n // Get native handler\n const index = handlers.indexOf(handler);\n const nativeHandler = nativeHandlers[index];\n\n if (connection) {\n connection.removeEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.removeEventListener('online', nativeHandler);\n window.removeEventListener('offline', nativeHandler);\n }\n }\n\n // Remove handlers\n handlers.splice(index, 1);\n nativeHandlers.splice(index, 1);\n\n break;\n }\n }\n },\n\n async getCurrentState(requestedInterface): Promise {\n return getCurrentState(requestedInterface);\n },\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cAAc,CAACS,KAAK,CAAC;UAE3C,IAAIpD,UAAU,EAAE;YACdA,UAAU,CAACsD,mBAAmB,CAAC,QAAQ,EAAEN,aAAa,CAAC;UACzD,CAAC,MAAM;YACL,IAAIlD,eAAe,EAAE;cACnBC,MAAM,CAACuD,mBAAmB,CAAC,QAAQ,EAAEN,aAAa,CAAC;cACnDjD,MAAM,CAACuD,mBAAmB,CAAC,SAAS,EAAEN,aAAa,CAAC;YACtD;UACF;;UAEA;UACAN,QAAQ,CAACa,MAAM,CAACH,KAAK,EAAE,CAAC,CAAC;UACzBT,cAAc,CAACY,MAAM,CAACH,KAAK,EAAE,CAAC,CAAC;UAE/B;QACF;IACF;EACF,CAAC;EAED,MAAMjC,eAAeA,CAACqC,kBAAkB,EAAqC;IAC3E,OAAOrC,eAAe,CAACqC,kBAAkB,CAAC;EAC5C,CAAC;EAEDC,SAASA,CAAA,EAAS;IAChB;EACF;AACF,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEahB,UAAU"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js -index 3112de1..ca209c1 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js -@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.DEVICE_CONNECTIVITY_EVENT = void 0; -- - /** - * Copyright (c) Facebook, Inc. and its affiliates. - * -@@ -13,7 +12,8 @@ exports.DEVICE_CONNECTIVITY_EVENT = void 0; - * - * @format - */ --const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange'; // Certain properties are optional when sent by the native module and are handled by the JS code - --exports.DEVICE_CONNECTIVITY_EVENT = DEVICE_CONNECTIVITY_EVENT; -+const DEVICE_CONNECTIVITY_EVENT = exports.DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange'; -+ -+// Certain properties are optional when sent by the native module and are handled by the JS code - //# sourceMappingURL=privateTypes.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js.map -index 2838e9a..a56f61c 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/privateTypes.js.map -@@ -1 +1 @@ --{"version":3,"sources":["privateTypes.ts"],"names":["DEVICE_CONNECTIVITY_EVENT"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIO,MAAMA,yBAAyB,GAAG,gCAAlC,C,CAEP","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NetInfoConfiguration, NetInfoState} from './types';\n\nexport const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange';\n\n// Certain properties are optional when sent by the native module and are handled by the JS code\nexport type NetInfoNativeModuleState = Pick<\n NetInfoState,\n Exclude\n> & {isInternetReachable?: boolean};\n\nexport interface Events {\n [DEVICE_CONNECTIVITY_EVENT]: NetInfoNativeModuleState;\n}\n\nexport interface NetInfoNativeModule {\n configure: (config: Partial) => void;\n getCurrentState: (\n requestedInterface?: string,\n ) => Promise;\n addListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeListeners(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\nexport type NetInfoInternetReachabilityChangeListener = (\n isInternetReachable: boolean | null | undefined,\n) => void;\n"]} -\ No newline at end of file -+{"version":3,"names":["DEVICE_CONNECTIVITY_EVENT","exports"],"sources":["privateTypes.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NetInfoConfiguration, NetInfoState} from './types';\n\nexport const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange';\n\n// Certain properties are optional when sent by the native module and are handled by the JS code\nexport type NetInfoNativeModuleState = Pick<\n NetInfoState,\n Exclude\n> & {isInternetReachable?: boolean};\n\nexport interface Events {\n [DEVICE_CONNECTIVITY_EVENT]: NetInfoNativeModuleState;\n}\n\nexport interface NetInfoNativeModule {\n configure: (config: Partial) => void;\n getCurrentState: (\n requestedInterface?: string,\n ) => Promise;\n addListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeListeners(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\nexport type NetInfoInternetReachabilityChangeListener = (\n isInternetReachable: boolean | null | undefined,\n) => void;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIO,MAAMA,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,gCAAgC;;AAEzE"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js -index 80dce38..57b8fbf 100644 ---- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js -+++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js -@@ -4,84 +4,73 @@ Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.default = void 0; -- - var _nativeInterface = _interopRequireDefault(require("./nativeInterface")); -- - var _internetReachability = _interopRequireDefault(require("./internetReachability")); -- - var PrivateTypes = _interopRequireWildcard(require("./privateTypes")); -- --function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -- --function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -- -+function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } -+function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -- --function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } @@ -1423,169 +868,81 @@ index 80dce38..57b8fbf 100644 class State { constructor(configuration) { _defineProperty(this, "_nativeEventSubscription", null); -- - _defineProperty(this, "_subscriptions", new Set()); -- - _defineProperty(this, "_latestState", null); -- - _defineProperty(this, "_internetReachability", void 0); -- +@@ -31,12 +37,11 @@ class State { + _defineProperty(this, "_handleNativeStateUpdate", state => { // Update the internet reachability module - this._internetReachability.update(state); // Convert the state from native to JS shape - - - const convertedState = this._convertState(state); // Update the listeners -+ this._internetReachability.update(state); +- ++ this._internetReachability.update(state); + // Convert the state from native to JS shape + const convertedState = this._convertState(state); - + // Update the listeners this._latestState = convertedState; -- + this._subscriptions.forEach(handler => handler(convertedState)); +@@ -56,10 +61,10 @@ class State { }); -- - _defineProperty(this, "_handleInternetReachabilityUpdate", isInternetReachable => { - if (!this._latestState) { - return; - } -- -- const nextState = { ...this._latestState, -+ const nextState = { -+ ...this._latestState, - isInternetReachable - }; - this._latestState = nextState; -- - this._subscriptions.forEach(handler => handler(nextState)); - }); -- + _defineProperty(this, "_fetchCurrentState", async requestedInterface => { - const state = await _nativeInterface.default.getCurrentState(requestedInterface); // Update the internet reachability module - - this._internetReachability.update(state); // Convert and store the new state - -+ const state = await _nativeInterface.default.getCurrentState(requestedInterface); ++ const state = await _nativeInterface.default.getCurrentState(requestedInterface); ++ // Update the internet reachability module ++ this._internetReachability.update(state); ++ // Convert and store the new state -+ // Update the internet reachability module -+ this._internetReachability.update(state); -+ // Convert and store the new state const convertedState = this._convertState(state); -- - if (!requestedInterface) { - this._latestState = convertedState; -- - this._subscriptions.forEach(handler => handler(convertedState)); - } -- - return convertedState; - }); -- - _defineProperty(this, "_convertState", input => { - if (typeof input.isInternetReachable === 'boolean') { - return input; - } else { -- return { ...input, -+ return { -+ ...input, - isInternetReachable: this._internetReachability.currentState() - }; - } - }); -- - _defineProperty(this, "latest", requestedInterface => { - if (requestedInterface) { - return this._fetchCurrentState(requestedInterface); -@@ -91,44 +80,38 @@ class State { - return this._fetchCurrentState(); - } - }); -- - _defineProperty(this, "add", handler => { - // Add the subscription handler to our set -- this._subscriptions.add(handler); // Send it the latest data we have -- -+ this._subscriptions.add(handler); -+ // Send it the latest data we have - if (this._latestState) { - handler(this._latestState); - } else { - this.latest().then(handler); - } +@@ -121,7 +126,7 @@ class State { }); -- - _defineProperty(this, "remove", handler => { - this._subscriptions.delete(handler); - }); -- - _defineProperty(this, "tearDown", () => { - if (this._internetReachability) { - this._internetReachability.tearDown(); - } -- - if (this._nativeEventSubscription) { - this._nativeEventSubscription.remove(); - } -- - this._subscriptions.clear(); - }); -- + // Add the listener to the internet connectivity events - this._internetReachability = new _internetReachability.default(configuration, this._handleInternetReachabilityUpdate); // Add the subscription to the native events + this._internetReachability = new _internetReachability.default(configuration, this._handleInternetReachabilityUpdate); -- this._nativeEventSubscription = _nativeInterface.default.eventEmitter.addListener(PrivateTypes.DEVICE_CONNECTIVITY_EVENT, this._handleNativeStateUpdate); // Fetch the current state from the native module -+ // Add the subscription to the native events -+ this._nativeEventSubscription = _nativeInterface.default.eventEmitter.addListener(PrivateTypes.DEVICE_CONNECTIVITY_EVENT, this._handleNativeStateUpdate); + this._nativeEventSubscription = _nativeInterface.default.eventEmitter.addListener(PrivateTypes.DEVICE_CONNECTIVITY_EVENT, this._handleNativeStateUpdate); // Fetch the current state from the native module -+ // Fetch the current state from the native module - this._fetchCurrentState(); - } -- - } -- - exports.default = State; - //# sourceMappingURL=state.js.map -\ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js.map -index 40ae85c..473e940 100644 +index 40ae85c..59a1381 100644 --- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js.map +++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/state.js.map @@ -1 +1 @@ -{"version":3,"sources":["state.ts"],"names":["State","constructor","configuration","Set","state","_internetReachability","update","convertedState","_convertState","_latestState","_subscriptions","forEach","handler","isInternetReachable","nextState","requestedInterface","NativeInterface","getCurrentState","input","currentState","_fetchCurrentState","Promise","resolve","add","latest","then","delete","tearDown","_nativeEventSubscription","remove","clear","InternetReachability","_handleInternetReachabilityUpdate","eventEmitter","addListener","PrivateTypes","DEVICE_CONNECTIVITY_EVENT","_handleNativeStateUpdate"],"mappings":";;;;;;;AAUA;;AACA;;AAEA;;;;;;;;;;AAEe,MAAMA,KAAN,CAAY;AAMzBC,EAAAA,WAAW,CAACC,aAAD,EAA4C;AAAA,sDALY,IAKZ;;AAAA,4CAJ9B,IAAIC,GAAJ,EAI8B;;AAAA,0CAHL,IAGK;;AAAA;;AAAA,sDAkBrDC,KADiC,IAExB;AACT;AACA,WAAKC,qBAAL,CAA2BC,MAA3B,CAAkCF,KAAlC,EAFS,CAIT;;;AACA,YAAMG,cAAc,GAAG,KAAKC,aAAL,CAAmBJ,KAAnB,CAAvB,CALS,CAOT;;;AACA,WAAKK,YAAL,GAAoBF,cAApB;;AACA,WAAKG,cAAL,CAAoBC,OAApB,CAA6BC,OAAD,IAAmBA,OAAO,CAACL,cAAD,CAAtD;AACD,KA7BsD;;AAAA,+DAgCrDM,mBAD0C,IAEjC;AACT,UAAI,CAAC,KAAKJ,YAAV,EAAwB;AACtB;AACD;;AAED,YAAMK,SAAS,GAAG,EAChB,GAAG,KAAKL,YADQ;AAEhBI,QAAAA;AAFgB,OAAlB;AAIA,WAAKJ,YAAL,GAAoBK,SAApB;;AACA,WAAKJ,cAAL,CAAoBC,OAApB,CAA6BC,OAAD,IAAmBA,OAAO,CAACE,SAAD,CAAtD;AACD,KA5CsD;;AAAA,gDA8C3B,MAC1BC,kBAD0B,IAEM;AAChC,YAAMX,KAAK,GAAG,MAAMY,yBAAgBC,eAAhB,CAAgCF,kBAAhC,CAApB,CADgC,CAGhC;;AACA,WAAKV,qBAAL,CAA2BC,MAA3B,CAAkCF,KAAlC,EAJgC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3B;AACD;;AAED,UAAI,KAAKC,wBAAT,EAAmC;AACjC,aAAKA,wBAAL,CAA8BC,MAA9B;AACD;;AAED,WAAKnB,cAAL,CAAoBoB,KAApB;AACD,KAlHsD;;AACrD;AACA,SAAKzB,qBAAL,GAA6B,IAAI0B,6BAAJ,CAC3B7B,aAD2B,EAE3B,KAAK8B,iCAFsB,CAA7B,CAFqD,CAOrD;;AACA,SAAKJ,wBAAL,GAAgCZ,yBAAgBiB,YAAhB,CAA6BC,WAA7B,CAC9BC,YAAY,CAACC,yBADiB,EAE9B,KAAKC,wBAFyB,CAAhC,CARqD,CAarD;;AACA,SAAKjB,kBAAL;AACD;;AArBwB","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventSubscription} from 'react-native';\nimport NativeInterface from './nativeInterface';\nimport InternetReachability from './internetReachability';\nimport * as Types from './types';\nimport * as PrivateTypes from './privateTypes';\n\nexport default class State {\n private _nativeEventSubscription: NativeEventSubscription | null = null;\n private _subscriptions = new Set();\n private _latestState: Types.NetInfoState | null = null;\n private _internetReachability: InternetReachability;\n\n constructor(configuration: Types.NetInfoConfiguration) {\n // Add the listener to the internet connectivity events\n this._internetReachability = new InternetReachability(\n configuration,\n this._handleInternetReachabilityUpdate,\n );\n\n // Add the subscription to the native events\n this._nativeEventSubscription = NativeInterface.eventEmitter.addListener(\n PrivateTypes.DEVICE_CONNECTIVITY_EVENT,\n this._handleNativeStateUpdate,\n );\n\n // Fetch the current state from the native module\n this._fetchCurrentState();\n }\n\n private _handleNativeStateUpdate = (\n state: PrivateTypes.NetInfoNativeModuleState,\n ): void => {\n // Update the internet reachability module\n this._internetReachability.update(state);\n\n // Convert the state from native to JS shape\n const convertedState = this._convertState(state);\n\n // Update the listeners\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n };\n\n private _handleInternetReachabilityUpdate = (\n isInternetReachable: boolean | null | undefined,\n ): void => {\n if (!this._latestState) {\n return;\n }\n\n const nextState = {\n ...this._latestState,\n isInternetReachable,\n } as Types.NetInfoState;\n this._latestState = nextState;\n this._subscriptions.forEach((handler): void => handler(nextState));\n };\n\n public _fetchCurrentState = async (\n requestedInterface?: string,\n ): Promise => {\n const state = await NativeInterface.getCurrentState(requestedInterface);\n\n // Update the internet reachability module\n this._internetReachability.update(state);\n // Convert and store the new state\n const convertedState = this._convertState(state);\n if (!requestedInterface) {\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n }\n\n return convertedState;\n };\n\n private _convertState = (\n input: PrivateTypes.NetInfoNativeModuleState,\n ): Types.NetInfoState => {\n if (typeof input.isInternetReachable === 'boolean') {\n return input as Types.NetInfoState;\n } else {\n return {\n ...input,\n isInternetReachable: this._internetReachability.currentState(),\n } as Types.NetInfoState;\n }\n };\n\n public latest = (\n requestedInterface?: string,\n ): Promise => {\n if (requestedInterface) {\n return this._fetchCurrentState(requestedInterface);\n } else if (this._latestState) {\n return Promise.resolve(this._latestState);\n } else {\n return this._fetchCurrentState();\n }\n };\n\n public add = (handler: Types.NetInfoChangeHandler): void => {\n // Add the subscription handler to our set\n this._subscriptions.add(handler);\n\n // Send it the latest data we have\n if (this._latestState) {\n handler(this._latestState);\n } else {\n this.latest().then(handler);\n }\n };\n\n public remove = (handler: Types.NetInfoChangeHandler): void => {\n this._subscriptions.delete(handler);\n };\n\n public tearDown = (): void => {\n if (this._internetReachability) {\n this._internetReachability.tearDown();\n }\n\n if (this._nativeEventSubscription) {\n this._nativeEventSubscription.remove();\n }\n\n this._subscriptions.clear();\n };\n}\n"]} \ No newline at end of file +{"version":3,"names":["_nativeInterface","_interopRequireDefault","require","_internetReachability","PrivateTypes","_interopRequireWildcard","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","_defineProperty","key","value","_toPropertyKey","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","State","constructor","configuration","Set","state","update","convertedState","_convertState","_latestState","_subscriptions","forEach","handler","isInternetReachable","nextState","requestedInterface","NativeInterface","getCurrentState","currentState","_fetchCurrentState","Promise","resolve","add","latest","then","delete","tearDown","_nativeEventSubscription","remove","clear","InternetReachability","_handleInternetReachabilityUpdate","eventEmitter","addListener","DEVICE_CONNECTIVITY_EVENT","_handleNativeStateUpdate","exports"],"sources":["state.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventSubscription} from 'react-native';\nimport NativeInterface from './nativeInterface';\nimport InternetReachability from './internetReachability';\nimport * as Types from './types';\nimport * as PrivateTypes from './privateTypes';\n\nexport default class State {\n private _nativeEventSubscription: NativeEventSubscription | null = null;\n private _subscriptions = new Set();\n private _latestState: Types.NetInfoState | null = null;\n private _internetReachability: InternetReachability;\n\n constructor(configuration: Types.NetInfoConfiguration) {\n // Add the listener to the internet connectivity events\n this._internetReachability = new InternetReachability(\n configuration,\n this._handleInternetReachabilityUpdate,\n );\n\n // Add the subscription to the native events\n this._nativeEventSubscription = NativeInterface.eventEmitter.addListener(\n PrivateTypes.DEVICE_CONNECTIVITY_EVENT,\n this._handleNativeStateUpdate,\n );\n\n // Fetch the current state from the native module\n this._fetchCurrentState();\n }\n\n private _handleNativeStateUpdate = (\n state: PrivateTypes.NetInfoNativeModuleState,\n ): void => {\n // Update the internet reachability module\n this._internetReachability.update(state);\n\n // Convert the state from native to JS shape\n const convertedState = this._convertState(state);\n\n // Update the listeners\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n };\n\n private _handleInternetReachabilityUpdate = (\n isInternetReachable: boolean | null | undefined,\n ): void => {\n if (!this._latestState) {\n return;\n }\n\n const nextState = {\n ...this._latestState,\n isInternetReachable,\n } as Types.NetInfoState;\n this._latestState = nextState;\n this._subscriptions.forEach((handler): void => handler(nextState));\n };\n\n public _fetchCurrentState = async (\n requestedInterface?: string,\n ): Promise => {\n const state = await NativeInterface.getCurrentState(requestedInterface);\n\n // Update the internet reachability module\n this._internetReachability.update(state);\n // Convert and store the new state\n const convertedState = this._convertState(state);\n if (!requestedInterface) {\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n }\n\n return convertedState;\n };\n\n private _convertState = (\n input: PrivateTypes.NetInfoNativeModuleState,\n ): Types.NetInfoState => {\n if (typeof input.isInternetReachable === 'boolean') {\n return input as Types.NetInfoState;\n } else {\n return {\n ...input,\n isInternetReachable: this._internetReachability.currentState(),\n } as Types.NetInfoState;\n }\n };\n\n public latest = (\n requestedInterface?: string,\n ): Promise => {\n if (requestedInterface) {\n return this._fetchCurrentState(requestedInterface);\n } else if (this._latestState) {\n return Promise.resolve(this._latestState);\n } else {\n return this._fetchCurrentState();\n }\n };\n\n public add = (handler: Types.NetInfoChangeHandler): void => {\n // Add the subscription handler to our set\n this._subscriptions.add(handler);\n\n // Send it the latest data we have\n if (this._latestState) {\n handler(this._latestState);\n } else {\n this.latest().then(handler);\n }\n };\n\n public remove = (handler: Types.NetInfoChangeHandler): void => {\n this._subscriptions.delete(handler);\n };\n\n public tearDown = (): void => {\n if (this._internetReachability) {\n this._internetReachability.tearDown();\n }\n\n if (this._nativeEventSubscription) {\n this._nativeEventSubscription.remove();\n }\n\n this._subscriptions.clear();\n };\n}\n"],"mappings":";;;;;;AAUA,IAAAA,gBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,YAAA,GAAAC,uBAAA,CAAAH,OAAA;AAA+C,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAA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IAAArC,eAAA,cAEa8B,OAAmC,IAAW;MAC1D;MACA,IAAI,CAACF,cAAc,CAACY,GAAG,CAACV,OAAO,CAAC;;MAEhC;MACA,IAAI,IAAI,CAACH,YAAY,EAAE;QACrBG,OAAO,CAAC,IAAI,CAACH,YAAY,CAAC;MAC5B,CAAC,MAAM;QACL,IAAI,CAACc,MAAM,CAAC,CAAC,CAACC,IAAI,CAACZ,OAAO,CAAC;MAC7B;IACF,CAAC;IAAA9B,eAAA,iBAEgB8B,OAAmC,IAAW;MAC7D,IAAI,CAACF,cAAc,CAACe,MAAM,CAACb,OAAO,CAAC;IACrC,CAAC;IAAA9B,eAAA,mBAEiB,MAAY;MAC5B,IAAI,IAAI,CAACzB,qBAAqB,EAAE;QAC9B,IAAI,CAACA,qBAAqB,CAACqE,QAAQ,CAAC,CAAC;MACvC;MAEA,IAAI,IAAI,CAACC,wBAAwB,EAAE;QACjC,IAAI,CAACA,wBAAwB,CAACC,MAAM,CAAC,CAAC;MACxC;MAEA,IAAI,CAAClB,cAAc,CAACmB,KAAK,CAAC,CAAC;IAC7B,CAAC;IAjHC;IACA,IAAI,CAACxE,qBAAqB,GAAG,IAAIyE,6BAAoB,CACnD3B,aAAa,EACb,IAAI,CAAC4B,iCACP,CAAC;;IAED;IACA,IAAI,CAACJ,wBAAwB,GAAGX,wBAAe,CAACgB,YAAY,CAACC,WAAW,CACtE3E,YAAY,CAAC4E,yBAAyB,EACtC,IAAI,CAACC,wBACP,CAAC;;IAED;IACA,IAAI,CAAChB,kBAAkB,CAAC,CAAC;EAC3B;AAoGF;AAACiB,OAAA,CAAAtE,OAAA,GAAAmC,KAAA"} -\ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js -index 39e4871..92824aa 100644 +index 39e4871..a7ee471 100644 --- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js +++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js -@@ -3,8 +3,7 @@ +@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.NetInfoCellularGeneration = exports.NetInfoStateType = void 0; -- +exports.NetInfoStateType = exports.NetInfoCellularGeneration = void 0; + /** * Copyright (c) Facebook, Inc. and its affiliates. - * -@@ -13,10 +12,7 @@ exports.NetInfoCellularGeneration = exports.NetInfoStateType = void 0; +@@ -13,10 +13,8 @@ exports.NetInfoCellularGeneration = exports.NetInfoStateType = void 0; * * @format */ -let NetInfoStateType; -exports.NetInfoStateType = NetInfoStateType; -- --(function (NetInfoStateType) { +let NetInfoStateType = exports.NetInfoStateType = /*#__PURE__*/function (NetInfoStateType) { + +-(function (NetInfoStateType) { NetInfoStateType["unknown"] = "unknown"; NetInfoStateType["none"] = "none"; NetInfoStateType["cellular"] = "cellular"; -@@ -26,15 +22,13 @@ exports.NetInfoStateType = NetInfoStateType; +@@ -26,15 +24,13 @@ exports.NetInfoStateType = NetInfoStateType; NetInfoStateType["wimax"] = "wimax"; NetInfoStateType["vpn"] = "vpn"; NetInfoStateType["other"] = "other"; @@ -1608,417 +965,114 @@ index 39e4871..92824aa 100644 //# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js.map b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js.map -index 095dd3b..596ace1 100644 +index 0a10355..a41b517 100644 --- a/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js.map +++ b/node_modules/@react-native-community/netinfo/lib/commonjs/internal/types.js.map @@ -1 +1 @@ --{"version":3,"sources":["types.ts"],"names":["NetInfoStateType","NetInfoCellularGeneration"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IAEYA,gB;;;WAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;GAAAA,gB,gCAAAA,gB;;IAcAC,yB;;;WAAAA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;GAAAA,yB,yCAAAA,yB","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nexport enum NetInfoStateType {\n unknown = 'unknown',\n none = 'none',\n cellular = 'cellular',\n wifi = 'wifi',\n bluetooth = 'bluetooth',\n ethernet = 'ethernet',\n wimax = 'wimax',\n vpn = 'vpn',\n other = 'other',\n}\n\nexport type NetInfoMethodType = 'HEAD' | 'GET';\n\nexport enum NetInfoCellularGeneration {\n '2g' = '2g',\n '3g' = '3g',\n '4g' = '4g',\n '5g' = '5g',\n}\n\nexport interface NetInfoConnectedDetails {\n isConnectionExpensive: boolean;\n}\n\ninterface NetInfoConnectedState<\n T extends NetInfoStateType,\n D extends Record = Record\n> {\n type: T;\n isConnected: true;\n isInternetReachable: boolean | null;\n details: D & NetInfoConnectedDetails;\n isWifiEnabled?: boolean;\n}\n\ninterface NetInfoDisconnectedState {\n type: T;\n isConnected: false;\n isInternetReachable: false;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport interface NetInfoUnknownState {\n type: NetInfoStateType.unknown;\n isConnected: boolean | null;\n isInternetReachable: null;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport type NetInfoNoConnectionState = NetInfoDisconnectedState<\n NetInfoStateType.none\n>;\nexport type NetInfoDisconnectedStates =\n | NetInfoUnknownState\n | NetInfoNoConnectionState;\n\nexport type NetInfoCellularState = NetInfoConnectedState<\n NetInfoStateType.cellular,\n {\n cellularGeneration: NetInfoCellularGeneration | null;\n carrier: string | null;\n }\n>;\nexport type NetInfoWifiState = NetInfoConnectedState<\n NetInfoStateType.wifi,\n {\n ssid: string | null;\n bssid: string | null;\n strength: number | null;\n ipAddress: string | null;\n subnet: string | null;\n frequency: number | null;\n linkSpeed: number | null;\n rxLinkSpeed: number | null;\n txLinkSpeed: number | null;\n }\n>;\nexport type NetInfoBluetoothState = NetInfoConnectedState<\n NetInfoStateType.bluetooth\n>;\nexport type NetInfoEthernetState = NetInfoConnectedState<\n NetInfoStateType.ethernet,\n {\n ipAddress: string | null;\n subnet: string | null;\n }\n>;\nexport type NetInfoWimaxState = NetInfoConnectedState;\nexport type NetInfoVpnState = NetInfoConnectedState;\nexport type NetInfoOtherState = NetInfoConnectedState;\nexport type NetInfoConnectedStates =\n | NetInfoCellularState\n | NetInfoWifiState\n | NetInfoBluetoothState\n | NetInfoEthernetState\n | NetInfoWimaxState\n | NetInfoVpnState\n | NetInfoOtherState;\n\nexport type NetInfoState = NetInfoDisconnectedStates | NetInfoConnectedStates;\n\nexport type NetInfoChangeHandler = (state: NetInfoState) => void;\nexport type NetInfoSubscription = () => void;\n\nexport interface NetInfoConfiguration {\n reachabilityUrl: string;\n reachabilityMethod?: NetInfoMethodType;\n reachabilityHeaders?: Record;\n reachabilityTest: (response: Response) => Promise;\n reachabilityLongTimeout: number;\n reachabilityShortTimeout: number;\n reachabilityRequestTimeout: number;\n reachabilityShouldRun: () => boolean;\n shouldFetchWiFiSSID: boolean;\n useNativeReachability: boolean;\n}\n"]} +-{"version":3,"sources":["types.ts"],"names":["NetInfoStateType","NetInfoCellularGeneration"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IAEYA,gB;;;WAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;GAAAA,gB,gCAAAA,gB;;IAcAC,yB;;;WAAAA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;GAAAA,yB,yCAAAA,yB","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nexport enum NetInfoStateType {\n unknown = 'unknown',\n none = 'none',\n cellular = 'cellular',\n wifi = 'wifi',\n bluetooth = 'bluetooth',\n ethernet = 'ethernet',\n wimax = 'wimax',\n vpn = 'vpn',\n other = 'other',\n}\n\nexport type NetInfoMethodType = 'HEAD' | 'GET';\n\nexport enum NetInfoCellularGeneration {\n '2g' = '2g',\n '3g' = '3g',\n '4g' = '4g',\n '5g' = '5g',\n}\n\nexport interface NetInfoConnectedDetails {\n isConnectionExpensive: boolean;\n}\n\ninterface NetInfoConnectedState<\n T extends NetInfoStateType,\n D extends Record = Record\n> {\n type: T;\n isConnected: boolean;\n isInternetReachable: boolean | null;\n details: D & NetInfoConnectedDetails;\n isWifiEnabled?: boolean;\n}\n\ninterface NetInfoDisconnectedState {\n type: T;\n isConnected: boolean;\n isInternetReachable: boolean;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport interface NetInfoUnknownState {\n type: NetInfoStateType.unknown;\n isConnected: boolean | null;\n isInternetReachable: null;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport type NetInfoNoConnectionState = NetInfoDisconnectedState<\n NetInfoStateType.none\n>;\nexport type NetInfoDisconnectedStates =\n | NetInfoUnknownState\n | NetInfoNoConnectionState;\n\nexport type NetInfoCellularState = NetInfoConnectedState<\n NetInfoStateType.cellular,\n {\n cellularGeneration: NetInfoCellularGeneration | null;\n carrier: string | null;\n }\n>;\nexport type NetInfoWifiState = NetInfoConnectedState<\n NetInfoStateType.wifi,\n {\n ssid: string | null;\n bssid: string | null;\n strength: number | null;\n ipAddress: string | null;\n subnet: string | null;\n frequency: number | null;\n linkSpeed: number | null;\n rxLinkSpeed: number | null;\n txLinkSpeed: number | null;\n }\n>;\nexport type NetInfoBluetoothState = NetInfoConnectedState<\n NetInfoStateType.bluetooth\n>;\nexport type NetInfoEthernetState = NetInfoConnectedState<\n NetInfoStateType.ethernet,\n {\n ipAddress: string | null;\n subnet: string | null;\n }\n>;\nexport type NetInfoWimaxState = NetInfoConnectedState;\nexport type NetInfoVpnState = NetInfoConnectedState;\nexport type NetInfoOtherState = NetInfoConnectedState;\nexport type NetInfoConnectedStates =\n | NetInfoCellularState\n | NetInfoWifiState\n | NetInfoBluetoothState\n | NetInfoEthernetState\n | NetInfoWimaxState\n | NetInfoVpnState\n | NetInfoOtherState;\n\nexport type NetInfoState = NetInfoDisconnectedStates | NetInfoConnectedStates;\n\nexport type NetInfoChangeHandler = (state: NetInfoState) => void;\nexport type NetInfoSubscription = () => void;\n\nexport interface NetInfoConfiguration {\n reachabilityUrl: string;\n reachabilityMethod?: NetInfoMethodType;\n reachabilityHeaders?: Record;\n reachabilityTest: (response: Response) => Promise;\n reachabilityLongTimeout: number;\n reachabilityShortTimeout: number;\n reachabilityRequestTimeout: number;\n reachabilityShouldRun: () => boolean;\n shouldFetchWiFiSSID: boolean;\n useNativeReachability: boolean;\n}\n"]} \ No newline at end of file +{"version":3,"names":["NetInfoStateType","exports","NetInfoCellularGeneration"],"sources":["types.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nexport enum NetInfoStateType {\n unknown = 'unknown',\n none = 'none',\n cellular = 'cellular',\n wifi = 'wifi',\n bluetooth = 'bluetooth',\n ethernet = 'ethernet',\n wimax = 'wimax',\n vpn = 'vpn',\n other = 'other',\n}\n\nexport type NetInfoMethodType = 'HEAD' | 'GET';\n\nexport enum NetInfoCellularGeneration {\n '2g' = '2g',\n '3g' = '3g',\n '4g' = '4g',\n '5g' = '5g',\n}\n\nexport interface NetInfoConnectedDetails {\n isConnectionExpensive: boolean;\n}\n\ninterface NetInfoConnectedState<\n T extends NetInfoStateType,\n D extends Record = Record,\n> {\n type: T;\n isConnected: true;\n isInternetReachable: boolean | null;\n details: D & NetInfoConnectedDetails;\n isWifiEnabled?: boolean;\n}\n\ninterface NetInfoDisconnectedState {\n type: T;\n isConnected: false;\n isInternetReachable: false;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport interface NetInfoUnknownState {\n type: NetInfoStateType.unknown;\n isConnected: boolean | null;\n isInternetReachable: null;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport type NetInfoNoConnectionState =\n NetInfoDisconnectedState;\nexport type NetInfoDisconnectedStates =\n | NetInfoUnknownState\n | NetInfoNoConnectionState;\n\nexport type NetInfoCellularState = NetInfoConnectedState<\n NetInfoStateType.cellular,\n {\n cellularGeneration: NetInfoCellularGeneration | null;\n carrier: string | null;\n }\n>;\nexport type NetInfoWifiState = NetInfoConnectedState<\n NetInfoStateType.wifi,\n {\n ssid: string | null;\n bssid: string | null;\n strength: number | null;\n ipAddress: string | null;\n subnet: string | null;\n frequency: number | null;\n linkSpeed: number | null;\n rxLinkSpeed: number | null;\n txLinkSpeed: number | null;\n }\n>;\nexport type NetInfoBluetoothState =\n NetInfoConnectedState;\nexport type NetInfoEthernetState = NetInfoConnectedState<\n NetInfoStateType.ethernet,\n {\n ipAddress: string | null;\n subnet: string | null;\n }\n>;\nexport type NetInfoWimaxState = NetInfoConnectedState;\nexport type NetInfoVpnState = NetInfoConnectedState;\nexport type NetInfoOtherState = NetInfoConnectedState;\nexport type NetInfoConnectedStates =\n | NetInfoCellularState\n | NetInfoWifiState\n | NetInfoBluetoothState\n | NetInfoEthernetState\n | NetInfoWimaxState\n | NetInfoVpnState\n | NetInfoOtherState;\n\nexport type NetInfoState = NetInfoDisconnectedStates | NetInfoConnectedStates;\n\nexport type NetInfoChangeHandler = (state: NetInfoState) => void;\nexport type NetInfoSubscription = () => void;\n\nexport interface NetInfoConfiguration {\n reachabilityUrl: string;\n reachabilityMethod?: NetInfoMethodType;\n reachabilityHeaders?: Record;\n reachabilityTest: (response: Response) => Promise;\n reachabilityLongTimeout: number;\n reachabilityShortTimeout: number;\n reachabilityRequestTimeout: number;\n reachabilityShouldRun: () => boolean;\n shouldFetchWiFiSSID: boolean;\n useNativeReachability: boolean;\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,IASYA,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;AAAA,IAchBE,yBAAyB,GAAAD,OAAA,CAAAC,yBAAA,0BAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAA,OAAzBA,yBAAyB;AAAA"} -\ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/module/index.js b/node_modules/@react-native-community/netinfo/lib/module/index.js -index 147c72e..3574e44 100644 +index 8896f01..7687f96 100644 --- a/node_modules/@react-native-community/netinfo/lib/module/index.js +++ b/node_modules/@react-native-community/netinfo/lib/module/index.js -@@ -6,20 +6,27 @@ - * - * @format - */ -+ - import { useState, useEffect, useCallback } from 'react'; - import { Platform } from 'react-native'; +@@ -11,19 +11,22 @@ import { Platform } from 'react-native'; import DEFAULT_CONFIGURATION from './internal/defaultConfiguration'; import NativeInterface from './internal/nativeInterface'; - import State from './internal/state'; --import * as Types from './internal/types'; // Stores the currently used configuration -+import * as Types from './internal/types'; - --let _configuration = DEFAULT_CONFIGURATION; // Stores the singleton reference to the state manager -+// Stores the currently used configuration -+let _configuration = DEFAULT_CONFIGURATION; - -+// Stores the singleton reference to the state manager - let _state = null; -- - const createState = () => { - return new State(_configuration); - }; -+ -+// Track ongoing requests -+let isRequestInProgress = false; -+let requestQueue = []; -+ - /** - * Configures the library with the given configuration. Note that calling this will stop all - * previously added listeners from being called again. It is best to call this right when your -@@ -27,23 +34,20 @@ const createState = () => { - * - * @param configuration The new configuration to set. - */ -- -- - export function configure(configuration) { -- _configuration = { ...DEFAULT_CONFIGURATION, -+ _configuration = { -+ ...DEFAULT_CONFIGURATION, - ...configuration - }; -- - if (_state) { - _state.tearDown(); -- - _state = createState(); - } -- - if (Platform.OS === 'ios') { - NativeInterface.configure(configuration); - } - } -+ - /** - * Returns a `Promise` that resolves to a `NetInfoState` object. - * This function operates on the global singleton instance configured using `configure()` -@@ -52,27 +56,41 @@ export function configure(configuration) { - * - * @returns A Promise which contains the current connection state. - */ -- - export function fetch(requestedInterface) { - if (!_state) { - _state = createState(); - } -- - return _state.latest(requestedInterface); - } -+ - /** - * Force-refreshes the internal state of the global singleton managed by this library. - * - * @returns A Promise which contains the updated connection state. - */ -- - export function refresh() { - if (!_state) { - _state = createState(); - } - -- return _state._fetchCurrentState(); -+ // If a request is already in progress, return a promise that will resolve when the current request finishes -+ if (isRequestInProgress) { -+ return new Promise((resolve) => { -+ requestQueue.push(resolve); -+ }); -+ } -+ -+ isRequestInProgress = true; -+ -+ return _state._fetchCurrentState().then((result) => { -+ requestQueue.forEach((resolve) => resolve(result)); -+ requestQueue = []; -+ return result; -+ }).finally(() => { -+ isRequestInProgress = false; -+ }); - } -+ - /** - * Subscribe to the global singleton's connection information. The callback is called with a parameter of type - * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener -@@ -84,18 +102,16 @@ export function refresh() { - * - * @returns A function which can be called to unsubscribe. - */ -- - export function addEventListener(listener) { - if (!_state) { - _state = createState(); - } -- - _state.add(listener); -- - return () => { - _state && _state.remove(listener); - }; - } -+ - /** - * A React Hook into this library's singleton which updates when the connection state changes. - * -@@ -103,12 +119,10 @@ export function addEventListener(listener) { - * - * @returns The connection state. - */ -- - export function useNetInfo(configuration) { - if (configuration) { - configure(configuration); - } -- - const [netInfo, setNetInfo] = useState({ - type: Types.NetInfoStateType.unknown, - isConnected: null, -@@ -120,6 +134,7 @@ export function useNetInfo(configuration) { - }, []); - return netInfo; - } -+ - /** - * A React Hook which manages an isolated instance of the network info manager. - * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener, -@@ -129,7 +144,6 @@ export function useNetInfo(configuration) { - * - * @returns the netInfo state and a refresh function - */ -- - export function useNetInfoInstance(isPaused = false, configuration) { - const [networkInfoManager, setNetworkInfoManager] = useState(); - const [netInfo, setNetInfo] = useState({ -@@ -142,8 +156,8 @@ export function useNetInfoInstance(isPaused = false, configuration) { - if (isPaused) { - return; - } -- -- const config = { ...DEFAULT_CONFIGURATION, -+ const config = { -+ ...DEFAULT_CONFIGURATION, - ...configuration - }; - const state = new State(config); -diff --git a/node_modules/@react-native-community/netinfo/lib/module/index.js.map b/node_modules/@react-native-community/netinfo/lib/module/index.js.map -index 937c538..268c26e 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/index.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/module/index.js.map -@@ -1 +1 @@ --{"version":3,"sources":["index.ts"],"names":["useState","useEffect","useCallback","Platform","DEFAULT_CONFIGURATION","NativeInterface","State","Types","_configuration","_state","createState","configure","configuration","tearDown","OS","fetch","requestedInterface","latest","refresh","_fetchCurrentState","addEventListener","listener","add","remove","useNetInfo","netInfo","setNetInfo","type","NetInfoStateType","unknown","isConnected","isInternetReachable","details","useNetInfoInstance","isPaused","networkInfoManager","setNetworkInfoManager","config","state"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAAQA,QAAR,EAAkBC,SAAlB,EAA6BC,WAA7B,QAA+C,OAA/C;AACA,SAAQC,QAAR,QAAuB,cAAvB;AACA,OAAOC,qBAAP,MAAkC,iCAAlC;AACA,OAAOC,eAAP,MAA4B,4BAA5B;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAO,KAAKC,KAAZ,MAAu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AAAA,KAAK,CAAChB,GAAN,CAAUI,UAAV;AACA,WAAOY,KAAK,CAACzB,QAAb;AACD,GAZQ,EAYN,CAACqB,QAAD,EAAWtB,aAAX,CAZM,CAAT;AAcA,QAAMM,OAAO,GAAGhB,WAAW,CAAC,MAAM;AAChCiC,IAAAA,kBAAkB,IAAIA,kBAAkB,CAAChB,kBAAnB,EAAtB;AACD,GAF0B,EAExB,CAACgB,kBAAD,CAFwB,CAA3B;AAIA,SAAO;AACLV,IAAAA,OADK;AAELP,IAAAA;AAFK,GAAP;AAID;AAED,cAAc,kBAAd;AAEA,eAAe;AACbP,EAAAA,SADa;AAEbI,EAAAA,KAFa;AAGbG,EAAAA,OAHa;AAIbE,EAAAA,gBAJa;AAKbI,EAAAA,UALa;AAMbS,EAAAA;AANa,CAAf","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {useState, useEffect, useCallback} from 'react';\nimport {Platform} from 'react-native';\nimport DEFAULT_CONFIGURATION from './internal/defaultConfiguration';\nimport NativeInterface from './internal/nativeInterface';\nimport State from './internal/state';\nimport * as Types from './internal/types';\n\n// Stores the currently used configuration\nlet _configuration = DEFAULT_CONFIGURATION;\n\n// Stores the singleton reference to the state manager\nlet _state: State | null = null;\nconst createState = (): State => {\n return new State(_configuration);\n};\n\n/**\n * Configures the library with the given configuration. Note that calling this will stop all\n * previously added listeners from being called again. It is best to call this right when your\n * application is started to avoid issues. The configuration sets up a global singleton instance.\n *\n * @param configuration The new configuration to set.\n */\nexport function configure(\n configuration: Partial,\n): void {\n _configuration = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n\n if (_state) {\n _state.tearDown();\n _state = createState();\n }\n\n if (Platform.OS === 'ios') {\n NativeInterface.configure(configuration);\n }\n}\n\n/**\n * Returns a `Promise` that resolves to a `NetInfoState` object.\n * This function operates on the global singleton instance configured using `configure()`\n *\n * @param [requestedInterface] interface from which to obtain the information\n *\n * @returns A Promise which contains the current connection state.\n */\nexport function fetch(\n requestedInterface?: string,\n): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state.latest(requestedInterface);\n}\n\n/**\n * Force-refreshes the internal state of the global singleton managed by this library.\n *\n * @returns A Promise which contains the updated connection state.\n */\nexport function refresh(): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state._fetchCurrentState();\n}\n\n/**\n * Subscribe to the global singleton's connection information. The callback is called with a parameter of type\n * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener\n * will be called with the latest information soon after you subscribe and then with any\n * subsequent changes afterwards. You should not assume that the listener is called in the same\n * way across devices or platforms.\n *\n * @param listener The listener which is called when the network state changes.\n *\n * @returns A function which can be called to unsubscribe.\n */\nexport function addEventListener(\n listener: Types.NetInfoChangeHandler,\n): Types.NetInfoSubscription {\n if (!_state) {\n _state = createState();\n }\n\n _state.add(listener);\n return (): void => {\n _state && _state.remove(listener);\n };\n}\n\n/**\n * A React Hook into this library's singleton which updates when the connection state changes.\n *\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns The connection state.\n */\nexport function useNetInfo(\n configuration?: Partial,\n): Types.NetInfoState {\n if (configuration) {\n configure(configuration);\n }\n\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect((): (() => void) => {\n return addEventListener(setNetInfo);\n }, []);\n\n return netInfo;\n}\n\n/**\n * A React Hook which manages an isolated instance of the network info manager.\n * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener,\n * NetInfo.fetch, NetInfo.refresh are performed on a global singleton and have no affect on this hook.\n * @param {boolean} isPaused - Pause the internal network checks.\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns the netInfo state and a refresh function\n */\nexport function useNetInfoInstance(\n isPaused = false,\n configuration?: Partial,\n) {\n const [networkInfoManager, setNetworkInfoManager] = useState();\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect(() => {\n if (isPaused) {\n return;\n }\n const config = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n const state = new State(config);\n setNetworkInfoManager(state);\n state.add(setNetInfo);\n return state.tearDown;\n }, [isPaused, configuration]);\n\n const refresh = useCallback(() => {\n networkInfoManager && networkInfoManager._fetchCurrentState();\n }, [networkInfoManager]);\n\n return {\n netInfo,\n refresh,\n };\n}\n\nexport * from './internal/types';\n\nexport default {\n configure,\n fetch,\n refresh,\n addEventListener,\n useNetInfo,\n useNetInfoInstance,\n};\n"]} -\ No newline at end of file -+{"version":3,"names":["useState","useEffect","useCallback","Platform","DEFAULT_CONFIGURATION","NativeInterface","State","Types","_configuration","_state","createState","configure","configuration","tearDown","OS","fetch","requestedInterface","latest","refresh","_fetchCurrentState","addEventListener","listener","add","remove","useNetInfo","netInfo","setNetInfo","type","NetInfoStateType","unknown","isConnected","isInternetReachable","details","useNetInfoInstance","isPaused","networkInfoManager","setNetworkInfoManager","config","state"],"sources":["index.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {useState, useEffect, useCallback} from 'react';\nimport {Platform} from 'react-native';\nimport DEFAULT_CONFIGURATION from './internal/defaultConfiguration';\nimport NativeInterface from './internal/nativeInterface';\nimport State from './internal/state';\nimport * as Types from './internal/types';\n\n// Stores the currently used configuration\nlet _configuration = DEFAULT_CONFIGURATION;\n\n// Stores the singleton reference to the state manager\nlet _state: State | null = null;\nconst createState = (): State => {\n return new State(_configuration);\n};\n\n/**\n * Configures the library with the given configuration. Note that calling this will stop all\n * previously added listeners from being called again. It is best to call this right when your\n * application is started to avoid issues. The configuration sets up a global singleton instance.\n *\n * @param configuration The new configuration to set.\n */\nexport function configure(\n configuration: Partial,\n): void {\n _configuration = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n\n if (_state) {\n _state.tearDown();\n _state = createState();\n }\n\n if (Platform.OS === 'ios') {\n NativeInterface.configure(configuration);\n }\n}\n\n/**\n * Returns a `Promise` that resolves to a `NetInfoState` object.\n * This function operates on the global singleton instance configured using `configure()`\n *\n * @param [requestedInterface] interface from which to obtain the information\n *\n * @returns A Promise which contains the current connection state.\n */\nexport function fetch(\n requestedInterface?: string,\n): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state.latest(requestedInterface);\n}\n\n/**\n * Force-refreshes the internal state of the global singleton managed by this library.\n *\n * @returns A Promise which contains the updated connection state.\n */\nexport function refresh(): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state._fetchCurrentState();\n}\n\n/**\n * Subscribe to the global singleton's connection information. The callback is called with a parameter of type\n * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener\n * will be called with the latest information soon after you subscribe and then with any\n * subsequent changes afterwards. You should not assume that the listener is called in the same\n * way across devices or platforms.\n *\n * @param listener The listener which is called when the network state changes.\n *\n * @returns A function which can be called to unsubscribe.\n */\nexport function addEventListener(\n listener: Types.NetInfoChangeHandler,\n): Types.NetInfoSubscription {\n if (!_state) {\n _state = createState();\n }\n\n _state.add(listener);\n return (): void => {\n _state && _state.remove(listener);\n };\n}\n\n/**\n * A React Hook into this library's singleton which updates when the connection state changes.\n *\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns The connection state.\n */\nexport function useNetInfo(\n configuration?: Partial,\n): Types.NetInfoState {\n if (configuration) {\n configure(configuration);\n }\n\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect((): (() => void) => {\n return addEventListener(setNetInfo);\n }, []);\n\n return netInfo;\n}\n\n/**\n * A React Hook which manages an isolated instance of the network info manager.\n * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener,\n * NetInfo.fetch, NetInfo.refresh are performed on a global singleton and have no affect on this hook.\n * @param {boolean} isPaused - Pause the internal network checks.\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns the netInfo state and a refresh function\n */\nexport function useNetInfoInstance(\n isPaused = false,\n configuration?: Partial,\n) {\n const [networkInfoManager, setNetworkInfoManager] = useState();\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect(() => {\n if (isPaused) {\n return;\n }\n const config = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n const state = new State(config);\n setNetworkInfoManager(state);\n state.add(setNetInfo);\n return state.tearDown;\n }, [isPaused, configuration]);\n\n const refresh = useCallback(() => {\n networkInfoManager && networkInfoManager._fetchCurrentState();\n }, [networkInfoManager]);\n\n return {\n netInfo,\n refresh,\n };\n}\n\nexport * from './internal/types';\n\nexport default {\n configure,\n fetch,\n refresh,\n addEventListener,\n useNetInfo,\n useNetInfoInstance,\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAQA,QAAQ,EAAEC,SAAS,EAAEC,WAAW,QAAO,OAAO;AACtD,SAAQC,QAAQ,QAAO,cAAc;AACrC,OAAOC,qBAAqB,MAAM,iCAAiC;AACnE,OAAOC,eAAe,MAAM,4BAA4B;AACxD,OAAOC,KAAK,MAAM,kBAAkB;AACpC,OAAO,KAAKC,KAAK,MAAM,kBAAkB;;AAEzC;AACA,IAAIC,cAAc,GAAGJ,qBAAqB;;AAE1C;AACA,IAAIK,MAAoB,GAAG,IAAI;AAC/B,MAAMC,WAAW,GAAGA,CAAA,KAAa;EAC/B,OAAO,IAAIJ,KAAK,CAACE,cAAc,CAAC;AAClC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,SAASA,CACvBC,aAAkD,EAC5C;EACNJ,cAAc,GAAG;I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;AAEhC,eAAe;EACbP,SAAS;EACTI,KAAK;EACLG,OAAO;EACPE,gBAAgB;EAChBI,UAAU;EACVS;AACF,CAAC"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js b/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js -new file mode 100644 -index 0000000..54a9e1b ---- /dev/null -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js -@@ -0,0 +1,5 @@ -+/* eslint-disable @typescript-eslint/ban-types */ -+ -+import { TurboModuleRegistry } from 'react-native'; -+export default TurboModuleRegistry.getEnforcing('RNCNetInfo'); -+//# sourceMappingURL=NativeRNCNetInfo.js.map -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js.map -new file mode 100644 -index 0000000..d366286 ---- /dev/null -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js.map -@@ -0,0 +1 @@ -+{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sources":["NativeRNCNetInfo.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-types */\nimport type { TurboModule } from 'react-native';\nimport { TurboModuleRegistry } from 'react-native';\n\nexport interface Spec extends TurboModule {\n configure: (config: Object) => void;\n getCurrentState(requestedInterface?: string): Promise;\n // Events\n addListener: (eventName: string) => void;\n removeListeners: (count: number) => void;\n}\n\nexport default TurboModuleRegistry.getEnforcing('RNCNetInfo');\n\n"],"mappings":"AAAA;;AAEA,SAASA,mBAAmB,QAAQ,cAAc;AAUlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,YAAY,CAAC"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.js.map -index 6a190c8..0ec7a12 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.js.map -@@ -1 +1 @@ --{"version":3,"sources":["defaultConfiguration.ts"],"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability"],"mappings":"AAEA,MAAMA,qBAAiD,GAAG;AACxDC,EAAAA,eAAe,EAAE,0CADuC;AAExDC,EAAAA,kBAAkB,EAAE,MAFoC;AAGxDC,EAAAA,mBAAmB,EAAE,EAHmC;AAIxDC,EAAAA,gBAAgB,EAAGC,QAAD,IAChBC,OAAO,CAACC,OAAR,CAAgBF,QAAQ,CAACG,MAAT,KAAoB,GAApC,CALsD;AAMxDC,EAAAA,wBAAwB,EAAE,IAAI,IAN0B;AAMpB;AACpCC,EAAAA,uBAAuB,EAAE,KAAK,IAP0B;AAOpB;AACpCC,EAAAA,0BAA0B,EAAE,KAAK,IARuB;AAQjB;AACvCC,EAAAA,qBAAqB,EAAE,MAAe,IATkB;AAUxDC,EAAAA,mBAAmB,EAAE,KAVmC;AAWxDC,EAAAA,qBAAqB,EAAE;AAXiC,CAA1D;AAcA,eAAed,qBAAf","sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: 'https://clients3.google.com/generate_204',\n reachabilityMethod: 'HEAD',\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 204),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: false,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION;"]} -\ No newline at end of file -+{"version":3,"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability"],"sources":["defaultConfiguration.ts"],"sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: 'https://clients3.google.com/generate_204',\n reachabilityMethod: 'HEAD',\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 204),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: false,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION;"],"mappings":"AAEA,MAAMA,qBAAiD,GAAG;EACxDC,eAAe,EAAE,0CAA0C;EAC3DC,kBAAkB,EAAE,MAAM;EAC1BC,mBAAmB,EAAE,CAAC,CAAC;EACvBC,gBAAgB,EAAGC,QAAkB,IACnCC,OAAO,CAACC,OAAO,CAACF,QAAQ,CAACG,MAAM,KAAK,GAAG,CAAC;EAC1CC,wBAAwB,EAAE,CAAC,GAAG,IAAI;EAAE;EACpCC,uBAAuB,EAAE,EAAE,GAAG,IAAI;EAAE;EACpCC,0BAA0B,EAAE,EAAE,GAAG,IAAI;EAAE;EACvCC,qBAAqB,EAAEA,CAAA,KAAe,IAAI;EAC1CC,mBAAmB,EAAE,KAAK;EAC1BC,qBAAqB,EAAE;AACzB,CAAC;AAED,eAAed,qBAAqB"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.web.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.web.js.map -index ba01d7a..011de62 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.web.js.map -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.web.js.map -@@ -1 +1 @@ --{"version":3,"sources":["defaultConfiguration.web.ts"],"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability"],"mappings":"AAEA,MAAMA,qBAAiD,GAAG;AACxDC,EAAAA,eAAe,EAAE,GADuC;AAExDC,EAAAA,kBAAkB,EAAE,MAFoC;AAGxDC,EAAAA,mBAAmB,EAAE,EAHmC;AAIxDC,EAAAA,gBAAgB,EAAGC,QAAD,IAChBC,OAAO,CAACC,OAAR,CAAgBF,QAAQ,CAACG,MAAT,KAAoB,GAApC,CALsD;AAMxDC,EAAAA,wBAAwB,EAAE,IAAI,IAN0B;AAMpB;AACpCC,EAAAA,uBAAuB,EAAE,KAAK,IAP0B;AAOpB;AACpCC,EAAAA,0BAA0B,EAAE,KAAK,IARuB;AAQjB;AACvCC,EAAAA,qBAAqB,EAAE,MAAe,IATkB;AAUxDC,EAAAA,mBAAmB,EAAE,IAVmC;AAWxDC,EAAAA,qBAAqB,EAAE;AAXiC,CAA1D;AAcA,eAAed,qBAAf","sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: '/',\n reachabilityMethod: \"HEAD\",\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 200),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: true,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION"]} -\ No newline at end of file -+{"version":3,"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability"],"sources":["defaultConfiguration.web.ts"],"sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: '/',\n reachabilityMethod: \"HEAD\",\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 200),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: true,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION"],"mappings":"AAEA,MAAMA,qBAAiD,GAAG;EACxDC,eAAe,EAAE,GAAG;EACpBC,kBAAkB,EAAE,MAAM;EAC1BC,mBAAmB,EAAE,CAAC,CAAC;EACvBC,gBAAgB,EAAGC,QAAkB,IACnCC,OAAO,CAACC,OAAO,CAACF,QAAQ,CAACG,MAAM,KAAK,GAAG,CAAC;EAC1CC,wBAAwB,EAAE,CAAC,GAAG,IAAI;EAAE;EACpCC,uBAAuB,EAAE,EAAE,GAAG,IAAI;EAAE;EACpCC,0BAA0B,EAAE,EAAE,GAAG,IAAI;EAAE;EACvCC,qBAAqB,EAAEA,CAAA,KAAe,IAAI;EAC1CC,mBAAmB,EAAE,IAAI;EACzBC,qBAAqB,EAAE;AACzB,CAAC;AAED,eAAed,qBAAqB"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js b/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js -index 408453a..e373eef 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js -@@ -1,5 +1,6 @@ --function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -- -+function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -+function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -+function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } - /** - * Copyright (c) Facebook, Inc. and its affiliates. - * -@@ -8,57 +9,45 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope - * - * @format - */ -+ - export default class InternetReachability { - constructor(configuration, listener) { - _defineProperty(this, "_configuration", void 0); -- - _defineProperty(this, "_listener", void 0); -- - _defineProperty(this, "_isInternetReachable", undefined); -- - _defineProperty(this, "_currentInternetReachabilityCheckHandler", null); -- - _defineProperty(this, "_currentTimeoutHandle", null); -- - _defineProperty(this, "_setIsInternetReachable", isInternetReachable => { - if (this._isInternetReachable === isInternetReachable) { - return; - } -- - this._isInternetReachable = isInternetReachable; -- - this._listener(this._isInternetReachable); - }); -- - _defineProperty(this, "_setExpectsConnection", expectsConnection => { - // Cancel any pending check - if (this._currentInternetReachabilityCheckHandler !== null) { - this._currentInternetReachabilityCheckHandler.cancel(); -- - this._currentInternetReachabilityCheckHandler = null; -- } // Cancel any pending timeout -- -- -+ } -+ // Cancel any pending timeout - if (this._currentTimeoutHandle !== null) { - clearTimeout(this._currentTimeoutHandle); - this._currentTimeoutHandle = null; - } -- - if (expectsConnection && this._configuration.reachabilityShouldRun()) { - // If we expect a connection, start the process for finding if we have one - // Set the state to "null" if it was previously false - if (!this._isInternetReachable) { - this._setIsInternetReachable(null); -- } // Start a network request to check for internet -- -- -+ } -+ // Start a network request to check for internet - this._currentInternetReachabilityCheckHandler = this._checkInternetReachability(); - } else { - // If we don't expect a connection or don't run reachability check, just change the state to "false" - this._setIsInternetReachable(false); - } - }); -- - _defineProperty(this, "_checkInternetReachability", () => { - const controller = new AbortController(); - const responsePromise = fetch(this._configuration.reachabilityUrl, { -@@ -66,16 +55,17 @@ export default class InternetReachability { - method: this._configuration.reachabilityMethod, - cache: 'no-cache', - signal: controller.signal -- }); // Create promise that will reject after the request timeout has been reached -+ }); - -+ // Create promise that will reject after the request timeout has been reached - let timeoutHandle; -- const timeoutPromise = new Promise(() => { -- timeoutHandle = setTimeout(() => controller.abort('timedout'), this._configuration.reachabilityRequestTimeout); -- }); // Create promise that makes it possible to cancel a pending request through a reject -- // eslint-disable-next-line @typescript-eslint/no-empty-function -+ const timeoutPromise = new Promise((_, reject) => { -+ timeoutHandle = setTimeout(() => reject('timedout'), this._configuration.reachabilityRequestTimeout); -+ }); - -+ // Create promise that makes it possible to cancel a pending request through a reject -+ // eslint-disable-next-line @typescript-eslint/no-empty-function - let cancel = () => {}; -- - const cancelPromise = new Promise((_, reject) => { - cancel = () => reject('canceled'); - }); -@@ -83,18 +73,25 @@ export default class InternetReachability { - return this._configuration.reachabilityTest(response); - }).then(result => { - this._setIsInternetReachable(result); -- - const nextTimeoutInterval = this._isInternetReachable ? this._configuration.reachabilityLongTimeout : this._configuration.reachabilityShortTimeout; - this._currentTimeoutHandle = setTimeout(this._checkInternetReachability, nextTimeoutInterval); -+ }).catch(error => { -+ if (error !== 'canceled') { -+ this._setIsInternetReachable(false); -+ this._currentTimeoutHandle = setTimeout(this._checkInternetReachability, this._configuration.reachabilityShortTimeout); -+ } - }).catch(error => { - if ('canceled' === error) { - controller.abort(); - } else { -+ if ('timedout' === error) { -+ controller.abort(); -+ } - this._setIsInternetReachable(false); -- - this._currentTimeoutHandle = setTimeout(this._checkInternetReachability, this._configuration.reachabilityShortTimeout); - } -- }) // Clear request timeout and propagate any errors -+ }) -+ // Clear request timeout and propagate any errors - .then(() => { - clearTimeout(timeoutHandle); - }, error => { -@@ -106,7 +103,6 @@ export default class InternetReachability { - cancel - }; - }); -- - _defineProperty(this, "update", state => { - if (typeof state.isInternetReachable === 'boolean' && this._configuration.useNativeReachability) { - this._setIsInternetReachable(state.isInternetReachable); -@@ -114,29 +110,24 @@ export default class InternetReachability { - this._setExpectsConnection(state.isConnected); - } - }); -- - _defineProperty(this, "currentState", () => { - return this._isInternetReachable; - }); -- - _defineProperty(this, "tearDown", () => { - // Cancel any pending check - if (this._currentInternetReachabilityCheckHandler !== null) { - this._currentInternetReachabilityCheckHandler.cancel(); -- - this._currentInternetReachabilityCheckHandler = null; -- } // Cancel any pending timeout -- -+ } + import State from './internal/state'; +-import * as Types from './internal/types'; // Stores the currently used configuration ++import * as Types from './internal/types'; -+ // Cancel any pending timeout - if (this._currentTimeoutHandle !== null) { - clearTimeout(this._currentTimeoutHandle); - this._currentTimeoutHandle = null; - } - }); -- - this._configuration = configuration; - this._listener = listener; - } +-let _configuration = DEFAULT_CONFIGURATION; // Stores the singleton reference to the state manager ++// Stores the currently used configuration ++let _configuration = DEFAULT_CONFIGURATION; + ++// Stores the singleton reference to the state manager + let _state = null; + + const createState = () => { + return new State(_configuration); +-}; // Track ongoing requests - - } - //# sourceMappingURL=internetReachability.js.map ++}; + ++// Track ongoing requests + let isRequestInProgress = false; + let requestQueue = []; ++ + /** + * Configures the library with the given configuration. Note that calling this will stop all + * previously added listeners from being called again. It is best to call this right when your +diff --git a/node_modules/@react-native-community/netinfo/lib/module/index.js.map b/node_modules/@react-native-community/netinfo/lib/module/index.js.map +index 74014f2..d7cb73b 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/index.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/module/index.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["index.ts"],"names":["useState","useEffect","useCallback","Platform","DEFAULT_CONFIGURATION","NativeInterface","State","Types","_configuration","_state","createState","isRequestInProgress","requestQueue","configure","configuration","tearDown","OS","fetch","requestedInterface","latest","refresh","Promise","resolve","push","_fetchCurrentState","then","result","forEach","finally","addEventListener","listener","add","remove","useNetInfo","netInfo","setNetInfo","type","NetInfoStateType","unknown","isConnected","isInternetReachable","details","unsubscribe","useNetInfoInstance","isPaused","networkInfoManager","setNetworkInfoManager","config","state"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAAQA,QAAR,EAAkBC,SAAlB,EAA6BC,WAA7B,QAA+C,OAA/C;AACA,SAAQC,QAAR,QAAuB,cAAvB;AACA,OAAOC,qBAAP,MAAkC,iCAAlC;AACA,OAAOC,eAAP,MAA4B,4BAA5B;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAO,KAAKC,KAAZ,MAAuB,kBAAvB,C,CAEA;;AACA,IAAIC,cAAc,GAAGJ,qBAArB,C,CAEA;;AACA,IAAIK,MAAoB,GAAG,IAA3B;;AACA,MAAMC,WAAW,GAAG,MAAa;AAC/B,SAAO,IAAIJ,KAAJ,CAAUE,cAAV,CAAP;AACD,CAFD,C,CAIA;;;AACA,IAAIG,mBAAmB,GAAG,KAA1B;AACA,IAAIC,YAAqD,GAAG,EAA5D;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,SAAT,CACLC,aADK,EAEC;AACNN,EAAAA,cAAc,GAAG,EACf,GAAGJ,qBADY;AAEf,OAAGU;AAFY,GAAjB;;AAKA,MAAIL,MAAJ,EAAY;AACVA,IAAAA,MAAM,CAACM,QAAP;;AACAN,IAAAA,MAAM,GAAGC,WAAW,EAApB;AACD;;AAED,MAAIP,QAAQ,CAACa,EAAT,KAAgB,KAApB,EAA2B;AACzBX,IAAAA,eAAe,CAACQ,SAAhB,CAA0BC,aAA1B;AACD;AACF;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASG,KAAT,CACLC,kBADK,EAEwB;AAC7B,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,GAAGlB,WAAW,CAAC,MAAM;AAChC,QAAI2C,kBAAkB,IAAI,CAAClC,mBAA3B,EAAgD;AAC9CA,MAAAA,mBAAmB,GAAG,IAAtB;;AACAkC,MAAAA,kBAAkB,CAACrB,kBAAnB,GAAwCI,OAAxC,CAAgD,MAAM;AACpDjB,QAAAA,mBAAmB,GAAG,KAAtB;AACD,OAFD;AAGD;AACF,GAP0B,EAOxB,CAACkC,kBAAD,CAPwB,CAA3B;AASA,SAAO;AACLX,IAAAA,OADK;AAELd,IAAAA;AAFK,GAAP;AAID;AAED,cAAc,kBAAd;AAEA,eAAe;AACbP,EAAAA,SADa;AAEbI,EAAAA,KAFa;AAGbG,EAAAA,OAHa;AAIbS,EAAAA,gBAJa;AAKbI,EAAAA,UALa;AAMbU,EAAAA;AANa,CAAf","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {useState, useEffect, useCallback} from 'react';\nimport {Platform} from 'react-native';\nimport DEFAULT_CONFIGURATION from './internal/defaultConfiguration';\nimport NativeInterface from './internal/nativeInterface';\nimport State from './internal/state';\nimport * as Types from './internal/types';\n\n// Stores the currently used configuration\nlet _configuration = DEFAULT_CONFIGURATION;\n\n// Stores the singleton reference to the state manager\nlet _state: State | null = null;\nconst createState = (): State => {\n return new State(_configuration);\n};\n\n// Track ongoing requests\nlet isRequestInProgress = false;\nlet requestQueue: ((state: Types.NetInfoState) => void)[] = [];\n\n/**\n * Configures the library with the given configuration. Note that calling this will stop all\n * previously added listeners from being called again. It is best to call this right when your\n * application is started to avoid issues. The configuration sets up a global singleton instance.\n *\n * @param configuration The new configuration to set.\n */\nexport function configure(\n configuration: Partial,\n): void {\n _configuration = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n\n if (_state) {\n _state.tearDown();\n _state = createState();\n }\n\n if (Platform.OS === 'ios') {\n NativeInterface.configure(configuration);\n }\n}\n\n/**\n * Returns a `Promise` that resolves to a `NetInfoState` object.\n * This function operates on the global singleton instance configured using `configure()`\n *\n * @param [requestedInterface] interface from which to obtain the information\n *\n * @returns A Promise which contains the current connection state.\n */\nexport function fetch(\n requestedInterface?: string,\n): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state.latest(requestedInterface);\n}\n\n/**\n * Force-refreshes the internal state of the global singleton managed by this library.\n *\n * @returns A Promise which contains the updated connection state.\n */\nexport function refresh(): Promise {\n if (!_state) {\n _state = createState();\n }\n\n // If a request is already in progress, return a promise that will resolve when the current request finishes\n if (isRequestInProgress) {\n return new Promise((resolve) => {\n requestQueue.push(resolve);\n });\n }\n\n isRequestInProgress = true;\n\n return _state._fetchCurrentState().then((result) => {\n requestQueue.forEach((resolve) => resolve(result));\n requestQueue = [];\n return result;\n }).finally(() => {\n isRequestInProgress = false;\n });\n}\n\n/**\n * Subscribe to the global singleton's connection information. The callback is called with a parameter of type\n * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener\n * will be called with the latest information soon after you subscribe and then with any\n * subsequent changes afterwards. You should not assume that the listener is called in the same\n * way across devices or platforms.\n *\n * @param listener The listener which is called when the network state changes.\n *\n * @returns A function which can be called to unsubscribe.\n */\nexport function addEventListener(\n listener: Types.NetInfoChangeHandler,\n): Types.NetInfoSubscription {\n if (!_state) {\n _state = createState();\n }\n\n _state.add(listener);\n return (): void => {\n _state && _state.remove(listener);\n };\n}\n\n/**\n * A React Hook into this library's singleton which updates when the connection state changes.\n *\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns The connection state.\n */\nexport function useNetInfo(\n configuration?: Partial,\n): Types.NetInfoState {\n if (configuration) {\n configure(configuration);\n }\n\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect((): (() => void) => {\n const unsubscribe = addEventListener(setNetInfo);\n return () => unsubscribe();\n }, []);\n\n return netInfo;\n}\n\n/**\n * A React Hook which manages an isolated instance of the network info manager.\n * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener,\n * NetInfo.fetch, NetInfo.refresh are performed on a global singleton and have no affect on this hook.\n * @param {boolean} isPaused - Pause the internal network checks.\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns the netInfo state and a refresh function\n */\nexport function useNetInfoInstance(\n isPaused = false,\n configuration?: Partial,\n) {\n const [networkInfoManager, setNetworkInfoManager] = useState();\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect(() => {\n if (isPaused) {\n return;\n }\n const config = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n const state = new State(config);\n setNetworkInfoManager(state);\n state.add(setNetInfo);\n return state.tearDown;\n }, [isPaused, configuration]);\n\n const refresh = useCallback(() => {\n if (networkInfoManager && !isRequestInProgress) {\n isRequestInProgress = true;\n networkInfoManager._fetchCurrentState().finally(() => {\n isRequestInProgress = false;\n });\n }\n }, [networkInfoManager]);\n\n return {\n netInfo,\n refresh,\n };\n}\n\nexport * from './internal/types';\n\nexport default {\n configure,\n fetch,\n refresh,\n addEventListener,\n useNetInfo,\n useNetInfoInstance,\n};\n"]} +\ No newline at end of file ++{"version":3,"names":["useState","useEffect","useCallback","Platform","DEFAULT_CONFIGURATION","NativeInterface","State","Types","_configuration","_state","createState","configure","configuration","tearDown","OS","fetch","requestedInterface","latest","refresh","_fetchCurrentState","addEventListener","listener","add","remove","useNetInfo","netInfo","setNetInfo","type","NetInfoStateType","unknown","isConnected","isInternetReachable","details","useNetInfoInstance","isPaused","networkInfoManager","setNetworkInfoManager","config","state"],"sources":["index.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {useState, useEffect, useCallback} from 'react';\nimport {Platform} from 'react-native';\nimport DEFAULT_CONFIGURATION from './internal/defaultConfiguration';\nimport NativeInterface from './internal/nativeInterface';\nimport State from './internal/state';\nimport * as Types from './internal/types';\n\n// Stores the currently used configuration\nlet _configuration = DEFAULT_CONFIGURATION;\n\n// Stores the singleton reference to the state manager\nlet _state: State | null = null;\nconst createState = (): State => {\n return new State(_configuration);\n};\n\n/**\n * Configures the library with the given configuration. Note that calling this will stop all\n * previously added listeners from being called again. It is best to call this right when your\n * application is started to avoid issues. The configuration sets up a global singleton instance.\n *\n * @param configuration The new configuration to set.\n */\nexport function configure(\n configuration: Partial,\n): void {\n _configuration = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n\n if (_state) {\n _state.tearDown();\n _state = createState();\n }\n\n if (Platform.OS === 'ios') {\n NativeInterface.configure(configuration);\n }\n}\n\n/**\n * Returns a `Promise` that resolves to a `NetInfoState` object.\n * This function operates on the global singleton instance configured using `configure()`\n *\n * @param [requestedInterface] interface from which to obtain the information\n *\n * @returns A Promise which contains the current connection state.\n */\nexport function fetch(\n requestedInterface?: string,\n): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state.latest(requestedInterface);\n}\n\n/**\n * Force-refreshes the internal state of the global singleton managed by this library.\n *\n * @returns A Promise which contains the updated connection state.\n */\nexport function refresh(): Promise {\n if (!_state) {\n _state = createState();\n }\n return _state._fetchCurrentState();\n}\n\n/**\n * Subscribe to the global singleton's connection information. The callback is called with a parameter of type\n * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener\n * will be called with the latest information soon after you subscribe and then with any\n * subsequent changes afterwards. You should not assume that the listener is called in the same\n * way across devices or platforms.\n *\n * @param listener The listener which is called when the network state changes.\n *\n * @returns A function which can be called to unsubscribe.\n */\nexport function addEventListener(\n listener: Types.NetInfoChangeHandler,\n): Types.NetInfoSubscription {\n if (!_state) {\n _state = createState();\n }\n\n _state.add(listener);\n return (): void => {\n _state && _state.remove(listener);\n };\n}\n\n/**\n * A React Hook into this library's singleton which updates when the connection state changes.\n *\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns The connection state.\n */\nexport function useNetInfo(\n configuration?: Partial,\n): Types.NetInfoState {\n if (configuration) {\n configure(configuration);\n }\n\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect((): (() => void) => {\n return addEventListener(setNetInfo);\n }, []);\n\n return netInfo;\n}\n\n/**\n * A React Hook which manages an isolated instance of the network info manager.\n * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener,\n * NetInfo.fetch, NetInfo.refresh are performed on a global singleton and have no affect on this hook.\n * @param {boolean} isPaused - Pause the internal network checks.\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns the netInfo state and a refresh function\n */\nexport function useNetInfoInstance(\n isPaused = false,\n configuration?: Partial,\n) {\n const [networkInfoManager, setNetworkInfoManager] = useState();\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null,\n });\n\n useEffect(() => {\n if (isPaused) {\n return;\n }\n const config = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n };\n const state = new State(config);\n setNetworkInfoManager(state);\n state.add(setNetInfo);\n return state.tearDown;\n }, [isPaused, configuration]);\n\n const refresh = useCallback(() => {\n networkInfoManager && networkInfoManager._fetchCurrentState();\n }, [networkInfoManager]);\n\n return {\n netInfo,\n refresh,\n };\n}\n\nexport * from './internal/types';\n\nexport default {\n configure,\n fetch,\n refresh,\n addEventListener,\n useNetInfo,\n useNetInfoInstance,\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAQA,QAAQ,EAAEC,SAAS,EAAEC,WAAW,QAAO,OAAO;AACtD,SAAQC,QAAQ,QAAO,cAAc;AACrC,OAAOC,qBAAqB,MAAM,iCAAiC;AACnE,OAAOC,eAAe,MAAM,4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AC;IAC5BA,KAAK,CAAChB,GAAG,CAACI,UAAU,CAAC;IACrB,OAAOY,KAAK,CAACzB,QAAQ;EACvB,CAAC,EAAE,CAACqB,QAAQ,EAAEtB,aAAa,CAAC,CAAC;EAE7B,MAAMM,OAAO,GAAGhB,WAAW,CAAC,MAAM;IAChCiC,kBAAkB,IAAIA,kBAAkB,CAAChB,kBAAkB,CAAC,CAAC;EAC/D,CAAC,EAAE,CAACgB,kBAAkB,CAAC,CAAC;EAExB,OAAO;IACLV,OAAO;IACPP;EACF,CAAC;AACH;AAEA,cAAc,kBAAkB;AAEhC,eAAe;EACbP,SAAS;EACTI,KAAK;EACLG,OAAO;EACPE,gBAAgB;EAChBI,UAAU;EACVS;AACF,CAAC"} +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js b/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js +new file mode 100644 +index 0000000..54a9e1b +--- /dev/null ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js +@@ -0,0 +1,5 @@ ++/* eslint-disable @typescript-eslint/ban-types */ ++ ++import { TurboModuleRegistry } from 'react-native'; ++export default TurboModuleRegistry.getEnforcing('RNCNetInfo'); ++//# sourceMappingURL=NativeRNCNetInfo.js.map +\ No newline at end of file +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js.map +new file mode 100644 +index 0000000..2427c42 +--- /dev/null ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/NativeRNCNetInfo.js.map +@@ -0,0 +1 @@ ++{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sources":["NativeRNCNetInfo.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-types */\nimport type { TurboModule } from 'react-native';\nimport { TurboModuleRegistry } from 'react-native';\n\nexport interface Spec extends TurboModule {\n configure: (config: Object) => void;\n getCurrentState(requestedInterface?: string): Promise;\n // Events\n addListener: (eventName: string) => void;\n removeListeners: (count: number) => void;\n}\n\nexport default TurboModuleRegistry.getEnforcing('RNCNetInfo');\n\n"],"mappings":"AAAA;;AAEA,SAASA,mBAAmB,QAAQ,cAAc;AAUlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,YAAY,CAAC"} +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.js.map +index 6a190c8..b03df8d 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["defaultConfiguration.ts"],"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability"],"mappings":"AAEA,MAAMA,qBAAiD,GAAG;AACxDC,EAAAA,eAAe,EAAE,0CADuC;AAExDC,EAAAA,kBAAkB,EAAE,MAFoC;AAGxDC,EAAAA,mBAAmB,EAAE,EAHmC;AAIxDC,EAAAA,gBAAgB,EAAGC,QAAD,IAChBC,OAAO,CAACC,OAAR,CAAgBF,QAAQ,CAACG,MAAT,KAAoB,GAApC,CALsD;AAMxDC,EAAAA,wBAAwB,EAAE,IAAI,IAN0B;AAMpB;AACpCC,EAAAA,uBAAuB,EAAE,KAAK,IAP0B;AAOpB;AACpCC,EAAAA,0BAA0B,EAAE,KAAK,IARuB;AAQjB;AACvCC,EAAAA,qBAAqB,EAAE,MAAe,IATkB;AAUxDC,EAAAA,mBAAmB,EAAE,KAVmC;AAWxDC,EAAAA,qBAAqB,EAAE;AAXiC,CAA1D;AAcA,eAAed,qBAAf","sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: 'https://clients3.google.com/generate_204',\n reachabilityMethod: 'HEAD',\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 204),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: false,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION;"]} +\ No newline at end of file ++{"version":3,"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability"],"sources":["defaultConfiguration.ts"],"sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: 'https://clients3.google.com/generate_204',\n reachabilityMethod: 'HEAD',\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 204),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: false,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION;"],"mappings":"AAEA,MAAMA,qBAAiD,GAAG;EACxDC,eAAe,EAAE,0CAA0C;EAC3DC,kBAAkB,EAAE,MAAM;EAC1BC,mBAAmB,EAAE,CAAC,CAAC;EACvBC,gBAAgB,EAAGC,QAAkB,IACnCC,OAAO,CAACC,OAAO,CAACF,QAAQ,CAACG,MAAM,KAAK,GAAG,CAAC;EAC1CC,wBAAwB,EAAE,CAAC,GAAG,IAAI;EAAE;EACpCC,uBAAuB,EAAE,EAAE,GAAG,IAAI;EAAE;EACpCC,0BAA0B,EAAE,EAAE,GAAG,IAAI;EAAE;EACvCC,qBAAqB,EAAEA,CAAA,KAAe,IAAI;EAC1CC,mBAAmB,EAAE,KAAK;EAC1BC,qBAAqB,EAAE;AACzB,CAAC;AAED,eAAed,qBAAqB"} +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.web.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.web.js.map +index ba01d7a..7d9a5c5 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.web.js.map ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.web.js.map +@@ -1 +1 @@ +-{"version":3,"sources":["defaultConfiguration.web.ts"],"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability"],"mappings":"AAEA,MAAMA,qBAAiD,GAAG;AACxDC,EAAAA,eAAe,EAAE,GADuC;AAExDC,EAAAA,kBAAkB,EAAE,MAFoC;AAGxDC,EAAAA,mBAAmB,EAAE,EAHmC;AAIxDC,EAAAA,gBAAgB,EAAGC,QAAD,IAChBC,OAAO,CAACC,OAAR,CAAgBF,QAAQ,CAACG,MAAT,KAAoB,GAApC,CALsD;AAMxDC,EAAAA,wBAAwB,EAAE,IAAI,IAN0B;AAMpB;AACpCC,EAAAA,uBAAuB,EAAE,KAAK,IAP0B;AAOpB;AACpCC,EAAAA,0BAA0B,EAAE,KAAK,IARuB;AAQjB;AACvCC,EAAAA,qBAAqB,EAAE,MAAe,IATkB;AAUxDC,EAAAA,mBAAmB,EAAE,IAVmC;AAWxDC,EAAAA,qBAAqB,EAAE;AAXiC,CAA1D;AAcA,eAAed,qBAAf","sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: '/',\n reachabilityMethod: \"HEAD\",\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 200),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: true,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION"]} \ No newline at end of file ++{"version":3,"names":["DEFAULT_CONFIGURATION","reachabilityUrl","reachabilityMethod","reachabilityHeaders","reachabilityTest","response","Promise","resolve","status","reachabilityShortTimeout","reachabilityLongTimeout","reachabilityRequestTimeout","reachabilityShouldRun","shouldFetchWiFiSSID","useNativeReachability"],"sources":["defaultConfiguration.web.ts"],"sourcesContent":["import * as Types from './types';\n\nconst DEFAULT_CONFIGURATION: Types.NetInfoConfiguration = {\n reachabilityUrl: '/',\n reachabilityMethod: \"HEAD\",\n reachabilityHeaders: {},\n reachabilityTest: (response: Response): Promise =>\n Promise.resolve(response.status === 200),\n reachabilityShortTimeout: 5 * 1000, // 5s\n reachabilityLongTimeout: 60 * 1000, // 60s\n reachabilityRequestTimeout: 15 * 1000, // 15s\n reachabilityShouldRun: (): boolean => true,\n shouldFetchWiFiSSID: true,\n useNativeReachability: true\n};\n\nexport default DEFAULT_CONFIGURATION"],"mappings":"AAEA,MAAMA,qBAAiD,GAAG;EACxDC,eAAe,EAAE,GAAG;EACpBC,kBAAkB,EAAE,MAAM;EAC1BC,mBAAmB,EAAE,CAAC,CAAC;EACvBC,gBAAgB,EAAGC,QAAkB,IACnCC,OAAO,CAACC,OAAO,CAACF,QAAQ,CAACG,MAAM,KAAK,GAAG,CAAC;EAC1CC,wBAAwB,EAAE,CAAC,GAAG,IAAI;EAAE;EACpCC,uBAAuB,EAAE,EAAE,GAAG,IAAI;EAAE;EACpCC,0BAA0B,EAAE,EAAE,GAAG,IAAI;EAAE;EACvCC,qBAAqB,EAAEA,CAAA,KAAe,IAAI;EAC1CC,mBAAmB,EAAE,IAAI;EACzBC,qBAAqB,EAAE;AACzB,CAAC;AAED,eAAed,qBAAqB"} +diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js b/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js +index fb6f716..76f6d82 100644 +--- a/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js ++++ b/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js +@@ -1,4 +1,6 @@ +-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } ++function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } ++function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } ++function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } + + /** + * Copyright (c) Facebook, Inc. and its affiliates. diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js.map -index a998c5f..544e5cb 100644 +index af023b1..02d3640 100644 --- a/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js.map +++ b/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js.map @@ -1 +1 @@ --{"version":3,"sources":["internetReachability.ts"],"names":["InternetReachability","constructor","configuration","listener","undefined","isInternetReachable","_isInternetReachable","_listener","expectsConnection","_currentInternetReachabilityCheckHandler","cancel","_currentTimeoutHandle","clearTimeout","_configuration","reachabilityShouldRun","_setIsInternetReachable","_checkInternetReachability","controller","AbortController","responsePromise","fetch","reachabilityUrl","headers","reachabilityHeaders","method","reachabilityMethod","cache","signal","timeoutHandle","timeoutPromise","Promise","setTimeout","abort","reachabilityRequestTimeout","cancelPromise","_","reject","promise","race","then","response","reachabilityTest","result","nextTimeoutInterval","reachabilityLongTimeout","reachabilityShortTimeout","catch","error","state","useNativeReachability","_setExpectsConnection","isConnected"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUA,eAAe,MAAMA,oBAAN,CAA2B;AAOxCC,EAAAA,WAAW,CACTC,aADS,EAETC,QAFS,EAGT;AAAA;;AAAA;;AAAA,kDAPyDC,SAOzD;;AAAA,sEAN0F,IAM1F;;AAAA,mDALoE,IAKpE;;AAAA,qDAMAC,mBADgC,IAEvB;AACT,UAAI,KAAKC,oBAAL,KAA8BD,mBAAlC,EAAuD;AACrD;AACD;;AAED,WAAKC,oBAAL,GAA4BD,mBAA5B;;AACA,WAAKE,SAAL,CAAe,KAAKD,oBAApB;AACD,KAdC;;AAAA,mDAgB+BE,iBAAD,IAA6C;AAC3E;AACA,UAAI,KAAKC,wCAAL,KAAkD,IAAtD,EAA4D;AAC1D,aAAKA,wCAAL,CAA8CC,MAA9C;;AACA,aAAKD,wCAAL,GAAgD,IAAhD;AACD,OAL0E,CAM3E;;;AACA,UAAI,KAAKE,qBAAL,KAA+B,IAAnC,EAAyC;AACvCC,QAAAA,YAAY,CAAC,KAAKD,qBAAN,CAAZ;AACA,aAAKA,qBAAL,GAA6B,IAA7B;AACD;;AAED,UAAIH,iBAAiB,IAAI,KAAKK,cAAL,CAAoBC,qBAApB,EAAzB,EAAsE;AACpE;AACA;AACA,YAAI,CAAC,KAAKR,oBAAV,EAAgC;AAC9B,eAAKS,uBAAL,CAA6B,IAA7B;AACD,SALmE,CAMpE;;;AACA,aAAKN,wCAAL,GAAgD,KAAKO,0BAAL,EAAhD;AACD,OARD,MAQO;AACL;AACA,aAAKD,uBAAL,CAA6B,KAA7B;AACD;AACF,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A,aAAKA,qBAAL,GAA6B,IAA7B;AACD;AACF,KAnJC;;AACA,SAAKE,cAAL,GAAsBX,aAAtB;AACA,SAAKK,SAAL,GAAiBJ,QAAjB;AACD;;AAbuC","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport * as PrivateTypes from './privateTypes';\nimport * as Types from './types';\n\ninterface InternetReachabilityCheckHandler {\n promise: Promise;\n cancel: () => void;\n}\n\nexport default class InternetReachability {\n private _configuration: Types.NetInfoConfiguration;\n private _listener: PrivateTypes.NetInfoInternetReachabilityChangeListener;\n private _isInternetReachable: boolean | null | undefined = undefined;\n private _currentInternetReachabilityCheckHandler: InternetReachabilityCheckHandler | null = null;\n private _currentTimeoutHandle: ReturnType | null = null;\n\n constructor(\n configuration: Types.NetInfoConfiguration,\n listener: PrivateTypes.NetInfoInternetReachabilityChangeListener,\n ) {\n this._configuration = configuration;\n this._listener = listener;\n }\n\n private _setIsInternetReachable = (\n isInternetReachable: boolean | null,\n ): void => {\n if (this._isInternetReachable === isInternetReachable) {\n return;\n }\n\n this._isInternetReachable = isInternetReachable;\n this._listener(this._isInternetReachable);\n };\n\n private _setExpectsConnection = (expectsConnection: boolean | null): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n\n if (expectsConnection && this._configuration.reachabilityShouldRun()) {\n // If we expect a connection, start the process for finding if we have one\n // Set the state to \"null\" if it was previously false\n if (!this._isInternetReachable) {\n this._setIsInternetReachable(null);\n }\n // Start a network request to check for internet\n this._currentInternetReachabilityCheckHandler = this._checkInternetReachability();\n } else {\n // If we don't expect a connection or don't run reachability check, just change the state to \"false\"\n this._setIsInternetReachable(false);\n }\n };\n\n private _checkInternetReachability = (): InternetReachabilityCheckHandler => {\n const controller = new AbortController();\n\n const responsePromise = fetch(this._configuration.reachabilityUrl, {\n headers: this._configuration.reachabilityHeaders,\n method: this._configuration.reachabilityMethod,\n cache: 'no-cache',\n signal: controller.signal,\n });\n\n // Create promise that will reject after the request timeout has been reached\n let timeoutHandle: ReturnType;\n const timeoutPromise = new Promise((): void => {\n timeoutHandle = setTimeout(\n (): void => controller.abort('timedout'),\n this._configuration.reachabilityRequestTimeout,\n );\n });\n\n // Create promise that makes it possible to cancel a pending request through a reject\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n let cancel: () => void = (): void => {};\n const cancelPromise = new Promise((_, reject): void => {\n cancel = (): void => reject('canceled');\n });\n\n const promise = Promise.race([\n responsePromise,\n timeoutPromise,\n cancelPromise,\n ])\n .then(\n (response): Promise => {\n return this._configuration.reachabilityTest(response);\n },\n )\n .then(\n (result): void => {\n this._setIsInternetReachable(result);\n const nextTimeoutInterval = this._isInternetReachable\n ? this._configuration.reachabilityLongTimeout\n : this._configuration.reachabilityShortTimeout;\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n nextTimeoutInterval,\n );\n },\n )\n .catch(\n (error: Error | 'timedout' | 'canceled'): void => {\n if ('canceled' === error) {\n controller.abort();\n } else {\n this._setIsInternetReachable(false);\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n this._configuration.reachabilityShortTimeout,\n );\n }\n },\n )\n // Clear request timeout and propagate any errors\n .then(\n (): void => {\n clearTimeout(timeoutHandle);\n },\n (error: Error): void => {\n clearTimeout(timeoutHandle);\n throw error;\n },\n );\n\n return {\n promise,\n cancel,\n };\n };\n\n public update = (state: PrivateTypes.NetInfoNativeModuleState): void => {\n if (\n typeof state.isInternetReachable === 'boolean' &&\n this._configuration.useNativeReachability\n ) {\n this._setIsInternetReachable(state.isInternetReachable);\n } else {\n this._setExpectsConnection(state.isConnected);\n }\n };\n\n public currentState = (): boolean | null | undefined => {\n return this._isInternetReachable;\n };\n\n public tearDown = (): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n };\n}\n"]} +-{"version":3,"sources":["internetReachability.ts"],"names":["InternetReachability","constructor","configuration","listener","undefined","isInternetReachable","_isInternetReachable","_listener","expectsConnection","_currentInternetReachabilityCheckHandler","cancel","_currentTimeoutHandle","clearTimeout","_configuration","reachabilityShouldRun","_setIsInternetReachable","_checkInternetReachability","controller","AbortController","responsePromise","fetch","reachabilityUrl","headers","reachabilityHeaders","method","reachabilityMethod","cache","signal","timeoutHandle","timeoutPromise","Promise","_","reject","setTimeout","reachabilityRequestTimeout","cancelPromise","promise","race","then","response","reachabilityTest","result","nextTimeoutInterval","reachabilityLongTimeout","reachabilityShortTimeout","catch","error","abort","state","useNativeReachability","_setExpectsConnection","isConnected"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUA,eAAe,MAAMA,oBAAN,CAA2B;AAOxCC,EAAAA,WAAW,CACTC,aADS,EAETC,QAFS,EAGT;AAAA;;AAAA;;AAAA,kDAPyDC,SAOzD;;AAAA,sEAN0F,IAM1F;;AAAA,mDALoE,IAKpE;;AAAA,qDAMAC,mBADgC,IAEvB;AACT,UAAI,KAAKC,oBAAL,KAA8BD,mBAAlC,EAAuD;AACrD;AACD;;AAED,WAAKC,oBAAL,GAA4BD,mBAA5B;;AACA,WAAKE,SAAL,CAAe,KAAKD,oBAApB;AACD,KAdC;;AAAA,mDAgB+BE,iBAAD,IAA6C;AAC3E;AACA,UAAI,KAAKC,wCAAL,KAAkD,IAAtD,EAA4D;AAC1D,aAAKA,wCAAL,CAA8CC,MAA9C;;AACA,aAAKD,wCA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E,OAAOA,KAAK,CAAC3C,mBAAb,KAAqC,SAArC,IACA,KAAKQ,cAAL,CAAoBoC,qBAFtB,EAGE;AACA,aAAKlC,uBAAL,CAA6BiC,KAAK,CAAC3C,mBAAnC;AACD,OALD,MAKO;AACL,aAAK6C,qBAAL,CAA2BF,KAAK,CAACG,WAAjC;AACD;AACF,KArIC;;AAAA,0CAuIoB,MAAkC;AACtD,aAAO,KAAK7C,oBAAZ;AACD,KAzIC;;AAAA,sCA2IgB,MAAY;AAC5B;AACA,UAAI,KAAKG,wCAAL,KAAkD,IAAtD,EAA4D;AAC1D,aAAKA,wCAAL,CAA8CC,MAA9C;;AACA,aAAKD,wCAAL,GAAgD,IAAhD;AACD,OAL2B,CAO5B;;;AACA,UAAI,KAAKE,qBAAL,KAA+B,IAAnC,EAAyC;AACvCC,QAAAA,YAAY,CAAC,KAAKD,qBAAN,CAAZ;AACA,aAAKA,qBAAL,GAA6B,IAA7B;AACD;AACF,KAvJC;;AACA,SAAKE,cAAL,GAAsBX,aAAtB;AACA,SAAKK,SAAL,GAAiBJ,QAAjB;AACD;;AAbuC","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport * as PrivateTypes from './privateTypes';\nimport * as Types from './types';\n\ninterface InternetReachabilityCheckHandler {\n promise: Promise;\n cancel: () => void;\n}\n\nexport default class InternetReachability {\n private _configuration: Types.NetInfoConfiguration;\n private _listener: PrivateTypes.NetInfoInternetReachabilityChangeListener;\n private _isInternetReachable: boolean | null | undefined = undefined;\n private _currentInternetReachabilityCheckHandler: InternetReachabilityCheckHandler | null = null;\n private _currentTimeoutHandle: ReturnType | null = null;\n\n constructor(\n configuration: Types.NetInfoConfiguration,\n listener: PrivateTypes.NetInfoInternetReachabilityChangeListener,\n ) {\n this._configuration = configuration;\n this._listener = listener;\n }\n\n private _setIsInternetReachable = (\n isInternetReachable: boolean | null,\n ): void => {\n if (this._isInternetReachable === isInternetReachable) {\n return;\n }\n\n this._isInternetReachable = isInternetReachable;\n this._listener(this._isInternetReachable);\n };\n\n private _setExpectsConnection = (expectsConnection: boolean | null): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n\n if (expectsConnection && this._configuration.reachabilityShouldRun()) {\n // If we expect a connection, start the process for finding if we have one\n // Set the state to \"null\" if it was previously false\n if (!this._isInternetReachable) {\n this._setIsInternetReachable(null);\n }\n // Start a network request to check for internet\n this._currentInternetReachabilityCheckHandler = this._checkInternetReachability();\n } else {\n // If we don't expect a connection or don't run reachability check, just change the state to \"false\"\n this._setIsInternetReachable(false);\n }\n };\n\n private _checkInternetReachability = (): InternetReachabilityCheckHandler => {\n const controller = new AbortController();\n\n const responsePromise = fetch(this._configuration.reachabilityUrl, {\n headers: this._configuration.reachabilityHeaders,\n method: this._configuration.reachabilityMethod,\n cache: 'no-cache',\n signal: controller.signal,\n });\n\n // Create promise that will reject after the request timeout has been reached\n let timeoutHandle: ReturnType;\n const timeoutPromise = new Promise((_, reject): void => {\n timeoutHandle = setTimeout(\n (): void => reject('timedout'),\n this._configuration.reachabilityRequestTimeout,\n );\n });\n\n // Create promise that makes it possible to cancel a pending request through a reject\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n let cancel: () => void = (): void => {};\n const cancelPromise = new Promise((_, reject): void => {\n cancel = (): void => reject('canceled');\n });\n\n const promise = Promise.race([\n responsePromise,\n timeoutPromise,\n cancelPromise,\n ])\n .then(\n (response): Promise => {\n return this._configuration.reachabilityTest(response);\n },\n )\n .then(\n (result): void => {\n this._setIsInternetReachable(result);\n const nextTimeoutInterval = this._isInternetReachable\n ? this._configuration.reachabilityLongTimeout\n : this._configuration.reachabilityShortTimeout;\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n nextTimeoutInterval,\n );\n },\n )\n .catch(\n (error: Error | 'timedout' | 'canceled'): void => {\n if ('canceled' === error) {\n controller.abort();\n } else {\n if ('timedout' === error) {\n controller.abort();\n }\n \n this._setIsInternetReachable(false);\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n this._configuration.reachabilityShortTimeout,\n );\n }\n },\n )\n // Clear request timeout and propagate any errors\n .then(\n (): void => {\n clearTimeout(timeoutHandle);\n },\n (error: Error): void => {\n clearTimeout(timeoutHandle);\n throw error;\n },\n );\n\n return {\n promise,\n cancel,\n };\n };\n\n public update = (state: PrivateTypes.NetInfoNativeModuleState): void => {\n if (\n typeof state.isInternetReachable === 'boolean' &&\n this._configuration.useNativeReachability\n ) {\n this._setIsInternetReachable(state.isInternetReachable);\n } else {\n this._setExpectsConnection(state.isConnected);\n }\n };\n\n public currentState = (): boolean | null | undefined => {\n return this._isInternetReachable;\n };\n\n public tearDown = (): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n };\n}\n"]} \ No newline at end of file +{"version":3,"names":["InternetReachability","constructor","configuration","listener","_defineProperty","undefined","isInternetReachable","_isInternetReachable","_listener","expectsConnection","_currentInternetReachabilityCheckHandler","cancel","_currentTimeoutHandle","clearTimeout","_configuration","reachabilityShouldRun","_setIsInternetReachable","_checkInternetReachability","controller","AbortController","responsePromise","fetch","reachabilityUrl","headers","reachabilityHeaders","method","reachabilityMethod","cache","signal","timeoutHandle","timeoutPromise","Promise","_","reject","setTimeout","reachabilityRequestTimeout","cancelPromise","promise","race","then","response","reachabilityTest","result","nextTimeoutInterval","reachabilityLongTimeout","reachabilityShortTimeout","catch","error","abort","state","useNativeReachability","_setExpectsConnection","isConnected"],"sources":["internetReachability.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport * as PrivateTypes from './privateTypes';\nimport * as Types from './types';\n\ninterface InternetReachabilityCheckHandler {\n promise: Promise;\n cancel: () => void;\n}\n\nexport default class InternetReachability {\n private _configuration: Types.NetInfoConfiguration;\n private _listener: PrivateTypes.NetInfoInternetReachabilityChangeListener;\n private _isInternetReachable: boolean | null | undefined = undefined;\n private _currentInternetReachabilityCheckHandler: InternetReachabilityCheckHandler | null =\n null;\n private _currentTimeoutHandle: ReturnType | null = null;\n\n constructor(\n configuration: Types.NetInfoConfiguration,\n listener: PrivateTypes.NetInfoInternetReachabilityChangeListener,\n ) {\n this._configuration = configuration;\n this._listener = listener;\n }\n\n private _setIsInternetReachable = (\n isInternetReachable: boolean | null,\n ): void => {\n if (this._isInternetReachable === isInternetReachable) {\n return;\n }\n\n this._isInternetReachable = isInternetReachable;\n this._listener(this._isInternetReachable);\n };\n\n private _setExpectsConnection = (expectsConnection: boolean | null): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n\n if (expectsConnection && this._configuration.reachabilityShouldRun()) {\n // If we expect a connection, start the process for finding if we have one\n // Set the state to \"null\" if it was previously false\n if (!this._isInternetReachable) {\n this._setIsInternetReachable(null);\n }\n // Start a network request to check for internet\n this._currentInternetReachabilityCheckHandler =\n this._checkInternetReachability();\n } else {\n // If we don't expect a connection or don't run reachability check, just change the state to \"false\"\n this._setIsInternetReachable(false);\n }\n };\n\n private _checkInternetReachability = (): InternetReachabilityCheckHandler => {\n const controller = new AbortController();\n\n const responsePromise = fetch(this._configuration.reachabilityUrl, {\n headers: this._configuration.reachabilityHeaders,\n method: this._configuration.reachabilityMethod,\n cache: 'no-cache',\n signal: controller.signal,\n });\n\n // Create promise that will reject after the request timeout has been reached\n let timeoutHandle: ReturnType;\n const timeoutPromise = new Promise((_, reject): void => {\n timeoutHandle = setTimeout(\n (): void => reject('timedout'),\n this._configuration.reachabilityRequestTimeout,\n );\n });\n\n // Create promise that makes it possible to cancel a pending request through a reject\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n let cancel: () => void = (): void => {};\n const cancelPromise = new Promise((_, reject): void => {\n cancel = (): void => reject('canceled');\n });\n\n const promise = Promise.race([\n responsePromise,\n timeoutPromise,\n cancelPromise,\n ])\n .then((response): Promise => {\n return this._configuration.reachabilityTest(response);\n })\n .then((result): void => {\n this._setIsInternetReachable(result);\n const nextTimeoutInterval = this._isInternetReachable\n ? this._configuration.reachabilityLongTimeout\n : this._configuration.reachabilityShortTimeout;\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n nextTimeoutInterval,\n );\n })\n .catch((error: Error | 'timedout' | 'canceled'): void => {\n if (error !== 'canceled') {\n this._setIsInternetReachable(false);\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n this._configuration.reachabilityShortTimeout,\n );\n }\n })\n .catch(\n (error: Error | 'timedout' | 'canceled'): void => {\n if ('canceled' === error) {\n controller.abort();\n } else {\n if ('timedout' === error) {\n controller.abort();\n }\n \n this._setIsInternetReachable(false);\n this._currentTimeoutHandle = setTimeout(\n this._checkInternetReachability,\n this._configuration.reachabilityShortTimeout,\n );\n }\n },\n )\n // Clear request timeout and propagate any errors\n .then(\n (): void => {\n clearTimeout(timeoutHandle);\n },\n (error: Error): void => {\n clearTimeout(timeoutHandle);\n throw error;\n },\n );\n\n return {\n promise,\n cancel,\n };\n };\n\n public update = (state: PrivateTypes.NetInfoNativeModuleState): void => {\n if (\n typeof state.isInternetReachable === 'boolean' &&\n this._configuration.useNativeReachability\n ) {\n this._setIsInternetReachable(state.isInternetReachable);\n } else {\n this._setExpectsConnection(state.isConnected);\n }\n };\n\n public currentState = (): boolean | null | undefined => {\n return this._isInternetReachable;\n };\n\n public tearDown = (): void => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n this._currentInternetReachabilityCheckHandler = null;\n }\n\n // Cancel any pending timeout\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n };\n}\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,eAAe,MAAMA,oBAAoB,CAAC;EAQxCC,WAAWA,CACTC,aAAyC,EACzCC,QAAgE,EAChE;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA,+BARyDC,SAAS;IAAAD,eAAA,mDAElE,IAAI;IAAAA,eAAA,gCACgE,IAAI;IAAAA,eAAA,kCAWxEE,mBAAmC,IAC1B;MACT,IAAI,IAAI,CAACC,oBAAoB,KAAKD,mBAAmB,EAAE;QACrD;MACF;MAEA,IAAI,CAACC,oBAAoB,GAAGD,mBAAmB;MAC/C,IAAI,CAACE,SAAS,CAAC,IAAI,CAACD,oBAAoB,CAAC;IAC3C,CAAC;IAAAH,eAAA,gCAEgCK,iBAAiC,IAAW;MAC3E;MACA,IAAI,IAAI,CAACC,wCAAwC,KAAK,IAAI,EAAE;QAC1D,IAAI,CAACA,wCAAwC,CAACC,MAAM,CAAC,CAAC;QACtD,IAAI,CAACD,wCAAwC,GAAG,IAAI;MACtD;MACA;MACA,IAAI,IAAI,CAACE,qBAAqB,KAAK,IAAI,EAAE;QACvCC,YAAY,CAAC,IAAI,CAACD,qBAAqB,CAAC;QACxC,IAAI,CAACA,qBAAqB,GAAG,IAAI;MACnC;MAEA,IAAIH,iBAAiB,IAAI,IAAI,CAACK,cAAc,CAACC,qBAA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AAC;IACH,CAAC;IAAAP,eAAA,iBAEgB6C,KAA4C,IAAW;MACtE,IACE,OAAOA,KAAK,CAAC3C,mBAAmB,KAAK,SAAS,IAC9C,IAAI,CAACQ,cAAc,CAACoC,qBAAqB,EACzC;QACA,IAAI,CAAClC,uBAAuB,CAACiC,KAAK,CAAC3C,mBAAmB,CAAC;MACzD,CAAC,MAAM;QACL,IAAI,CAAC6C,qBAAqB,CAACF,KAAK,CAACG,WAAW,CAAC;MAC/C;IACF,CAAC;IAAAhD,eAAA,uBAEqB,MAAkC;MACtD,OAAO,IAAI,CAACG,oBAAoB;IAClC,CAAC;IAAAH,eAAA,mBAEiB,MAAY;MAC5B;MACA,IAAI,IAAI,CAACM,wCAAwC,KAAK,IAAI,EAAE;QAC1D,IAAI,CAACA,wCAAwC,CAACC,MAAM,CAAC,CAAC;QACtD,IAAI,CAACD,wCAAwC,GAAG,IAAI;MACtD;;MAEA;MACA,IAAI,IAAI,CAACE,qBAAqB,KAAK,IAAI,EAAE;QACvCC,YAAY,CAAC,IAAI,CAACD,qBAAqB,CAAC;QACxC,IAAI,CAACA,qBAAqB,GAAG,IAAI;MACnC;IACF,CAAC;IA5JC,IAAI,CAACE,cAAc,GAAGZ,aAAa;IACnC,IAAI,CAACM,SAAS,GAAGL,QAAQ;EAC3B;AA2JF"} -\ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js -index f9a0320..5c9c6bf 100644 +index fd95bf6..9df682b 100644 --- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js +++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js -@@ -6,9 +6,11 @@ - * +@@ -7,8 +7,9 @@ * @format */ -+ import { NativeEventEmitter } from 'react-native'; -import RNCNetInfo from './nativeModule'; // Produce an error if we don't have the native module +import RNCNetInfo from './nativeModule'; @@ -2027,7 +1081,7 @@ index f9a0320..5c9c6bf 100644 if (!RNCNetInfo) { throw new Error(`@react-native-community/netinfo: NativeModule.RNCNetInfo is null. To fix this issue try these steps: -@@ -20,26 +22,26 @@ if (!RNCNetInfo) { +@@ -20,6 +21,7 @@ if (!RNCNetInfo) { If none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-netinfo`); } @@ -2035,12 +1089,11 @@ index f9a0320..5c9c6bf 100644 /** * We export the native interface in this way to give easy shared access to it between the * JavaScript code and the tests - */ -- -- +@@ -27,19 +29,20 @@ If none of these fix the issue, please open an issue on the Github repository: h + + let nativeEventEmitter = null; --export default { ...RNCNetInfo, -- +-const nativeInterface = Object.assign(RNCNetInfo, { +export default { + configure: RNCNetInfo.configure, + addListener: RNCNetInfo.addListener, @@ -2060,64 +1113,37 @@ index f9a0320..5c9c6bf 100644 return nativeEventEmitter; } - - }; +-}); +-export default nativeInterface; ++}; //# sourceMappingURL=nativeInterface.js.map \ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js.map -index 084d180..be2bae7 100644 +index 403f957..9f3ff1b 100644 --- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js.map +++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.js.map @@ -1 +1 @@ --{"version":3,"sources":["nativeInterface.ts"],"names":["NativeEventEmitter","RNCNetInfo","Error","nativeEventEmitter","eventEmitter"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAAQA,kBAAR,QAAiC,cAAjC;AACA,OAAOC,UAAP,MAAuB,gBAAvB,C,CAEA;;AACA,IAAI,CAACA,UAAL,EAAiB;AACf,QAAM,IAAIC,KAAJ,CAAW;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8IARQ,CAAN;AASD;AAED;AACA;AACA;AACA;;;AACA,IAAIC,kBAA6C,GAAG,IAApD;AACA,eAAe,EACb,GAAGF,UADU;;AAEb,MAAIG,YAAJ,GAAuC;AACrC,QAAI,CAACD,kBAAL,EAAyB;AACvB;AACA;AACAA,MAAAA,kBAAkB,GAAG,IAAIH,kBAAJ,CAAuBC,UAAvB,CAArB;AACD,KALoC,CAMrC;AACA;;;AACA,WAAOE,kBAAP;AACD;;AAXY,CAAf","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\n\n// Produce an error if we don't have the native module\nif (!RNCNetInfo) {\n throw new Error(`@react-native-community/netinfo: NativeModule.RNCNetInfo is null. To fix this issue try these steps:\n\n• Run \\`react-native link @react-native-community/netinfo\\` in the project root.\n• Rebuild and re-run the app.\n• If you are using CocoaPods on iOS, run \\`pod install\\` in the \\`ios\\` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n• Check that the library was linked correctly when you used the link command by running through the manual installation instructions in the README.\n* If you are getting this error while unit testing you need to mock the native module. Follow the guide in the README.\n\nIf none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-netinfo`);\n}\n\n/**\n * We export the native interface in this way to give easy shared access to it between the\n * JavaScript code and the tests\n */\nlet nativeEventEmitter: NativeEventEmitter | null = null;\nexport default {\n ...RNCNetInfo,\n get eventEmitter(): NativeEventEmitter {\n if (!nativeEventEmitter) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n nativeEventEmitter = new NativeEventEmitter(RNCNetInfo);\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n return nativeEventEmitter;\n },\n};\n"]} +-{"version":3,"sources":["nativeInterface.ts"],"names":["NativeEventEmitter","RNCNetInfo","Error","nativeEventEmitter","nativeInterface","Object","assign","eventEmitter"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAAQA,kBAAR,QAAiC,cAAjC;AACA,OAAOC,UAAP,MAAuB,gBAAvB,C,CAEA;;AACA,IAAI,CAACA,UAAL,EAAiB;AACf,QAAM,IAAIC,KAAJ,CAAW;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8IARQ,CAAN;AASD;AAED;AACA;AACA;AACA;;;AACA,IAAIC,kBAA6C,GAAG,IAApD;AACA,MAAMC,eAAe,GAAGC,MAAM,CAACC,MAAP,CAAcL,UAAd,EAA0B;AAChD,MAAIM,YAAJ,GAAuC;AACrC,QAAI,CAACJ,kBAAL,EAAyB;AACvB;AACA;AACAA,MAAAA,kBAAkB,GAAG,IAAIH,kBAAJ,CAAuBC,UAAvB,CAArB;AACD,KALoC,CAMrC;AACA;;;AACA,WAAOE,kBAAP;AACD;;AAV+C,CAA1B,CAAxB;AAYA,eAAeC,eAAf","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\n\n// Produce an error if we don't have the native module\nif (!RNCNetInfo) {\n throw new Error(`@react-native-community/netinfo: NativeModule.RNCNetInfo is null. To fix this issue try these steps:\n\n• Run \\`react-native link @react-native-community/netinfo\\` in the project root.\n• Rebuild and re-run the app.\n• If you are using CocoaPods on iOS, run \\`pod install\\` in the \\`ios\\` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n• Check that the library was linked correctly when you used the link command by running through the manual installation instructions in the README.\n* If you are getting this error while unit testing you need to mock the native module. Follow the guide in the README.\n\nIf none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-netinfo`);\n}\n\n/**\n * We export the native interface in this way to give easy shared access to it between the\n * JavaScript code and the tests\n */\nlet nativeEventEmitter: NativeEventEmitter | null = null;\nconst nativeInterface = Object.assign(RNCNetInfo, {\n get eventEmitter(): NativeEventEmitter {\n if (!nativeEventEmitter) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n nativeEventEmitter = new NativeEventEmitter(RNCNetInfo);\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n return nativeEventEmitter;\n },\n});\nexport default nativeInterface;\n"]} \ No newline at end of file +{"version":3,"names":["NativeEventEmitter","RNCNetInfo","Error","nativeEventEmitter","configure","addListener","removeListeners","getCurrentState","eventEmitter"],"sources":["nativeInterface.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\n\n// Produce an error if we don't have the native module\nif (!RNCNetInfo) {\n throw new Error(`@react-native-community/netinfo: NativeModule.RNCNetInfo is null. To fix this issue try these steps:\n\n• Run \\`react-native link @react-native-community/netinfo\\` in the project root.\n• Rebuild and re-run the app.\n• If you are using CocoaPods on iOS, run \\`pod install\\` in the \\`ios\\` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n• Check that the library was linked correctly when you used the link command by running through the manual installation instructions in the README.\n* If you are getting this error while unit testing you need to mock the native module. Follow the guide in the README.\n\nIf none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-netinfo`);\n}\n\n/**\n * We export the native interface in this way to give easy shared access to it between the\n * JavaScript code and the tests\n */\nlet nativeEventEmitter: NativeEventEmitter | null = null;\n\nexport default {\n configure: RNCNetInfo.configure,\n addListener: RNCNetInfo.addListener,\n removeListeners: RNCNetInfo.removeListeners,\n getCurrentState: RNCNetInfo.getCurrentState,\n get eventEmitter(): NativeEventEmitter {\n if (!nativeEventEmitter) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n nativeEventEmitter = new NativeEventEmitter(RNCNetInfo);\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n /// @ts-ignore\n return nativeEventEmitter;\n },\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAQA,kBAAkB,QAAO,cAAc;AAC/C,OAAOC,UAAU,MAAM,gBAAgB;;AAEvC;AACA,IAAI,CAACA,UAAU,EAAE;EACf,MAAM,IAAIC,KAAK,CAAE;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8IAA8I,CAAC;AAC/I;;AAEA;AACA;AACA;AACA;AACA,IAAIC,kBAA6C,GAAG,IAAI;AAExD,eAAe;EACbC,SAAS,EAAEH,UAAU,CAACG,SAAS;EAC/BC,WAAW,EAAEJ,UAAU,CAACI,WAAW;EACnCC,eAAe,EAAEL,UAAU,CAACK,eAAe;EAC3CC,eAAe,EAAEN,UAAU,CAACM,eAAe;EAC3C,IAAIC,YAAYA,CAAA,EAAuB;IACrC,IAAI,CAACL,kBAAkB,EAAE;MACvB;MACA;MACAA,kBAAkB,GAAG,IAAIH,kBAAkB,CAACC,UAAU,CAAC;IACzD;IACA;IACA;IACA,OAAOE,kBAAkB;EAC3B;AACF,CAAC"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js -index 2effbe1..90042df 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js -@@ -6,15 +6,18 @@ - * - * @format - */ -+ - import { NativeEventEmitter } from 'react-native'; - import RNCNetInfo from './nativeModule'; - import { DEVICE_CONNECTIVITY_EVENT } from './privateTypes'; --const nativeEventEmitter = new NativeEventEmitter(); // Listen to connectivity events -+const nativeEventEmitter = new NativeEventEmitter(); - -+// Listen to connectivity events - RNCNetInfo.addListener(DEVICE_CONNECTIVITY_EVENT, event => { - nativeEventEmitter.emit(DEVICE_CONNECTIVITY_EVENT, event); - }); --export default { ...RNCNetInfo, -+export default { -+ ...RNCNetInfo, - eventEmitter: nativeEventEmitter - }; - //# sourceMappingURL=nativeInterface.web.js.map -\ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js.map -index 0a0bf4f..c0c0af8 100644 +index 0a0bf4f..bce6226 100644 --- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js.map +++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js.map @@ -1 +1 @@ -{"version":3,"sources":["nativeInterface.web.ts"],"names":["NativeEventEmitter","RNCNetInfo","DEVICE_CONNECTIVITY_EVENT","nativeEventEmitter","addListener","event","emit","eventEmitter"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAAQA,kBAAR,QAAiC,cAAjC;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AACA,SAAQC,yBAAR,QAAwC,gBAAxC;AAEA,MAAMC,kBAAkB,GAAG,IAAIH,kBAAJ,EAA3B,C,CAEA;;AACAC,UAAU,CAACG,WAAX,CACEF,yBADF,EAEGG,KAAD,IAAiB;AACfF,EAAAA,kBAAkB,CAACG,IAAnB,CAAwBJ,yBAAxB,EAAmDG,KAAnD;AACD,CAJH;AAOA,eAAe,EACb,GAAGJ,UADU;AAEbM,EAAAA,YAAY,EAAEJ;AAFD,CAAf","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\nimport {DEVICE_CONNECTIVITY_EVENT} from './privateTypes';\n\nconst nativeEventEmitter = new NativeEventEmitter();\n\n// Listen to connectivity events\nRNCNetInfo.addListener(\n DEVICE_CONNECTIVITY_EVENT,\n (event): void => {\n nativeEventEmitter.emit(DEVICE_CONNECTIVITY_EVENT, event);\n },\n);\n\nexport default {\n ...RNCNetInfo,\n eventEmitter: nativeEventEmitter,\n};\n"]} \ No newline at end of file +{"version":3,"names":["NativeEventEmitter","RNCNetInfo","DEVICE_CONNECTIVITY_EVENT","nativeEventEmitter","addListener","event","emit","eventEmitter"],"sources":["nativeInterface.web.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventEmitter} from 'react-native';\nimport RNCNetInfo from './nativeModule';\nimport {DEVICE_CONNECTIVITY_EVENT} from './privateTypes';\n\nconst nativeEventEmitter = new NativeEventEmitter();\n\n// Listen to connectivity events\nRNCNetInfo.addListener(DEVICE_CONNECTIVITY_EVENT, (event): void => {\n nativeEventEmitter.emit(DEVICE_CONNECTIVITY_EVENT, event);\n});\n\nexport default {\n ...RNCNetInfo,\n eventEmitter: nativeEventEmitter,\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAQA,kBAAkB,QAAO,cAAc;AAC/C,OAAOC,UAAU,MAAM,gBAAgB;AACvC,SAAQC,yBAAyB,QAAO,gBAAgB;AAExD,MAAMC,kBAAkB,GAAG,IAAIH,kBAAkB,CAAC,CAAC;;AAEnD;AACAC,UAAU,CAACG,WAAW,CAACF,yBAAyB,EAAGG,KAAK,IAAW;EACjEF,kBAAkB,CAACG,IAAI,CAACJ,yBAAyB,EAAEG,KAAK,CAAC;AAC3D,CAAC,CAAC;AAEF,eAAe;EACb,GAAGJ,UAAU;EACbM,YAAY,EAAEJ;AAChB,CAAC"} -\ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js -index 11b32ce..4d606d8 100644 +index 11b32ce..197749a 100644 --- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js +++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js -@@ -6,7 +6,16 @@ - * +@@ -7,6 +7,13 @@ * @format */ -+ import { NativeModules } from 'react-native'; -const RNCNetInfo = NativeModules.RNCNetInfo; +-export default RNCNetInfo; +// React Native sets `__turboModuleProxy` on global when TurboModules are enabled. +// Currently, this is the recommended way to detect TurboModules. +// https://reactnative.dev/docs/the-new-architecture/backward-compatibility-turbomodules#unify-the-javascript-specs @@ -2126,28 +1152,24 @@ index 11b32ce..4d606d8 100644 +const isTurboModuleEnabled = global.__turboModuleProxy != null; +const RNCNetInfo = isTurboModuleEnabled ? +// eslint-disable-next-line @typescript-eslint/no-var-requires -+require('./NativeRNCNetInfo').default : NativeModules.RNCNetInfo; - export default RNCNetInfo; ++require('./NativeRNCNetInfo').default : NativeModules.RNCNetInfo;export default RNCNetInfo; //# sourceMappingURL=nativeModule.js.map \ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js.map -index 4599032..7df218b 100644 +index 4599032..ae7f79a 100644 --- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js.map +++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.js.map @@ -1 +1 @@ -{"version":3,"sources":["nativeModule.ts"],"names":["NativeModules","RNCNetInfo"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAAQA,aAAR,QAA4B,cAA5B;AAGA,MAAMC,UAA+B,GAAGD,aAAa,CAACC,UAAtD;AAEA,eAAeA,UAAf","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeModules} from 'react-native';\nimport {NetInfoNativeModule} from './privateTypes';\n\nconst RNCNetInfo: NetInfoNativeModule = NativeModules.RNCNetInfo;\n\nexport default RNCNetInfo;\n"]} \ No newline at end of file +{"version":3,"names":["NativeModules","isTurboModuleEnabled","global","__turboModuleProxy","RNCNetInfo","require","default"],"sources":["nativeModule.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeModules} from 'react-native';\nimport {NetInfoNativeModule} from './privateTypes';\n\n// React Native sets `__turboModuleProxy` on global when TurboModules are enabled.\n// Currently, this is the recommended way to detect TurboModules.\n// https://reactnative.dev/docs/the-new-architecture/backward-compatibility-turbomodules#unify-the-javascript-specs\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst isTurboModuleEnabled = global.__turboModuleProxy != null;\n\nconst RNCNetInfo: NetInfoNativeModule = isTurboModuleEnabled\n ? // eslint-disable-next-line @typescript-eslint/no-var-requires\n require('./NativeRNCNetInfo').default\n : NativeModules.RNCNetInfo;\n\nexport default RNCNetInfo;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAQA,aAAa,QAAO,cAAc;AAG1C;AACA;AACA;AACA;AACA;AACA,MAAMC,oBAAoB,GAAGC,MAAM,CAACC,kBAAkB,IAAI,IAAI;AAE9D,MAAMC,UAA+B,GAAGH,oBAAoB;AACxD;AACAI,OAAO,CAAC,oBAAoB,CAAC,CAACC,OAAO,GACrCN,aAAa,CAACI,UAAU;AAE5B,eAAeA,UAAU"} -\ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js -index 32f2ca5..5547977 100644 +index 32f2ca5..dd689ef 100644 --- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js +++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js -@@ -6,15 +6,26 @@ - * +@@ -7,14 +7,24 @@ * @format */ -+ import { DEVICE_CONNECTIVITY_EVENT } from './privateTypes'; -import { NetInfoCellularGeneration, NetInfoStateType } from './types'; // See https://wicg.github.io/netinfo/#dom-connectiontype +import { NetInfoCellularGeneration, NetInfoStateType } from './types'; @@ -2163,275 +1185,46 @@ index 32f2ca5..5547977 100644 // Use a constant test of this form because in SSR on next.js, optional chaining is not sufficient, // but this test correctly detects that window is not available and allows for conditionals before access -const isWindowPresent = typeof window !== 'undefined'; // Check if window exists and if the browser supports the connection API -+const isWindowPresent = typeof window !== 'undefined'; ++const isWindowPresent = typeof window !== 'undefined'; -const connection = isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS') ? window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection : undefined; // Map browser types to native types +// Check if window exists and if the browser supports the connection API -+const connection = isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS') ? window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection : undefined; ++const connection = isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS') ? window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection : undefined; +// Map browser types to native types const typeMapping = { bluetooth: NetInfoStateType.bluetooth, cellular: NetInfoStateType.cellular, -@@ -31,17 +42,20 @@ const effectiveTypeMapping = { - '3g': NetInfoCellularGeneration['3g'], - '4g': NetInfoCellularGeneration['4g'], - 'slow-2g': NetInfoCellularGeneration['2g'] --}; // Determine current state of connection -+}; - -+// Determine current state of connection - const getCurrentState = _requestedInterface => { - const isConnected = isWindowPresent ? navigator.onLine : false; - const baseState = { - isInternetReachable: null -- }; // If we don't have a connection object, we return minimal information -+ }; - -+ // If we don't have a connection object, we return minimal information - if (!connection) { - if (isConnected) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type: NetInfoStateType.other, - details: { -@@ -50,22 +64,22 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } -- -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: false, - isInternetReachable: false, - type: NetInfoStateType.none, - details: null - }; - return state; -- } // Otherwise try to return detailed information -- -+ } - -+ // Otherwise try to return detailed information - const isConnectionExpensive = connection.saveData; - const type = connection.type ? typeMapping[connection.type] : isConnected ? NetInfoStateType.other : NetInfoStateType.unknown; -- - if (type === NetInfoStateType.bluetooth) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type, - details: { -@@ -74,7 +88,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === NetInfoStateType.cellular) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type, - details: { -@@ -85,7 +100,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === NetInfoStateType.ethernet) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type, - details: { -@@ -96,7 +112,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === NetInfoStateType.wifi) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type, - details: { -@@ -114,7 +131,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === NetInfoStateType.wimax) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type, - details: { -@@ -123,7 +141,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === NetInfoStateType.none) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: false, - isInternetReachable: false, - type, -@@ -131,7 +150,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } else if (type === NetInfoStateType.unknown) { -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected, - isInternetReachable: null, - type, -@@ -139,8 +159,8 @@ const getCurrentState = _requestedInterface => { - }; - return state; - } -- -- const state = { ...baseState, -+ const state = { -+ ...baseState, - isConnected: true, - type: NetInfoStateType.other, - details: { -@@ -149,7 +169,6 @@ const getCurrentState = _requestedInterface => { - }; - return state; - }; -- - const handlers = []; - const nativeHandlers = []; - const RNCNetInfo = { -@@ -160,7 +179,6 @@ const RNCNetInfo = { - const nativeHandler = () => { - handler(getCurrentState()); - }; -- - if (connection) { - connection.addEventListener('change', nativeHandler); - } else { -@@ -168,16 +186,15 @@ const RNCNetInfo = { - window.addEventListener('online', nativeHandler, false); - window.addEventListener('offline', nativeHandler, false); - } -- } // Remember handlers -- -+ } - -+ // Remember handlers - handlers.push(handler); - nativeHandlers.push(nativeHandler); - break; - } - } - }, -- - removeListeners(type, handler) { - switch (type) { - case DEVICE_CONNECTIVITY_EVENT: -@@ -185,7 +202,6 @@ const RNCNetInfo = { - // Get native handler - const index = handlers.indexOf(handler); - const nativeHandler = nativeHandlers[index]; -- - if (connection) { - connection.removeEventListener('change', nativeHandler); - } else { -@@ -193,24 +209,21 @@ const RNCNetInfo = { - window.removeEventListener('online', nativeHandler); - window.removeEventListener('offline', nativeHandler); - } -- } // Remove handlers -- -+ } - -+ // Remove handlers - handlers.splice(index, 1); - nativeHandlers.splice(index, 1); - break; - } - } - }, -- - async getCurrentState(requestedInterface) { - return getCurrentState(requestedInterface); - }, -- - configure() { - return; - } -- - }; - export default RNCNetInfo; - //# sourceMappingURL=nativeModule.web.js.map -\ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js.map -index 2b50d96..0bdd63e 100644 +index 2b50d96..e53cab3 100644 --- a/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js.map +++ b/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js.map @@ -1 +1 @@ -{"version":3,"sources":["nativeModule.web.ts"],"names":["DEVICE_CONNECTIVITY_EVENT","NetInfoCellularGeneration","NetInfoStateType","isWindowPresent","window","connection","hasOwnProperty","navigator","mozConnection","webkitConnection","undefined","typeMapping","bluetooth","cellular","ethernet","none","other","unknown","wifi","wimax","mixed","effectiveTypeMapping","getCurrentState","_requestedInterface","isConnected","onLine","baseState","isInternetReachable","state","type","details","isConnectionExpensive","saveData","cellularGeneration","effectiveType","carrier","ipAddress","subnet","ssid","bssid","strength","frequency","linkSpeed","rxLinkSpeed","txLinkSpeed","handlers","nativeHandlers","RNCNetInfo","addListener","handler","nativeHandler","addEventListener","push","removeListeners","index","indexOf","removeEventListener","splice","requestedInterface","configure"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SACEA,yBADF,QAIO,gBAJP;AAKA,SAEEC,yBAFF,EAQEC,gBARF,QAYO,SAZP,C,CAcA;;AA4CA;AACA;AACA,MAAMC,eAAe,GAAG,OAAOC,MAAP,KAAkB,WAA1C,C,CAEA;;AACA,MAAMC,UAAU,GAAIF,eAAe,IAAI,CAACC,MAAM,CAACE,cAAP,CAAsB,OAAtB,CAApB,IAAsD,CAACF,MAAM,CAACE,cAAP,CAAsB,OAAtB,CAAxD,GACfF,MAAM,CAACG,SAAP,CAAiBF,UAAjB,IACAD,MAAM,CAACG,SAAP,CAAiBC,aADjB,IAEAJ,MAAM,CAACG,SAAP,CAAiBE,gBAHF,GAIfC,SAJJ,C,CAMA;;AACA,MAAMC,WAAqD,GAAG;AAC5DC,EAAAA,SAAS,EAAEV,gBAAgB,CAACU,SADgC;AAE5DC,EAAAA,QAAQ,EAAEX,gBAAgB,CAACW,QAFiC;AAG5DC,EAAAA,QAAQ,EAAEZ,gBAAgB,CAACY,QAHiC;AAI5DC,EAAAA,IAAI,EAAEb,gBAAgB,CAACa,IAJqC;AAK5DC,EAAAA,KAAK,EAAEd,gBAAgB,CAACc,KALoC;AAM5DC,EAAAA,OAAO,EAAEf,gBAAgB,CAACe,OANkC;AAO5DC,EAAAA,IAAI,EAAEhB,gBAAgB,CAACgB,IAPqC;AAQ5DC,EAAAA,KAAK,EAAEjB,gBAAgB,CAACiB,KARoC;AAS5DC,EAAAA,KAAK,EAAElB,gBAAgB,CAACc;AAToC,CAA9D;AAWA,MAAMK,oBAGL,GAAG;AACF,QAAMpB,yBAAyB,CAAC,IAAD,CAD7B;AAEF,QAAMA,yBAAyB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cAAc,CAACW,MAAf,CAAsBH,KAAtB,EAA6B,CAA7B;AAEA;AACD;AApBH;AAsBD,GAjDqC;;AAmDtC,QAAMhC,eAAN,CAAsBoC,kBAAtB,EAA6E;AAC3E,WAAOpC,eAAe,CAACoC,kBAAD,CAAtB;AACD,GArDqC;;AAuDtCC,EAAAA,SAAS,GAAS;AAChB;AACD;;AAzDqC,CAAxC;AA4DA,eAAeZ,UAAf","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {\n DEVICE_CONNECTIVITY_EVENT,\n NetInfoNativeModule,\n NetInfoNativeModuleState,\n} from './privateTypes';\nimport {\n NetInfoBluetoothState,\n NetInfoCellularGeneration,\n NetInfoCellularState,\n NetInfoEthernetState,\n NetInfoNoConnectionState,\n NetInfoOtherState,\n NetInfoState,\n NetInfoStateType,\n NetInfoUnknownState,\n NetInfoWifiState,\n NetInfoWimaxState,\n} from './types';\n\n// See https://wicg.github.io/netinfo/#dom-connectiontype\ntype ConnectionType =\n | 'bluetooth'\n | 'cellular'\n | 'ethernet'\n | 'mixed'\n | 'none'\n | 'other'\n | 'unknown'\n | 'wifi'\n | 'wimax';\n\n// See https://wicg.github.io/netinfo/#dom-effectiveconnectiontype\ntype ConnectionEffectiveType = '2g' | '3g' | '4g' | 'slow-2g';\n\n// https://wicg.github.io/netinfo/#dom-networkinformation-savedata\ntype ConnectionSaveData = boolean;\n\ninterface Events {\n change: Event;\n}\n\ninterface Connection {\n type: ConnectionType;\n effectiveType: ConnectionEffectiveType;\n saveData: ConnectionSaveData;\n addEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\n// Create (optional) connection APIs on navigator\ndeclare global {\n interface Navigator {\n connection?: Connection;\n mozConnection?: Connection;\n webkitConnection?: Connection;\n }\n}\n// Use a constant test of this form because in SSR on next.js, optional chaining is not sufficient,\n// but this test correctly detects that window is not available and allows for conditionals before access\nconst isWindowPresent = typeof window !== 'undefined';\n\n// Check if window exists and if the browser supports the connection API\nconst connection = (isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS'))\n ? window.navigator.connection ||\n window.navigator.mozConnection ||\n window.navigator.webkitConnection\n : undefined;\n\n// Map browser types to native types\nconst typeMapping: Record = {\n bluetooth: NetInfoStateType.bluetooth,\n cellular: NetInfoStateType.cellular,\n ethernet: NetInfoStateType.ethernet,\n none: NetInfoStateType.none,\n other: NetInfoStateType.other,\n unknown: NetInfoStateType.unknown,\n wifi: NetInfoStateType.wifi,\n wimax: NetInfoStateType.wimax,\n mixed: NetInfoStateType.other,\n};\nconst effectiveTypeMapping: Record<\n ConnectionEffectiveType,\n NetInfoCellularGeneration\n> = {\n '2g': NetInfoCellularGeneration['2g'],\n '3g': NetInfoCellularGeneration['3g'],\n '4g': NetInfoCellularGeneration['4g'],\n 'slow-2g': NetInfoCellularGeneration['2g'],\n};\n\n// Determine current state of connection\nconst getCurrentState = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _requestedInterface?: string,\n): Pick> => {\n const isConnected = isWindowPresent ? navigator.onLine : false;\n const baseState = {\n isInternetReachable: null,\n };\n\n // If we don't have a connection object, we return minimal information\n if (!connection) {\n if (isConnected) {\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive: false,\n },\n };\n return state;\n }\n\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type: NetInfoStateType.none,\n details: null,\n };\n return state;\n }\n\n // Otherwise try to return detailed information\n const isConnectionExpensive = connection.saveData;\n const type: NetInfoStateType = connection.type\n ? typeMapping[connection.type]\n : isConnected\n ? NetInfoStateType.other\n : NetInfoStateType.unknown;\n\n if (type === NetInfoStateType.bluetooth) {\n const state: NetInfoBluetoothState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.cellular) {\n const state: NetInfoCellularState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n cellularGeneration:\n effectiveTypeMapping[connection.effectiveType] || null,\n carrier: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.ethernet) {\n const state: NetInfoEthernetState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ipAddress: null,\n subnet: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wifi) {\n const state: NetInfoWifiState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ssid: null,\n bssid: null,\n strength: null,\n ipAddress: null,\n subnet: null,\n frequency: null,\n linkSpeed: null,\n rxLinkSpeed: null,\n txLinkSpeed: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wimax) {\n const state: NetInfoWimaxState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.none) {\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type,\n details: null,\n };\n return state;\n } else if (type === NetInfoStateType.unknown) {\n const state: NetInfoUnknownState = {\n ...baseState,\n isConnected,\n isInternetReachable: null,\n type,\n details: null,\n };\n return state;\n }\n\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n};\n\nconst handlers: ((state: NetInfoNativeModuleState) => void)[] = [];\nconst nativeHandlers: (() => void)[] = [];\n\nconst RNCNetInfo: NetInfoNativeModule = {\n addListener(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n const nativeHandler = (): void => {\n handler(getCurrentState());\n };\n\n if (connection) {\n connection.addEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.addEventListener('online', nativeHandler, false);\n window.addEventListener('offline', nativeHandler, false);\n }\n }\n\n // Remember handlers\n handlers.push(handler);\n nativeHandlers.push(nativeHandler);\n\n break;\n }\n }\n },\n\n removeListeners(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n // Get native handler\n const index = handlers.indexOf(handler);\n const nativeHandler = nativeHandlers[index];\n\n if (connection) {\n connection.removeEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.removeEventListener('online', nativeHandler);\n window.removeEventListener('offline', nativeHandler);\n }\n }\n\n // Remove handlers\n handlers.splice(index, 1);\n nativeHandlers.splice(index, 1);\n\n break;\n }\n }\n },\n\n async getCurrentState(requestedInterface): Promise {\n return getCurrentState(requestedInterface);\n },\n\n configure(): void {\n return;\n },\n};\n\nexport default RNCNetInfo;\n"]} \ No newline at end of file +{"version":3,"names":["DEVICE_CONNECTIVITY_EVENT","NetInfoCellularGeneration","NetInfoStateType","isWindowPresent","window","connection","hasOwnProperty","navigator","mozConnection","webkitConnection","undefined","typeMapping","bluetooth","cellular","ethernet","none","other","unknown","wifi","wimax","mixed","effectiveTypeMapping","getCurrentState","_requestedInterface","isConnected","onLine","baseState","isInternetReachable","state","type","details","isConnectionExpensive","saveData","cellularGeneration","effectiveType","carrier","ipAddress","subnet","ssid","bssid","strength","frequency","linkSpeed","rxLinkSpeed","txLinkSpeed","handlers","nativeHandlers","RNCNetInfo","addListener","handler","nativeHandler","addEventListener","push","removeListeners","index","indexOf","removeEventListener","splice","requestedInterface","configure"],"sources":["nativeModule.web.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {\n DEVICE_CONNECTIVITY_EVENT,\n NetInfoNativeModule,\n NetInfoNativeModuleState,\n} from './privateTypes';\nimport {\n NetInfoBluetoothState,\n NetInfoCellularGeneration,\n NetInfoCellularState,\n NetInfoEthernetState,\n NetInfoNoConnectionState,\n NetInfoOtherState,\n NetInfoState,\n NetInfoStateType,\n NetInfoUnknownState,\n NetInfoWifiState,\n NetInfoWimaxState,\n} from './types';\n\n// See https://wicg.github.io/netinfo/#dom-connectiontype\ntype ConnectionType =\n | 'bluetooth'\n | 'cellular'\n | 'ethernet'\n | 'mixed'\n | 'none'\n | 'other'\n | 'unknown'\n | 'wifi'\n | 'wimax';\n\n// See https://wicg.github.io/netinfo/#dom-effectiveconnectiontype\ntype ConnectionEffectiveType = '2g' | '3g' | '4g' | 'slow-2g';\n\n// https://wicg.github.io/netinfo/#dom-networkinformation-savedata\ntype ConnectionSaveData = boolean;\n\ninterface Events {\n change: Event;\n}\n\ninterface Connection {\n type: ConnectionType;\n effectiveType: ConnectionEffectiveType;\n saveData: ConnectionSaveData;\n addEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeEventListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\n// Create (optional) connection APIs on navigator\ndeclare global {\n interface Navigator {\n connection?: Connection;\n mozConnection?: Connection;\n webkitConnection?: Connection;\n }\n}\n// Use a constant test of this form because in SSR on next.js, optional chaining is not sufficient,\n// but this test correctly detects that window is not available and allows for conditionals before access\nconst isWindowPresent = typeof window !== 'undefined';\n\n// Check if window exists and if the browser supports the connection API\nconst connection = (isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS'))\n ? window.navigator.connection ||\n window.navigator.mozConnection ||\n window.navigator.webkitConnection\n : undefined;\n\n// Map browser types to native types\nconst typeMapping: Record = {\n bluetooth: NetInfoStateType.bluetooth,\n cellular: NetInfoStateType.cellular,\n ethernet: NetInfoStateType.ethernet,\n none: NetInfoStateType.none,\n other: NetInfoStateType.other,\n unknown: NetInfoStateType.unknown,\n wifi: NetInfoStateType.wifi,\n wimax: NetInfoStateType.wimax,\n mixed: NetInfoStateType.other,\n};\nconst effectiveTypeMapping: Record<\n ConnectionEffectiveType,\n NetInfoCellularGeneration\n> = {\n '2g': NetInfoCellularGeneration['2g'],\n '3g': NetInfoCellularGeneration['3g'],\n '4g': NetInfoCellularGeneration['4g'],\n 'slow-2g': NetInfoCellularGeneration['2g'],\n};\n\n// Determine current state of connection\nconst getCurrentState = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _requestedInterface?: string,\n): Pick> => {\n const isConnected = isWindowPresent ? navigator.onLine : false;\n const baseState = {\n isInternetReachable: null,\n };\n\n // If we don't have a connection object, we return minimal information\n if (!connection) {\n if (isConnected) {\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive: false,\n },\n };\n return state;\n }\n\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type: NetInfoStateType.none,\n details: null,\n };\n return state;\n }\n\n // Otherwise try to return detailed information\n const isConnectionExpensive = connection.saveData;\n const type: NetInfoStateType = connection.type\n ? typeMapping[connection.type]\n : isConnected\n ? NetInfoStateType.other\n : NetInfoStateType.unknown;\n\n if (type === NetInfoStateType.bluetooth) {\n const state: NetInfoBluetoothState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.cellular) {\n const state: NetInfoCellularState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n cellularGeneration:\n effectiveTypeMapping[connection.effectiveType] || null,\n carrier: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.ethernet) {\n const state: NetInfoEthernetState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ipAddress: null,\n subnet: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wifi) {\n const state: NetInfoWifiState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ssid: null,\n bssid: null,\n strength: null,\n ipAddress: null,\n subnet: null,\n frequency: null,\n linkSpeed: null,\n rxLinkSpeed: null,\n txLinkSpeed: null,\n },\n };\n return state;\n } else if (type === NetInfoStateType.wimax) {\n const state: NetInfoWimaxState = {\n ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n } else if (type === NetInfoStateType.none) {\n const state: NetInfoNoConnectionState = {\n ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type,\n details: null,\n };\n return state;\n } else if (type === NetInfoStateType.unknown) {\n const state: NetInfoUnknownState = {\n ...baseState,\n isConnected,\n isInternetReachable: null,\n type,\n details: null,\n };\n return state;\n }\n\n const state: NetInfoOtherState = {\n ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive,\n },\n };\n return state;\n};\n\nconst handlers: ((state: NetInfoNativeModuleState) => void)[] = [];\nconst nativeHandlers: (() => void)[] = [];\n\nconst RNCNetInfo: NetInfoNativeModule = {\n addListener(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n const nativeHandler = (): void => {\n handler(getCurrentState());\n };\n\n if (connection) {\n connection.addEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.addEventListener('online', nativeHandler, false);\n window.addEventListener('offline', nativeHandler, false);\n }\n }\n\n // Remember handlers\n handlers.push(handler);\n nativeHandlers.push(nativeHandler);\n\n break;\n }\n }\n },\n\n removeListeners(type, handler): void {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT: {\n // Get native handler\n const index = handlers.indexOf(handler);\n const nativeHandler = nativeHandlers[index];\n\n if (connection) {\n connection.removeEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.removeEventListener('online', nativeHandler);\n window.removeEventListener('offline', nativeHandler);\n }\n }\n\n // Remove handlers\n handlers.splice(index, 1);\n nativeHandlers.splice(index, 1);\n\n break;\n }\n }\n },\n\n async getCurrentState(requestedInterface): Promise {\n return getCurrentState(requestedInterface);\n },\n\n configure(): void {\n return;\n },\n};\n\nexport default RNCNetInfo;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;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U,EAAE;YACdA,UAAU,CAACmD,mBAAmB,CAAC,QAAQ,EAAEN,aAAa,CAAC;UACzD,CAAC,MAAM;YACL,IAAI/C,eAAe,EAAE;cACnBC,MAAM,CAACoD,mBAAmB,CAAC,QAAQ,EAAEN,aAAa,CAAC;cACnD9C,MAAM,CAACoD,mBAAmB,CAAC,SAAS,EAAEN,aAAa,CAAC;YACtD;UACF;;UAEA;UACAL,QAAQ,CAACY,MAAM,CAACH,KAAK,EAAE,CAAC,CAAC;UACzBR,cAAc,CAACW,MAAM,CAACH,KAAK,EAAE,CAAC,CAAC;UAE/B;QACF;IACF;EACF,CAAC;EAED,MAAMhC,eAAeA,CAACoC,kBAAkB,EAAqC;IAC3E,OAAOpC,eAAe,CAACoC,kBAAkB,CAAC;EAC5C,CAAC;EAEDC,SAASA,CAAA,EAAS;IAChB;EACF;AACF,CAAC;AAED,eAAeZ,UAAU"} -\ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js b/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js -index 4b88052..64831b1 100644 ---- a/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js -+++ b/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js -@@ -6,5 +6,8 @@ - * - * @format - */ --export const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange'; // Certain properties are optional when sent by the native module and are handled by the JS code -+ -+export const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange'; -+ -+// Certain properties are optional when sent by the native module and are handled by the JS code - //# sourceMappingURL=privateTypes.js.map -\ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js.map -index db99fe3..9ef56cb 100644 +index db99fe3..19c5b49 100644 --- a/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js.map +++ b/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js.map @@ -1 +1 @@ -{"version":3,"sources":["privateTypes.ts"],"names":["DEVICE_CONNECTIVITY_EVENT"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA,OAAO,MAAMA,yBAAyB,GAAG,gCAAlC,C,CAEP","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NetInfoConfiguration, NetInfoState} from './types';\n\nexport const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange';\n\n// Certain properties are optional when sent by the native module and are handled by the JS code\nexport type NetInfoNativeModuleState = Pick<\n NetInfoState,\n Exclude\n> & {isInternetReachable?: boolean};\n\nexport interface Events {\n [DEVICE_CONNECTIVITY_EVENT]: NetInfoNativeModuleState;\n}\n\nexport interface NetInfoNativeModule {\n configure: (config: Partial) => void;\n getCurrentState: (\n requestedInterface?: string,\n ) => Promise;\n addListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeListeners(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\nexport type NetInfoInternetReachabilityChangeListener = (\n isInternetReachable: boolean | null | undefined,\n) => void;\n"]} \ No newline at end of file +{"version":3,"names":["DEVICE_CONNECTIVITY_EVENT"],"sources":["privateTypes.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NetInfoConfiguration, NetInfoState} from './types';\n\nexport const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange';\n\n// Certain properties are optional when sent by the native module and are handled by the JS code\nexport type NetInfoNativeModuleState = Pick<\n NetInfoState,\n Exclude\n> & {isInternetReachable?: boolean};\n\nexport interface Events {\n [DEVICE_CONNECTIVITY_EVENT]: NetInfoNativeModuleState;\n}\n\nexport interface NetInfoNativeModule {\n configure: (config: Partial) => void;\n getCurrentState: (\n requestedInterface?: string,\n ) => Promise;\n addListener(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n removeListeners(\n type: K,\n listener: (event: Events[K]) => void,\n ): void;\n}\n\nexport type NetInfoInternetReachabilityChangeListener = (\n isInternetReachable: boolean | null | undefined,\n) => void;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAO,MAAMA,yBAAyB,GAAG,gCAAgC;;AAEzE"} -\ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/state.js b/node_modules/@react-native-community/netinfo/lib/module/internal/state.js -index 305d286..7d12f6a 100644 +index 305d286..226e45d 100644 --- a/node_modules/@react-native-community/netinfo/lib/module/internal/state.js +++ b/node_modules/@react-native-community/netinfo/lib/module/internal/state.js -@@ -1,5 +1,6 @@ +@@ -1,4 +1,6 @@ -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -- +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } + /** * Copyright (c) Facebook, Inc. and its affiliates. - * -@@ -8,72 +9,61 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope - * - * @format - */ -+ - import NativeInterface from './nativeInterface'; - import InternetReachability from './internetReachability'; - import * as PrivateTypes from './privateTypes'; - export default class State { - constructor(configuration) { - _defineProperty(this, "_nativeEventSubscription", null); -- - _defineProperty(this, "_subscriptions", new Set()); -- - _defineProperty(this, "_latestState", null); -- - _defineProperty(this, "_internetReachability", void 0); -- +@@ -23,12 +25,12 @@ export default class State { + _defineProperty(this, "_handleNativeStateUpdate", state => { // Update the internet reachability module - this._internetReachability.update(state); // Convert the state from native to JS shape @@ -2439,128 +1232,24 @@ index 305d286..7d12f6a 100644 - - const convertedState = this._convertState(state); // Update the listeners + this._internetReachability.update(state); - + + // Convert the state from native to JS shape + const convertedState = this._convertState(state); - + + // Update the listeners this._latestState = convertedState; -- - this._subscriptions.forEach(handler => handler(convertedState)); - }); -- - _defineProperty(this, "_handleInternetReachabilityUpdate", isInternetReachable => { - if (!this._latestState) { - return; - } -- -- const nextState = { ...this._latestState, -+ const nextState = { -+ ...this._latestState, - isInternetReachable - }; - this._latestState = nextState; -- - this._subscriptions.forEach(handler => handler(nextState)); - }); -- - _defineProperty(this, "_fetchCurrentState", async requestedInterface => { -- const state = await NativeInterface.getCurrentState(requestedInterface); // Update the internet reachability module -- -- this._internetReachability.update(state); // Convert and store the new state -- -+ const state = await NativeInterface.getCurrentState(requestedInterface); - -+ // Update the internet reachability module -+ this._internetReachability.update(state); -+ // Convert and store the new state - const convertedState = this._convertState(state); -- - if (!requestedInterface) { - this._latestState = convertedState; -- - this._subscriptions.forEach(handler => handler(convertedState)); - } -- - return convertedState; - }); -- - _defineProperty(this, "_convertState", input => { - if (typeof input.isInternetReachable === 'boolean') { - return input; - } else { -- return { ...input, -+ return { -+ ...input, - isInternetReachable: this._internetReachability.currentState() - }; - } - }); -- - _defineProperty(this, "latest", requestedInterface => { - if (requestedInterface) { - return this._fetchCurrentState(requestedInterface); -@@ -83,42 +73,37 @@ export default class State { - return this._fetchCurrentState(); - } - }); -- - _defineProperty(this, "add", handler => { - // Add the subscription handler to our set -- this._subscriptions.add(handler); // Send it the latest data we have -- -+ this._subscriptions.add(handler); - -+ // Send it the latest data we have - if (this._latestState) { - handler(this._latestState); - } else { - this.latest().then(handler); - } - }); -- - _defineProperty(this, "remove", handler => { - this._subscriptions.delete(handler); - }); -- - _defineProperty(this, "tearDown", () => { - if (this._internetReachability) { - this._internetReachability.tearDown(); - } -- - if (this._nativeEventSubscription) { - this._nativeEventSubscription.remove(); - } -- - this._subscriptions.clear(); - }); -- - // Add the listener to the internet connectivity events -- this._internetReachability = new InternetReachability(configuration, this._handleInternetReachabilityUpdate); // Add the subscription to the native events -+ this._internetReachability = new InternetReachability(configuration, this._handleInternetReachabilityUpdate); -- this._nativeEventSubscription = NativeInterface.eventEmitter.addListener(PrivateTypes.DEVICE_CONNECTIVITY_EVENT, this._handleNativeStateUpdate); // Fetch the current state from the native module -+ // Add the subscription to the native events -+ this._nativeEventSubscription = NativeInterface.eventEmitter.addListener(PrivateTypes.DEVICE_CONNECTIVITY_EVENT, this._handleNativeStateUpdate); - -+ // Fetch the current state from the native module - this._fetchCurrentState(); - } -- - } - //# sourceMappingURL=state.js.map -\ No newline at end of file + this._subscriptions.forEach(handler => handler(convertedState)); diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/state.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/state.js.map -index e6e8249..053e584 100644 +index e6e8249..fbc7c19 100644 --- a/node_modules/@react-native-community/netinfo/lib/module/internal/state.js.map +++ b/node_modules/@react-native-community/netinfo/lib/module/internal/state.js.map @@ -1 +1 @@ -{"version":3,"sources":["state.ts"],"names":["NativeInterface","InternetReachability","PrivateTypes","State","constructor","configuration","Set","state","_internetReachability","update","convertedState","_convertState","_latestState","_subscriptions","forEach","handler","isInternetReachable","nextState","requestedInterface","getCurrentState","input","currentState","_fetchCurrentState","Promise","resolve","add","latest","then","delete","tearDown","_nativeEventSubscription","remove","clear","_handleInternetReachabilityUpdate","eventEmitter","addListener","DEVICE_CONNECTIVITY_EVENT","_handleNativeStateUpdate"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,OAAOA,eAAP,MAA4B,mBAA5B;AACA,OAAOC,oBAAP,MAAiC,wBAAjC;A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ACA,SAAKH,wBAAL,GAAgC9B,eAAe,CAACkC,YAAhB,CAA6BC,WAA7B,CAC9BjC,YAAY,CAACkC,yBADiB,EAE9B,KAAKC,wBAFyB,CAAhC,CARqD,CAarD;;AACA,SAAKf,kBAAL;AACD;;AArBwB","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventSubscription} from 'react-native';\nimport NativeInterface from './nativeInterface';\nimport InternetReachability from './internetReachability';\nimport * as Types from './types';\nimport * as PrivateTypes from './privateTypes';\n\nexport default class State {\n private _nativeEventSubscription: NativeEventSubscription | null = null;\n private _subscriptions = new Set();\n private _latestState: Types.NetInfoState | null = null;\n private _internetReachability: InternetReachability;\n\n constructor(configuration: Types.NetInfoConfiguration) {\n // Add the listener to the internet connectivity events\n this._internetReachability = new InternetReachability(\n configuration,\n this._handleInternetReachabilityUpdate,\n );\n\n // Add the subscription to the native events\n this._nativeEventSubscription = NativeInterface.eventEmitter.addListener(\n PrivateTypes.DEVICE_CONNECTIVITY_EVENT,\n this._handleNativeStateUpdate,\n );\n\n // Fetch the current state from the native module\n this._fetchCurrentState();\n }\n\n private _handleNativeStateUpdate = (\n state: PrivateTypes.NetInfoNativeModuleState,\n ): void => {\n // Update the internet reachability module\n this._internetReachability.update(state);\n\n // Convert the state from native to JS shape\n const convertedState = this._convertState(state);\n\n // Update the listeners\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n };\n\n private _handleInternetReachabilityUpdate = (\n isInternetReachable: boolean | null | undefined,\n ): void => {\n if (!this._latestState) {\n return;\n }\n\n const nextState = {\n ...this._latestState,\n isInternetReachable,\n } as Types.NetInfoState;\n this._latestState = nextState;\n this._subscriptions.forEach((handler): void => handler(nextState));\n };\n\n public _fetchCurrentState = async (\n requestedInterface?: string,\n ): Promise => {\n const state = await NativeInterface.getCurrentState(requestedInterface);\n\n // Update the internet reachability module\n this._internetReachability.update(state);\n // Convert and store the new state\n const convertedState = this._convertState(state);\n if (!requestedInterface) {\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n }\n\n return convertedState;\n };\n\n private _convertState = (\n input: PrivateTypes.NetInfoNativeModuleState,\n ): Types.NetInfoState => {\n if (typeof input.isInternetReachable === 'boolean') {\n return input as Types.NetInfoState;\n } else {\n return {\n ...input,\n isInternetReachable: this._internetReachability.currentState(),\n } as Types.NetInfoState;\n }\n };\n\n public latest = (\n requestedInterface?: string,\n ): Promise => {\n if (requestedInterface) {\n return this._fetchCurrentState(requestedInterface);\n } else if (this._latestState) {\n return Promise.resolve(this._latestState);\n } else {\n return this._fetchCurrentState();\n }\n };\n\n public add = (handler: Types.NetInfoChangeHandler): void => {\n // Add the subscription handler to our set\n this._subscriptions.add(handler);\n\n // Send it the latest data we have\n if (this._latestState) {\n handler(this._latestState);\n } else {\n this.latest().then(handler);\n }\n };\n\n public remove = (handler: Types.NetInfoChangeHandler): void => {\n this._subscriptions.delete(handler);\n };\n\n public tearDown = (): void => {\n if (this._internetReachability) {\n this._internetReachability.tearDown();\n }\n\n if (this._nativeEventSubscription) {\n this._nativeEventSubscription.remove();\n }\n\n this._subscriptions.clear();\n };\n}\n"]} \ No newline at end of file +{"version":3,"names":["NativeInterface","InternetReachability","PrivateTypes","State","constructor","configuration","_defineProperty","Set","state","_internetReachability","update","convertedState","_convertState","_latestState","_subscriptions","forEach","handler","isInternetReachable","nextState","requestedInterface","getCurrentState","input","currentState","_fetchCurrentState","Promise","resolve","add","latest","then","delete","tearDown","_nativeEventSubscription","remove","clear","_handleInternetReachabilityUpdate","eventEmitter","addListener","DEVICE_CONNECTIVITY_EVENT","_handleNativeStateUpdate"],"sources":["state.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport {NativeEventSubscription} from 'react-native';\nimport NativeInterface from './nativeInterface';\nimport InternetReachability from './internetReachability';\nimport * as Types from './types';\nimport * as PrivateTypes from './privateTypes';\n\nexport default class State {\n private _nativeEventSubscription: NativeEventSubscription | null = null;\n private _subscriptions = new Set();\n private _latestState: Types.NetInfoState | null = null;\n private _internetReachability: InternetReachability;\n\n constructor(configuration: Types.NetInfoConfiguration) {\n // Add the listener to the internet connectivity events\n this._internetReachability = new InternetReachability(\n configuration,\n this._handleInternetReachabilityUpdate,\n );\n\n // Add the subscription to the native events\n this._nativeEventSubscription = NativeInterface.eventEmitter.addListener(\n PrivateTypes.DEVICE_CONNECTIVITY_EVENT,\n this._handleNativeStateUpdate,\n );\n\n // Fetch the current state from the native module\n this._fetchCurrentState();\n }\n\n private _handleNativeStateUpdate = (\n state: PrivateTypes.NetInfoNativeModuleState,\n ): void => {\n // Update the internet reachability module\n this._internetReachability.update(state);\n\n // Convert the state from native to JS shape\n const convertedState = this._convertState(state);\n\n // Update the listeners\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n };\n\n private _handleInternetReachabilityUpdate = (\n isInternetReachable: boolean | null | undefined,\n ): void => {\n if (!this._latestState) {\n return;\n }\n\n const nextState = {\n ...this._latestState,\n isInternetReachable,\n } as Types.NetInfoState;\n this._latestState = nextState;\n this._subscriptions.forEach((handler): void => handler(nextState));\n };\n\n public _fetchCurrentState = async (\n requestedInterface?: string,\n ): Promise => {\n const state = await NativeInterface.getCurrentState(requestedInterface);\n\n // Update the internet reachability module\n this._internetReachability.update(state);\n // Convert and store the new state\n const convertedState = this._convertState(state);\n if (!requestedInterface) {\n this._latestState = convertedState;\n this._subscriptions.forEach((handler): void => handler(convertedState));\n }\n\n return convertedState;\n };\n\n private _convertState = (\n input: PrivateTypes.NetInfoNativeModuleState,\n ): Types.NetInfoState => {\n if (typeof input.isInternetReachable === 'boolean') {\n return input as Types.NetInfoState;\n } else {\n return {\n ...input,\n isInternetReachable: this._internetReachability.currentState(),\n } as Types.NetInfoState;\n }\n };\n\n public latest = (\n requestedInterface?: string,\n ): Promise => {\n if (requestedInterface) {\n return this._fetchCurrentState(requestedInterface);\n } else if (this._latestState) {\n return Promise.resolve(this._latestState);\n } else {\n return this._fetchCurrentState();\n }\n };\n\n public add = (handler: Types.NetInfoChangeHandler): void => {\n // Add the subscription handler to our set\n this._subscriptions.add(handler);\n\n // Send it the latest data we have\n if (this._latestState) {\n handler(this._latestState);\n } else {\n this.latest().then(handler);\n }\n };\n\n public remove = (handler: Types.NetInfoChangeHandler): void => {\n this._subscriptions.delete(handler);\n };\n\n public tearDown = (): void => {\n if (this._internetReachability) {\n this._internetReachability.tearDown();\n }\n\n if (this._nativeEventSubscription) {\n this._nativeEventSubscription.remove();\n }\n\n this._subscriptions.clear();\n };\n}\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAOA,eAAe,MAAM,mBAAmB;AAC/C,OAAOC,oBAAoB,MAAM,wBAAwB;AAEzD,OAAO,KAAKC,YAAY,MAAM,gBAAgB;AAE9C,eAAe,MAAMC,KAAK,CAAC;EAMzBC,WAAWA,CAACC,aAAyC,EAAE;IAAAC,eAAA,mCALY,IAAI;IAAAA,eAAA,yBAC9C,IAAIC,GAAG,CAA6B,CAAC;IAAAD,eAAA,uBACZ,IAAI;IAAAA,eAAA;IAAAA,eAAA,mCAqBpDE,KAA4C,IACnC;MACT;MACA,IAAI,CAACC,qBAAqB,CAACC,MAAM,CAACF,KAAK,CAAC;;MAExC;MACA,MAAMG,cAAc,GAAG,IAAI,CAACC,aAAa,CAACJ,KAAK,CAAC;;MAEhD;MACA,IAAI,CAACK,YAAY,GAAGF,cAAc;MAClC,IAAI,CAACG,cAAc,CAACC,OAAO,CAAEC,OAAO,IAAWA,OAAO,CAACL,cAAc,CAAC,CAAC;IACzE,CAAC;IAAAL,eAAA,4CAGCW,mBAA+C,IACtC;MACT,IAAI,CAAC,IAAI,CAACJ,YAAY,EAAE;QACtB;MAC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AEaU,OAAmC,IAAW;MAC1D;MACA,IAAI,CAACF,cAAc,CAACY,GAAG,CAACV,OAAO,CAAC;;MAEhC;MACA,IAAI,IAAI,CAACH,YAAY,EAAE;QACrBG,OAAO,CAAC,IAAI,CAACH,YAAY,CAAC;MAC5B,CAAC,MAAM;QACL,IAAI,CAACc,MAAM,CAAC,CAAC,CAACC,IAAI,CAACZ,OAAO,CAAC;MAC7B;IACF,CAAC;IAAAV,eAAA,iBAEgBU,OAAmC,IAAW;MAC7D,IAAI,CAACF,cAAc,CAACe,MAAM,CAACb,OAAO,CAAC;IACrC,CAAC;IAAAV,eAAA,mBAEiB,MAAY;MAC5B,IAAI,IAAI,CAACG,qBAAqB,EAAE;QAC9B,IAAI,CAACA,qBAAqB,CAACqB,QAAQ,CAAC,CAAC;MACvC;MAEA,IAAI,IAAI,CAACC,wBAAwB,EAAE;QACjC,IAAI,CAACA,wBAAwB,CAACC,MAAM,CAAC,CAAC;MACxC;MAEA,IAAI,CAAClB,cAAc,CAACmB,KAAK,CAAC,CAAC;IAC7B,CAAC;IAjHC;IACA,IAAI,CAACxB,qBAAqB,GAAG,IAAIR,oBAAoB,CACnDI,aAAa,EACb,IAAI,CAAC6B,iCACP,CAAC;;IAED;IACA,IAAI,CAACH,wBAAwB,GAAG/B,eAAe,CAACmC,YAAY,CAACC,WAAW,CACtElC,YAAY,CAACmC,yBAAyB,EACtC,IAAI,CAACC,wBACP,CAAC;;IAED;IACA,IAAI,CAACf,kBAAkB,CAAC,CAAC;EAC3B;AAoGF"} -\ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/types.js b/node_modules/@react-native-community/netinfo/lib/module/internal/types.js -index ac35a3d..ebe70e5 100644 +index ac35a3d..04ee960 100644 --- a/node_modules/@react-native-community/netinfo/lib/module/internal/types.js +++ b/node_modules/@react-native-community/netinfo/lib/module/internal/types.js @@ -6,9 +6,8 @@ @@ -2584,8 +1273,8 @@ index ac35a3d..ebe70e5 100644 - -(function (NetInfoCellularGeneration) { + return NetInfoStateType; -+}({}); -+export let NetInfoCellularGeneration = /*#__PURE__*/function (NetInfoCellularGeneration) { ++ }({}); ++ export let NetInfoCellularGeneration = /*#__PURE__*/function (NetInfoCellularGeneration) { NetInfoCellularGeneration["2g"] = "2g"; NetInfoCellularGeneration["3g"] = "3g"; NetInfoCellularGeneration["4g"] = "4g"; @@ -2596,17 +1285,16 @@ index ac35a3d..ebe70e5 100644 //# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/module/internal/types.js.map b/node_modules/@react-native-community/netinfo/lib/module/internal/types.js.map -index 340dc4a..afd20ec 100644 +index b50e6f4..2e3cc9b 100644 --- a/node_modules/@react-native-community/netinfo/lib/module/internal/types.js.map +++ b/node_modules/@react-native-community/netinfo/lib/module/internal/types.js.map @@ -1 +1 @@ --{"version":3,"sources":["types.ts"],"names":["NetInfoStateType","NetInfoCellularGeneration"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,WAAYA,gBAAZ;;WAAYA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;GAAAA,gB,KAAAA,gB;;AAcZ,WAAYC,yBAAZ;;WAAYA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;GAAAA,yB,KAAAA,yB","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nexport enum NetInfoStateType {\n unknown = 'unknown',\n none = 'none',\n cellular = 'cellular',\n wifi = 'wifi',\n bluetooth = 'bluetooth',\n ethernet = 'ethernet',\n wimax = 'wimax',\n vpn = 'vpn',\n other = 'other',\n}\n\nexport type NetInfoMethodType = 'HEAD' | 'GET';\n\nexport enum NetInfoCellularGeneration {\n '2g' = '2g',\n '3g' = '3g',\n '4g' = '4g',\n '5g' = '5g',\n}\n\nexport interface NetInfoConnectedDetails {\n isConnectionExpensive: boolean;\n}\n\ninterface NetInfoConnectedState<\n T extends NetInfoStateType,\n D extends Record = Record\n> {\n type: T;\n isConnected: true;\n isInternetReachable: boolean | null;\n details: D & NetInfoConnectedDetails;\n isWifiEnabled?: boolean;\n}\n\ninterface NetInfoDisconnectedState {\n type: T;\n isConnected: false;\n isInternetReachable: false;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport interface NetInfoUnknownState {\n type: NetInfoStateType.unknown;\n isConnected: boolean | null;\n isInternetReachable: null;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport type NetInfoNoConnectionState = NetInfoDisconnectedState<\n NetInfoStateType.none\n>;\nexport type NetInfoDisconnectedStates =\n | NetInfoUnknownState\n | NetInfoNoConnectionState;\n\nexport type NetInfoCellularState = NetInfoConnectedState<\n NetInfoStateType.cellular,\n {\n cellularGeneration: NetInfoCellularGeneration | null;\n carrier: string | null;\n }\n>;\nexport type NetInfoWifiState = NetInfoConnectedState<\n NetInfoStateType.wifi,\n {\n ssid: string | null;\n bssid: string | null;\n strength: number | null;\n ipAddress: string | null;\n subnet: string | null;\n frequency: number | null;\n linkSpeed: number | null;\n rxLinkSpeed: number | null;\n txLinkSpeed: number | null;\n }\n>;\nexport type NetInfoBluetoothState = NetInfoConnectedState<\n NetInfoStateType.bluetooth\n>;\nexport type NetInfoEthernetState = NetInfoConnectedState<\n NetInfoStateType.ethernet,\n {\n ipAddress: string | null;\n subnet: string | null;\n }\n>;\nexport type NetInfoWimaxState = NetInfoConnectedState;\nexport type NetInfoVpnState = NetInfoConnectedState;\nexport type NetInfoOtherState = NetInfoConnectedState;\nexport type NetInfoConnectedStates =\n | NetInfoCellularState\n | NetInfoWifiState\n | NetInfoBluetoothState\n | NetInfoEthernetState\n | NetInfoWimaxState\n | NetInfoVpnState\n | NetInfoOtherState;\n\nexport type NetInfoState = NetInfoDisconnectedStates | NetInfoConnectedStates;\n\nexport type NetInfoChangeHandler = (state: NetInfoState) => void;\nexport type NetInfoSubscription = () => void;\n\nexport interface NetInfoConfiguration {\n reachabilityUrl: string;\n reachabilityMethod?: NetInfoMethodType;\n reachabilityHeaders?: Record;\n reachabilityTest: (response: Response) => Promise;\n reachabilityLongTimeout: number;\n reachabilityShortTimeout: number;\n reachabilityRequestTimeout: number;\n reachabilityShouldRun: () => boolean;\n shouldFetchWiFiSSID: boolean;\n useNativeReachability: boolean;\n}\n"]} +-{"version":3,"sources":["types.ts"],"names":["NetInfoStateType","NetInfoCellularGeneration"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,WAAYA,gBAAZ;;WAAYA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;GAAAA,gB,KAAAA,gB;;AAcZ,WAAYC,yBAAZ;;WAAYA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;AAAAA,EAAAA,yB;GAAAA,yB,KAAAA,yB","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nexport enum NetInfoStateType {\n unknown = 'unknown',\n none = 'none',\n cellular = 'cellular',\n wifi = 'wifi',\n bluetooth = 'bluetooth',\n ethernet = 'ethernet',\n wimax = 'wimax',\n vpn = 'vpn',\n other = 'other',\n}\n\nexport type NetInfoMethodType = 'HEAD' | 'GET';\n\nexport enum NetInfoCellularGeneration {\n '2g' = '2g',\n '3g' = '3g',\n '4g' = '4g',\n '5g' = '5g',\n}\n\nexport interface NetInfoConnectedDetails {\n isConnectionExpensive: boolean;\n}\n\ninterface NetInfoConnectedState<\n T extends NetInfoStateType,\n D extends Record = Record\n> {\n type: T;\n isConnected: boolean;\n isInternetReachable: boolean | null;\n details: D & NetInfoConnectedDetails;\n isWifiEnabled?: boolean;\n}\n\ninterface NetInfoDisconnectedState {\n type: T;\n isConnected: boolean;\n isInternetReachable: boolean;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport interface NetInfoUnknownState {\n type: NetInfoStateType.unknown;\n isConnected: boolean | null;\n isInternetReachable: null;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport type NetInfoNoConnectionState = NetInfoDisconnectedState<\n NetInfoStateType.none\n>;\nexport type NetInfoDisconnectedStates =\n | NetInfoUnknownState\n | NetInfoNoConnectionState;\n\nexport type NetInfoCellularState = NetInfoConnectedState<\n NetInfoStateType.cellular,\n {\n cellularGeneration: NetInfoCellularGeneration | null;\n carrier: string | null;\n }\n>;\nexport type NetInfoWifiState = NetInfoConnectedState<\n NetInfoStateType.wifi,\n {\n ssid: string | null;\n bssid: string | null;\n strength: number | null;\n ipAddress: string | null;\n subnet: string | null;\n frequency: number | null;\n linkSpeed: number | null;\n rxLinkSpeed: number | null;\n txLinkSpeed: number | null;\n }\n>;\nexport type NetInfoBluetoothState = NetInfoConnectedState<\n NetInfoStateType.bluetooth\n>;\nexport type NetInfoEthernetState = NetInfoConnectedState<\n NetInfoStateType.ethernet,\n {\n ipAddress: string | null;\n subnet: string | null;\n }\n>;\nexport type NetInfoWimaxState = NetInfoConnectedState;\nexport type NetInfoVpnState = NetInfoConnectedState;\nexport type NetInfoOtherState = NetInfoConnectedState;\nexport type NetInfoConnectedStates =\n | NetInfoCellularState\n | NetInfoWifiState\n | NetInfoBluetoothState\n | NetInfoEthernetState\n | NetInfoWimaxState\n | NetInfoVpnState\n | NetInfoOtherState;\n\nexport type NetInfoState = NetInfoDisconnectedStates | NetInfoConnectedStates;\n\nexport type NetInfoChangeHandler = (state: NetInfoState) => void;\nexport type NetInfoSubscription = () => void;\n\nexport interface NetInfoConfiguration {\n reachabilityUrl: string;\n reachabilityMethod?: NetInfoMethodType;\n reachabilityHeaders?: Record;\n reachabilityTest: (response: Response) => Promise;\n reachabilityLongTimeout: number;\n reachabilityShortTimeout: number;\n reachabilityRequestTimeout: number;\n reachabilityShouldRun: () => boolean;\n shouldFetchWiFiSSID: boolean;\n useNativeReachability: boolean;\n}\n"]} \ No newline at end of file +{"version":3,"names":["NetInfoStateType","NetInfoCellularGeneration"],"sources":["types.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nexport enum NetInfoStateType {\n unknown = 'unknown',\n none = 'none',\n cellular = 'cellular',\n wifi = 'wifi',\n bluetooth = 'bluetooth',\n ethernet = 'ethernet',\n wimax = 'wimax',\n vpn = 'vpn',\n other = 'other',\n}\n\nexport type NetInfoMethodType = 'HEAD' | 'GET';\n\nexport enum NetInfoCellularGeneration {\n '2g' = '2g',\n '3g' = '3g',\n '4g' = '4g',\n '5g' = '5g',\n}\n\nexport interface NetInfoConnectedDetails {\n isConnectionExpensive: boolean;\n}\n\ninterface NetInfoConnectedState<\n T extends NetInfoStateType,\n D extends Record = Record,\n> {\n type: T;\n isConnected: true;\n isInternetReachable: boolean | null;\n details: D & NetInfoConnectedDetails;\n isWifiEnabled?: boolean;\n}\n\ninterface NetInfoDisconnectedState {\n type: T;\n isConnected: false;\n isInternetReachable: false;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport interface NetInfoUnknownState {\n type: NetInfoStateType.unknown;\n isConnected: boolean | null;\n isInternetReachable: null;\n details: null;\n isWifiEnabled?: boolean;\n}\n\nexport type NetInfoNoConnectionState =\n NetInfoDisconnectedState;\nexport type NetInfoDisconnectedStates =\n | NetInfoUnknownState\n | NetInfoNoConnectionState;\n\nexport type NetInfoCellularState = NetInfoConnectedState<\n NetInfoStateType.cellular,\n {\n cellularGeneration: NetInfoCellularGeneration | null;\n carrier: string | null;\n }\n>;\nexport type NetInfoWifiState = NetInfoConnectedState<\n NetInfoStateType.wifi,\n {\n ssid: string | null;\n bssid: string | null;\n strength: number | null;\n ipAddress: string | null;\n subnet: string | null;\n frequency: number | null;\n linkSpeed: number | null;\n rxLinkSpeed: number | null;\n txLinkSpeed: number | null;\n }\n>;\nexport type NetInfoBluetoothState =\n NetInfoConnectedState;\nexport type NetInfoEthernetState = NetInfoConnectedState<\n NetInfoStateType.ethernet,\n {\n ipAddress: string | null;\n subnet: string | null;\n }\n>;\nexport type NetInfoWimaxState = NetInfoConnectedState;\nexport type NetInfoVpnState = NetInfoConnectedState;\nexport type NetInfoOtherState = NetInfoConnectedState;\nexport type NetInfoConnectedStates =\n | NetInfoCellularState\n | NetInfoWifiState\n | NetInfoBluetoothState\n | NetInfoEthernetState\n | NetInfoWimaxState\n | NetInfoVpnState\n | NetInfoOtherState;\n\nexport type NetInfoState = NetInfoDisconnectedStates | NetInfoConnectedStates;\n\nexport type NetInfoChangeHandler = (state: NetInfoState) => void;\nexport type NetInfoSubscription = () => void;\n\nexport interface NetInfoConfiguration {\n reachabilityUrl: string;\n reachabilityMethod?: NetInfoMethodType;\n reachabilityHeaders?: Record;\n reachabilityTest: (response: Response) => Promise;\n reachabilityLongTimeout: number;\n reachabilityShortTimeout: number;\n reachabilityRequestTimeout: number;\n reachabilityShouldRun: () => boolean;\n shouldFetchWiFiSSID: boolean;\n useNativeReachability: boolean;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAYA,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;AAc5B,WAAYC,yBAAyB,0BAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAA,OAAzBA,yBAAyB;AAAA"} -\ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/typescript/src/internal/NativeRNCNetInfo.d.ts b/node_modules/@react-native-community/netinfo/lib/typescript/src/internal/NativeRNCNetInfo.d.ts new file mode 100644 -index 0000000..b5db384 +index 0000000..8313a46 --- /dev/null +++ b/node_modules/@react-native-community/netinfo/lib/typescript/src/internal/NativeRNCNetInfo.d.ts @@ -0,0 +1,9 @@ @@ -2619,45 +1307,27 @@ index 0000000..b5db384 +} +declare const _default: Spec; +export default _default; +\ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/lib/typescript/src/internal/nativeInterface.d.ts b/node_modules/@react-native-community/netinfo/lib/typescript/src/internal/nativeInterface.d.ts -index 6982220..b515270 100644 +index f04294f..b515270 100644 --- a/node_modules/@react-native-community/netinfo/lib/typescript/src/internal/nativeInterface.d.ts +++ b/node_modules/@react-native-community/netinfo/lib/typescript/src/internal/nativeInterface.d.ts -@@ -8,10 +8,10 @@ +@@ -7,7 +7,11 @@ + * @format */ import { NativeEventEmitter } from 'react-native'; - declare const _default: { -- eventEmitter: NativeEventEmitter; - configure: (config: Partial) => void; +-declare const nativeInterface: import("./privateTypes").NetInfoNativeModule & { ++declare const _default: { ++ configure: (config: Partial) => void; + addListener: (type: K, listener: (event: import("./privateTypes").Events[K]) => void) => void; + removeListeners: (type: K_1, listener: (event: import("./privateTypes").Events[K_1]) => void) => void; - getCurrentState: (requestedInterface?: string | undefined) => Promise; -- addListener(type: K, listener: (event: import("./privateTypes").Events[K]) => void): void; -- removeListeners(type: K_1, listener: (event: import("./privateTypes").Events[K_1]) => void): void; -+ readonly eventEmitter: NativeEventEmitter; ++ getCurrentState: (requestedInterface?: string | undefined) => Promise; + readonly eventEmitter: NativeEventEmitter; }; - export default _default; -diff --git a/node_modules/@react-native-community/netinfo/package.json b/node_modules/@react-native-community/netinfo/package.json -index 3c80db2..15d214d 100644 ---- a/node_modules/@react-native-community/netinfo/package.json -+++ b/node_modules/@react-native-community/netinfo/package.json -@@ -97,6 +97,14 @@ - "webpack-cli": "^3.3.10", - "webpack-dev-server": "^3.11.3" - }, -+ "codegenConfig": { -+ "name": "RNCNetInfoSpec", -+ "type": "modules", -+ "jsSrcsDir": "src/internal", -+ "android": { -+ "javaPackageName": "com.reactnativecommunity.netinfo" -+ } -+ }, - "repository": { - "type": "git", - "url": "https://github.com/react-native-netinfo/react-native-netinfo.git" +-export default nativeInterface; ++export default _default; diff --git a/node_modules/@react-native-community/netinfo/react-native-netinfo.podspec b/node_modules/@react-native-community/netinfo/react-native-netinfo.podspec -index e34e728..9090eb1 100644 +index ccd671f..ec4e033 100644 --- a/node_modules/@react-native-community/netinfo/react-native-netinfo.podspec +++ b/node_modules/@react-native-community/netinfo/react-native-netinfo.podspec @@ -2,6 +2,8 @@ require 'json' @@ -2670,7 +1340,7 @@ index e34e728..9090eb1 100644 s.name = "react-native-netinfo" s.version = package['version'] @@ -13,7 +15,11 @@ Pod::Spec.new do |s| - s.platforms = { :ios => "9.0", :tvos => "9.2", :osx => "10.14" } + s.platforms = { :ios => "9.0", :tvos => "9.2", :osx => "10.14", :visionos => "1.0" } s.source = { :git => "https://github.com/react-native-community/react-native-netinfo.git", :tag => "v#{s.version}" } - s.source_files = "ios/**/*.{h,m}" @@ -2683,110 +1353,12 @@ index e34e728..9090eb1 100644 + s.dependency 'React-Core' + end end -diff --git a/node_modules/@react-native-community/netinfo/src/__tests__/eventListenerCallbacks.spec.ts b/node_modules/@react-native-community/netinfo/src/__tests__/eventListenerCallbacks.spec.ts -index 4ba58e9..9f87df7 100644 ---- a/node_modules/@react-native-community/netinfo/src/__tests__/eventListenerCallbacks.spec.ts -+++ b/node_modules/@react-native-community/netinfo/src/__tests__/eventListenerCallbacks.spec.ts -@@ -32,7 +32,7 @@ beforeAll(() => { - - describe('@react-native-community/netinfo listener', () => { - describe('Event listener callbacks', () => { -- it('should call the listener on listening', done => { -+ it('should call the listener on listening', (done) => { - const listener = jest.fn(); - NetInfo.addEventListener(listener); - -@@ -42,7 +42,7 @@ describe('@react-native-community/netinfo listener', () => { - }, 0); - }); - -- it('should call the listener on listening with multiple listeners', done => { -+ it('should call the listener on listening with multiple listeners', (done) => { - const listener1 = jest.fn(); - const listener2 = jest.fn(); - NetInfo.addEventListener(listener1); -@@ -303,7 +303,7 @@ describe('@react-native-community/netinfo listener', () => { - ]; - } - -- dataProvider().forEach(testCase => { -+ dataProvider().forEach((testCase) => { - it(testCase.description, () => { - NetInfo.configure(testCase.configuration); - -diff --git a/node_modules/@react-native-community/netinfo/src/__tests__/fetch.spec.ts b/node_modules/@react-native-community/netinfo/src/__tests__/fetch.spec.ts -index 4b56e4f..b790659 100644 ---- a/node_modules/@react-native-community/netinfo/src/__tests__/fetch.spec.ts -+++ b/node_modules/@react-native-community/netinfo/src/__tests__/fetch.spec.ts -@@ -69,7 +69,7 @@ describe('@react-native-community/netinfo fetch', () => { - ]; - } - -- dataProvider().forEach(testCase => { -+ dataProvider().forEach((testCase) => { - it(testCase.description, () => { - mockNativeModule.getCurrentState.mockResolvedValue( - testCase.expectedConnectionInfo, -@@ -131,7 +131,7 @@ describe('@react-native-community/netinfo fetch', () => { - ]; - } - -- dataProvider().forEach(testCase => { -+ dataProvider().forEach((testCase) => { - it(testCase.description, () => { - mockNativeModule.getCurrentState.mockResolvedValue( - testCase.expectedConnectionInfo, -@@ -193,7 +193,7 @@ describe('@react-native-community/netinfo fetch', () => { - ]; - } - -- dataProvider().forEach(testCase => { -+ dataProvider().forEach((testCase) => { - it(testCase.description, () => { - mockNativeModule.getCurrentState.mockResolvedValue( - testCase.expectedConnectionInfo, -@@ -255,7 +255,7 @@ describe('@react-native-community/netinfo fetch', () => { - ]; - } - -- dataProvider().forEach(testCase => { -+ dataProvider().forEach((testCase) => { - it(testCase.description, () => { - mockNativeModule.getCurrentState.mockResolvedValue( - testCase.expectedConnectionInfo, -@@ -317,7 +317,7 @@ describe('@react-native-community/netinfo fetch', () => { - ]; - } - -- dataProvider().forEach(testCase => { -+ dataProvider().forEach((testCase) => { - it(testCase.description, () => { - mockNativeModule.getCurrentState.mockResolvedValue( - testCase.expectedConnectionInfo, -@@ -361,7 +361,7 @@ describe('@react-native-community/netinfo fetch', () => { - ]; - } - -- dataProvider().forEach(testCase => { -+ dataProvider().forEach((testCase) => { - it(testCase.description, () => { - mockNativeModule.getCurrentState.mockResolvedValue( - testCase.expectedConnectionInfo, -@@ -455,7 +455,7 @@ describe('@react-native-community/netinfo fetch', () => { - ]; - } - -- dataProvider().forEach(testCase => { -+ dataProvider().forEach((testCase) => { - it(testCase.description, async () => { - mockNativeModule.getCurrentState.mockResolvedValue( - testCase.expectedConnectionInfo, diff --git a/node_modules/@react-native-community/netinfo/src/internal/NativeRNCNetInfo.ts b/node_modules/@react-native-community/netinfo/src/internal/NativeRNCNetInfo.ts new file mode 100644 -index 0000000..deada41 +index 0000000..947bcda --- /dev/null +++ b/node_modules/@react-native-community/netinfo/src/internal/NativeRNCNetInfo.ts -@@ -0,0 +1,14 @@ +@@ -0,0 +1,13 @@ +/* eslint-disable @typescript-eslint/ban-types */ +import type { TurboModule } from 'react-native'; +import { TurboModuleRegistry } from 'react-native'; @@ -2800,106 +1372,26 @@ index 0000000..deada41 +} + +export default TurboModuleRegistry.getEnforcing('RNCNetInfo'); -+ diff --git a/node_modules/@react-native-community/netinfo/src/internal/internetReachability.ts b/node_modules/@react-native-community/netinfo/src/internal/internetReachability.ts -index 5cf797b..f9940a5 100644 +index 757d784..6470b50 100644 --- a/node_modules/@react-native-community/netinfo/src/internal/internetReachability.ts +++ b/node_modules/@react-native-community/netinfo/src/internal/internetReachability.ts -@@ -19,7 +19,8 @@ export default class InternetReachability { - private _configuration: Types.NetInfoConfiguration; - private _listener: PrivateTypes.NetInfoInternetReachabilityChangeListener; - private _isInternetReachable: boolean | null | undefined = undefined; -- private _currentInternetReachabilityCheckHandler: InternetReachabilityCheckHandler | null = null; -+ private _currentInternetReachabilityCheckHandler: InternetReachabilityCheckHandler | null = -+ null; - private _currentTimeoutHandle: ReturnType | null = null; - - constructor( -@@ -60,7 +61,8 @@ export default class InternetReachability { - this._setIsInternetReachable(null); - } - // Start a network request to check for internet -- this._currentInternetReachabilityCheckHandler = this._checkInternetReachability(); -+ this._currentInternetReachabilityCheckHandler = -+ this._checkInternetReachability(); - } else { - // If we don't expect a connection or don't run reachability check, just change the state to "false" - this._setIsInternetReachable(false); -@@ -79,9 +81,9 @@ export default class InternetReachability { - - // Create promise that will reject after the request timeout has been reached - let timeoutHandle: ReturnType; -- const timeoutPromise = new Promise((): void => { -+ const timeoutPromise = new Promise((_, reject): void => { - timeoutHandle = setTimeout( -- (): void => controller.abort('timedout'), -+ (): void => reject('timedout'), - this._configuration.reachabilityRequestTimeout, - ); - }); -@@ -98,28 +100,37 @@ export default class InternetReachability { - timeoutPromise, - cancelPromise, - ]) -- .then( -- (response): Promise => { -- return this._configuration.reachabilityTest(response); -- }, -- ) -- .then( -- (result): void => { -- this._setIsInternetReachable(result); -- const nextTimeoutInterval = this._isInternetReachable -- ? this._configuration.reachabilityLongTimeout -- : this._configuration.reachabilityShortTimeout; -+ .then((response): Promise => { -+ return this._configuration.reachabilityTest(response); -+ }) -+ .then((result): void => { -+ this._setIsInternetReachable(result); -+ const nextTimeoutInterval = this._isInternetReachable -+ ? this._configuration.reachabilityLongTimeout -+ : this._configuration.reachabilityShortTimeout; -+ this._currentTimeoutHandle = setTimeout( -+ this._checkInternetReachability, -+ nextTimeoutInterval, -+ ); -+ }) -+ .catch((error: Error | 'timedout' | 'canceled'): void => { -+ if (error !== 'canceled') { -+ this._setIsInternetReachable(false); - this._currentTimeoutHandle = setTimeout( - this._checkInternetReachability, -- nextTimeoutInterval, -+ this._configuration.reachabilityShortTimeout, - ); -- }, -- ) -+ } -+ }) - .catch( - (error: Error | 'timedout' | 'canceled'): void => { - if ('canceled' === error) { - controller.abort(); - } else { -+ if ('timedout' === error) { -+ controller.abort(); -+ } -+ - this._setIsInternetReachable(false); - this._currentTimeoutHandle = setTimeout( - this._checkInternetReachability, +@@ -178,3 +178,5 @@ export default class InternetReachability { + } + }; + } ++ ++ diff --git a/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.ts b/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.ts -index c0d9ec4..912a903 100644 +index 8b514f4..dbdb7ad 100644 --- a/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.ts +++ b/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.ts -@@ -28,8 +28,12 @@ If none of these fix the issue, please open an issue on the Github repository: h +@@ -28,7 +28,11 @@ If none of these fix the issue, please open an issue on the Github repository: h * JavaScript code and the tests */ let nativeEventEmitter: NativeEventEmitter | null = null; -+ - export default { -- ...RNCNetInfo, +-const nativeInterface = Object.assign(RNCNetInfo, { ++const nativeInterface = { + configure: RNCNetInfo.configure, + addListener: RNCNetInfo.addListener, + removeListeners: RNCNetInfo.removeListeners, @@ -2907,28 +1399,15 @@ index c0d9ec4..912a903 100644 get eventEmitter(): NativeEventEmitter { if (!nativeEventEmitter) { // eslint-disable-next-line @typescript-eslint/ban-ts-comment -diff --git a/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.web.ts b/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.web.ts -index b665235..41863a4 100644 ---- a/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.web.ts -+++ b/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.web.ts -@@ -14,12 +14,9 @@ import {DEVICE_CONNECTIVITY_EVENT} from './privateTypes'; - const nativeEventEmitter = new NativeEventEmitter(); - - // Listen to connectivity events --RNCNetInfo.addListener( -- DEVICE_CONNECTIVITY_EVENT, -- (event): void => { -- nativeEventEmitter.emit(DEVICE_CONNECTIVITY_EVENT, event); -- }, --); -+RNCNetInfo.addListener(DEVICE_CONNECTIVITY_EVENT, (event): void => { -+ nativeEventEmitter.emit(DEVICE_CONNECTIVITY_EVENT, event); -+}); - - export default { - ...RNCNetInfo, +@@ -39,5 +43,5 @@ const nativeInterface = Object.assign(RNCNetInfo, { + /// @ts-ignore + return nativeEventEmitter; + }, +-}); ++}; + export default nativeInterface; diff --git a/node_modules/@react-native-community/netinfo/src/internal/nativeModule.ts b/node_modules/@react-native-community/netinfo/src/internal/nativeModule.ts -index 206a69a..7aff149 100644 +index 206a69a..4e58f6b 100644 --- a/node_modules/@react-native-community/netinfo/src/internal/nativeModule.ts +++ b/node_modules/@react-native-community/netinfo/src/internal/nativeModule.ts @@ -10,6 +10,16 @@ @@ -2947,140 +1426,5 @@ index 206a69a..7aff149 100644 + ? // eslint-disable-next-line @typescript-eslint/no-var-requires + require('./NativeRNCNetInfo').default + : NativeModules.RNCNetInfo; - + export default RNCNetInfo; -diff --git a/node_modules/@react-native-community/netinfo/src/internal/types.ts b/node_modules/@react-native-community/netinfo/src/internal/types.ts -index 427db82..6a8f94a 100644 ---- a/node_modules/@react-native-community/netinfo/src/internal/types.ts -+++ b/node_modules/@react-native-community/netinfo/src/internal/types.ts -@@ -34,7 +34,7 @@ export interface NetInfoConnectedDetails { - - interface NetInfoConnectedState< - T extends NetInfoStateType, -- D extends Record = Record -+ D extends Record = Record, - > { - type: T; - isConnected: true; -@@ -59,9 +59,8 @@ export interface NetInfoUnknownState { - isWifiEnabled?: boolean; - } - --export type NetInfoNoConnectionState = NetInfoDisconnectedState< -- NetInfoStateType.none -->; -+export type NetInfoNoConnectionState = -+ NetInfoDisconnectedState; - export type NetInfoDisconnectedStates = - | NetInfoUnknownState - | NetInfoNoConnectionState; -@@ -87,9 +86,8 @@ export type NetInfoWifiState = NetInfoConnectedState< - txLinkSpeed: number | null; - } - >; --export type NetInfoBluetoothState = NetInfoConnectedState< -- NetInfoStateType.bluetooth -->; -+export type NetInfoBluetoothState = -+ NetInfoConnectedState; - export type NetInfoEthernetState = NetInfoConnectedState< - NetInfoStateType.ethernet, - { -diff --git a/node_modules/@react-native-community/netinfo/windows/.npmignore b/node_modules/@react-native-community/netinfo/windows/.npmignore -deleted file mode 100644 -index 878f7ba..0000000 ---- a/node_modules/@react-native-community/netinfo/windows/.npmignore -+++ /dev/null -@@ -1,92 +0,0 @@ --*AppPackages* --*BundleArtifacts* -- --#OS junk files --[Tt]humbs.db --*.DS_Store -- --#Visual Studio files --*.[Oo]bj --*.user --*.aps --*.pch --*.vspscc --*.vssscc --*_i.c --*_p.c --*.ncb --*.suo --*.tlb --*.tlh --*.bak --*.[Cc]ache --*.ilk --*.log --*.lib --*.sbr --*.sdf --*.opensdf --*.opendb --*.unsuccessfulbuild --ipch/ --[Oo]bj/ --[Bb]in --[Dd]ebug*/ --[Rr]elease*/ --Ankh.NoLoad -- --# Visual C++ cache files --ipch/ --*.aps --*.ncb --*.opendb --*.opensdf --*.sdf --*.cachefile --*.VC.db --*.VC.VC.opendb -- --#MonoDevelop --*.pidb --*.userprefs -- --#Tooling --_ReSharper*/ --*.resharper --[Tt]est[Rr]esult* --*.sass-cache -- --#Project files --[Bb]uild/ -- --#Subversion files --.svn -- --# Office Temp Files --~$* -- --# vim Temp Files --*~ -- --#NuGet --packages/ --*.nupkg -- --#ncrunch --*ncrunch* --*crunch*.local.xml -- --# visual studio database projects --*.dbmdl -- --#Test files --*.testsettings -- --#Other files --*.DotSettings --.vs/ --*project.lock.json -- --#Files generated by the VS build --**/Generated Files/** -- From fffa30e8d1458806acc5e2294e3321728b722504 Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Sun, 14 Dec 2025 04:58:49 +0530 Subject: [PATCH 09/12] update patch file. Signed-off-by: krishna2323 --- ...unity+netinfo+11.4.1+002+turbomodule.patch | 266 ++++++------------ 1 file changed, 93 insertions(+), 173 deletions(-) diff --git a/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.4.1+002+turbomodule.patch b/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.4.1+002+turbomodule.patch index 037741958c7f..df5cd66af5a8 100644 --- a/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.4.1+002+turbomodule.patch +++ b/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.4.1+002+turbomodule.patch @@ -100,109 +100,48 @@ index 36757f7..7b098fd 100644 + } } diff --git a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModule.java b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModule.java -index 626134a..c6b15a0 100644 ---- a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModule.java +new file mode 100644 +index 0000000..c6b15a0 +--- /dev/null +++ b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModule.java -@@ -1,88 +1,51 @@ --/** -- * Copyright (c) Facebook, Inc. and its affiliates. -- * -- * This source code is licensed under the MIT license found in the -- * LICENSE file in the root directory of this source tree. -- */ - package com.reactnativecommunity.netinfo; - --import android.os.Build; --import com.facebook.react.bridge.Promise; - import com.facebook.react.bridge.ReactApplicationContext; --import com.facebook.react.bridge.ReactContextBaseJavaModule; +@@ -0,0 +1,51 @@ ++package com.reactnativecommunity.netinfo; ++ ++import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.bridge.Promise; - import com.facebook.react.bridge.ReactMethod; --import com.facebook.react.module.annotations.ReactModule; -- --/** Module that monitors and provides information about the connectivity state of the device. */ --@ReactModule(name = NetInfoModule.NAME) --public class NetInfoModule extends ReactContextBaseJavaModule implements AmazonFireDeviceConnectivityPoller.ConnectivityChangedCallback { -- public static final String NAME = "RNCNetInfo"; ++import com.facebook.react.bridge.ReactMethod; +import com.facebook.react.bridge.ReadableMap; - -- private final ConnectivityReceiver mConnectivityReceiver; -- private final AmazonFireDeviceConnectivityPoller mAmazonConnectivityChecker; ++ +public class NetInfoModule extends NativeRNCNetInfoSpec { - -- private int numberOfListeners = 0; ++ + private NetInfoModuleImpl implementation; - -- public NetInfoModule(ReactApplicationContext reactContext) { -- super(reactContext); -- // Create the connectivity receiver based on the API level we are running on -- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { -- mConnectivityReceiver = new NetworkCallbackConnectivityReceiver(reactContext); -- } else { -- mConnectivityReceiver = new BroadcastReceiverConnectivityReceiver(reactContext); -- } -- -- mAmazonConnectivityChecker = new AmazonFireDeviceConnectivityPoller(reactContext, this); -- } -- -- @Override -- public void initialize() { -- mConnectivityReceiver.register(); -- mAmazonConnectivityChecker.register(); -- } -- -- // the upstream method was removed in react-native 0.74 -- // this stub remains for backwards compatibility so that react-native < 0.74 -- // (which will still call onCatalystInstanceDestroy) will continue to function -- public void onCatalystInstanceDestroy() { -- invalidate(); -- } -- -- // This should have an `@Override` tag, but the method does not exist until -- // react-native >= 0.74, which would cause linting errors across versions -- // once minimum supported react-native here is 0.74+, add the tag -- public void invalidate() { -- mAmazonConnectivityChecker.unregister(); -- mConnectivityReceiver.unregister(); -- mConnectivityReceiver.hasListener = false; ++ + NetInfoModule(ReactApplicationContext context) { + super(context); + implementation = new NetInfoModuleImpl(context); - } - - @Override - public String getName() { -- return NAME; ++ } ++ ++ @Override ++ public String getName() { + return NetInfoModuleImpl.NAME; - } - - @ReactMethod - public void getCurrentState(final String requestedInterface, final Promise promise) { -- mConnectivityReceiver.getCurrentState(requestedInterface, promise); ++ } ++ ++ @ReactMethod ++ public void getCurrentState(final String requestedInterface, final Promise promise) { + implementation.getCurrentState(requestedInterface, promise); - } - -- @Override -- public void onAmazonFireDeviceConnectivityChanged(boolean isConnected) { -- mConnectivityReceiver.setIsInternetReachableOverride(isConnected); ++ } ++ + @ReactMethod + public void configure(ReadableMap config) { + // iOS only - } - - @ReactMethod - public void addListener(String eventName) { -- numberOfListeners++; -- mConnectivityReceiver.hasListener = true; ++ } ++ ++ @ReactMethod ++ public void addListener(String eventName) { + implementation.addListener(eventName); - } - - @ReactMethod -- public void removeListeners(Integer count) { -- numberOfListeners -= count; -- if (numberOfListeners == 0) { -- mConnectivityReceiver.hasListener = false; -- } ++ } ++ ++ @ReactMethod + public void removeListeners(double count) { + implementation.removeListeners(count); + } @@ -215,91 +154,75 @@ index 626134a..c6b15a0 100644 + @Override + public void initialize() { + implementation.initialize(); - } - } ++ } ++} \ No newline at end of file diff --git a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java -new file mode 100644 -index 0000000..a5d3a36 ---- /dev/null +index 626134a..a5d3a36 100644 +--- a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java +++ b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoModuleImpl.java -@@ -0,0 +1,76 @@ -+/** -+ * Copyright (c) Facebook, Inc. and its affiliates. -+ * -+ * This source code is licensed under the MIT license found in the -+ * LICENSE file in the root directory of this source tree. -+ */ -+package com.reactnativecommunity.netinfo; -+ -+import android.os.Build; -+import com.facebook.react.bridge.Promise; -+import com.facebook.react.bridge.ReactApplicationContext; -+import com.facebook.react.bridge.ReactMethod; -+import com.facebook.react.module.annotations.ReactModule; -+ -+/** Module that monitors and provides information about the connectivity state of the device. */ +@@ -9,13 +9,11 @@ package com.reactnativecommunity.netinfo; + import android.os.Build; + import com.facebook.react.bridge.Promise; + import com.facebook.react.bridge.ReactApplicationContext; +-import com.facebook.react.bridge.ReactContextBaseJavaModule; + import com.facebook.react.bridge.ReactMethod; + import com.facebook.react.module.annotations.ReactModule; + + /** Module that monitors and provides information about the connectivity state of the device. */ +-@ReactModule(name = NetInfoModule.NAME) +-public class NetInfoModule extends ReactContextBaseJavaModule implements AmazonFireDeviceConnectivityPoller.ConnectivityChangedCallback { +public class NetInfoModuleImpl implements AmazonFireDeviceConnectivityPoller.ConnectivityChangedCallback { -+ public static final String NAME = "RNCNetInfo"; -+ -+ private final ConnectivityReceiver mConnectivityReceiver; -+ private final AmazonFireDeviceConnectivityPoller mAmazonConnectivityChecker; -+ -+ private int numberOfListeners = 0; -+ + public static final String NAME = "RNCNetInfo"; + + private final ConnectivityReceiver mConnectivityReceiver; +@@ -23,8 +21,7 @@ public class NetInfoModule extends ReactContextBaseJavaModule implements AmazonF + + private int numberOfListeners = 0; + +- public NetInfoModule(ReactApplicationContext reactContext) { +- super(reactContext); + public NetInfoModuleImpl(ReactApplicationContext reactContext) { -+ // Create the connectivity receiver based on the API level we are running on -+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { -+ mConnectivityReceiver = new NetworkCallbackConnectivityReceiver(reactContext); -+ } else { -+ mConnectivityReceiver = new BroadcastReceiverConnectivityReceiver(reactContext); -+ } -+ -+ mAmazonConnectivityChecker = new AmazonFireDeviceConnectivityPoller(reactContext, this); -+ } -+ -+ public void initialize() { -+ mConnectivityReceiver.register(); -+ mAmazonConnectivityChecker.register(); -+ } -+ -+ // the upstream method was removed in react-native 0.74 -+ // this stub remains for backwards compatibility so that react-native < 0.74 -+ // (which will still call onCatalystInstanceDestroy) will continue to function -+ public void onCatalystInstanceDestroy() { -+ invalidate(); -+ } -+ -+ // This should have an `@Override` tag, but the method does not exist until -+ // react-native >= 0.74, which would cause linting errors across versions -+ // once minimum supported react-native here is 0.74+, add the tag -+ public void invalidate() { -+ mAmazonConnectivityChecker.unregister(); -+ mConnectivityReceiver.unregister(); -+ } -+ -+ @ReactMethod -+ public void getCurrentState(final String requestedInterface, final Promise promise) { -+ mConnectivityReceiver.getCurrentState(requestedInterface, promise); -+ } -+ -+ @Override -+ public void onAmazonFireDeviceConnectivityChanged(boolean isConnected) { -+ mConnectivityReceiver.setIsInternetReachableOverride(isConnected); -+ } -+ -+ public void addListener(String eventName) { -+ numberOfListeners++; -+ mConnectivityReceiver.hasListener = true; -+ } -+ + // Create the connectivity receiver based on the API level we are running on + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { + mConnectivityReceiver = new NetworkCallbackConnectivityReceiver(reactContext); +@@ -35,7 +32,6 @@ public class NetInfoModule extends ReactContextBaseJavaModule implements AmazonF + mAmazonConnectivityChecker = new AmazonFireDeviceConnectivityPoller(reactContext, this); + } + +- @Override + public void initialize() { + mConnectivityReceiver.register(); + mAmazonConnectivityChecker.register(); +@@ -54,12 +50,6 @@ public class NetInfoModule extends ReactContextBaseJavaModule implements AmazonF + public void invalidate() { + mAmazonConnectivityChecker.unregister(); + mConnectivityReceiver.unregister(); +- mConnectivityReceiver.hasListener = false; +- } +- +- @Override +- public String getName() { +- return NAME; + } + + @ReactMethod +@@ -72,14 +62,12 @@ public class NetInfoModule extends ReactContextBaseJavaModule implements AmazonF + mConnectivityReceiver.setIsInternetReachableOverride(isConnected); + } + +- @ReactMethod + public void addListener(String eventName) { + numberOfListeners++; + mConnectivityReceiver.hasListener = true; + } + +- @ReactMethod +- public void removeListeners(Integer count) { + public void removeListeners(double count) { -+ numberOfListeners -= count; -+ if (numberOfListeners == 0) { -+ mConnectivityReceiver.hasListener = false; -+ } -+ } -+} + numberOfListeners -= count; + if (numberOfListeners == 0) { + mConnectivityReceiver.hasListener = false; diff --git a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoPackage.java b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoPackage.java index fcd4a5e..cc44776 100644 --- a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetInfoPackage.java @@ -440,12 +363,9 @@ index 0000000..2c5256e + } +} \ No newline at end of file -diff --git a/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.m b/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm -similarity index 93% -rename from node_modules/@react-native-community/netinfo/ios/RNCNetInfo.m -rename to node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm +diff --git a/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm b/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm index ee759ba..3822258 100644 ---- a/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.m +--- a/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm +++ b/node_modules/@react-native-community/netinfo/ios/RNCNetInfo.mm @@ -8,6 +8,10 @@ #import "RNCNetInfo.h" From 6b5a10cce38ab9b9b2aa79f3eb71c43ffd0228f7 Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Mon, 22 Dec 2025 00:54:17 +0530 Subject: [PATCH 10/12] update patch file. Signed-off-by: krishna2323 --- ...unity+netinfo+11.4.1+002+turbomodule.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.4.1+002+turbomodule.patch b/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.4.1+002+turbomodule.patch index df5cd66af5a8..734da6acb3e7 100644 --- a/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.4.1+002+turbomodule.patch +++ b/patches/@react-native-community/netinfo/@react-native-community+netinfo+11.4.1+002+turbomodule.patch @@ -1348,3 +1348,22 @@ index 206a69a..4e58f6b 100644 + : NativeModules.RNCNetInfo; export default RNCNetInfo; +diff --git a/node_modules/@react-native-community/netinfo/package.json b/node_modules/@react-native-community/netinfo/package.json +index 3c80db2..15d214d 100644 +--- a/node_modules/@react-native-community/netinfo/package.json ++++ b/node_modules/@react-native-community/netinfo/package.json +@@ -97,6 +97,14 @@ + "webpack-cli": "^3.3.10", + "webpack-dev-server": "^3.11.3" + }, ++ "codegenConfig": { ++ "name": "RNCNetInfoSpec", ++ "type": "modules", ++ "jsSrcsDir": "src/internal", ++ "android": { ++ "javaPackageName": "com.reactnativecommunity.netinfo" ++ } ++ }, + "repository": { + "type": "git", + "url": "https://github.com/react-native-netinfo/react-native-netinfo.git" \ No newline at end of file From 0f1965c8eb026d178afca21d04ce634521a17124 Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Mon, 29 Dec 2025 20:31:48 +0530 Subject: [PATCH 11/12] resolve merge conflicts. Signed-off-by: krishna2323 --- package-lock.json | 10 ++++------ package.json | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 44593cc3be7b..8ddfe304ec34 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "@pusher/pusher-websocket-react-native": "^1.3.1", "@react-native-camera-roll/camera-roll": "7.4.0", "@react-native-clipboard/clipboard": "^1.15.0", - "@react-native-community/netinfo": "11.4.1", + "@react-native-community/netinfo": "11.2.1", "@react-native-documents/picker": "^10.1.3", "@react-native-firebase/analytics": "^22.2.1", "@react-native-firebase/app": "^22.2.1", @@ -12296,16 +12296,14 @@ }, "node_modules/@react-native-community/cli/node_modules/universalify": { "version": "0.1.2", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">= 4.0.0" } }, "node_modules/@react-native-community/netinfo": { - "version": "11.4.1", - "resolved": "https://registry.npmjs.org/@react-native-community/netinfo/-/netinfo-11.4.1.tgz", - "integrity": "sha512-B0BYAkghz3Q2V09BF88RA601XursIEA111tnc2JOaN7axJWmNefmfjZqw/KdSxKZp7CZUuPpjBmz/WCR9uaHYg==", + "version": "11.2.1", "license": "MIT", "peerDependencies": { "react-native": ">=0.59" @@ -42184,4 +42182,4 @@ } } } -} \ No newline at end of file +} diff --git a/package.json b/package.json index afb444e2c176..3855ee58b345 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "@pusher/pusher-websocket-react-native": "^1.3.1", "@react-native-camera-roll/camera-roll": "7.4.0", "@react-native-clipboard/clipboard": "^1.15.0", - "@react-native-community/netinfo": "11.4.1", + "@react-native-community/netinfo": "11.2.1", "@react-native-documents/picker": "^10.1.3", "@react-native-firebase/analytics": "^22.2.1", "@react-native-firebase/app": "^22.2.1", From 7903ae492a7f39c1fd1c0627bf3aa7d013faf2c6 Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Mon, 29 Dec 2025 20:37:01 +0530 Subject: [PATCH 12/12] bump netinfo version. Signed-off-by: krishna2323 --- package-lock.json | 8 +++++--- package.json | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index d671634e13c2..178407b23ad4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "@pusher/pusher-websocket-react-native": "^1.3.1", "@react-native-camera-roll/camera-roll": "7.4.0", "@react-native-clipboard/clipboard": "^1.16.3", - "@react-native-community/netinfo": "11.2.1", + "@react-native-community/netinfo": "11.4.1", "@react-native-documents/picker": "^10.1.3", "@react-native-firebase/analytics": "^22.2.1", "@react-native-firebase/app": "^22.2.1", @@ -12364,14 +12364,16 @@ }, "node_modules/@react-native-community/cli/node_modules/universalify": { "version": "0.1.2", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">= 4.0.0" } }, "node_modules/@react-native-community/netinfo": { - "version": "11.2.1", + "version": "11.4.1", + "resolved": "https://registry.npmjs.org/@react-native-community/netinfo/-/netinfo-11.4.1.tgz", + "integrity": "sha512-B0BYAkghz3Q2V09BF88RA601XursIEA111tnc2JOaN7axJWmNefmfjZqw/KdSxKZp7CZUuPpjBmz/WCR9uaHYg==", "license": "MIT", "peerDependencies": { "react-native": ">=0.59" diff --git a/package.json b/package.json index c665e59c1465..b45a74b3ca34 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "@pusher/pusher-websocket-react-native": "^1.3.1", "@react-native-camera-roll/camera-roll": "7.4.0", "@react-native-clipboard/clipboard": "^1.16.3", - "@react-native-community/netinfo": "11.2.1", + "@react-native-community/netinfo": "11.4.1", "@react-native-documents/picker": "^10.1.3", "@react-native-firebase/analytics": "^22.2.1", "@react-native-firebase/app": "^22.2.1",