(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory(require("vue"), require("@kq_npm/client_common_vue/_utils/util"), require("@kq_npm/client_common_vue/_utils/mitt"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue/_types/global-event"), require("@kq_npm/client_common_vue/init.js"));
	else if(typeof define === 'function' && define.amd)
		define(["vue", "@kq_npm/client_common_vue/_utils/util", "@kq_npm/client_common_vue/_utils/mitt", "@kq_npm/client_common_vue/_utils/gis-utils", "@kq_npm/client_common_vue/_types/global-event", "@kq_npm/client_common_vue/init.js"], factory);
	else {
		var a = typeof exports === 'object' ? factory(require("vue"), require("@kq_npm/client_common_vue/_utils/util"), require("@kq_npm/client_common_vue/_utils/mitt"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue/_types/global-event"), require("@kq_npm/client_common_vue/init.js")) : factory(root["Vue"], root["@kq_npm/client_common_vue/_utils/util"], root["@kq_npm/client_common_vue/_utils/mitt"], root["@kq_npm/client_common_vue/_utils/gis-utils"], root["@kq_npm/client_common_vue/_types/global-event"], root["@kq_npm/client_common_vue/init.js"]);
		for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
	}
})(this, function(__WEBPACK_EXTERNAL_MODULE__1895__, __WEBPACK_EXTERNAL_MODULE__3458__, __WEBPACK_EXTERNAL_MODULE__8905__, __WEBPACK_EXTERNAL_MODULE__7135__, __WEBPACK_EXTERNAL_MODULE__3536__, __WEBPACK_EXTERNAL_MODULE__7997__) {
return /******/ (function() { // webpackBootstrap
/******/ 	"use strict";
/******/ 	var __webpack_modules__ = ({

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

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": function() { return /* binding */ MeasureViewModel; }
/* harmony export */ });
/* harmony import */ var _common_utils_mitt__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8905);
/* harmony import */ var _common_utils_mitt__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_common_utils_mitt__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _common_utils_gis_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7135);
/* harmony import */ var _common_utils_gis_utils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_common_utils_gis_utils__WEBPACK_IMPORTED_MODULE_1__);
/*
 * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
 * All rights reserved.
 */
/**
 * Author: 朱鹏超
 * Date: 2022-11-23
 * Description: 2d测量逻辑层
 */



/**
 * @class MeasureViewModel
 * @classdesc 测量
 * @param {string} mapTarget - 绑定的当前mapview
 */
class MeasureViewModel extends (_common_utils_mitt__WEBPACK_IMPORTED_MODULE_0___default()) {
  constructor(mapTarget) {
    super();
    this._props = {
      mapTarget
    };
    this._webMap = null;
    // 事件绑定this
    this._loaded = this._loaded.bind(this);
    this._registerEvents();
  }

  /**
   * @description 注册事件
   * @private
   */
  _registerEvents() {
    _common_utils_gis_utils__WEBPACK_IMPORTED_MODULE_1__.utils.getWebMap(this._props.mapTarget, this._loaded);
  }

  /**
   * @description 记载事件
   * @private
   */
  _loaded(e) {
    this._webMap = e;
  }

  /**
   * @description 清除测量绘图
   */
  clearMeasure() {
    _common_utils_gis_utils__WEBPACK_IMPORTED_MODULE_1__.utils.getWebMap(this._props.mapTarget, e => {
      this._webMap = e;
      if (this._webMap) {
        if (this._webMap.target) {
          let domTarget = document.getElementById(this._webMap.target);
          if (domTarget.style) {
            domTarget.style.cursor = "grab";
          }
        }
        if (this._webMap.mapDraw) {
          this._webMap.mapDraw.removeAllLayerFromMeasure();
        }
      }
    });
  }

  /**
   * @description 面积测量
   * @param {Function} callFun - 回调函数
   * @param {string} tyoe - 类型，默认为 polygon
   * @param {Object} options - drawStyle配置
   * @param {string} [options.dashArray = '3.4']
   * @param {string} [options.color = "#409eff"]
   * @param {string} [options.fillColor = "#409eff"]
   * @param {string} [options.fillOpacity = "0.2"]
   * @param {number} [options.weight = 2]
   */
  areaMeasure(callFun, type, options) {
    this.clearMeasure();
    // this._webMap.mapDraw.startMeasure(callFun, type, options);
    this.measureEvent(callFun, type, options);
  }

  /**
   * @description 距离测量
   * @param {Function} callFun - 回调函数
   * @param {string} tyoe - 类型，默认为 polyline
   * @param {Object} options - drawStyle配置
   * @param {string} [options.dashArray = '3.4']
   * @param {string} [options.color = "#409eff"]
   * @param {string} [options.fillColor = "#409eff"]
   * @param {string} [options.fillOpacity = "0.2"]
   * @param {number} [options.weight = 2]
   */
  distanceMeasure(callFun, type, options) {
    this.clearMeasure();
    this.measureEvent(callFun, type, options);
  }
  measureEvent(callFun, type, options) {
    _common_utils_gis_utils__WEBPACK_IMPORTED_MODULE_1__.utils.getWebMap(this._props.mapTarget, e => {
      this._webMap = e;
      this._webMap.mapDraw.startMeasure(e => {
        callFun(e);
        this.measureEvent(callFun, type, options);
      }, type, options);
    });
  }
  getWebMap() {
    return this._webMap;
  }
}

/***/ }),

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


// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "Z": function() { return /* binding */ Measure; }
});

