/******/ (function() { // webpackBootstrap
/******/ 	"use strict";
/******/ 	var __webpack_modules__ = ({

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


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

// EXTERNAL MODULE: external "element-plus/es"
var es_ = __webpack_require__(2442);
// EXTERNAL MODULE: external "@zpc_npm/vue-iclient-leaflet/_mixin/render"
var render_ = __webpack_require__(6280);
var render_default = /*#__PURE__*/__webpack_require__.n(render_);
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/common/_ui/button/Button.vue?vue&type=script&lang=js


/* harmony default export */ var Buttonvue_type_script_lang_js = ({
  /** 会被用到创建组件的时候 得注意大小写*/
  name: "KqButton",

  /** ？？没找到用途 */
  __ANT_BUTTON: true,

  /** defaultComponent并没有实现任何的逻辑，只是把接收的 Object 直接返回，它的存在是完全让传⼊的整个对象获得对
   *  应的类型
   */
  defaultComponent: es_.ElButton,

  /**
   *  mixins 混用是一种分发vue组件中可复用功能的非常灵活的方式
   *  当组件使用混合对象时，所有混合对象的选项将被混入该组件本身的选项
   *
   *   在开发中，我们可以单独创建一个js文件，在该文件中声明一个mixins对象，然后将组件或页面共用的属性或方法定义在mixins里边，并暴露出去，在需要使用到的组件中引入该js文件即可；
   *   当组件中定义了相同的属性或方法时，组件里边声明的属性或方法优先级高于mixins；
   *   虽然mixins中的属性或方法可以被多个组件或页面共用，但是在某个组件或页面中修改相关属性或方法时，不会对其他组件或页面造成影响
   */
  mixins: [(render_default())],

  setup(props, context) {
    (render_default()).setup && render_default().setup(props, context);
  }

});
;// CONCATENATED MODULE: ./src/common/_ui/button/Button.vue?vue&type=script&lang=js
 
;// CONCATENATED MODULE: ./src/common/_ui/button/Button.vue



const __exports__ = Buttonvue_type_script_lang_js;

/* harmony default export */ var Button = (__exports__);
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/common/_ui/button/Group.vue?vue&type=script&lang=js


/* harmony default export */ var Groupvue_type_script_lang_js = ({
  name: "KqButtonGroup",
  defaultComponent: es_.ElButtonGroup,
  mixins: [(render_default())],

  setup(props, context) {
    (render_default()).setup && render_default().setup(props, context);
  }

});
;// CONCATENATED MODULE: ./src/common/_ui/button/Group.vue?vue&type=script&lang=js
 
;// CONCATENATED MODULE: ./src/common/_ui/button/Group.vue



const Group_exports_ = Groupvue_type_script_lang_js;

/* harmony default export */ var Group = (Group_exports_);
// EXTERNAL MODULE: external "@zpc_npm/vue-iclient-leaflet/init.js"
var init_js_ = __webpack_require__(1396);
var init_js_default = /*#__PURE__*/__webpack_require__.n(init_js_);
;// CONCATENATED MODULE: ./src/common/_ui/button/index.js




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

/* harmony default export */ var _ui_button = (Button);

/***/ }),

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


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

// EXTERNAL MODULE: external "element-plus/es"
var es_ = __webpack_require__(2442);
// EXTERNAL MODULE: external "@zpc_npm/vue-iclient-leaflet/_mixin/render"
var render_ = __webpack_require__(6280);
var render_default = /*#__PURE__*/__webpack_require__.n(render_);
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/common/_ui/icon/Icon.vue?vue&type=script&lang=js


/* harmony default export */ var Iconvue_type_script_lang_js = ({
  name: "KqIcon",
  defaultComponent: es_.ElIcon,
  mixins: [(render_default())],

  setup(props, context) {
    (render_default()).setup && render_default().setup(props, context);
  }

});
;// CONCATENATED MODULE: ./src/common/_ui/icon/Icon.vue?vue&type=script&lang=js
 
;// CONCATENATED MODULE: ./src/common/_ui/icon/Icon.vue



const __exports__ = Iconvue_type_script_lang_js;

/* harmony default export */ var Icon = (__exports__);
// EXTERNAL MODULE: external "@zpc_npm/vue-iclient-leaflet/init.js"
var init_js_ = __webpack_require__(1396);
var init_js_default = /*#__PURE__*/__webpack_require__.n(init_js_);
;// CONCATENATED MODULE: ./src/common/_ui/icon/index.js



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

/* harmony default export */ var icon = (Icon);

/***/ }),

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


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

// EXTERNAL MODULE: external "element-plus/es"
var es_ = __webpack_require__(2442);
// EXTERNAL MODULE: external "@zpc_npm/vue-iclient-leaflet/_mixin/render"
var render_ = __webpack_require__(6280);
var render_default = /*#__PURE__*/__webpack_require__.n(render_);
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/common/_ui/scrollbar/Scrollbar.vue?vue&type=script&lang=js


/* harmony default export */ var Scrollbarvue_type_script_lang_js = ({
  name: "KqScrollbar",
  defaultComponent: es_.ElScrollbar,
  mixins: [(render_default())],

  setup(props, context) {
    (render_default()).setup && render_default().setup(props, context);
  }

});
;// CONCATENATED MODULE: ./src/common/_ui/scrollbar/Scrollbar.vue?vue&type=script&lang=js
 
;// CONCATENATED MODULE: ./src/common/_ui/scrollbar/Scrollbar.vue



const __exports__ = Scrollbarvue_type_script_lang_js;

/* harmony default export */ var Scrollbar = (__exports__);
;// CONCATENATED MODULE: ./src/common/_ui/scrollbar/index.js


Scrollbar.install = Vue => {
  Vue.component(Scrollbar.name, Scrollbar);
};

/* harmony default export */ var scrollbar = (Scrollbar);

/***/ }),

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

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

/***/ }),

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

module.exports = require("element-plus/es");

/***/ }),

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

module.exports = require("xe-utils");

/***/ }),

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

module.exports = require("@zpc_npm/vue-iclient-leaflet");

/***/ }),

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

module.exports = require("@zpc_npm/vue-iclient-leaflet/_mixin/render");

/***/ }),

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

module.exports = require("@zpc_npm/vue-iclient-leaflet/init.js");

/***/ }),

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

module.exports = require("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/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__, {
  "BaseWindow": function() { return /* binding */ BaseWindow; },
  "default": function() { return /* binding */ basewindow; }
});

// EXTERNAL MODULE: external "xe-utils"
var external_xe_utils_ = __webpack_require__(6869);
var external_xe_utils_default = /*#__PURE__*/__webpack_require__.n(external_xe_utils_);
// EXTERNAL MODULE: external {"root":"Vue","commonjs":"vue","commonjs2":"vue","amd":"vue"}
var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__(637);
;// CONCATENATED MODULE: ./src/common/basewindow/utils.js
 // 获取dom节点属性 body的宽高&滚动条

function getDomNode() {
  const documentElement = document.documentElement;
  const bodyElem = document.body;
  return {
    scrollTop: documentElement.scrollTop || bodyElem.scrollTop,
    scrollLeft: documentElement.scrollLeft || bodyElem.scrollLeft,
    visibleHeight: documentElement.clientHeight || bodyElem.clientHeight,
    visibleWidth: documentElement.clientWidth || bodyElem.clientWidth
  };
}
function getFuncText(content) {
  return content ? external_xe_utils_default().toValueString(content) : "";
} // 计算窗口层级

