(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory(require("vue"), require("@kq_npm/client_common_vue/_utils/util.js"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue/_mixin/render"), require("@kq_npm/client_common_vue/init.js"), require("@kq_npm/client_common_vue/_utils/webmapservice"), require("@kq_npm/client_common_vue/_types/global-event"), require("@kq_npm/client_common_vue/_utils/dictionaries"), require("@kq_npm/client_common_vue/configprovider/useGlobalConfig.js"));
	else if(typeof define === 'function' && define.amd)
		define("@kq_npm/client_leaflet_vue", ["vue", "@kq_npm/client_common_vue/_utils/util.js", "@kq_npm/client_common_vue/_utils/gis-utils", "@kq_npm/client_common_vue/_mixin/render", "@kq_npm/client_common_vue/init.js", "@kq_npm/client_common_vue/_utils/webmapservice", "@kq_npm/client_common_vue/_types/global-event", "@kq_npm/client_common_vue/_utils/dictionaries", "@kq_npm/client_common_vue/configprovider/useGlobalConfig.js"], factory);
	else if(typeof exports === 'object')
		exports["@kq_npm/client_leaflet_vue"] = factory(require("vue"), require("@kq_npm/client_common_vue/_utils/util.js"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue/_mixin/render"), require("@kq_npm/client_common_vue/init.js"), require("@kq_npm/client_common_vue/_utils/webmapservice"), require("@kq_npm/client_common_vue/_types/global-event"), require("@kq_npm/client_common_vue/_utils/dictionaries"), require("@kq_npm/client_common_vue/configprovider/useGlobalConfig.js"));
	else
		root["@kq_npm/client_leaflet_vue"] = factory(root["Vue"], root["@kq_npm/client_common_vue/_utils/util.js"], root["@kq_npm/client_common_vue/_utils/gis-utils"], root["@kq_npm/client_common_vue/_mixin/render"], root["@kq_npm/client_common_vue/init.js"], root["@kq_npm/client_common_vue/_utils/webmapservice"], root["@kq_npm/client_common_vue/_types/global-event"], root["@kq_npm/client_common_vue/_utils/dictionaries"], root["@kq_npm/client_common_vue/configprovider/useGlobalConfig.js"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE__154__, __WEBPACK_EXTERNAL_MODULE__3684__, __WEBPACK_EXTERNAL_MODULE__64__, __WEBPACK_EXTERNAL_MODULE__4383__, __WEBPACK_EXTERNAL_MODULE__455__, __WEBPACK_EXTERNAL_MODULE__7338__, __WEBPACK_EXTERNAL_MODULE__3353__, __WEBPACK_EXTERNAL_MODULE__463__, __WEBPACK_EXTERNAL_MODULE__5711__) {
return /******/ (function() { // webpackBootstrap
/******/ 	"use strict";
/******/ 	var __webpack_modules__ = ({

/***/ 64:
/***/ (function(module) {

module.exports = __WEBPACK_EXTERNAL_MODULE__64__;

/***/ }),

/***/ 154:
/***/ (function(module) {

module.exports = __WEBPACK_EXTERNAL_MODULE__154__;

/***/ }),

/***/ 455:
/***/ (function(module) {

module.exports = __WEBPACK_EXTERNAL_MODULE__455__;

/***/ }),

/***/ 463:
/***/ (function(module) {

module.exports = __WEBPACK_EXTERNAL_MODULE__463__;

/***/ }),

/***/ 1092:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

/* harmony import */ var element_plus_dist_index_full_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6363);
/* harmony import */ var element_plus_dist_index_full_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(element_plus_dist_index_full_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _common_KqGIS__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8353);
/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(455);
/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_init__WEBPACK_IMPORTED_MODULE_2__);
/*
 * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
 * All rights reserved.
 */





element_plus_dist_index_full_js__WEBPACK_IMPORTED_MODULE_0__.ElMessage.install = (Vue, opts) => {
  _init__WEBPACK_IMPORTED_MODULE_2___default()(Vue, opts);
  Vue.component("KqMessage", element_plus_dist_index_full_js__WEBPACK_IMPORTED_MODULE_0__.ElMessage);
};

/* harmony default export */ __webpack_exports__.A = (element_plus_dist_index_full_js__WEBPACK_IMPORTED_MODULE_0__.ElMessage);

_common_KqGIS__WEBPACK_IMPORTED_MODULE_1__/* .kq_npm_client_common_vue */ .y.KqMessage = element_plus_dist_index_full_js__WEBPACK_IMPORTED_MODULE_0__.ElMessage;


/***/ }),

/***/ 1130:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   a4: function() { return /* binding */ getBoundsFromRect84; }
/* harmony export */ });
/* unused harmony exports googleScales, isArrayContainsAnother, isVectortileFn, getVectortileServerInfo, handleDataServiceToMVTTree, handleTileServiceToMVTTree */
/* harmony import */ var _common_utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3684);
/* harmony import */ var _common_utils_util__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_common_utils_util__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _common_utils_webmapservice__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7338);
/* harmony import */ var _common_utils_webmapservice__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_common_utils_webmapservice__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _common_ui_message__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1092);
/* harmony import */ var _common_types_global_event__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3353);
/* harmony import */ var _common_types_global_event__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_common_types_global_event__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _common_utils_dictionaries__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(463);
/* harmony import */ var _common_utils_dictionaries__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_common_utils_dictionaries__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _common_configprovider_useGlobalConfig__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5711);
/* harmony import */ var _common_configprovider_useGlobalConfig__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_common_configprovider_useGlobalConfig__WEBPACK_IMPORTED_MODULE_5__);
/*
 * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
 * All rights reserved.
 */
/**
 * Author: 朱鹏超
 * Date: 2025-07-8
 * Description: MVT图层树
 */







//  谷歌比例尺
let googleScales = (/* unused pure expression or super */ null && ([
  591658710, 295829355, 147914677, 73957338, 36978669, 18489334,
  9244667, 4622333, 2311166, 1155583, 577791, 288895,
  144447, 72223, 36111, 18055, 9027, 4513, 2256,
  1128, 564, 282, 141, 70
]));

let isArrayContainsAnother = (arr1, arr2) => {
  return arr2.every(element => arr1.includes(Number(element.toString().split('.')[0])));
};

function getBoundsFromRect84(rect84) {
  if (Array.isArray(rect84)) {
    return [
      [rect84[1], rect84[0]],
      [rect84[3], rect84[2]]
    ];
  } else if (rect84 instanceof window.KqGIS.Bounds) {
    return [
      [rect84["bottom"], rect84["left"]],
      [rect84["top"], rect84["right"]]
    ];
  } else if (rect84 instanceof Object) {
    return [
      [rect84["miny"], rect84["minx"]],
      [rect84["maxy"], rect84["maxx"]]
    ];
  } else {
    return null;
  }
}

