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 = 789);
/******/ })
/************************************************************************/
/******/ ({

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

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

/***/ }),

/***/ 1:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
/* globals __VUE_SSR_CONTEXT__ */

// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.

function normalizeComponent(
  scriptExports,
  render,
  staticRenderFns,
  functionalTemplate,
  injectStyles,
  scopeId,
  moduleIdentifier /* server only */,
  shadowMode /* vue-cli only */
) {
  // Vue.extend constructor export interop
  var options =
    typeof scriptExports === 'function' ? scriptExports.options : scriptExports

  // render functions
  if (render) {
    options.render = render
    options.staticRenderFns = staticRenderFns
    options._compiled = true
  }

  // functional template
  if (functionalTemplate) {
    options.functional = true
  }

  // scopedId
  if (scopeId) {
    options._scopeId = 'data-v-' + scopeId
  }

  var hook
  if (moduleIdentifier) {
    // server build
    hook = function (context) {
      // 2.3 injection
      context =
        context || // cached call
        (this.$vnode && this.$vnode.ssrContext) || // stateful
        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
      // 2.2 with runInNewContext: true
      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
        context = __VUE_SSR_CONTEXT__
      }
      // inject component styles
      if (injectStyles) {
        injectStyles.call(this, context)
      }
      // register component module identifier for async chunk inferrence
      if (context && context._registeredComponents) {
        context._registeredComponents.add(moduleIdentifier)
      }
    }
    // used by ssr in case component is cached and beforeCreate
    // never gets called
    options._ssrRegister = hook
  } else if (injectStyles) {
    hook = shadowMode
      ? function () {
          injectStyles.call(
            this,
            (options.functional ? this.parent : this).$root.$options.shadowRoot
          )
        }
      : injectStyles
  }

  if (hook) {
    if (options.functional) {
      // for template-only hot-reload because in that case the render fn doesn't
      // go through the normalizer
      options._injectStyles = hook
      // register for functional component in vue file
      var originalRender = options.render
      options.render = function renderWithStyleInjection(h, context) {
        hook.call(context)
        return originalRender(h, context)
      }
    } else {
      // inject component registration as beforeCreate hook
      var existing = options.beforeCreate
      options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
    }
  }

  return {
    exports: scriptExports,
    options: options
  }
}


/***/ }),

/***/ 101:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _Panel_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(31);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Panel_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Panel_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
var render, staticRenderFns




/* normalize component */

var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(
  _Panel_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__["default"],
  render,
  staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),

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

module.exports = require("ant-design-vue/es/collapse/CollapsePanel");

/***/ }),

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

module.exports = require("@supermap/vue-iclient-mapboxgl/lib/collapse");

/***/ }),

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

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

/***/ }),

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

module.exports = require("@supermap/vue-iclient-mapboxgl/lib/_mixin/control.js");

/***/ }),

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

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

/***/ }),

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

module.exports = require("@supermap/vue-iclient-mapboxgl/lib/_mixin/Card.js");

/***/ }),

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

module.exports = require("lodash.isequal");

/***/ }),

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

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

/***/ }),

/***/ 31:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_Panel_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(32);
/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_Panel_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_Panel_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_Panel_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_Panel_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_Panel_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

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

"use strict";


var _interopRequireDefault = __webpack_require__(0);
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = exports.collapsePanelTypes = void 0;
var _CollapsePanel = _interopRequireDefault(__webpack_require__(102));
var _vcCollapse = __webpack_require__(96);
var _Theme = _interopRequireDefault(__webpack_require__(4));
var _AntdRender = _interopRequireDefault(__webpack_require__(6));
var collapsePanelTypes = exports.collapsePanelTypes = Object.assign({}, (0, _vcCollapse.panelProps)());
var _default = exports.default = {
  name: 'SmCollapsePanel',
  defaultComponent: _CollapsePanel.default,
  mixins: [_Theme.default, _AntdRender.default],
  inheritAttrs: false,
  props: collapsePanelTypes,
  methods: {
    getPrefixCls: function getPrefixCls(suffixCls, customizePrefixCls) {
      if (customizePrefixCls) {
        return customizePrefixCls;
      }
      return this.defaultPrefixCls + "-" + suffixCls;
    }
  }
};

/***/ }),

/***/ 336:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_LayerList_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(337);
/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_LayerList_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_LayerList_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_LayerList_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_LayerList_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_0_1_node_modules_vue_loader_lib_index_js_vue_loader_options_LayerList_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

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