let zindexIndex = 0;
let lastZindex = 1;
let zIndex = 1999; // 初始层级

function nextZIndex() {
  lastZindex = zIndex + zindexIndex++;
  return lastZindex;
}
function getLastZIndex() {
  return lastZindex;
} // 判断是否有特定class的正则表达式

const reClsMap = {};

function getClsRE(cls) {
  if (!reClsMap[cls]) {
    reClsMap[cls] = new RegExp(`(?:^|\\s)${cls}(?!\\S)`, "g");
  }

  return reClsMap[cls];
}

function hasClass(elem, cls) {
  return elem && elem.className && elem.className.match && elem.className.match(getClsRE(cls));
}
/**
 * 检查触发源是否属于目标节点(排除特定按钮 trigger--btn)
 */


function getEventTargetNode(evnt, container, queryCls, queryMethod) {
  let targetElem;
  let target = evnt.target;

  while (target && target.nodeType && target !== document) {
    if (queryCls && hasClass(target, queryCls) && (!queryMethod || queryMethod(target))) {
      targetElem = target;
    } else if (target === container) {
      return {
        flag: queryCls ? !!targetElem : true,
        container,
        targetElem: targetElem
      };
    }

    target = target.parentNode;
  }

  return {
    flag: false
  };
} // 键盘按键

const EVENT_KEYS = {
  F2: "F2",
  ESCAPE: "Escape",
  ENTER: "Enter",
  TAB: "Tab",
  DELETE: "Delete",
  BACKSPACE: "Backspace",
  SPACEBAR: " ",
  CONTEXT_MENU: "ContextMenu",
  ARROW_UP: "ArrowUp",
  ARROW_DOWN: "ArrowDown",
  ARROW_LEFT: "ArrowLeft",
  ARROW_RIGHT: "ArrowRight",
  PAGE_UP: "PageUp",
  PAGE_DOWN: "PageDown"
}; // 转换键盘按键为自定义Key

const convertEventKeys = {
  " ": "Spacebar",
  Apps: EVENT_KEYS.CONTEXT_MENU,
  Del: EVENT_KEYS.DELETE,
  Up: EVENT_KEYS.ARROW_UP,
  Down: EVENT_KEYS.ARROW_DOWN,
  Left: EVENT_KEYS.ARROW_LEFT,
  Right: EVENT_KEYS.ARROW_RIGHT
}; // 判断键盘点击的按钮

const hasEventKey = (evnt, targetKey) => {
  const {
    key
  } = evnt;
  targetKey = targetKey.toLowerCase();
  return key ? targetKey === key.toLowerCase() || !!(convertEventKeys[key] && convertEventKeys[key].toLowerCase() === targetKey) : false;
};
// EXTERNAL MODULE: ./src/common/_ui/scrollbar/index.js + 3 modules
var _ui_scrollbar = __webpack_require__(7717);
// EXTERNAL MODULE: ./src/common/_ui/button/index.js + 6 modules
var _ui_button = __webpack_require__(8361);
// EXTERNAL MODULE: ./src/common/_ui/icon/index.js + 3 modules
var icon = __webpack_require__(5633);
// EXTERNAL MODULE: external "@element-plus/icons-vue"
var icons_vue_ = __webpack_require__(8422);
;// CONCATENATED MODULE: ./src/common/basewindow/baseWindow.js
 // 工具函数







const allActivedModals = []; // 打开的窗口集合