// 判断 kqrest 服务 是否能矢量瓦片渲染
function isVectortileFn(serviceUrl, uaToken) {
  let isTrue = false;
  let mapInfo = null;
  let serverName = serviceUrl.split("services/")[1].split("/map")[0];
  const { locale } = useLocale();
  return new Promise(resolve => {
    serviceUrl = serviceUrl.split("services/")[0] + "services/";
    var webMapService = new WebMapService(serverName, {
      token: uaToken,
      serviceUrl
    });
    webMapService
      .getMapInfo()
      .then(res => {
        if (res.resultcode === "error") {
          KqMessage({
            message: `${locale.value.common.failedtoParseMsg} ${res.message}`,
            grouping: true,
            type: "error",
            duration: 6000
          });
          resolve({ isTrue, mapInfo });
        }
        if (res.result) {
          mapInfo = res.result;
          if (res.result.hasMvtStyleFile) {
            // if (res.result.supportMvtPreview) {
            isTrue = true;
          }
        }
        resolve({ isTrue, mapInfo });
      })
      .catch(err => {
        KqMessage({
          message: `${locale.value.common.failedtoParseMsg} ${err}`,
          grouping: true,
          type: "error",
          duration: 6000
        });
        resolve({ isTrue, mapInfo });
      });
  });
}

// 解析 矢量瓦片 服务
function getVectortileServerInfo(
  serviceUrl,
  ua_token,
  mapInfoParam,
  multiwebports,
  layerConfigZIndex,
  mapTarget,
  serviceType
) {
  const { locale } = useLocale();
  return new Promise(resolve => {
    let url = serviceUrl + "/vector/style.json";
    if (ua_token) {
      url = `${url}?ua_token=${ua_token}`;
    }
    let serviceInfo = new KqGIS.Map.GetVectorInfoService(url);
    serviceInfo
      .init(response => {
        if (!response || response.resultcode === "error") {
          if (response.status && response.status === 404) {
            KqMessage({
              message: `${locale.value.common.mvtParsingMsg}`,
              grouping: true,
              type: "warning",
              duration: 6000
            });
          } else {
          }
        }
      })
      .then(() => {
        try {
          let mvtInfo = serviceInfo.getInfo();
          let mvtLayers = serviceInfo.getLayerInfos();
          let maxZoom = mvtInfo.maxzoom;
          let minZoom = mvtInfo.minzoom;
          let mapInfo = mapInfoParam;
          let serverName = serviceUrl.split("services/")[1].split("/map")[0];
          let _fn_mvt = () => {
            const { bounds84, center, origin, rect, resolutions, scale, spatialReference, layerTreeData, layers_old } =
              formatKQMapInfo(
                mapInfo,
                `${serviceUrl.split("/services")[0]}/services`,
                serverName,
                ua_token,
                null,
                true
              );
            let _epsg = spatialReference.epsg;
            // 判断服务的空间参考为3857、4490、4326、4610，其他的空间参考不支持
            if (_epsg != 3857 && _epsg != 4490 && _epsg != 4326 && _epsg != 4610) {
              KqMessage({
                message: `${locale.value.common.mvtParsingMsg1}${_epsg}${locale.value.common.mvtParsingMsg2}`,
                grouping: true,
                type: "error",
                duration: 6000
              });
              return false;
            }
            // 判断是否为谷歌比例尺，非谷歌比例尺不支持
            let isgoogleScales = isArrayContainsAnother(googleScales, scale);
            if (!isgoogleScales) {
              KqMessage({
                message: `${locale.value.common.mvtParsingMsg3}`,
                grouping: true,
                type: "error",
                duration: 6000
              });
              return false;
            }
            let isDegree = false;
            if (_epsg == 4490 || _epsg == 4326) {
              isDegree = true;
              maxZoom = maxZoom - 1;
            }
            if (_epsg == 3857) {
              // 判断 rest 服务的比例尺是否少一级，如少，补一级；
              if (scale.length < maxZoom + 1 && scale.length === maxZoom) {
                scale.push(scale[scale.length - 1] / 2);
                resolutions.push(resolutions[resolutions.length - 1] / 2);
              }
              minZoom = minZoom + 1;
            }
            (function _fn(layers) {
              layers.forEach(layer => {
                layer.renderType = "vectortile";
                layer.accessToken = ua_token || "not-needed";
                layer.style = `${serviceUrl}/vector/style.json`;
                layer.serverType = "kqserver";
                layer.label = layer.name;
                layer.ids = [];
                layer.subLayerIds = [];
                // layer.maxZoom = maxZoom;
                // layer.minZoom = minZoom;
                // layer.url = ua_token ? `${layer.url}?ua_token=${ua_token}` : layer.url;
                if (layer.children && layer.children.length) {
                  _fn(layer.children);
                }
              });
            })(layerTreeData);
            let _map = {
              bounds: bounds84,
              center,
              maxZoom,
              minZoom,
              origin,
              rect,
              resolutions,
              scale,
              spatialReference
            };
            let result = {
              map: _map,
              vectortileTreeData: [],
              defaultCheckedKeys: [],
              hasAuth: false,
              serviceName: null,
              webMapInfo: Object.assign(mapInfo, { map: _map })
            };
            let serviceGuid = guid();
            const layerConfig = {
              guid: serviceGuid,
              name: mvtInfo.name,
              label: mvtInfo.name,
              serverType: "kqserver",
              renderType: "vectortile",
              style: ua_token
                ? `${serviceUrl}/vector/style.json?ua_token=${ua_token}`
                : `${serviceUrl}/vector/style.json`,
              zIndex: layerConfigZIndex || 100000,
              maxZoom,
              // minZoom,
              zoom: mvtInfo.zoom,
              isDegree,
              children: []
            };
            // 融合图层
            if (layerTreeData.some(item => item.combined) && layers_old && layers_old.length) {
              layerTreeData.forEach(layer => {
                if (layer.combined) {
                  // layer.children = [];
                  result.defaultCheckedKeys.push(layer.guid);
                  layerConfig.children.push(layer);
                  mvtLayers[0].children.forEach(mvtLayer => {
                    mvtLayer.children.forEach(ele => {
                      if (
                        ele.metadata &&
                        ele.metadata["layer:renderer-name"] &&
                        ele.metadata["layer:renderer-name"].indexOf(layer.tilepath) != -1
                      ) {
                        layer.ids && layer.ids.push(ele.id);
                        layer.subLayerIds && layer.subLayerIds.push(ele.id);
                      }
                      // 海图
                      if (layer.isHaitu) {
                        //if (ele.id.split('#')[2] == layer.id) {
                        layer.ids && layer.ids.push(layer.id);
                        //layer.subLayerIds && layer.subLayerIds.push(ele.id);
                        //}
                      }
                    });
                  });
                } else {
                  // 非融合图层
                  result.defaultCheckedKeys.push(layer.guid);
                  mvtLayers[0].children.forEach(mvtLayer => {
                    // layer.annoLayer - 注记
                    let _layerName = layer.name.toLowerCase();
                    let __layerName = layer.name.replace(/-/g, "").toLowerCase();
                    let _mvtLayer_customName = mvtLayer.customName.toLowerCase();
                    if (
                      mvtLayer.customName.indexOf(layer.name) != -1 ||
                      mvtLayer.customName.indexOf(layer.name.replace(/-/g, "")) != -1 ||
                      (layer.annoLayer &&
                        (_mvtLayer_customName.indexOf(_layerName) != -1 ||
                          _mvtLayer_customName.indexOf(__layerName) != -1))
                    ) {
                      mvtLayer.children.forEach(ele => {
                        layer.ids.push(ele.id);
                        layer.subLayerIds.push(ele.id);
                      });
                    }
                  });
                }
              });
              // 与rest图层同步，处理查询
              mvtLayers[0].children.forEach(mvtLayer => {
                (function _fn(layers_old) {
                  layers_old.forEach(layer_old => {
                    if (layer_old.groupLayer && layer_old.children && layer_old.children.length) {
                      _fn(layer_old.children);
                    }
                    if (
                      (mvtLayer.customName == layer_old.name || mvtLayer.customName.indexOf(layer_old.name) != -1) &&
                      !layer_old.groupLayer
                    ) {
                      layer_old.label = layer_old.name;
                      layerConfig.children.push(layer_old);
                    }
                  });
                })(layers_old);
              });
            } else {
              // 非融合图层
              // 与rest图层同步，处理查询
              mvtLayers[0].children.forEach(mvtLayer => {
                (function _fn(layers) {
                  layers.forEach(layer => {
                    if (layer.groupLayer && layer.children && layer.children.length) {
                      _fn(layer.children);
                    }
                    // layer.annoLayer - 注记
                    let _layerName = layer.name.toLowerCase();
                    let __layerName = layer.name.replace(/-/g, "").toLowerCase();
                    let _mvtLayer_customName = mvtLayer.customName.toLowerCase();
                    if (
                      ((mvtLayer.customName == layer.name || mvtLayer.customName.indexOf(layer.name) != -1) &&
                        !layer.groupLayer) ||
                      (!layer.groupLayer &&
                        layer.annoLayer &&
                        (_mvtLayer_customName.indexOf(_layerName) != -1 ||
                          _mvtLayer_customName.indexOf(__layerName) != -1))
                    ) {
                      layer.label = layer.name;
                      layer.ids = [];
                      layer.subLayerIds = [];
                      result.defaultCheckedKeys.push(layer.guid);
                      layerConfig.children.push(layer);
                    }
                  });
                })(layerTreeData);
              });
              layerConfig.children.forEach(layer => {
                mvtLayers[0].children.forEach(mvtLayer => {
                  // layer.annoLayer - 注记
                  let _layerName = layer.name.toLowerCase();
                  let __layerName = layer.name.replace(/-/g, "").toLowerCase();
                  let _mvtLayer_customName = mvtLayer.customName.toLowerCase();
                  if (
                    mvtLayer.customName.indexOf(layer.name) != -1 ||
                    mvtLayer.customName.indexOf(layer.name.replace(/-/g, "")) != -1 ||
                    (layer.annoLayer &&
                      (_mvtLayer_customName.indexOf(_layerName) != -1 ||
                        _mvtLayer_customName.indexOf(__layerName) != -1))
                  ) {
                    mvtLayer.children.forEach(ele => {
                      layer.ids.push(ele.id);
                      layer.subLayerIds.push(ele.id);
                    });
                  }
                });
              });
            }
            layerConfig.children && layerConfig.children.length && layerConfig.children.reverse();
            layerConfig.restLayers = layerConfig.children;
            if (multiwebports) {
              layerConfig["multDomain"] = multiwebports;
            }
            // 获取mvt图层树数据
            result.vectortileTreeData = layerTreeData;
            // if (layerConfig.restLayers.some(item => item.isHaitu) && layerConfig.restLayers.some(item => item.layerType === 201)) {
            // 	layerConfig.useMvtHT = true;
            // 	layerConfig.url = serviceUrl;
            // }
            if(isHtMvt(layers_old)){
              layerConfig.useMvtHT = true;
              layerConfig.url = serviceUrl;
            }
            // 填充图层以及显示
            result.layerConfig = layerConfig;
            // kqrest 服务的海图用常规图层树以及渲染模式
            if (layerConfig.useMvtHT) {
              globalEvent.getWebMapByMapTarget(mapTarget, map => {
                delete layerConfig.children
                map.addLayer2View([layerConfig]);
                map.setLayerVisibleStateByIds([layerConfig.guid], true);
              });
            }
            // globalEvent.getWebMapByMapTarget(mapTarget, map => {
            //   map.addLayer2View([layerConfig]);
            //   map.setLayerVisibleStateByIds([layerConfig.guid], true);
            // });

            // 空间查询&要素查询权限设置
            if (mapInfo && mapInfo.serviceType && mapInfo.serviceType.toLowerCase() === "mapservice") {
              result.serviceName = mapInfo?.name;
              result.hasAuth = true;
            }
            resolve(result);
          };
          if (!mapInfo && serviceType !== 'TileService') {
            let webMapService = new WebMapService(serverName, {
              token: ua_token,
              serviceUrl: serviceUrl.split("services/")[0] + "services/"
            });

            webMapService
              .getMapInfo()
              .then(result => {
                mapInfo = result.result;
                _fn_mvt();
              })
              .catch(err => {
                KqMessage({
                  message: `${locale.value.common.failedtoParseMVTMsg}`,
                  grouping: true,
                  type: "error",
                  duration: 6000
                });
              });
          } else {
            if (serviceType === 'TileService') {
              handleTileServiceToMVTTree(serviceUrl, mvtInfo, mvtLayers, ua_token, layerConfigZIndex, multiwebports).then(result => {
                resolve(result);
              })
            } else {
              _fn_mvt();
            }

          }
        } catch (err) {
          KqMessage({
            message: `${locale.value.common.mvtParsingError} ${err}`,
            grouping: true,
            type: "error",
            duration: 6000
          });
        }
      });
  });
}