"use strict";


var _interopRequireDefault = __webpack_require__(0);
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _createClass2 = _interopRequireDefault(__webpack_require__(14));
var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(3));
var _vuePropertyDecorator = __webpack_require__(9);
var _Theme = _interopRequireDefault(__webpack_require__(4));
var _control = _interopRequireDefault(__webpack_require__(17));
var _mapGetter = _interopRequireDefault(__webpack_require__(7));
var _Card = _interopRequireDefault(__webpack_require__(22));
var _Card2 = _interopRequireDefault(__webpack_require__(57));
var _Collapse = _interopRequireDefault(__webpack_require__(116));
var _Panel = _interopRequireDefault(__webpack_require__(101));
var _Attributes = _interopRequireDefault(__webpack_require__(791));
var _LayerListViewModel = _interopRequireDefault(__webpack_require__(792));
var _lodash = _interopRequireDefault(__webpack_require__(793));
var _lodash2 = _interopRequireDefault(__webpack_require__(23));
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 ATTRIBUTES_NEEDED_PROPS = ['title', 'iconClass', 'associateWithMap', 'statistics', 'toolbar', 'table', 'fieldConfig', 'pagination', 'customHeaderRow', 'customRow'];
var SmLayerList = /*#__PURE__*/function (_Mixins) {
  (0, _inheritsLoose2.default)(SmLayerList, _Mixins);
  function SmLayerList() {
    var _this;
    _this = _Mixins.apply(this, arguments) || this;
    _this.sourceNames = [];
    _this.layerList = [];
    _this.attributesProps = {};
    _this.displayAttributes = false;
    return _this;
  }
  var _proto = SmLayerList.prototype;
  _proto.attributesChanged = function attributesChanged(newval, oldval) {
    if (this.displayAttributes) {
      if (!newval.enabled) {
        this.removeAttributes();
        return;
      }
      if (!(0, _lodash2.default)(newval.getContainer, oldval.getContainer)) {
        this.removeAttributes();
        var container;
        container = newval.getContainer && newval.getContainer() || document.getElementById(this.getTargetName());
        container.appendChild(this.$refs.attributes.$el);
        this.displayAttributes = !this.displayAttributes;
      }
      var oldProps = this.attributesProps;
      var newProps = Object.assign({}, newval);
      for (var key in newProps) {
        if (ATTRIBUTES_NEEDED_PROPS.indexOf(key) === -1) {
          delete newProps[key];
        }
      }
      this.attributesProps = Object.assign(Object.assign({}, oldProps), newProps);
    }
  };
  _proto.created = function created() {
    this.viewModel = new _LayerListViewModel.default();
  };
  _proto.toggleVisibility = function toggleVisibility(sourceLayer, sourceName, visibility) {
    this.viewModel && this.viewModel.changeLayerVisible(sourceLayer, sourceName, visibility);
  };
  _proto.addNewLayer = function addNewLayer() {
    this.viewModel.addNewLayer();
  };
  _proto.deleteLayer = function deleteLayer() {
    this.viewModel.deleteLayer();
  };
  _proto.toggleLayerGroupVisibility = function toggleLayerGroupVisibility(sourceName, visibility) {
    this.viewModel && this.viewModel.changeLayerGroupVisibility(sourceName, visibility);
  };
  _proto.toggleAttributesVisibility = function toggleAttributesVisibility(e, layerName) {
    if (e.target.className.indexOf('sm-components-icon-attribute-open') !== -1) {
      e.target.setAttribute('class', this.attributesIconClass);
      this.displayAttributes = !this.displayAttributes;
      return;
    }
    this.closeAttributesIconClass();
    this.removeAttributes();
    this.handleAttributesProps(layerName);
    e.target.setAttribute('class', this.attributesIconClass + " sm-components-icon-attribute-open");
    this.attributesContainer.appendChild(this.$refs.attributes.$el);
    this.displayAttributes = !this.displayAttributes;
  };
  _proto.handleAttributesProps = function handleAttributesProps(layerName) {
    var props = Object.assign({}, this.attributes);
    for (var key in props) {
      if (ATTRIBUTES_NEEDED_PROPS.indexOf(key) === -1) {
        delete props[key];
      }
    }
    this.attributesProps = Object.assign({
      layerName: layerName,
      title: layerName
    }, props);
  };
  _proto.layerUpdate = function layerUpdate() {
    var _this2 = this;
    this.$nextTick(function () {
      _this2.sourceList = _this2.viewModel && _this2.viewModel.initLayerList();
      _this2.sourceNames = _this2.viewModel && _this2.viewModel.getSourceNames();
      if (_this2.attributesProps.layerName && _this2.sourceList[_this2.attributesProps.layerName].visibility === 'none') {
        _this2.closeAttributesIconClass();
        _this2.removeAttributes();
      }
    });
  };
  _proto.closeAttributesIconClass = function closeAttributesIconClass() {
    var _this3 = this;
    var attributesIcon = document.querySelectorAll('.sm-component-layer-list__attributes');
    attributesIcon.forEach(function (element) {
      element.children[0].setAttribute('class', _this3.attributesIconClass);
    });
  };
  _proto.removeAttributes = function removeAttributes() {
    if (this.$refs.attributes.$el && this.displayAttributes) {
      var attributesParentDom = this.$refs.attributes.$el.parentElement;
      this.displayAttributes = !this.displayAttributes;
      attributesParentDom.removeChild(this.$refs.attributes.$el);
    }
  };
  _proto.beforeDestory = function beforeDestory() {
    this.viewModel && this.viewModel.off('layersUpdated', this.layerUpdateFn);
    this.$options.removed.call(this);
  };
  (0, _createClass2.default)(SmLayerList, [{
    key: "enableSource",
    get: function get() {
      return (0, _lodash.default)(this.sourceNames, this.sourceList && Object.keys(this.sourceList));
    }
  }, {
    key: "layerName",
    get: function get() {
      return function (source) {
        return source.layers[0].id;
      };
    }
  }, {
    key: "attributesStyle",
    get: function get() {
      var attributesStyle;
      var position;
      var style = Object.assign({}, {
        height: '300px'
      }, this.attributes.style);
      position = this.attributes.position ? this.attributes.position.split('-') : ['bottom'];
      if (position.length === 2) {
        attributesStyle = "position: absolute; " + position[0] + ": 0;" + position[1] + ": 0;";
      } else if (['top', 'bottom'].indexOf(position[0]) !== -1) {
        var margin = style ? (100 - parseInt(style.width)) / 2 : 0;
        attributesStyle = "position: absolute; " + position[0] + ": 0; left: " + margin + "%;";
      } else if (['left', 'right'].indexOf(position[0]) !== -1) {
        var _margin = style ? (100 - parseInt(style.height)) / 2 : 0;
        attributesStyle = "position: absolute; " + position[0] + ": 0; top: " + _margin + "%;";
      }
      for (var key in style) {
        attributesStyle += key + ": " + style[key] + ";";
      }
      return attributesStyle;
    }
  }, {
    key: "attributesContainer",
    get: function get() {
      var container;
      container = this.attributes && this.attributes.getContainer && this.attributes.getContainer();
      return container || document.getElementById(this.getTargetName());
    }
  }, {
    key: "attributesIconClass",
    get: function get() {
      return this.attributes && this.attributes.iconClass || 'sm-components-icon-attribute';
    }
  }]);
  return SmLayerList;
}((0, _vuePropertyDecorator.Mixins)(_mapGetter.default, _control.default, _Theme.default, _Card.default));
__decorate([(0, _vuePropertyDecorator.Prop)({
  default: 'sm-components-icon-layer-list'
})], SmLayerList.prototype, "iconClass", void 0);
__decorate([(0, _vuePropertyDecorator.Prop)({
  default: function _default() {
    return this.$t('layerList.title');
  }
})], SmLayerList.prototype, "headerName", void 0);
__decorate([(0, _vuePropertyDecorator.Prop)({
  default: function _default() {
    return {};
  }
})], SmLayerList.prototype, "attributes", void 0);
__decorate([(0, _vuePropertyDecorator.Watch)('attributes', {
  deep: true
})], SmLayerList.prototype, "attributesChanged", null);
SmLayerList = __decorate([(0, _vuePropertyDecorator.Component)({
  name: 'SmLayerList',
  components: {
    SmCard: _Card2.default,
    SmCollapse: _Collapse.default,
    SmCollapsePanel: _Panel.default,
    SmAttributes: _Attributes.default
  },
  filters: {
    isVisible: function isVisible(visibility) {
      return visibility === 'visible';
    }
  },
  loaded: function loaded() {
    !this.parentIsWebMapOrMap && this.$el.classList.add('layer-list-container');
    this.layerUpdate();
    this.layerUpdateFn = this.layerUpdate.bind(this);
    this.viewModel.on('layersUpdated', this.layerUpdateFn);
  },
  removed: function removed() {
    this.removeAttributes();
    this.sourceList = {};
    this.sourceNames = [];
  }
})], SmLayerList);
var _default2 = exports.default = SmLayerList;

