New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

angular-baidu-map

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-baidu-map - npm Package Compare versions

Comparing version 3.2.2 to 3.3.0

1250

dist/angular-baidu-map.js

@@ -10,3 +10,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

}
})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_2__) {
})(window, function(__WEBPACK_EXTERNAL_MODULE__0__) {
return /******/ (function(modules) { // webpackBootstrap

@@ -58,2 +58,7 @@ /******/ // The module cache

/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules

@@ -74,2 +79,3 @@ /******/ __webpack_require__.n = function(module) {

/******/
/******/
/******/ // Load entry module and return exports

@@ -81,35 +87,72 @@ /******/ return __webpack_require__(__webpack_require__.s = 1);

/* 0 */
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE__0__;
/***/ }),
/* 1 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["d"] = nullCheck;
/* unused harmony export numberCheck */
/* harmony export (immutable) */ __webpack_exports__["c"] = isNull;
/* unused harmony export isNumber */
/* harmony export (immutable) */ __webpack_exports__["b"] = isArray;
/* harmony export (immutable) */ __webpack_exports__["a"] = controlTypeCheck;
/* harmony export (immutable) */ __webpack_exports__["e"] = overlayTypeCheck;
__webpack_require__.r(__webpack_exports__);
var style_namespaceObject = {};
__webpack_require__.d(style_namespaceObject, "map", function() { return style_map; });
__webpack_require__.d(style_namespaceObject, "offline", function() { return offline; });
__webpack_require__.d(style_namespaceObject, "offlineLabel", function() { return offlineLabel; });
// EXTERNAL MODULE: external "angular"
var external_angular_ = __webpack_require__(0);
var external_angular_default = /*#__PURE__*/__webpack_require__.n(external_angular_);
// CONCATENATED MODULE: ./src/style/index.js
var style_map = {
width: '100%',
height: '100%',
display: 'none'
};
var offline = {
width: '100%',
height: '100%',
backgroundColor: '#E6E6E6',
position: 'relative',
display: 'none'
};
var offlineLabel = {
fontSize: '30px',
margin: 0,
position: 'absolute',
top: '50%',
left: '50%',
'margin-right': '-50%',
transform: 'translate(-50%, -50%)'
};
// CONCATENATED MODULE: ./src/helper/validate.js
function nullCheck(val, msg) {
if (isNull(val)) {
throw new Error(msg);
}
if (isNull(val)) {
throw new Error(msg);
}
}
function numberCheck(val, msg) {
if (isNumber(val)) {
throw new Error(msg);
}
function arrayCheck(val, msg) {
if (!isArray(val)) {
throw new Error(msg);
}
}
function isNull(obj) {
return obj === null || obj === undefined;
return obj === null || obj === undefined;
}
function isUndefined(obj) {
return obj === undefined;
}
function isNumber(obj) {
return Object.prototype.toString.call(obj) === '[object Number]';
return Object.prototype.toString.call(obj) === '[object Number]';
}
function isArray(obj) {
return Object.prototype.toString.call(obj) === '[object Array]';
return Object.prototype.toString.call(obj) === '[object Array]';
}

@@ -119,5 +162,5 @@

function controlTypeCheck(type) {
if (CONTROL_TYPS.indexOf((type || '').toLowerCase()) < 0) {
throw new Error('control type should be one of: [' + CONTROL_TYPS.join(',') + ']');
}
if (CONTROL_TYPS.indexOf((type || '').toLowerCase()) < 0) {
throw new Error('control type should be one of: [' + CONTROL_TYPS.join(',') + ']');
}
}

@@ -127,391 +170,686 @@

function overlayTypeCheck(type) {
if (OVERLAY_TYPS.indexOf((type || '').toLowerCase()) < 0) {
throw new Error('overlay type should be one of: [' + OVERLAY_TYPS.join(',') + ']');
if (OVERLAY_TYPS.indexOf((type || '').toLowerCase()) < 0) {
throw new Error('overlay type should be one of: [' + OVERLAY_TYPS.join(',') + ']');
}
}
// CONCATENATED MODULE: ./src/helper/map.js
var map_DEFAULT_COORDINATION = {
longitude: 121.506191,
latitude: 31.245554
};
var map_DEFAULT_ZOOM = 10;
function map_create(element, mapOptions) {
var map = new BMap.Map(element, mapOptions);
map_refresh(map, mapOptions);
return map;
}
function map_refresh(map, mapOptions) {
if (!isNull(mapOptions) && !isNull(mapOptions.disableDragging)) {
map[(mapOptions.disableDragging ? 'disable' : 'enable') + 'Dragging']();
}
if (!isNull(mapOptions) && !isNull(mapOptions.enableScrollWheelZoom)) {
map[(mapOptions.enableScrollWheelZoom ? 'enable' : 'disable') + 'ScrollWheelZoom']();
}
if (!isNull(mapOptions) && !isNull(mapOptions.disableDoubleClickZoom)) {
map[(mapOptions.disableDoubleClickZoom ? 'disable' : 'enable') + 'DoubleClickZoom']();
}
if (!isNull(mapOptions) && !isNull(mapOptions.enableKeyboard)) {
map[(mapOptions.enableKeyboard ? 'enable' : 'disable') + 'Keyboard']();
}
if (!isNull(mapOptions) && !isNull(mapOptions.enableInertialDragging)) {
map[(mapOptions.enableInertialDragging ? 'enable' : 'disable') + 'InertialDragging']();
}
if (!isNull(mapOptions) && !isNull(mapOptions.enableContinuousZoom)) {
map[(mapOptions.enableContinuousZoom ? 'enable' : 'disable') + 'ContinuousZoom']();
}
if (!isNull(mapOptions) && !isNull(mapOptions.disablePinchToZoom)) {
map[(mapOptions.disablePinchToZoom ? 'disable' : 'enable') + 'PinchToZoom']();
}
!isNull(mapOptions) && !isNull(mapOptions.cursor) && map.setDefaultCursor(mapOptions.cursor);
!isNull(mapOptions) && !isNull(mapOptions.draggingCursor) && map.setDraggingCursor(mapOptions.draggingCursor);
!isNull(mapOptions) && !isNull(mapOptions.currentCity) && map.setCurrentCity(mapOptions.currentCity);
!isNull(mapOptions) && !isNull(mapOptions.centerAndZoom) && map.centerAndZoom(new BMap.Point(mapOptions.centerAndZoom.longitude || map_DEFAULT_COORDINATION.longitude, mapOptions.centerAndZoom.latitude || map_DEFAULT_COORDINATION.latitude), mapOptions.centerAndZoom.zoom || map_DEFAULT_ZOOM);
}
// CONCATENATED MODULE: ./src/components/baiduMap.js
var baiduMap_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
/***/ }),
/* 1 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
function baiduMap_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ngBaiduMap", function() { return ngBaiduMap; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(2);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_baiduMap__ = __webpack_require__(3);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_marker__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_control__ = __webpack_require__(8);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__components_overlay__ = __webpack_require__(9);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__provider_mapScript__ = __webpack_require__(12);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__helper_preset__ = __webpack_require__(13);
/* harmony default export */ var baiduMap = ({
bindings: {
offlineTxt: '<',
mapOptions: '<',
loaded: '&',
click: '&'
},
transclude: true,
template: '\n <div ng-style="$ctrl.style.map" class="baidu-map-instance"></div>\n <div ng-style="$ctrl.style.offline" class="baidu-map-offline">\n <label ng-style="$ctrl.style.offlineLabel">{{ $ctrl.offlineTxt || \'NO_NETWORK\' }}</label>\n </div>\n <div ng-transclude style="display: none"></div>\n ',
controller: function () {
/* @ngInject */
function controller($scope, $element, $attrs, mapScriptService) {
baiduMap_classCallCheck(this, controller);
this.$scope = $scope;
this.$element = $element;
this.$attrs = $attrs;
this.style = style_namespaceObject;
this.mapScriptService = mapScriptService;
}
baiduMap_createClass(controller, [{
key: '$onInit',
value: function $onInit() {
var _this = this;
this.mapReady = this.mapScriptService.load().then(function () {
return map_create(_this.$element.children()[0], _this.mapOptions);
}).then(function (map) {
_this.loaded({
map: map
});
_this.$scope.$apply();
// eslint-disable-next-line
return _this.map = map;
}).then(function () {
if (!_this.$attrs.click) {
return;
}
var clickListener = _this.clickListener = function (e) {
_this.click({
e: e
});
_this.$scope.$apply();
};
_this.map.addEventListener('click', clickListener);
});
}
}, {
key: '$onChanges',
value: function $onChanges(changes) {
if (!this.map) {
return;
}
map_refresh(this.map, changes.mapOptions.currentValue);
}
}, {
key: '$onDestroy',
value: function $onDestroy() {
this.map.removeEventListener('click', this.clickListener);
}
}, {
key: 'addOverlay',
value: function addOverlay(marker) {
return baiduMap_handleMapOperation(this.map, 'addOverlay', marker);
}
}, {
key: 'removeOverlay',
value: function removeOverlay(marker) {
return baiduMap_handleMapOperation(this.map, 'removeOverlay', marker);
}
}, {
key: 'addControl',
value: function addControl(control) {
return baiduMap_handleMapOperation(this.map, 'addControl', control);
}
}, {
key: 'removeControl',
value: function removeControl(control) {
return baiduMap_handleMapOperation(this.map, 'removeControl', control);
}
}, {
key: 'getMap',
value: function getMap() {
return this.map;
}
}]);
return controller;
}()
});
function baiduMap_handleMapOperation(map, method) {
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
args[_key - 2] = arguments[_key];
}
return new Promise(function (resolve) {
map[method].apply(map, args);
resolve();
});
}
// CONCATENATED MODULE: ./src/helper/transformer.js
Object(__WEBPACK_IMPORTED_MODULE_6__helper_preset__["a" /* globalConstants */])();
var moduleName = 'baiduMap';
__WEBPACK_IMPORTED_MODULE_0_angular___default.a.module(moduleName, []).provider('mapScriptService', __WEBPACK_IMPORTED_MODULE_5__provider_mapScript__["a" /* default */]).component('baiduMap', __WEBPACK_IMPORTED_MODULE_1__components_baiduMap__["a" /* default */]).component('marker', __WEBPACK_IMPORTED_MODULE_2__components_marker__["a" /* default */]).component('control', __WEBPACK_IMPORTED_MODULE_3__components_control__["a" /* default */]).component('overlay', __WEBPACK_IMPORTED_MODULE_4__components_overlay__["a" /* default */]);
function transformer_transformIcon(icon, field) {
var opts = {
url: icon.url
};
nullCheck(icon.url, 'url is required in ' + field);
nullCheck(icon.size, 'size is required in ' + field);
opts.size = transformer_transformSize(icon.size, field + '.size');
return new BMap.Icon(opts.url, opts.size);
}
var ngBaiduMap = moduleName;
function transformer_transformSize(size, field) {
nullCheck(size.width, 'width is required in ' + field);
nullCheck(size.height, 'height is required in ' + field);
return new BMap.Size(size.width, size.height);
}
/***/ }),
/* 2 */
/***/ (function(module, exports) {
function transformer_transformPoint(point, field) {
nullCheck(point.longitude, 'longitude is required in ' + field);
nullCheck(point.latitude, 'latitude is required in ' + field);
return new BMap.Point(point.longitude, point.latitude);
}
module.exports = __WEBPACK_EXTERNAL_MODULE_2__;
function transformer_transformPoints(points, field) {
arrayCheck(points, field + ' must be Array');
return points.map(function (point) {
nullCheck(point.longitude, 'longitude is required in ' + field);
nullCheck(point.latitude, 'latitude is required in ' + field);
return new BMap.Point(point.longitude, point.latitude);
});
}
// CONCATENATED MODULE: ./src/components/marker.js
var marker_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
/***/ }),
/* 3 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
function marker_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__helper_map__ = __webpack_require__(5);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/* harmony default export */ var components_marker = ({
bindings: {
point: '<',
options: '<',
loaded: '&',
click: '&'
},
require: {
mapCtrl: '^baiduMap'
},
template: '',
controller: function () {
/* @ngInject */
function controller($scope, $attrs) {
marker_classCallCheck(this, controller);
this.$scope = $scope;
this.$attrs = $attrs;
}
/* harmony default export */ __webpack_exports__["a"] = ({
bindings: {
offlineTxt: '<',
mapOptions: '<',
loaded: '&',
click: '&'
},
transclude: true,
template: '\n <div ng-style="$ctrl.style.map" class="baidu-map-instance"></div>\n <div ng-style="$ctrl.style.offline" class="baidu-map-offline">\n <label ng-style="$ctrl.style.offlineLabel">{{ $ctrl.offlineTxt || \'NO_NETWORK\' }}</label>\n </div>\n <div ng-transclude style="display: none"></div>\n ',
controller: function () {
/* @ngInject */
function controller($scope, $element, $attrs, mapScriptService) {
_classCallCheck(this, controller);
marker_createClass(controller, [{
key: '$onInit',
value: function $onInit() {
var _this = this;
this.$scope = $scope;
this.$element = $element;
this.$attrs = $attrs;
this.style = __WEBPACK_IMPORTED_MODULE_0__style__;
this.mapScriptService = mapScriptService;
}
nullCheck(this.point, 'point is required for <marker>');
_createClass(controller, [{
key: '$onInit',
value: function $onInit() {
var _this = this;
this.mapCtrl.mapReady.then(function () {
var point = transformer_transformPoint(_this.point, '<marker> point');
var opts = marker_transformOptions(_this.options);
var marker = _this.marker = new BMap.Marker(point, opts);
_this.mapCtrl.addOverlay(marker);
return marker;
}).then(function (marker) {
_this.loaded({
marker: marker
});
_this.$scope.$apply();
this.mapReady = this.mapScriptService.load().then(function () {
return Object(__WEBPACK_IMPORTED_MODULE_1__helper_map__["a" /* create */])(_this.$element.children()[0], _this.mapOptions);
}).then(function (map) {
_this.loaded({
map: map
});
_this.$scope.$apply();
//eslint-disable-next-line
return _this.map = map;
}).then(function () {
if (!_this.$attrs.click) {
return;
}
var clickListener = _this.clickListener = function (e) {
_this.click({
e: e
});
_this.$scope.$apply();
};
_this.map.addEventListener('click', clickListener);
});
}
}, {
key: '$onChanges',
value: function $onChanges(changes) {
if (!this.map) {
return;
}
Object(__WEBPACK_IMPORTED_MODULE_1__helper_map__["b" /* refresh */])(this.map, changes.mapOptions.currentValue);
}
}, {
key: '$onDestroy',
value: function $onDestroy() {
this.map.removeEventListener('click', this.clickListener);
}
}, {
key: 'addOverlay',
value: function addOverlay(marker) {
return handleMapOperation(this.map, 'addOverlay', marker);
}
}, {
key: 'removeOverlay',
value: function removeOverlay(marker) {
return handleMapOperation(this.map, 'removeOverlay', marker);
}
}, {
key: 'addControl',
value: function addControl(control) {
return handleMapOperation(this.map, 'addControl', control);
}
}, {
key: 'removeControl',
value: function removeControl(control) {
return handleMapOperation(this.map, 'removeControl', control);
}
}, {
key: 'getMap',
value: function getMap() {
return this.map;
}
}]);
if (!_this.$attrs.click) {
return;
}
_this.clickHandler = function (e) {
_this.click({
e: e,
marker: marker,
map: _this.mapCtrl.getMap()
});
_this.$scope.$apply();
};
marker.addEventListener('click', _this.clickHandler);
});
}
}, {
key: '$onChanges',
value: function $onChanges(changes) {
if (!this.marker) {
return;
}
if (changes.point && changes.point.currentValue) {
this.marker.setPosition(transformer_transformPoint(changes.point.currentValue, '<marker> point'));
}
}
}, {
key: '$onDestroy',
value: function $onDestroy() {
this.marker.removeEventListener('click', this.clickHandler);
this.mapCtrl.removeOverlay(this.marker);
}
}]);
return controller;
}()
return controller;
}()
});
function handleMapOperation(map, method) {
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
args[_key - 2] = arguments[_key];
}
return new Promise(function (resolve) {
map[method].apply(map, args);
resolve();
});
function marker_transformOptions(options) {
var opts = JSON.parse(JSON.stringify(options || {}));
if (opts.offset) {
opts.offset = transformer_transformSize(opts.offset, '<marker> options.offset');
}
if (opts.icon) {
opts.icon = transformer_transformIcon(opts.icon, '<marker> options.icon');
}
if (opts.shadow) {
opts.shadow = transformer_transformIcon(opts.shadow, '<marker> options.shadow');
}
return opts;
}
// CONCATENATED MODULE: ./src/components/polyline.js
var polyline_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
/***/ }),
/* 4 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
function polyline_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "offline", function() { return offline; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "offlineLabel", function() { return offlineLabel; });
var map = {
width: '100%',
height: '100%',
display: 'none'
};
var offline = {
width: '100%',
height: '100%',
backgroundColor: '#E6E6E6',
position: 'relative',
display: 'none'
};
var offlineLabel = {
fontSize: '30px',
margin: 0,
position: 'absolute',
top: '50%',
left: '50%',
'margin-right': '-50%',
transform: 'translate(-50%, -50%)'
};
/***/ }),
/* 5 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
/* harmony default export */ var components_polyline = ({
bindings: {
points: '<',
options: '<',
loaded: '&'
},
require: {
mapCtrl: '^baiduMap'
},
template: '',
controller: function () {
/* @ngInject */
function controller($scope, $attrs) {
polyline_classCallCheck(this, controller);
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = create;
/* harmony export (immutable) */ __webpack_exports__["b"] = refresh;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__validate__ = __webpack_require__(0);
this.$scope = $scope;
this.$attrs = $attrs;
}
polyline_createClass(controller, [{
key: '$onInit',
value: function $onInit() {
var _this = this;
var DEFAULT_COORDINATION = {
longitude: 121.506191,
latitude: 31.245554
};
nullCheck(this.points, 'points is required for <polyline>');
var DEFAULT_ZOOM = 10;
this.mapCtrl.mapReady.then(function () {
var points = transformer_transformPoints(_this.points, '<polyline> points');
var opts = _this.options;
var polyline = _this.polyline = new BMap.Polyline(points, opts);
_this.mapCtrl.addOverlay(polyline);
return polyline;
}).then(function (polyline) {
_this.loaded({
polyline: polyline
});
_this.$scope.$apply();
});
}
}, {
key: '$onChanges',
value: function $onChanges(changes) {
if (!this.polyline) {
return;
}
if (changes.points && changes.points.currentValue) {
this.polyline.setPath(transformer_transformPoints(changes.points.currentValue, '<polyline> points'));
}
if (!changes.options || !changes.options.currentValue) {
return;
}
if (!isUndefined(changes.options.currentValue.strokeColor)) {
this.polyline.setStrokeColor(changes.options.currentValue.strokeColor);
}
if (!isUndefined(changes.options.currentValue.strokeWeight)) {
this.polyline.setStrokeWeight(changes.options.currentValue.strokeWeight);
}
if (!isUndefined(changes.options.currentValue.strokeOpacity)) {
this.polyline.setStrokeOpacity(changes.options.currentValue.strokeOpacity);
}
if (!isUndefined(changes.options.currentValue.strokeStyle)) {
this.polyline.setStrokeStyle(changes.options.currentValue.strokeStyle);
}
function create(element, mapOptions) {
var map = new BMap.Map(element, mapOptions);
if (!isUndefined(changes.options.currentValue.enableMassClear)) {
this.polyline[changes.options.currentValue.enableMassClear ? 'enableMassClear' : 'disableMassClear']();
}
if (!isUndefined(changes.options.currentValue.enableEditing)) {
this.polyline[changes.options.currentValue.enableEditing ? 'enableEditing' : 'disableEditing']();
}
}
}, {
key: '$onDestroy',
value: function $onDestroy() {
this.mapCtrl.removeOverlay(this.polyline);
}
}]);
refresh(map, mapOptions);
return controller;
}()
});
// CONCATENATED MODULE: ./src/components/circle.js
var circle_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
return map;
}
function circle_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function refresh(map, mapOptions) {
if (!Object(__WEBPACK_IMPORTED_MODULE_0__validate__["c" /* isNull */])(mapOptions) && !Object(__WEBPACK_IMPORTED_MODULE_0__validate__["c" /* isNull */])(mapOptions.disableDragging)) {
map[(mapOptions.disableDragging ? 'disable' : 'enable') + 'Dragging']();
}
if (!Object(__WEBPACK_IMPORTED_MODULE_0__validate__["c" /* isNull */])(mapOptions) && !Object(__WEBPACK_IMPORTED_MODULE_0__validate__["c" /* isNull */])(mapOptions.enableScrollWheelZoom)) {
map[(mapOptions.enableScrollWheelZoom ? 'enable' : 'disable') + 'ScrollWheelZoom']();
}
if (!Object(__WEBPACK_IMPORTED_MODULE_0__validate__["c" /* isNull */])(mapOptions) && !Object(__WEBPACK_IMPORTED_MODULE_0__validate__["c" /* isNull */])(mapOptions.disableDoubleClickZoom)) {
map[(mapOptions.disableDoubleClickZoom ? 'disable' : 'enable') + 'DoubleClickZoom']();
}
if (!Object(__WEBPACK_IMPORTED_MODULE_0__validate__["c" /* isNull */])(mapOptions) && !Object(__WEBPACK_IMPORTED_MODULE_0__validate__["c" /* isNull */])(mapOptions.enableKeyboard)) {
map[(mapOptions.enableKeyboard ? 'enable' : 'disable') + 'Keyboard']();
}
if (!Object(__WEBPACK_IMPORTED_MODULE_0__validate__["c" /* isNull */])(mapOptions) && !Object(__WEBPACK_IMPORTED_MODULE_0__validate__["c" /* isNull */])(mapOptions.enableInertialDragging)) {
map[(mapOptions.enableInertialDragging ? 'enable' : 'disable') + 'InertialDragging']();
}
if (!Object(__WEBPACK_IMPORTED_MODULE_0__validate__["c" /* isNull */])(mapOptions) && !Object(__WEBPACK_IMPORTED_MODULE_0__validate__["c" /* isNull */])(mapOptions.enableContinuousZoom)) {
map[(mapOptions.enableContinuousZoom ? 'enable' : 'disable') + 'ContinuousZoom']();
}
if (!Object(__WEBPACK_IMPORTED_MODULE_0__validate__["c" /* isNull */])(mapOptions) && !Object(__WEBPACK_IMPORTED_MODULE_0__validate__["c" /* isNull */])(mapOptions.disablePinchToZoom)) {
map[(mapOptions.disablePinchToZoom ? 'disable' : 'enable') + 'PinchToZoom']();
}
!Object(__WEBPACK_IMPORTED_MODULE_0__validate__["c" /* isNull */])(mapOptions) && !Object(__WEBPACK_IMPORTED_MODULE_0__validate__["c" /* isNull */])(mapOptions.cursor) && map.setDefaultCursor(mapOptions.cursor);
!Object(__WEBPACK_IMPORTED_MODULE_0__validate__["c" /* isNull */])(mapOptions) && !Object(__WEBPACK_IMPORTED_MODULE_0__validate__["c" /* isNull */])(mapOptions.draggingCursor) && map.setDraggingCursor(mapOptions.draggingCursor);
!Object(__WEBPACK_IMPORTED_MODULE_0__validate__["c" /* isNull */])(mapOptions) && !Object(__WEBPACK_IMPORTED_MODULE_0__validate__["c" /* isNull */])(mapOptions.currentCity) && map.setCurrentCity(mapOptions.currentCity);
!Object(__WEBPACK_IMPORTED_MODULE_0__validate__["c" /* isNull */])(mapOptions) && !Object(__WEBPACK_IMPORTED_MODULE_0__validate__["c" /* isNull */])(mapOptions.centerAndZoom) && map.centerAndZoom(new BMap.Point(mapOptions.centerAndZoom.longitude || DEFAULT_COORDINATION.longitude, mapOptions.centerAndZoom.latitude || DEFAULT_COORDINATION.latitude), mapOptions.centerAndZoom.zoom || DEFAULT_ZOOM);
}
/***/ }),
/* 6 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__helper_validate__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__helper_transformer__ = __webpack_require__(7);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/* harmony default export */ var components_circle = ({
bindings: {
center: '<',
radius: '<',
options: '<',
loaded: '&'
},
require: {
mapCtrl: '^baiduMap'
},
template: '',
controller: function () {
/* @ngInject */
function controller($scope, $attrs) {
circle_classCallCheck(this, controller);
this.$scope = $scope;
this.$attrs = $attrs;
}
circle_createClass(controller, [{
key: '$onInit',
value: function $onInit() {
var _this = this;
nullCheck(this.center, 'center is required for <circle>');
nullCheck(this.radius, 'radius is required for <circle>');
/* harmony default export */ __webpack_exports__["a"] = ({
bindings: {
point: '<',
options: '<',
click: '&'
},
require: {
mapCtrl: '^baiduMap'
},
template: '',
controller: function () {
/* @ngInject */
function controller($scope, $attrs) {
_classCallCheck(this, controller);
this.mapCtrl.mapReady.then(function () {
var center = _this.center,
radius = _this.radius,
options = _this.options;
this.$scope = $scope;
this.$attrs = $attrs;
var point = transformer_transformPoint(center, '<circle> center');
var circle = _this.circle = new BMap.Circle(point, radius, options);
_this.mapCtrl.addOverlay(circle);
return circle;
}).then(function (circle) {
_this.loaded({
circle: circle
});
_this.$scope.$apply();
});
}
}, {
key: '$onChanges',
value: function $onChanges(changes) {
if (!this.circle) {
return;
}
if (changes.center && changes.center.currentValue) {
this.circle.setCenter(transformer_transformPoint(changes.center.currentValue, '<circle> center'));
}
if (changes.radius && changes.radius.currentValue) {
this.circle.setRadius(changes.radius.currentValue);
}
if (!changes.options || !changes.options.currentValue) {
return;
}
_createClass(controller, [{
key: '$onInit',
value: function $onInit() {
var _this = this;
if (!isUndefined(changes.options.currentValue.strokeColor)) {
this.circle.setStrokeColor(changes.options.currentValue.strokeColor);
}
if (!isUndefined(changes.options.currentValue.strokeWeight)) {
this.circle.setStrokeWeight(changes.options.currentValue.strokeWeight);
}
if (!isUndefined(changes.options.currentValue.strokeOpacity)) {
this.circle.setStrokeOpacity(changes.options.currentValue.strokeOpacity);
}
if (!isUndefined(changes.options.currentValue.strokeStyle)) {
this.circle.setStrokeStyle(changes.options.currentValue.strokeStyle);
}
if (!isUndefined(changes.options.currentValue.fillOpacity)) {
this.circle.setFillOpacity(changes.options.currentValue.fillOpacity);
}
if (!isUndefined(changes.options.currentValue.fillColor)) {
this.circle.setFillColor(changes.options.currentValue.fillColor);
}
Object(__WEBPACK_IMPORTED_MODULE_0__helper_validate__["d" /* nullCheck */])(this.point, 'point is required for <marker>');
if (!isUndefined(changes.options.currentValue.enableMassClear)) {
this.circle[changes.options.currentValue.enableMassClear ? 'enableMassClear' : 'disableMassClear']();
}
this.mapCtrl.mapReady.then(function () {
var point = Object(__WEBPACK_IMPORTED_MODULE_1__helper_transformer__["b" /* transformPoint */])(_this.point, '<marker> point');
var opts = transformOptions(_this.options);
var marker = _this.marker = new BMap.Marker(point, opts);
_this.mapCtrl.addOverlay(marker);
return marker;
}).then(function (marker) {
if (!_this.$attrs.click) {
return;
}
_this.clickHandler = function (e) {
_this.click({
e: e,
marker: marker,
map: _this.mapCtrl.getMap()
});
_this.$scope.$apply();
};
marker.addEventListener('click', _this.clickHandler);
});
}
}, {
key: '$onChanges',
value: function $onChanges(changes) {
if (!this.marker) {
return;
}
if (changes.point && changes.point.currentValue) {
this.marker.setPosition(Object(__WEBPACK_IMPORTED_MODULE_1__helper_transformer__["b" /* transformPoint */])(changes.point.currentValue, '<marker> point'));
}
}
}, {
key: '$onDestroy',
value: function $onDestroy() {
this.marker.removeEventListener('click', this.clickHandler);
this.mapCtrl.removeOverlay(this.marker);
}
}]);
if (!isUndefined(changes.options.currentValue.enableEditing)) {
this.circle[changes.options.currentValue.enableEditing ? 'enableEditing' : 'disableEditing']();
}
}
}, {
key: '$onDestroy',
value: function $onDestroy() {
this.mapCtrl.removeOverlay(this.circle);
}
}]);
return controller;
}()
return controller;
}()
});
// CONCATENATED MODULE: ./src/components/polygon.js
var polygon_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function transformOptions(options) {
var opts = JSON.parse(JSON.stringify(options || {}));
if (opts.offset) {
opts.offset = Object(__WEBPACK_IMPORTED_MODULE_1__helper_transformer__["c" /* transformSize */])(opts.offset, '<marker> options.offset');
function polygon_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/* harmony default export */ var components_polygon = ({
bindings: {
points: '<',
options: '<',
loaded: '&'
},
require: {
mapCtrl: '^baiduMap'
},
template: '',
controller: function () {
/* @ngInject */
function controller($scope, $attrs) {
polygon_classCallCheck(this, controller);
this.$scope = $scope;
this.$attrs = $attrs;
}
if (opts.icon) {
opts.icon = Object(__WEBPACK_IMPORTED_MODULE_1__helper_transformer__["a" /* transformIcon */])(opts.icon, '<marker> options.icon');
}
if (opts.shadow) {
opts.shadow = Object(__WEBPACK_IMPORTED_MODULE_1__helper_transformer__["a" /* transformIcon */])(opts.shadow, '<marker> options.shadow');
}
return opts;
}
/***/ }),
/* 7 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
polygon_createClass(controller, [{
key: '$onInit',
value: function $onInit() {
var _this = this;
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = transformIcon;
/* harmony export (immutable) */ __webpack_exports__["c"] = transformSize;
/* harmony export (immutable) */ __webpack_exports__["b"] = transformPoint;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__validate__ = __webpack_require__(0);
nullCheck(this.points, 'points is required for <polygon>');
this.mapCtrl.mapReady.then(function () {
var points = transformer_transformPoints(_this.points, '<polygon> points');
var opts = _this.options;
var polygon = _this.polygon = new BMap.Polygon(points, opts);
_this.mapCtrl.addOverlay(polygon);
return polygon;
}).then(function (polygon) {
_this.loaded({
polygon: polygon
});
_this.$scope.$apply();
});
}
}, {
key: '$onChanges',
value: function $onChanges(changes) {
if (!this.polygon) {
return;
}
if (changes.points && changes.points.currentValue) {
this.polygon.setPath(transformer_transformPoints(changes.points.currentValue, '<polygon> points'));
}
if (!changes.options || !changes.options.currentValue) {
return;
}
if (!isUndefined(changes.options.currentValue.strokeColor)) {
this.polygon.setStrokeColor(changes.options.currentValue.strokeColor);
}
if (!isUndefined(changes.options.currentValue.fillColor)) {
this.polygon.setFillColor(changes.options.currentValue.fillColor);
}
if (!isUndefined(changes.options.currentValue.strokeWeight)) {
this.polygon.setStrokeWeight(changes.options.currentValue.strokeWeight);
}
if (!isUndefined(changes.options.currentValue.strokeOpacity)) {
this.polygon.setStrokeOpacity(changes.options.currentValue.strokeOpacity);
}
if (!isUndefined(changes.options.currentValue.fillOpacity)) {
this.polygon.setFillOpacity(changes.options.currentValue.fillOpacity);
}
if (!isUndefined(changes.options.currentValue.strokeStyle)) {
this.polygon.setStrokeStyle(changes.options.currentValue.strokeStyle);
}
function transformIcon(icon, field) {
var opts = {
url: icon.url
if (!isUndefined(changes.options.currentValue.enableMassClear)) {
this.polygon[changes.options.currentValue.enableMassClear ? 'enableMassClear' : 'disableMassClear']();
}
if (!isUndefined(changes.options.currentValue.enableEditing)) {
this.polygon[changes.options.currentValue.enableEditing ? 'enableEditing' : 'disableEditing']();
}
}
}, {
key: '$onDestroy',
value: function $onDestroy() {
this.mapCtrl.removeOverlay(this.polygon);
}
}]);
return controller;
}()
});
// CONCATENATED MODULE: ./src/helper/heatmapScriptLoader.js
var SCRIPT_URL = '//api.map.baidu.com/library/Heatmap/2.0/src/Heatmap_min.js';
/* harmony default export */ var heatmapScriptLoader = (function () {
var loadHeatMapPromise = window.loadHeatMapPromise;
if (loadHeatMapPromise) {
return loadHeatMapPromise;
}
// eslint-disable-next-line
return window.loadHeatMapPromise = heatmapScriptLoader_appendScriptTag(SCRIPT_URL);
});
function heatmapScriptLoader_appendScriptTag(url) {
return new Promise(function (resolve, reject) {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
script.onerror = function () {
document.body.removeChild(script);
setTimeout(function () {
heatmapScriptLoader_appendScriptTag(url);
}, 30000);
};
Object(__WEBPACK_IMPORTED_MODULE_0__validate__["d" /* nullCheck */])(icon.url, 'url is required in ' + field);
Object(__WEBPACK_IMPORTED_MODULE_0__validate__["d" /* nullCheck */])(icon.size, 'size is required in ' + field);
opts.size = transformSize(icon.size, field + '.size');
return new BMap.Icon(opts.url, opts.size);
script.onload = resolve;
document.body.appendChild(script);
});
}
// CONCATENATED MODULE: ./src/components/heatmap.js
var heatmap_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function transformSize(size, field) {
Object(__WEBPACK_IMPORTED_MODULE_0__validate__["d" /* nullCheck */])(size.width, 'width is required in ' + field);
Object(__WEBPACK_IMPORTED_MODULE_0__validate__["d" /* nullCheck */])(size.height, 'height is required in ' + field);
return new BMap.Size(size.width, size.height);
}
function heatmap_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function transformPoint(point, field) {
Object(__WEBPACK_IMPORTED_MODULE_0__validate__["d" /* nullCheck */])(point.longitude, 'longitude is required in ' + field);
Object(__WEBPACK_IMPORTED_MODULE_0__validate__["d" /* nullCheck */])(point.latitude, 'latitude is required in ' + field);
return new BMap.Point(point.longitude, point.latitude);
}
/***/ }),
/* 8 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__helper_validate__ = __webpack_require__(0);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
/* harmony default export */ var heatmap = ({
bindings: {
dataset: '<',
options: '<',
loaded: '&'
},
require: {
mapCtrl: '^baiduMap'
},
template: '',
controller: function () {
/* @ngInject */
function controller($scope, $attrs) {
heatmap_classCallCheck(this, controller);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
this.$scope = $scope;
this.$attrs = $attrs;
}
heatmap_createClass(controller, [{
key: '$onInit',
value: function $onInit() {
var _this = this;
this.mapCtrl.mapReady.then(function () {
return heatmapScriptLoader();
}).then(function () {
var heatmap = _this.heatmap = new BMapLib.HeatmapOverlay(_this.options);
_this.mapCtrl.addOverlay(heatmap);
return heatmap;
}).then(function (heatmap) {
_this.loaded({
heatmap: heatmap
});
_this.$scope.$apply();
if (_this.dataset) {
heatmap.setDataSet(_this.dataset);
}
});
}
}, {
key: '$onChanges',
value: function $onChanges(changes) {
if (!this.heatmap) {
return;
}
if (changes.options && changes.options.currentValue) {
this.heatmap.setOptions(changes.options.currentValue);
}
if (changes.dataset && changes.dataset.currentValue) {
this.heatmap.setDataSet(changes.dataset.currentValue);
}
}
}, {
key: '$onDestroy',
value: function $onDestroy() {
this.mapCtrl.removeOverlay(this.heatmap);
}
}]);
/* harmony default export */ __webpack_exports__["a"] = ({
return controller;
}()
});
// CONCATENATED MODULE: ./src/components/control.js
var control_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function control_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/* harmony default export */ var control = ({
bindings: {

@@ -528,6 +866,6 @@ type: '@',

function controller() {
_classCallCheck(this, controller);
control_classCallCheck(this, controller);
}
_createClass(controller, [{
control_createClass(controller, [{
key: '$onInit',

@@ -537,6 +875,6 @@ value: function $onInit() {

Object(__WEBPACK_IMPORTED_MODULE_0__helper_validate__["a" /* controlTypeCheck */])(this.type);
controlTypeCheck(this.type);
this.mapCtrl.mapReady.then(function () {
return createControl(_this.type.toLowerCase(), _this.options);
return control_createControl(_this.type.toLowerCase(), _this.options);
}).then(function (control) {

@@ -559,3 +897,3 @@ _this.mapCtrl.addControl(control);

function createControl(type, options) {
function control_createControl(type, options) {
if (type === 'navigation') {

@@ -575,3 +913,3 @@ return new BMap.NavigationControl(options);

var copyright = new BMap.CopyrightControl(options);
if (Object(__WEBPACK_IMPORTED_MODULE_0__helper_validate__["b" /* isArray */])(options.copyrights)) {
if (isArray(options.copyrights)) {
options.copyrights.forEach(function (r) {

@@ -590,13 +928,14 @@ copyright.addCopyright(r);

}
// CONCATENATED MODULE: ./src/components/heatmap/index.js
/***/ }),
/* 9 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__helper_validate__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__heatmap__ = __webpack_require__(10);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function heatmap_createHeatmapOverlay(options) {
return heatmapScriptLoader().then(function () {
return new BMapLib.HeatmapOverlay(options);
});
}
// CONCATENATED MODULE: ./src/components/overlay.js
var overlay_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function overlay_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -606,128 +945,71 @@

/* harmony default export */ __webpack_exports__["a"] = ({
bindings: {
type: '@',
options: '<',
dataset: '<'
},
require: {
mapCtrl: '^baiduMap'
},
template: '',
controller: function () {
/* @ngInject */
function controller() {
_classCallCheck(this, controller);
}
/* harmony default export */ var overlay = ({
bindings: {
type: '@',
options: '<',
dataset: '<'
},
require: {
mapCtrl: '^baiduMap'
},
template: '',
controller: function () {
function controller() {
overlay_classCallCheck(this, controller);
}
_createClass(controller, [{
key: '$onInit',
value: function $onInit() {
var _this = this;
overlay_createClass(controller, [{
key: '$onInit',
value: function $onInit() {
var _this = this;
Object(__WEBPACK_IMPORTED_MODULE_0__helper_validate__["e" /* overlayTypeCheck */])(this.type);
overlayTypeCheck(this.type);
this.realType = this.type.toLowerCase();
this.realType = this.type.toLowerCase();
this.mapCtrl.mapReady.then(function () {
return createOverlay(_this.realType, _this.options);
}).then(function (overlay) {
_this.mapCtrl.addOverlay(overlay);
_this.overlay = overlay;
setExtraData(_this.realType, _this.overlay, _this.dataset);
return overlay;
});
}
}, {
key: '$onChanges',
value: function $onChanges(changes) {
if (changes.dataset && changes.dataset.currentValue) {
setExtraData(this.realType, this.overlay, changes.dataset.currentValue);
}
}
}, {
key: '$onDestroy',
value: function $onDestroy() {
this.mapCtrl.removeOverlay(this.overlay);
}
}]);
this.mapCtrl.mapReady.then(function () {
return overlay_createOverlay(_this.realType, _this.options);
}).then(function (overlay) {
_this.mapCtrl.addOverlay(overlay);
_this.overlay = overlay;
overlay_setExtraData(_this.realType, _this.overlay, _this.dataset);
return overlay;
});
}
}, {
key: '$onChanges',
value: function $onChanges(changes) {
if (changes.dataset && changes.dataset.currentValue) {
overlay_setExtraData(this.realType, this.overlay, changes.dataset.currentValue);
}
}
}, {
key: '$onDestroy',
value: function $onDestroy() {
this.mapCtrl.removeOverlay(this.overlay);
}
}]);
return controller;
}()
return controller;
}()
});
function createOverlay(type, options) {
if (type === 'heatmap') {
return Object(__WEBPACK_IMPORTED_MODULE_1__heatmap__["a" /* createHeatmapOverlay */])(options);
}
function overlay_createOverlay(type, options) {
if (type === 'heatmap') {
console.warn('heatmap type is deprecated, please try with new <heatmap /> component, see: https://leftstick.github.io/BaiduMapForAngularJS/#!/apidoc?api=heatmap');
return heatmap_createHeatmapOverlay(options);
}
}
function setExtraData(type, overlay, data) {
if (type === 'heatmap') {
if (data) {
overlay.setDataSet(data);
}
function overlay_setExtraData(type, overlay, data) {
if (type === 'heatmap') {
if (data) {
overlay.setDataSet(data);
}
}
}
// CONCATENATED MODULE: ./src/provider/mapScript.js
/***/ }),
/* 10 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = createHeatmapOverlay;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__helper_heatmapScriptLoader__ = __webpack_require__(11);
function createHeatmapOverlay(options) {
return Object(__WEBPACK_IMPORTED_MODULE_0__helper_heatmapScriptLoader__["a" /* default */])().then(function () {
return new BMapLib.HeatmapOverlay(options);
});
}
/***/ }),
/* 11 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
var SCRIPT_URL = '//api.map.baidu.com/library/Heatmap/2.0/src/Heatmap_min.js';
/* harmony default export */ __webpack_exports__["a"] = (function () {
var loadHeatMapPromise = window.loadHeatMapPromise;
if (loadHeatMapPromise) {
return loadHeatMapPromise;
}
//eslint-disable-next-line
return window.loadHeatMapPromise = appendScriptTag(SCRIPT_URL);
});
function appendScriptTag(url) {
return new Promise(function (resolve, reject) {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
script.onerror = function () {
document.body.removeChild(script);
setTimeout(function () {
appendScriptTag(url);
}, 30000);
};
script.onload = resolve;
document.body.appendChild(script);
});
}
/***/ }),
/* 12 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__helper_validate__ = __webpack_require__(0);
/* harmony default export */ __webpack_exports__["a"] = (function () {
/* harmony default export */ var mapScript = (function () {
var ak = null,

@@ -752,7 +1034,7 @@ MAP_URL = void 0;

load: function load() {
Object(__WEBPACK_IMPORTED_MODULE_0__helper_validate__["d" /* nullCheck */])(ak, 'ak should be set before use. Read: https://leftstick.github.io/BaiduMapForAngularJS/#!/quickstart');
nullCheck(ak, 'ak should be set before use. Read: https://leftstick.github.io/BaiduMapForAngularJS/#!/quickstart');
var loadBaiduMapPromise = $rootScope.loadBaiduMapPromise;
if (loadBaiduMapPromise) {
return loadBaiduMapPromise.then(displayMap);
return loadBaiduMapPromise.then(mapScript_displayMap);
}

@@ -763,4 +1045,4 @@

window.baidumapinit = resolve;
appendScriptTag(MAP_URL);
}).then(displayMap);
mapScript_appendScriptTag(MAP_URL);
}).then(mapScript_displayMap);
}

@@ -771,3 +1053,3 @@ };

function appendScriptTag(url) {
function mapScript_appendScriptTag(url) {
var script = document.createElement('script');

@@ -783,3 +1065,3 @@ script.type = 'text/javascript';

setTimeout(function () {
appendScriptTag(url);
mapScript_appendScriptTag(url);
}, 30000);

@@ -790,3 +1072,3 @@ };

function displayMap() {
function mapScript_displayMap() {
return Array.prototype.slice.call(document.querySelectorAll('baidu-map')).forEach(function (node) {

@@ -797,11 +1079,5 @@ node.querySelector('.baidu-map-offline') && node.removeChild(node.querySelector('.baidu-map-offline'));

}
// CONCATENATED MODULE: ./src/helper/preset.js
/***/ }),
/* 13 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = globalConstants;
function globalConstants() {

@@ -854,5 +1130,27 @@ //ControlAnchor

}
// CONCATENATED MODULE: ./src/index.js
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ngBaiduMap", function() { return src_ngBaiduMap; });
globalConstants();
var src_moduleName = 'baiduMap';
external_angular_default.a.module(src_moduleName, []).provider('mapScriptService', mapScript).component('baiduMap', baiduMap).component('marker', components_marker).component('polyline', components_polyline).component('circle', components_circle).component('polygon', components_polygon).component('heatmap', heatmap).component('control', control).component('overlay', overlay);
var src_ngBaiduMap = src_moduleName;
/***/ })
/******/ ]);
});

@@ -1,1 +0,1 @@

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("angular"));else if("function"==typeof define&&define.amd)define(["angular"],t);else{var n=t("object"==typeof exports?require("angular"):e.angular);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}("undefined"!=typeof self?self:this,function(e){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(e,t,n){"use strict";function o(e,t){if(r(e))throw new Error(t)}function r(e){return null===e||void 0===e}function i(e){return"[object Array]"===Object.prototype.toString.call(e)}function a(e){if(u.indexOf((e||"").toLowerCase())<0)throw new Error("control type should be one of: ["+u.join(",")+"]")}function c(e){if(l.indexOf((e||"").toLowerCase())<0)throw new Error("overlay type should be one of: ["+l.join(",")+"]")}t.d=o,t.c=r,t.b=i,t.a=a,t.e=c;var u=["navigation","overviewmap","scale","maptype","copyright","geolocation","panorama"],l=["heatmap"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"ngBaiduMap",function(){return p});var o=n(2),r=n.n(o),i=n(3),a=n(6),c=n(8),u=n(9),l=n(12),s=n(13);Object(s.a)();r.a.module("baiduMap",[]).provider("mapScriptService",l.a).component("baiduMap",i.a).component("marker",a.a).component("control",c.a).component("overlay",u.a);var p="baiduMap"},function(t,n){t.exports=e},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=arguments.length,o=Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return new Promise(function(n){e[t].apply(e,o),n()})}var i=n(4),a=n(5),c=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();t.a={bindings:{offlineTxt:"<",mapOptions:"<",loaded:"&",click:"&"},transclude:!0,template:'\n <div ng-style="$ctrl.style.map" class="baidu-map-instance"></div>\n <div ng-style="$ctrl.style.offline" class="baidu-map-offline">\n <label ng-style="$ctrl.style.offlineLabel">{{ $ctrl.offlineTxt || \'NO_NETWORK\' }}</label>\n </div>\n <div ng-transclude style="display: none"></div>\n ',controller:function(){function e(t,n,r,a){o(this,e),this.$scope=t,this.$element=n,this.$attrs=r,this.style=i,this.mapScriptService=a}return e.$inject=["$scope","$element","$attrs","mapScriptService"],c(e,[{key:"$onInit",value:function(){var e=this;this.mapReady=this.mapScriptService.load().then(function(){return Object(a.a)(e.$element.children()[0],e.mapOptions)}).then(function(t){return e.loaded({map:t}),e.$scope.$apply(),e.map=t}).then(function(){if(e.$attrs.click){var t=e.clickListener=function(t){e.click({e:t}),e.$scope.$apply()};e.map.addEventListener("click",t)}})}},{key:"$onChanges",value:function(e){this.map&&Object(a.b)(this.map,e.mapOptions.currentValue)}},{key:"$onDestroy",value:function(){this.map.removeEventListener("click",this.clickListener)}},{key:"addOverlay",value:function(e){return r(this.map,"addOverlay",e)}},{key:"removeOverlay",value:function(e){return r(this.map,"removeOverlay",e)}},{key:"addControl",value:function(e){return r(this.map,"addControl",e)}},{key:"removeControl",value:function(e){return r(this.map,"removeControl",e)}},{key:"getMap",value:function(){return this.map}}]),e}()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"map",function(){return o}),n.d(t,"offline",function(){return r}),n.d(t,"offlineLabel",function(){return i});var o={width:"100%",height:"100%",display:"none"},r={width:"100%",height:"100%",backgroundColor:"#E6E6E6",position:"relative",display:"none"},i={fontSize:"30px",margin:0,position:"absolute",top:"50%",left:"50%","margin-right":"-50%",transform:"translate(-50%, -50%)"}},function(e,t,n){"use strict";function o(e,t){var n=new BMap.Map(e,t);return r(n,t),n}function r(e,t){Object(i.c)(t)||Object(i.c)(t.disableDragging)||e[(t.disableDragging?"disable":"enable")+"Dragging"](),Object(i.c)(t)||Object(i.c)(t.enableScrollWheelZoom)||e[(t.enableScrollWheelZoom?"enable":"disable")+"ScrollWheelZoom"](),Object(i.c)(t)||Object(i.c)(t.disableDoubleClickZoom)||e[(t.disableDoubleClickZoom?"disable":"enable")+"DoubleClickZoom"](),Object(i.c)(t)||Object(i.c)(t.enableKeyboard)||e[(t.enableKeyboard?"enable":"disable")+"Keyboard"](),Object(i.c)(t)||Object(i.c)(t.enableInertialDragging)||e[(t.enableInertialDragging?"enable":"disable")+"InertialDragging"](),Object(i.c)(t)||Object(i.c)(t.enableContinuousZoom)||e[(t.enableContinuousZoom?"enable":"disable")+"ContinuousZoom"](),Object(i.c)(t)||Object(i.c)(t.disablePinchToZoom)||e[(t.disablePinchToZoom?"disable":"enable")+"PinchToZoom"](),!Object(i.c)(t)&&!Object(i.c)(t.cursor)&&e.setDefaultCursor(t.cursor),!Object(i.c)(t)&&!Object(i.c)(t.draggingCursor)&&e.setDraggingCursor(t.draggingCursor),!Object(i.c)(t)&&!Object(i.c)(t.currentCity)&&e.setCurrentCity(t.currentCity),!Object(i.c)(t)&&!Object(i.c)(t.centerAndZoom)&&e.centerAndZoom(new BMap.Point(t.centerAndZoom.longitude||a.longitude,t.centerAndZoom.latitude||a.latitude),t.centerAndZoom.zoom||c)}t.a=o,t.b=r;var i=n(0),a={longitude:121.506191,latitude:31.245554},c=10},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){var t=JSON.parse(JSON.stringify(e||{}));return t.offset&&(t.offset=Object(a.c)(t.offset,"<marker> options.offset")),t.icon&&(t.icon=Object(a.a)(t.icon,"<marker> options.icon")),t.shadow&&(t.shadow=Object(a.a)(t.shadow,"<marker> options.shadow")),t}var i=n(0),a=n(7),c=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();t.a={bindings:{point:"<",options:"<",click:"&"},require:{mapCtrl:"^baiduMap"},template:"",controller:function(){function e(t,n){o(this,e),this.$scope=t,this.$attrs=n}return e.$inject=["$scope","$attrs"],c(e,[{key:"$onInit",value:function(){var e=this;Object(i.d)(this.point,"point is required for <marker>"),this.mapCtrl.mapReady.then(function(){var t=Object(a.b)(e.point,"<marker> point"),n=r(e.options),o=e.marker=new BMap.Marker(t,n);return e.mapCtrl.addOverlay(o),o}).then(function(t){e.$attrs.click&&(e.clickHandler=function(n){e.click({e:n,marker:t,map:e.mapCtrl.getMap()}),e.$scope.$apply()},t.addEventListener("click",e.clickHandler))})}},{key:"$onChanges",value:function(e){this.marker&&e.point&&e.point.currentValue&&this.marker.setPosition(Object(a.b)(e.point.currentValue,"<marker> point"))}},{key:"$onDestroy",value:function(){this.marker.removeEventListener("click",this.clickHandler),this.mapCtrl.removeOverlay(this.marker)}}]),e}()}},function(e,t,n){"use strict";function o(e,t){var n={url:e.url};return Object(a.d)(e.url,"url is required in "+t),Object(a.d)(e.size,"size is required in "+t),n.size=r(e.size,t+".size"),new BMap.Icon(n.url,n.size)}function r(e,t){return Object(a.d)(e.width,"width is required in "+t),Object(a.d)(e.height,"height is required in "+t),new BMap.Size(e.width,e.height)}function i(e,t){return Object(a.d)(e.longitude,"longitude is required in "+t),Object(a.d)(e.latitude,"latitude is required in "+t),new BMap.Point(e.longitude,e.latitude)}t.a=o,t.c=r,t.b=i;var a=n(0)},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if("navigation"===e)return new BMap.NavigationControl(t);if("overviewmap"===e)return new BMap.OverviewMapControl(t);if("scale"===e)return new BMap.ScaleControl(t);if("maptype"===e)return new BMap.MapTypeControl(t);if("copyright"===e){var n=new BMap.CopyrightControl(t);return Object(i.b)(t.copyrights)&&t.copyrights.forEach(function(e){n.addCopyright(e)}),n}return"geolocation"===e?new BMap.GeolocationControl(t):"panorama"===e?new BMap.PanoramaControl(t):void 0}var i=n(0),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();t.a={bindings:{type:"@",options:"<"},require:{mapCtrl:"^baiduMap"},template:"",controller:function(){function e(){o(this,e)}return a(e,[{key:"$onInit",value:function(){var e=this;Object(i.a)(this.type),this.mapCtrl.mapReady.then(function(){return r(e.type.toLowerCase(),e.options)}).then(function(t){return e.mapCtrl.addControl(t),e.control=t,t})}},{key:"$onDestroy",value:function(){this.mapCtrl.removeControl(this.control)}}]),e}()}},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if("heatmap"===e)return Object(c.a)(t)}function i(e,t,n){"heatmap"===e&&n&&t.setDataSet(n)}var a=n(0),c=n(10),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();t.a={bindings:{type:"@",options:"<",dataset:"<"},require:{mapCtrl:"^baiduMap"},template:"",controller:function(){function e(){o(this,e)}return u(e,[{key:"$onInit",value:function(){var e=this;Object(a.e)(this.type),this.realType=this.type.toLowerCase(),this.mapCtrl.mapReady.then(function(){return r(e.realType,e.options)}).then(function(t){return e.mapCtrl.addOverlay(t),e.overlay=t,i(e.realType,e.overlay,e.dataset),t})}},{key:"$onChanges",value:function(e){e.dataset&&e.dataset.currentValue&&i(this.realType,this.overlay,e.dataset.currentValue)}},{key:"$onDestroy",value:function(){this.mapCtrl.removeOverlay(this.overlay)}}]),e}()}},function(e,t,n){"use strict";function o(e){return Object(r.a)().then(function(){return new BMapLib.HeatmapOverlay(e)})}t.a=o;var r=n(11)},function(e,t,n){"use strict";function o(e){return new Promise(function(t,n){var r=document.createElement("script");r.type="text/javascript",r.src=e,r.onerror=function(){document.body.removeChild(r),setTimeout(function(){o(e)},3e4)},r.onload=t,document.body.appendChild(r)})}t.a=function(){var e=window.loadHeatMapPromise;return e||(window.loadHeatMapPromise=o("//api.map.baidu.com/library/Heatmap/2.0/src/Heatmap_min.js"))}},function(e,t,n){"use strict";function o(e){var t=document.createElement("script");t.type="text/javascript",t.src=e,t.onerror=function(){Array.prototype.slice.call(document.querySelectorAll("baidu-map .baidu-map-offline")).forEach(function(e){e.style.display="block"}),document.body.removeChild(t),setTimeout(function(){o(e)},3e4)},document.body.appendChild(t)}function r(){return Array.prototype.slice.call(document.querySelectorAll("baidu-map")).forEach(function(e){e.querySelector(".baidu-map-offline")&&e.removeChild(e.querySelector(".baidu-map-offline")),e.querySelector(".baidu-map-instance").style.display="block"})}var i=n(0);t.a=function(){var e=null,t=void 0;this.setKey=function(n){e=n,t="//api.map.baidu.com/api?v=2.0&ak="+e+"&callback=baidumapinit",t=location.protocol.indexOf("http")>-1?t+"&s="+("https:"===location.protocol?1:0):"https:"+t+"&s=1"},this.$get=["$rootScope",function(n){"ngInject";return{load:function(){Object(i.d)(e,"ak should be set before use. Read: https://leftstick.github.io/BaiduMapForAngularJS/#!/quickstart");var a=n.loadBaiduMapPromise;return a?a.then(r):n.loadBaiduMapPromise=new Promise(function(e,n){window.baidumapinit=e,o(t)}).then(r)}}}]}},function(e,t,n){"use strict";function o(){window.BMAP_ANCHOR_TOP_LEFT=0,window.BMAP_ANCHOR_TOP_RIGHT=1,window.BMAP_ANCHOR_BOTTOM_LEFT=2,window.BMAP_ANCHOR_BOTTOM_RIGHT=3,window.BMAP_NAVIGATION_CONTROL_LARGE=0,window.BMAP_NAVIGATION_CONTROL_SMALL=1,window.BMAP_NAVIGATION_CONTROL_PAN=2,window.BMAP_NAVIGATION_CONTROL_ZOOM=3,window.BMAP_UNIT_METRIC="metric",window.BMAP_UNIT_IMPERIAL="us",window.BMAP_MAPTYPE_CONTROL_HORIZONTAL=0,window.BMAP_MAPTYPE_CONTROL_DROPDOWN=1,window.BMAP_MAPTYPE_CONTROL_MAP=2,window.BMAP_ANIMATION_DROP=1,window.BMAP_ANIMATION_BOUNCE=2,window.BMAP_POINT_SIZE_TINY=1,window.BMAP_POINT_SIZE_SMALLER=2,window.BMAP_POINT_SIZE_SMALL=3,window.BMAP_POINT_SIZE_NORMAL=4,window.BMAP_POINT_SIZE_BIG=5,window.BMAP_POINT_SIZE_BIGGER=6,window.BMAP_POINT_SIZE_HUGE=7,window.BMAP_PANORAMA_INDOOR_SCENE="inter",window.BMAP_PANORAMA_STREET_SCENE="street",window.BMAP_PANORAMA_POI_HOTEL="hotel",window.BMAP_PANORAMA_POI_CATERING="catering",window.BMAP_PANORAMA_POI_MOVIE="movie",window.BMAP_PANORAMA_POI_TRANSIT="transit",window.BMAP_PANORAMA_POI_INDOOR_SCENE="indoor_scene",window.BMAP_PANORAMA_POI_NONE="none"}t.a=o}])});
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("angular"));else if("function"==typeof define&&define.amd)define(["angular"],t);else{var n="object"==typeof exports?t(require("angular")):t(e.angular);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(window,function(e){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(t,n){t.exports=e},function(e,t,n){"use strict";n.r(t);var o={};n.d(o,"map",function(){return a}),n.d(o,"offline",function(){return l}),n.d(o,"offlineLabel",function(){return u});var r=n(0),i=n.n(r),a={width:"100%",height:"100%",display:"none"},l={width:"100%",height:"100%",backgroundColor:"#E6E6E6",position:"relative",display:"none"},u={fontSize:"30px",margin:0,position:"absolute",top:"50%",left:"50%","margin-right":"-50%",transform:"translate(-50%, -50%)"};function s(e,t){if(c(e))throw new Error(t)}function c(e){return null===e||void 0===e}function p(e){return void 0===e}function d(e){return"[object Array]"===Object.prototype.toString.call(e)}var f=["navigation","overviewmap","scale","maptype","copyright","geolocation","panorama"];var y=["heatmap"];var h={longitude:121.506191,latitude:31.245554},m=10;function v(e,t){c(t)||c(t.disableDragging)||e[(t.disableDragging?"disable":"enable")+"Dragging"](),c(t)||c(t.enableScrollWheelZoom)||e[(t.enableScrollWheelZoom?"enable":"disable")+"ScrollWheelZoom"](),c(t)||c(t.disableDoubleClickZoom)||e[(t.disableDoubleClickZoom?"disable":"enable")+"DoubleClickZoom"](),c(t)||c(t.enableKeyboard)||e[(t.enableKeyboard?"enable":"disable")+"Keyboard"](),c(t)||c(t.enableInertialDragging)||e[(t.enableInertialDragging?"enable":"disable")+"InertialDragging"](),c(t)||c(t.enableContinuousZoom)||e[(t.enableContinuousZoom?"enable":"disable")+"ContinuousZoom"](),c(t)||c(t.disablePinchToZoom)||e[(t.disablePinchToZoom?"disable":"enable")+"PinchToZoom"](),!c(t)&&!c(t.cursor)&&e.setDefaultCursor(t.cursor),!c(t)&&!c(t.draggingCursor)&&e.setDraggingCursor(t.draggingCursor),!c(t)&&!c(t.currentCity)&&e.setCurrentCity(t.currentCity),!c(t)&&!c(t.centerAndZoom)&&e.centerAndZoom(new BMap.Point(t.centerAndZoom.longitude||h.longitude,t.centerAndZoom.latitude||h.latitude),t.centerAndZoom.zoom||m)}var b=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();var g={bindings:{offlineTxt:"<",mapOptions:"<",loaded:"&",click:"&"},transclude:!0,template:'\n <div ng-style="$ctrl.style.map" class="baidu-map-instance"></div>\n <div ng-style="$ctrl.style.offline" class="baidu-map-offline">\n <label ng-style="$ctrl.style.offlineLabel">{{ $ctrl.offlineTxt || \'NO_NETWORK\' }}</label>\n </div>\n <div ng-transclude style="display: none"></div>\n ',controller:function(){function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$scope=t,this.$element=n,this.$attrs=r,this.style=o,this.mapScriptService=i}return e.$inject=["$scope","$element","$attrs","mapScriptService"],b(e,[{key:"$onInit",value:function(){var e=this;this.mapReady=this.mapScriptService.load().then(function(){return t=e.$element.children()[0],n=e.mapOptions,v(o=new BMap.Map(t,n),n),o;var t,n,o}).then(function(t){return e.loaded({map:t}),e.$scope.$apply(),e.map=t}).then(function(){if(e.$attrs.click){var t=e.clickListener=function(t){e.click({e:t}),e.$scope.$apply()};e.map.addEventListener("click",t)}})}},{key:"$onChanges",value:function(e){this.map&&v(this.map,e.mapOptions.currentValue)}},{key:"$onDestroy",value:function(){this.map.removeEventListener("click",this.clickListener)}},{key:"addOverlay",value:function(e){return w(this.map,"addOverlay",e)}},{key:"removeOverlay",value:function(e){return w(this.map,"removeOverlay",e)}},{key:"addControl",value:function(e){return w(this.map,"addControl",e)}},{key:"removeControl",value:function(e){return w(this.map,"removeControl",e)}},{key:"getMap",value:function(){return this.map}}]),e}()};function w(e,t){for(var n=arguments.length,o=Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return new Promise(function(n){e[t].apply(e,o),n()})}function C(e,t){var n={url:e.url};return s(e.url,"url is required in "+t),s(e.size,"size is required in "+t),n.size=O(e.size,t+".size"),new BMap.Icon(n.url,n.size)}function O(e,t){return s(e.width,"width is required in "+t),s(e.height,"height is required in "+t),new BMap.Size(e.width,e.height)}function k(e,t){return s(e.longitude,"longitude is required in "+t),s(e.latitude,"latitude is required in "+t),new BMap.Point(e.longitude,e.latitude)}function M(e,t){return function(e,t){if(!d(e))throw new Error(t)}(e,t+" must be Array"),e.map(function(e){return s(e.longitude,"longitude is required in "+t),s(e.latitude,"latitude is required in "+t),new BMap.Point(e.longitude,e.latitude)})}var A=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();var P={bindings:{point:"<",options:"<",loaded:"&",click:"&"},require:{mapCtrl:"^baiduMap"},template:"",controller:function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$scope=t,this.$attrs=n}return e.$inject=["$scope","$attrs"],A(e,[{key:"$onInit",value:function(){var e=this;s(this.point,"point is required for <marker>"),this.mapCtrl.mapReady.then(function(){var t=k(e.point,"<marker> point"),n=function(e){var t=JSON.parse(JSON.stringify(e||{}));t.offset&&(t.offset=O(t.offset,"<marker> options.offset"));t.icon&&(t.icon=C(t.icon,"<marker> options.icon"));t.shadow&&(t.shadow=C(t.shadow,"<marker> options.shadow"));return t}(e.options),o=e.marker=new BMap.Marker(t,n);return e.mapCtrl.addOverlay(o),o}).then(function(t){e.loaded({marker:t}),e.$scope.$apply(),e.$attrs.click&&(e.clickHandler=function(n){e.click({e:n,marker:t,map:e.mapCtrl.getMap()}),e.$scope.$apply()},t.addEventListener("click",e.clickHandler))})}},{key:"$onChanges",value:function(e){this.marker&&e.point&&e.point.currentValue&&this.marker.setPosition(k(e.point.currentValue,"<marker> point"))}},{key:"$onDestroy",value:function(){this.marker.removeEventListener("click",this.clickHandler),this.mapCtrl.removeOverlay(this.marker)}}]),e}()};var _=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();var $={bindings:{points:"<",options:"<",loaded:"&"},require:{mapCtrl:"^baiduMap"},template:"",controller:function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$scope=t,this.$attrs=n}return e.$inject=["$scope","$attrs"],_(e,[{key:"$onInit",value:function(){var e=this;s(this.points,"points is required for <polyline>"),this.mapCtrl.mapReady.then(function(){var t=M(e.points,"<polyline> points"),n=e.options,o=e.polyline=new BMap.Polyline(t,n);return e.mapCtrl.addOverlay(o),o}).then(function(t){e.loaded({polyline:t}),e.$scope.$apply()})}},{key:"$onChanges",value:function(e){this.polyline&&(e.points&&e.points.currentValue&&this.polyline.setPath(M(e.points.currentValue,"<polyline> points")),e.options&&e.options.currentValue&&(p(e.options.currentValue.strokeColor)||this.polyline.setStrokeColor(e.options.currentValue.strokeColor),p(e.options.currentValue.strokeWeight)||this.polyline.setStrokeWeight(e.options.currentValue.strokeWeight),p(e.options.currentValue.strokeOpacity)||this.polyline.setStrokeOpacity(e.options.currentValue.strokeOpacity),p(e.options.currentValue.strokeStyle)||this.polyline.setStrokeStyle(e.options.currentValue.strokeStyle),p(e.options.currentValue.enableMassClear)||this.polyline[e.options.currentValue.enableMassClear?"enableMassClear":"disableMassClear"](),p(e.options.currentValue.enableEditing)||this.polyline[e.options.currentValue.enableEditing?"enableEditing":"disableEditing"]()))}},{key:"$onDestroy",value:function(){this.mapCtrl.removeOverlay(this.polyline)}}]),e}()},V=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();var E={bindings:{center:"<",radius:"<",options:"<",loaded:"&"},require:{mapCtrl:"^baiduMap"},template:"",controller:function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$scope=t,this.$attrs=n}return e.$inject=["$scope","$attrs"],V(e,[{key:"$onInit",value:function(){var e=this;s(this.center,"center is required for <circle>"),s(this.radius,"radius is required for <circle>"),this.mapCtrl.mapReady.then(function(){var t=e.center,n=e.radius,o=e.options,r=k(t,"<circle> center"),i=e.circle=new BMap.Circle(r,n,o);return e.mapCtrl.addOverlay(i),i}).then(function(t){e.loaded({circle:t}),e.$scope.$apply()})}},{key:"$onChanges",value:function(e){this.circle&&(e.center&&e.center.currentValue&&this.circle.setCenter(k(e.center.currentValue,"<circle> center")),e.radius&&e.radius.currentValue&&this.circle.setRadius(e.radius.currentValue),e.options&&e.options.currentValue&&(p(e.options.currentValue.strokeColor)||this.circle.setStrokeColor(e.options.currentValue.strokeColor),p(e.options.currentValue.strokeWeight)||this.circle.setStrokeWeight(e.options.currentValue.strokeWeight),p(e.options.currentValue.strokeOpacity)||this.circle.setStrokeOpacity(e.options.currentValue.strokeOpacity),p(e.options.currentValue.strokeStyle)||this.circle.setStrokeStyle(e.options.currentValue.strokeStyle),p(e.options.currentValue.fillOpacity)||this.circle.setFillOpacity(e.options.currentValue.fillOpacity),p(e.options.currentValue.fillColor)||this.circle.setFillColor(e.options.currentValue.fillColor),p(e.options.currentValue.enableMassClear)||this.circle[e.options.currentValue.enableMassClear?"enableMassClear":"disableMassClear"](),p(e.options.currentValue.enableEditing)||this.circle[e.options.currentValue.enableEditing?"enableEditing":"disableEditing"]()))}},{key:"$onDestroy",value:function(){this.mapCtrl.removeOverlay(this.circle)}}]),e}()},T=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();var S={bindings:{points:"<",options:"<",loaded:"&"},require:{mapCtrl:"^baiduMap"},template:"",controller:function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$scope=t,this.$attrs=n}return e.$inject=["$scope","$attrs"],T(e,[{key:"$onInit",value:function(){var e=this;s(this.points,"points is required for <polygon>"),this.mapCtrl.mapReady.then(function(){var t=M(e.points,"<polygon> points"),n=e.options,o=e.polygon=new BMap.Polygon(t,n);return e.mapCtrl.addOverlay(o),o}).then(function(t){e.loaded({polygon:t}),e.$scope.$apply()})}},{key:"$onChanges",value:function(e){this.polygon&&(e.points&&e.points.currentValue&&this.polygon.setPath(M(e.points.currentValue,"<polygon> points")),e.options&&e.options.currentValue&&(p(e.options.currentValue.strokeColor)||this.polygon.setStrokeColor(e.options.currentValue.strokeColor),p(e.options.currentValue.fillColor)||this.polygon.setFillColor(e.options.currentValue.fillColor),p(e.options.currentValue.strokeWeight)||this.polygon.setStrokeWeight(e.options.currentValue.strokeWeight),p(e.options.currentValue.strokeOpacity)||this.polygon.setStrokeOpacity(e.options.currentValue.strokeOpacity),p(e.options.currentValue.fillOpacity)||this.polygon.setFillOpacity(e.options.currentValue.fillOpacity),p(e.options.currentValue.strokeStyle)||this.polygon.setStrokeStyle(e.options.currentValue.strokeStyle),p(e.options.currentValue.enableMassClear)||this.polygon[e.options.currentValue.enableMassClear?"enableMassClear":"disableMassClear"](),p(e.options.currentValue.enableEditing)||this.polygon[e.options.currentValue.enableEditing?"enableEditing":"disableEditing"]()))}},{key:"$onDestroy",value:function(){this.mapCtrl.removeOverlay(this.polygon)}}]),e}()},I=function(){var e=window.loadHeatMapPromise;return e||(window.loadHeatMapPromise=function e(t){return new Promise(function(n,o){var r=document.createElement("script");r.type="text/javascript",r.src=t,r.onerror=function(){document.body.removeChild(r),setTimeout(function(){e(t)},3e4)},r.onload=n,document.body.appendChild(r)})}("//api.map.baidu.com/library/Heatmap/2.0/src/Heatmap_min.js"))};var N=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();var B={bindings:{dataset:"<",options:"<",loaded:"&"},require:{mapCtrl:"^baiduMap"},template:"",controller:function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$scope=t,this.$attrs=n}return e.$inject=["$scope","$attrs"],N(e,[{key:"$onInit",value:function(){var e=this;this.mapCtrl.mapReady.then(function(){return I()}).then(function(){var t=e.heatmap=new BMapLib.HeatmapOverlay(e.options);return e.mapCtrl.addOverlay(t),t}).then(function(t){e.loaded({heatmap:t}),e.$scope.$apply(),e.dataset&&t.setDataSet(e.dataset)})}},{key:"$onChanges",value:function(e){this.heatmap&&(e.options&&e.options.currentValue&&this.heatmap.setOptions(e.options.currentValue),e.dataset&&e.dataset.currentValue&&this.heatmap.setDataSet(e.dataset.currentValue))}},{key:"$onDestroy",value:function(){this.mapCtrl.removeOverlay(this.heatmap)}}]),e}()},R=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();var L={bindings:{type:"@",options:"<"},require:{mapCtrl:"^baiduMap"},template:"",controller:function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return R(e,[{key:"$onInit",value:function(){var e=this;!function(e){if(f.indexOf((e||"").toLowerCase())<0)throw new Error("control type should be one of: ["+f.join(",")+"]")}(this.type),this.mapCtrl.mapReady.then(function(){return function(e,t){if("navigation"===e)return new BMap.NavigationControl(t);if("overviewmap"===e)return new BMap.OverviewMapControl(t);if("scale"===e)return new BMap.ScaleControl(t);if("maptype"===e)return new BMap.MapTypeControl(t);if("copyright"===e){var n=new BMap.CopyrightControl(t);return d(t.copyrights)&&t.copyrights.forEach(function(e){n.addCopyright(e)}),n}if("geolocation"===e)return new BMap.GeolocationControl(t);if("panorama"===e)return new BMap.PanoramaControl(t)}(e.type.toLowerCase(),e.options)}).then(function(t){return e.mapCtrl.addControl(t),e.control=t,t})}},{key:"$onDestroy",value:function(){this.mapCtrl.removeControl(this.control)}}]),e}()};var j=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();var q={bindings:{type:"@",options:"<",dataset:"<"},require:{mapCtrl:"^baiduMap"},template:"",controller:function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return j(e,[{key:"$onInit",value:function(){var e=this;!function(e){if(y.indexOf((e||"").toLowerCase())<0)throw new Error("overlay type should be one of: ["+y.join(",")+"]")}(this.type),this.realType=this.type.toLowerCase(),this.mapCtrl.mapReady.then(function(){return function(e,t){if("heatmap"===e)return console.warn("heatmap type is deprecated, please try with new <heatmap /> component, see: https://leftstick.github.io/BaiduMapForAngularJS/#!/apidoc?api=heatmap"),function(e){return I().then(function(){return new BMapLib.HeatmapOverlay(e)})}(t)}(e.realType,e.options)}).then(function(t){return e.mapCtrl.addOverlay(t),e.overlay=t,D(e.realType,e.overlay,e.dataset),t})}},{key:"$onChanges",value:function(e){e.dataset&&e.dataset.currentValue&&D(this.realType,this.overlay,e.dataset.currentValue)}},{key:"$onDestroy",value:function(){this.mapCtrl.removeOverlay(this.overlay)}}]),e}()};function D(e,t,n){"heatmap"===e&&n&&t.setDataSet(n)}function Z(){return Array.prototype.slice.call(document.querySelectorAll("baidu-map")).forEach(function(e){e.querySelector(".baidu-map-offline")&&e.removeChild(e.querySelector(".baidu-map-offline")),e.querySelector(".baidu-map-instance").style.display="block"})}n.d(t,"ngBaiduMap",function(){return x}),window.BMAP_ANCHOR_TOP_LEFT=0,window.BMAP_ANCHOR_TOP_RIGHT=1,window.BMAP_ANCHOR_BOTTOM_LEFT=2,window.BMAP_ANCHOR_BOTTOM_RIGHT=3,window.BMAP_NAVIGATION_CONTROL_LARGE=0,window.BMAP_NAVIGATION_CONTROL_SMALL=1,window.BMAP_NAVIGATION_CONTROL_PAN=2,window.BMAP_NAVIGATION_CONTROL_ZOOM=3,window.BMAP_UNIT_METRIC="metric",window.BMAP_UNIT_IMPERIAL="us",window.BMAP_MAPTYPE_CONTROL_HORIZONTAL=0,window.BMAP_MAPTYPE_CONTROL_DROPDOWN=1,window.BMAP_MAPTYPE_CONTROL_MAP=2,window.BMAP_ANIMATION_DROP=1,window.BMAP_ANIMATION_BOUNCE=2,window.BMAP_POINT_SIZE_TINY=1,window.BMAP_POINT_SIZE_SMALLER=2,window.BMAP_POINT_SIZE_SMALL=3,window.BMAP_POINT_SIZE_NORMAL=4,window.BMAP_POINT_SIZE_BIG=5,window.BMAP_POINT_SIZE_BIGGER=6,window.BMAP_POINT_SIZE_HUGE=7,window.BMAP_PANORAMA_INDOOR_SCENE="inter",window.BMAP_PANORAMA_STREET_SCENE="street",window.BMAP_PANORAMA_POI_HOTEL="hotel",window.BMAP_PANORAMA_POI_CATERING="catering",window.BMAP_PANORAMA_POI_MOVIE="movie",window.BMAP_PANORAMA_POI_TRANSIT="transit",window.BMAP_PANORAMA_POI_INDOOR_SCENE="indoor_scene",window.BMAP_PANORAMA_POI_NONE="none";i.a.module("baiduMap",[]).provider("mapScriptService",function(){var e=null,t=void 0;this.setKey=function(n){t="//api.map.baidu.com/api?v=2.0&ak="+(e=n)+"&callback=baidumapinit",t=location.protocol.indexOf("http")>-1?t+"&s="+("https:"===location.protocol?1:0):"https:"+t+"&s=1"},this.$get=["$rootScope",function(n){"ngInject";return{load:function(){s(e,"ak should be set before use. Read: https://leftstick.github.io/BaiduMapForAngularJS/#!/quickstart");var o=n.loadBaiduMapPromise;return o?o.then(Z):n.loadBaiduMapPromise=new Promise(function(e,n){window.baidumapinit=e,function e(t){var n=document.createElement("script");n.type="text/javascript",n.src=t,n.onerror=function(){Array.prototype.slice.call(document.querySelectorAll("baidu-map .baidu-map-offline")).forEach(function(e){e.style.display="block"}),document.body.removeChild(n),setTimeout(function(){e(t)},3e4)},document.body.appendChild(n)}(t)}).then(Z)}}}]}).component("baiduMap",g).component("marker",P).component("polyline",$).component("circle",E).component("polygon",S).component("heatmap",B).component("control",L).component("overlay",q);var x="baiduMap"}])});
{
"name": "angular-baidu-map",
"version": "3.2.2",
"version": "3.3.0",
"description": "A baidu-map directive for AngularJS",

@@ -15,10 +15,4 @@ "main": "dist/angular-baidu-map.js",

},
"files": [
"dist/angular-baidu-map.js",
"dist/angular-baidu-map.min.js"
],
"keywords": [
"baidu-map",
"angularjs"
],
"files": ["dist/angular-baidu-map.js", "dist/angular-baidu-map.min.js"],
"keywords": ["baidu-map", "angularjs"],
"author": "Howard.Zuo",