// 理数据服务的数据为矢量瓦片图层树
function handleDataServiceToMVTTree(data, callback) {
  let vectortileTreeData = data && data.treeData;
  let defaultCheckedKeys = [];
  if (vectortileTreeData && vectortileTreeData.length) {
    (function _fn(tree) {
      for (var i = 0; i < tree.length; i++) {
        let itemTree = tree[i];
        if (itemTree.children && itemTree.children.length) {
          _fn(itemTree.children);
        }
        itemTree.label = itemTree.name;
        itemTree.ids = itemTree.subLayerIds;
        if (!itemTree.guid) {
          itemTree.guid = guid();
        }
        defaultCheckedKeys.push(itemTree.guid);
      }
    })(vectortileTreeData);
  }
  callback && callback({ vectortileTreeData, defaultCheckedKeys });
}

function handleTileServiceToMVTTree(serviceUrl, mvtInfo, mvtLayers, ua_token, layerConfigZIndex, multiwebports) {
  return new Promise((resolve) => {
    // 获取瓦片服务的元数据
    let _url = `${serviceUrl}/getmetadata`
    fetch(_url).then((response) => {
      if (response.status == 200) {
        try {
          response.json().then((res) => {
            // 处理瓦片服务发布的矢量瓦片服务
            // 获取分辨率和比例尺
            let { rect84, rect, mapscales, originx, originy } = res.result
            let origin = [originx, originy];
            let { scale, resolutions } = mapInfo_default_geographic
            let minZoom = mapscales[0].id
            let maxZoom = mapscales[mapscales.length - 1].id
            let bounds = (() => {
              let _bounds = mvtInfo.sources[mvtInfo.name].bounds
              return [[_bounds[1], _bounds[0]], [_bounds[3], _bounds[2]]]
            })()
            let center = [mvtInfo.center[1], mvtInfo.center[0]];
            let isDegree = false;
            let _epsg = mvtInfo.metadata.epsgCode.split(':')[1]
            let spatialReference = {
              epsg: _epsg,
              proj4: proj4Dic[_epsg],
            }
            if (_epsg == 4490 || _epsg == 4326) {
              isDegree = true;
            }
            let serviceGuid = guid();
            const layerConfig = {
              guid: serviceGuid,
              name: mvtInfo.name,
              label: mvtInfo.name,
              serverType: "TileService",
              renderType: "vectortile",
              style: ua_token
                ? `${serviceUrl}/vector/style.json?ua_token=${ua_token}`
                : `${serviceUrl}/vector/style.json`,
              zIndex: layerConfigZIndex || 100000,
              maxZoom,
              minZoom,
              zoom: mvtInfo.zoom,
              isDegree,
              children: []
            };
            if (multiwebports) {
              layerConfig["multDomain"] = multiwebports;
            }
            // 处理矢量瓦片
            let layerTreeData = []
            mvtLayers[0].children.forEach((mvtLayer) => {
              let id = mvtLayer.children[0].id.split('#')[0]
              let ids = []
              let sourceName = mvtLayers[0].customName
              mvtLayer.children.forEach((layer) => {
                ids.push(layer.id)
              })
              let name = mvtLayer.customName;
              let shapeType = (() => {
                return mvtLayer.children[0].filter[1][2].toLowerCase()
              })()
              layerTreeData.push({
                guid: guid(),
                groupLayer: false,
                id,
                ids,
                subLayerIds: ids,
                label: name,
                name,
                parentLayerId: -1,
                srs: spatialReference,
                sourceName,
                shapeType,
                url: serviceUrl,
                vectorLayer: true,
                visible: true,
                zIndex: layerConfigZIndex,
                zIndex_old: layerConfigZIndex,
                rect,
                rect84,
              })
            })
            layerConfig.children = layerTreeData;
            let defaultCheckedKeys = []
            layerTreeData.forEach(layer => {
              defaultCheckedKeys.push(layer.guid)
            })
            let _map = {
              bounds,
              center,
              maxZoom,
              minZoom,
              origin,
              rect,
              rect84: rect,
              resolutions,
              scale,
              spatialReference
            };
            let result = {
              map: _map,
              vectortileTreeData: layerTreeData,
              defaultCheckedKeys,
              hasAuth: false,
              serviceName: mvtInfo.name,
              webMapInfo: { map: _map },
              layerConfig
            };
            resolve(result)
          })
        } catch (err) {
          resolve(null)
          KqMessage({
            message: `${locale.value.common.mvtParsingError} ${err}`,
            grouping: true,
            type: "error",
            duration: 6000
          });
        }
      } else {
        KqMessage({
          message: `${locale.value.common.mvtParsingError}`,
          grouping: true,
          type: "error",
          duration: 6000
        });
      }
    }).catch((err) => {
      resolve(null)
      KqMessage({
        message: `${locale.value.common.mvtParsingError} ${err}`,
        grouping: true,
        type: "error",
        duration: 6000
      });
    })
  })
}
function isHtMvt(children){
  for(let i=0;i<children.length;i++){
    if(children[i].isHaitu && children[i].layerType === 201){
      return true;
    }
  }
  return false;
}