/***/ }),

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

module.exports = require("@supermap/vue-iclient-mapboxgl/lib/_mixin/Theme.js");

/***/ }),

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

"use strict";


var _interopRequireDefault = __webpack_require__(0);
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _SourceModel = _interopRequireDefault(__webpack_require__(44));
var _LayerModel = _interopRequireDefault(__webpack_require__(45));
var SourceListModel = /*#__PURE__*/function () {
  function SourceListModel(options) {
    this.map = options.map;
    this.style = this.map.getStyle();
    this.layers = this.map.getStyle().layers;
    this.overlayLayers = this.map.overlayLayersManager;
    this.detailLayers = null;
    this.sourceList = {};
    this.sourceNames = [];
    this._initLayers();
    this._initSource();
    this.excludeSourceNames = ['tdt-search-', 'tdt-route-', 'smmeasure', 'mapbox-gl-draw'];
  }
  var _proto = SourceListModel.prototype;
  _proto.getSourceList = function getSourceList() {
    var sourceList = {};
    for (var key in this.sourceList) {
      if (key && this.excludeSource(key)) {
        sourceList[key] = this.sourceList[key];
      }
    }
    return sourceList;
  };
  _proto.getSourceNames = function getSourceNames() {
    var _this = this;
    var names = [];
    this.sourceNames.forEach(function (element) {
      if (element && _this.excludeSource(element)) {
        names.push(element);
      }
    });
    return names;
  };
  _proto.excludeSource = function excludeSource(key) {
    for (var i = 0; i < this.excludeSourceNames.length; i++) {
      if (key.indexOf(this.excludeSourceNames[i]) >= 0) {
        return false;
      }
    }
    return true;
  };
  _proto.getLegendStyle = function getLegendStyle(sourceName) {
    if (sourceName) {
      return this.sourceList[sourceName] ? this.sourceList[sourceName].style : '';
    }
    var sourceList = Object.values(this.sourceList) || [];
    var styles = sourceList.filter(function (item) {
      return !!item.style;
    });
    return styles;
  };
  _proto.getLayers = function getLayers() {
    return this.detailLayers;
  };
  _proto.getLayersBySourceLayer = function getLayersBySourceLayer(sourceName, sourceLayer) {
    return this.sourceList[sourceName].sourceLayerList[sourceLayer];
  };
  _proto.getSourceLayersBySource = function getSourceLayersBySource(sourceName) {
    return this.sourceList[sourceName].sourceLayerList;
  };
  _proto.addSourceStyle = function addSourceStyle(sourceName, sourceStyle) {
    if (this.sourceList[sourceName]) {
      this.sourceList[sourceName].style = sourceStyle;
    }
  };
  _proto._initLayers = function _initLayers() {
    var _this2 = this;
    this.layers && (this.detailLayers = this.layers.map(function (layer) {
      return _this2.map.getLayer(layer.id);
    }));
    var overLayerList = Object.values(this.overlayLayers);
    overLayerList.forEach(function (overlayer) {
      if (overlayer.id) {
        _this2.detailLayers.push({
          id: overlayer.id,
          visibility: overlayer.visibility ? 'visible' : 'none',
          source: overlayer.id
        });
      }
    });
  };
  _proto._initSource = function _initSource() {
    var _this3 = this;
    this.detailLayers && this.detailLayers.forEach(function (layer) {
      if (!_this3.sourceList[layer.source]) {
        var source = _this3.map.getSource(layer.source);
        _this3.sourceList[layer.source] = new _SourceModel.default({
          source: layer.source,
          type: source && source.type
        });
        _this3.sourceNames.push(layer.source);
      }
      _this3.sourceList[layer.source].addLayer(new _LayerModel.default(layer), layer.sourceLayer);
    });
  };
  return SourceListModel;
}();
var _default = exports.default = SourceListModel;

/***/ }),

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

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var SourceModel = /*#__PURE__*/function () {
  function SourceModel(options) {
    this.id = options.source;
    this.sourceLayerList = {};
    this.layers = [];
    this.type = options.type;
  }
  var _proto = SourceModel.prototype;
  _proto.addLayer = function addLayer(layer, sourceLayer) {
    if (sourceLayer) {
      if (!this.sourceLayerList[sourceLayer]) {
        this.sourceLayerList[sourceLayer] = [];
      }
      this.sourceLayerList[sourceLayer].push(layer);
    } else {
      this.sourceLayerList = undefined;
    }
    this.layers.push(layer);
    if ([layer.visibility, this.visibility].includes('visible')) {
      this.visibility = 'visible';
    } else {
      this.visibility = 'none';
    }
  };
  return SourceModel;
}();
var _default = exports.default = SourceModel;

/***/ }),

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

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
/**
 * @class LayerModel
 * @description 图层数据模型。
 * @param {Object} options - 图层参数。
 * @param {String} [options.id] - 图层 ID。
 * @param {Number} [options.maxzoom] - 最大缩放级别。
 * @param {Number} [options.minzoom] - 最小缩放级别。
 * @param {GeoJSONObject} [options.source] - 数据源。
 * @param {String} [options.type] - 图层类型。
 * @param {String} [options.visibility] - 图层是否可见。
 * @category Model
 */
