radar-sdk-js 3.1.0-beta.8 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/index.js +155 -32
- package/dist/radar.js +155 -32
- package/dist/radar.min.js +1 -1
- package/package.json +1 -1
- package/src/api/routing.js +31 -0
- package/src/api/track.js +10 -13
- package/src/cookie.js +0 -3
- package/src/index.js +8 -0
- package/src/version.js +1 -1
package/README.md
CHANGED
|
@@ -12,6 +12,13 @@ See the Radar overview documentation [here](https://radar.io/documentation).
|
|
|
12
12
|
|
|
13
13
|
Then, see the Radar web SDK documentation [here](https://radar.io/documentation/sdk/web).
|
|
14
14
|
|
|
15
|
+
## Running locally
|
|
16
|
+
|
|
17
|
+
1. Clone the repo
|
|
18
|
+
2. `npm install`
|
|
19
|
+
3. To run the SDK in a browser, run `npm run build && node demo/server.js`, which should open a tab in your browser of choice. Modify the `/src/index.html` file as needed
|
|
20
|
+
4. To run tests, run `npm run test`
|
|
21
|
+
|
|
15
22
|
## Support
|
|
16
23
|
|
|
17
24
|
Have questions? We're here to help! Email us at [support@radar.io](mailto:support@radar.io).
|
package/dist/index.js
CHANGED
|
@@ -667,6 +667,55 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
667
667
|
return Constructor;
|
|
668
668
|
}
|
|
669
669
|
|
|
670
|
+
function _defineProperty(obj, key, value) {
|
|
671
|
+
if (key in obj) {
|
|
672
|
+
Object.defineProperty(obj, key, {
|
|
673
|
+
value: value,
|
|
674
|
+
enumerable: true,
|
|
675
|
+
configurable: true,
|
|
676
|
+
writable: true
|
|
677
|
+
});
|
|
678
|
+
} else {
|
|
679
|
+
obj[key] = value;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
return obj;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
function ownKeys$1(object, enumerableOnly) {
|
|
686
|
+
var keys = Object.keys(object);
|
|
687
|
+
|
|
688
|
+
if (Object.getOwnPropertySymbols) {
|
|
689
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
690
|
+
if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
|
691
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
692
|
+
});
|
|
693
|
+
keys.push.apply(keys, symbols);
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
return keys;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
function _objectSpread2(target) {
|
|
700
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
701
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
702
|
+
|
|
703
|
+
if (i % 2) {
|
|
704
|
+
ownKeys$1(Object(source), true).forEach(function (key) {
|
|
705
|
+
_defineProperty(target, key, source[key]);
|
|
706
|
+
});
|
|
707
|
+
} else if (Object.getOwnPropertyDescriptors) {
|
|
708
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
709
|
+
} else {
|
|
710
|
+
ownKeys$1(Object(source)).forEach(function (key) {
|
|
711
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
return target;
|
|
717
|
+
}
|
|
718
|
+
|
|
670
719
|
// `IsArray` abstract operation
|
|
671
720
|
// https://tc39.github.io/ecma262/#sec-isarray
|
|
672
721
|
var isArray = Array.isArray || function isArray(arg) {
|
|
@@ -1606,11 +1655,6 @@ var Cookie = /*#__PURE__*/function () {
|
|
|
1606
1655
|
get: function get() {
|
|
1607
1656
|
return 'radar-trip-options';
|
|
1608
1657
|
}
|
|
1609
|
-
}, {
|
|
1610
|
-
key: "NEARBY_BEACONS",
|
|
1611
|
-
get: function get() {
|
|
1612
|
-
return 'radar-nearby-beacons';
|
|
1613
|
-
}
|
|
1614
1658
|
}, {
|
|
1615
1659
|
key: "CUSTOM_HEADERS",
|
|
1616
1660
|
get: function get() {
|
|
@@ -3294,7 +3338,7 @@ var API_HOST = /*#__PURE__*/function () {
|
|
|
3294
3338
|
return API_HOST;
|
|
3295
3339
|
}();
|
|
3296
3340
|
|
|
3297
|
-
var SDK_VERSION = '3.1.
|
|
3341
|
+
var SDK_VERSION = '3.1.1';
|
|
3298
3342
|
|
|
3299
3343
|
var Http = /*#__PURE__*/function () {
|
|
3300
3344
|
function Http() {
|
|
@@ -3690,6 +3734,74 @@ var Routing = /*#__PURE__*/function () {
|
|
|
3690
3734
|
|
|
3691
3735
|
return getDistanceToDestination;
|
|
3692
3736
|
}()
|
|
3737
|
+
}, {
|
|
3738
|
+
key: "getMatrixDistances",
|
|
3739
|
+
value: function () {
|
|
3740
|
+
var _getMatrixDistances = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
3741
|
+
var routingOptions,
|
|
3742
|
+
_yield$Navigator$getC2,
|
|
3743
|
+
latitude,
|
|
3744
|
+
longitude,
|
|
3745
|
+
origins,
|
|
3746
|
+
destinations,
|
|
3747
|
+
mode,
|
|
3748
|
+
units,
|
|
3749
|
+
params,
|
|
3750
|
+
_args2 = arguments;
|
|
3751
|
+
|
|
3752
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
3753
|
+
while (1) {
|
|
3754
|
+
switch (_context2.prev = _context2.next) {
|
|
3755
|
+
case 0:
|
|
3756
|
+
routingOptions = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
3757
|
+
|
|
3758
|
+
if (routingOptions.origins) {
|
|
3759
|
+
_context2.next = 8;
|
|
3760
|
+
break;
|
|
3761
|
+
}
|
|
3762
|
+
|
|
3763
|
+
_context2.next = 4;
|
|
3764
|
+
return Navigator.getCurrentPosition();
|
|
3765
|
+
|
|
3766
|
+
case 4:
|
|
3767
|
+
_yield$Navigator$getC2 = _context2.sent;
|
|
3768
|
+
latitude = _yield$Navigator$getC2.latitude;
|
|
3769
|
+
longitude = _yield$Navigator$getC2.longitude;
|
|
3770
|
+
routingOptions.origins = [{
|
|
3771
|
+
latitude: latitude,
|
|
3772
|
+
longitude: longitude
|
|
3773
|
+
}];
|
|
3774
|
+
|
|
3775
|
+
case 8:
|
|
3776
|
+
origins = routingOptions.origins, destinations = routingOptions.destinations, mode = routingOptions.mode, units = routingOptions.units;
|
|
3777
|
+
origins = (origins || []).map(function (origin) {
|
|
3778
|
+
return "".concat(origin.latitude, ",").concat(origin.longitude);
|
|
3779
|
+
}).join('|');
|
|
3780
|
+
destinations = (destinations || []).map(function (destination) {
|
|
3781
|
+
return "".concat(destination.latitude, ",").concat(destination.longitude);
|
|
3782
|
+
}).join('|');
|
|
3783
|
+
params = {
|
|
3784
|
+
origins: origins,
|
|
3785
|
+
destinations: destinations,
|
|
3786
|
+
mode: mode,
|
|
3787
|
+
units: units
|
|
3788
|
+
};
|
|
3789
|
+
return _context2.abrupt("return", Http.request('GET', 'v1/route/matrix', params));
|
|
3790
|
+
|
|
3791
|
+
case 13:
|
|
3792
|
+
case "end":
|
|
3793
|
+
return _context2.stop();
|
|
3794
|
+
}
|
|
3795
|
+
}
|
|
3796
|
+
}, _callee2);
|
|
3797
|
+
}));
|
|
3798
|
+
|
|
3799
|
+
function getMatrixDistances() {
|
|
3800
|
+
return _getMatrixDistances.apply(this, arguments);
|
|
3801
|
+
}
|
|
3802
|
+
|
|
3803
|
+
return getMatrixDistances;
|
|
3804
|
+
}()
|
|
3693
3805
|
}]);
|
|
3694
3806
|
|
|
3695
3807
|
return Routing;
|
|
@@ -4099,11 +4211,11 @@ var Track = /*#__PURE__*/function () {
|
|
|
4099
4211
|
key: "trackOnce",
|
|
4100
4212
|
value: function () {
|
|
4101
4213
|
var _trackOnce = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
4102
|
-
var
|
|
4103
|
-
_location,
|
|
4214
|
+
var params,
|
|
4104
4215
|
latitude,
|
|
4105
4216
|
longitude,
|
|
4106
4217
|
accuracy,
|
|
4218
|
+
deviceLocation,
|
|
4107
4219
|
deviceId,
|
|
4108
4220
|
userId,
|
|
4109
4221
|
installId,
|
|
@@ -4111,32 +4223,33 @@ var Track = /*#__PURE__*/function () {
|
|
|
4111
4223
|
description,
|
|
4112
4224
|
metadata,
|
|
4113
4225
|
tripOptions,
|
|
4114
|
-
nearbyBeacons,
|
|
4115
4226
|
body,
|
|
4116
4227
|
basePath,
|
|
4117
4228
|
trackEndpoint,
|
|
4118
4229
|
response,
|
|
4119
4230
|
_args = arguments;
|
|
4120
|
-
|
|
4121
4231
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
4122
4232
|
while (1) {
|
|
4123
4233
|
switch (_context.prev = _context.next) {
|
|
4124
4234
|
case 0:
|
|
4125
|
-
|
|
4235
|
+
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
4236
|
+
latitude = params.latitude, longitude = params.longitude, accuracy = params.accuracy;
|
|
4126
4237
|
|
|
4127
|
-
if (!(!
|
|
4128
|
-
_context.next =
|
|
4238
|
+
if (!(!latitude || !longitude)) {
|
|
4239
|
+
_context.next = 9;
|
|
4129
4240
|
break;
|
|
4130
4241
|
}
|
|
4131
4242
|
|
|
4132
|
-
_context.next =
|
|
4243
|
+
_context.next = 5;
|
|
4133
4244
|
return Navigator.getCurrentPosition();
|
|
4134
4245
|
|
|
4135
|
-
case 4:
|
|
4136
|
-
location = _context.sent;
|
|
4137
|
-
|
|
4138
4246
|
case 5:
|
|
4139
|
-
|
|
4247
|
+
deviceLocation = _context.sent;
|
|
4248
|
+
latitude = deviceLocation.latitude;
|
|
4249
|
+
longitude = deviceLocation.longitude;
|
|
4250
|
+
accuracy = deviceLocation.accuracy;
|
|
4251
|
+
|
|
4252
|
+
case 9:
|
|
4140
4253
|
deviceId = Device.getId();
|
|
4141
4254
|
userId = Cookie.getCookie(Cookie.USER_ID);
|
|
4142
4255
|
installId = Cookie.getCookie(Cookie.INSTALL_ID) || deviceId;
|
|
@@ -4154,13 +4267,7 @@ var Track = /*#__PURE__*/function () {
|
|
|
4154
4267
|
tripOptions = JSON.parse(tripOptions);
|
|
4155
4268
|
}
|
|
4156
4269
|
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
if (nearbyBeacons) {
|
|
4160
|
-
nearbyBeacons = JSON.parse(nearbyBeacons);
|
|
4161
|
-
}
|
|
4162
|
-
|
|
4163
|
-
body = {
|
|
4270
|
+
body = _objectSpread2({}, params, {
|
|
4164
4271
|
accuracy: accuracy,
|
|
4165
4272
|
description: description,
|
|
4166
4273
|
deviceId: deviceId,
|
|
@@ -4173,20 +4280,23 @@ var Track = /*#__PURE__*/function () {
|
|
|
4173
4280
|
sdkVersion: SDK_VERSION,
|
|
4174
4281
|
stopped: true,
|
|
4175
4282
|
userId: userId,
|
|
4176
|
-
tripOptions: tripOptions
|
|
4177
|
-
|
|
4178
|
-
};
|
|
4283
|
+
tripOptions: tripOptions
|
|
4284
|
+
});
|
|
4179
4285
|
basePath = Cookie.getCookie(Cookie.BASE_API_PATH) || 'v1';
|
|
4180
4286
|
trackEndpoint = "".concat(basePath, "/track");
|
|
4181
|
-
_context.next =
|
|
4287
|
+
_context.next = 23;
|
|
4182
4288
|
return Http.request('POST', trackEndpoint, body);
|
|
4183
4289
|
|
|
4184
|
-
case
|
|
4290
|
+
case 23:
|
|
4185
4291
|
response = _context.sent;
|
|
4186
|
-
response.location =
|
|
4292
|
+
response.location = {
|
|
4293
|
+
latitude: latitude,
|
|
4294
|
+
longitude: longitude,
|
|
4295
|
+
accuracy: accuracy
|
|
4296
|
+
};
|
|
4187
4297
|
return _context.abrupt("return", response);
|
|
4188
4298
|
|
|
4189
|
-
case
|
|
4299
|
+
case 26:
|
|
4190
4300
|
case "end":
|
|
4191
4301
|
return _context.stop();
|
|
4192
4302
|
}
|
|
@@ -4589,6 +4699,19 @@ var Radar = /*#__PURE__*/function () {
|
|
|
4589
4699
|
}, response);
|
|
4590
4700
|
}).catch(handleError(callback));
|
|
4591
4701
|
}
|
|
4702
|
+
}, {
|
|
4703
|
+
key: "getMatrix",
|
|
4704
|
+
value: function getMatrix(routingOptions) {
|
|
4705
|
+
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultCallback;
|
|
4706
|
+
Routing.getMatrixDistances(routingOptions).then(function (response) {
|
|
4707
|
+
callback(null, {
|
|
4708
|
+
origins: response.origins,
|
|
4709
|
+
destinations: response.destinations,
|
|
4710
|
+
matrix: response.matrix,
|
|
4711
|
+
status: STATUS.SUCCESS
|
|
4712
|
+
}, response);
|
|
4713
|
+
}).catch(handleError(callback));
|
|
4714
|
+
}
|
|
4592
4715
|
}, {
|
|
4593
4716
|
key: "VERSION",
|
|
4594
4717
|
get: function get() {
|
package/dist/radar.js
CHANGED
|
@@ -668,6 +668,55 @@ var Radar = (function () {
|
|
|
668
668
|
return Constructor;
|
|
669
669
|
}
|
|
670
670
|
|
|
671
|
+
function _defineProperty(obj, key, value) {
|
|
672
|
+
if (key in obj) {
|
|
673
|
+
Object.defineProperty(obj, key, {
|
|
674
|
+
value: value,
|
|
675
|
+
enumerable: true,
|
|
676
|
+
configurable: true,
|
|
677
|
+
writable: true
|
|
678
|
+
});
|
|
679
|
+
} else {
|
|
680
|
+
obj[key] = value;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
return obj;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
function ownKeys$1(object, enumerableOnly) {
|
|
687
|
+
var keys = Object.keys(object);
|
|
688
|
+
|
|
689
|
+
if (Object.getOwnPropertySymbols) {
|
|
690
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
691
|
+
if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
|
692
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
693
|
+
});
|
|
694
|
+
keys.push.apply(keys, symbols);
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
return keys;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
function _objectSpread2(target) {
|
|
701
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
702
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
703
|
+
|
|
704
|
+
if (i % 2) {
|
|
705
|
+
ownKeys$1(Object(source), true).forEach(function (key) {
|
|
706
|
+
_defineProperty(target, key, source[key]);
|
|
707
|
+
});
|
|
708
|
+
} else if (Object.getOwnPropertyDescriptors) {
|
|
709
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
710
|
+
} else {
|
|
711
|
+
ownKeys$1(Object(source)).forEach(function (key) {
|
|
712
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
return target;
|
|
718
|
+
}
|
|
719
|
+
|
|
671
720
|
// `IsArray` abstract operation
|
|
672
721
|
// https://tc39.github.io/ecma262/#sec-isarray
|
|
673
722
|
var isArray = Array.isArray || function isArray(arg) {
|
|
@@ -1607,11 +1656,6 @@ var Radar = (function () {
|
|
|
1607
1656
|
get: function get() {
|
|
1608
1657
|
return 'radar-trip-options';
|
|
1609
1658
|
}
|
|
1610
|
-
}, {
|
|
1611
|
-
key: "NEARBY_BEACONS",
|
|
1612
|
-
get: function get() {
|
|
1613
|
-
return 'radar-nearby-beacons';
|
|
1614
|
-
}
|
|
1615
1659
|
}, {
|
|
1616
1660
|
key: "CUSTOM_HEADERS",
|
|
1617
1661
|
get: function get() {
|
|
@@ -3295,7 +3339,7 @@ var Radar = (function () {
|
|
|
3295
3339
|
return API_HOST;
|
|
3296
3340
|
}();
|
|
3297
3341
|
|
|
3298
|
-
var SDK_VERSION = '3.1.
|
|
3342
|
+
var SDK_VERSION = '3.1.1';
|
|
3299
3343
|
|
|
3300
3344
|
var Http = /*#__PURE__*/function () {
|
|
3301
3345
|
function Http() {
|
|
@@ -3691,6 +3735,74 @@ var Radar = (function () {
|
|
|
3691
3735
|
|
|
3692
3736
|
return getDistanceToDestination;
|
|
3693
3737
|
}()
|
|
3738
|
+
}, {
|
|
3739
|
+
key: "getMatrixDistances",
|
|
3740
|
+
value: function () {
|
|
3741
|
+
var _getMatrixDistances = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
3742
|
+
var routingOptions,
|
|
3743
|
+
_yield$Navigator$getC2,
|
|
3744
|
+
latitude,
|
|
3745
|
+
longitude,
|
|
3746
|
+
origins,
|
|
3747
|
+
destinations,
|
|
3748
|
+
mode,
|
|
3749
|
+
units,
|
|
3750
|
+
params,
|
|
3751
|
+
_args2 = arguments;
|
|
3752
|
+
|
|
3753
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
3754
|
+
while (1) {
|
|
3755
|
+
switch (_context2.prev = _context2.next) {
|
|
3756
|
+
case 0:
|
|
3757
|
+
routingOptions = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
3758
|
+
|
|
3759
|
+
if (routingOptions.origins) {
|
|
3760
|
+
_context2.next = 8;
|
|
3761
|
+
break;
|
|
3762
|
+
}
|
|
3763
|
+
|
|
3764
|
+
_context2.next = 4;
|
|
3765
|
+
return Navigator.getCurrentPosition();
|
|
3766
|
+
|
|
3767
|
+
case 4:
|
|
3768
|
+
_yield$Navigator$getC2 = _context2.sent;
|
|
3769
|
+
latitude = _yield$Navigator$getC2.latitude;
|
|
3770
|
+
longitude = _yield$Navigator$getC2.longitude;
|
|
3771
|
+
routingOptions.origins = [{
|
|
3772
|
+
latitude: latitude,
|
|
3773
|
+
longitude: longitude
|
|
3774
|
+
}];
|
|
3775
|
+
|
|
3776
|
+
case 8:
|
|
3777
|
+
origins = routingOptions.origins, destinations = routingOptions.destinations, mode = routingOptions.mode, units = routingOptions.units;
|
|
3778
|
+
origins = (origins || []).map(function (origin) {
|
|
3779
|
+
return "".concat(origin.latitude, ",").concat(origin.longitude);
|
|
3780
|
+
}).join('|');
|
|
3781
|
+
destinations = (destinations || []).map(function (destination) {
|
|
3782
|
+
return "".concat(destination.latitude, ",").concat(destination.longitude);
|
|
3783
|
+
}).join('|');
|
|
3784
|
+
params = {
|
|
3785
|
+
origins: origins,
|
|
3786
|
+
destinations: destinations,
|
|
3787
|
+
mode: mode,
|
|
3788
|
+
units: units
|
|
3789
|
+
};
|
|
3790
|
+
return _context2.abrupt("return", Http.request('GET', 'v1/route/matrix', params));
|
|
3791
|
+
|
|
3792
|
+
case 13:
|
|
3793
|
+
case "end":
|
|
3794
|
+
return _context2.stop();
|
|
3795
|
+
}
|
|
3796
|
+
}
|
|
3797
|
+
}, _callee2);
|
|
3798
|
+
}));
|
|
3799
|
+
|
|
3800
|
+
function getMatrixDistances() {
|
|
3801
|
+
return _getMatrixDistances.apply(this, arguments);
|
|
3802
|
+
}
|
|
3803
|
+
|
|
3804
|
+
return getMatrixDistances;
|
|
3805
|
+
}()
|
|
3694
3806
|
}]);
|
|
3695
3807
|
|
|
3696
3808
|
return Routing;
|
|
@@ -4100,11 +4212,11 @@ var Radar = (function () {
|
|
|
4100
4212
|
key: "trackOnce",
|
|
4101
4213
|
value: function () {
|
|
4102
4214
|
var _trackOnce = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
4103
|
-
var
|
|
4104
|
-
_location,
|
|
4215
|
+
var params,
|
|
4105
4216
|
latitude,
|
|
4106
4217
|
longitude,
|
|
4107
4218
|
accuracy,
|
|
4219
|
+
deviceLocation,
|
|
4108
4220
|
deviceId,
|
|
4109
4221
|
userId,
|
|
4110
4222
|
installId,
|
|
@@ -4112,32 +4224,33 @@ var Radar = (function () {
|
|
|
4112
4224
|
description,
|
|
4113
4225
|
metadata,
|
|
4114
4226
|
tripOptions,
|
|
4115
|
-
nearbyBeacons,
|
|
4116
4227
|
body,
|
|
4117
4228
|
basePath,
|
|
4118
4229
|
trackEndpoint,
|
|
4119
4230
|
response,
|
|
4120
4231
|
_args = arguments;
|
|
4121
|
-
|
|
4122
4232
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
4123
4233
|
while (1) {
|
|
4124
4234
|
switch (_context.prev = _context.next) {
|
|
4125
4235
|
case 0:
|
|
4126
|
-
|
|
4236
|
+
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
4237
|
+
latitude = params.latitude, longitude = params.longitude, accuracy = params.accuracy;
|
|
4127
4238
|
|
|
4128
|
-
if (!(!
|
|
4129
|
-
_context.next =
|
|
4239
|
+
if (!(!latitude || !longitude)) {
|
|
4240
|
+
_context.next = 9;
|
|
4130
4241
|
break;
|
|
4131
4242
|
}
|
|
4132
4243
|
|
|
4133
|
-
_context.next =
|
|
4244
|
+
_context.next = 5;
|
|
4134
4245
|
return Navigator.getCurrentPosition();
|
|
4135
4246
|
|
|
4136
|
-
case 4:
|
|
4137
|
-
location = _context.sent;
|
|
4138
|
-
|
|
4139
4247
|
case 5:
|
|
4140
|
-
|
|
4248
|
+
deviceLocation = _context.sent;
|
|
4249
|
+
latitude = deviceLocation.latitude;
|
|
4250
|
+
longitude = deviceLocation.longitude;
|
|
4251
|
+
accuracy = deviceLocation.accuracy;
|
|
4252
|
+
|
|
4253
|
+
case 9:
|
|
4141
4254
|
deviceId = Device.getId();
|
|
4142
4255
|
userId = Cookie.getCookie(Cookie.USER_ID);
|
|
4143
4256
|
installId = Cookie.getCookie(Cookie.INSTALL_ID) || deviceId;
|
|
@@ -4155,13 +4268,7 @@ var Radar = (function () {
|
|
|
4155
4268
|
tripOptions = JSON.parse(tripOptions);
|
|
4156
4269
|
}
|
|
4157
4270
|
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
if (nearbyBeacons) {
|
|
4161
|
-
nearbyBeacons = JSON.parse(nearbyBeacons);
|
|
4162
|
-
}
|
|
4163
|
-
|
|
4164
|
-
body = {
|
|
4271
|
+
body = _objectSpread2({}, params, {
|
|
4165
4272
|
accuracy: accuracy,
|
|
4166
4273
|
description: description,
|
|
4167
4274
|
deviceId: deviceId,
|
|
@@ -4174,20 +4281,23 @@ var Radar = (function () {
|
|
|
4174
4281
|
sdkVersion: SDK_VERSION,
|
|
4175
4282
|
stopped: true,
|
|
4176
4283
|
userId: userId,
|
|
4177
|
-
tripOptions: tripOptions
|
|
4178
|
-
|
|
4179
|
-
};
|
|
4284
|
+
tripOptions: tripOptions
|
|
4285
|
+
});
|
|
4180
4286
|
basePath = Cookie.getCookie(Cookie.BASE_API_PATH) || 'v1';
|
|
4181
4287
|
trackEndpoint = "".concat(basePath, "/track");
|
|
4182
|
-
_context.next =
|
|
4288
|
+
_context.next = 23;
|
|
4183
4289
|
return Http.request('POST', trackEndpoint, body);
|
|
4184
4290
|
|
|
4185
|
-
case
|
|
4291
|
+
case 23:
|
|
4186
4292
|
response = _context.sent;
|
|
4187
|
-
response.location =
|
|
4293
|
+
response.location = {
|
|
4294
|
+
latitude: latitude,
|
|
4295
|
+
longitude: longitude,
|
|
4296
|
+
accuracy: accuracy
|
|
4297
|
+
};
|
|
4188
4298
|
return _context.abrupt("return", response);
|
|
4189
4299
|
|
|
4190
|
-
case
|
|
4300
|
+
case 26:
|
|
4191
4301
|
case "end":
|
|
4192
4302
|
return _context.stop();
|
|
4193
4303
|
}
|
|
@@ -4590,6 +4700,19 @@ var Radar = (function () {
|
|
|
4590
4700
|
}, response);
|
|
4591
4701
|
}).catch(handleError(callback));
|
|
4592
4702
|
}
|
|
4703
|
+
}, {
|
|
4704
|
+
key: "getMatrix",
|
|
4705
|
+
value: function getMatrix(routingOptions) {
|
|
4706
|
+
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultCallback;
|
|
4707
|
+
Routing.getMatrixDistances(routingOptions).then(function (response) {
|
|
4708
|
+
callback(null, {
|
|
4709
|
+
origins: response.origins,
|
|
4710
|
+
destinations: response.destinations,
|
|
4711
|
+
matrix: response.matrix,
|
|
4712
|
+
status: STATUS.SUCCESS
|
|
4713
|
+
}, response);
|
|
4714
|
+
}).catch(handleError(callback));
|
|
4715
|
+
}
|
|
4593
4716
|
}, {
|
|
4594
4717
|
key: "VERSION",
|
|
4595
4718
|
get: function get() {
|
package/dist/radar.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var Radar=function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var n=function(t){return t&&t.Math==Math&&t},l=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")(),f=function(t){try{return!!t()}catch(t){return!0}},a=!f(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i={f:o&&!r.call({1:2},1)?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},u=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},c={}.toString,d=function(t){return c.call(t).slice(8,-1)},s="".split,R=f(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return"String"==d(t)?s.call(t,""):Object(t)}:Object,h=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},p=function(t){return R(h(t))},v=function(t){return"object"==typeof t?null!==t:"function"==typeof t},g=function(t,e){if(!v(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!v(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!v(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!v(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},y={}.hasOwnProperty,E=function(t,e){return y.call(t,e)},m=l.document,S=v(m)&&v(m.createElement),O=function(t){return S?m.createElement(t):{}},x=!a&&!f(function(){return 7!=Object.defineProperty(O("div"),"a",{get:function(){return 7}}).a}),T=Object.getOwnPropertyDescriptor,b={f:a?T:function(t,e){if(t=p(t),e=g(e,!0),x)try{return T(t,e)}catch(t){}if(E(t,e))return u(!i.f.call(t,e),t[e])}},w=function(t){if(!v(t))throw TypeError(String(t)+" is not an object");return t},k=Object.defineProperty,C={f:a?k:function(t,e,n){if(w(t),e=g(e,!0),w(n),x)try{return k(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},I=a?function(t,e,n){return C.f(t,e,u(1,n))}:function(t,e,n){return t[e]=n,t},_=function(e,n){try{I(l,e,n)}catch(t){l[e]=n}return n},A="__core-js_shared__",P=l[A]||_(A,{}),L=Function.toString;"function"!=typeof P.inspectSource&&(P.inspectSource=function(t){return L.call(t)});var N,j,D,U=P.inspectSource,M=l.WeakMap,G="function"==typeof M&&/native code/.test(U(M)),H=e(function(t){(t.exports=function(t,e){return P[t]||(P[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.4",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})}),B=0,F=Math.random(),q=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++B+F).toString(36)},V=H("keys"),K=function(t){return V[t]||(V[t]=q(t))},Y={},$=l.WeakMap;if(G){var W=new $,J=W.get,z=W.has,Q=W.set;N=function(t,e){return Q.call(W,t,e),e},j=function(t){return J.call(W,t)||{}},D=function(t){return z.call(W,t)}}else{var X=K("state");Y[X]=!0,N=function(t,e){return I(t,X,e),e},j=function(t){return E(t,X)?t[X]:{}},D=function(t){return E(t,X)}}var Z={set:N,get:j,has:D,enforce:function(t){return D(t)?j(t):N(t,{})},getterFor:function(n){return function(t){var e;if(!v(t)||(e=j(t)).type!==n)throw TypeError("Incompatible receiver, "+n+" required");return e}}},tt=e(function(t){var e=Z.get,u=Z.enforce,c=String(String).split("String");(t.exports=function(t,e,n,r){var o=!!r&&!!r.unsafe,i=!!r&&!!r.enumerable,a=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof e||E(n,"name")||I(n,"name",e),u(n).source=c.join("string"==typeof e?e:"")),t!==l?(o?!a&&t[e]&&(i=!0):delete t[e],i?t[e]=n:I(t,e,n)):i?t[e]=n:_(e,n)})(Function.prototype,"toString",function(){return"function"==typeof this&&e(this).source||U(this)})}),et=l,nt=function(t){return"function"==typeof t?t:void 0},rt=function(t,e){return arguments.length<2?nt(et[t])||nt(l[t]):et[t]&&et[t][e]||l[t]&&l[t][e]},ot=Math.ceil,it=Math.floor,at=function(t){return isNaN(t=+t)?0:(0<t?it:ot)(t)},ut=Math.min,ct=function(t){return 0<t?ut(at(t),9007199254740991):0},st=Math.max,lt=Math.min,ft=function(s){return function(t,e,n){var r,o,i,a=p(t),u=ct(a.length),c=(r=u,(o=at(n))<0?st(o+r,0):lt(o,r));if(s&&e!=e){for(;c<u;)if((i=a[c++])!=i)return!0}else for(;c<u;c++)if((s||c in a)&&a[c]===e)return s||c||0;return!s&&-1}},pt={includes:ft(!0),indexOf:ft(!1)},dt=pt.indexOf,ht=function(t,e){var n,r=p(t),o=0,i=[];for(n in r)!E(Y,n)&&E(r,n)&&i.push(n);for(;e.length>o;)E(r,n=e[o++])&&(~dt(i,n)||i.push(n));return i},vt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],gt=vt.concat("length","prototype"),yt={f:Object.getOwnPropertyNames||function(t){return ht(t,gt)}},Et={f:Object.getOwnPropertySymbols},mt=rt("Reflect","ownKeys")||function(t){var e=yt.f(w(t)),n=Et.f;return n?e.concat(n(t)):e},Rt=function(t,e){for(var n=mt(e),r=C.f,o=b.f,i=0;i<n.length;i++){var a=n[i];E(t,a)||r(t,a,o(e,a))}},St=/#|\.prototype\./,Ot=function(t,e){var n=Tt[xt(t)];return n==kt||n!=bt&&("function"==typeof e?f(e):!!e)},xt=Ot.normalize=function(t){return String(t).replace(St,".").toLowerCase()},Tt=Ot.data={},bt=Ot.NATIVE="N",kt=Ot.POLYFILL="P",wt=Ot,Ct=b.f,It=function(t,e){var n,r,o,i,a,u=t.target,c=t.global,s=t.stat;if(n=c?l:s?l[u]||_(u,{}):(l[u]||{}).prototype)for(r in e){if(i=e[r],o=t.noTargetGet?(a=Ct(n,r))&&a.value:n[r],!wt(c?r:u+(s?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Rt(i,o)}(t.sham||o&&o.sham)&&I(i,"sham",!0),tt(n,r,i,t)}},_t=function(t){return Object(h(t))},At=Object.keys||function(t){return ht(t,vt)};It({target:"Object",stat:!0,forced:f(function(){At(1)})},{keys:function(t){return At(_t(t))}});var Pt,Lt="\t\n\v\f\r \u2028\u2029\ufeff",Nt="["+Lt+"]",jt=RegExp("^"+Nt+Nt+"*"),Dt=RegExp(Nt+Nt+"*$"),Ut=function(n){return function(t){var e=String(h(t));return 1&n&&(e=e.replace(jt,"")),2&n&&(e=e.replace(Dt,"")),e}},Mt={start:Ut(1),end:Ut(2),trim:Ut(3)},Gt=Mt.trim;function Ht(t){return(Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Bt(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function Ft(u){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=u.apply(t,a);function o(t){Bt(r,e,n,o,i,"next",t)}function i(t){Bt(r,e,n,o,i,"throw",t)}o(void 0)})}}function qt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Kt(t,e,n){return e&&Vt(t.prototype,e),n&&Vt(t,n),t}It({target:"String",proto:!0,forced:(Pt="trim",f(function(){return!!Lt[Pt]()||"
"!="
"[Pt]()||Lt[Pt].name!==Pt}))},{trim:function(){return Gt(this)}});var Yt,$t,Wt=Array.isArray||function(t){return"Array"==d(t)},Jt=function(t,e,n){var r=g(e);r in t?C.f(t,r,u(0,n)):t[r]=n},zt=!!Object.getOwnPropertySymbols&&!f(function(){return!String(Symbol())}),Qt=zt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Xt=H("wks"),Zt=l.Symbol,te=Qt?Zt:Zt&&Zt.withoutSetter||q,ee=function(t){return E(Xt,t)||(zt&&E(Zt,t)?Xt[t]=Zt[t]:Xt[t]=te("Symbol."+t)),Xt[t]},ne=ee("species"),re=function(t,e){var n;return Wt(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!Wt(n.prototype)?v(n)&&null===(n=n[ne])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)},oe=rt("navigator","userAgent")||"",ie=l.process,ae=ie&&ie.versions,ue=ae&&ae.v8;ue?$t=(Yt=ue.split("."))[0]+Yt[1]:oe&&(!(Yt=oe.match(/Edge\/(\d+)/))||74<=Yt[1])&&(Yt=oe.match(/Chrome\/(\d+)/))&&($t=Yt[1]);var ce=$t&&+$t,se=ee("species"),le=function(e){return 51<=ce||!f(function(){var t=[];return(t.constructor={})[se]=function(){return{foo:1}},1!==t[e](Boolean).foo})},fe=ee("isConcatSpreadable"),pe=9007199254740991,de="Maximum allowed index exceeded",he=51<=ce||!f(function(){var t=[];return t[fe]=!1,t.concat()[0]!==t}),ve=le("concat"),ge=function(t){if(!v(t))return!1;var e=t[fe];return void 0!==e?!!e:Wt(t)};It({target:"Array",proto:!0,forced:!he||!ve},{concat:function(t){var e,n,r,o,i,a=_t(this),u=re(a,0),c=0;for(e=-1,r=arguments.length;e<r;e++)if(i=-1===e?a:arguments[e],ge(i)){if(o=ct(i.length),pe<c+o)throw TypeError(de);for(n=0;n<o;n++,c++)n in i&&Jt(u,c,i[n])}else{if(pe<=c)throw TypeError(de);Jt(u,c++,i)}return u.length=c,u}});var ye,Ee=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},me=function(r,o,t){if(Ee(r),void 0===o)return r;switch(t){case 0:return function(){return r.call(o)};case 1:return function(t){return r.call(o,t)};case 2:return function(t,e){return r.call(o,t,e)};case 3:return function(t,e,n){return r.call(o,t,e,n)}}return function(){return r.apply(o,arguments)}},Re=[].push,Se=function(d){var h=1==d,v=2==d,g=3==d,y=4==d,E=6==d,m=5==d||E;return function(t,e,n,r){for(var o,i,a=_t(t),u=R(a),c=me(e,n,3),s=ct(u.length),l=0,f=r||re,p=h?f(t,s):v?f(t,0):void 0;l<s;l++)if((m||l in u)&&(i=c(o=u[l],l,a),d))if(h)p[l]=i;else if(i)switch(d){case 3:return!0;case 5:return o;case 6:return l;case 2:Re.call(p,o)}else if(y)return!1;return E?-1:g||y?y:p}},Oe={forEach:Se(0),map:Se(1),filter:Se(2),some:Se(3),every:Se(4),find:Se(5),findIndex:Se(6)},xe=a?Object.defineProperties:function(t,e){w(t);for(var n,r=At(e),o=r.length,i=0;i<o;)C.f(t,n=r[i++],e[n]);return t},Te=rt("document","documentElement"),be="prototype",ke="script",we=K("IE_PROTO"),Ce=function(){},Ie=function(t){return"<script>"+t+"</"+ke+">"},_e=function(){try{ye=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;_e=ye?function(t){t.write(Ie("")),t.close();var e=t.parentWindow.Object;return t=null,e}(ye):((e=O("iframe")).style.display="none",Te.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Ie("document.F=Object")),t.close(),t.F);for(var n=vt.length;n--;)delete _e[be][vt[n]];return _e()};Y[we]=!0;var Ae=Object.create||function(t,e){var n;return null!==t?(Ce[be]=w(t),n=new Ce,Ce[be]=null,n[we]=t):n=_e(),void 0===e?n:xe(n,e)},Pe=ee("unscopables"),Le=Array.prototype;null==Le[Pe]&&C.f(Le,Pe,{configurable:!0,value:Ae(null)});var Ne,je=Object.defineProperty,De={},Ue=function(t){throw t},Me=function(t,e){if(E(De,t))return De[t];e||(e={});var n=[][t],r=!!E(e,"ACCESSORS")&&e.ACCESSORS,o=E(e,0)?e[0]:Ue,i=E(e,1)?e[1]:void 0;return De[t]=!!n&&!f(function(){if(r&&!a)return!0;var t={length:-1};r?je(t,1,{enumerable:!0,get:Ue}):t[1]=1,n.call(t,o,i)})},Ge=Oe.find,He="find",Be=!0,Fe=Me(He);He in[]&&Array(1)[He](function(){Be=!1}),It({target:"Array",proto:!0,forced:Be||!Fe},{find:function(t){return Ge(this,t,1<arguments.length?arguments[1]:void 0)}}),Ne=He,Le[Pe][Ne]=!0;var qe=function(t,e){var n=[][t];return!!n&&f(function(){n.call(null,e||function(){throw 1},1)})},Ve=pt.indexOf,Ke=[].indexOf,Ye=!!Ke&&1/[1].indexOf(1,-0)<0,$e=qe("indexOf"),We=Me("indexOf",{ACCESSORS:!0,1:0});It({target:"Array",proto:!0,forced:Ye||!$e||!We},{indexOf:function(t){return Ye?Ke.apply(this,arguments)||0:Ve(this,t,1<arguments.length?arguments[1]:void 0)}});var Je=function(){var t=w(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e};function ze(t,e){return RegExp(t,e)}var Qe,Xe,Ze={UNSUPPORTED_Y:f(function(){var t=ze("a","y");return t.lastIndex=2,null!=t.exec("abcd")}),BROKEN_CARET:f(function(){var t=ze("^r","gy");return t.lastIndex=2,null!=t.exec("str")})},tn=RegExp.prototype.exec,en=String.prototype.replace,nn=tn,rn=(Qe=/a/,Xe=/b*/g,tn.call(Qe,"a"),tn.call(Xe,"a"),0!==Qe.lastIndex||0!==Xe.lastIndex),on=Ze.UNSUPPORTED_Y||Ze.BROKEN_CARET,an=void 0!==/()??/.exec("")[1];(rn||an||on)&&(nn=function(t){var e,n,r,o,i=this,a=on&&i.sticky,u=Je.call(i),c=i.source,s=0,l=t;return a&&(-1===(u=u.replace("y","")).indexOf("g")&&(u+="g"),l=String(t).slice(i.lastIndex),0<i.lastIndex&&(!i.multiline||i.multiline&&"\n"!==t[i.lastIndex-1])&&(c="(?: "+c+")",l=" "+l,s++),n=new RegExp("^(?:"+c+")",u)),an&&(n=new RegExp("^"+c+"$(?!\\s)",u)),rn&&(e=i.lastIndex),r=tn.call(a?n:i,l),a?r?(r.input=r.input.slice(s),r[0]=r[0].slice(s),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:rn&&r&&(i.lastIndex=i.global?r.index+r[0].length:e),an&&r&&1<r.length&&en.call(r[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)}),r});var un=nn;It({target:"RegExp",proto:!0,forced:/./.exec!==un},{exec:un});var cn=ee("species"),sn=!f(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),ln="$0"==="a".replace(/./,"$0"),fn=ee("replace"),pn=!!/./[fn]&&""===/./[fn]("a","$0"),dn=!f(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}),hn=function(n,t,e,r){var o=ee(n),i=!f(function(){var t={};return t[o]=function(){return 7},7!=""[n](t)}),a=i&&!f(function(){var t=!1,e=/a/;return"split"===n&&((e={constructor:{}}).constructor[cn]=function(){return e},e.flags="",e[o]=/./[o]),e.exec=function(){return t=!0,null},e[o](""),!t});if(!i||!a||"replace"===n&&(!sn||!ln||pn)||"split"===n&&!dn){var u=/./[o],c=e(o,""[n],function(t,e,n,r,o){return e.exec===un?i&&!o?{done:!0,value:u.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}},{REPLACE_KEEPS_$0:ln,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:pn}),s=c[0],l=c[1];tt(String.prototype,n,s),tt(RegExp.prototype,o,2==t?function(t,e){return l.call(t,this,e)}:function(t){return l.call(t,this)})}r&&I(RegExp.prototype[o],"sham",!0)},vn=ee("match"),gn=ee("species"),yn=function(t,e){var n,r=w(t).constructor;return void 0===r||null==(n=w(r)[gn])?e:Ee(n)},En=function(u){return function(t,e){var n,r,o=String(h(t)),i=at(e),a=o.length;return i<0||a<=i?u?"":void 0:(n=o.charCodeAt(i))<55296||56319<n||i+1===a||(r=o.charCodeAt(i+1))<56320||57343<r?u?o.charAt(i):n:u?o.slice(i,i+2):r-56320+(n-55296<<10)+65536}},mn={codeAt:En(!1),charAt:En(!0)}.charAt,Rn=function(t,e,n){return e+(n?mn(t,e).length:1)},Sn=function(t,e){var n=t.exec;if("function"==typeof n){var r=n.call(t,e);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==d(t))throw TypeError("RegExp#exec called on incompatible receiver");return un.call(t,e)},On=[].push,xn=Math.min,Tn=4294967295,bn=!f(function(){return!RegExp(Tn,"y")});hn("split",2,function(o,g,y){var E;return E="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||1<".".split(/()()/).length||"".split(/.?/).length?function(t,e){var n,r,o=String(h(this)),i=void 0===e?Tn:e>>>0;if(0===i)return[];if(void 0===t)return[o];if(!v(n=t)||(void 0!==(r=n[vn])?!r:"RegExp"!=d(n)))return g.call(o,t,i);for(var a,u,c,s=[],l=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),f=0,p=new RegExp(t.source,l+"g");(a=un.call(p,o))&&!(f<(u=p.lastIndex)&&(s.push(o.slice(f,a.index)),1<a.length&&a.index<o.length&&On.apply(s,a.slice(1)),c=a[0].length,f=u,s.length>=i));)p.lastIndex===a.index&&p.lastIndex++;return f===o.length?!c&&p.test("")||s.push(""):s.push(o.slice(f)),s.length>i?s.slice(0,i):s}:"0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:g.call(this,t,e)}:g,[function(t,e){var n=h(this),r=null==t?void 0:t[o];return void 0!==r?r.call(t,n,e):E.call(String(n),t,e)},function(t,e){var n=y(E,t,this,e,E!==g);if(n.done)return n.value;var r=w(t),o=String(this),i=yn(r,RegExp),a=r.unicode,u=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(bn?"y":"g"),c=new i(bn?r:"^(?:"+r.source+")",u),s=void 0===e?Tn:e>>>0;if(0===s)return[];if(0===o.length)return null===Sn(c,o)?[o]:[];for(var l=0,f=0,p=[];f<o.length;){c.lastIndex=bn?f:0;var d,h=Sn(c,bn?o:o.slice(f));if(null===h||(d=xn(ct(c.lastIndex+(bn?0:f)),o.length))===l)f=Rn(o,f,a);else{if(p.push(o.slice(l,f)),p.length===s)return p;for(var v=1;v<=h.length-1;v++)if(p.push(h[v]),p.length===s)return p;f=l=d}}return p.push(o.slice(l)),p}]},!bn);var kn=function(){function t(){qt(this,t)}return Kt(t,null,[{key:"getCookie",value:function(t){if(!document||void 0===document.cookie)return null;var e="".concat(t,"="),n=document.cookie.split(";").find(function(t){return-1!=t.indexOf(e)});return n?n.trim().substring(e.length):null}},{key:"setCookie",value:function(t,e){if(document&&void 0!==!document.cookie&&"string"==typeof e){var n=new Date;n.setFullYear(n.getFullYear()+10);var r="expires=".concat(n.toGMTString());document.cookie="".concat(t,"=").concat(e,";path=/;").concat("samesite=strict",";").concat(r)}}},{key:"deleteCookie",value:function(t){document&&document.cookie&&(document.cookie="".concat(t,"=;expires=Thu, 01-Jan-1970 00:00:01 GMT;path=/"))}},{key:"DESCRIPTION",get:function(){return"radar-description"}},{key:"DEVICE_ID",get:function(){return"radar-deviceId"}},{key:"DEVICE_TYPE",get:function(){return"radar-deviceType"}},{key:"METADATA",get:function(){return"radar-metadata"}},{key:"HOST",get:function(){return"radar-host"}},{key:"PUBLISHABLE_KEY",get:function(){return"radar-publishableKey"}},{key:"USER_ID",get:function(){return"radar-userId"}},{key:"INSTALL_ID",get:function(){return"radar-installId"}},{key:"TRIP_OPTIONS",get:function(){return"radar-trip-options"}},{key:"NEARBY_BEACONS",get:function(){return"radar-nearby-beacons"}},{key:"CUSTOM_HEADERS",get:function(){return"radar-custom-headers"}},{key:"BASE_API_PATH",get:function(){return"radar-base-api-path"}}]),t}(),wn={};wn[ee("toStringTag")]="z";var Cn="[object z]"===String(wn),In=ee("toStringTag"),_n="Arguments"==d(function(){return arguments}()),An=Cn?d:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),In))?n:_n?d(e):"Object"==(r=d(e))&&"function"==typeof e.callee?"Arguments":r},Pn=Cn?{}.toString:function(){return"[object "+An(this)+"]"};Cn||tt(Object.prototype,"toString",Pn,{unsafe:!0});var Ln=l.Promise,Nn=C.f,jn=ee("toStringTag"),Dn=ee("species"),Un={},Mn=ee("iterator"),Gn=Array.prototype,Hn=ee("iterator"),Bn=function(e,t,n,r){try{return r?t(w(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&w(o.call(e)),t}},Fn=e(function(t){var h=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,e,n,r,o){var i,a,u,c,s,l,f,p,d=me(e,n,r?2:1);if(o)i=t;else{if("function"!=typeof(a=function(t){if(null!=t)return t[Hn]||t["@@iterator"]||Un[An(t)]}(t)))throw TypeError("Target is not iterable");if(void 0!==(p=a)&&(Un.Array===p||Gn[Mn]===p)){for(u=0,c=ct(t.length);u<c;u++)if((s=r?d(w(f=t[u])[0],f[1]):d(t[u]))&&s instanceof h)return s;return new h(!1)}i=a.call(t)}for(l=i.next;!(f=l.call(i)).done;)if("object"==typeof(s=Bn(i,d,f.value,r))&&s&&s instanceof h)return s;return new h(!1)}).stop=function(t){return new h(!0,t)}}),qn=ee("iterator"),Vn=!1;try{var Kn=0,Yn={next:function(){return{done:!!Kn++}},return:function(){Vn=!0}};Yn[qn]=function(){return this},Array.from(Yn,function(){throw 2})}catch(t){}var $n,Wn,Jn,zn=/(iphone|ipod|ipad).*applewebkit/i.test(oe),Qn=l.location,Xn=l.setImmediate,Zn=l.clearImmediate,tr=l.process,er=l.MessageChannel,nr=l.Dispatch,rr=0,or={},ir="onreadystatechange",ar=function(t){if(or.hasOwnProperty(t)){var e=or[t];delete or[t],e()}},ur=function(t){return function(){ar(t)}},cr=function(t){ar(t.data)},sr=function(t){l.postMessage(t+"",Qn.protocol+"//"+Qn.host)};Xn&&Zn||(Xn=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return or[++rr]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},$n(rr),rr},Zn=function(t){delete or[t]},"process"==d(tr)?$n=function(t){tr.nextTick(ur(t))}:nr&&nr.now?$n=function(t){nr.now(ur(t))}:er&&!zn?(Jn=(Wn=new er).port2,Wn.port1.onmessage=cr,$n=me(Jn.postMessage,Jn,1)):!l.addEventListener||"function"!=typeof postMessage||l.importScripts||f(sr)?$n=ir in O("script")?function(t){Te.appendChild(O("script"))[ir]=function(){Te.removeChild(this),ar(t)}}:function(t){setTimeout(ur(t),0)}:($n=sr,l.addEventListener("message",cr,!1)));var lr,fr,pr,dr,hr,vr,gr,yr,Er={set:Xn,clear:Zn},mr=b.f,Rr=Er.set,Sr=l.MutationObserver||l.WebKitMutationObserver,Or=l.process,xr=l.Promise,Tr="process"==d(Or),br=mr(l,"queueMicrotask"),kr=br&&br.value;kr||(lr=function(){var t,e;for(Tr&&(t=Or.domain)&&t.exit();fr;){e=fr.fn,fr=fr.next;try{e()}catch(t){throw fr?dr():pr=void 0,t}}pr=void 0,t&&t.enter()},dr=Tr?function(){Or.nextTick(lr)}:Sr&&!zn?(hr=!0,vr=document.createTextNode(""),new Sr(lr).observe(vr,{characterData:!0}),function(){vr.data=hr=!hr}):xr&&xr.resolve?(gr=xr.resolve(void 0),yr=gr.then,function(){yr.call(gr,lr)}):function(){Rr.call(l,lr)});var wr,Cr,Ir,_r,Ar,Pr,Lr,Nr,jr,Dr=kr||function(t){var e={fn:t,next:void 0};pr&&(pr.next=e),fr||(fr=e,dr()),pr=e},Ur=function(t){var n,r;this.promise=new t(function(t,e){if(void 0!==n||void 0!==r)throw TypeError("Bad Promise constructor");n=t,r=e}),this.resolve=Ee(n),this.reject=Ee(r)},Mr={f:function(t){return new Ur(t)}},Gr=function(t,e){if(w(t),v(e)&&e.constructor===t)return e;var n=Mr.f(t);return(0,n.resolve)(e),n.promise},Hr=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Br=Er.set,Fr=ee("species"),qr="Promise",Vr=Z.get,Kr=Z.set,Yr=Z.getterFor(qr),$r=Ln,Wr=l.TypeError,Jr=l.document,zr=l.process,Qr=rt("fetch"),Xr=Mr.f,Zr=Xr,to="process"==d(zr),eo=!!(Jr&&Jr.createEvent&&l.dispatchEvent),no="unhandledrejection",ro=wt(qr,function(){if(!(U($r)!==String($r))){if(66===ce)return!0;if(!to&&"function"!=typeof PromiseRejectionEvent)return!0}if(51<=ce&&/native code/.test($r))return!1;var t=$r.resolve(1),e=function(t){t(function(){},function(){})};return(t.constructor={})[Fr]=e,!(t.then(function(){})instanceof e)}),oo=ro||!function(t,e){if(!e&&!Vn)return!1;var n=!1;try{var r={};r[qn]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}(function(t){$r.all(t).catch(function(){})}),io=function(t){var e;return!(!v(t)||"function"!=typeof(e=t.then))&&e},ao=function(f,p,d){if(!p.notified){p.notified=!0;var h=p.reactions;Dr(function(){for(var t=p.value,e=1==p.state,n=0;h.length>n;){var r,o,i,a=h[n++],u=e?a.ok:a.fail,c=a.resolve,s=a.reject,l=a.domain;try{u?(e||(2===p.rejection&&lo(f,p),p.rejection=1),!0===u?r=t:(l&&l.enter(),r=u(t),l&&(l.exit(),i=!0)),r===a.promise?s(Wr("Promise-chain cycle")):(o=io(r))?o.call(r,c,s):c(r)):s(t)}catch(t){l&&!i&&l.exit(),s(t)}}p.reactions=[],p.notified=!1,d&&!p.rejection&&co(f,p)})}},uo=function(t,e,n){var r,o;eo?((r=Jr.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),l.dispatchEvent(r)):r={promise:e,reason:n},(o=l["on"+t])?o(r):t===no&&function(t,e){var n=l.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)},co=function(n,r){Br.call(l,function(){var t,e=r.value;if(so(r)&&(t=Hr(function(){to?zr.emit("unhandledRejection",e,n):uo(no,n,e)}),r.rejection=to||so(r)?2:1,t.error))throw t.value})},so=function(t){return 1!==t.rejection&&!t.parent},lo=function(t,e){Br.call(l,function(){to?zr.emit("rejectionHandled",t):uo("rejectionhandled",t,e.value)})},fo=function(e,n,r,o){return function(t){e(n,r,t,o)}},po=function(t,e,n,r){e.done||(e.done=!0,r&&(e=r),e.value=n,e.state=2,ao(t,e,!0))},ho=function(n,r,t,e){if(!r.done){r.done=!0,e&&(r=e);try{if(n===t)throw Wr("Promise can't be resolved itself");var o=io(t);o?Dr(function(){var e={done:!1};try{o.call(t,fo(ho,n,e,r),fo(po,n,e,r))}catch(t){po(n,e,t,r)}}):(r.value=t,r.state=1,ao(n,r,!1))}catch(t){po(n,{done:!1},t,r)}}};ro&&($r=function(t){!function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}(this,$r,qr),Ee(t),wr.call(this);var e=Vr(this);try{t(fo(ho,this,e),fo(po,this,e))}catch(t){po(this,e,t)}},(wr=function(t){Kr(this,{type:qr,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(t,e,n){for(var r in e)tt(t,r,e[r],n);return t}($r.prototype,{then:function(t,e){var n=Yr(this),r=Xr(yn(this,$r));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=to?zr.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&ao(this,n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),Cr=function(){var t=new wr,e=Vr(t);this.promise=t,this.resolve=fo(ho,t,e),this.reject=fo(po,t,e)},Mr.f=Xr=function(t){return t===$r||t===Ir?new Cr(t):Zr(t)},"function"==typeof Ln&&(_r=Ln.prototype.then,tt(Ln.prototype,"then",function(t,e){var n=this;return new $r(function(t,e){_r.call(n,t,e)}).then(t,e)},{unsafe:!0}),"function"==typeof Qr&&It({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return Gr($r,Qr.apply(l,arguments))}}))),It({global:!0,wrap:!0,forced:ro},{Promise:$r}),Lr=!(Pr=qr),(Ar=$r)&&!E(Ar=Lr?Ar:Ar.prototype,jn)&&Nn(Ar,jn,{configurable:!0,value:Pr}),Nr=rt(qr),jr=C.f,a&&Nr&&!Nr[Dn]&&jr(Nr,Dn,{configurable:!0,get:function(){return this}}),Ir=rt(qr),It({target:qr,stat:!0,forced:ro},{reject:function(t){var e=Xr(this);return e.reject.call(void 0,t),e.promise}}),It({target:qr,stat:!0,forced:ro},{resolve:function(t){return Gr(this,t)}}),It({target:qr,stat:!0,forced:oo},{all:function(t){var u=this,e=Xr(u),c=e.resolve,s=e.reject,n=Hr(function(){var r=Ee(u.resolve),o=[],i=0,a=1;Fn(t,function(t){var e=i++,n=!1;o.push(void 0),a++,r.call(u,t).then(function(t){n||(n=!0,o[e]=t,--a||c(o))},s)}),--a||c(o)});return n.error&&s(n.value),e.promise},race:function(t){var n=this,r=Xr(n),o=r.reject,e=Hr(function(){var e=Ee(n.resolve);Fn(t,function(t){e.call(n,t).then(r.resolve,o)})});return e.error&&o(e.value),r.promise}});var vo={SUCCESS:"SUCCESS",ERROR_PUBLISHABLE_KEY:"ERROR_PUBLISHABLE_KEY",ERROR_PERMISSIONS:"ERROR_PERMISSIONS",ERROR_LOCATION:"ERROR_LOCATION",ERROR_NETWORK:"ERROR_NETWORK",ERROR_BAD_REQUEST:"ERROR_BAD_REQUEST",ERROR_UNAUTHORIZED:"ERROR_UNAUTHORIZED",ERROR_PAYMENT_REQUIRED:"ERROR_PAYMENT_REQUIRED",ERROR_FORBIDDEN:"ERROR_FORBIDDEN",ERROR_NOT_FOUND:"ERROR_NOT_FOUND",ERROR_RATE_LIMIT:"ERROR_RATE_LIMIT",ERROR_SERVER:"ERROR_SERVER",ERROR_UNKNOWN:"ERROR_UNKNOWN"},go=function(){function t(){qt(this,t)}return Kt(t,null,[{key:"getCurrentPosition",value:function(){return new Promise(function(i,a){if(!navigator||!navigator.geolocation)return a(vo.ERROR_LOCATION);navigator.geolocation.getCurrentPosition(function(t){if(!t||!t.coords)return a(vo.ERROR_LOCATION);var e=t.coords,n=e.latitude,r=e.longitude,o=e.accuracy;return i({latitude:n,longitude:r,accuracy:o})},function(t){return t&&t.code&&1===t.code?a(vo.ERROR_PERMISSIONS):a(vo.ERROR_LOCATION)})})}}]),t}(),yo=(e(function(t){var e=function(a){var c,t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},o=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",r=e.toStringTag||"@@toStringTag";function u(t,e,n,r){var i,a,u,c,o=e&&e.prototype instanceof y?e:y,s=Object.create(o.prototype),l=new w(r||[]);return s._invoke=(i=t,a=n,u=l,c=p,function(t,e){if(c===h)throw new Error("Generator is already running");if(c===v){if("throw"===t)throw e;return I()}for(u.method=t,u.arg=e;;){var n=u.delegate;if(n){var r=T(n,u);if(r){if(r===g)continue;return r}}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if(c===p)throw c=v,u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);c=h;var o=f(i,a,u);if("normal"===o.type){if(c=u.done?v:d,o.arg===g)continue;return{value:o.arg,done:u.done}}"throw"===o.type&&(c=v,u.method="throw",u.arg=o.arg)}}),s}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var p="suspendedStart",d="suspendedYield",h="executing",v="completed",g={};function y(){}function i(){}function s(){}var E={};E[o]=function(){return this};var m=Object.getPrototypeOf,R=m&&m(m(C([])));R&&R!==t&&l.call(R,o)&&(E=R);var S=s.prototype=y.prototype=Object.create(E);function O(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function x(c,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,o){var i=f(c[t],c,n);if("throw"!==i.type){var a=i.arg,u=a.value;return u&&"object"==typeof u&&l.call(u,"__await")?s.resolve(u.__await).then(function(t){e("next",t,r,o)},function(t){e("throw",t,r,o)}):s.resolve(u).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,o)})}o(i.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function T(t,e){var n=t.iterator[e.method];if(n===c){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=c,T(t,e),"throw"===e.method))return g;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,g;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=c),e.delegate=null,g):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function C(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=c,t.done=!0,t};return r.next=r}}return{next:I}}function I(){return{value:c,done:!0}}return i.prototype=S.constructor=s,s.constructor=i,s[r]=i.displayName="GeneratorFunction",a.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===i||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,r in t||(t[r]="GeneratorFunction")),t.prototype=Object.create(S),t},a.awrap=function(t){return{__await:t}},O(x.prototype),x.prototype[n]=function(){return this},a.AsyncIterator=x,a.async=function(t,e,n,r,o){void 0===o&&(o=Promise);var i=new x(u(t,e,n,r),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},O(S),S[r]="Generator",S[o]=function(){return this},S.toString=function(){return"[object Generator]"},a.keys=function(n){var r=[];for(var t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=C,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=c)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return i.type="throw",i.arg=n,r.next=t,e&&(r.method="next",r.arg=c),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=l.call(o,"catchLoc"),u=l.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=c),g}},a}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}),Oe.forEach),Eo=qe("forEach"),mo=Me("forEach"),Ro=Eo&&mo?[].forEach:function(t){return yo(this,t,1<arguments.length?arguments[1]:void 0)};It({target:"Array",proto:!0,forced:[].forEach!=Ro},{forEach:Ro});var So=[].join,Oo=R!=Object,xo=qe("join",",");It({target:"Array",proto:!0,forced:Oo||!xo},{join:function(t){return So.call(p(this),void 0===t?",":t)}});var To=Oe.map,bo=le("map"),ko=Me("map");It({target:"Array",proto:!0,forced:!bo||!ko},{map:function(t){return To(this,t,1<arguments.length?arguments[1]:void 0)}});for(var wo in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var Co=l[wo],Io=Co&&Co.prototype;if(Io&&Io.forEach!==Ro)try{I(Io,"forEach",Ro)}catch(t){Io.forEach=Ro}}var _o=function(){function t(){qt(this,t)}return Kt(t,null,[{key:"getHost",value:function(){return kn.getCookie(kn.HOST)||"https://api.radar.io"}}]),t}(),Ao="3.1.0-beta.8",Po=function(){function t(){qt(this,t)}return Kt(t,null,[{key:"request",value:function(l,f,p){return new Promise(function(e,n){var r=new XMLHttpRequest,t="".concat(_o.getHost(),"/").concat(f),o={};if(Object.keys(p).forEach(function(t){var e=p[t];void 0!==e&&(o[t]=e)}),"GET"===l){var i=Object.keys(o).map(function(t){return"".concat(t,"=").concat(encodeURIComponent(o[t]))});if(0<i.length){var a=i.join("&");t="".concat(t,"?").concat(a)}o=void 0}r.open(l,t,!0);var u=kn.getCookie(kn.PUBLISHABLE_KEY);if(u){r.setRequestHeader("Authorization",u),r.setRequestHeader("Content-Type","application/json"),r.setRequestHeader("X-Radar-Device-Type","Web"),r.setRequestHeader("X-Radar-SDK-Version",Ao);var c=kn.getCookie(kn.CUSTOM_HEADERS);if(c){var s=JSON.parse(c);Object.keys(s).forEach(function(t){r.setRequestHeader(t,s[t])})}r.onload=function(){var t;try{t=JSON.parse(r.response)}catch(t){n(vo.ERROR_SERVER)}200==r.status?e(t):400===r.status?n({httpError:vo.ERROR_BAD_REQUEST,response:t}):401===r.status?n({httpError:vo.ERROR_UNAUTHORIZED,response:t}):402===r.status?n({httpError:vo.ERROR_PAYMENT_REQUIRED,response:t}):403===r.status?n({httpError:vo.ERROR_FORBIDDEN,response:t}):404===r.status?n({httpError:vo.ERROR_NOT_FOUND,response:t}):429===r.status?n({httpError:vo.ERROR_RATE_LIMIT,response:t}):500<=r.status&&r.status<600?n({httpError:vo.ERROR_SERVER,response:t}):n({httpError:vo.ERROR_UNKNOWN,response:t})},r.onerror=function(){n(vo.ERROR_SERVER)},r.timeout=function(){n(vo.ERROR_NETWORK)},r.send(JSON.stringify(o))}else n(vo.ERROR_PUBLISHABLE_KEY)})}}]),t}(),Lo=function(){function t(){qt(this,t)}var e;return Kt(t,null,[{key:"getContext",value:(e=Ft(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<a.length&&void 0!==a[0]?a[0]:{}).latitude&&e.longitude){t.next=5;break}return t.next=4,go.getCurrentPosition();case 4:e=t.sent;case 5:return r=(n=e).latitude,o=n.longitude,i={coordinates:"".concat(r,",").concat(o)},t.abrupt("return",Po.request("GET","v1/context",i));case 8:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),No=function(){function t(){qt(this,t)}var e,n,r;return Kt(t,null,[{key:"geocode",value:(r=Ft(regeneratorRuntime.mark(function t(){var e,n,r,o=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<o.length&&void 0!==o[0]?o[0]:{},n=e.query,r=e.layers,t.abrupt("return",Po.request("GET","v1/geocode/forward",{query:n,layers:r}));case 3:case"end":return t.stop()}},t)})),function(){return r.apply(this,arguments)})},{key:"reverseGeocode",value:(n=Ft(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<s.length&&void 0!==s[0]?s[0]:{}).latitude&&e.longitude){t.next=9;break}return t.next=4,go.getCurrentPosition();case 4:n=t.sent,r=n.latitude,o=n.longitude,e.latitude=r,e.longitude=o;case 9:return i=e.latitude,a=e.longitude,u=e.layers,c={coordinates:"".concat(i,",").concat(a),layers:u},t.abrupt("return",Po.request("GET","v1/geocode/reverse",c));case 12:case"end":return t.stop()}},t)})),function(){return n.apply(this,arguments)})},{key:"ipGeocode",value:(e=Ft(regeneratorRuntime.mark(function t(){var e,n,r=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<r.length&&void 0!==r[0]?r[0]:{},n=e.ip,t.abrupt("return",Po.request("GET","v1/geocode/ip",{ip:n}));case 3:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),jo=function(){function t(){qt(this,t)}var e;return Kt(t,null,[{key:"getDistanceToDestination",value:(e=Ft(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s,l=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<l.length&&void 0!==l[0]?l[0]:{}).origin){t.next=8;break}return t.next=4,go.getCurrentPosition();case 4:n=t.sent,r=n.latitude,o=n.longitude,e.origin={latitude:r,longitude:o};case 8:return i=e.origin,a=e.destination,u=e.modes,c=e.units,i="".concat(i.latitude,",").concat(i.longitude),a&&(a="".concat(a.latitude,",").concat(a.longitude)),u&&(u=u.join(",")),s={origin:i,destination:a,modes:u,units:c},t.abrupt("return",Po.request("GET","v1/route/distance",s));case 14:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Do=function(){function t(){qt(this,t)}var e,n,r;return Kt(t,null,[{key:"searchPlaces",value:(r=Ft(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s,l,f,p=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<p.length&&void 0!==p[0]?p[0]:{}).near){t.next=8;break}return t.next=4,go.getCurrentPosition();case 4:n=t.sent,r=n.latitude,o=n.longitude,e.near={latitude:r,longitude:o};case 8:return i=e.near,a=e.radius,u=e.chains,c=e.categories,s=e.groups,l=e.limit,i="".concat(i.latitude,",").concat(i.longitude),u&&(u=u.join(",")),c&&(c=c.join(",")),s&&(s=s.join(",")),f={near:i,radius:a,chains:u,categories:c,groups:s,limit:l},t.abrupt("return",Po.request("GET","v1/search/places",f));case 15:case"end":return t.stop()}},t)})),function(){return r.apply(this,arguments)})},{key:"searchGeofences",value:(n=Ft(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s,l,f=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<f.length&&void 0!==f[0]?f[0]:{}).near){t.next=8;break}return t.next=4,go.getCurrentPosition();case 4:n=t.sent,r=n.latitude,o=n.longitude,e.near={latitude:r,longitude:o};case 8:return i=e.near,a=e.radius,u=e.tags,c=e.metadata,s=e.limit,i="".concat(i.latitude,",").concat(i.longitude),u&&(u=u.join(",")),l={near:i,radius:a,tags:u,limit:s},c&&Object.keys(c).forEach(function(t){var e="metadata[".concat(t,"]"),n=c[t];l[e]=n}),t.abrupt("return",Po.request("GET","v1/search/geofences",l));case 14:case"end":return t.stop()}},t)})),function(){return n.apply(this,arguments)})},{key:"autocomplete",value:(e=Ft(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=0<s.length&&void 0!==s[0]?s[0]:{},o=r.query,i=r.near,a=r.limit,u=r.layers,(null===(e=i)||void 0===e?void 0:e.latitude)&&(null===(n=i)||void 0===n?void 0:n.longitude)&&(i="".concat(i.latitude,",").concat(i.longitude)),c={query:o,near:i,limit:a,layers:u},t.abrupt("return",Po.request("GET","v1/search/autocomplete",c));case 5:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Uo="toString",Mo=RegExp.prototype,Go=Mo[Uo],Ho=f(function(){return"/a/b"!=Go.call({source:"a",flags:"b"})}),Bo=Go.name!=Uo;(Ho||Bo)&&tt(RegExp.prototype,Uo,function(){var t=w(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(void 0===n&&t instanceof RegExp&&!("flags"in Mo)?Je.call(t):n)},{unsafe:!0});var Fo=Math.max,qo=Math.min,Vo=Math.floor,Ko=/\$([$&'`]|\d\d?|<[^>]*>)/g,Yo=/\$([$&'`]|\d\d?)/g;hn("replace",2,function(o,S,O,t){var x=t.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,T=t.REPLACE_KEEPS_$0,b=x?"$":"$0";return[function(t,e){var n=h(this),r=null==t?void 0:t[o];return void 0!==r?r.call(t,n,e):S.call(String(n),t,e)},function(t,e){if(!x&&T||"string"==typeof e&&-1===e.indexOf(b)){var n=O(S,t,this,e);if(n.done)return n.value}var r=w(t),o=String(this),i="function"==typeof e;i||(e=String(e));var a=r.global;if(a){var u=r.unicode;r.lastIndex=0}for(var c=[];;){var s=Sn(r,o);if(null===s)break;if(c.push(s),!a)break;""===String(s[0])&&(r.lastIndex=Rn(o,ct(r.lastIndex),u))}for(var l,f="",p=0,d=0;d<c.length;d++){s=c[d];for(var h=String(s[0]),v=Fo(qo(at(s.index),o.length),0),g=[],y=1;y<s.length;y++)g.push(void 0===(l=s[y])?l:String(l));var E=s.groups;if(i){var m=[h].concat(g,v,o);void 0!==E&&m.push(E);var R=String(e.apply(void 0,m))}else R=k(h,o,v,g,E,e);p<=v&&(f+=o.slice(p,v)+R,p=v+h.length)}return f+o.slice(p)}];function k(i,a,u,c,s,t){var l=u+i.length,f=c.length,e=Yo;return void 0!==s&&(s=_t(s),e=Ko),S.call(t,e,function(t,e){var n;switch(e.charAt(0)){case"$":return"$";case"&":return i;case"`":return a.slice(0,u);case"'":return a.slice(l);case"<":n=s[e.slice(1,-1)];break;default:var r=+e;if(0===r)return t;if(f<r){var o=Vo(r/10);return 0===o?t:o<=f?void 0===c[o-1]?e.charAt(1):c[o-1]+e.charAt(1):t}n=c[r-1]}return void 0===n?"":n})}});var $o=function(){function t(){qt(this,t)}return Kt(t,null,[{key:"getId",value:function(){var t=kn.getCookie(kn.DEVICE_ID);if(t)return t;var e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)});return kn.setCookie(kn.DEVICE_ID,e),e}}]),t}(),Wo=function(){function t(){qt(this,t)}var e;return Kt(t,null,[{key:"trackOnce",value:(e=Ft(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s,l,f,p,d,h,v,g,y,E=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<E.length&&void 0!==E[0]?E[0]:{}).latitude&&e.longitude){t.next=5;break}return t.next=4,go.getCurrentPosition();case 4:e=t.sent;case 5:return r=(n=e).latitude,o=n.longitude,i=n.accuracy,a=$o.getId(),u=kn.getCookie(kn.USER_ID),c=kn.getCookie(kn.INSTALL_ID)||a,s=kn.getCookie(kn.DEVICE_TYPE)||"Web",l=kn.getCookie(kn.DESCRIPTION),(f=kn.getCookie(kn.METADATA))&&(f=JSON.parse(f)),(p=kn.getCookie(kn.TRIP_OPTIONS))&&(p=JSON.parse(p)),(d=kn.getCookie(kn.NEARBY_BEACONS))&&(d=JSON.parse(d)),h={accuracy:i,description:l,deviceId:a,deviceType:s,foreground:!0,installId:c,latitude:r,longitude:o,metadata:f,sdkVersion:Ao,stopped:!0,userId:u,tripOptions:p,nearbyBeacons:d},v=kn.getCookie(kn.BASE_API_PATH)||"v1",g="".concat(v,"/track"),t.next=22,Po.request("POST",g,h);case 22:return(y=t.sent).location=e,t.abrupt("return",y);case 25:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Jo=function(){function t(){qt(this,t)}var e;return Kt(t,null,[{key:"updateTrip",value:(e=Ft(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s,l=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<l.length&&void 0!==l[0]?l[0]:{},n=1<l.length?l[1]:void 0,r=e.externalId,o=e.destinationGeofenceTag,i=e.destinationGeofenceExternalId,a=e.mode,u=e.metadata,c={externalId:r,status:n,destinationGeofenceTag:o,destinationGeofenceExternalId:i,mode:a,metadata:u},s=kn.getCookie(kn.BASE_API_PATH)||"v1",t.abrupt("return",Po.request("PATCH","".concat(s,"/trips/").concat(r),c));case 6:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),zo="started",Qo="completed",Xo="canceled",Zo=function(){},ti=function(e){return function(t){"string"!=typeof t?"object"===Ht(t)&&t.httpError?e(t.httpError,{},t.response):e(vo.ERROR_UNKNOWN,{}):e(t,{})}};return function(){function n(){qt(this,n)}return Kt(n,null,[{key:"initialize",value:function(t){t||console.error('Radar "initialize" was called without a publishable key'),kn.setCookie(kn.PUBLISHABLE_KEY,t)}},{key:"setHost",value:function(t,e){kn.setCookie(kn.HOST,t,!0),kn.setCookie(kn.BASE_API_PATH,e)}},{key:"setUserId",value:function(t){t?kn.setCookie(kn.USER_ID,String(t).trim()):kn.deleteCookie(kn.USER_ID)}},{key:"setDeviceId",value:function(t,e){t?kn.setCookie(kn.DEVICE_ID,String(t).trim()):kn.deleteCookie(kn.DEVICE_ID),e?kn.setCookie(kn.INSTALL_ID,String(e).trim()):kn.deleteCookie(kn.INSTALL_ID)}},{key:"setDescription",value:function(t){t?kn.setCookie(kn.DESCRIPTION,String(t).trim()):kn.deleteCookie(kn.DESCRIPTION)}},{key:"setMetadata",value:function(t){t?kn.setCookie(kn.METADATA,JSON.stringify(t)):kn.deleteCookie(kn.METADATA)}},{key:"setRequestHeaders",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};Object.keys(t).length?kn.setCookie(kn.CUSTOM_HEADERS,JSON.stringify(t)):kn.deleteCookie(kn.CUSTOM_HEADERS)}},{key:"getLocation",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Zo;go.getCurrentPosition().then(function(t){e(null,{location:t,status:vo.SUCCESS})}).catch(ti(e))}},{key:"trackOnce",value:function(t){var e,n,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Zo;e="function"==typeof t?t:(n=t,r),Wo.trackOnce(n).then(function(t){e(null,{location:t.location,user:t.user,events:t.events,status:vo.SUCCESS},t)}).catch(ti(e))}},{key:"getContext",value:function(t){var e,n,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Zo;e="function"==typeof t?t:(n=t,r),Lo.getContext(n).then(function(t){e(null,{context:t.context,status:vo.SUCCESS},t)}).catch(ti(e))}},{key:"startTrip",value:function(e){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Zo;Jo.updateTrip(e,zo).then(function(t){kn.setCookie(kn.TRIP_OPTIONS,JSON.stringify(e)),n(null,{trip:t.trip,events:t.events,status:vo.SUCCESS},t)}).catch(ti(n))}},{key:"updateTrip",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:Zo;Jo.updateTrip(e,t).then(function(t){kn.setCookie(kn.TRIP_OPTIONS,JSON.stringify(e)),n(null,{trip:t.trip,events:t.events,status:vo.SUCCESS},t)}).catch(ti(n))}},{key:"completeTrip",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Zo,t=n.getTripOptions();Jo.updateTrip(t,Qo).then(function(t){kn.deleteCookie(kn.TRIP_OPTIONS),e(null,{trip:t.trip,events:t.events,status:vo.SUCCESS},t)}).catch(ti(e))}},{key:"cancelTrip",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Zo,t=n.getTripOptions();Jo.updateTrip(t,Xo).then(function(t){kn.deleteCookie(kn.TRIP_OPTIONS),e(null,{trip:t.trip,events:t.events,status:vo.SUCCESS},t)}).catch(ti(e))}},{key:"getTripOptions",value:function(){var t=kn.getCookie(kn.TRIP_OPTIONS);return t&&(t=JSON.parse(t)),t}},{key:"searchPlaces",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Zo;Do.searchPlaces(t).then(function(t){e(null,{places:t.places,status:vo.SUCCESS},t)}).catch(ti(e))}},{key:"searchGeofences",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Zo;Do.searchGeofences(t).then(function(t){e(null,{geofences:t.geofences,status:vo.SUCCESS},t)}).catch(ti(e))}},{key:"autocomplete",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Zo;Do.autocomplete(t).then(function(t){e(null,{addresses:t.addresses,status:vo.SUCCESS},t)}).catch(ti(e))}},{key:"geocode",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Zo;No.geocode(t).then(function(t){e(null,{addresses:t.addresses,staus:vo.SUCCESS},t)}).catch(ti(e))}},{key:"reverseGeocode",value:function(t){var e,n,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Zo;e="function"==typeof t?t:(n=t,r),No.reverseGeocode(n).then(function(t){e(null,{addresses:t.addresses,status:vo.SUCCESS},t)}).catch(ti(e))}},{key:"ipGeocode",value:function(t){var e,n,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Zo;"function"==typeof t?e=t:"object"===Ht(t)&&(n=t,e=r),No.ipGeocode(n).then(function(t){e(null,{address:t.address,status:vo.SUCCESS},t)}).catch(ti(e))}},{key:"getDistance",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Zo;jo.getDistanceToDestination(t).then(function(t){e(null,{routes:t.routes,status:vo.SUCCESS},t)}).catch(ti(e))}},{key:"VERSION",get:function(){return Ao}},{key:"STATUS",get:function(){return vo}}]),n}()}();
|
|
1
|
+
var Radar=function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var n=function(t){return t&&t.Math==Math&&t},l=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")(),f=function(t){try{return!!t()}catch(t){return!0}},a=!f(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i={f:o&&!r.call({1:2},1)?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},u=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},c={}.toString,d=function(t){return c.call(t).slice(8,-1)},s="".split,R=f(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return"String"==d(t)?s.call(t,""):Object(t)}:Object,h=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},p=function(t){return R(h(t))},v=function(t){return"object"==typeof t?null!==t:"function"==typeof t},g=function(t,e){if(!v(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!v(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!v(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!v(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},y={}.hasOwnProperty,E=function(t,e){return y.call(t,e)},m=l.document,S=v(m)&&v(m.createElement),O=function(t){return S?m.createElement(t):{}},x=!a&&!f(function(){return 7!=Object.defineProperty(O("div"),"a",{get:function(){return 7}}).a}),b=Object.getOwnPropertyDescriptor,T={f:a?b:function(t,e){if(t=p(t),e=g(e,!0),x)try{return b(t,e)}catch(t){}if(E(t,e))return u(!i.f.call(t,e),t[e])}},w=function(t){if(!v(t))throw TypeError(String(t)+" is not an object");return t},k=Object.defineProperty,C={f:a?k:function(t,e,n){if(w(t),e=g(e,!0),w(n),x)try{return k(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},I=a?function(t,e,n){return C.f(t,e,u(1,n))}:function(t,e,n){return t[e]=n,t},_=function(e,n){try{I(l,e,n)}catch(t){l[e]=n}return n},P="__core-js_shared__",A=l[P]||_(P,{}),j=Function.toString;"function"!=typeof A.inspectSource&&(A.inspectSource=function(t){return j.call(t)});var L,N,D,U=A.inspectSource,M=l.WeakMap,G="function"==typeof M&&/native code/.test(U(M)),H=e(function(t){(t.exports=function(t,e){return A[t]||(A[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.4",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})}),B=0,F=Math.random(),q=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++B+F).toString(36)},V=H("keys"),K=function(t){return V[t]||(V[t]=q(t))},Y={},$=l.WeakMap;if(G){var W=new $,J=W.get,z=W.has,Q=W.set;L=function(t,e){return Q.call(W,t,e),e},N=function(t){return J.call(W,t)||{}},D=function(t){return z.call(W,t)}}else{var X=K("state");Y[X]=!0,L=function(t,e){return I(t,X,e),e},N=function(t){return E(t,X)?t[X]:{}},D=function(t){return E(t,X)}}var Z={set:L,get:N,has:D,enforce:function(t){return D(t)?N(t):L(t,{})},getterFor:function(n){return function(t){var e;if(!v(t)||(e=N(t)).type!==n)throw TypeError("Incompatible receiver, "+n+" required");return e}}},tt=e(function(t){var e=Z.get,u=Z.enforce,c=String(String).split("String");(t.exports=function(t,e,n,r){var o=!!r&&!!r.unsafe,i=!!r&&!!r.enumerable,a=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof e||E(n,"name")||I(n,"name",e),u(n).source=c.join("string"==typeof e?e:"")),t!==l?(o?!a&&t[e]&&(i=!0):delete t[e],i?t[e]=n:I(t,e,n)):i?t[e]=n:_(e,n)})(Function.prototype,"toString",function(){return"function"==typeof this&&e(this).source||U(this)})}),et=l,nt=function(t){return"function"==typeof t?t:void 0},rt=function(t,e){return arguments.length<2?nt(et[t])||nt(l[t]):et[t]&&et[t][e]||l[t]&&l[t][e]},ot=Math.ceil,it=Math.floor,at=function(t){return isNaN(t=+t)?0:(0<t?it:ot)(t)},ut=Math.min,ct=function(t){return 0<t?ut(at(t),9007199254740991):0},st=Math.max,lt=Math.min,ft=function(s){return function(t,e,n){var r,o,i,a=p(t),u=ct(a.length),c=(r=u,(o=at(n))<0?st(o+r,0):lt(o,r));if(s&&e!=e){for(;c<u;)if((i=a[c++])!=i)return!0}else for(;c<u;c++)if((s||c in a)&&a[c]===e)return s||c||0;return!s&&-1}},pt={includes:ft(!0),indexOf:ft(!1)},dt=pt.indexOf,ht=function(t,e){var n,r=p(t),o=0,i=[];for(n in r)!E(Y,n)&&E(r,n)&&i.push(n);for(;e.length>o;)E(r,n=e[o++])&&(~dt(i,n)||i.push(n));return i},vt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],gt=vt.concat("length","prototype"),yt={f:Object.getOwnPropertyNames||function(t){return ht(t,gt)}},Et={f:Object.getOwnPropertySymbols},mt=rt("Reflect","ownKeys")||function(t){var e=yt.f(w(t)),n=Et.f;return n?e.concat(n(t)):e},Rt=function(t,e){for(var n=mt(e),r=C.f,o=T.f,i=0;i<n.length;i++){var a=n[i];E(t,a)||r(t,a,o(e,a))}},St=/#|\.prototype\./,Ot=function(t,e){var n=bt[xt(t)];return n==kt||n!=Tt&&("function"==typeof e?f(e):!!e)},xt=Ot.normalize=function(t){return String(t).replace(St,".").toLowerCase()},bt=Ot.data={},Tt=Ot.NATIVE="N",kt=Ot.POLYFILL="P",wt=Ot,Ct=T.f,It=function(t,e){var n,r,o,i,a,u=t.target,c=t.global,s=t.stat;if(n=c?l:s?l[u]||_(u,{}):(l[u]||{}).prototype)for(r in e){if(i=e[r],o=t.noTargetGet?(a=Ct(n,r))&&a.value:n[r],!wt(c?r:u+(s?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Rt(i,o)}(t.sham||o&&o.sham)&&I(i,"sham",!0),tt(n,r,i,t)}},_t=function(t){return Object(h(t))},Pt=Object.keys||function(t){return ht(t,vt)};It({target:"Object",stat:!0,forced:f(function(){Pt(1)})},{keys:function(t){return Pt(_t(t))}});var At,jt="\t\n\v\f\r \u2028\u2029\ufeff",Lt="["+jt+"]",Nt=RegExp("^"+Lt+Lt+"*"),Dt=RegExp(Lt+Lt+"*$"),Ut=function(n){return function(t){var e=String(h(t));return 1&n&&(e=e.replace(Nt,"")),2&n&&(e=e.replace(Dt,"")),e}},Mt={start:Ut(1),end:Ut(2),trim:Ut(3)},Gt=Mt.trim;function Ht(t){return(Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Bt(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function Ft(u){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=u.apply(t,a);function o(t){Bt(r,e,n,o,i,"next",t)}function i(t){Bt(r,e,n,o,i,"throw",t)}o(void 0)})}}function qt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Kt(t,e,n){return e&&Vt(t.prototype,e),n&&Vt(t,n),t}function Yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $t(o){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Yt(Object(i),!0).forEach(function(t){var e,n,r;e=o,r=i[n=t],n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):Yt(Object(i)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(i,t))})}return o}It({target:"String",proto:!0,forced:(At="trim",f(function(){return!!jt[At]()||"
"!="
"[At]()||jt[At].name!==At}))},{trim:function(){return Gt(this)}});var Wt,Jt,zt=Array.isArray||function(t){return"Array"==d(t)},Qt=function(t,e,n){var r=g(e);r in t?C.f(t,r,u(0,n)):t[r]=n},Xt=!!Object.getOwnPropertySymbols&&!f(function(){return!String(Symbol())}),Zt=Xt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,te=H("wks"),ee=l.Symbol,ne=Zt?ee:ee&&ee.withoutSetter||q,re=function(t){return E(te,t)||(Xt&&E(ee,t)?te[t]=ee[t]:te[t]=ne("Symbol."+t)),te[t]},oe=re("species"),ie=function(t,e){var n;return zt(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!zt(n.prototype)?v(n)&&null===(n=n[oe])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)},ae=rt("navigator","userAgent")||"",ue=l.process,ce=ue&&ue.versions,se=ce&&ce.v8;se?Jt=(Wt=se.split("."))[0]+Wt[1]:ae&&(!(Wt=ae.match(/Edge\/(\d+)/))||74<=Wt[1])&&(Wt=ae.match(/Chrome\/(\d+)/))&&(Jt=Wt[1]);var le=Jt&&+Jt,fe=re("species"),pe=function(e){return 51<=le||!f(function(){var t=[];return(t.constructor={})[fe]=function(){return{foo:1}},1!==t[e](Boolean).foo})},de=re("isConcatSpreadable"),he=9007199254740991,ve="Maximum allowed index exceeded",ge=51<=le||!f(function(){var t=[];return t[de]=!1,t.concat()[0]!==t}),ye=pe("concat"),Ee=function(t){if(!v(t))return!1;var e=t[de];return void 0!==e?!!e:zt(t)};It({target:"Array",proto:!0,forced:!ge||!ye},{concat:function(t){var e,n,r,o,i,a=_t(this),u=ie(a,0),c=0;for(e=-1,r=arguments.length;e<r;e++)if(i=-1===e?a:arguments[e],Ee(i)){if(o=ct(i.length),he<c+o)throw TypeError(ve);for(n=0;n<o;n++,c++)n in i&&Qt(u,c,i[n])}else{if(he<=c)throw TypeError(ve);Qt(u,c++,i)}return u.length=c,u}});var me,Re=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},Se=function(r,o,t){if(Re(r),void 0===o)return r;switch(t){case 0:return function(){return r.call(o)};case 1:return function(t){return r.call(o,t)};case 2:return function(t,e){return r.call(o,t,e)};case 3:return function(t,e,n){return r.call(o,t,e,n)}}return function(){return r.apply(o,arguments)}},Oe=[].push,xe=function(d){var h=1==d,v=2==d,g=3==d,y=4==d,E=6==d,m=5==d||E;return function(t,e,n,r){for(var o,i,a=_t(t),u=R(a),c=Se(e,n,3),s=ct(u.length),l=0,f=r||ie,p=h?f(t,s):v?f(t,0):void 0;l<s;l++)if((m||l in u)&&(i=c(o=u[l],l,a),d))if(h)p[l]=i;else if(i)switch(d){case 3:return!0;case 5:return o;case 6:return l;case 2:Oe.call(p,o)}else if(y)return!1;return E?-1:g||y?y:p}},be={forEach:xe(0),map:xe(1),filter:xe(2),some:xe(3),every:xe(4),find:xe(5),findIndex:xe(6)},Te=a?Object.defineProperties:function(t,e){w(t);for(var n,r=Pt(e),o=r.length,i=0;i<o;)C.f(t,n=r[i++],e[n]);return t},ke=rt("document","documentElement"),we="prototype",Ce="script",Ie=K("IE_PROTO"),_e=function(){},Pe=function(t){return"<script>"+t+"</"+Ce+">"},Ae=function(){try{me=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;Ae=me?function(t){t.write(Pe("")),t.close();var e=t.parentWindow.Object;return t=null,e}(me):((e=O("iframe")).style.display="none",ke.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Pe("document.F=Object")),t.close(),t.F);for(var n=vt.length;n--;)delete Ae[we][vt[n]];return Ae()};Y[Ie]=!0;var je=Object.create||function(t,e){var n;return null!==t?(_e[we]=w(t),n=new _e,_e[we]=null,n[Ie]=t):n=Ae(),void 0===e?n:Te(n,e)},Le=re("unscopables"),Ne=Array.prototype;null==Ne[Le]&&C.f(Ne,Le,{configurable:!0,value:je(null)});var De,Ue=Object.defineProperty,Me={},Ge=function(t){throw t},He=function(t,e){if(E(Me,t))return Me[t];e||(e={});var n=[][t],r=!!E(e,"ACCESSORS")&&e.ACCESSORS,o=E(e,0)?e[0]:Ge,i=E(e,1)?e[1]:void 0;return Me[t]=!!n&&!f(function(){if(r&&!a)return!0;var t={length:-1};r?Ue(t,1,{enumerable:!0,get:Ge}):t[1]=1,n.call(t,o,i)})},Be=be.find,Fe="find",qe=!0,Ve=He(Fe);Fe in[]&&Array(1)[Fe](function(){qe=!1}),It({target:"Array",proto:!0,forced:qe||!Ve},{find:function(t){return Be(this,t,1<arguments.length?arguments[1]:void 0)}}),De=Fe,Ne[Le][De]=!0;var Ke=function(t,e){var n=[][t];return!!n&&f(function(){n.call(null,e||function(){throw 1},1)})},Ye=pt.indexOf,$e=[].indexOf,We=!!$e&&1/[1].indexOf(1,-0)<0,Je=Ke("indexOf"),ze=He("indexOf",{ACCESSORS:!0,1:0});It({target:"Array",proto:!0,forced:We||!Je||!ze},{indexOf:function(t){return We?$e.apply(this,arguments)||0:Ye(this,t,1<arguments.length?arguments[1]:void 0)}});var Qe=function(){var t=w(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e};function Xe(t,e){return RegExp(t,e)}var Ze,tn,en={UNSUPPORTED_Y:f(function(){var t=Xe("a","y");return t.lastIndex=2,null!=t.exec("abcd")}),BROKEN_CARET:f(function(){var t=Xe("^r","gy");return t.lastIndex=2,null!=t.exec("str")})},nn=RegExp.prototype.exec,rn=String.prototype.replace,on=nn,an=(Ze=/a/,tn=/b*/g,nn.call(Ze,"a"),nn.call(tn,"a"),0!==Ze.lastIndex||0!==tn.lastIndex),un=en.UNSUPPORTED_Y||en.BROKEN_CARET,cn=void 0!==/()??/.exec("")[1];(an||cn||un)&&(on=function(t){var e,n,r,o,i=this,a=un&&i.sticky,u=Qe.call(i),c=i.source,s=0,l=t;return a&&(-1===(u=u.replace("y","")).indexOf("g")&&(u+="g"),l=String(t).slice(i.lastIndex),0<i.lastIndex&&(!i.multiline||i.multiline&&"\n"!==t[i.lastIndex-1])&&(c="(?: "+c+")",l=" "+l,s++),n=new RegExp("^(?:"+c+")",u)),cn&&(n=new RegExp("^"+c+"$(?!\\s)",u)),an&&(e=i.lastIndex),r=nn.call(a?n:i,l),a?r?(r.input=r.input.slice(s),r[0]=r[0].slice(s),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:an&&r&&(i.lastIndex=i.global?r.index+r[0].length:e),cn&&r&&1<r.length&&rn.call(r[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)}),r});var sn=on;It({target:"RegExp",proto:!0,forced:/./.exec!==sn},{exec:sn});var ln=re("species"),fn=!f(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),pn="$0"==="a".replace(/./,"$0"),dn=re("replace"),hn=!!/./[dn]&&""===/./[dn]("a","$0"),vn=!f(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}),gn=function(n,t,e,r){var o=re(n),i=!f(function(){var t={};return t[o]=function(){return 7},7!=""[n](t)}),a=i&&!f(function(){var t=!1,e=/a/;return"split"===n&&((e={constructor:{}}).constructor[ln]=function(){return e},e.flags="",e[o]=/./[o]),e.exec=function(){return t=!0,null},e[o](""),!t});if(!i||!a||"replace"===n&&(!fn||!pn||hn)||"split"===n&&!vn){var u=/./[o],c=e(o,""[n],function(t,e,n,r,o){return e.exec===sn?i&&!o?{done:!0,value:u.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}},{REPLACE_KEEPS_$0:pn,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:hn}),s=c[0],l=c[1];tt(String.prototype,n,s),tt(RegExp.prototype,o,2==t?function(t,e){return l.call(t,this,e)}:function(t){return l.call(t,this)})}r&&I(RegExp.prototype[o],"sham",!0)},yn=re("match"),En=re("species"),mn=function(t,e){var n,r=w(t).constructor;return void 0===r||null==(n=w(r)[En])?e:Re(n)},Rn=function(u){return function(t,e){var n,r,o=String(h(t)),i=at(e),a=o.length;return i<0||a<=i?u?"":void 0:(n=o.charCodeAt(i))<55296||56319<n||i+1===a||(r=o.charCodeAt(i+1))<56320||57343<r?u?o.charAt(i):n:u?o.slice(i,i+2):r-56320+(n-55296<<10)+65536}},Sn={codeAt:Rn(!1),charAt:Rn(!0)}.charAt,On=function(t,e,n){return e+(n?Sn(t,e).length:1)},xn=function(t,e){var n=t.exec;if("function"==typeof n){var r=n.call(t,e);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==d(t))throw TypeError("RegExp#exec called on incompatible receiver");return sn.call(t,e)},bn=[].push,Tn=Math.min,kn=4294967295,wn=!f(function(){return!RegExp(kn,"y")});gn("split",2,function(o,g,y){var E;return E="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||1<".".split(/()()/).length||"".split(/.?/).length?function(t,e){var n,r,o=String(h(this)),i=void 0===e?kn:e>>>0;if(0===i)return[];if(void 0===t)return[o];if(!v(n=t)||(void 0!==(r=n[yn])?!r:"RegExp"!=d(n)))return g.call(o,t,i);for(var a,u,c,s=[],l=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),f=0,p=new RegExp(t.source,l+"g");(a=sn.call(p,o))&&!(f<(u=p.lastIndex)&&(s.push(o.slice(f,a.index)),1<a.length&&a.index<o.length&&bn.apply(s,a.slice(1)),c=a[0].length,f=u,s.length>=i));)p.lastIndex===a.index&&p.lastIndex++;return f===o.length?!c&&p.test("")||s.push(""):s.push(o.slice(f)),s.length>i?s.slice(0,i):s}:"0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:g.call(this,t,e)}:g,[function(t,e){var n=h(this),r=null==t?void 0:t[o];return void 0!==r?r.call(t,n,e):E.call(String(n),t,e)},function(t,e){var n=y(E,t,this,e,E!==g);if(n.done)return n.value;var r=w(t),o=String(this),i=mn(r,RegExp),a=r.unicode,u=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(wn?"y":"g"),c=new i(wn?r:"^(?:"+r.source+")",u),s=void 0===e?kn:e>>>0;if(0===s)return[];if(0===o.length)return null===xn(c,o)?[o]:[];for(var l=0,f=0,p=[];f<o.length;){c.lastIndex=wn?f:0;var d,h=xn(c,wn?o:o.slice(f));if(null===h||(d=Tn(ct(c.lastIndex+(wn?0:f)),o.length))===l)f=On(o,f,a);else{if(p.push(o.slice(l,f)),p.length===s)return p;for(var v=1;v<=h.length-1;v++)if(p.push(h[v]),p.length===s)return p;f=l=d}}return p.push(o.slice(l)),p}]},!wn);var Cn=function(){function t(){qt(this,t)}return Kt(t,null,[{key:"getCookie",value:function(t){if(!document||void 0===document.cookie)return null;var e="".concat(t,"="),n=document.cookie.split(";").find(function(t){return-1!=t.indexOf(e)});return n?n.trim().substring(e.length):null}},{key:"setCookie",value:function(t,e){if(document&&void 0!==!document.cookie&&"string"==typeof e){var n=new Date;n.setFullYear(n.getFullYear()+10);var r="expires=".concat(n.toGMTString());document.cookie="".concat(t,"=").concat(e,";path=/;").concat("samesite=strict",";").concat(r)}}},{key:"deleteCookie",value:function(t){document&&document.cookie&&(document.cookie="".concat(t,"=;expires=Thu, 01-Jan-1970 00:00:01 GMT;path=/"))}},{key:"DESCRIPTION",get:function(){return"radar-description"}},{key:"DEVICE_ID",get:function(){return"radar-deviceId"}},{key:"DEVICE_TYPE",get:function(){return"radar-deviceType"}},{key:"METADATA",get:function(){return"radar-metadata"}},{key:"HOST",get:function(){return"radar-host"}},{key:"PUBLISHABLE_KEY",get:function(){return"radar-publishableKey"}},{key:"USER_ID",get:function(){return"radar-userId"}},{key:"INSTALL_ID",get:function(){return"radar-installId"}},{key:"TRIP_OPTIONS",get:function(){return"radar-trip-options"}},{key:"CUSTOM_HEADERS",get:function(){return"radar-custom-headers"}},{key:"BASE_API_PATH",get:function(){return"radar-base-api-path"}}]),t}(),In={};In[re("toStringTag")]="z";var _n="[object z]"===String(In),Pn=re("toStringTag"),An="Arguments"==d(function(){return arguments}()),jn=_n?d:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Pn))?n:An?d(e):"Object"==(r=d(e))&&"function"==typeof e.callee?"Arguments":r},Ln=_n?{}.toString:function(){return"[object "+jn(this)+"]"};_n||tt(Object.prototype,"toString",Ln,{unsafe:!0});var Nn=l.Promise,Dn=C.f,Un=re("toStringTag"),Mn=re("species"),Gn={},Hn=re("iterator"),Bn=Array.prototype,Fn=re("iterator"),qn=function(e,t,n,r){try{return r?t(w(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&w(o.call(e)),t}},Vn=e(function(t){var h=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,e,n,r,o){var i,a,u,c,s,l,f,p,d=Se(e,n,r?2:1);if(o)i=t;else{if("function"!=typeof(a=function(t){if(null!=t)return t[Fn]||t["@@iterator"]||Gn[jn(t)]}(t)))throw TypeError("Target is not iterable");if(void 0!==(p=a)&&(Gn.Array===p||Bn[Hn]===p)){for(u=0,c=ct(t.length);u<c;u++)if((s=r?d(w(f=t[u])[0],f[1]):d(t[u]))&&s instanceof h)return s;return new h(!1)}i=a.call(t)}for(l=i.next;!(f=l.call(i)).done;)if("object"==typeof(s=qn(i,d,f.value,r))&&s&&s instanceof h)return s;return new h(!1)}).stop=function(t){return new h(!0,t)}}),Kn=re("iterator"),Yn=!1;try{var $n=0,Wn={next:function(){return{done:!!$n++}},return:function(){Yn=!0}};Wn[Kn]=function(){return this},Array.from(Wn,function(){throw 2})}catch(t){}var Jn,zn,Qn,Xn=/(iphone|ipod|ipad).*applewebkit/i.test(ae),Zn=l.location,tr=l.setImmediate,er=l.clearImmediate,nr=l.process,rr=l.MessageChannel,or=l.Dispatch,ir=0,ar={},ur="onreadystatechange",cr=function(t){if(ar.hasOwnProperty(t)){var e=ar[t];delete ar[t],e()}},sr=function(t){return function(){cr(t)}},lr=function(t){cr(t.data)},fr=function(t){l.postMessage(t+"",Zn.protocol+"//"+Zn.host)};tr&&er||(tr=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return ar[++ir]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},Jn(ir),ir},er=function(t){delete ar[t]},"process"==d(nr)?Jn=function(t){nr.nextTick(sr(t))}:or&&or.now?Jn=function(t){or.now(sr(t))}:rr&&!Xn?(Qn=(zn=new rr).port2,zn.port1.onmessage=lr,Jn=Se(Qn.postMessage,Qn,1)):!l.addEventListener||"function"!=typeof postMessage||l.importScripts||f(fr)?Jn=ur in O("script")?function(t){ke.appendChild(O("script"))[ur]=function(){ke.removeChild(this),cr(t)}}:function(t){setTimeout(sr(t),0)}:(Jn=fr,l.addEventListener("message",lr,!1)));var pr,dr,hr,vr,gr,yr,Er,mr,Rr={set:tr,clear:er},Sr=T.f,Or=Rr.set,xr=l.MutationObserver||l.WebKitMutationObserver,br=l.process,Tr=l.Promise,kr="process"==d(br),wr=Sr(l,"queueMicrotask"),Cr=wr&&wr.value;Cr||(pr=function(){var t,e;for(kr&&(t=br.domain)&&t.exit();dr;){e=dr.fn,dr=dr.next;try{e()}catch(t){throw dr?vr():hr=void 0,t}}hr=void 0,t&&t.enter()},vr=kr?function(){br.nextTick(pr)}:xr&&!Xn?(gr=!0,yr=document.createTextNode(""),new xr(pr).observe(yr,{characterData:!0}),function(){yr.data=gr=!gr}):Tr&&Tr.resolve?(Er=Tr.resolve(void 0),mr=Er.then,function(){mr.call(Er,pr)}):function(){Or.call(l,pr)});var Ir,_r,Pr,Ar,jr,Lr,Nr,Dr,Ur,Mr=Cr||function(t){var e={fn:t,next:void 0};hr&&(hr.next=e),dr||(dr=e,vr()),hr=e},Gr=function(t){var n,r;this.promise=new t(function(t,e){if(void 0!==n||void 0!==r)throw TypeError("Bad Promise constructor");n=t,r=e}),this.resolve=Re(n),this.reject=Re(r)},Hr={f:function(t){return new Gr(t)}},Br=function(t,e){if(w(t),v(e)&&e.constructor===t)return e;var n=Hr.f(t);return(0,n.resolve)(e),n.promise},Fr=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},qr=Rr.set,Vr=re("species"),Kr="Promise",Yr=Z.get,$r=Z.set,Wr=Z.getterFor(Kr),Jr=Nn,zr=l.TypeError,Qr=l.document,Xr=l.process,Zr=rt("fetch"),to=Hr.f,eo=to,no="process"==d(Xr),ro=!!(Qr&&Qr.createEvent&&l.dispatchEvent),oo="unhandledrejection",io=wt(Kr,function(){if(!(U(Jr)!==String(Jr))){if(66===le)return!0;if(!no&&"function"!=typeof PromiseRejectionEvent)return!0}if(51<=le&&/native code/.test(Jr))return!1;var t=Jr.resolve(1),e=function(t){t(function(){},function(){})};return(t.constructor={})[Vr]=e,!(t.then(function(){})instanceof e)}),ao=io||!function(t,e){if(!e&&!Yn)return!1;var n=!1;try{var r={};r[Kn]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}(function(t){Jr.all(t).catch(function(){})}),uo=function(t){var e;return!(!v(t)||"function"!=typeof(e=t.then))&&e},co=function(f,p,d){if(!p.notified){p.notified=!0;var h=p.reactions;Mr(function(){for(var t=p.value,e=1==p.state,n=0;h.length>n;){var r,o,i,a=h[n++],u=e?a.ok:a.fail,c=a.resolve,s=a.reject,l=a.domain;try{u?(e||(2===p.rejection&&po(f,p),p.rejection=1),!0===u?r=t:(l&&l.enter(),r=u(t),l&&(l.exit(),i=!0)),r===a.promise?s(zr("Promise-chain cycle")):(o=uo(r))?o.call(r,c,s):c(r)):s(t)}catch(t){l&&!i&&l.exit(),s(t)}}p.reactions=[],p.notified=!1,d&&!p.rejection&&lo(f,p)})}},so=function(t,e,n){var r,o;ro?((r=Qr.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),l.dispatchEvent(r)):r={promise:e,reason:n},(o=l["on"+t])?o(r):t===oo&&function(t,e){var n=l.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)},lo=function(n,r){qr.call(l,function(){var t,e=r.value;if(fo(r)&&(t=Fr(function(){no?Xr.emit("unhandledRejection",e,n):so(oo,n,e)}),r.rejection=no||fo(r)?2:1,t.error))throw t.value})},fo=function(t){return 1!==t.rejection&&!t.parent},po=function(t,e){qr.call(l,function(){no?Xr.emit("rejectionHandled",t):so("rejectionhandled",t,e.value)})},ho=function(e,n,r,o){return function(t){e(n,r,t,o)}},vo=function(t,e,n,r){e.done||(e.done=!0,r&&(e=r),e.value=n,e.state=2,co(t,e,!0))},go=function(n,r,t,e){if(!r.done){r.done=!0,e&&(r=e);try{if(n===t)throw zr("Promise can't be resolved itself");var o=uo(t);o?Mr(function(){var e={done:!1};try{o.call(t,ho(go,n,e,r),ho(vo,n,e,r))}catch(t){vo(n,e,t,r)}}):(r.value=t,r.state=1,co(n,r,!1))}catch(t){vo(n,{done:!1},t,r)}}};io&&(Jr=function(t){!function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}(this,Jr,Kr),Re(t),Ir.call(this);var e=Yr(this);try{t(ho(go,this,e),ho(vo,this,e))}catch(t){vo(this,e,t)}},(Ir=function(t){$r(this,{type:Kr,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(t,e,n){for(var r in e)tt(t,r,e[r],n);return t}(Jr.prototype,{then:function(t,e){var n=Wr(this),r=to(mn(this,Jr));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=no?Xr.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&co(this,n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),_r=function(){var t=new Ir,e=Yr(t);this.promise=t,this.resolve=ho(go,t,e),this.reject=ho(vo,t,e)},Hr.f=to=function(t){return t===Jr||t===Pr?new _r(t):eo(t)},"function"==typeof Nn&&(Ar=Nn.prototype.then,tt(Nn.prototype,"then",function(t,e){var n=this;return new Jr(function(t,e){Ar.call(n,t,e)}).then(t,e)},{unsafe:!0}),"function"==typeof Zr&&It({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return Br(Jr,Zr.apply(l,arguments))}}))),It({global:!0,wrap:!0,forced:io},{Promise:Jr}),Nr=!(Lr=Kr),(jr=Jr)&&!E(jr=Nr?jr:jr.prototype,Un)&&Dn(jr,Un,{configurable:!0,value:Lr}),Dr=rt(Kr),Ur=C.f,a&&Dr&&!Dr[Mn]&&Ur(Dr,Mn,{configurable:!0,get:function(){return this}}),Pr=rt(Kr),It({target:Kr,stat:!0,forced:io},{reject:function(t){var e=to(this);return e.reject.call(void 0,t),e.promise}}),It({target:Kr,stat:!0,forced:io},{resolve:function(t){return Br(this,t)}}),It({target:Kr,stat:!0,forced:ao},{all:function(t){var u=this,e=to(u),c=e.resolve,s=e.reject,n=Fr(function(){var r=Re(u.resolve),o=[],i=0,a=1;Vn(t,function(t){var e=i++,n=!1;o.push(void 0),a++,r.call(u,t).then(function(t){n||(n=!0,o[e]=t,--a||c(o))},s)}),--a||c(o)});return n.error&&s(n.value),e.promise},race:function(t){var n=this,r=to(n),o=r.reject,e=Fr(function(){var e=Re(n.resolve);Vn(t,function(t){e.call(n,t).then(r.resolve,o)})});return e.error&&o(e.value),r.promise}});var yo={SUCCESS:"SUCCESS",ERROR_PUBLISHABLE_KEY:"ERROR_PUBLISHABLE_KEY",ERROR_PERMISSIONS:"ERROR_PERMISSIONS",ERROR_LOCATION:"ERROR_LOCATION",ERROR_NETWORK:"ERROR_NETWORK",ERROR_BAD_REQUEST:"ERROR_BAD_REQUEST",ERROR_UNAUTHORIZED:"ERROR_UNAUTHORIZED",ERROR_PAYMENT_REQUIRED:"ERROR_PAYMENT_REQUIRED",ERROR_FORBIDDEN:"ERROR_FORBIDDEN",ERROR_NOT_FOUND:"ERROR_NOT_FOUND",ERROR_RATE_LIMIT:"ERROR_RATE_LIMIT",ERROR_SERVER:"ERROR_SERVER",ERROR_UNKNOWN:"ERROR_UNKNOWN"},Eo=function(){function t(){qt(this,t)}return Kt(t,null,[{key:"getCurrentPosition",value:function(){return new Promise(function(i,a){if(!navigator||!navigator.geolocation)return a(yo.ERROR_LOCATION);navigator.geolocation.getCurrentPosition(function(t){if(!t||!t.coords)return a(yo.ERROR_LOCATION);var e=t.coords,n=e.latitude,r=e.longitude,o=e.accuracy;return i({latitude:n,longitude:r,accuracy:o})},function(t){return t&&t.code&&1===t.code?a(yo.ERROR_PERMISSIONS):a(yo.ERROR_LOCATION)})})}}]),t}(),mo=(e(function(t){var e=function(a){var c,t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},o=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",r=e.toStringTag||"@@toStringTag";function u(t,e,n,r){var i,a,u,c,o=e&&e.prototype instanceof y?e:y,s=Object.create(o.prototype),l=new w(r||[]);return s._invoke=(i=t,a=n,u=l,c=p,function(t,e){if(c===h)throw new Error("Generator is already running");if(c===v){if("throw"===t)throw e;return I()}for(u.method=t,u.arg=e;;){var n=u.delegate;if(n){var r=b(n,u);if(r){if(r===g)continue;return r}}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if(c===p)throw c=v,u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);c=h;var o=f(i,a,u);if("normal"===o.type){if(c=u.done?v:d,o.arg===g)continue;return{value:o.arg,done:u.done}}"throw"===o.type&&(c=v,u.method="throw",u.arg=o.arg)}}),s}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var p="suspendedStart",d="suspendedYield",h="executing",v="completed",g={};function y(){}function i(){}function s(){}var E={};E[o]=function(){return this};var m=Object.getPrototypeOf,R=m&&m(m(C([])));R&&R!==t&&l.call(R,o)&&(E=R);var S=s.prototype=y.prototype=Object.create(E);function O(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function x(c,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,o){var i=f(c[t],c,n);if("throw"!==i.type){var a=i.arg,u=a.value;return u&&"object"==typeof u&&l.call(u,"__await")?s.resolve(u.__await).then(function(t){e("next",t,r,o)},function(t){e("throw",t,r,o)}):s.resolve(u).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,o)})}o(i.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function b(t,e){var n=t.iterator[e.method];if(n===c){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=c,b(t,e),"throw"===e.method))return g;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,g;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=c),e.delegate=null,g):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function C(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=c,t.done=!0,t};return r.next=r}}return{next:I}}function I(){return{value:c,done:!0}}return i.prototype=S.constructor=s,s.constructor=i,s[r]=i.displayName="GeneratorFunction",a.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===i||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,r in t||(t[r]="GeneratorFunction")),t.prototype=Object.create(S),t},a.awrap=function(t){return{__await:t}},O(x.prototype),x.prototype[n]=function(){return this},a.AsyncIterator=x,a.async=function(t,e,n,r,o){void 0===o&&(o=Promise);var i=new x(u(t,e,n,r),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},O(S),S[r]="Generator",S[o]=function(){return this},S.toString=function(){return"[object Generator]"},a.keys=function(n){var r=[];for(var t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=C,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=c)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return i.type="throw",i.arg=n,r.next=t,e&&(r.method="next",r.arg=c),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=l.call(o,"catchLoc"),u=l.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=c),g}},a}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}),be.forEach),Ro=Ke("forEach"),So=He("forEach"),Oo=Ro&&So?[].forEach:function(t){return mo(this,t,1<arguments.length?arguments[1]:void 0)};It({target:"Array",proto:!0,forced:[].forEach!=Oo},{forEach:Oo});var xo=[].join,bo=R!=Object,To=Ke("join",",");It({target:"Array",proto:!0,forced:bo||!To},{join:function(t){return xo.call(p(this),void 0===t?",":t)}});var ko=be.map,wo=pe("map"),Co=He("map");It({target:"Array",proto:!0,forced:!wo||!Co},{map:function(t){return ko(this,t,1<arguments.length?arguments[1]:void 0)}});for(var Io in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var _o=l[Io],Po=_o&&_o.prototype;if(Po&&Po.forEach!==Oo)try{I(Po,"forEach",Oo)}catch(t){Po.forEach=Oo}}var Ao=function(){function t(){qt(this,t)}return Kt(t,null,[{key:"getHost",value:function(){return Cn.getCookie(Cn.HOST)||"https://api.radar.io"}}]),t}(),jo="3.1.1",Lo=function(){function t(){qt(this,t)}return Kt(t,null,[{key:"request",value:function(l,f,p){return new Promise(function(e,n){var r=new XMLHttpRequest,t="".concat(Ao.getHost(),"/").concat(f),o={};if(Object.keys(p).forEach(function(t){var e=p[t];void 0!==e&&(o[t]=e)}),"GET"===l){var i=Object.keys(o).map(function(t){return"".concat(t,"=").concat(encodeURIComponent(o[t]))});if(0<i.length){var a=i.join("&");t="".concat(t,"?").concat(a)}o=void 0}r.open(l,t,!0);var u=Cn.getCookie(Cn.PUBLISHABLE_KEY);if(u){r.setRequestHeader("Authorization",u),r.setRequestHeader("Content-Type","application/json"),r.setRequestHeader("X-Radar-Device-Type","Web"),r.setRequestHeader("X-Radar-SDK-Version",jo);var c=Cn.getCookie(Cn.CUSTOM_HEADERS);if(c){var s=JSON.parse(c);Object.keys(s).forEach(function(t){r.setRequestHeader(t,s[t])})}r.onload=function(){var t;try{t=JSON.parse(r.response)}catch(t){n(yo.ERROR_SERVER)}200==r.status?e(t):400===r.status?n({httpError:yo.ERROR_BAD_REQUEST,response:t}):401===r.status?n({httpError:yo.ERROR_UNAUTHORIZED,response:t}):402===r.status?n({httpError:yo.ERROR_PAYMENT_REQUIRED,response:t}):403===r.status?n({httpError:yo.ERROR_FORBIDDEN,response:t}):404===r.status?n({httpError:yo.ERROR_NOT_FOUND,response:t}):429===r.status?n({httpError:yo.ERROR_RATE_LIMIT,response:t}):500<=r.status&&r.status<600?n({httpError:yo.ERROR_SERVER,response:t}):n({httpError:yo.ERROR_UNKNOWN,response:t})},r.onerror=function(){n(yo.ERROR_SERVER)},r.timeout=function(){n(yo.ERROR_NETWORK)},r.send(JSON.stringify(o))}else n(yo.ERROR_PUBLISHABLE_KEY)})}}]),t}(),No=function(){function t(){qt(this,t)}var e;return Kt(t,null,[{key:"getContext",value:(e=Ft(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<a.length&&void 0!==a[0]?a[0]:{}).latitude&&e.longitude){t.next=5;break}return t.next=4,Eo.getCurrentPosition();case 4:e=t.sent;case 5:return r=(n=e).latitude,o=n.longitude,i={coordinates:"".concat(r,",").concat(o)},t.abrupt("return",Lo.request("GET","v1/context",i));case 8:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Do=function(){function t(){qt(this,t)}var e,n,r;return Kt(t,null,[{key:"geocode",value:(r=Ft(regeneratorRuntime.mark(function t(){var e,n,r,o=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<o.length&&void 0!==o[0]?o[0]:{},n=e.query,r=e.layers,t.abrupt("return",Lo.request("GET","v1/geocode/forward",{query:n,layers:r}));case 3:case"end":return t.stop()}},t)})),function(){return r.apply(this,arguments)})},{key:"reverseGeocode",value:(n=Ft(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<s.length&&void 0!==s[0]?s[0]:{}).latitude&&e.longitude){t.next=9;break}return t.next=4,Eo.getCurrentPosition();case 4:n=t.sent,r=n.latitude,o=n.longitude,e.latitude=r,e.longitude=o;case 9:return i=e.latitude,a=e.longitude,u=e.layers,c={coordinates:"".concat(i,",").concat(a),layers:u},t.abrupt("return",Lo.request("GET","v1/geocode/reverse",c));case 12:case"end":return t.stop()}},t)})),function(){return n.apply(this,arguments)})},{key:"ipGeocode",value:(e=Ft(regeneratorRuntime.mark(function t(){var e,n,r=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<r.length&&void 0!==r[0]?r[0]:{},n=e.ip,t.abrupt("return",Lo.request("GET","v1/geocode/ip",{ip:n}));case 3:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Uo=function(){function t(){qt(this,t)}var e,n;return Kt(t,null,[{key:"getDistanceToDestination",value:(n=Ft(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s,l=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<l.length&&void 0!==l[0]?l[0]:{}).origin){t.next=8;break}return t.next=4,Eo.getCurrentPosition();case 4:n=t.sent,r=n.latitude,o=n.longitude,e.origin={latitude:r,longitude:o};case 8:return i=e.origin,a=e.destination,u=e.modes,c=e.units,i="".concat(i.latitude,",").concat(i.longitude),a&&(a="".concat(a.latitude,",").concat(a.longitude)),u&&(u=u.join(",")),s={origin:i,destination:a,modes:u,units:c},t.abrupt("return",Lo.request("GET","v1/route/distance",s));case 14:case"end":return t.stop()}},t)})),function(){return n.apply(this,arguments)})},{key:"getMatrixDistances",value:(e=Ft(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s,l=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<l.length&&void 0!==l[0]?l[0]:{}).origins){t.next=8;break}return t.next=4,Eo.getCurrentPosition();case 4:n=t.sent,r=n.latitude,o=n.longitude,e.origins=[{latitude:r,longitude:o}];case 8:return i=e.origins,a=e.destinations,u=e.mode,c=e.units,i=(i||[]).map(function(t){return"".concat(t.latitude,",").concat(t.longitude)}).join("|"),a=(a||[]).map(function(t){return"".concat(t.latitude,",").concat(t.longitude)}).join("|"),s={origins:i,destinations:a,mode:u,units:c},t.abrupt("return",Lo.request("GET","v1/route/matrix",s));case 13:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Mo=function(){function t(){qt(this,t)}var e,n,r;return Kt(t,null,[{key:"searchPlaces",value:(r=Ft(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s,l,f,p=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<p.length&&void 0!==p[0]?p[0]:{}).near){t.next=8;break}return t.next=4,Eo.getCurrentPosition();case 4:n=t.sent,r=n.latitude,o=n.longitude,e.near={latitude:r,longitude:o};case 8:return i=e.near,a=e.radius,u=e.chains,c=e.categories,s=e.groups,l=e.limit,i="".concat(i.latitude,",").concat(i.longitude),u&&(u=u.join(",")),c&&(c=c.join(",")),s&&(s=s.join(",")),f={near:i,radius:a,chains:u,categories:c,groups:s,limit:l},t.abrupt("return",Lo.request("GET","v1/search/places",f));case 15:case"end":return t.stop()}},t)})),function(){return r.apply(this,arguments)})},{key:"searchGeofences",value:(n=Ft(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s,l,f=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<f.length&&void 0!==f[0]?f[0]:{}).near){t.next=8;break}return t.next=4,Eo.getCurrentPosition();case 4:n=t.sent,r=n.latitude,o=n.longitude,e.near={latitude:r,longitude:o};case 8:return i=e.near,a=e.radius,u=e.tags,c=e.metadata,s=e.limit,i="".concat(i.latitude,",").concat(i.longitude),u&&(u=u.join(",")),l={near:i,radius:a,tags:u,limit:s},c&&Object.keys(c).forEach(function(t){var e="metadata[".concat(t,"]"),n=c[t];l[e]=n}),t.abrupt("return",Lo.request("GET","v1/search/geofences",l));case 14:case"end":return t.stop()}},t)})),function(){return n.apply(this,arguments)})},{key:"autocomplete",value:(e=Ft(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=0<s.length&&void 0!==s[0]?s[0]:{},o=r.query,i=r.near,a=r.limit,u=r.layers,(null===(e=i)||void 0===e?void 0:e.latitude)&&(null===(n=i)||void 0===n?void 0:n.longitude)&&(i="".concat(i.latitude,",").concat(i.longitude)),c={query:o,near:i,limit:a,layers:u},t.abrupt("return",Lo.request("GET","v1/search/autocomplete",c));case 5:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Go="toString",Ho=RegExp.prototype,Bo=Ho[Go],Fo=f(function(){return"/a/b"!=Bo.call({source:"a",flags:"b"})}),qo=Bo.name!=Go;(Fo||qo)&&tt(RegExp.prototype,Go,function(){var t=w(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(void 0===n&&t instanceof RegExp&&!("flags"in Ho)?Qe.call(t):n)},{unsafe:!0});var Vo=Math.max,Ko=Math.min,Yo=Math.floor,$o=/\$([$&'`]|\d\d?|<[^>]*>)/g,Wo=/\$([$&'`]|\d\d?)/g;gn("replace",2,function(o,S,O,t){var x=t.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,b=t.REPLACE_KEEPS_$0,T=x?"$":"$0";return[function(t,e){var n=h(this),r=null==t?void 0:t[o];return void 0!==r?r.call(t,n,e):S.call(String(n),t,e)},function(t,e){if(!x&&b||"string"==typeof e&&-1===e.indexOf(T)){var n=O(S,t,this,e);if(n.done)return n.value}var r=w(t),o=String(this),i="function"==typeof e;i||(e=String(e));var a=r.global;if(a){var u=r.unicode;r.lastIndex=0}for(var c=[];;){var s=xn(r,o);if(null===s)break;if(c.push(s),!a)break;""===String(s[0])&&(r.lastIndex=On(o,ct(r.lastIndex),u))}for(var l,f="",p=0,d=0;d<c.length;d++){s=c[d];for(var h=String(s[0]),v=Vo(Ko(at(s.index),o.length),0),g=[],y=1;y<s.length;y++)g.push(void 0===(l=s[y])?l:String(l));var E=s.groups;if(i){var m=[h].concat(g,v,o);void 0!==E&&m.push(E);var R=String(e.apply(void 0,m))}else R=k(h,o,v,g,E,e);p<=v&&(f+=o.slice(p,v)+R,p=v+h.length)}return f+o.slice(p)}];function k(i,a,u,c,s,t){var l=u+i.length,f=c.length,e=Wo;return void 0!==s&&(s=_t(s),e=$o),S.call(t,e,function(t,e){var n;switch(e.charAt(0)){case"$":return"$";case"&":return i;case"`":return a.slice(0,u);case"'":return a.slice(l);case"<":n=s[e.slice(1,-1)];break;default:var r=+e;if(0===r)return t;if(f<r){var o=Yo(r/10);return 0===o?t:o<=f?void 0===c[o-1]?e.charAt(1):c[o-1]+e.charAt(1):t}n=c[r-1]}return void 0===n?"":n})}});var Jo=function(){function t(){qt(this,t)}return Kt(t,null,[{key:"getId",value:function(){var t=Cn.getCookie(Cn.DEVICE_ID);if(t)return t;var e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)});return Cn.setCookie(Cn.DEVICE_ID,e),e}}]),t}(),zo=function(){function t(){qt(this,t)}var e;return Kt(t,null,[{key:"trackOnce",value:(e=Ft(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s,l,f,p,d,h,v,g,y=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=0<y.length&&void 0!==y[0]?y[0]:{},n=e.latitude,r=e.longitude,o=e.accuracy,n&&r){t.next=9;break}return t.next=5,Eo.getCurrentPosition();case 5:i=t.sent,n=i.latitude,r=i.longitude,o=i.accuracy;case 9:return a=Jo.getId(),u=Cn.getCookie(Cn.USER_ID),c=Cn.getCookie(Cn.INSTALL_ID)||a,s=Cn.getCookie(Cn.DEVICE_TYPE)||"Web",l=Cn.getCookie(Cn.DESCRIPTION),(f=Cn.getCookie(Cn.METADATA))&&(f=JSON.parse(f)),(p=Cn.getCookie(Cn.TRIP_OPTIONS))&&(p=JSON.parse(p)),d=$t({},e,{accuracy:o,description:l,deviceId:a,deviceType:s,foreground:!0,installId:c,latitude:n,longitude:r,metadata:f,sdkVersion:jo,stopped:!0,userId:u,tripOptions:p}),h=Cn.getCookie(Cn.BASE_API_PATH)||"v1",v="".concat(h,"/track"),t.next=23,Lo.request("POST",v,d);case 23:return(g=t.sent).location={latitude:n,longitude:r,accuracy:o},t.abrupt("return",g);case 26:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Qo=function(){function t(){qt(this,t)}var e;return Kt(t,null,[{key:"updateTrip",value:(e=Ft(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s,l=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<l.length&&void 0!==l[0]?l[0]:{},n=1<l.length?l[1]:void 0,r=e.externalId,o=e.destinationGeofenceTag,i=e.destinationGeofenceExternalId,a=e.mode,u=e.metadata,c={externalId:r,status:n,destinationGeofenceTag:o,destinationGeofenceExternalId:i,mode:a,metadata:u},s=Cn.getCookie(Cn.BASE_API_PATH)||"v1",t.abrupt("return",Lo.request("PATCH","".concat(s,"/trips/").concat(r),c));case 6:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Xo="started",Zo="completed",ti="canceled",ei=function(){},ni=function(e){return function(t){"string"!=typeof t?"object"===Ht(t)&&t.httpError?e(t.httpError,{},t.response):e(yo.ERROR_UNKNOWN,{}):e(t,{})}};return function(){function n(){qt(this,n)}return Kt(n,null,[{key:"initialize",value:function(t){t||console.error('Radar "initialize" was called without a publishable key'),Cn.setCookie(Cn.PUBLISHABLE_KEY,t)}},{key:"setHost",value:function(t,e){Cn.setCookie(Cn.HOST,t,!0),Cn.setCookie(Cn.BASE_API_PATH,e)}},{key:"setUserId",value:function(t){t?Cn.setCookie(Cn.USER_ID,String(t).trim()):Cn.deleteCookie(Cn.USER_ID)}},{key:"setDeviceId",value:function(t,e){t?Cn.setCookie(Cn.DEVICE_ID,String(t).trim()):Cn.deleteCookie(Cn.DEVICE_ID),e?Cn.setCookie(Cn.INSTALL_ID,String(e).trim()):Cn.deleteCookie(Cn.INSTALL_ID)}},{key:"setDescription",value:function(t){t?Cn.setCookie(Cn.DESCRIPTION,String(t).trim()):Cn.deleteCookie(Cn.DESCRIPTION)}},{key:"setMetadata",value:function(t){t?Cn.setCookie(Cn.METADATA,JSON.stringify(t)):Cn.deleteCookie(Cn.METADATA)}},{key:"setRequestHeaders",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};Object.keys(t).length?Cn.setCookie(Cn.CUSTOM_HEADERS,JSON.stringify(t)):Cn.deleteCookie(Cn.CUSTOM_HEADERS)}},{key:"getLocation",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:ei;Eo.getCurrentPosition().then(function(t){e(null,{location:t,status:yo.SUCCESS})}).catch(ni(e))}},{key:"trackOnce",value:function(t){var e,n,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ei;e="function"==typeof t?t:(n=t,r),zo.trackOnce(n).then(function(t){e(null,{location:t.location,user:t.user,events:t.events,status:yo.SUCCESS},t)}).catch(ni(e))}},{key:"getContext",value:function(t){var e,n,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ei;e="function"==typeof t?t:(n=t,r),No.getContext(n).then(function(t){e(null,{context:t.context,status:yo.SUCCESS},t)}).catch(ni(e))}},{key:"startTrip",value:function(e){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ei;Qo.updateTrip(e,Xo).then(function(t){Cn.setCookie(Cn.TRIP_OPTIONS,JSON.stringify(e)),n(null,{trip:t.trip,events:t.events,status:yo.SUCCESS},t)}).catch(ni(n))}},{key:"updateTrip",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:ei;Qo.updateTrip(e,t).then(function(t){Cn.setCookie(Cn.TRIP_OPTIONS,JSON.stringify(e)),n(null,{trip:t.trip,events:t.events,status:yo.SUCCESS},t)}).catch(ni(n))}},{key:"completeTrip",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:ei,t=n.getTripOptions();Qo.updateTrip(t,Zo).then(function(t){Cn.deleteCookie(Cn.TRIP_OPTIONS),e(null,{trip:t.trip,events:t.events,status:yo.SUCCESS},t)}).catch(ni(e))}},{key:"cancelTrip",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:ei,t=n.getTripOptions();Qo.updateTrip(t,ti).then(function(t){Cn.deleteCookie(Cn.TRIP_OPTIONS),e(null,{trip:t.trip,events:t.events,status:yo.SUCCESS},t)}).catch(ni(e))}},{key:"getTripOptions",value:function(){var t=Cn.getCookie(Cn.TRIP_OPTIONS);return t&&(t=JSON.parse(t)),t}},{key:"searchPlaces",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ei;Mo.searchPlaces(t).then(function(t){e(null,{places:t.places,status:yo.SUCCESS},t)}).catch(ni(e))}},{key:"searchGeofences",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ei;Mo.searchGeofences(t).then(function(t){e(null,{geofences:t.geofences,status:yo.SUCCESS},t)}).catch(ni(e))}},{key:"autocomplete",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ei;Mo.autocomplete(t).then(function(t){e(null,{addresses:t.addresses,status:yo.SUCCESS},t)}).catch(ni(e))}},{key:"geocode",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ei;Do.geocode(t).then(function(t){e(null,{addresses:t.addresses,staus:yo.SUCCESS},t)}).catch(ni(e))}},{key:"reverseGeocode",value:function(t){var e,n,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ei;e="function"==typeof t?t:(n=t,r),Do.reverseGeocode(n).then(function(t){e(null,{addresses:t.addresses,status:yo.SUCCESS},t)}).catch(ni(e))}},{key:"ipGeocode",value:function(t){var e,n,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ei;"function"==typeof t?e=t:"object"===Ht(t)&&(n=t,e=r),Do.ipGeocode(n).then(function(t){e(null,{address:t.address,status:yo.SUCCESS},t)}).catch(ni(e))}},{key:"getDistance",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ei;Uo.getDistanceToDestination(t).then(function(t){e(null,{routes:t.routes,status:yo.SUCCESS},t)}).catch(ni(e))}},{key:"getMatrix",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ei;Uo.getMatrixDistances(t).then(function(t){e(null,{origins:t.origins,destinations:t.destinations,matrix:t.matrix,status:yo.SUCCESS},t)}).catch(ni(e))}},{key:"VERSION",get:function(){return jo}},{key:"STATUS",get:function(){return yo}}]),n}()}();
|
package/package.json
CHANGED
package/src/api/routing.js
CHANGED
|
@@ -33,6 +33,37 @@ class Routing {
|
|
|
33
33
|
|
|
34
34
|
return Http.request('GET', 'v1/route/distance', params);
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
static async getMatrixDistances(routingOptions={}) {
|
|
38
|
+
if (!routingOptions.origins) {
|
|
39
|
+
const { latitude, longitude } = await Navigator.getCurrentPosition();
|
|
40
|
+
routingOptions.origins = [{ latitude, longitude }];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
let {
|
|
44
|
+
origins,
|
|
45
|
+
destinations,
|
|
46
|
+
mode,
|
|
47
|
+
units,
|
|
48
|
+
} = routingOptions;
|
|
49
|
+
|
|
50
|
+
origins = (origins || [])
|
|
51
|
+
.map(origin => `${origin.latitude},${origin.longitude}`)
|
|
52
|
+
.join('|');
|
|
53
|
+
|
|
54
|
+
destinations = (destinations || [])
|
|
55
|
+
.map(destination => `${destination.latitude},${destination.longitude}`)
|
|
56
|
+
.join('|');
|
|
57
|
+
|
|
58
|
+
const params = {
|
|
59
|
+
origins,
|
|
60
|
+
destinations,
|
|
61
|
+
mode,
|
|
62
|
+
units,
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
return Http.request('GET', 'v1/route/matrix', params);
|
|
66
|
+
}
|
|
36
67
|
}
|
|
37
68
|
|
|
38
69
|
export default Routing;
|
package/src/api/track.js
CHANGED
|
@@ -7,13 +7,16 @@ import Navigator from '../navigator';
|
|
|
7
7
|
import SDK_VERSION from '../version';
|
|
8
8
|
|
|
9
9
|
class Track {
|
|
10
|
-
static async trackOnce(
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
static async trackOnce(params={}) {
|
|
11
|
+
let { latitude, longitude, accuracy } = params;
|
|
12
|
+
|
|
13
|
+
if (!latitude || !longitude) {
|
|
14
|
+
const deviceLocation = await Navigator.getCurrentPosition();
|
|
15
|
+
latitude = deviceLocation.latitude;
|
|
16
|
+
longitude = deviceLocation.longitude;
|
|
17
|
+
accuracy = deviceLocation.accuracy;
|
|
13
18
|
}
|
|
14
19
|
|
|
15
|
-
const { latitude, longitude, accuracy } = location;
|
|
16
|
-
|
|
17
20
|
const deviceId = Device.getId();
|
|
18
21
|
const userId = Cookie.getCookie(Cookie.USER_ID);
|
|
19
22
|
const installId = Cookie.getCookie(Cookie.INSTALL_ID) || deviceId;
|
|
@@ -30,12 +33,8 @@ class Track {
|
|
|
30
33
|
tripOptions = JSON.parse(tripOptions);
|
|
31
34
|
}
|
|
32
35
|
|
|
33
|
-
let nearbyBeacons = Cookie.getCookie(Cookie.NEARBY_BEACONS);
|
|
34
|
-
if (nearbyBeacons) {
|
|
35
|
-
nearbyBeacons = JSON.parse(nearbyBeacons);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
36
|
const body = {
|
|
37
|
+
...params,
|
|
39
38
|
accuracy,
|
|
40
39
|
description,
|
|
41
40
|
deviceId,
|
|
@@ -49,15 +48,13 @@ class Track {
|
|
|
49
48
|
stopped: true,
|
|
50
49
|
userId,
|
|
51
50
|
tripOptions,
|
|
52
|
-
nearbyBeacons,
|
|
53
51
|
};
|
|
54
52
|
|
|
55
53
|
const basePath = Cookie.getCookie(Cookie.BASE_API_PATH) || 'v1';
|
|
56
54
|
const trackEndpoint = `${basePath}/track`;
|
|
57
55
|
|
|
58
56
|
const response = await Http.request('POST', trackEndpoint, body);
|
|
59
|
-
|
|
60
|
-
response.location = location;
|
|
57
|
+
response.location = { latitude, longitude, accuracy };
|
|
61
58
|
|
|
62
59
|
return response;
|
|
63
60
|
}
|
package/src/cookie.js
CHANGED
package/src/index.js
CHANGED
|
@@ -288,6 +288,14 @@ class Radar {
|
|
|
288
288
|
})
|
|
289
289
|
.catch(handleError(callback));
|
|
290
290
|
}
|
|
291
|
+
|
|
292
|
+
static getMatrix(routingOptions, callback=defaultCallback) {
|
|
293
|
+
Routing.getMatrixDistances(routingOptions)
|
|
294
|
+
.then((response) => {
|
|
295
|
+
callback(null, { origins: response.origins, destinations: response.destinations, matrix: response.matrix, status: STATUS.SUCCESS }, response);
|
|
296
|
+
})
|
|
297
|
+
.catch(handleError(callback));
|
|
298
|
+
}
|
|
291
299
|
}
|
|
292
300
|
|
|
293
301
|
export default Radar;
|
package/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '3.1.
|
|
1
|
+
export default '3.1.1';
|