/***/ }),

/***/ 3353:
/***/ (function(module) {

module.exports = __WEBPACK_EXTERNAL_MODULE__3353__;

/***/ }),

/***/ 3684:
/***/ (function(module) {

module.exports = __WEBPACK_EXTERNAL_MODULE__3684__;

/***/ }),

/***/ 4383:
/***/ (function(module) {

module.exports = __WEBPACK_EXTERNAL_MODULE__4383__;

/***/ }),

/***/ 5698:
/***/ (function(module) {

module.exports = require("@kq_npm/client_icons_vue");

/***/ }),

/***/ 5711:
/***/ (function(module) {

module.exports = __WEBPACK_EXTERNAL_MODULE__5711__;

/***/ }),

/***/ 6363:
/***/ (function(module) {

module.exports = require("element-plus/dist/index.full.js");

/***/ }),

/***/ 7338:
/***/ (function(module) {

module.exports = __WEBPACK_EXTERNAL_MODULE__7338__;

/***/ }),

/***/ 8353:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   y: function() { return /* binding */ kq_npm_client_common_vue; }
/* harmony export */ });
/* unused harmony export kq_npm_client_leaflet_vue */
let kq_npm_client_common_vue = (window.kq_npm_client_common_vue = window.kq_npm_client_common_vue || {});

__webpack_require__.g.kq_npm_client_common_vue = kq_npm_client_common_vue;

let kq_npm_client_leaflet_vue = (window.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue || {});

__webpack_require__.g.kq_npm_client_leaflet_vue = kq_npm_client_leaflet_vue;


/***/ }),

