(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory(require("vue"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue/init.js"));
	else if(typeof define === 'function' && define.amd)
		define(["vue", "@kq_npm/client_common_vue/_utils/gis-utils", "@kq_npm/client_common_vue/init.js"], factory);
	else {
		var a = typeof exports === 'object' ? factory(require("vue"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue/init.js")) : factory(root["Vue"], root["@kq_npm/client_common_vue/_utils/gis-utils"], 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__7135__, __WEBPACK_EXTERNAL_MODULE__7997__) {
return /******/ (function() { // webpackBootstrap
/******/ 	"use strict";
/******/ 	var __webpack_modules__ = ({

/***/ 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");

/***/ }),

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

module.exports = __WEBPACK_EXTERNAL_MODULE__7135__;

/***/ }),

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

module.exports = __WEBPACK_EXTERNAL_MODULE__7997__;

/***/ }),

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

module.exports = __WEBPACK_EXTERNAL_MODULE__1895__;

/***/ }),

/***/ 5301:
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {


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

;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
function _typeof(o) {
  "@babel/helpers - typeof";

  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
    return typeof o;
  } : function (o) {
    return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  }, _typeof(o);
}

;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js

function toPrimitive(t, r) {
  if ("object" != _typeof(t) || !t) return t;
  var e = t[Symbol.toPrimitive];
  if (void 0 !== e) {
    var i = e.call(t, r || "default");
    if ("object" != _typeof(i)) return i;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return ("string" === r ? String : Number)(t);
}

;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js


function toPropertyKey(t) {
  var i = toPrimitive(t, "string");
  return "symbol" == _typeof(i) ? i : i + "";
}

;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js

function _defineProperty(e, r, t) {
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
    value: t,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[r] = t, e;
}


/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// 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() {
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

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

// 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 "@kq_npm/client_common_vue/_utils/gis-utils"
var gis_utils_ = __webpack_require__(7135);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js + 3 modules
var defineProperty = __webpack_require__(5301);
// 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);
;// CONCATENATED MODULE: ./src/webgl/hawkeye/HawkeyeViewModel.js



/*
 * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
 * All rights reserved.
 */
//鹰眼逻辑类
class HawkeyeViewModel {
  //鹰眼三维对象

  constructor(scenceView, options) {
    (0,defineProperty/* default */.Z)(this, "_overviewMap", null);
    options.viewer = scenceView._viewer;
    options.centerRectColor = Cesium.Color.fromCssColorString(options.centerColor || "#0000ff").withAlpha(options.centerColorAlpha || 0.5);
    this.init(options);
  }
  init(options) {
    // if(!options.layers) {
    // let layers = [];
    // options.viewer.imageryLayers._layers.forEach(function (layer) {
    //   layers.push(layer);
    // });
    // options.layers = layers;
    // options.layers = new Cesium.Kq3dArcGISMapServerImageryProvider({
    //   url: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer'
    // });
    // }
    this._overviewMap = new Cesium.Kq3dOverviewMap(options);
  }

  //显示
  show() {
    this._overviewMap.show = true;
  }

  //隐藏
  hide() {
    this._overviewMap.show = false;
  }

  // 设置图层
  setLayers(layers) {
    if (Array.isArray(layers)) {
      this._overviewMap._viewer.imageryLayers.removeAll();
      layers.forEach(layer => {
        this._overviewMap._viewer.imageryLayers.add(layer);
      });
    }
  }

  //销毁
  destroy() {
    this._overviewMap.destroy();
    this._overviewMap = null;
  }
}
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/hawkeye/Hawkeye.vue?vue&type=script&setup=true&lang=js



const __default__ = {
  name: "Kq3dHawkeye"
};
/* harmony default export */ var Hawkeyevue_type_script_setup_true_lang_js = (/*#__PURE__*/Object.assign(__default__, {
  props: {
    //指定组件绑定的viewer对象的div的id
    mapTarget: String,
    show: {
      type: Boolean,
      default: true
    },
    width: {
      type: Number,
      default: 300
    },
    height: {
      type: Number,
      default: 200
    },
    top: Number,
    left: Number,
    bottom: {
      type: Number,
      default: 16
    },
    right: {
      type: Number,
      default: 16
    },
    centerColor: {
      type: String,
      default: "#0000ff"
    },
    centerColorAlpha: {
      type: Number,
      default: 0.5
    },
    layers: Array
  },
  setup(__props, {
    expose: __expose
  }) {
    const props = __props;
    let viewModel = null;

    // 获取组件传参

    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
      //父组件ScenceView初始化完成后执行
      gis_utils_.utils.getWebMap(null, scenceView => {
        if (scenceView) {
          let options = {
            show: props.show,
            width: props.width,
            height: props.height,
            bottom: props.bottom,
            right: props.right,
            zIndex: 9999,
            centerColor: props.centerColor,
            centerColorAlpha: props.centerColorAlpha,
            layers: props.layers
          };
          viewModel = new HawkeyeViewModel(scenceView, options);
        }
      });
    });
    function show() {
      viewModel && viewModel.show();
    }
    function hide() {
      viewModel && viewModel.hide();
    }
    function setLayers(layers) {
      viewModel && viewModel.setLayers(layers);
    }

    // 销毁
    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onBeforeUnmount)(() => {
      viewModel && viewModel.destroy();
    });
    __expose({
      show,
      hide,
      setLayers
    });
    return (_ctx, _cache) => {
      return null;
    };
  }
}));
;// CONCATENATED MODULE: ./src/webgl/hawkeye/Hawkeye.vue?vue&type=script&setup=true&lang=js
 
;// CONCATENATED MODULE: ./src/webgl/hawkeye/Hawkeye.vue



const __exports__ = Hawkeyevue_type_script_setup_true_lang_js;

/* harmony default export */ var Hawkeye = (__exports__);
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/init.js"
var init_js_ = __webpack_require__(7997);
var init_js_default = /*#__PURE__*/__webpack_require__.n(init_js_);
;// CONCATENATED MODULE: ./src/webgl/hawkeye/index.js
/*
 * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
 * All rights reserved.
 */



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

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