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

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

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

/***/ }),

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

module.exports = require("@supermap/vue-iclient-leaflet/lib/_lang/index.js");

/***/ }),

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

module.exports = require("@turf/center");

/***/ }),

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

module.exports = require("tinycolor2");

/***/ }),

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

"use strict";


var _interopRequireDefault = __webpack_require__(0);

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.clearNumberComma = clearNumberComma;
exports.filterInvalidData = filterInvalidData;
exports.getColorWithOpacity = getColorWithOpacity;
exports.getDarkenColor = getDarkenColor;
exports.getDataType = getDataType;
exports.getDateTime = getDateTime;
exports.getDerivedColorsByTextColor = getDerivedColorsByTextColor;
exports.getFeatureCenter = getFeatureCenter;
exports.getValueCaseInsensitive = getValueCaseInsensitive;
exports.handleDataParentRes = handleDataParentRes;
exports.handleWithCredentials = handleWithCredentials;
exports.hexToRgba = hexToRgba;
exports.isDate = isDate;
exports.isMatchUrl = isMatchUrl;
exports.isNumber = isNumber;
exports.isTransparent = isTransparent;
exports.isXField = isXField;
exports.isYField = isYField;
exports.objectWithoutProperties = objectWithoutProperties;
exports.parseUrl = parseUrl;
exports.reservedDecimal = reservedDecimal;
exports.setPopupArrowStyle = setPopupArrowStyle;
exports.strip = strip;
exports.urlAppend = urlAppend;

var _index = __webpack_require__(13);

var _colorcolor = _interopRequireDefault(__webpack_require__(41));

var _center = _interopRequireDefault(__webpack_require__(26));

var _omit = _interopRequireDefault(__webpack_require__(42));

var _tinycolor = _interopRequireDefault(__webpack_require__(27));

// 获取当前时间返回置顶格式
function getDateTime(timeType) {
  return (0, _index.geti18n)().d(new Date(), timeType.replace(/\+/g, '_'), (0, _index.getLanguage)());
} // hex -> rgba


function hexToRgba(hex, opacity) {
  return 'rgba(' + parseInt('0x' + hex.slice(1, 3)) + ',' + parseInt('0x' + hex.slice(3, 5)) + ',' + parseInt('0x' + hex.slice(5, 7)) + ',' + opacity + ')';
}

function isTransparent(color) {
  var rgba = (0, _colorcolor.default)(color, 'rgba');
  return +rgba.match(/(\d(\.\d+)?)+/g)[3] === 0;
} // 保留指定位数的小数


function reservedDecimal(val, precise) {
  return Number(val).toFixed(precise);
} // 清除数字（字符串型的）的逗号


function clearNumberComma(num) {
  if (num.replace) {
    num = num.replace(/,/g, '');
  }

  return num;
}
/**
 * 判断是否地理X坐标
 * @param data
 */


function isXField(data) {
  var lowerdata = data.toLowerCase();
  return lowerdata === 'x' || lowerdata === 'smx' || lowerdata === 'jd' || lowerdata === '经度' || lowerdata === '东经' || lowerdata === 'longitude' || lowerdata === 'lot' || lowerdata === 'lon' || lowerdata === 'long' || lowerdata === 'lng' || lowerdata === 'x坐标';
}
/**
 * 判断是否地理Y坐标
 * @param data
 */


function isYField(data) {
  var lowerdata = data.toLowerCase();
  return lowerdata === 'y' || lowerdata === 'smy' || lowerdata === 'wd' || lowerdata === '纬度' || lowerdata === '北纬' || lowerdata === 'latitude' || lowerdata === 'lat' || lowerdata === 'y坐标';
}

function getColorWithOpacity(color, opacity, isStack) {
  if (isStack === void 0) {
    isStack = true;
  }

  if (!color) {
    return color;
  }

  var originColor = (0, _tinycolor.default)(color);
  var originOpacity = originColor.getAlpha();

  if (isStack) {
    originColor.setAlpha(originOpacity * opacity);
  } else {
    originColor.setAlpha(opacity);
  }

  var nextColor = originColor.toRgbString();
  return nextColor;
}

function getDerivedColorsByTextColor(textColor, opacity) {
  if (!textColor) {
    return textColor;
  }

  if (textColor.includes('var')) {
    return "var(--alpha" + opacity * 100 + ")";
  }

  var baseTextColorOpacity = 0.65;
  var originTextColor = (0, _tinycolor.default)(textColor);
  var originOpacity = originTextColor.getAlpha();
  originTextColor.setAlpha(originOpacity * opacity / baseTextColorOpacity);
  var derivedColor = originTextColor.toRgbString();
  return derivedColor;
}

function parseUrl(url) {
  var urlRe = /^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;
  return url.match(urlRe);
}

function getDataType(data) {
  return Object.prototype.toString.call(data);
} // 判断输入的地址是否符合地址格式


function isMatchUrl(str) {
  var reg = new RegExp('(https?|http|file|ftp)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]');
  return reg.test(str);
} // 判断是否为日期