var LayerModel = function LayerModel(options) {
  if (options === void 0) {
    options = {};
  }
  this.id = options.id;
  this.maxzoom = options.maxzoom;
  this.minzoom = options.minzoom;
  this.source = options.source;
  this.sourceLayer = options.sourceLayer;
  this.type = options.type;
  this.visibility = options.visibility || 'visible';
};
var _default = exports.default = LayerModel;

/***/ }),

/***/ 456:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";

// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ render; });
__webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ staticRenderFns; });

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/mapboxgl/web-map/control/layer-list/LayerList.vue?vue&type=template&id=66d9fdd5&
var render = function () {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return _c(
    "sm-collapse-card",
    {
      directives: [
        {
          name: "show",
          rawName: "v-show",
          value: _vm.isShow,
          expression: "isShow",
        },
      ],
      staticClass: "sm-component-layer-list",
      attrs: {
        "icon-class": _vm.iconClass,
        "icon-position": _vm.position,
        "header-name": _vm.headerName,
        "auto-rotate": _vm.autoRotate,
        collapsed: _vm.collapsed,
        background: _vm.background,
        textColor: _vm.textColor,
        "split-line": _vm.splitLine,
      },
    },
    [
      _c(
        "sm-card",
        {
          staticClass: "sm-component-layer-list__a-card",
          style: _vm.headingTextColorStyle,
          attrs: { bordered: false },
        },
        [
          _c(
            "div",
            { staticClass: "sm-component-layer-list__content" },
            _vm._l(_vm.enableSource, function (name, index) {
              return _c(
                "sm-collapse",
                {
                  key: index,
                  staticClass: "sm-component-layer-list__collapse",
                  attrs: { bordered: false },
                },
                [
                  typeof _vm.sourceList[name].sourceLayerList === "object" &&
                  Object.keys(_vm.sourceList[name].sourceLayerList).length > 0
                    ? _c(
                        "sm-collapse-panel",
                        {
                          staticClass: "sm-component-layer-list__collapseitem",
                          attrs: { showArrow: false },
                        },
                        [
                          _c("template", { slot: "header" }, [
                            _c(
                              "div",
                              {
                                staticClass: "header-wrap",
                                class: {
                                  "header-wrap": true,
                                  "sm-component-layer-list__disabled":
                                    _vm.sourceList[name].visibility !==
                                    "visible",
                                },
                              },
                              [
                                _c("div", { staticClass: "header-text" }, [
                                  _c("i", {
                                    class:
                                      _vm.sourceList[name].visibility ===
                                      "visible"
                                        ? "sm-components-icon-partially-visible"
                                        : "sm-components-icon-hidden",
                                    on: {
                                      click: function ($event) {
                                        $event.stopPropagation()
                                        return _vm.toggleLayerGroupVisibility(
                                          name,
                                          _vm.sourceList[name].visibility
                                        )
                                      },
                                    },
                                  }),
                                  _c("span", { staticClass: "add-ellipsis" }, [
                                    _vm._v(_vm._s(name)),
                                  ]),
                                ]),
                                _c("i", {
                                  staticClass:
                                    "sm-components-icon-solid-triangle-right header-arrow",
                                }),
                                _c("i", {
                                  staticClass:
                                    "sm-components-icon-solid-triangle-down header-arrow",
                                }),
                              ]
                            ),
                          ]),
                          _vm._l(
                            _vm.sourceList[name].sourceLayerList,
                            function (sourcelayerValue, sourcelayerKey, i) {
                              return _c(
                                "div",
                                {
                                  key: i,
                                  class: {
                                    "sm-component-layer-list__sourcelayeritem": true,
                                    "sm-component-layer-list__disabled":
                                      sourcelayerValue[0].visibility !==
                                      "visible",
                                  },
                                  style: _vm.getTextColorStyle,
                                },
                                [
                                  _c("i", {
                                    class:
                                      sourcelayerValue[0].visibility ===
                                      "visible"
                                        ? "sm-components-icon-visible"
                                        : "sm-components-icon-hidden",
                                    on: {
                                      click: function ($event) {
                                        $event.stopPropagation()
                                        return _vm.toggleVisibility(
                                          sourcelayerKey,
                                          name,
                                          sourcelayerValue[0].visibility
                                        )
                                      },
                                    },
                                  }),
                                  _c(
                                    "div",
                                    {
                                      staticClass:
                                        "sm-component-layer-list__layergroupname add-ellipsis",
                                      attrs: { title: sourcelayerKey },
                                    },
                                    [
                                      _vm._v(
                                        "\n              " +
                                          _vm._s(sourcelayerKey) +
                                          "\n            "
                                      ),
                                    ]
                                  ),
                                ]
                              )
                            }
                          ),
                        ],
                        2
                      )
                    : _c(
                        "div",
                        {
                          class: {
                            "sm-component-layer-list__elcarditem": true,
                            "sm-component-layer-list__disabled":
                              _vm.sourceList[name].visibility !== "visible",
                          },
                        },
                        [
                          _c(
                            "div",
                            { staticClass: "sm-component-layer-list__layer" },
                            [
                              _c("i", {
                                class:
                                  _vm.sourceList[name].visibility === "visible"
                                    ? "sm-components-icon-visible"
                                    : "sm-components-icon-hidden",
                                on: {
                                  click: function ($event) {
                                    $event.stopPropagation()
                                    return _vm.toggleLayerGroupVisibility(
                                      name,
                                      _vm.sourceList[name].visibility
                                    )
                                  },
                                },
                              }),
                              _c(
                                "div",
                                {
                                  staticClass:
                                    "sm-component-layer-list__layergroupname add-ellipsis",
                                  attrs: { title: name },
                                },
                                [_vm._v(_vm._s(name))]
                              ),
                            ]
                          ),
                          _vm.attributes.enabled &&
                          _vm.sourceList[name].type === "geojson"
                            ? _c(
                                "div",
                                {
                                  staticClass:
                                    "sm-component-layer-list__attributes",
                                },
                                [
                                  _c("i", {
                                    class: _vm.attributesIconClass,
                                    style: _vm.sourceList[name].visibility !==
                                      "visible" && { cursor: "not-allowed" },
                                    on: {
                                      click: function ($event) {
                                        $event.stopPropagation()
                                        _vm.sourceList[name].visibility ===
                                          "visible" &&
                                          _vm.toggleAttributesVisibility(
                                            $event,
                                            _vm.layerName(_vm.sourceList[name])
                                          )
                                      },
                                    },
                                  }),
                                ]
                              )
                            : _vm._e(),
                        ]
                      ),
                ],
                1
              )
            }),
            1
          ),
        ]
      ),
      _c(
        "sm-attributes",
        _vm._b(
          {
            directives: [
              {
                name: "show",
                rawName: "v-show",
                value: _vm.displayAttributes,
                expression: "displayAttributes",
              },
            ],
            ref: "attributes",
            style: _vm.attributesStyle,
            attrs: { mapTarget: _vm.getTargetName() },
          },
          "sm-attributes",
          _vm.attributesProps,
          false
        )
      ),
    ],
    1
  )
}
var staticRenderFns = []
render._withStripped = true