const msgQueue = [];
/* harmony default export */ var baseWindow = ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.defineComponent)({
  name: "KqBaseWindow",
  props: {
    id: {
      type: String,
      default: null
    },
    className: {
      type: String,
      default: null
    },
    // 控制窗口显示隐藏
    modelValue: {
      type: Boolean,
      default: false
    },
    // 类型 modal, confirm, alert, message
    type: {
      type: String,
      default: "modal"
    },
    //  静态组件时是否为单例模式，true-初始化时不渲染dom，打开弹窗时渲染dom， 初始化时渲染dom
    singleCase: {
      type: Boolean,
      default: true
    },
    // 动态子组件
    childComponent: Object,
    // 动态子组件props参数
    childComponentProps: Object,
    // 标题
    title: {
      type: String,
      default: "标题"
    },
    titleIcon: [String, Object],
    // 延迟3000秒自动关闭 type 为 message
    duration: {
      type: [Number, String],
      default: 3000
    },
    // 开启窗口记忆功能
    remember: {
      type: Boolean,
      default: false
    },
    // 保存窗口状态
    storage: {
      type: Boolean,
      default: false
    },
    storageKey: {
      type: String,
      default: "KQ_BASE_WINDOW_KEY"
    },
    // 初始化弹窗位置
    position: [String, Object],
    width: [Number, String],
    height: [Number, String],
    minWidth: [Number, String],
    minHeight: [Number, String],
    // 是否展示 header
    showHeader: {
      type: Boolean,
      default: true
    },
    // 是否展示 footer
    showFooter: {
      type: Boolean,
      default: false
    },
    // 是否显示缩放按钮
    showZoom: {
      type: Boolean,
      default: false
    },
    // 是否显示收起按钮-最小化
    showMini: {
      type: Boolean,
      default: false
    },
    // 是否显示关闭按钮
    showClose: {
      type: Boolean,
      default: true
    },
    // 拖动改变大小
    resize: {
      type: Boolean,
      default: false
    },
    // 锁定窗口
    lockView: {
      type: Boolean,
      default: false
    },
    // 锁定滚动条
    lockScroll: {
      type: Boolean,
      default: false
    },
    // 点击键盘键esc关闭
    escClosable: {
      type: Boolean,
      default: true
    },
    // 双击放大或还原
    dblclickZoom: {
      type: Boolean,
      default: false
    },
    zIndex: Number,
    // 全屏
    fullscreen: {
      type: Boolean,
      default: false
    },
    // 全屏后的位置
    fullscreenPosition: Object,
    // 拖动
    draggable: {
      type: Boolean,
      default: true
    },
    // 遮罩层
    mask: {
      type: Boolean,
      default: false
    },
    // 点击遮罩层关闭弹窗
    maskClosable: {
      type: Boolean,
      default: false
    },
    // 该参数为窗口的定位方式，fixed, relative,absolute,static
    fixed: {
      type: String,
      default: "fixed"
    },
    // 控制对话框在哪个父节点下渲染
    teleport: {
      type: String,
      default: "body"
    },
    // 此属性可用于禁用 <teleport> 的功能，这意味着其插槽内容将不会移动到任何位置，而是在你在周围父组件中指定了 <teleport> 的位置渲染
    transfer: {
      type: Boolean,
      default: false
    },
    // 动画
    animat: {
      type: Boolean,
      default: true
    },
    // 窗口全屏下的manrgin与定位相关,为负值时则允许窗口拖动范围超出屏幕
    marginSize: {
      type: Number,
      default: 0
    },
    // 标题行超出省略
    showTitleOverflow: {
      type: Boolean,
      default: true
    },

    /**
     * 窗口容器的padding
     * [0],
     * [0,0],
     * [0,0,0,],
     * [0,0,0,0],
     * 0,
     * '0'
     */
    padding: {
      type: [Array, Number, String],
      default: 10
    },
    // 窗口关闭拦截回调
    beforeHideMethod: Function,
    // 确认事件
    confirmMethod: Function,
    // 窗口变化监听回调事件
    resizeCallback: Function,
    // 单窗口
    single: {
      type: Boolean,
      default: true
    },
    scrollbar: {
      type: Object,
      default: function () {
        return {
          always: true
        };
      }
    },
    // 用于内容区域为字符串时
    content: String,
    // 确认按钮Icon
    confirmButtonIcon: [String, Object],
    // 确认按钮字符串内容
    confirmButtonText: {
      type: String,
      default: "确定"
    },
    // 取消按钮Icon
    cancelButtonIcon: [String, Object],
    // 取消按钮字符串内容
    cancelButtonText: {
      type: String,
      default: "取消"
    },
    // 关闭时销毁
    destroyOnClose: {
      type: Boolean,
      default: false
    },
    // 窗口为动态组件时是否销毁
    destroyDynamics: {
      type: Boolean,
      default: true
    }
  },
  emits: ["update:modelValue", "show", "hide", "before-hide", "close", "confirm", "cancel", "zoom", "mini"],

  setup(props, context) {
    const {
      slots,
      emit
    } = context; // 私有变量

    const reactData = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.reactive)({
      inited: false,
      visible: false,
      contentVisible: false,
      modalTop: 0,
      modalZindex: 0,
      zoomLocat: null,
      miniLocat: null,
      firstOpen: false
    });
    const refElem = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(); // base-window--wrapper

    const refModalBox = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(); // base-windwo--box

    const refConfirmBtn = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
    const refCancelBtn = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
    const refScrollbar = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
    const refChildComp = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)();
    const refMaps = {
      refElem
    };
    const xID = external_xe_utils_default().uniqueId();
    const $basewindow = {
      xID,
      props,
      context,
      reactData,
      getRefMaps: () => refMaps
    };
    let modalMethods = {}; // 弹窗类型

    const computeIsMsg = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.computed)(() => {
      return props.type === "message";
    }); // 监听键盘事件

    document.addEventListener("keydown", triggerEvent, false); // 获取浏览器

    const browse = external_xe_utils_default().browse(); // 获取浏览器的鼠标滚轮事件

    const wheelName = browse.firefox ? "DOMMouseScroll" : "mousewheel"; // 事件队列

    const eventStore = []; // 监听全局事件

    const GlobalEvent = {
      on(comp, type, cb) {
        eventStore.push({
          comp,
          type,
          cb
        });
      },

      off(comp, type) {
        external_xe_utils_default().remove(eventStore, item => item.comp === comp && item.type === type);
      },

      trigger: triggerEvent,

      eqKeypad(evnt, keyVal) {
        const {
          key
        } = evnt;

        if (keyVal.toLowerCase() === key.toLowerCase()) {
          return true;
        }

        return false;
      }

    }; // 触发键盘事件

    function triggerEvent(evnt) {
      const isWheel = evnt.type === wheelName;
      eventStore.forEach(({
        type,
        cb
      }) => {
        // 如果被取消冒泡，不再执行
        if (!evnt.cancelBubble) {
          if (type === evnt.type || isWheel && type === "mousewheel") {
            cb(evnt);
          }
        }
      });
    } // 获取base-window--box容器ref


    const getBox = () => {
      const boxElem = refModalBox.value;
      return boxElem;
    };

    const getElem = () => {
      return refElem.value;
    };

    const getChildCompRef = () => {
      const childComp = refChildComp.value;
      return childComp;
    }; // 获取滚动条ref


    const getScrollbar = () => {
      const scrollbarBox = refScrollbar.value.$refs.child;
      return scrollbarBox;
    }; // 重新计算宽高


    const recalculate = () => {
      const {
        width,
        height
      } = props;
      const boxElem = getBox();
      boxElem.style.width = `${width ? isNaN(width) ? width : `${width}px` : ""}`;
      boxElem.style.height = `${height ? isNaN(height) ? height : `${height}px` : ""}`;
      return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.nextTick)();
    }; // 计算窗口层级


    const updateZindex = () => {
      const {
        zIndex
      } = props;
      const {
        modalZindex
      } = reactData;

      if (zIndex) {
        reactData.modalZindex = zIndex;
      } else if (modalZindex < getLastZIndex()) {
        reactData.modalZindex = nextZIndex();
      }
    }; // 点击或拖动窗口时更新层级


    const boxMousedownEvent = () => {
      const {
        modalZindex
      } = reactData;

      if (allActivedModals.some(comp => comp.reactData.visible && comp.reactData.modalZindex > modalZindex)) {
        updateZindex();
      }
    }; // 计算窗口位置


    const updatePosition = () => {
      return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.nextTick)().then(() => {
        const {
          position,
          fixed
        } = props;
        const marginSize = external_xe_utils_default().toNumber(props.marginSize);
        const boxElem = getBox();
        const refElem = getElem();
        const clientVisibleWidth = fixed === "fixed" ? document.documentElement.clientWidth || document.body.clientWidth : refElem.clientWidth;
        const clientVisibleHeight = fixed === "fixed" ? document.documentElement.clientHeight || document.body.clientHeight : refElem.clientHeight;
        const isPosCenter = position === "center";
        const {
          top,
          left,
          bottom,
          right
        } = external_xe_utils_default().isString(position) ? {
          top: position,
          left: position,
          bottom: position,
          right: position
        } : Object.assign({}, position);
        const topCenter = isPosCenter || top === "center";
        const leftCenter = isPosCenter || left === "center";
        const bottomCenter = isPosCenter || bottom === "center";
        const rightCenter = isPosCenter || right === "center";
        let posTop = "";
        let posLeft = "";
        let posBottom = "";
        let posRight = "";

        if (left && !leftCenter) {
          posLeft = isNaN(left) ? left : `${left}px`;
        } else {
          if (right && right !== "center") {
            posRight = isNaN(right) ? right : `${right}px`;
            posLeft = "auto";
          } else {
            posLeft = `${Math.max(marginSize, clientVisibleWidth / 2 - boxElem.offsetWidth / 2)}px`;
          }
        }

        if (top && !topCenter) {
          posTop = isNaN(top) ? top : `${top}px`;
        } else {
          if (bottom && bottom !== "center") {
            posBottom = isNaN(bottom) ? bottom : `${bottom}px`;
            posTop = "auto";
          } else {
            posTop = `${Math.max(marginSize, clientVisibleHeight / 2 - boxElem.offsetHeight / 2)}px`;
          }
        }

        if (posTop) boxElem.style.top = posTop;
        if (posLeft) boxElem.style.left = posLeft;
        if (posBottom) boxElem.style.bottom = posBottom;
        if (posRight) boxElem.style.right = posRight;
      });
    }; // 计算窗口宽度


    const updateWidth = () => {
      const boxElem = getBox();

      if (!boxElem.style.width) {
        boxElem.style.width = `${boxElem.offsetWidth}px`;
      }
    }; // 添加事件队列


    const addMsgQueue = () => {
      if (msgQueue.indexOf($basewindow) === -1) {
        msgQueue.push($basewindow);
      }

      updateStyle();
    }; // 获取存储在localstorage 窗口状态


    const getStorageMap = key => {
      const rest = external_xe_utils_default().toStringJSON(localStorage.getItem(key) || "");
      return rest;
    }; // 判断是否已存储窗口状态


    const hasPosStorage = () => {
      const {
        id,
        remember,
        storage,
        storageKey
      } = props;
      return !!(id && remember && storage && getStorageMap(storageKey)[id]);
    }; // 重置窗口状态


    const restorePosStorage = () => {
      const {
        id,
        remember,
        storage,
        storageKey
      } = props;

      if (id && remember && storage) {
        const posStorage = getStorageMap(storageKey)[id];

        if (posStorage) {
          const boxElem = getBox();
          const [left, top, width, height, zoomLeft, zoomTop, zoomWidth, zoomHeight] = posStorage.split(",");

          if (left) {
            boxElem.style.left = `${left}px`;
          }

          if (top) {
            boxElem.style.top = `${top}px`;
          }

          if (width) {
            boxElem.style.width = `${width}px`;
          }

          if (height) {
            boxElem.style.height = `${height}px`;
          }

          if (zoomLeft && zoomTop) {
            reactData.zoomLocat = {
              left: zoomLeft,
              top: zoomTop,
              width: zoomWidth,
              height: zoomHeight
            };
          }
        }
      }
    }; // 保存窗口状态


    const savePosStorage = () => {
      const {
        id,
        remember,
        storage,
        storageKey
      } = props;
      const {
        zoomLocat
      } = reactData;

      if (id && remember && storage) {
        const boxElem = getBox();
        const posStorageMap = getStorageMap(storageKey);
        posStorageMap[id] = [boxElem.style.left, boxElem.style.top, boxElem.style.width, boxElem.style.height].concat(zoomLocat ? [zoomLocat.left, zoomLocat.top, zoomLocat.width, zoomLocat.height] : []).map(val => val ? external_xe_utils_default().toNumber(val) : "").join(",");
        localStorage.setItem(storageKey, external_xe_utils_default().toJSONString(posStorageMap));
      }
    };

    const selfClickEvent = evnt => {
      const el = refElem.value;

      if (props.maskClosable && evnt.target === el) {
        const type = "mask";
        closeModal(type);
      }
    }; // 键盘点击事件


    const handleGlobalKeydownEvent = evnt => {
      const isEsc = hasEventKey(evnt, EVENT_KEYS.ESCAPE);

      if (isEsc) {
        const lastModal = external_xe_utils_default().max(allActivedModals, item => item.reactData.modalZindex); // 多个时，只关掉最上层的窗口

        if (lastModal) {
          setTimeout(() => {
            if (lastModal === $basewindow && lastModal.props.escClosable) {
              closeModal("exit");
            }
          }, 10);
        }
      }
    };

    const mousedownEvent = evnt => {
      const {
        remember,
        storage,
        fixed
      } = props;
      const {
        zoomLocat,
        miniLocat
      } = reactData;
      const marginSize = external_xe_utils_default().toNumber(props.marginSize);
      const boxElem = getBox();
      const refElem = getElem();
      refElem.className = refElem.className.replace(/\s?is--revert/, "");

      if (!zoomLocat && evnt.button === 0 && !getEventTargetNode(evnt, boxElem, "trigger--btn").flag) {
        evnt.preventDefault();
        const domMousemove = document.onmousemove;
        const domMouseup = document.onmouseup;
        const disX = evnt.clientX - boxElem.offsetLeft;
        const disY = evnt.clientY - boxElem.offsetTop;
        let {
          visibleHeight,
          visibleWidth
        } = getDomNode();

        if (fixed !== "fixed") {
          visibleHeight = refElem.clientHeight;
          visibleWidth = refElem.clientWidth;
        }

        document.onmousemove = evnt => {
          evnt.preventDefault();
          const offsetWidth = boxElem.offsetWidth;
          const offsetHeight = boxElem.offsetHeight;
          const minX = marginSize;
          const maxX = visibleWidth - offsetWidth - marginSize - 1;
          const minY = marginSize;
          const maxY = visibleHeight - offsetHeight - marginSize - 1;
          let left = evnt.clientX - disX;
          let top = evnt.clientY - disY;

          if (left > maxX) {
            left = maxX;
          }

          if (left < minX) {
            left = minX;
          }

          if (top > maxY) {
            top = maxY;
          }

          if (top < minY) {
            top = minY;
          }

          boxElem.style.left = `${left}px`;
          boxElem.style.top = `${top}px`;
          boxElem.style.bottom = "auto";
          boxElem.style.right = "auto";
        };

        updateWidth();

        document.onmouseup = () => {
          refElem.className = refElem.className.replace(/\s?is--revert/, "") + " is--revert";

          if (reactData.miniLocat) {
            Object.assign(reactData.miniLocat, {
              top: boxElem.style.top,
              left: boxElem.style.left
            });
          }

          document.onmousemove = domMousemove;
          document.onmouseup = domMouseup;

          if (remember && storage) {
            (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.nextTick)(() => {
              savePosStorage();
            });
          }
        };
      }
    }; // 是否最大化


    const isMaximized = () => {
      return !!reactData.zoomLocat;
    }; // 是否最小化


    const isMinimized = () => {
      return !!reactData.miniLocat;
    }; // 还原窗口


    const revert = () => {
      return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.nextTick)().then(() => {
        const {
          zoomLocat,
          miniLocat
        } = reactData;
        const boxElem = getBox();

        if (zoomLocat) {
          reactData.zoomLocat = null;
          Object.assign(boxElem.style, {
            top: `${zoomLocat.top}px`,
            left: `${zoomLocat.left}px`,
            width: `${zoomLocat.width}px`,
            height: `${zoomLocat.height}px`
          });
          savePosStorage();
        }

        if (miniLocat) {
          reactData.miniLocat = null;
          Object.assign(boxElem.style, {
            top: `${miniLocat.top}px`,
            left: `${miniLocat.left}px`,
            width: `${miniLocat.width}px`,
            height: `${miniLocat.height}px`
          });
          savePosStorage();
        }
      });
    }; // 窗口最大化


    const maximize = () => {
      return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.nextTick)().then(() => {
        if (!reactData.zoomLocat) {
          const {
            fullscreenPosition,
            fixed
          } = props;
          const refElem = getElem();
          const marginSize = external_xe_utils_default().toNumber(props.marginSize);
          const {
            top,
            left,
            bottom,
            right,
            width,
            height
          } = external_xe_utils_default().isString(fullscreenPosition) ? {
            top: fullscreenPosition,
            left: fullscreenPosition,
            bottom: fullscreenPosition,
            right: fullscreenPosition
          } : Object.assign({}, fullscreenPosition);
          const boxElem = getBox();
          let {
            visibleHeight,
            visibleWidth
          } = getDomNode();

          if (fixed !== "fixed") {
            visibleWidth = refElem.clientWidth;
            visibleHeight = refElem.clientHeight;
          }

          reactData.zoomLocat = {
            top: boxElem.offsetTop,
            left: boxElem.offsetLeft,
            width: boxElem.offsetWidth + (boxElem.style.width ? 0 : 1),
            height: boxElem.offsetHeight + (boxElem.style.height ? 0 : 1)
          };
          Object.assign(boxElem.style, {
            top: `${marginSize + external_xe_utils_default().toNumber(top)}px`,
            left: `${marginSize + external_xe_utils_default().toNumber(left)}px`,
            width: width ? `${external_xe_utils_default().toNumber(width)}px` : `${visibleWidth - marginSize * 2 - external_xe_utils_default().toNumber(left) - external_xe_utils_default().toNumber(right)}px`,
            height: height ? `${external_xe_utils_default().toNumber(height)}px` : `${visibleHeight - marginSize * 2 - external_xe_utils_default().toNumber(top) - external_xe_utils_default().toNumber(bottom)}px`
          });
          savePosStorage();
        }
      });
    }; // 窗口最小化


    const minimize = () => {
      return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.nextTick)().then(() => {
        if (!reactData.miniLocat) {
          const boxElem = getBox();
          reactData.miniLocat = {
            top: boxElem.offsetTop,
            left: boxElem.offsetLeft,
            width: boxElem.offsetWidth + (boxElem.style.width ? 0 : 1),
            height: boxElem.offsetHeight + (boxElem.style.height ? 0 : 1)
          };
          const _position = {
            top: boxElem.offsetTop ? `${boxElem.offsetTop}px` : "auto",
            left: boxElem.offsetLeft ? `${boxElem.offsetLeft}px` : "auto",
            bottom: boxElem.offsetBottom ? ` ${boxElem.offsetBottom}px` : "auto",
            right: boxElem.offsetRight ? `${boxElem.offsetRight}px` : "auto"
          };
          Object.assign(boxElem.style, { ..._position,
            width: `${260}px`,
            height: `${39}px`
          });
          savePosStorage();
        }
      });
    }; // 缩放


    const zoom = () => {
      if (reactData.zoomLocat) {
        return revert().then(() => isMaximized());
      }

      return maximize().then(() => isMaximized());
    };

    const toggleZoomEvent = evnt => {
      const {
        zoomLocat
      } = reactData;
      const params = {
        type: zoomLocat ? "revert" : "max"
      };
      return zoom().then(() => {
        modalMethods.dispatchEvent("zoom", params, evnt); // 执行窗口缩放回调

        props.resizeCallback && props.resizeCallback();
      });
    }; // 最小化


    const mini = () => {
      if (reactData.miniLocat) {
        return revert().then(() => isMinimized());
      }

      return minimize().then(() => isMinimized());
    };

    const toggleMiniEvent = evnt => {
      const {
        miniLocat
      } = reactData;
      const params = {
        type: miniLocat ? "revert" : "mini"
      };
      return mini().then(() => {
        modalMethods.dispatchEvent("mini", params, evnt); // 执行窗口缩放回调

        props.resizeCallback && props.resizeCallback();
      });
    }; // 获取窗口位置


    const getPosition = () => {
      const isMsg = computeIsMsg.value;

      if (!isMsg) {
        const boxElem = getBox();

        if (boxElem) {
          return {
            top: boxElem.offsetTop,
            left: boxElem.offsetLeft
          };
        }
      }

      return null;
    }; // 设置窗口位置


    const setPosition = (top, left) => {
      const isMsg = computeIsMsg.value;

      if (!isMsg) {
        const boxElem = getBox();

        if (external_xe_utils_default().isNumber(top)) {
          boxElem.style.top = `${top}px`;
        }

        if (external_xe_utils_default().isNumber(left)) {
          boxElem.style.left = `${left}px`;
        }
      }

      return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.nextTick)();
    }; // 更新窗口样式


    const updateStyle = () => {
      (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.nextTick)(() => {
        let offsetTop = 0;
        msgQueue.forEach(comp => {
          const boxElem = comp.getBox();
          offsetTop += external_xe_utils_default().toNumber(comp.props.top);
          comp.reactData.modalTop = offsetTop;
          offsetTop += boxElem.clientHeight;
        });
      });
    }; // 移除队列


    const removeMsgQueue = () => {
      if (msgQueue.indexOf($basewindow) > -1) {
        external_xe_utils_default().remove(msgQueue, comp => comp === $basewindow);
      }

      updateStyle();
    }; // 打开窗口


    const openModal = () => {
      const {
        duration,
        remember,
        type,
        lockScroll,
        id,
        singleCase,
        modelValue
      } = props;
      const {
        inited,
        visible
      } = reactData;
      const isMsg = computeIsMsg.value;

      if (type === "modal") {
        // 窗口类型为modal时 single配置生效
        allActivedModals.forEach(ele => {
          // 判断是否开启单窗口模式，是否手动拦截窗口关闭
          if (ele.props.single) {
            if (ele.props.beforeHideMethod && typeof ele.props.beforeHideMethod === "function" && ele.props.id === id) {
              ele.props.beforeHideMethod();
            }

            ele.close();
          }
        });
      } // 锁定body的滚动条


      if (lockScroll) {
        document.querySelector("body").style.overflow = "hidden";
      }

      if (!inited) {
        reactData.inited = true;
      }

      if (!visible) {
        if (!remember) {
          recalculate();
        }

        if (singleCase) {
          reactData.visible = true;
        } else if (!singleCase && modelValue) {
          reactData.visible = true;
        }

        updateZindex();

        if (!allActivedModals.some(comp => comp.props.id === id)) {
          allActivedModals.push($basewindow);
        }

        reactData.contentVisible = true;
        (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.nextTick)(() => {
          const type = "";
          const params = {
            type
          };

          if (singleCase) {
            emit("update:modelValue", true);
            modalMethods.dispatchEvent("show", params);
          }
        });

        if (isMsg) {
          addMsgQueue();

          if (duration !== -1) {
            setTimeout(() => closeModal("close"), external_xe_utils_default().toNumber(duration));
          }
        } else {
          (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.nextTick)(() => {
            const {
              fullscreen
            } = props;
            const {
              firstOpen
            } = reactData;

            if (!remember && !firstOpen) {
              updatePosition().then(() => {
                setTimeout(() => updatePosition(), 20);
              });
            }

            if (!firstOpen) {
              reactData.firstOpen = true;

              if (hasPosStorage()) {
                restorePosStorage();
              } else if (fullscreen) {
                (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.nextTick)(() => maximize());
              }
            } else {
              if (fullscreen) {
                (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.nextTick)(() => maximize());
              }
            }
          });
        }
      }

      return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.nextTick)();
    }; // 关闭窗口


    const closeModal = type => {
      const {
        remember,
        beforeHideMethod,
        destroyDynamics,
        lockScroll
      } = props;
      const {
        visible
      } = reactData;
      const isMsg = computeIsMsg.value;
      const params = {
        type
      };

      if (visible) {
        Promise.resolve(beforeHideMethod ? beforeHideMethod(params) : null).then(rest => {
          if (!external_xe_utils_default().isError(rest)) {
            if (isMsg) {
              removeMsgQueue();
            }

            reactData.contentVisible = false;

            if (!remember) {
              reactData.zoomLocat = null;
            }

            modalMethods.dispatchEvent("before-hide", params);

            if (lockScroll) {
              document.querySelector("body").style.overflow = "inherit"; // 解除body的滚动条锁定
            } // 动态组件默认销毁


            if (destroyDynamics) {
              external_xe_utils_default().remove(allActivedModals, item => item === $basewindow);
            }

            setTimeout(() => {
              reactData.visible = false;

              if (destroyDynamics) {
                emit("update:modelValue", false);
                modalMethods.dispatchEvent("hide", params);
              }
            }, 190); //  此处定时时间在css动画结束时执行
          }
        }).catch(e => e);
      }

      return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.nextTick)();
    }; // 关闭窗口事件


    const closeEvent = evnt => {
      const type = "close";
      modalMethods.dispatchEvent(type, {
        type
      }, evnt);
      closeModal(type);
    };

    const confirmEvent = evnt => {
      const {
        confirmMethod
      } = props;
      confirmMethod && confirmMethod();
      const type = "confirm";
      modalMethods.dispatchEvent(type, {
        type
      }, evnt);
      closeModal(type);
    };

    const cancelEvent = evnt => {
      const type = "cancel";
      modalMethods.dispatchEvent(type, {
        type
      }, evnt);
      closeModal(type);
    }; // 拖动改变窗口大小事件


    const dragEvent = evnt => {
      evnt.preventDefault();
      const {
        remember,
        storage,
        fixed
      } = props;
      let {
        visibleHeight,
        visibleWidth
      } = getDomNode();
      const boxElem = getBox();
      const refElem = getElem();

      if (fixed !== "fixed") {
        visibleHeight = refElem.clientHeight;
        visibleWidth = refElem.clientWidth;
      }

      const marginSize = external_xe_utils_default().toNumber(props.marginSize);
      const targetElem = evnt.target;
      const type = targetElem.getAttribute("type");
      const minWidth = external_xe_utils_default().toNumber(props.minWidth);
      const minHeight = external_xe_utils_default().toNumber(props.minHeight);
      const maxWidth = visibleWidth;
      const maxHeight = visibleHeight;
      const domMousemove = document.onmousemove;
      const domMouseup = document.onmouseup;
      const clientWidth = boxElem.clientWidth;
      const clientHeight = boxElem.clientHeight;
      const disX = evnt.clientX;
      const disY = evnt.clientY;
      const offsetTop = boxElem.offsetTop;
      const offsetLeft = boxElem.offsetLeft;
      const params = {
        type: "resize"
      };

      document.onmousemove = evnt => {
        refElem.className = refElem.className.replace(/\s?is--revert/, "");
        evnt.preventDefault();
        let dragLeft;
        let dragTop;
        let width;
        let height;

        switch (type) {
          case "wl":
            dragLeft = disX - evnt.clientX;
            width = dragLeft + clientWidth;

            if (offsetLeft - dragLeft > marginSize) {
              if (width > minWidth) {
                boxElem.style.width = `${width < maxWidth ? width : maxWidth}px`;
                boxElem.style.left = `${offsetLeft - dragLeft}px`;
              }
            }

            break;

          case "swst":
            dragLeft = disX - evnt.clientX;
            dragTop = disY - evnt.clientY;
            width = dragLeft + clientWidth;
            height = dragTop + clientHeight;

            if (offsetLeft - dragLeft > marginSize) {
              if (width > minWidth) {
                boxElem.style.width = `${width < maxWidth ? width : maxWidth}px`;
                boxElem.style.left = `${offsetLeft - dragLeft}px`;
              }
            }

            if (offsetTop - dragTop > marginSize) {
              if (height > minHeight) {
                boxElem.style.height = `${height < maxHeight ? height : maxHeight}px`;
                boxElem.style.top = `${offsetTop - dragTop}px`;
              }
            }

            break;

          case "swlb":
            dragLeft = disX - evnt.clientX;
            dragTop = evnt.clientY - disY;
            width = dragLeft + clientWidth;
            height = dragTop + clientHeight;

            if (offsetLeft - dragLeft > marginSize) {
              if (width > minWidth) {
                boxElem.style.width = `${width < maxWidth ? width : maxWidth}px`;
                boxElem.style.left = `${offsetLeft - dragLeft}px`;
              }
            }

            if (offsetTop + height + marginSize < visibleHeight) {
              if (height > minHeight) {
                boxElem.style.height = `${height < maxHeight ? height : maxHeight}px`;
              }
            }

            break;

          case "st":
            dragTop = disY - evnt.clientY;
            height = clientHeight + dragTop;

            if (offsetTop - dragTop > marginSize) {
              if (height > minHeight) {
                boxElem.style.height = `${height < maxHeight ? height : maxHeight}px`;
                boxElem.style.top = `${offsetTop - dragTop}px`;
              }
            }

            break;

          case "wr":
            dragLeft = evnt.clientX - disX;
            width = dragLeft + clientWidth;

            if (offsetLeft + width + marginSize < visibleWidth) {
              if (width > minWidth) {
                boxElem.style.width = `${width < maxWidth ? width : maxWidth}px`;
              }
            }

            break;

          case "sest":
            dragLeft = evnt.clientX - disX;
            dragTop = disY - evnt.clientY;
            width = dragLeft + clientWidth;
            height = dragTop + clientHeight;

            if (offsetLeft + width + marginSize < visibleWidth) {
              if (width > minWidth) {
                boxElem.style.width = `${width < maxWidth ? width : maxWidth}px`;
              }
            }

            if (offsetTop - dragTop > marginSize) {
              if (height > minHeight) {
                boxElem.style.height = `${height < maxHeight ? height : maxHeight}px`;
                boxElem.style.top = `${offsetTop - dragTop}px`;
              }
            }

            break;

          case "selb":
            dragLeft = evnt.clientX - disX;
            dragTop = evnt.clientY - disY;
            width = dragLeft + clientWidth;
            height = dragTop + clientHeight;

            if (offsetLeft + width + marginSize < visibleWidth) {
              if (width > minWidth) {
                boxElem.style.width = `${width < maxWidth ? width : maxWidth}px`;
              }
            }

            if (offsetTop + height + marginSize < visibleHeight) {
              if (height > minHeight) {
                boxElem.style.height = `${height < maxHeight ? height : maxHeight}px`;
              }
            }

            break;

          case "sb":
            dragTop = evnt.clientY - disY;
            height = dragTop + clientHeight;

            if (offsetTop + height + marginSize < visibleHeight) {
              if (height > minHeight) {
                boxElem.style.height = `${height < maxHeight ? height : maxHeight}px`;
              }
            }

            break;
        }

        const scrollbar = getScrollbar();
        scrollbar.update();
        boxElem.className = boxElem.className.replace(/\s?is--drag/, "") + " is--drag";

        if (remember && storage) {
          savePosStorage();
        }

        modalMethods.dispatchEvent("zoom", params, evnt); // 执行窗口缩放回调

        props.resizeCallback && props.resizeCallback();
      };

      document.onmouseup = () => {
        reactData.zoomLocat = null;
        document.onmousemove = domMousemove;
        document.onmouseup = domMouseup;
        setTimeout(() => {
          boxElem.className = boxElem.className.replace(/\s?is--drag/, "");
          refElem.className = refElem.className.replace(/\s?is--revert/, "") + " is--revert";
        }, 50);
      };
    }; // 暴露窗口方法


    modalMethods = {
      dispatchEvent(type, params, evnt) {
        emit(type, Object.assign({
          $modal: $basewindow,
          $event: evnt
        }, params));
      },

      open: openModal,

      close() {
        return closeModal("close");
      },

      getBox,
      getElem,
      getPosition,
      setPosition,
      isMaximized,
      zoom,
      maximize,
      revert,
      mini,
      minimize,
      getChildCompRef
    };
    Object.assign($basewindow, modalMethods);
    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => props.width, recalculate);
    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => props.height, recalculate);
    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => props.modelValue, value => {
      if (value) {
        openModal();
      } else {
        closeModal("model");
      }
    });
    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
      (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.nextTick)(() => {
        if (props.modelValue && props.singleCase) {
          openModal();
        } else if (!props.singleCase) {
          openModal();
        }

        recalculate();
      });

      if (props.escClosable) {
        // 绑定键盘事件
        GlobalEvent.on($basewindow, "keydown", handleGlobalKeydownEvent);
      }
    });
    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onUnmounted)(() => {
      // 解绑键盘事件
      GlobalEvent.off($basewindow, "keydown");
      removeMsgQueue();
    }); // 渲染头部

    const renderHeaders = () => {
      const {
        slots: propSlots = {},
        showZoom,
        draggable
      } = props;
      const isMsg = computeIsMsg.value;
      const headerSlot = slots.header || propSlots.header;
      const {
        miniLocat
      } = reactData;
      const headVNs = [];

      if (props.showHeader) {
        const headerOns = {};

        if (draggable) {
          headerOns.onMousedown = mousedownEvent;
        }

        if (props.dblclickZoom) {
          if (showZoom && props.type === "modal" && !miniLocat) {
            headerOns.onDblclick = toggleZoomEvent;
          } else {
            headerOns.onDblclick = toggleMiniEvent;
          }
        }

        headVNs.push((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)("div", {
          class: ["kq-base-window--header", {
            "is--drag": draggable,
            "is--ellipsis": !isMsg && props.showTitleOverflow
          }],
          ...headerOns
        }, headerSlot ? !reactData.inited || props.destroyOnClose && !reactData.visible ? [] : headerSlot({
          $modal: $basewindow
        }) : renderTitles()));
      }

      return headVNs;
    }; // 渲染头部标题


    const renderTitles = () => {
      const {
        slots: propSlots = {},
        showClose,
        showZoom,
        showMini,
        title,
        titleIcon
      } = props;
      const {
        zoomLocat,
        miniLocat
      } = reactData;
      const titleSlot = slots.title || propSlots.title;
      const titVNs = titleSlot ? titleSlot({
        $modal: $basewindow
      }) : [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)("span", {
        class: "kq-base-window--title"
      }, [titleIcon ? external_xe_utils_default().isString(titleIcon) ? (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)("i", {
        class: [titleIcon, "kq-base-window--title-icon"],
        title: "title-icon"
      }) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)(icon["default"], {
        class: "kq-base-window--title-icon",
        title: "title-icon",
        size: 22
      }, () => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)(titleIcon)) : null, title ? getFuncText(title) : "标题"])];
      titVNs.push((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)("div", {
        class: ["kq-base-window--btn-box"]
      }, [showMini && !zoomLocat ? (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)("i", {
        class: ["kq-base-window--mini-btn", "trigger--btn"],
        title: miniLocat ? "还原" : "最小化",
        onClick: toggleMiniEvent
      }, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)(icon["default"], {
        size: 22
      }, miniLocat ? () => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)(icons_vue_.CopyDocument) : () => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)(icons_vue_.Minus))) : null, showZoom && !miniLocat ? (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)("i", {
        class: ["kq-base-window--zoom-btn", "trigger--btn" // zoomLocat ? "el-icon-copy-document" : "fa fa-square-o"
        ],
        title: zoomLocat ? "还原" : "最大化",
        onClick: toggleZoomEvent
      }, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)(icon["default"], {
        size: 22
      }, zoomLocat ? () => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)(icons_vue_.CopyDocument) : () => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)(icons_vue_.FullScreen))) : null, showClose ? (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)("i", {
        class: ["kq-base-window--close-btn", "trigger--btn"],
        title: "关闭",
        onClick: closeEvent
      }, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)(icon["default"], {
        size: 24
      }, () => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)(icons_vue_.Close))) : null]));
      return titVNs;
    }; // 渲染内容区域


    const renderBodys = () => {
      const {
        slots: propSlots = {},
        padding,
        scrollbar,
        childComponent,
        childComponentProps,
        content
      } = props;
      const isMsg = computeIsMsg.value;
      const defaultSlot = slots.default || propSlots.default;
      const contVNs = [];
      let _padding = `${padding}px`;
      let _width = `calc(100% - ${padding * 2}px)`;

      if (external_xe_utils_default().isArray(padding)) {
        if (padding.length == 1) {
          _padding = `${padding[0]}px`;
          _width = `calc(100% - ${padding[0] * 2}px)`;
        } else if (padding.length == 2) {
          _padding = `${padding[0]}px ${padding[1]}px`;
          _width = `calc(100% - ${padding[1] * 2}px)`;
        } else if (padding.length == 3) {
          _padding = `${padding[0]}px ${padding[1]}px ${padding[2]}px`;
          _width = `calc(100% - ${padding[1] * 2}px)`;
        } else if (padding.length == 4) {
          _padding = `${padding[0]}px ${padding[1]}px ${padding[2]}px ${padding[3]}px`;
          _width = `calc(100% - ${padding[1] + padding[3]}px)`;
        }
      } else if (external_xe_utils_default().isString(padding)) {
        _padding = `${external_xe_utils_default().toNumber(padding)}px`;
        _width = `calc(100% - ${external_xe_utils_default().toNumber(padding) * 2}px)`;
      }

      const scrollbar_parmas = Object.assign({
        viewStyle: [{
          padding: _padding
        }, {
          width: _width
        }]
      }, scrollbar);
      contVNs.push((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)("div", {
        class: "kq-base-window--content",
        style: {
          padding: 0,
          width: "100%"
        }
      }, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)(_ui_scrollbar["default"], { ...scrollbar_parmas,
        ref: refScrollbar
      }, {
        default: () => defaultSlot ? !reactData.inited || props.destroyOnClose && !reactData.visible ? [] : defaultSlot({
          $modal: $basewindow
        }) : content ? getFuncText(content) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)(childComponent, { ...childComponentProps,
          ref: refChildComp
        })
      })));
      return [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)("div", {
        class: "kq-base-window--body"
      }, contVNs)];
    }; //渲染footer


    const renderFooters = () => {
      const {
        slots: propSlots = {}
      } = props;
      const {
        miniLocat,
        zoomLocat
      } = reactData;
      const isMsg = computeIsMsg.value;
      const footerSlot = slots.footer || propSlots.footer;
      const footVNs = [];

      if (props.showFooter) {
        footVNs.push((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)("div", {
          class: "kq-base-window--footer"
        }, {
          default: () => footerSlot ? !reactData.inited || props.destroyOnClose && !reactData.visible ? [] : footerSlot({
            $modal: $basewindow
          }) : renderBtns()
        }));
      }

      if (!isMsg && props.resize && !miniLocat && !zoomLocat) {
        footVNs.push((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)("span", {
          class: "kq-base-window--resize"
        }, ["wl", "wr", "swst", "sest", "st", "swlb", "selb", "sb"].map(type => {
          return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)("span", {
            class: `${type}-resize`,
            type: type,
            onMousedown: dragEvent
          });
        })));
      }

      return footVNs;
    }; // 渲染footer 按钮


    const renderBtns = () => {
      const {
        type,
        confirmButtonText,
        confirmButtonIcon,
        cancelButtonText,
        cancelButtonIcon
      } = props;
      const btnVNs = [];

      if (type === "confirm") {
        btnVNs.push((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)(_ui_button["default"], {
          ref: refCancelBtn,
          content: cancelButtonText,
          class: "kq-base-window--footer-button",
          onClick: cancelEvent
        }, {
          default: () => cancelButtonIcon ? [external_xe_utils_default().isString(cancelButtonIcon) ? (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)("i", {
            class: [cancelButtonIcon, "kq-base-window--cancel-icon", "kq-base-window--footer-btn-icon"],
            title: "cancel-icon"
          }) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)(icon["default"], {
            class: "kq-base-window--cancel-icon kq-base-window--footer-btn-icon",
            title: "cancel-icon",
            size: 22
          }, () => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)(cancelButtonIcon)), cancelButtonText] : cancelButtonText
        }));
      }

      btnVNs.push((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)(_ui_button["default"], {
        ref: refConfirmBtn,
        type: "primary",
        content: confirmButtonText,
        class: "kq-base-window--footer-button",
        onClick: confirmEvent
      }, {
        default: () => confirmButtonIcon ? [external_xe_utils_default().isString(confirmButtonIcon) ? (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)("i", {
          class: [confirmButtonIcon, "kq-base-window--confirm-icon", "kq-base-window--footer-btn-icon"],
          title: "confirm-icon"
        }) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)(icon["default"], {
          class: "kq-base-window--confirm-icon kq-base-window--footer-btn-icon",
          title: "confirm-icon",
          size: 22
        }, () => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)(confirmButtonIcon)), confirmButtonText] : confirmButtonText
      }));
      return btnVNs;
    }; // 渲染


    const renderVN = () => {
      const {
        className,
        animat,
        loading,
        lockScroll,
        lockView,
        mask,
        resize,
        type,
        fixed
      } = props;
      const {
        inited,
        zoomLocat,
        miniLocat,
        modalTop,
        contentVisible,
        visible
      } = reactData;
      return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.Teleport, {
        to: props.teleport,
        disabled: props.transfer ? !inited : true
      }, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)("div", {
        ref: refElem,
        class: ["kq-base-window--wrapper", `type--${type}`, className || "", {
          "is--animat": animat,
          "lock--scroll": lockScroll,
          "lock--view": lockView,
          "is--resize": resize,
          "is--mask": mask,
          "is--maximize": zoomLocat,
          "is--minimize": miniLocat,
          "is--revert": !miniLocat && !zoomLocat,
          "is--visible": contentVisible,
          "is--hidden": !contentVisible,
          "is--active": visible,
          "is--loading": loading
        }],
        style: {
          zIndex: reactData.modalZindex,
          top: modalTop ? `${modalTop}px` : null,
          position: fixed
        },
        onClick: selfClickEvent
      }, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)("div", {
        ref: refModalBox,
        class: ["kq-base-window--box"],
        style: {
          position: fixed
        },
        onMousedown: boxMousedownEvent
      }, renderHeaders().concat(renderBodys(), renderFooters()))])]);
    };

    $basewindow.renderVN = renderVN;
    return $basewindow;
  },

  render() {
    return this.renderVN();
  }

}));
;// CONCATENATED MODULE: ./src/common/basewindow/dynamics.js