function isDate(data) {
  var reg = /((^((1[8-9]\d{2})|([2-9]\d{3}))([-\/\._])(10|12|0?[13578])([-\/\._])(3[01]|[12][0-9]|0?[1-9])$)|(^((1[8-9]\d{2})|([2-9]\d{3}))([-\/\._])(11|0?[469])([-\/\._])(30|[12][0-9]|0?[1-9])$)|(^((1[8-9]\d{2})|([2-9]\d{3}))([-\/\._])(0?2)([-\/\._])(2[0-8]|1[0-9]|0?[1-9])$)|(^([2468][048]00)([-\/\._])(0?2)([-\/\._])(29)$)|(^([3579][26]00)([-\/\._])(0?2)([-\/\._])(29)$)|(^([1][89][0][48])([-\/\._])(0?2)([-\/\._])(29)$)|(^([2-9][0-9][0][48])([-\/\._])(0?2)([-\/\._])(29)$)|(^([1][89][2468][048])([-\/\._])(0?2)([-\/\._])(29)$)|(^([2-9][0-9][2468][048])([-\/\._])(0?2)([-\/\._])(29)$)|(^([1][89][13579][26])([-\/\._])(0?2)([-\/\._])(29)$)|(^([2-9][0-9][13579][26])([-\/\._])(0?2)([-\/\._])(29)$))/gi;
  return reg.test(data);
} // 判断是否为数值


function isNumber(data) {
  var mdata = Number(data);

  if (mdata === 0) {
    return true;
  }

  return !isNaN(mdata);
}

function getFeatureCenter(feature) {
  var coordinates = ((feature || {}).geometry || {}).coordinates;
  var hasCoordinates = coordinates && !!coordinates.length;

  if (!hasCoordinates) {
    return;
  }

  var featureType = feature.geometry.type;
  var center;

  if (featureType === 'LineString') {
    center = coordinates[parseInt(coordinates.length / 2)];
  } else if (featureType === 'MultiLineString') {
    var coord = coordinates[parseInt(coordinates.length / 2)];
    center = coord[parseInt(coord.length / 2)];
  } else {
    center = (0, _center.default)(feature).geometry.coordinates;
  }

  return center;
}

function getValueCaseInsensitive(properties, searchKey) {
  var isObj = getDataType(properties) === '[object Object]';

  if (!searchKey || !isObj) {
    return '';
  }

  var lowerSearchKey = searchKey.toLocaleLowerCase();

  for (var key in properties) {
    if (key.toLocaleLowerCase() === lowerSearchKey) {
      return properties[key];
    }
  }

  return '';
}

function filterInvalidData(datasetOptions, features) {
  var xFields = datasetOptions.map(function (item) {
    return item.xField;
  });
  var yFields = datasetOptions.map(function (item) {
    return item.yField;
  });
  var nextFeatures = features.filter(function (feature) {
    var matchXField = xFields.find(function (item) {
      return Object.prototype.hasOwnProperty.call(feature.properties, item);
    });
    var matchYField = yFields.find(function (item) {
      return ![undefined, null, ''].includes(feature.properties[item]);
    });
    return !!(matchXField && matchYField);
  });
  return nextFeatures;
}

function handleWithCredentials(url, iportalServiceProxyUrl, defaultValue) {
  if (defaultValue === void 0) {
    defaultValue = false;
  }

  if (!iportalServiceProxyUrl) {
    return defaultValue;
  }

  return url.indexOf(iportalServiceProxyUrl) >= 0 || defaultValue;
}

function handleDataParentRes(url, parentResId, parentResType) {
  if (parentResType === void 0) {
    parentResType = 'DATA';
  }

  if (!parentResId) {
    return url;
  }

  return urlAppend(url, "parentResType=" + parentResType + "&parentResId=" + parentResId);
}

function urlAppend(url, paramStr) {
  var newUrl = url;

  if (paramStr) {
    if (paramStr.indexOf('?') === 0) {
      paramStr = paramStr.substring(1);
    }

    var parts = (url + ' ').split(/[?&]/);
    newUrl += parts.pop() === ' ' ? paramStr : parts.length ? '&' + paramStr : '?' + paramStr;
  }

  return newUrl;
}

function objectWithoutProperties(obj, omitKeys) {
  if (omitKeys === void 0) {
    omitKeys = [];
  }

  return (0, _omit.default)(obj, omitKeys);
}

function getDarkenColor(color, amount) {
  return (0, _tinycolor.default)(color).darken(amount).toString();
}

var ARROW_POSITION_MAP = {
  top: 'Bottom',
  bottom: 'Top',
  left: 'Right',
  right: 'Left'
};

function setPopupArrowStyle(color) {
  var popup = document.querySelectorAll('.sm-mapboxgl-tabel-popup');

  if (popup) {
    popup.forEach(function (item) {
      var position = item.className.replace(/.+mapboxgl-popup-anchor-([a-z]+)/, '$1');

      if (ARROW_POSITION_MAP[position]) {
        var popupArrow = item.querySelector('.mapboxgl-popup-tip');

        if (popupArrow) {
          popupArrow.style["border" + ARROW_POSITION_MAP[position] + "Color"] = color;
        }
      }
    });
  }
}

function strip(num, precision) {
  if (precision === void 0) {
    precision = 12;
  }

  if (typeof num === 'number') {
    return +parseFloat(num.toPrecision(precision));
  }
}

/***/ }),

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

module.exports = require("colorcolor");

/***/ }),

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

module.exports = require("omit.js");

/***/ })

/******/ });