// CONCATENATED MODULE: ./src/mapboxgl/web-map/control/layer-list/LayerList.vue?vue&type=template&id=66d9fdd5&


/***/ }),

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

module.exports = require("@supermap/vue-iclient-mapboxgl/static/libs/mapboxgl/mapbox-gl-enhance.js");

/***/ }),

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

module.exports = require("@supermap/vue-iclient-mapboxgl/lib/card");

/***/ }),

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

module.exports = require("@supermap/vue-iclient-mapboxgl/lib/_mixin/AntdRender.js");

/***/ }),

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

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

/***/ }),

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

"use strict";


var _interopRequireDefault = __webpack_require__(0);
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _LayerList = _interopRequireDefault(__webpack_require__(790));
var _init = _interopRequireDefault(__webpack_require__(2));
_LayerList.default.install = function (Vue, opts) {
  (0, _init.default)(Vue, opts);
  Vue.component(_LayerList.default.options ? _LayerList.default.options.name : _LayerList.default.name, _LayerList.default);
};
var _default = exports.default = _LayerList.default;

/***/ }),

/***/ 790:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _LayerList_vue_vue_type_template_id_66d9fdd5___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(456);
/* harmony import */ var _LayerList_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(336);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _LayerList_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _LayerList_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);





/* normalize component */

var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
  _LayerList_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__["default"],
  _LayerList_vue_vue_type_template_id_66d9fdd5___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
  _LayerList_vue_vue_type_template_id_66d9fdd5___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
  false,
  null,
  null,
  null
  
)

/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),

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

module.exports = require("@supermap/vue-iclient-mapboxgl/lib/attributes");

/***/ }),

/***/ 792:
/***/ (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 _mapboxGlEnhance = _interopRequireDefault(__webpack_require__(5));
var _SourceListModel = _interopRequireDefault(__webpack_require__(43));
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
var LayerListViewModel = /*#__PURE__*/function (_mapboxgl$Evented) {
  (0, _inheritsLoose2.default)(LayerListViewModel, _mapboxgl$Evented);
  function LayerListViewModel() {
    var _this;
    _this = _mapboxgl$Evented.call(this) || this;
    _this.sourceList = {};
    _this.sourceNames = [];
    return _this;
  }
  var _proto = LayerListViewModel.prototype;
  _proto._updateLayers = function _updateLayers() {
    this.fire('layersUpdated');
  };
  _proto.setMap = function setMap(mapInfo) {
    var map = mapInfo.map;
    this.map = map;
    this.updateFn = this._updateLayers.bind(this);
    this.map.on('styledata', this.updateFn);
  };
  _proto.initLayerList = function initLayerList() {
    this.sourceListModel = new _SourceListModel.default({
      map: this.map
    });
    this.sourceList = this.sourceListModel.getSourceList();
    this.sourceNames = this.sourceListModel.getSourceNames().reverse();
    return this.sourceList;
  };
  _proto.getSourceNames = function getSourceNames() {
    return this.sourceNames;
  };
  _proto.changeLayerVisible = function changeLayerVisible(sourcelayer, sourceName, visibility) {
    var _this2 = this;
    this.sourceListModel.getLayersBySourceLayer(sourceName, sourcelayer).forEach(function (layer) {
      _this2.map.setLayoutProperty(layer.id, 'visibility', _this2.changeVisibility(visibility));
    });
  };
  _proto.changeVisibility = function changeVisibility(visibility) {
    return visibility === 'visible' ? 'none' : 'visible';
  };
  _proto.changeLayerGroupVisibility = function changeLayerGroupVisibility(sourceName, visibility) {
    var _this3 = this;
    var sourceLayers = this.sourceListModel.getSourceLayersBySource(sourceName);
    if (sourceLayers) {
      for (var sourcelayer in sourceLayers) {
        sourceLayers[sourcelayer].forEach(function (layer) {
          _this3.map.setLayoutProperty(layer.id, 'visibility', _this3.changeVisibility(visibility));
        });
      }
    } else {
      for (var _iterator = _createForOfIteratorHelperLoose(this.sourceList[sourceName].layers), _step; !(_step = _iterator()).done;) {
        var layer = _step.value;
        this.map.setLayoutProperty(layer.id, 'visibility', this.changeVisibility(visibility));
      }
    }
  };
  _proto.removed = function removed() {
    this.sourceList = {};
    this.sourceNames = [];
    this.map.off('styledata', this.updateFn);
  };
  return LayerListViewModel;
}(_mapboxGlEnhance.default.Evented);
var _default = exports.default = LayerListViewModel;

/***/ }),

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

module.exports = require("lodash.intersection");

/***/ }),

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

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

/***/ }),

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

module.exports = require("ant-design-vue/es/vc-collapse");

/***/ })

/******/ });