File: /var/www/vhost/disk-apps/pwa.sports-crowd.com/node_modules/@capacitor/network/dist/plugin.js.map
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Network = registerPlugin('Network', {\n web: () => import('./web').then(m => new m.NetworkWeb()),\n});\nexport * from './definitions';\nexport { Network };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nfunction translatedConnection() {\n const connection = window.navigator.connection ||\n window.navigator.mozConnection ||\n window.navigator.webkitConnection;\n let result = 'unknown';\n const type = connection ? connection.type || connection.effectiveType : null;\n if (type && typeof type === 'string') {\n switch (type) {\n // possible type values\n case 'bluetooth':\n case 'cellular':\n result = 'cellular';\n break;\n case 'none':\n result = 'none';\n break;\n case 'ethernet':\n case 'wifi':\n case 'wimax':\n result = 'wifi';\n break;\n case 'other':\n case 'unknown':\n result = 'unknown';\n break;\n // possible effectiveType values\n case 'slow-2g':\n case '2g':\n case '3g':\n result = 'cellular';\n break;\n case '4g':\n result = 'wifi';\n break;\n default:\n break;\n }\n }\n return result;\n}\nexport class NetworkWeb extends WebPlugin {\n constructor() {\n super();\n this.handleOnline = () => {\n const connectionType = translatedConnection();\n const status = {\n connected: true,\n connectionType: connectionType,\n };\n this.notifyListeners('networkStatusChange', status);\n };\n this.handleOffline = () => {\n const status = {\n connected: false,\n connectionType: 'none',\n };\n this.notifyListeners('networkStatusChange', status);\n };\n if (typeof window !== 'undefined') {\n window.addEventListener('online', this.handleOnline);\n window.addEventListener('offline', this.handleOffline);\n }\n }\n async getStatus() {\n if (!window.navigator) {\n throw this.unavailable('Browser does not support the Network Information API');\n }\n const connected = window.navigator.onLine;\n const connectionType = translatedConnection();\n const status = {\n connected,\n connectionType: connected ? connectionType : 'none',\n };\n return status;\n }\n}\nconst Network = new NetworkWeb();\nexport { Network };\n//# sourceMappingURL=web.js.map"],"names":["Network","registerPlugin","WebPlugin"],"mappings":";;;AACK,UAACA,SAAO,GAAGC,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