{"version":3,"sources":["jsdelivr-header.js","/npm/current-location-geo@1.1.5/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,SAAS,YAAY,GACf,UAAU,YACZ,UAAU,YAAY,oBACpB,eAAgB,GACd,MAAM,SAAE,EAAQ,UAAE,GAAc,EAAS,OACzC,IACE,MAAM,EAAM,+DAA+D,SAAgB,IACrF,QAAiB,MAAM,GACvB,QAAa,EAAS,OAE5B,GAAI,EAAM,CACR,MAAM,EAAU,EAAK,aACrB,QAAQ,IAAI,GACZ,EAAS,KAAM,CAAE,WAAU,YAAW,WACxC,MACE,QAAQ,IAAI,oBACZ,EAAS,KAAM,CAAE,WAAU,YAAW,QAAS,MAEnD,CAAE,MAAO,GACP,QAAQ,MAAM,SAAU,GACxB,EAAS,EACX,CACF,IACA,SAAU,GACR,EAAS,EACX,IAGF,EAAS,IAAI,MAAM,iDAEvB,CAKA,OAAO,QAAU,CACf","file":"/npm/current-location-geo@1.1.5/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/current-location-geo@1.1.5/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","function getLocation(callback) {\r\n  if (navigator.geolocation) {\r\n    navigator.geolocation.getCurrentPosition(\r\n      async function (position) {\r\n        const { latitude, longitude } = position.coords;\r\n        try {\r\n          const url = `https://nominatim.openstreetmap.org/reverse?format=json&lat=${latitude}&lon=${longitude}`;\r\n          const response = await fetch(url);\r\n          const data = await response.json();\r\n\r\n          if (data) {\r\n            const address = data.display_name;\r\n            console.log(address);\r\n            callback(null, { latitude, longitude, address });\r\n          } else {\r\n            console.log('No results found');\r\n            callback(null, { latitude, longitude, address: null });\r\n          }\r\n        } catch (error) {\r\n          console.error('Error:', error);\r\n          callback(error);\r\n        }\r\n      },\r\n      function (error) {\r\n        callback(error);\r\n      }\r\n    );\r\n  } else {\r\n    callback(new Error('Geolocation is not supported by this browser.'));\r\n  }\r\n}\r\n\r\n\r\n\r\n\r\nmodule.exports = {\r\n  getLocation,\r\n\r\n};\r\n"]}