/**
 * Minified by jsDelivr using Terser v5.37.0.
 * Original file: /npm/coremobile_react-native-background-geolocation@0.6.4/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";var{DeviceEventEmitter:DeviceEventEmitter,NativeModules:NativeModules,AppRegistry:AppRegistry}=require("react-native"),RNBackgroundGeolocation=NativeModules.BackgroundGeolocation,TAG="RNBackgroundGeolocation",TASK_KEY="com.marianhello.bgloc.react.headless.Task";function emptyFn(){}function defaultErrorHandler(o){var t=o.cause||{},n=t.message;throw TAG+": "+o.message+(n?": "+t.message:"")}var BackgroundGeolocation={events:["location","stationary","activity","start","stop","error","authorization","foreground","background","abort_requested","http_authorization"],DISTANCE_FILTER_PROVIDER:0,ACTIVITY_PROVIDER:1,RAW_PROVIDER:2,BACKGROUND_MODE:0,FOREGROUND_MODE:1,NOT_AUTHORIZED:0,AUTHORIZED:1,AUTHORIZED_FOREGROUND:2,HIGH_ACCURACY:0,MEDIUM_ACCURACY:100,LOW_ACCURACY:1e3,PASSIVE_ACCURACY:1e4,LOG_ERROR:"ERROR",LOG_WARN:"WARN",LOG_INFO:"INFO",LOG_DEBUG:"DEBUG",LOG_TRACE:"TRACE",PERMISSION_DENIED:1,LOCATION_UNAVAILABLE:2,TIMEOUT:3,configure:function(o,t,n){t=t||emptyFn,n=n||defaultErrorHandler,RNBackgroundGeolocation.configure(o,t,n)},start:function(){RNBackgroundGeolocation.start()},stop:function(){RNBackgroundGeolocation.stop()},checkStatus:function(o,t){o=o||emptyFn,t=t||emptyFn,RNBackgroundGeolocation.checkStatus(o,t)},showAppSettings:function(){RNBackgroundGeolocation.showAppSettings()},showLocationSettings:function(){RNBackgroundGeolocation.showLocationSettings()},getStationaryLocation:function(o,t){o=o||emptyFn,t=t||emptyFn,RNBackgroundGeolocation.getStationaryLocation(o,t)},getCurrentLocation:function(o,t,n){n=n||{},o=o||emptyFn,t=t||emptyFn,RNBackgroundGeolocation.getCurrentLocation(n,o,t)},getLocations:function(o,t){o=o||emptyFn,t=t||emptyFn,RNBackgroundGeolocation.getLocations(o,t)},getValidLocations:function(o,t){o=o||emptyFn,t=t||emptyFn,RNBackgroundGeolocation.getValidLocations(o,t)},deleteLocation:function(o,t,n){t=t||emptyFn,n=n||emptyFn,RNBackgroundGeolocation.deleteLocation(o,t,n)},deleteAllLocations:function(o,t){o=o||emptyFn,t=t||emptyFn,RNBackgroundGeolocation.deleteAllLocations(o,t)},switchMode:function(o,t,n){t=t||emptyFn,n=n||emptyFn,RNBackgroundGeolocation.switchMode(o,t,n)},getConfig:function(o,t){o=o||emptyFn,t=t||emptyFn,RNBackgroundGeolocation.getConfig(o,t)},getLogEntries:function(o){var t,n,e,a,i=arguments.length;i>1&&"function"==typeof arguments[1]?(console.log("[WARN]: Calling deprecated variant of getLogEntries method."),t=0,n=BackgroundGeolocation.LOG_DEBUG,e=arguments[1]||emptyFn,a=arguments[2]||emptyFn):(t=i>1&&void 0!==arguments[1]?arguments[1]:0,n=i>2&&void 0!==arguments[2]?arguments[2]:BackgroundGeolocation.LOG_DEBUG,e=i>3&&void 0!==arguments[3]?arguments[3]:emptyFn,a=i>4&&void 0!==arguments[4]?arguments[4]:emptyFn),RNBackgroundGeolocation.getLogEntries(o,t,n,e,a)},startTask:function(o){if("function"!=typeof o)throw"RNBackgroundGeolocation: startTask requires callback function";"function"==typeof RNBackgroundGeolocation.startTask?RNBackgroundGeolocation.startTask(o):o(-1)},endTask:function(o){"function"==typeof RNBackgroundGeolocation.endTask&&RNBackgroundGeolocation.endTask(o)},headlessTask:function(o,t,n){t=t||emptyFn,n=n||emptyFn,AppRegistry.registerHeadlessTask(TASK_KEY,(()=>o)),RNBackgroundGeolocation.registerHeadlessTask(t,n)},forceSync:function(o,t){o=o||emptyFn,t=t||emptyFn,RNBackgroundGeolocation.forceSync(o,t)},on:function(o,t){if("function"!=typeof t)throw TAG+": callback function must be provided";if(this.events.indexOf(o)<0)throw TAG+': Unknown event "'+o+'"';return DeviceEventEmitter.addListener(o,t)},removeAllListeners:function(o){o?this.events.indexOf(o)<0?console.log("[WARN] "+TAG+': removeAllListeners for unknown event "'+o+'"'):DeviceEventEmitter.removeAllListeners(o):this.events.forEach((function(o){DeviceEventEmitter.removeAllListeners(o)}))}};module.exports=BackgroundGeolocation;
//# sourceMappingURL=/sm/3f62ad22ab530189d5e26edd79c050bd310041fec1d8a1fd2155191299b8c5e2.map