/***/ 9371:
/***/ (function(module) {

module.exports = require("@element-plus/icons-vue");

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	!function() {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = function(module) {
/******/ 			var getter = module && module.__esModule ?
/******/ 				function() { return module['default']; } :
/******/ 				function() { return module; };
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	!function() {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = function(exports, definition) {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/global */
/******/ 	!function() {
/******/ 		__webpack_require__.g = (function() {
/******/ 			if (typeof globalThis === 'object') return globalThis;
/******/ 			try {
/******/ 				return this || new Function('return this')();
/******/ 			} catch (e) {
/******/ 				if (typeof window === 'object') return window;
/******/ 			}
/******/ 		})();
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	!function() {
/******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	!function() {
/******/ 		// 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 });
/******/ 		};
/******/ 	}();
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "default": function() { return /* reexport */ MvtLayerTree; }
});

// EXTERNAL MODULE: external {"root":"Vue","commonjs":"vue","commonjs2":"vue","amd":"vue"}
var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__(154);
// EXTERNAL MODULE: external "@kq_npm/client_icons_vue"
var client_icons_vue_ = __webpack_require__(5698);
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/util.js"
var util_js_ = __webpack_require__(3684);
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/gis-utils"
var gis_utils_ = __webpack_require__(64);
// EXTERNAL MODULE: external "@element-plus/icons-vue"
var icons_vue_ = __webpack_require__(9371);
// EXTERNAL MODULE: external "element-plus/dist/index.full.js"
var index_full_js_ = __webpack_require__(6363);
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_mixin/render"
var render_ = __webpack_require__(4383);
var render_default = /*#__PURE__*/__webpack_require__.n(render_);
;// ./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/common/_ui/tree/Tree.vue?vue&type=script&lang=js





/* harmony default export */ var Treevue_type_script_lang_js = ({
  name: "KqTree",
  defaultComponent: index_full_js_.ElTree,
  mixins: [(render_default())],
  setup(props, context) {
    (render_default()).setup && render_default().setup(props, context);
    // let refs = ref({});
    // let proxyContext = getCurrentInstance();
    // onMounted(() => {
    //   refs.value = proxyContext.refs.child;
    //   console.log("proxyContext", refs.value);
    // });
    // // return {
    // //   ...refs.value
    // // }
    // context.expose({...refs.value})
  }
});

;// ./src/common/_ui/tree/Tree.vue?vue&type=script&lang=js
 
;// ./src/common/_ui/tree/Tree.vue



const __exports__ = Treevue_type_script_lang_js;

/* harmony default export */ var Tree = (__exports__);
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/init.js"
var init_js_ = __webpack_require__(455);
var init_js_default = /*#__PURE__*/__webpack_require__.n(init_js_);
// EXTERNAL MODULE: ./src/common/KqGIS.js
var mvtlayertree_KqGIS = __webpack_require__(8353);
;// ./src/common/_ui/tree/index.js
/*
 * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
 * All rights reserved.
 */




Tree.install = (Vue, opts) => {
  init_js_default()(Vue, opts);
  Vue.component(Tree.name, Tree);
};

/* harmony default export */ var tree = (Tree);

mvtlayertree_KqGIS/* kq_npm_client_common_vue */.y.KqTree = Tree;

;// ./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/common/_ui/input/Input.vue?vue&type=script&lang=js




/* harmony default export */ var Inputvue_type_script_lang_js = ({
  name: "KqInput",
  defaultComponent: index_full_js_.ElInput,
  mixins: [(render_default())],
  setup(props, context) {
    (render_default()).setup && render_default().setup(props, context);
  }
});

;// ./src/common/_ui/input/Input.vue?vue&type=script&lang=js
 
;// ./src/common/_ui/input/Input.vue



const Input_exports_ = Inputvue_type_script_lang_js;

/* harmony default export */ var Input = (Input_exports_);
;// ./src/common/_ui/input/index.js
/*
 * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
 * All rights reserved.
 */




Input.install = (Vue, opts) => {
  init_js_default()(Vue, opts);
  Vue.component(Input.name, Input);
};

/* harmony default export */ var input = (Input);

mvtlayertree_KqGIS/* kq_npm_client_common_vue */.y.KqRadio = Input;

// EXTERNAL MODULE: ./src/leaflet/mvtlayertree/MvtLayerTreeUtils.js
var MvtLayerTreeUtils = __webpack_require__(1130);
// EXTERNAL MODULE: ./src/common/_ui/message/index.js
var message = __webpack_require__(1092);
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_types/global-event"
var global_event_ = __webpack_require__(3353);
var global_event_default = /*#__PURE__*/__webpack_require__.n(global_event_);
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/configprovider/useGlobalConfig.js"
var useGlobalConfig_js_ = __webpack_require__(5711);
;// ./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/leaflet/mvtlayertree/MvtLayerTree.vue?vue&type=script&setup=true&lang=js


const _hoisted_1 = { class: "tree-item" }
const _hoisted_2 = { class: "tree-node_label" }

;












const __default__ = {
  name: "KqMvtLayerTree"
};

/* harmony default export */ var MvtLayerTreevue_type_script_setup_true_lang_js = (/*@__PURE__*/Object.assign(__default__, {
  props: {
  mapTarget: String,
  serverType: { type: String, default: "mvt" },
  vectortileTreeData: Array,
  defaultCheckedKeys: Array,
  layerConfig: Object,
  position: [String, Object],
  // 是否生成HeaderTemp
  showHeaderTemp: {
    type: Boolean,
    default: false
  },
  // 是否折叠HeaderTemp，showHeaderTemp为true时生效
  isCollapseHeaderTemp: {
    type: Boolean,
    default: false
  },
  // HeaderTemp标题
  headerTempTitle: {
    type: String
  },
  // HeaderTempIcon
  headerTempIcon: {
    type: [Object, String],
    default: client_icons_vue_.IconMvtLayerTree
  },
  // HeaderTemp Title&Icon的位置
  isRight: {
    type: Boolean,
    default: true
  },
  showShadow: {
    type: Boolean,
    default: false
  },
  // 显示右键菜单
  showRightMenu: { type: Boolean, default: true },
  // 右键菜单过滤
  rightMenuData: {
    type: Array,
    default: () => [
      "full",
      "opacity",
      "top",
      "canceltop",
      "moveup",
      "movedown",
      "revert",
      "cancel",
      "del",
      "checkedall",
      "attr"
    ]
  },
  rightMenuDataDisabled: { type: Array },
  // 图层是否支持拖动
  treeNodeDraggable: {
    type: Boolean,
    default: true
  }
},
  emits: ["openOpacity", "openFeatureTable"],
  setup(__props, { emit: __emit }) {

const props = __props;

// 组件容器ref
let boxRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);

// 生成组件默认header
let headerTemp = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
let headerTempRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
let headerTitle = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();

// mvt 图层树
let mvtTreeRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
let filterTreeTxt = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);

// mvt 预览图层树过滤
(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(filterTreeTxt, val => {
  if (mvtTreeRef.value) {
    mvtTreeRef.value.$refs.child.filter(val);
  }
});

// 国际化
const { t, lang, locale } = (0,useGlobalConfig_js_.useLocale)();

let treeData = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)([]);
let checkedKeysData = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)([]);

// 判断是否为adddata新增的图层
let isRender = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(true);

let dropDownMenu = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
// 是否显示下拉菜单
let menuDropdown = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false);

// 当前选中的节点
let currentSelectedNode = null;
let showDelNode = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false);
let showOtherNode = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(true);
// 图层是否能进行透明度设置、位置移动操作
let canChange = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(true);
// 菜单发生位移时修正
let menuOffsetTop = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(0);
let menuOffsetLeft = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(0);

const emit = __emit;

(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onBeforeUnmount)(() => {
  document.removeEventListener("click", hideMenuDropdown);
});

/**
 * @description 监听header生成
 */
const watchCreateHeaderTemp = () => {
  if (props.showHeaderTemp) {
    // 生成headerTemp
    headerTemp.value = (0,util_js_.createHeaderTemp)(boxRef.value, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toRefs)(props), headerTempRef, "common.layerTreeTitle");
  }
};

(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
  treeData.value = props.vectortileTreeData;
  checkedKeysData.value = props.defaultCheckedKeys;
  // mapLayerUtils.setLayerVisibleStateByIds(props.mapTarget, checkedKeysData.value, true);
  (0,util_js_.updatePosition)(boxRef.value, props);
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(
    () => props.position,
    (newVal, oldVal) => {
      (0,util_js_.updatePosition)(boxRef.value, props);
    }
  );

  watchCreateHeaderTemp();

  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(
    () => props.showHeaderTemp,
    (newVal, oldVal) => {
      (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.nextTick)(() => {
        watchCreateHeaderTemp();
      });
    }
  );
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.nextTick)(() => {
    global_event_default().getWebMapByMapTarget(props.mapTarget, webMap => {
      if (props.layerConfig) {
        webMap.addLayer2View([props.layerConfig]);
        webMap.setLayerVisibleStateByIds([props.layerConfig.guid], true, null, () => {
          (function _fn(_layers) {
            for (var i = 0; i < _layers.length; i++) {
              let _layer = _layers[i];
              if (_layer.children && _layer.children.length) {
                _fn(_layer.children);
              } else {
                if (props.defaultCheckedKeys && props.defaultCheckedKeys.length) {
                  if (!props.defaultCheckedKeys.includes(_layer.guid)) {
                    _setLayerVisibleStateByIds(webMap, _layer, false);
                  }
                } else {
                  _setLayerVisibleStateByIds(webMap, _layer, false);
                }
              }
            }
          })(props.vectortileTreeData);
        });
      }
    });
  });

  // 监听添加临时涂层时图层数据变化
  gis_utils_.mapViewUtils.bindViewEvents(
    "resetLayerDatas",
    webmap => {
      if (isRender.value) {
        let addDataLayers = [];
        if (webmap.changeData && webmap.changeData.guids && webmap.changeData.guids.length) {
          let hasLs = treeData.value.some(layer => layer.lsType && layer.lsType === "ls");
          webmap.target._mapLayerTreeData.forEach(ele => {
            if (ele.lsType === "ls") {
              if (!hasLs) {
                let layer = {
                  guid: ele.guid,
                  children: [],
                  name: "临时图层",
                  label: "临时图层",
                  lsType: ele.lsType,
                  visible: true
                };
                treeData.value.push(layer);
                checkedKeysData.value.push(ele.guid);
              }
              webmap.changeData.guids.forEach(guid => {
                ele.children.forEach(childEle => {
                  if (childEle.guid === guid) {
                    let layer = Object.assign(childEle, {
                      label: childEle.name,
                      shapeType: "geojson",
                      visible: true
                    });
                    addDataLayers.push(layer);
                  }
                });
              });
            }
          });
          if (addDataLayers.length) {
            addDataLayers.forEach(layer => {
              treeData.value.forEach(ele => {
                if (ele.lsType === "ls") {
                  let hasLayer = ele.children.some(_layer => _layer.guid === layer.guid);
                  if (!hasLayer) {
                    ele.children.push(layer);
                    checkedKeysData.value.push(layer.guid);
                  }
                }
              });
            });
          }
        }
        setTimeout(() => {
          mvtTreeRef.value && mvtTreeRef.value.$refs.child.setCheckedKeys(checkedKeysData.value, false);
        });
      }
      isRender.value = true;
    },
    props.mapTarget
  );
});