// EXTERNAL MODULE: external "core-js/modules/esnext.iterator.constructor.js"
var esnext_iterator_constructor_js_ = __webpack_require__(8470);
// EXTERNAL MODULE: external "core-js/modules/esnext.iterator.for-each.js"
var esnext_iterator_for_each_js_ = __webpack_require__(1058);
// EXTERNAL MODULE: external {"root":"Vue","commonjs":"vue","commonjs2":"vue","amd":"vue"}
var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__(1895);
// EXTERNAL MODULE: external "@element-plus/icons-vue"
var icons_vue_ = __webpack_require__(8422);
// EXTERNAL MODULE: external "@kq_npm/client_icons_vue"
var client_icons_vue_ = __webpack_require__(348);
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/util"
var util_ = __webpack_require__(3458);
// EXTERNAL MODULE: ./src/leaflet/measure/MeasureViewModel.js
var MeasureViewModel = __webpack_require__(9394);
// EXTERNAL MODULE: external "vue-i18n/dist/vue-i18n.cjs.js"
var vue_i18n_cjs_js_ = __webpack_require__(7080);
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/gis-utils"
var gis_utils_ = __webpack_require__(7135);
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_types/global-event"
var global_event_ = __webpack_require__(3536);
var global_event_default = /*#__PURE__*/__webpack_require__.n(global_event_);
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/leaflet/measure/Measure.vue?vue&type=script&setup=true&lang=js



const _hoisted_1 = {
  class: "box"
};
const _hoisted_2 = {
  class: "kq-measure2d-btns"
};
const _hoisted_3 = {
  key: 0,
  class: "kq-measure2d-tip"
};
const _hoisted_4 = {
  key: 1,
  class: "kq-measure2d-result"
};
const _hoisted_5 = {
  class: "kq-measure2d-result-panel"
};
const _hoisted_6 = {
  class: "panel"
};
const _hoisted_7 = {
  class: "title"
};
const _hoisted_8 = {
  class: "panel"
};
const _hoisted_9 = {
  class: "title"
};
const _hoisted_10 = {
  class: "result"
};
const _hoisted_11 = {
  class: "tit"
};
const _hoisted_12 = {
  class: "res"
};