let dynamicContainerElem;
const dynamicStore = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.reactive)({
  modals: []
}); // 动态组件

const BaseDynamics = {
  setup() {
    return () => {
      const {
        modals
      } = dynamicStore;
      return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)("div", {
        class: "kq-base-dynamics--window"
      }, {
        default: () => modals.map(item => {
          return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.h)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-base-window"), item);
        })
      });
    };
  }

};
const dynamicApp = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createApp)(BaseDynamics);
function checkDynamic() {
  if (!dynamicContainerElem) {
    dynamicContainerElem = document.createElement("div");
    dynamicContainerElem.className = "kq-base-dynamics";
    document.body.appendChild(dynamicContainerElem);
    dynamicApp.mount(dynamicContainerElem);
  }
}
// EXTERNAL MODULE: external "@zpc_npm/vue-iclient-leaflet"
var vue_iclient_leaflet_ = __webpack_require__(7025);
var vue_iclient_leaflet_default = /*#__PURE__*/__webpack_require__.n(vue_iclient_leaflet_);
;// CONCATENATED MODULE: ./src/common/basewindow/index.js





const getModal = id => {
  return external_xe_utils_default().find(allActivedModals, $modal => $modal.props.id === id);
};

const getExpose = id => {
  var modal = getModal(id);
  return modal.getChildCompRef();
};