@@ -31,24 +25,35 @@ "license": "GPL-3.0",

"peerDependencies": {
"angular": "^1.6.7"
"angular": "^1.6.9"
},
"devDependencies": {
"angular": "^1.6.7",
"angular-route": "^1.6.7",
"autoprefixer": "^7.2.1",
"angular": "^1.6.9",
"angular-route": "^1.6.9",
"autoprefixer": "^8.2.0",
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-eslint": "^8.2.2",
"babel-loader": "^7.1.4",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"css-loader": "^0.28.7",
"file-loader": "^1.1.5",
"babel-preset-env": "^1.6.1",
"css-loader": "^0.28.11",
"eslint": "^4.19.1",
"eslint-config-prettier": "^2.9.0",
"eslint-config-standard": "^11.0.0",
"eslint-plugin-import": "^2.10.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-prettier": "^2.6.0",
"eslint-plugin-promise": "^3.7.0",
"eslint-plugin-standard": "^3.0.1",
"file-loader": "^1.1.11",
"highlight.js": "^9.12.0",
"html-webpack-plugin": "^2.30.1",
"html-webpack-plugin": "^3.1.0",
"ng-annotate-webpack-plugin": "^0.2.1-pre",
"postcss-loader": "^2.0.9",
"postcss-loader": "^2.1.3",
"postcss-simple-vars": "^4.1.0",
"style-loader": "^0.19.0",
"unminified-webpack-plugin": "^1.4.2",
"webpack": "^3.9.1",
"webpack-dev-server": "^2.9.5"
"prettier": "^1.11.1",
"style-loader": "^0.20.3",
"unminified-webpack-plugin": "^2.0.0",
"webpack": "^4.4.1",
"webpack-cli": "^2.0.13",
"webpack-dev-server": "^3.1.1"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc