module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "lib/mapboxgl/";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 868);
/******/ })
/************************************************************************/
/******/ ({

/***/ 0:
/***/ (function(module, exports) {

module.exports = require("@babel/runtime/helpers/interopRequireDefault");

/***/ }),

/***/ 13:
/***/ (function(module, exports) {

module.exports = require("vue");

/***/ }),

/***/ 3:
/***/ (function(module, exports) {

module.exports = require("@babel/runtime/helpers/inheritsLoose");

/***/ }),

/***/ 55:
/***/ (function(module, exports) {

module.exports = require("@supermap/vue-iclient-mapboxgl/lib/_types/map-event.js");

/***/ }),

/***/ 868:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _interopRequireDefault = __webpack_require__(0);
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(3));
var _vue = _interopRequireDefault(__webpack_require__(13));
var _vuePropertyDecorator = __webpack_require__(9);
var _mapEvent = _interopRequireDefault(__webpack_require__(55));
var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
  var c = arguments.length,
    r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
    d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var Control = /*#__PURE__*/function (_Vue) {
  (0, _inheritsLoose2.default)(Control, _Vue);
  function Control() {
    var _this;
    _this = _Vue.apply(this, arguments) || this;
    _this.isShow = true;
    return _this;
  }
  var _proto = Control.prototype;
  _proto.positionChanged = function positionChanged() {
    if (this.$el && this.parentIsWebMapOrMap) {
      this.remove();
      this.addTo();
    }
  };
  _proto.created = function created() {
    var parentName = this.$parent.$options.name;
    this.parentIsWebMapOrMap = parentName && ['smwebmap', 'smncpmap'].includes(this.$parent.$options.name.toLowerCase());
  };
  _proto.mounted = function mounted() {
    this.filterDelayLoad = !['smwebmap', 'smminimap', 'smncpmap'].includes(this.$options.name && this.$options.name.toLowerCase());
    if (this.$el && this.parentIsWebMapOrMap) {
      if (this.filterDelayLoad) {
        this.isShow = false;
        var $el = this.$el;
        $el.style && ($el.style.display = 'none');
      }
      var targetName = this.getControlMapName();
      if (_mapEvent.default.$options.getMap(targetName)) {
        this.mapLoaded(_mapEvent.default.$options.getMap(targetName));
      }
      _mapEvent.default.$on('load-map', this.controlLoadMapSucceed);
    }
  };
  _proto.beforeDestroy = function beforeDestroy() {
    this.remove();
    _mapEvent.default.$off('load-map', this.controlLoadMapSucceed);
  };
  _proto.initControl = function initControl() {
    var self = this;
    return {
      onAdd: function onAdd() {
        return self.$el;
      },
      onRemove: function onRemove() {
        return self.map;
      }
    };
  };
  _proto.addTo = function addTo() {
    this.control = this.initControl();
    this.map.addControl(this.control, this.position);
    this.$el && this.$el.classList && this.$el.classList.add('mapboxgl-ctrl');
  };
  _proto.remove = function remove() {
    this.control && this.map && this.map.removeControl(this.control);
  };
  _proto.getControlMapName = function getControlMapName() {
    var selfParent = this.$parent;
    var parentTarget = selfParent && selfParent.$options.name && selfParent.$options.name.toLowerCase() === 'smwebmap' && selfParent.target;
    return this.mapTarget || parentTarget || Object.keys(_mapEvent.default.$options.getAllMaps())[0];
  };
  _proto.controlLoadMapSucceed = function controlLoadMapSucceed(map, target) {
    var targetName = this.getControlMapName();
    if (target === targetName) {
      this.mapLoaded(map);
    }
  };
  _proto.mapLoaded = function mapLoaded(map) {
    this.map = map;
    this.addTo();
    if (this.filterDelayLoad) {
      this.isShow = true;
      var $el = this.$el;
      $el && $el.style && ($el.style.display = 'block');
    }
  };
  return Control;
}(_vue.default);
__decorate([(0, _vuePropertyDecorator.Prop)()], Control.prototype, "mapTarget", void 0);
__decorate([(0, _vuePropertyDecorator.Prop)({
  default: 'top-left',
  validator: function validator(value) {
    return ['top-left', 'top-right', 'bottom-left', 'bottom-right'].includes(value);
  }
})], Control.prototype, "position", void 0);
__decorate([(0, _vuePropertyDecorator.Watch)('position')], Control.prototype, "positionChanged", null);
Control = __decorate([_vuePropertyDecorator.Component], Control);
var _default = exports.default = Control;

/***/ }),

/***/ 9:
/***/ (function(module, exports) {

module.exports = require("vue-property-decorator");

/***/ })

/******/ });