const openModal = options => {
  return new Promise(resolve => {
    if (options && options.id && allActivedModals.some(comp => comp.props.id === options.id)) {
      allActivedModals.forEach(comp => {
        if (comp.props.id == options.id && !comp.props.destroyDynamics) {
          comp.open();
        }
      });
      resolve("exit");
    } else {
      const _onHide = options.onHide;
      const modalOpts = Object.assign(options, {
        key: external_xe_utils_default().uniqueId(),
        modelValue: true,

        onHide(params) {
          const modalList = dynamicStore.modals;

          if (_onHide) {
            _onHide(params);
          }

          dynamicStore.modals = modalList.filter(item => item.key !== modalOpts.key);
          resolve(params.type);
        }

      });
      dynamicStore.modals.push(modalOpts);
    } // 使用动态组件渲染动态弹框


    checkDynamic();
  });
};
/**
 * 全局关闭动态的活动窗口（只能用于关闭动态的创建的活动窗口）
 * 如果传 id 则关闭指定的窗口
 * 如果不传则关闭所有窗口
 */


const closeModal = id => {
  const modals = id ? [getModal(id)] : allActivedModals;
  const restPromises = [];
  modals.forEach($modal => {
    if ($modal) {
      restPromises.push($modal.close());
    }
  });
  return Promise.all(restPromises);
};