const filterNode = (value, data) => {
  if (!value) return true;
  return data.label.includes(value);
};

// 矢量瓦片服务-点击缩放至图层
const onVectortileNodeClick = data => {
  if (!data.children) {
    gis_utils_.utils.getWebMap(props.mapTarget, webmap => {
      webmap.map &&
        webmap.map.fitBounds(
          (0,MvtLayerTreeUtils/* getBoundsFromRect84 */.a4)(
            data.rect84 ||
              (() => {
                return [data.bounds84[0][0], data.bounds84[0][1], data.bounds84[1][0], data.bounds84[1][1]];
              })()
          )
        );
    });
  }
};

// 矢量瓦片服务-点击图层check框
const handleCheck = (data, CheckedData) => {
  isRender.value = false;
  checkedKeysData.value = CheckedData.checkedKeys;
  gis_utils_.utils.getWebMap(props.mapTarget, webmap => {
    let isChecked = CheckedData.checkedKeys.includes(data.guid);
    if (data.lsType && data.lsType === "ls") {
      if (data.children && data.children.length) {
        let _guids = [];
        data.children.forEach(ele => {
          _guids.push(ele.guid);
        });
        gis_utils_.mapLayerUtils.setLayerVisibleStateByIds(props.mapTarget, _guids, isChecked);
      } else {
        gis_utils_.mapLayerUtils.setLayerVisibleStateByIds(props.mapTarget, [data.guid], isChecked);
      }
    } else {
      (function _fn(_layers) {
        _layers.forEach(_layer => {
          if (_layer.children && _layer.children.length) {
            _fn(_layer.children);
          } else {
            _setLayerVisibleStateByIds(webmap, _layer, isChecked);
          }
        });
      })([data]);
      isRender.value = true;
    }
  });
};

// 矢量瓦片-设置图层显示或隐藏
const _setLayerVisibleStateByIds = (mapViewViewModel, data, isShow) => {
  if (data.vectorLayer) {
    let glMap;
    let getGLMapInterval;
    const getGLMap = () => {
      let _layer = mapViewViewModel._layers.get(mapViewViewModel.getLayerData()[0].guid);
      glMap = _layer.getMapboxMap && _layer.getMapboxMap();
      (function setCheck(layer) {
        if (layer.children && layer.children.length) {
          for (let i = 0; i < layer.children.length; i++) {
            setCheck(layer.children[i]);
          }
        } else {
          if (layer.ids && layer.ids.length) {
            for (let i = 0; i < layer.ids.length; i++) {
              let id = layer.ids[i];
              glMap && glMap.setLayoutProperty(id, "visibility", isShow ? "visible" : "none");
            }
          }
        }
      })(data);
      if (glMap) {
        clearInterval(getGLMapInterval);
      }
    };
    if (!glMap) {
      getGLMapInterval = setInterval(getGLMap, 100);
    }
  } else {
    gis_utils_.mapLayerUtils.setLayerVisibleStateByIds(props.mapTarget, [data.guid], isShow);
  }
};

// 矢量瓦片服务预览-图层树图层icon类型判断
const getIconType = (type, data) => {
  if (type == "point") {
    return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.markRaw)(client_icons_vue_.IconPoint);
  } else if (type == "polyline") {
    return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.markRaw)(client_icons_vue_.IconPolyline);
  } else if (type === "polygon" && data.annoLayer === true) {
    return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.markRaw)(client_icons_vue_.IconNote);
  } else if (type == "polygon") {
    return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.markRaw)(client_icons_vue_.IconPolygon2);
  } else if (type == "rasterLayer") {
    return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.markRaw)(client_icons_vue_.IconImage);
  } else if (type == "mapServer") {
    return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.markRaw)(client_icons_vue_.IconMapServer);
  } else if (type == "tileServer") {
    return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.markRaw)(client_icons_vue_.IconTileServer);
  } else if (type === "combined") {
    return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.markRaw)(client_icons_vue_.IconBlendingLayer);
  } else if (type === "geojson") {
    return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.markRaw)(client_icons_vue_.IconRasterTile);
  } else {
    return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.markRaw)(client_icons_vue_.IconFolder);
  }
};

/**
 * 图层树右建菜单事件
 * @param {object} mouseEvent
 * @param {object} object
 * @param {object} node
 */
const rightClick = (mouseEvent, object, node) => {
  // 临时图层特殊处理
  if (object.lsType && object.lsType === "ls") {
    // 临时图层支持移除节点
    showDelNode.value = true;

    // 临时图层一样子节点才能其他操作
    if (object.children) {
      showOtherNode.value = false;
    } else {
      showOtherNode.value = true;
    }
  } else if (object.children) {
    return;
  } else {
    showDelNode.value = false;
    showOtherNode.value = true;
  }
  if (
    ["terrainprovider", "3dtiles", "datasource", "dataflowlayer"].indexOf(object.serverType) > -1 ||
    !object.vectorLayer
  ) {
    canChange.value = false;
  } else {
    canChange.value = true;
  }

  if (node.checked) {
    menuDropdown.value = true;
    let menu = dropDownMenu.value.$el;
    menu.style.left = mouseEvent.clientX - 5 + Number(menuOffsetTop.value) + "px";
    menu.style.top = mouseEvent.clientY - 10 + Number(menuOffsetLeft.value) + "px";
    currentSelectedNode = node;
    document.addEventListener("click", hideMenuDropdown);
  } else {
    (0,message/* default */.A)({
      showClose: true,
      message: "请先勾选图层！",
      type: "warning",
      duration: 3000
    });
  }
};

/**
 * 隐藏下拉菜单
 */
function hideMenuDropdown() {
  // 去除选中样式
  let selectElement = dropDownMenu.value.$el.querySelector(".is-active");

  if (selectElement) selectElement.classList.remove("is-active");

  menuDropdown.value = false;

  document.removeEventListener("click", hideMenuDropdown);
}

/**
 * 右建菜单选择事件
 * @param {string} key 菜单每行的key值
 */
const handleSelectMenu = key => {
  // 缩放至图层
  if (key == 1) {
    onVectortileNodeClick(currentSelectedNode.data);
  }
  // 透明度
  if (key === "2") {
    emit("openOpacity", currentSelectedNode.data);
  }
  // 所有位置还原
  if (key === "7") {
    resetLayerPosition();
  }
  // 取消所有勾选
  if (key === "8") {
    setAllLayersCheck(false);
  }
  // 勾选所有图层
  if (key === "10") {
    setAllLayersCheck(true);
  }
  // 属性表
  if (key === "6") {
    let opendata = { node: currentSelectedNode, layerTreeData: treeData.value };
    emit("openFeatureTable", opendata);
  }
  // 移除节点
  if (key === "9") {
    removeLsLayer();
  }
};

const removeLsLayer = () => {
  gis_utils_.mapLayerUtils.delTempData(props.mapTarget, currentSelectedNode.data.guid, this);
  mvtTreeRef.value.$refs.child.remove(currentSelectedNode);
};

const resetLayerPosition = () => {
  gis_utils_.mapLayerUtils.resetLayerZIndex(props.mapTarget);
};

const setAllLayersCheck = isChecked => {
  let keys = [];
  let hasls = false;
  gis_utils_.utils.getWebMap(props.mapTarget, webmap => {
    treeData.value.forEach(layer => {
      if (layer.lsType && layer.lsType === "ls") {
        if (layer.children && layer.children.length) {
          let _guids = [];
          layer.children.forEach(ele => {
            _guids.push(ele.guid);
          });
          gis_utils_.mapLayerUtils.setLayerVisibleStateByIds(props.mapTarget, _guids, isChecked);
          hasls = true;
        } else {
          gis_utils_.mapLayerUtils.setLayerVisibleStateByIds(props.mapTarget, [layer.guid], isChecked);
        }
      } else {
        (function _fn(_layers) {
          _layers.forEach(_layer => {
            if (_layer.children && _layer.children.length) {
              _fn(_layer.children);
            } else {
              _setLayerVisibleStateByIds(webmap, _layer, isChecked);
            }
          });
        })([layer]);
        isRender.value = true;
      }
      if (isChecked) {
        keys.push(layer.guid);
      }
    });
    checkedKeysData.value = keys;
    if (hasls) {
      mvtTreeRef.value.$refs.child.setChecked(keys, isChecked);
    } else {
      mvtTreeRef.value.$refs.child.setCheckedKeys(keys, isChecked);
    }
  });
};

const nodeClick = (data, node) => {
  if (!node.checked) {
    return;
  }
  currentSelectedNode = data;
};

const funAllowDrag = draggingNode => {
  if (!draggingNode.data.renderType) {
    return false;
  } else {
    return true;
  }
};

const funAllowDrop = (draggingNode, dropNode, type) => {
  if (dropNode.data.renderType && type === "inner") {
    return false;
  } else {
    return true;
  }
};

// 拖动前存储勾选的节点
// tree有bug 在拖动后 节点的勾选状态会消失 需要程序设置勾选
let checkedNodeKeys = [];
const nodeDragStart = () => {
  const _checkedNodes = mvtTreeRef.value.$refs.child.getCheckedNodes();
  checkedNodeKeys.splice(0);
  _checkedNodes.forEach(node => {
    if (node.renderType) {
      checkedNodeKeys.push(node.guid);
    }
  });
};

const nodeDrop = () => {
  // viewModel.sortLayerZIndexByGuids(dataList.data.value);
  let keys = [];
  getChildren(treeData.value, keys);
  gis_utils_.mapLayerUtils.sortLayerZIndexByGuids(props.mapTarget, keys, this);
  mvtTreeRef.value.$refs.child.setCheckedKeys(checkedNodeKeys, true);
};

const getChildren = (d, keys) => {
  for (let i = 0; i < d.length; i++) {
    if (d[i].children) {
      getChildren(d[i].children, keys);
    } else {
      if (d[i].renderType) {
        keys.push(d[i].guid);
      }
    }
  }
};