const __default__ = {
  name: "Kq2dMeasure"
};
/* harmony default export */ var Measurevue_type_script_setup_true_lang_js = (/*#__PURE__*/Object.assign(__default__, {
  props: {
    mapTarget: {
      type: String,
      default: null
    },
    showShadow: {
      type: Boolean,
      default: false
    },
    drawStyle: {
      type: Object,
      default: function () {
        return {
          dashArray: "3,4",
          color: "#409eff",
          fillColor: "#409eff",
          fillOpacity: "0.2",
          weight: 2
        };
      }
    },
    /**
     * 例："center","topLeft","topRight","bottomLeft","bottomRight", "topCenter", "bottomCenter" {top:'16px',left:'16px'}, {top:16,left:16}
     */
    position: [String, Object],
    // 是否生成HeaderTemp
    showHeaderTemp: {
      type: Boolean,
      default: false
    },
    // 是否折叠HeaderTemp，showHeaderTemp为true时生效
    isCollapseHeaderTemp: {
      type: Boolean,
      default: false
    },
    // HeaderTemp标题
    headerTempTitle: {
      type: String
      // default: "测量"
    },
    // HeaderTempIcon
    headerTempIcon: {
      type: [Object, String],
      default: client_icons_vue_.IconMeasure2D
    },
    // HeaderTemp Title&Icon的位置
    isRight: {
      type: Boolean,
      default: true
    },
    // 布局参数,'vertical' | 'horizontal'
    mode: {
      type: String,
      default: "vertical"
    }
  },
  setup(__props, {
    expose: __expose
  }) {
    const props = __props;
    const {
      proxy
    } = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.getCurrentInstance)();

    // 逻辑类
    let viewModel = null;
    // 控制操作按钮的active选择状态
    let isActive = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
    // 测量完成后是否有结果变量，控制结果容器的显隐
    let isResult = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false);
    // 判断面积测量或距离测量的变量
    let unitType = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);

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

    // 国际化
    let {
      locale,
      messages,
      t
    } = (0,vue_i18n_cjs_js_.useI18n)();
    let language = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(proxy.$i18n.global.messages[proxy.$i18n.global.locale]["leaflet"]);
    let measureTitle = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => locale.value, (newVal, oldVal) => {
      language.value = messages.value[newVal]["leaflet"];
      measureTitle.value = t("leaflet.measureTitle");
      distanceUnits.value = setDistanceUnits();
      areaUnits.value = setAreaUnits();
    });

    // 距离测量单位
    let distanceUnits = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)([]);
    let setDistanceUnits = () => {
      return [{
        label: language.value.kilometre,
        value: "km"
      }, {
        label: language.value.metre,
        value: "m"
      }, {
        label: language.value.nauticalMile,
        value: "nmi"
      }];
    };
    distanceUnits.value = setDistanceUnits();

    // 面积测量单位
    let areaUnits = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)([]);
    let setAreaUnits = () => {
      return [{
        label: language.value.squareKilometers,
        value: "km²"
      }, {
        label: language.value.squareMeter,
        value: "m²"
      }, {
        label: language.value.mu,
        value: "mu"
      }, {
        label: language.value.hectare,
        value: "ha"
      }];
    };
    areaUnits.value = setAreaUnits();

    // 单位
    let unit = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)("m");

    // 结果
    let result = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)("0");
    let _layer = 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)();
    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
      (0,util_.updatePosition)(boxRef.value, props);
      (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => props.position, (newVal, oldVal) => {
        (0,util_.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();
        });
      });
      viewModel = new MeasureViewModel/* default */.Z(props.mapTarget);
      global_event_default().on("stopMeasure", () => {
        onClearMeasure();
      });
    });

    /**
     * @description 销毁
     */
    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onBeforeUnmount)(() => {
      onClearMeasure();
    });

    /**
     * @description 监听header生成
     */
    const watchCreateHeaderTemp = () => {
      if (props.showHeaderTemp) {
        // 生成headerTemp
        headerTemp.value = (0,util_.createHeaderTemp)(boxRef.value, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toRefs)(props), headerTempRef, measureTitle, isTrue => {
          if (!isTrue) {
            onClearMeasure();
          }
        });
      }
    };

    /**
     * @description 距离测量
     */
    function onDistanceMeasure() {
      isActive.value = "distance";
      isResult.value = false;
      unitType.value = "distance";
      viewModel.distanceMeasure(layer => {
        // if (isEnd) {
        //   isActive.value = null;
        //   return;
        // }
        isResult.value = true;
        format(layer._measurementLayer._layers);
        updateMeasurements(layer);
        _layer = layer;
      }, "polyline", props.drawStyle);
    }

    /**
     * @description 面积测量
     */
    function onAreaMeasure() {
      isActive.value = "area";
      isResult.value = false;
      unitType.value = "area";
      viewModel.areaMeasure(layer => {
        // if (isEnd) {
        //   isActive.value = null;
        //   return;
        // }
        isResult.value = true;
        format(layer._measurementLayer._layers);
        updateMeasurements(layer);
        _layer = layer;
      }, "polygon", props.drawStyle);
    }

    /**
     * @description 清除测量
     */
    function onClearMeasure() {
      isActive.value = null;
      isResult.value = false;
      viewModel && viewModel.clearMeasure && viewModel.clearMeasure();
    }

    /**
     * @description 监听单位变化操作
     * @param {string} value - 改变的值
     */
    function onChangeUnits(value) {
      // unit.value = value;
      _layer.updateMeasurements(value);
      if (unitType.value === "distance") {
        result.value = document.querySelector(".leaflet-measure-path-measurement [title='Total length']").textContent.split(" ")[0];
        distanceUnits.value.forEach(item => {
          if (item.value == value) {
            unit.value = item.value;
          }
        });
      } else if (unitType.value === "area") {
        result.value = document.querySelector(".leaflet-measure-path-measurement [title='Total area']").textContent.split(" ")[0];
        areaUnits.value.forEach(item => {
          if (item.value == value) {
            unit.value = item.value;
          }
        });
      }
    }

    /**
     * @description 过滤方法，过滤结果
     */
    function format(obj) {
      for (let i in obj) {
        let item = obj[i];
        if (item["_title"].indexOf("Total") !== -1) {
          result.value = item["_measurement"].split(" ")[0];
          unit.value = item["_measurement"].split(" ")[1];
        }
      }
      if (unitType.value === "distance") {
        distanceUnits.value.forEach(item => {
          if (item.value == unit.value) {
            unit.value = item.value;
          }
        });
      }
      if (unitType.value === "area") {
        areaUnits.value.forEach(item => {
          if (item.value == unit.value) {
            unit.value = item.value;
          }
        });
      }
    }

    /**
     * @description 更新变化
     */
    function updateMeasurements(layer) {
      layer.on("editable:vertex:drag editable:vertex:deleted", function () {
        const obj = layer.updateMeasurements(unit.value);
        format(obj._measurementLayer._layers);
      });
    }
    __expose({
      clearMeasure: onClearMeasure
    });
    return (_ctx, _cache) => {
      const _component_kq_icon = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-icon");
      const _component_kq_button = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-button");
      const _component_kq_divider = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-divider");
      const _component_kq_option = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-option");
      const _component_kq_select = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-select");
      return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("section", {
        class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)(["kq-measure2d", [{
          'kq-box-shadow': __props.showShadow,
          'kq-measure2d-horizontal-wrap': __props.mode == 'horizontal'
        }]]),
        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_.createElementVNode)("div", {
        class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)({
          'kq-measure2d-horizontal': __props.mode == 'horizontal'
        })
      }, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_1, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_2, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
        onClick: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withModifiers)(onDistanceMeasure, ["stop"]),
        class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)({
          'is-active': (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(isActive) == 'distance'
        }),
        title: _ctx.$t('leaflet.distance')
      }, {
        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, {
          size: 22
        }, {
          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_.IconMeasureDistance))]),
          _: 1 /* STABLE */
        })]),
        _: 1 /* STABLE */
      }, 8 /* PROPS */, ["onClick", "class", "title"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
        onClick: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withModifiers)(onAreaMeasure, ["stop"]),
        class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)({
          'is-active': (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(isActive) == 'area'
        }),
        title: _ctx.$t('leaflet.area')
      }, {
        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, {
          size: 22
        }, {
          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_.IconMeasureArea))]),
          _: 1 /* STABLE */
        })]),
        _: 1 /* STABLE */
      }, 8 /* PROPS */, ["onClick", "class", "title"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
        type: "danger",
        plain: "",
        onClick: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withModifiers)(onClearMeasure, ["stop"]),
        class: "clear-btn",
        title: _ctx.$t('common.deleteBtnText')
      }, {
        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, {
          size: 20,
          class: "icon-delete"
        }, {
          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 */
        })]),
        _: 1 /* STABLE */
      }, 8 /* PROPS */, ["onClick", "title"])]), !!(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(isActive) ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", _hoisted_3, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_divider, {
        class: "measure2d-divider"
      }), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)(_ctx.$t("leaflet.measureTip")), 1 /* TEXT */)])) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true)]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(isResult) ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)(_component_kq_divider, {
        key: 0,
        class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)(["measure2d-divider", [{
          'measure2d-divider-vertical': __props.mode == 'horizontal'
        }]]),
        direction: __props.mode == 'horizontal' ? 'vertical' : 'horizontal'
      }, null, 8 /* PROPS */, ["direction", "class"])) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(isResult) ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", _hoisted_4, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_5, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_6, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_7, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)(_ctx.$t("leaflet.unit")), 1 /* TEXT */), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(unitType) === 'distance' ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)(_component_kq_select, {
        key: 0,
        modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(unit),
        "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.isRef)(unit) ? unit.value = $event : unit = $event),
        onChange: onChangeUnits
      }, {
        default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.Fragment, null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.renderList)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(distanceUnits), item => {
          return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)(_component_kq_option, {
            key: item.value,
            label: item.label,
            value: item.value
          }, null, 8 /* PROPS */, ["label", "value"]);
        }), 128 /* KEYED_FRAGMENT */))]),
        _: 1 /* STABLE */
      }, 8 /* PROPS */, ["modelValue"])) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(unitType) === 'area' ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)(_component_kq_select, {
        key: 1,
        modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(unit),
        "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.isRef)(unit) ? unit.value = $event : unit = $event),
        onChange: onChangeUnits
      }, {
        default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.Fragment, null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.renderList)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(areaUnits), item => {
          return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)(_component_kq_option, {
            key: item.value,
            label: item.label,
            value: item.value
          }, null, 8 /* PROPS */, ["label", "value"]);
        }), 128 /* KEYED_FRAGMENT */))]),
        _: 1 /* STABLE */
      }, 8 /* PROPS */, ["modelValue"])) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true)]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_8, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_9, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)(_ctx.$t("leaflet.measureResult")), 1 /* TEXT */), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_10, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_11, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(unitType) === "distance" ? _ctx.$t("leaflet.distance") : _ctx.$t("leaflet.unit")), 1 /* TEXT */), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_12, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(result)) + " " + (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(unit)), 1 /* TEXT */)])])])])) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true)], 2 /* CLASS */)], 2 /* CLASS */);
    };
  }
}));
;// CONCATENATED MODULE: ./src/leaflet/measure/Measure.vue?vue&type=script&setup=true&lang=js
 
;// CONCATENATED MODULE: ./src/leaflet/measure/Measure.vue



const __exports__ = Measurevue_type_script_setup_true_lang_js;

/* harmony default export */ var Measure = (__exports__);

/***/ }),

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

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

/***/ }),

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

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

/***/ }),

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

module.exports = require("core-js/modules/esnext.iterator.constructor.js");

/***/ }),

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

module.exports = require("core-js/modules/esnext.iterator.for-each.js");

/***/ }),

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

module.exports = require("vue-i18n/dist/vue-i18n.cjs.js");

/***/ }),

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

module.exports = __WEBPACK_EXTERNAL_MODULE__3536__;

/***/ }),

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

module.exports = __WEBPACK_EXTERNAL_MODULE__7135__;

/***/ }),

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

module.exports = __WEBPACK_EXTERNAL_MODULE__8905__;

/***/ }),

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

module.exports = __WEBPACK_EXTERNAL_MODULE__3458__;

/***/ }),

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

module.exports = __WEBPACK_EXTERNAL_MODULE__7997__;

/***/ }),

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

module.exports = __WEBPACK_EXTERNAL_MODULE__1895__;

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// 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/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__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
!function() {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "MeasureViewModel": function() { return /* reexport safe */ _MeasureViewModel__WEBPACK_IMPORTED_MODULE_1__.Z; },
/* harmony export */   "default": function() { return /* reexport safe */ _Measure__WEBPACK_IMPORTED_MODULE_0__.Z; }
/* harmony export */ });
/* harmony import */ var _Measure__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6797);
/* harmony import */ var _MeasureViewModel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9394);
/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7997);
/* 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.
 */



_Measure__WEBPACK_IMPORTED_MODULE_0__/* ["default"].install */ .Z.install = (Vue, opts) => {
  _init__WEBPACK_IMPORTED_MODULE_2___default()(Vue, opts);
  Vue.component(_Measure__WEBPACK_IMPORTED_MODULE_0__/* ["default"].name */ .Z.name, _Measure__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z);
};

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