const handleOpen = (defOpts, content, title, options) => {
  let opts;

  if (external_xe_utils_default().isObject(content)) {
    opts = content;
  } else {
    opts = {
      content: external_xe_utils_default().toValueString(content),
      title
    };
  }

  return openModal({ ...defOpts,
    ...options,
    ...opts
  });
};

const openConfirm = (content, title, options) => {
  const opts = {
    mask: true,
    showMini: false,
    lockView: true,
    draggable: false
  };
  Object.assign(opts, options);
  return handleOpen({
    type: "confirm",
    showFooter: true
  }, content, title, opts);
};

const openMessage = (content, options) => {
  return handleOpen({
    type: "message",
    mask: false,
    lockView: false,
    showHeader: false
  }, content, "", options);
};

const miniModal = id => {
  var modal = getModal(id);
  modal.mini();
};

const BaseWindowController = {
  get: getModal,
  close: closeModal,
  open: openModal,
  confirm: openConfirm,
  message: openMessage,
  getExpose: getExpose,
  mini: miniModal
};
const BaseWindow = Object.assign(baseWindow, {
  install: function (Vue, opts) {
    dynamicApp.component(BaseWindow.name, BaseWindow);
    dynamicApp.use((vue_iclient_leaflet_default()), { ...opts
    });
    Vue.component(baseWindow.name, baseWindow);
    Vue.config.globalProperties.$KqBaseWindow = BaseWindowController;
  }
});
/* harmony default export */ var basewindow = (BaseWindow);
}();
module.exports = __webpack_exports__;
/******/ })()
;