return (_ctx, _cache) => {
  const _component_kq_icon = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-icon")
  const _component_kq_menu_item = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-menu-item")
  const _component_kq_divider = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-divider")
  const _component_kq_menu = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-menu")

  return ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.Fragment, null, [
    (__props.serverType == 'mvt')
      ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", {
          key: 0,
          class: "kq-mvt-layer-tree-wrap",
          ref_key: "boxRef",
          ref: boxRef
        }, [
          (__props.showHeaderTemp)
            ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveDynamicComponent)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(headerTemp)), {
                key: 0,
                ref_key: "headerTempRef",
                ref: headerTempRef
              }, null, 512 /* NEED_PATCH */))
            : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true),
          (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(input), {
            modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(filterTreeTxt),
            "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.isRef)(filterTreeTxt) ? (filterTreeTxt).value = $event : filterTreeTxt = $event)),
            placeholder: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(t)('common.layerManagerInputTitle'),
            clearable: ""
          }, null, 8 /* PROPS */, ["modelValue", "placeholder"]),
          (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(tree), {
            class: "vectortile-tree",
            "show-checkbox": "",
            "node-key": "guid",
            data: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(treeData),
            onNodeClick: nodeClick,
            onCheck: handleCheck,
            "default-checked-keys": (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(checkedKeysData),
            "default-expanded-keys": (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(checkedKeysData),
            "filter-node-method": filterNode,
            ref_key: "mvtTreeRef",
            ref: mvtTreeRef,
            "expand-on-click-node": false,
            onNodeContextmenu: rightClick,
            draggable: __props.treeNodeDraggable,
            onNodeDrop: nodeDrop,
            onNodeDragStart: nodeDragStart,
            "allow-drag": funAllowDrag,
            "allow-drop": funAllowDrop
          }, {
            default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(({ data }) => [
              (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("span", _hoisted_1, [
                (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("span", null, [
                  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_icon, { class: "tree-node_icon" }, {
                    default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [
                      ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveDynamicComponent)(data.combined ? getIconType('combined') : getIconType(data.shapeType, data))))
                    ]),
                    _: 2 /* DYNAMIC */
                  }, 1024 /* DYNAMIC_SLOTS */),
                  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("span", _hoisted_2, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)(data.label), 1 /* TEXT */)
                ])
              ])
            ]),
            _: 1 /* STABLE */
          }, 8 /* PROPS */, ["data", "default-checked-keys", "default-expanded-keys", "draggable"])
        ], 512 /* NEED_PATCH */))
      : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true),
    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)(" S 菜单 "),
    ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.Teleport, { to: "body" }, [
      (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", null, [
        (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_menu, {
          ref_key: "dropDownMenu",
          ref: dropDownMenu,
          class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)([(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(lang) === 'en' ? 'tree-menu_en' : null, 'tree-menu']),
          onSelect: handleSelectMenu
        }, {
          default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [
            (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_menu_item, { index: "6" }, {
              default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [
                (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_icon, null, {
                  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [
                    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(client_icons_vue_.IconFeatureTable))
                  ]),
                  _: 1 /* STABLE */
                }),
                (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("span", null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(t)("common.layerListAttrSheet")), 1 /* TEXT */)
              ]),
              _: 1 /* STABLE */
            }, 512 /* NEED_PATCH */), [
              [external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.vShow, !(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(showDelNode) && props.rightMenuData.indexOf('attr') > -1]
            ]),
            (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_divider, null, null, 512 /* NEED_PATCH */), [
              [external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.vShow, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(canChange) && (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(showOtherNode) && !(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(showDelNode) && props.rightMenuData.indexOf('attr') > -1]
            ]),
            (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)(" 缩放至图层 "),
            (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_menu_item, {
              index: "1",
              disabled: props.rightMenuDataDisabled && props.rightMenuDataDisabled.indexOf('full') > -1
            }, {
              default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [
                (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_icon, null, {
                  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [
                    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(client_icons_vue_.IconZoomTo))
                  ]),
                  _: 1 /* STABLE */
                }),
                (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("span", null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(t)("common.layerTreeZoom2Layer")), 1 /* TEXT */)
              ]),
              _: 1 /* STABLE */
            }, 8 /* PROPS */, ["disabled"]), [
              [external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.vShow, 
            (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(showOtherNode) && (!props.rightMenuData || (props.rightMenuData && props.rightMenuData.indexOf('full') > -1))
          ]
            ]),
            (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)(" 透明度 "),
            (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_menu_item, {
              index: "2",
              disabled: props.rightMenuDataDisabled && props.rightMenuDataDisabled.indexOf('opacity') > -1
            }, {
              default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [
                (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_icon, null, {
                  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [
                    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(icons_vue_.MagicStick))
                  ]),
                  _: 1 /* STABLE */
                }),
                (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("span", null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(t)("common.layerTreeOpacity")), 1 /* TEXT */)
              ]),
              _: 1 /* STABLE */
            }, 8 /* PROPS */, ["disabled"]), [
              [external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.vShow, 
            (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(canChange) &&
            (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(showOtherNode) &&
            (!props.rightMenuData || (props.rightMenuData && props.rightMenuData.indexOf('opacity') > -1))
          ]
            ]),
            (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)(" 分割线 "),
            (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_divider, null, null, 512 /* NEED_PATCH */), [
              [external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.vShow, 
            (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(showOtherNode) &&
            (!props.rightMenuData ||
              (props.rightMenuData && props.rightMenuData.indexOf('full') > -1) ||
              !props.rightMenuData ||
              (props.rightMenuData && props.rightMenuData.indexOf('opacity') > -1))
          ]
            ]),
            (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)(" <kq-menu-item\n\t\t\t\t\tindex=\"7\"\n\t\t\t\t\t:disabled=\"props.rightMenuDataDisabled && props.rightMenuDataDisabled.indexOf('revert') > -1\"\n\t\t\t\t\tv-show=\"canChange && showOtherNode && (!props.rightMenuData || (props.rightMenuData && props.rightMenuData.indexOf('revert') > -1))\"\n\t\t\t\t>\n\t\t\t\t\t<kq-icon>\n\t\t\t\t\t\t<RefreshLeft />\n\t\t\t\t\t</kq-icon>\n\t\t\t\t\t<span>{{ t('common.layerTreeRestoreLocation') }}</span>\n\t\t\t\t</kq-menu-item> "),
            (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)(" <kq-divider\n\t\t\t\t\tv-show=\"canChange && showOtherNode && (!props.rightMenuData || (props.rightMenuData && props.rightMenuData.indexOf('revert') > -1))\"\n\t\t\t\t></kq-divider> "),
            (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_menu_item, {
              index: "10",
              disabled: props.rightMenuDataDisabled && props.rightMenuDataDisabled.indexOf('checkedall') > -1
            }, {
              default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [
                (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_icon, null, {
                  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [
                    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(icons_vue_.View))
                  ]),
                  _: 1 /* STABLE */
                }),
                (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("span", null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(t)("common.layerTreeCheckedAll")), 1 /* TEXT */)
              ]),
              _: 1 /* STABLE */
            }, 8 /* PROPS */, ["disabled"]), [
              [external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.vShow, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(showOtherNode) && (!props.rightMenuData || props.rightMenuData.indexOf('checkedall') > -1)]
            ]),
            (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_menu_item, {
              index: "8",
              disabled: props.rightMenuDataDisabled && props.rightMenuDataDisabled.indexOf('cancel') > -1
            }, {
              default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [
                (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_icon, null, {
                  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [
                    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(icons_vue_.Hide))
                  ]),
                  _: 1 /* STABLE */
                }),
                (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("span", null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(t)("common.layerTreeCancleChecked")), 1 /* TEXT */)
              ]),
              _: 1 /* STABLE */
            }, 8 /* PROPS */, ["disabled"]), [
              [external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.vShow, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(showOtherNode) && (!props.rightMenuData || props.rightMenuData.indexOf('cancel') > -1)]
            ]),
            (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_divider, null, null, 512 /* NEED_PATCH */), [
              [external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.vShow, 
            (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(showDelNode) && (!props.rightMenuData || (props.rightMenuData && props.rightMenuData.indexOf('del') > -1))
          ]
            ]),
            (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_menu_item, {
              index: "9",
              disabled: props.rightMenuDataDisabled && props.rightMenuDataDisabled.indexOf('del') > -1
            }, {
              default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [
                (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_icon, null, {
                  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [
                    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(icons_vue_.Delete))
                  ]),
                  _: 1 /* STABLE */
                }),
                (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("span", null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(t)("common.layerTreeRemoveLayer")), 1 /* TEXT */)
              ]),
              _: 1 /* STABLE */
            }, 8 /* PROPS */, ["disabled"]), [
              [external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.vShow, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(showDelNode) && (!props.rightMenuData || props.rightMenuData.indexOf('del') > -1)]
            ]),
            (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.renderSlot)(_ctx.$slots, "menu-item-slot")
          ]),
          _: 3 /* FORWARDED */
        }, 8 /* PROPS */, ["class"])
      ], 512 /* NEED_PATCH */), [
        [external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.vShow, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(menuDropdown)]
      ])
    ])),
    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)(" E 菜单 ")
  ], 64 /* STABLE_FRAGMENT */))
}
}

}));
;// ./src/leaflet/mvtlayertree/MvtLayerTree.vue?vue&type=script&setup=true&lang=js
 
;// ./src/leaflet/mvtlayertree/MvtLayerTree.vue



const MvtLayerTree_exports_ = MvtLayerTreevue_type_script_setup_true_lang_js;

/* harmony default export */ var MvtLayerTree = (MvtLayerTree_exports_);
;// ./src/leaflet/mvtlayertree/index.js
/*
 * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
 * All rights reserved.
 */



MvtLayerTree.install = (Vue, opts) => {
  init_js_default()(Vue, opts);
  Vue.component(MvtLayerTree.name, MvtLayerTree);
};



/******/ 	return __webpack_exports__;
/******/ })()
;
});