(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory(require("vue"));
	else if(typeof define === 'function' && define.amd)
		define([], factory);
	else if(typeof exports === 'object')
		exports["awsui-vue"] = factory(require("vue"));
	else
		root["awsui-vue"] = factory(root["Vue"]);
})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__8bbf__) {
return /******/ (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 = "";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = "fb15");
/******/ })
/************************************************************************/
/******/ ({

/***/ "00ee":
/***/ (function(module, exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__("b622");

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var test = {};

test[TO_STRING_TAG] = 'z';

module.exports = String(test) === '[object z]';


/***/ }),

/***/ "0109":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "0204":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "02f0":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"));
  else {}
})(function(CodeMirror) {
"use strict";

CodeMirror.defineMode('shell', function() {

  var words = {};
  function define(style, dict) {
    for(var i = 0; i < dict.length; i++) {
      words[dict[i]] = style;
    }
  };

  var commonAtoms = ["true", "false"];
  var commonKeywords = ["if", "then", "do", "else", "elif", "while", "until", "for", "in", "esac", "fi",
    "fin", "fil", "done", "exit", "set", "unset", "export", "function"];
  var commonCommands = ["ab", "awk", "bash", "beep", "cat", "cc", "cd", "chown", "chmod", "chroot", "clear",
    "cp", "curl", "cut", "diff", "echo", "find", "gawk", "gcc", "get", "git", "grep", "hg", "kill", "killall",
    "ln", "ls", "make", "mkdir", "openssl", "mv", "nc", "nl", "node", "npm", "ping", "ps", "restart", "rm",
    "rmdir", "sed", "service", "sh", "shopt", "shred", "source", "sort", "sleep", "ssh", "start", "stop",
    "su", "sudo", "svn", "tee", "telnet", "top", "touch", "vi", "vim", "wall", "wc", "wget", "who", "write",
    "yes", "zsh"];

  CodeMirror.registerHelper("hintWords", "shell", commonAtoms.concat(commonKeywords, commonCommands));

  define('atom', commonAtoms);
  define('keyword', commonKeywords);
  define('builtin', commonCommands);

  function tokenBase(stream, state) {
    if (stream.eatSpace()) return null;

    var sol = stream.sol();
    var ch = stream.next();

    if (ch === '\\') {
      stream.next();
      return null;
    }
    if (ch === '\'' || ch === '"' || ch === '`') {
      state.tokens.unshift(tokenString(ch, ch === "`" ? "quote" : "string"));
      return tokenize(stream, state);
    }
    if (ch === '#') {
      if (sol && stream.eat('!')) {
        stream.skipToEnd();
        return 'meta'; // 'comment'?
      }
      stream.skipToEnd();
      return 'comment';
    }
    if (ch === '$') {
      state.tokens.unshift(tokenDollar);
      return tokenize(stream, state);
    }
    if (ch === '+' || ch === '=') {
      return 'operator';
    }
    if (ch === '-') {
      stream.eat('-');
      stream.eatWhile(/\w/);
      return 'attribute';
    }
    if (ch == "<") {
      var heredoc = stream.match(/^<-?\s+(.*)/)
      if (heredoc) {
        state.tokens.unshift(tokenHeredoc(heredoc[1]))
        return 'string-2'
      }
    }
    if (/\d/.test(ch)) {
      stream.eatWhile(/\d/);
      if(stream.eol() || !/\w/.test(stream.peek())) {
        return 'number';
      }
    }
    stream.eatWhile(/[\w-]/);
    var cur = stream.current();
    if (stream.peek() === '=' && /\w+/.test(cur)) return 'def';
    return words.hasOwnProperty(cur) ? words[cur] : null;
  }

  function tokenString(quote, style) {
    var close = quote == "(" ? ")" : quote == "{" ? "}" : quote
    return function(stream, state) {
      var next, escaped = false;
      while ((next = stream.next()) != null) {
        if (next === close && !escaped) {
          state.tokens.shift();
          break;
        } else if (next === '$' && !escaped && quote !== "'" && stream.peek() != close) {
          escaped = true;
          stream.backUp(1);
          state.tokens.unshift(tokenDollar);
          break;
        } else if (!escaped && quote !== close && next === quote) {
          state.tokens.unshift(tokenString(quote, style))
          return tokenize(stream, state)
        } else if (!escaped && /['"]/.test(next) && !/['"]/.test(quote)) {
          state.tokens.unshift(tokenStringStart(next, "string"));
          stream.backUp(1);
          break;
        }
        escaped = !escaped && next === '\\';
      }
      return style;
    };
  };

  function tokenStringStart(quote, style) {
    return function(stream, state) {
      state.tokens[0] = tokenString(quote, style)
      stream.next()
      return tokenize(stream, state)
    }
  }

  var tokenDollar = function(stream, state) {
    if (state.tokens.length > 1) stream.eat('$');
    var ch = stream.next()
    if (/['"({]/.test(ch)) {
      state.tokens[0] = tokenString(ch, ch == "(" ? "quote" : ch == "{" ? "def" : "string");
      return tokenize(stream, state);
    }
    if (!/\d/.test(ch)) stream.eatWhile(/\w/);
    state.tokens.shift();
    return 'def';
  };

  function tokenHeredoc(delim) {
    return function(stream, state) {
      if (stream.sol() && stream.string == delim) state.tokens.shift()
      stream.skipToEnd()
      return "string-2"
    }
  }

  function tokenize(stream, state) {
    return (state.tokens[0] || tokenBase) (stream, state);
  };

  return {
    startState: function() {return {tokens:[]};},
    token: function(stream, state) {
      return tokenize(stream, state);
    },
    closeBrackets: "()[]{}''\"\"``",
    lineComment: '#',
    fold: "brace"
  };
});

CodeMirror.defineMIME('text/x-sh', 'shell');
// Apache uses a slightly different Media Type for Shell scripts
// http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
CodeMirror.defineMIME('application/x-sh', 'shell');

});


/***/ }),

/***/ "0366":
/***/ (function(module, exports, __webpack_require__) {

var aFunction = __webpack_require__("1c0b");

// optional / simple context binding
module.exports = function (fn, that, length) {
  aFunction(fn);
  if (that === undefined) return fn;
  switch (length) {
    case 0: return function () {
      return fn.call(that);
    };
    case 1: return function (a) {
      return fn.call(that, a);
    };
    case 2: return function (a, b) {
      return fn.call(that, a, b);
    };
    case 3: return function (a, b, c) {
      return fn.call(that, a, b, c);
    };
  }
  return function (/* ...args */) {
    return fn.apply(that, arguments);
  };
};


/***/ }),

/***/ "03d6":
/***/ (function(module, exports, __webpack_require__) {

var has = __webpack_require__("9c0e");
var toIObject = __webpack_require__("6ca1");
var arrayIndexOf = __webpack_require__("39ad")(false);
var IE_PROTO = __webpack_require__("5a94")('IE_PROTO');

module.exports = function (object, names) {
  var O = toIObject(object);
  var i = 0;
  var result = [];
  var key;
  for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
  // Don't enum bug & hidden keys
  while (names.length > i) if (has(O, key = names[i++])) {
    ~arrayIndexOf(result, key) || result.push(key);
  }
  return result;
};


/***/ }),

/***/ "051b":
/***/ (function(module, exports, __webpack_require__) {

var dP = __webpack_require__("1a14");
var createDesc = __webpack_require__("10db");
module.exports = __webpack_require__("0bad") ? function (object, key, value) {
  return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
  object[key] = value;
  return object;
};


/***/ }),

/***/ "057f":
/***/ (function(module, exports, __webpack_require__) {

var toIndexedObject = __webpack_require__("fc6a");
var nativeGetOwnPropertyNames = __webpack_require__("241c").f;

var toString = {}.toString;

var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
  ? Object.getOwnPropertyNames(window) : [];

var getWindowNames = function (it) {
  try {
    return nativeGetOwnPropertyNames(it);
  } catch (error) {
    return windowNames.slice();
  }
};

// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
module.exports.f = function getOwnPropertyNames(it) {
  return windowNames && toString.call(it) == '[object Window]'
    ? getWindowNames(it)
    : nativeGetOwnPropertyNames(toIndexedObject(it));
};


/***/ }),

/***/ "05d3":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_style_index_0_id_2a6a0f7c_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("4a35");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_style_index_0_id_2a6a0f7c_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_style_index_0_id_2a6a0f7c_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_style_index_0_id_2a6a0f7c_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "05f5":
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__("7a41");
var document = __webpack_require__("ef08").document;
// typeof document.createElement is 'object' in old IE
var is = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
  return is ? document.createElement(it) : {};
};


/***/ }),

/***/ "06c5":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
/* harmony import */ var core_js_modules_es_array_from__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a630");
/* harmony import */ var core_js_modules_es_array_from__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_array_slice__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("fb6a");
/* harmony import */ var core_js_modules_es_array_slice__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b0c0");
/* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("d3b7");
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("25f0");
/* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_string_iterator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("3ca3");
/* harmony import */ var core_js_modules_es_string_iterator__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("6b75");







function _unsupportedIterableToArray(o, minLen) {
  if (!o) return;
  if (typeof o === "string") return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(o, minLen);
  var n = Object.prototype.toString.call(o).slice(8, -1);
  if (n === "Object" && o.constructor) n = o.constructor.name;
  if (n === "Map" || n === "Set") return Array.from(n);
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(o, minLen);
}

/***/ }),

/***/ "06cf":
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__("83ab");
var propertyIsEnumerableModule = __webpack_require__("d1e7");
var createPropertyDescriptor = __webpack_require__("5c6c");
var toIndexedObject = __webpack_require__("fc6a");
var toPrimitive = __webpack_require__("c04e");
var has = __webpack_require__("5135");
var IE8_DOM_DEFINE = __webpack_require__("0cfb");

var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;

// `Object.getOwnPropertyDescriptor` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  O = toIndexedObject(O);
  P = toPrimitive(P, true);
  if (IE8_DOM_DEFINE) try {
    return nativeGetOwnPropertyDescriptor(O, P);
  } catch (error) { /* empty */ }
  if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
};


/***/ }),

/***/ "072d":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// 19.1.2.1 Object.assign(target, source, ...)
var DESCRIPTORS = __webpack_require__("0bad");
var getKeys = __webpack_require__("9876");
var gOPS = __webpack_require__("fed5");
var pIE = __webpack_require__("1917");
var toObject = __webpack_require__("0983");
var IObject = __webpack_require__("9fbb");
var $assign = Object.assign;

// should work with symbols and should have deterministic property order (V8 bug)
module.exports = !$assign || __webpack_require__("4b8b")(function () {
  var A = {};
  var B = {};
  // eslint-disable-next-line no-undef
  var S = Symbol();
  var K = 'abcdefghijklmnopqrst';
  A[S] = 7;
  K.split('').forEach(function (k) { B[k] = k; });
  return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
  var T = toObject(target);
  var aLen = arguments.length;
  var index = 1;
  var getSymbols = gOPS.f;
  var isEnum = pIE.f;
  while (aLen > index) {
    var S = IObject(arguments[index++]);
    var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
    var length = keys.length;
    var j = 0;
    var key;
    while (length > j) {
      key = keys[j++];
      if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];
    }
  } return T;
} : $assign;


/***/ }),

/***/ "07ac":
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__("23e7");
var $values = __webpack_require__("6f53").values;

// `Object.values` method
// https://tc39.github.io/ecma262/#sec-object.values
$({ target: 'Object', stat: true }, {
  values: function values(O) {
    return $values(O);
  }
});


/***/ }),

/***/ "07ea":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_input_icon_click_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("3d56");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_input_icon_click_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_input_icon_click_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_input_icon_click_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "095f":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "0983":
/***/ (function(module, exports, __webpack_require__) {

// 7.1.13 ToObject(argument)
var defined = __webpack_require__("c901");
module.exports = function (it) {
  return Object(defined(it));
};


/***/ }),

/***/ "0a06":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");
var buildURL = __webpack_require__("30b5");
var InterceptorManager = __webpack_require__("f6b4");
var dispatchRequest = __webpack_require__("5270");
var mergeConfig = __webpack_require__("4a7b");

/**
 * Create a new instance of Axios
 *
 * @param {Object} instanceConfig The default config for the instance
 */
function Axios(instanceConfig) {
  this.defaults = instanceConfig;
  this.interceptors = {
    request: new InterceptorManager(),
    response: new InterceptorManager()
  };
}

/**
 * Dispatch a request
 *
 * @param {Object} config The config specific for this request (merged with this.defaults)
 */
Axios.prototype.request = function request(config) {
  /*eslint no-param-reassign:0*/
  // Allow for axios('example/url'[, config]) a la fetch API
  if (typeof config === 'string') {
    config = arguments[1] || {};
    config.url = arguments[0];
  } else {
    config = config || {};
  }

  config = mergeConfig(this.defaults, config);

  // Set config.method
  if (config.method) {
    config.method = config.method.toLowerCase();
  } else if (this.defaults.method) {
    config.method = this.defaults.method.toLowerCase();
  } else {
    config.method = 'get';
  }

  // Hook up interceptors middleware
  var chain = [dispatchRequest, undefined];
  var promise = Promise.resolve(config);

  this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
    chain.unshift(interceptor.fulfilled, interceptor.rejected);
  });

  this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
    chain.push(interceptor.fulfilled, interceptor.rejected);
  });

  while (chain.length) {
    promise = promise.then(chain.shift(), chain.shift());
  }

  return promise;
};

Axios.prototype.getUri = function getUri(config) {
  config = mergeConfig(this.defaults, config);
  return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
};

// Provide aliases for supported request methods
utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
  /*eslint func-names:0*/
  Axios.prototype[method] = function(url, config) {
    return this.request(mergeConfig(config || {}, {
      method: method,
      url: url,
      data: (config || {}).data
    }));
  };
});

utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  /*eslint func-names:0*/
  Axios.prototype[method] = function(url, data, config) {
    return this.request(mergeConfig(config || {}, {
      method: method,
      url: url,
      data: data
    }));
  };
});

module.exports = Axios;


/***/ }),

/***/ "0ade":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_down_select_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1c97");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_down_select_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_down_select_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_down_select_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "0ae2":
/***/ (function(module, exports, __webpack_require__) {

// all enumerable object keys, includes symbols
var getKeys = __webpack_require__("9876");
var gOPS = __webpack_require__("fed5");
var pIE = __webpack_require__("1917");
module.exports = function (it) {
  var result = getKeys(it);
  var getSymbols = gOPS.f;
  if (getSymbols) {
    var symbols = getSymbols(it);
    var isEnum = pIE.f;
    var i = 0;
    var key;
    while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
  } return result;
};


/***/ }),

/***/ "0b25":
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__("a691");
var toLength = __webpack_require__("50c4");

// `ToIndex` abstract operation
// https://tc39.github.io/ecma262/#sec-toindex
module.exports = function (it) {
  if (it === undefined) return 0;
  var number = toInteger(it);
  var length = toLength(number);
  if (number !== length) throw RangeError('Wrong length or index');
  return length;
};


/***/ }),

/***/ "0b40":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "0b51":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "0b99":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $at = __webpack_require__("19fa")(true);

// 21.1.3.27 String.prototype[@@iterator]()
__webpack_require__("393a")(String, 'String', function (iterated) {
  this._t = String(iterated); // target
  this._i = 0;                // next index
// 21.1.5.2.1 %StringIteratorPrototype%.next()
}, function () {
  var O = this._t;
  var index = this._i;
  var point;
  if (index >= O.length) return { value: undefined, done: true };
  point = $at(O, index);
  this._i += point.length;
  return { value: point, done: false };
});


/***/ }),

/***/ "0bad":
/***/ (function(module, exports, __webpack_require__) {

// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__("4b8b")(function () {
  return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});


/***/ }),

/***/ "0c47":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var setToStringTag = __webpack_require__("d44e");

// JSON[@@toStringTag] property
// https://tc39.github.io/ecma262/#sec-json-@@tostringtag
setToStringTag(global.JSON, 'JSON', true);


/***/ }),

/***/ "0cfb":
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__("83ab");
var fails = __webpack_require__("d039");
var createElement = __webpack_require__("cc12");

// Thank's IE8 for his funny defineProperty
module.exports = !DESCRIPTORS && !fails(function () {
  return Object.defineProperty(createElement('div'), 'a', {
    get: function () { return 7; }
  }).a != 7;
});


/***/ }),

/***/ "0d3b":
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__("d039");
var wellKnownSymbol = __webpack_require__("b622");
var IS_PURE = __webpack_require__("c430");

var ITERATOR = wellKnownSymbol('iterator');

module.exports = !fails(function () {
  var url = new URL('b?a=1&b=2&c=3', 'http://a');
  var searchParams = url.searchParams;
  var result = '';
  url.pathname = 'c%20d';
  searchParams.forEach(function (value, key) {
    searchParams['delete']('b');
    result += key + value;
  });
  return (IS_PURE && !url.toJSON)
    || !searchParams.sort
    || url.href !== 'http://a/c%20d?a=1&c=3'
    || searchParams.get('c') !== '3'
    || String(new URLSearchParams('?a=1')) !== 'a=1'
    || !searchParams[ITERATOR]
    // throws in Edge
    || new URL('https://a@b').username !== 'a'
    || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
    // not punycoded in Edge
    || new URL('http://тест').host !== 'xn--e1aybc'
    // not escaped in Chrome 62-
    || new URL('http://a#б').hash !== '#%D0%B1'
    // fails in Chrome 66-
    || result !== 'a1c3'
    // throws in Safari
    || new URL('http://x', undefined).host !== 'x';
});


/***/ }),

/***/ "0d5e":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var core_js_modules_es_array_index_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c975");
/* harmony import */ var core_js_modules_es_array_index_of__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_index_of__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("a15b");
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_object_assign__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("cca6");
/* harmony import */ var core_js_modules_es_object_assign__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_assign__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("d3b7");
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("e6cf");
/* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("bc3a");
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("4328");
/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _packages_message_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("d2d7");







 // axios.defaults.baseURL = window.axiosBaseUrl == "undefined" ? "./" : window.axiosBaseUrl; // 设置跨域代理接口统一的前置地址

axios__WEBPACK_IMPORTED_MODULE_5___default.a.defaults.baseURL = typeof axiosBaseUrl == "undefined" ? "./" : eval("axiosBaseUrl"); // 设置跨域代理接口统一的前置地址
// 环境的切换 判断是否开发

/*let path =  '';
if (process.env.NODE_ENV == 'development') { //开发环境
    path = "/portal/r";
} else if (process.env.NODE_ENV == 'testing') { // 测试环境
    path =  '../';
} else if (process.env.NODE_ENV == 'production') { //正式环境
    path =  '../';
}
axios.defaults.baseURL = window.location.origin + path;*/

axios__WEBPACK_IMPORTED_MODULE_5___default.a.defaults.headers = {
  "Content-Type": "application/x-www-form-urlencoded; charset=utf-8"
}; // 添加请求拦截器

axios__WEBPACK_IMPORTED_MODULE_5___default.a.interceptors.request.use(function (config) {
  // 在发送请求之前做些什么

  /* if(request.method == 'post' || request.method == 'get'){
  	 request.params = {};
   }
   return request*/
  if (config.method === "get") {
    // 如果是get请求，且params是数组类型如arr=[1,2]，则转换成arr=1&arr=2,不转换会显示为arr[]=1&arr[]=2
    config.paramsSerializer = function (params) {
      return qs__WEBPACK_IMPORTED_MODULE_6___default.a.stringify(params, {
        arrayFormat: "repeat"
      });
    };
  } else if (config.method === "post") {
    config.params = {};
  }

  return config;
}, function (error) {
  if (error.response == null) {
    throw error;
  }

  var data = error.response.data;

  if (data.msg.indexOf("用户会话已失效") > -1) {
    Object(_packages_message_index_js__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])({
      type: "warning",
      message: data.desc ? data.desc : data.msg,
      duration: 2000,
      onClose: function onClose() {
        //跳转登录页面
        setTimeout(function () {
          if (top.homePageId == undefined) {
            top.window.location.href = "../";
          } else {
            top.window.location.href = "../console";
          }
        }, 2000); //window.location.href = `${window.location.origin}/portal/console`;
      }
    });
  } else if (data.msg.indexOf("模型受管，操作被拒绝") > -1) {
    Object(_packages_message_index_js__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])({
      type: "error",
      message: data.desc ? data.desc : data.msg,
      onClose: function onClose() {
        window.location.reload();
      }
    });
  } else {
    Object(_packages_message_index_js__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])({
      type: "error",
      message: data.desc ? data.desc : data.msg
    });
  } // 对请求错误做些什么


  return Promise.reject(error);
}); // 添加响应拦截器

axios__WEBPACK_IMPORTED_MODULE_5___default.a.interceptors.response.use(function (response) {
  // 只返回数据
  if (response.config.alert !== false) {
    if (response.data.result == "error" || response.data.result == "warning") {
      var par = {
        type: response.data.result,
        showClose: response.data.result == "error",
        duration: response.data.result == "error" ? 0 : 2000,
        message: response.data.desc ? response.data.desc : response.data.msg
      };

      if (response.data.msg.indexOf("模型受管，操作被拒绝") > -1) {
        par["onClose"] = function () {
          window.location.reload();
        };
      }

      Object(_packages_message_index_js__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(par);
    }
  }

  return response.data;
}, function (error) {
  if (error.response == null) {
    throw error;
  }

  var data = error.response.data;

  if (data.msg.indexOf("用户会话已失效") > -1) {
    Object(_packages_message_index_js__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])({
      type: "warning",
      message: data.desc ? data.desc : data.msg,
      duration: 1000,
      onClose: function onClose() {
        //跳转登录页面
        setTimeout(function () {
          if (top.homePageId == undefined) {
            top.window.location.href = "../";
          } else {
            top.window.location.href = "../console";
          }
        }, 2000); //window.location.href = `${window.location.origin}/portal/console`;
      }
    });
  } else if (data.msg.indexOf("模型受管，操作被拒绝") > -1) {
    Object(_packages_message_index_js__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])({
      type: "error",
      message: data.desc ? data.desc : data.msg,
      onClose: function onClose() {
        window.location.reload();
      }
    });
  } else {
    Object(_packages_message_index_js__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])({
      type: "error",
      message: data.desc ? data.desc : data.msg
    });
  } // 对响应错误做点什么


  return Promise.reject(error);
});

function _toChangeData(data) {
  var dataArray = [];

  for (var key in data) {
    dataArray.push(encodeURIComponent(key) + "=" + encodeURIComponent(data[key]));
  }

  return dataArray.join("&");
}

function checkCMD(params) {
  var cmd = params.data.cmd;

  if (cmd === "CLIENT_USER_LOGIN" || cmd === "CONSOLE_ADMIN_LOGIN" || cmd === "CLIENT_MOBILE_USER_LOGIN" || cmd === "COE_USER_LOGIN" || cmd === "com.actionsoft.apps.coe.pal_user_login") {
    return;
  } else {
    if (typeof params.data.sid === "undefined") {
      var projectSetting = typeof settingParam == "undefined" ? window.settingParam : eval("settingParam");
      params.data.sid = projectSetting.sessionId;
    }
  }
}

/* harmony default export */ __webpack_exports__["a"] = ({
  //get请求
  get: function get(params) {
    var getConfig = {
      method: "get",
      url: params.url,
      params: params.data
    };
    checkCMD(params);
    return axios__WEBPACK_IMPORTED_MODULE_5___default()(getConfig);
  },
  //post请求
  post: function post(params) {
    var postConfig = {
      method: "post",
      url: params.url,
      data: params.data
    };
    checkCMD(params);
    postConfig.data = _toChangeData(postConfig.data);
    return axios__WEBPACK_IMPORTED_MODULE_5___default()(postConfig);
  },
  //aslp请求  简化aslp参数
  aslp: function aslp(params) {
    // {
    //     url : "",  //全路径
    //     data : {
    //          sid:"",
    //          sourceAppId:"",
    //          aslp:"",
    //          params :{
    //              aa:1,
    //              bb:2
    //          }
    //     }
    var data = {
      cmd: "API_CALL_ASLP",
      sourceAppId: "",
      aslp: ""
    };

    if (typeof params.data.sid !== "undefined") {
      data.authentication = params.data.sid;
    }

    Object.assign(data, params.data);
    var postConfig = {
      method: "post",
      url: params.url,
      data: data
    };
    postConfig.data = _toChangeData(postConfig.data);
    return axios__WEBPACK_IMPORTED_MODULE_5___default()(postConfig);
  }
});

/***/ }),

/***/ "0df6":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


/**
 * Syntactic sugar for invoking a function and expanding an array for arguments.
 *
 * Common use case would be to use `Function.prototype.apply`.
 *
 *  ```js
 *  function f(x, y, z) {}
 *  var args = [1, 2, 3];
 *  f.apply(null, args);
 *  ```
 *
 * With `spread` this example can be re-written.
 *
 *  ```js
 *  spread(function(x, y, z) {})([1, 2, 3]);
 *  ```
 *
 * @param {Function} callback
 * @returns {Function}
 */
module.exports = function spread(callback) {
  return function wrap(arr) {
    return callback.apply(null, arr);
  };
};


/***/ }),

/***/ "0e15":
/***/ (function(module, exports, __webpack_require__) {

/* eslint-disable no-undefined */

var throttle = __webpack_require__("597f");

/**
 * Debounce execution of a function. Debouncing, unlike throttling,
 * guarantees that a function is only executed a single time, either at the
 * very beginning of a series of calls, or at the very end.
 *
 * @param  {Number}   delay         A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
 * @param  {Boolean}  [atBegin]     Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds
 *                                  after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.
 *                                  (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).
 * @param  {Function} callback      A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
 *                                  to `callback` when the debounced-function is executed.
 *
 * @return {Function} A new, debounced function.
 */
module.exports = function ( delay, atBegin, callback ) {
	return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);
};


/***/ }),

/***/ "0fae":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "1054":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "1098":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _iterator = __webpack_require__("17ed");

var _iterator2 = _interopRequireDefault(_iterator);

var _symbol = __webpack_require__("f893");

var _symbol2 = _interopRequireDefault(_symbol);

var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; };

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
  return typeof obj === "undefined" ? "undefined" : _typeof(obj);
} : function (obj) {
  return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
};

/***/ }),

/***/ "10db":
/***/ (function(module, exports) {

module.exports = function (bitmap, value) {
  return {
    enumerable: !(bitmap & 1),
    configurable: !(bitmap & 2),
    writable: !(bitmap & 4),
    value: value
  };
};


/***/ }),

/***/ "1138":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "1148":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toInteger = __webpack_require__("a691");
var requireObjectCoercible = __webpack_require__("1d80");

// `String.prototype.repeat` method implementation
// https://tc39.github.io/ecma262/#sec-string.prototype.repeat
module.exports = ''.repeat || function repeat(count) {
  var str = String(requireObjectCoercible(this));
  var result = '';
  var n = toInteger(count);
  if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions');
  for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;
  return result;
};


/***/ }),

/***/ "1276":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fixRegExpWellKnownSymbolLogic = __webpack_require__("d784");
var isRegExp = __webpack_require__("44e7");
var anObject = __webpack_require__("825a");
var requireObjectCoercible = __webpack_require__("1d80");
var speciesConstructor = __webpack_require__("4840");
var advanceStringIndex = __webpack_require__("8aa5");
var toLength = __webpack_require__("50c4");
var callRegExpExec = __webpack_require__("14c3");
var regexpExec = __webpack_require__("9263");
var fails = __webpack_require__("d039");

var arrayPush = [].push;
var min = Math.min;
var MAX_UINT32 = 0xFFFFFFFF;

// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });

// @@split logic
fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {
  var internalSplit;
  if (
    'abbc'.split(/(b)*/)[1] == 'c' ||
    'test'.split(/(?:)/, -1).length != 4 ||
    'ab'.split(/(?:ab)*/).length != 2 ||
    '.'.split(/(.?)(.?)/).length != 4 ||
    '.'.split(/()()/).length > 1 ||
    ''.split(/.?/).length
  ) {
    // based on es5-shim implementation, need to rework it
    internalSplit = function (separator, limit) {
      var string = String(requireObjectCoercible(this));
      var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
      if (lim === 0) return [];
      if (separator === undefined) return [string];
      // If `separator` is not a regex, use native split
      if (!isRegExp(separator)) {
        return nativeSplit.call(string, separator, lim);
      }
      var output = [];
      var flags = (separator.ignoreCase ? 'i' : '') +
                  (separator.multiline ? 'm' : '') +
                  (separator.unicode ? 'u' : '') +
                  (separator.sticky ? 'y' : '');
      var lastLastIndex = 0;
      // Make `global` and avoid `lastIndex` issues by working with a copy
      var separatorCopy = new RegExp(separator.source, flags + 'g');
      var match, lastIndex, lastLength;
      while (match = regexpExec.call(separatorCopy, string)) {
        lastIndex = separatorCopy.lastIndex;
        if (lastIndex > lastLastIndex) {
          output.push(string.slice(lastLastIndex, match.index));
          if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));
          lastLength = match[0].length;
          lastLastIndex = lastIndex;
          if (output.length >= lim) break;
        }
        if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
      }
      if (lastLastIndex === string.length) {
        if (lastLength || !separatorCopy.test('')) output.push('');
      } else output.push(string.slice(lastLastIndex));
      return output.length > lim ? output.slice(0, lim) : output;
    };
  // Chakra, V8
  } else if ('0'.split(undefined, 0).length) {
    internalSplit = function (separator, limit) {
      return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
    };
  } else internalSplit = nativeSplit;

  return [
    // `String.prototype.split` method
    // https://tc39.github.io/ecma262/#sec-string.prototype.split
    function split(separator, limit) {
      var O = requireObjectCoercible(this);
      var splitter = separator == undefined ? undefined : separator[SPLIT];
      return splitter !== undefined
        ? splitter.call(separator, O, limit)
        : internalSplit.call(String(O), separator, limit);
    },
    // `RegExp.prototype[@@split]` method
    // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split
    //
    // NOTE: This cannot be properly polyfilled in engines that don't support
    // the 'y' flag.
    function (regexp, limit) {
      var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);
      if (res.done) return res.value;

      var rx = anObject(regexp);
      var S = String(this);
      var C = speciesConstructor(rx, RegExp);

      var unicodeMatching = rx.unicode;
      var flags = (rx.ignoreCase ? 'i' : '') +
                  (rx.multiline ? 'm' : '') +
                  (rx.unicode ? 'u' : '') +
                  (SUPPORTS_Y ? 'y' : 'g');

      // ^(? + rx + ) is needed, in combination with some S slicing, to
      // simulate the 'y' flag.
      var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
      var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
      if (lim === 0) return [];
      if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
      var p = 0;
      var q = 0;
      var A = [];
      while (q < S.length) {
        splitter.lastIndex = SUPPORTS_Y ? q : 0;
        var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));
        var e;
        if (
          z === null ||
          (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
        ) {
          q = advanceStringIndex(S, q, unicodeMatching);
        } else {
          A.push(S.slice(p, q));
          if (A.length === lim) return A;
          for (var i = 1; i <= z.length - 1; i++) {
            A.push(z[i]);
            if (A.length === lim) return A;
          }
          q = p = e;
        }
      }
      A.push(S.slice(p));
      return A;
    }
  ];
}, !SUPPORTS_Y);


/***/ }),

/***/ "129f":
/***/ (function(module, exports) {

// `SameValue` abstract operation
// https://tc39.github.io/ecma262/#sec-samevalue
module.exports = Object.is || function is(x, y) {
  // eslint-disable-next-line no-self-compare
  return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
};


/***/ }),

/***/ "12f2":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

exports.default = function (ref) {
  return {
    methods: {
      focus: function focus() {
        this.$refs[ref].focus();
      }
    }
  };
};

;

/***/ }),

/***/ "1350":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_formula_vue_vue_type_style_index_0_id_e1e83226_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("4c25");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_formula_vue_vue_type_style_index_0_id_e1e83226_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_formula_vue_vue_type_style_index_0_id_e1e83226_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_formula_vue_vue_type_style_index_0_id_e1e83226_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "1377":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "13d5":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var $reduce = __webpack_require__("d58f").left;
var arrayMethodIsStrict = __webpack_require__("a640");
var arrayMethodUsesToLength = __webpack_require__("ae40");

var STRICT_METHOD = arrayMethodIsStrict('reduce');
var USES_TO_LENGTH = arrayMethodUsesToLength('reduce', { 1: 0 });

// `Array.prototype.reduce` method
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
$({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH }, {
  reduce: function reduce(callbackfn /* , initialValue */) {
    return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),

/***/ "145e":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toObject = __webpack_require__("7b0b");
var toAbsoluteIndex = __webpack_require__("23cb");
var toLength = __webpack_require__("50c4");

var min = Math.min;

// `Array.prototype.copyWithin` method implementation
// https://tc39.github.io/ecma262/#sec-array.prototype.copywithin
module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
  var O = toObject(this);
  var len = toLength(O.length);
  var to = toAbsoluteIndex(target, len);
  var from = toAbsoluteIndex(start, len);
  var end = arguments.length > 2 ? arguments[2] : undefined;
  var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
  var inc = 1;
  if (from < to && to < from + count) {
    inc = -1;
    from += count - 1;
    to += count - 1;
  }
  while (count-- > 0) {
    if (from in O) O[to] = O[from];
    else delete O[to];
    to += inc;
    from += inc;
  } return O;
};


/***/ }),

/***/ "14b4":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "14c3":
/***/ (function(module, exports, __webpack_require__) {

var classof = __webpack_require__("c6b6");
var regexpExec = __webpack_require__("9263");

// `RegExpExec` abstract operation
// https://tc39.github.io/ecma262/#sec-regexpexec
module.exports = function (R, S) {
  var exec = R.exec;
  if (typeof exec === 'function') {
    var result = exec.call(R, S);
    if (typeof result !== 'object') {
      throw TypeError('RegExp exec method returned something other than an Object or null');
    }
    return result;
  }

  if (classof(R) !== 'RegExp') {
    throw TypeError('RegExp#exec called on incompatible receiver');
  }

  return regexpExec.call(R, S);
};



/***/ }),

/***/ "14e9":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("944a");

__webpack_require__("b0c0");

__webpack_require__("0c47");

__webpack_require__("23dc");

__webpack_require__("a9e3");

__webpack_require__("d3b7");

var _typeof = __webpack_require__("7037");

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

  /******/

  /******/
  // Load entry module and return exports

  /******/

  return __webpack_require__(__webpack_require__.s = 127);
  /******/
}(
/************************************************************************/

/******/
{
  /***/
  127:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__); // EXTERNAL MODULE: external "element-ui/lib/utils/resize-event"


    var resize_event_ = __webpack_require__(16); // EXTERNAL MODULE: external "element-ui/lib/utils/scrollbar-width"


    var scrollbar_width_ = __webpack_require__(39);

    var scrollbar_width_default = /*#__PURE__*/__webpack_require__.n(scrollbar_width_); // EXTERNAL MODULE: external "element-ui/lib/utils/util"


    var util_ = __webpack_require__(3); // EXTERNAL MODULE: external "element-ui/lib/utils/dom"


    var dom_ = __webpack_require__(2); // CONCATENATED MODULE: ./packages/scrollbar/src/util.js


    var BAR_MAP = {
      vertical: {
        offset: 'offsetHeight',
        scroll: 'scrollTop',
        scrollSize: 'scrollHeight',
        size: 'height',
        key: 'vertical',
        axis: 'Y',
        client: 'clientY',
        direction: 'top'
      },
      horizontal: {
        offset: 'offsetWidth',
        scroll: 'scrollLeft',
        scrollSize: 'scrollWidth',
        size: 'width',
        key: 'horizontal',
        axis: 'X',
        client: 'clientX',
        direction: 'left'
      }
    };

    function renderThumbStyle(_ref) {
      var move = _ref.move,
          size = _ref.size,
          bar = _ref.bar;
      var style = {};
      var translate = 'translate' + bar.axis + '(' + move + '%)';
      style[bar.size] = size;
      style.transform = translate;
      style.msTransform = translate;
      style.webkitTransform = translate;
      return style;
    }

    ; // CONCATENATED MODULE: ./packages/scrollbar/src/bar.js

    /* istanbul ignore next */

    /* harmony default export */

    var src_bar = {
      name: 'Bar',
      props: {
        vertical: Boolean,
        size: String,
        move: Number
      },
      computed: {
        bar: function bar() {
          return BAR_MAP[this.vertical ? 'vertical' : 'horizontal'];
        },
        wrap: function wrap() {
          return this.$parent.wrap;
        }
      },
      render: function render(h) {
        var size = this.size,
            move = this.move,
            bar = this.bar;
        return h('div', {
          'class': ['el-scrollbar__bar', 'is-' + bar.key],
          on: {
            'mousedown': this.clickTrackHandler
          }
        }, [h('div', {
          ref: 'thumb',
          'class': 'el-scrollbar__thumb',
          on: {
            'mousedown': this.clickThumbHandler
          },
          style: renderThumbStyle({
            size: size,
            move: move,
            bar: bar
          })
        })]);
      },
      methods: {
        clickThumbHandler: function clickThumbHandler(e) {
          // prevent click event of right button
          if (e.ctrlKey || e.button === 2) {
            return;
          }

          this.startDrag(e);
          this[this.bar.axis] = e.currentTarget[this.bar.offset] - (e[this.bar.client] - e.currentTarget.getBoundingClientRect()[this.bar.direction]);
        },
        clickTrackHandler: function clickTrackHandler(e) {
          var offset = Math.abs(e.target.getBoundingClientRect()[this.bar.direction] - e[this.bar.client]);
          var thumbHalf = this.$refs.thumb[this.bar.offset] / 2;
          var thumbPositionPercentage = (offset - thumbHalf) * 100 / this.$el[this.bar.offset];
          this.wrap[this.bar.scroll] = thumbPositionPercentage * this.wrap[this.bar.scrollSize] / 100;
        },
        startDrag: function startDrag(e) {
          e.stopImmediatePropagation();
          this.cursorDown = true;
          Object(dom_["on"])(document, 'mousemove', this.mouseMoveDocumentHandler);
          Object(dom_["on"])(document, 'mouseup', this.mouseUpDocumentHandler);

          document.onselectstart = function () {
            return false;
          };
        },
        mouseMoveDocumentHandler: function mouseMoveDocumentHandler(e) {
          if (this.cursorDown === false) return;
          var prevPage = this[this.bar.axis];
          if (!prevPage) return;
          var offset = (this.$el.getBoundingClientRect()[this.bar.direction] - e[this.bar.client]) * -1;
          var thumbClickPosition = this.$refs.thumb[this.bar.offset] - prevPage;
          var thumbPositionPercentage = (offset - thumbClickPosition) * 100 / this.$el[this.bar.offset];
          this.wrap[this.bar.scroll] = thumbPositionPercentage * this.wrap[this.bar.scrollSize] / 100;
        },
        mouseUpDocumentHandler: function mouseUpDocumentHandler(e) {
          this.cursorDown = false;
          this[this.bar.axis] = 0;
          Object(dom_["off"])(document, 'mousemove', this.mouseMoveDocumentHandler);
          document.onselectstart = null;
        }
      },
      destroyed: function destroyed() {
        Object(dom_["off"])(document, 'mouseup', this.mouseUpDocumentHandler);
      }
    }; // CONCATENATED MODULE: ./packages/scrollbar/src/main.js
    // reference https://github.com/noeldelgado/gemini-scrollbar/blob/master/index.js

    /* istanbul ignore next */

    /* harmony default export */

    var main = {
      name: 'ElScrollbar',
      components: {
        Bar: src_bar
      },
      props: {
        native: Boolean,
        wrapStyle: {},
        wrapClass: {},
        viewClass: {},
        viewStyle: {},
        noresize: Boolean,
        // 如果 container 尺寸不会发生变化，最好设置它可以优化性能
        tag: {
          type: String,
          default: 'div'
        }
      },
      data: function data() {
        return {
          sizeWidth: '0',
          sizeHeight: '0',
          moveX: 0,
          moveY: 0
        };
      },
      computed: {
        wrap: function wrap() {
          return this.$refs.wrap;
        }
      },
      render: function render(h) {
        var gutter = scrollbar_width_default()();
        var style = this.wrapStyle;

        if (gutter) {
          var gutterWith = '-' + gutter + 'px';
          var gutterStyle = 'margin-bottom: ' + gutterWith + '; margin-right: ' + gutterWith + ';';

          if (Array.isArray(this.wrapStyle)) {
            style = Object(util_["toObject"])(this.wrapStyle);
            style.marginRight = style.marginBottom = gutterWith;
          } else if (typeof this.wrapStyle === 'string') {
            style += gutterStyle;
          } else {
            style = gutterStyle;
          }
        }

        var view = h(this.tag, {
          class: ['el-scrollbar__view', this.viewClass],
          style: this.viewStyle,
          ref: 'resize'
        }, this.$slots.default);
        var wrap = h('div', {
          ref: 'wrap',
          style: style,
          on: {
            'scroll': this.handleScroll
          },
          'class': [this.wrapClass, 'el-scrollbar__wrap', gutter ? '' : 'el-scrollbar__wrap--hidden-default']
        }, [[view]]);
        var nodes = void 0;

        if (!this.native) {
          nodes = [wrap, h(src_bar, {
            attrs: {
              move: this.moveX,
              size: this.sizeWidth
            }
          }), h(src_bar, {
            attrs: {
              vertical: true,
              move: this.moveY,
              size: this.sizeHeight
            }
          })];
        } else {
          nodes = [h('div', {
            ref: 'wrap',
            'class': [this.wrapClass, 'el-scrollbar__wrap'],
            style: style
          }, [[view]])];
        }

        return h('div', {
          class: 'el-scrollbar'
        }, nodes);
      },
      methods: {
        handleScroll: function handleScroll() {
          var wrap = this.wrap;
          this.moveY = wrap.scrollTop * 100 / wrap.clientHeight;
          this.moveX = wrap.scrollLeft * 100 / wrap.clientWidth;
        },
        update: function update() {
          var heightPercentage = void 0,
              widthPercentage = void 0;
          var wrap = this.wrap;
          if (!wrap) return;
          heightPercentage = wrap.clientHeight * 100 / wrap.scrollHeight;
          widthPercentage = wrap.clientWidth * 100 / wrap.scrollWidth;
          this.sizeHeight = heightPercentage < 100 ? heightPercentage + '%' : '';
          this.sizeWidth = widthPercentage < 100 ? widthPercentage + '%' : '';
        }
      },
      mounted: function mounted() {
        if (this.native) return;
        this.$nextTick(this.update);
        !this.noresize && Object(resize_event_["addResizeListener"])(this.$refs.resize, this.update);
      },
      beforeDestroy: function beforeDestroy() {
        if (this.native) return;
        !this.noresize && Object(resize_event_["removeResizeListener"])(this.$refs.resize, this.update);
      }
    }; // CONCATENATED MODULE: ./packages/scrollbar/index.js

    /* istanbul ignore next */

    main.install = function (Vue) {
      Vue.component(main.name, main);
    };
    /* harmony default export */


    var scrollbar = __webpack_exports__["default"] = main;
    /***/
  },

  /***/
  16:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("4010");
    /***/
  },

  /***/
  2:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("5924");
    /***/
  },

  /***/
  3:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("8122");
    /***/
  },

  /***/
  39:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("e62d");
    /***/
  }
  /******/

});

/***/ }),

/***/ "155a":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "159b":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var DOMIterables = __webpack_require__("fdbc");
var forEach = __webpack_require__("17c2");
var createNonEnumerableProperty = __webpack_require__("9112");

for (var COLLECTION_NAME in DOMIterables) {
  var Collection = global[COLLECTION_NAME];
  var CollectionPrototype = Collection && Collection.prototype;
  // some Chrome versions have non-configurable methods on DOMTokenList
  if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
    createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
  } catch (error) {
    CollectionPrototype.forEach = forEach;
  }
}


/***/ }),

/***/ "1609":
/***/ (function(module, exports) {

module.exports = function (it) {
  if (typeof it != 'function') throw TypeError(it + ' is not a function!');
  return it;
};


/***/ }),

/***/ "170b":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__("ebb5");
var toLength = __webpack_require__("50c4");
var toAbsoluteIndex = __webpack_require__("23cb");
var speciesConstructor = __webpack_require__("4840");

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

// `%TypedArray%.prototype.subarray` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.subarray
exportTypedArrayMethod('subarray', function subarray(begin, end) {
  var O = aTypedArray(this);
  var length = O.length;
  var beginIndex = toAbsoluteIndex(begin, length);
  return new (speciesConstructor(O, O.constructor))(
    O.buffer,
    O.byteOffset + beginIndex * O.BYTES_PER_ELEMENT,
    toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - beginIndex)
  );
});


/***/ }),

/***/ "17c2":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $forEach = __webpack_require__("b727").forEach;
var arrayMethodIsStrict = __webpack_require__("a640");
var arrayMethodUsesToLength = __webpack_require__("ae40");

var STRICT_METHOD = arrayMethodIsStrict('forEach');
var USES_TO_LENGTH = arrayMethodUsesToLength('forEach');

// `Array.prototype.forEach` method implementation
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
module.exports = (!STRICT_METHOD || !USES_TO_LENGTH) ? function forEach(callbackfn /* , thisArg */) {
  return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
} : [].forEach;


/***/ }),

/***/ "17ed":
/***/ (function(module, exports, __webpack_require__) {

module.exports = { "default": __webpack_require__("511f"), __esModule: true };

/***/ }),

/***/ "182d":
/***/ (function(module, exports, __webpack_require__) {

var toPositiveInteger = __webpack_require__("f8cd");

module.exports = function (it, BYTES) {
  var offset = toPositiveInteger(it);
  if (offset % BYTES) throw RangeError('Wrong offset');
  return offset;
};


/***/ }),

/***/ "1836":
/***/ (function(module, exports, __webpack_require__) {

// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
var toIObject = __webpack_require__("6ca1");
var gOPN = __webpack_require__("6438").f;
var toString = {}.toString;

var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
  ? Object.getOwnPropertyNames(window) : [];

var getWindowNames = function (it) {
  try {
    return gOPN(it);
  } catch (e) {
    return windowNames.slice();
  }
};

module.exports.f = function getOwnPropertyNames(it) {
  return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
};


/***/ }),

/***/ "1850":
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;__webpack_require__("ac1f");

__webpack_require__("466d");

var _typeof = __webpack_require__("7037");

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function (mod) {
  if (( false ? undefined : _typeof(exports)) == "object" && ( false ? undefined : _typeof(module)) == "object") // CommonJS
    mod(__webpack_require__("f3a7"));else if (true) // AMD
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__("f3a7")], __WEBPACK_AMD_DEFINE_FACTORY__ = (mod),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else // Plain browser env
    {}
})(function (CodeMirror) {
  var ie_lt8 = /MSIE \d/.test(navigator.userAgent) && (document.documentMode == null || document.documentMode < 8);
  var Pos = CodeMirror.Pos;
  var matching = {
    "(": ")>",
    ")": "(<",
    "[": "]>",
    "]": "[<",
    "{": "}>",
    "}": "{<",
    "<": ">>",
    ">": "<<"
  };

  function bracketRegex(config) {
    return config && config.bracketRegex || /[(){}[\]]/;
  }

  function findMatchingBracket(cm, where, config) {
    var line = cm.getLineHandle(where.line),
        pos = where.ch - 1;
    var afterCursor = config && config.afterCursor;
    if (afterCursor == null) afterCursor = /(^| )cm-fat-cursor($| )/.test(cm.getWrapperElement().className);
    var re = bracketRegex(config); // A cursor is defined as between two characters, but in in vim command mode
    // (i.e. not insert mode), the cursor is visually represented as a
    // highlighted box on top of the 2nd character. Otherwise, we allow matches
    // from before or after the cursor.

    var match = !afterCursor && pos >= 0 && re.test(line.text.charAt(pos)) && matching[line.text.charAt(pos)] || re.test(line.text.charAt(pos + 1)) && matching[line.text.charAt(++pos)];
    if (!match) return null;
    var dir = match.charAt(1) == ">" ? 1 : -1;
    if (config && config.strict && dir > 0 != (pos == where.ch)) return null;
    var style = cm.getTokenTypeAt(Pos(where.line, pos + 1));
    var found = scanForBracket(cm, Pos(where.line, pos + (dir > 0 ? 1 : 0)), dir, style || null, config);
    if (found == null) return null;
    return {
      from: Pos(where.line, pos),
      to: found && found.pos,
      match: found && found.ch == match.charAt(0),
      forward: dir > 0
    };
  } // bracketRegex is used to specify which type of bracket to scan
  // should be a regexp, e.g. /[[\]]/
  //
  // Note: If "where" is on an open bracket, then this bracket is ignored.
  //
  // Returns false when no bracket was found, null when it reached
  // maxScanLines and gave up


  function scanForBracket(cm, where, dir, style, config) {
    var maxScanLen = config && config.maxScanLineLength || 10000;
    var maxScanLines = config && config.maxScanLines || 1000;
    var stack = [];
    var re = bracketRegex(config);
    var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1) : Math.max(cm.firstLine() - 1, where.line - maxScanLines);

    for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) {
      var line = cm.getLine(lineNo);
      if (!line) continue;
      var pos = dir > 0 ? 0 : line.length - 1,
          end = dir > 0 ? line.length : -1;
      if (line.length > maxScanLen) continue;
      if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0);

      for (; pos != end; pos += dir) {
        var ch = line.charAt(pos);

        if (re.test(ch) && (style === undefined || cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style)) {
          var match = matching[ch];
          if (match && match.charAt(1) == ">" == dir > 0) stack.push(ch);else if (!stack.length) return {
            pos: Pos(lineNo, pos),
            ch: ch
          };else stack.pop();
        }
      }
    }

    return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null;
  }

  function matchBrackets(cm, autoclear, config) {
    // Disable brace matching in long lines, since it'll cause hugely slow updates
    var maxHighlightLen = cm.state.matchBrackets.maxHighlightLineLength || 1000;
    var marks = [],
        ranges = cm.listSelections();

    for (var i = 0; i < ranges.length; i++) {
      var match = ranges[i].empty() && findMatchingBracket(cm, ranges[i].head, config);

      if (match && cm.getLine(match.from.line).length <= maxHighlightLen) {
        var style = match.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket";
        marks.push(cm.markText(match.from, Pos(match.from.line, match.from.ch + 1), {
          className: style
        }));
        if (match.to && cm.getLine(match.to.line).length <= maxHighlightLen) marks.push(cm.markText(match.to, Pos(match.to.line, match.to.ch + 1), {
          className: style
        }));
      }
    }

    if (marks.length) {
      // Kludge to work around the IE bug from issue #1193, where text
      // input stops going to the textare whever this fires.
      if (ie_lt8 && cm.state.focused) cm.focus();

      var clear = function clear() {
        cm.operation(function () {
          for (var i = 0; i < marks.length; i++) {
            marks[i].clear();
          }
        });
      };

      if (autoclear) setTimeout(clear, 800);else return clear;
    }
  }

  function doMatchBrackets(cm) {
    cm.operation(function () {
      if (cm.state.matchBrackets.currentlyHighlighted) {
        cm.state.matchBrackets.currentlyHighlighted();
        cm.state.matchBrackets.currentlyHighlighted = null;
      }

      cm.state.matchBrackets.currentlyHighlighted = matchBrackets(cm, false, cm.state.matchBrackets);
    });
  }

  function clearHighlighted(cm) {
    if (cm.state.matchBrackets && cm.state.matchBrackets.currentlyHighlighted) {
      cm.state.matchBrackets.currentlyHighlighted();
      cm.state.matchBrackets.currentlyHighlighted = null;
    }
  }

  CodeMirror.defineOption("matchBrackets", false, function (cm, val, old) {
    if (old && old != CodeMirror.Init) {
      cm.off("cursorActivity", doMatchBrackets);
      cm.off("focus", doMatchBrackets);
      cm.off("blur", clearHighlighted);
      clearHighlighted(cm);
    }

    if (val) {
      cm.state.matchBrackets = _typeof(val) == "object" ? val : {};
      cm.on("cursorActivity", doMatchBrackets);
      cm.on("focus", doMatchBrackets);
      cm.on("blur", clearHighlighted);
    }
  });
  CodeMirror.defineExtension("matchBrackets", function () {
    matchBrackets(this, true);
  });
  CodeMirror.defineExtension("findMatchingBracket", function (pos, config, oldConfig) {
    // Backwards-compatibility kludge
    if (oldConfig || typeof config == "boolean") {
      if (!oldConfig) {
        config = config ? {
          strict: true
        } : null;
      } else {
        oldConfig.strict = config;
        config = oldConfig;
      }
    }

    return findMatchingBracket(this, pos, config);
  });
  CodeMirror.defineExtension("scanForBracket", function (pos, dir, style, config) {
    return scanForBracket(this, pos, dir, style, config);
  });
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("62e4")(module)))

/***/ }),

/***/ "18a5":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var createHTML = __webpack_require__("857a");
var forcedStringHTMLMethod = __webpack_require__("af03");

// `String.prototype.anchor` method
// https://tc39.github.io/ecma262/#sec-string.prototype.anchor
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('anchor') }, {
  anchor: function anchor(name) {
    return createHTML(this, 'a', 'name', name);
  }
});


/***/ }),

/***/ "1917":
/***/ (function(module, exports) {

exports.f = {}.propertyIsEnumerable;


/***/ }),

/***/ "19aa":
/***/ (function(module, exports) {

module.exports = function (it, Constructor, name) {
  if (!(it instanceof Constructor)) {
    throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
  } return it;
};


/***/ }),

/***/ "19fa":
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__("fc5e");
var defined = __webpack_require__("c901");
// true  -> String#at
// false -> String#codePointAt
module.exports = function (TO_STRING) {
  return function (that, pos) {
    var s = String(defined(that));
    var i = toInteger(pos);
    var l = s.length;
    var a, b;
    if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
    a = s.charCodeAt(i);
    return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
      ? TO_STRING ? s.charAt(i) : a
      : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
  };
};


/***/ }),

/***/ "1a14":
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__("77e9");
var IE8_DOM_DEFINE = __webpack_require__("faf5");
var toPrimitive = __webpack_require__("3397");
var dP = Object.defineProperty;

exports.f = __webpack_require__("0bad") ? Object.defineProperty : function defineProperty(O, P, Attributes) {
  anObject(O);
  P = toPrimitive(P, true);
  anObject(Attributes);
  if (IE8_DOM_DEFINE) try {
    return dP(O, P, Attributes);
  } catch (e) { /* empty */ }
  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
  if ('value' in Attributes) O[P] = Attributes.value;
  return O;
};


/***/ }),

/***/ "1b63":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"), __webpack_require__("7b00"));
  else {}
})(function(CodeMirror) {
"use strict";

CodeMirror.defineMode("sass", function(config) {
  var cssMode = CodeMirror.mimeModes["text/css"];
  var propertyKeywords = cssMode.propertyKeywords || {},
      colorKeywords = cssMode.colorKeywords || {},
      valueKeywords = cssMode.valueKeywords || {},
      fontProperties = cssMode.fontProperties || {};

  function tokenRegexp(words) {
    return new RegExp("^" + words.join("|"));
  }

  var keywords = ["true", "false", "null", "auto"];
  var keywordsRegexp = new RegExp("^" + keywords.join("|"));

  var operators = ["\\(", "\\)", "=", ">", "<", "==", ">=", "<=", "\\+", "-",
                   "\\!=", "/", "\\*", "%", "and", "or", "not", ";","\\{","\\}",":"];
  var opRegexp = tokenRegexp(operators);

  var pseudoElementsRegexp = /^::?[a-zA-Z_][\w\-]*/;

  var word;

  function isEndLine(stream) {
    return !stream.peek() || stream.match(/\s+$/, false);
  }

  function urlTokens(stream, state) {
    var ch = stream.peek();

    if (ch === ")") {
      stream.next();
      state.tokenizer = tokenBase;
      return "operator";
    } else if (ch === "(") {
      stream.next();
      stream.eatSpace();

      return "operator";
    } else if (ch === "'" || ch === '"') {
      state.tokenizer = buildStringTokenizer(stream.next());
      return "string";
    } else {
      state.tokenizer = buildStringTokenizer(")", false);
      return "string";
    }
  }
  function comment(indentation, multiLine) {
    return function(stream, state) {
      if (stream.sol() && stream.indentation() <= indentation) {
        state.tokenizer = tokenBase;
        return tokenBase(stream, state);
      }

      if (multiLine && stream.skipTo("*/")) {
        stream.next();
        stream.next();
        state.tokenizer = tokenBase;
      } else {
        stream.skipToEnd();
      }

      return "comment";
    };
  }

  function buildStringTokenizer(quote, greedy) {
    if (greedy == null) { greedy = true; }

    function stringTokenizer(stream, state) {
      var nextChar = stream.next();
      var peekChar = stream.peek();
      var previousChar = stream.string.charAt(stream.pos-2);

      var endingString = ((nextChar !== "\\" && peekChar === quote) || (nextChar === quote && previousChar !== "\\"));

      if (endingString) {
        if (nextChar !== quote && greedy) { stream.next(); }
        if (isEndLine(stream)) {
          state.cursorHalf = 0;
        }
        state.tokenizer = tokenBase;
        return "string";
      } else if (nextChar === "#" && peekChar === "{") {
        state.tokenizer = buildInterpolationTokenizer(stringTokenizer);
        stream.next();
        return "operator";
      } else {
        return "string";
      }
    }

    return stringTokenizer;
  }

  function buildInterpolationTokenizer(currentTokenizer) {
    return function(stream, state) {
      if (stream.peek() === "}") {
        stream.next();
        state.tokenizer = currentTokenizer;
        return "operator";
      } else {
        return tokenBase(stream, state);
      }
    };
  }

  function indent(state) {
    if (state.indentCount == 0) {
      state.indentCount++;
      var lastScopeOffset = state.scopes[0].offset;
      var currentOffset = lastScopeOffset + config.indentUnit;
      state.scopes.unshift({ offset:currentOffset });
    }
  }

  function dedent(state) {
    if (state.scopes.length == 1) return;

    state.scopes.shift();
  }

  function tokenBase(stream, state) {
    var ch = stream.peek();

    // Comment
    if (stream.match("/*")) {
      state.tokenizer = comment(stream.indentation(), true);
      return state.tokenizer(stream, state);
    }
    if (stream.match("//")) {
      state.tokenizer = comment(stream.indentation(), false);
      return state.tokenizer(stream, state);
    }

    // Interpolation
    if (stream.match("#{")) {
      state.tokenizer = buildInterpolationTokenizer(tokenBase);
      return "operator";
    }

    // Strings
    if (ch === '"' || ch === "'") {
      stream.next();
      state.tokenizer = buildStringTokenizer(ch);
      return "string";
    }

    if(!state.cursorHalf){// state.cursorHalf === 0
    // first half i.e. before : for key-value pairs
    // including selectors

      if (ch === "-") {
        if (stream.match(/^-\w+-/)) {
          return "meta";
        }
      }

      if (ch === ".") {
        stream.next();
        if (stream.match(/^[\w-]+/)) {
          indent(state);
          return "qualifier";
        } else if (stream.peek() === "#") {
          indent(state);
          return "tag";
        }
      }

      if (ch === "#") {
        stream.next();
        // ID selectors
        if (stream.match(/^[\w-]+/)) {
          indent(state);
          return "builtin";
        }
        if (stream.peek() === "#") {
          indent(state);
          return "tag";
        }
      }

      // Variables
      if (ch === "$") {
        stream.next();
        stream.eatWhile(/[\w-]/);
        return "variable-2";
      }

      // Numbers
      if (stream.match(/^-?[0-9\.]+/))
        return "number";

      // Units
      if (stream.match(/^(px|em|in)\b/))
        return "unit";

      if (stream.match(keywordsRegexp))
        return "keyword";

      if (stream.match(/^url/) && stream.peek() === "(") {
        state.tokenizer = urlTokens;
        return "atom";
      }

      if (ch === "=") {
        // Match shortcut mixin definition
        if (stream.match(/^=[\w-]+/)) {
          indent(state);
          return "meta";
        }
      }

      if (ch === "+") {
        // Match shortcut mixin definition
        if (stream.match(/^\+[\w-]+/)){
          return "variable-3";
        }
      }

      if(ch === "@"){
        if(stream.match(/@extend/)){
          if(!stream.match(/\s*[\w]/))
            dedent(state);
        }
      }


      // Indent Directives
      if (stream.match(/^@(else if|if|media|else|for|each|while|mixin|function)/)) {
        indent(state);
        return "def";
      }

      // Other Directives
      if (ch === "@") {
        stream.next();
        stream.eatWhile(/[\w-]/);
        return "def";
      }

      if (stream.eatWhile(/[\w-]/)){
        if(stream.match(/ *: *[\w-\+\$#!\("']/,false)){
          word = stream.current().toLowerCase();
          var prop = state.prevProp + "-" + word;
          if (propertyKeywords.hasOwnProperty(prop)) {
            return "property";
          } else if (propertyKeywords.hasOwnProperty(word)) {
            state.prevProp = word;
            return "property";
          } else if (fontProperties.hasOwnProperty(word)) {
            return "property";
          }
          return "tag";
        }
        else if(stream.match(/ *:/,false)){
          indent(state);
          state.cursorHalf = 1;
          state.prevProp = stream.current().toLowerCase();
          return "property";
        }
        else if(stream.match(/ *,/,false)){
          return "tag";
        }
        else{
          indent(state);
          return "tag";
        }
      }

      if(ch === ":"){
        if (stream.match(pseudoElementsRegexp)){ // could be a pseudo-element
          return "variable-3";
        }
        stream.next();
        state.cursorHalf=1;
        return "operator";
      }

    } // cursorHalf===0 ends here
    else{

      if (ch === "#") {
        stream.next();
        // Hex numbers
        if (stream.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)){
          if (isEndLine(stream)) {
            state.cursorHalf = 0;
          }
          return "number";
        }
      }

      // Numbers
      if (stream.match(/^-?[0-9\.]+/)){
        if (isEndLine(stream)) {
          state.cursorHalf = 0;
        }
        return "number";
      }

      // Units
      if (stream.match(/^(px|em|in)\b/)){
        if (isEndLine(stream)) {
          state.cursorHalf = 0;
        }
        return "unit";
      }

      if (stream.match(keywordsRegexp)){
        if (isEndLine(stream)) {
          state.cursorHalf = 0;
        }
        return "keyword";
      }

      if (stream.match(/^url/) && stream.peek() === "(") {
        state.tokenizer = urlTokens;
        if (isEndLine(stream)) {
          state.cursorHalf = 0;
        }
        return "atom";
      }

      // Variables
      if (ch === "$") {
        stream.next();
        stream.eatWhile(/[\w-]/);
        if (isEndLine(stream)) {
          state.cursorHalf = 0;
        }
        return "variable-2";
      }

      // bang character for !important, !default, etc.
      if (ch === "!") {
        stream.next();
        state.cursorHalf = 0;
        return stream.match(/^[\w]+/) ? "keyword": "operator";
      }

      if (stream.match(opRegexp)){
        if (isEndLine(stream)) {
          state.cursorHalf = 0;
        }
        return "operator";
      }

      // attributes
      if (stream.eatWhile(/[\w-]/)) {
        if (isEndLine(stream)) {
          state.cursorHalf = 0;
        }
        word = stream.current().toLowerCase();
        if (valueKeywords.hasOwnProperty(word)) {
          return "atom";
        } else if (colorKeywords.hasOwnProperty(word)) {
          return "keyword";
        } else if (propertyKeywords.hasOwnProperty(word)) {
          state.prevProp = stream.current().toLowerCase();
          return "property";
        } else {
          return "tag";
        }
      }

      //stream.eatSpace();
      if (isEndLine(stream)) {
        state.cursorHalf = 0;
        return null;
      }

    } // else ends here

    if (stream.match(opRegexp))
      return "operator";

    // If we haven't returned by now, we move 1 character
    // and return an error
    stream.next();
    return null;
  }

  function tokenLexer(stream, state) {
    if (stream.sol()) state.indentCount = 0;
    var style = state.tokenizer(stream, state);
    var current = stream.current();

    if (current === "@return" || current === "}"){
      dedent(state);
    }

    if (style !== null) {
      var startOfToken = stream.pos - current.length;

      var withCurrentIndent = startOfToken + (config.indentUnit * state.indentCount);

      var newScopes = [];

      for (var i = 0; i < state.scopes.length; i++) {
        var scope = state.scopes[i];

        if (scope.offset <= withCurrentIndent)
          newScopes.push(scope);
      }

      state.scopes = newScopes;
    }


    return style;
  }

  return {
    startState: function() {
      return {
        tokenizer: tokenBase,
        scopes: [{offset: 0, type: "sass"}],
        indentCount: 0,
        cursorHalf: 0,  // cursor half tells us if cursor lies after (1)
                        // or before (0) colon (well... more or less)
        definedVars: [],
        definedMixins: []
      };
    },
    token: function(stream, state) {
      var style = tokenLexer(stream, state);

      state.lastToken = { style: style, content: stream.current() };

      return style;
    },

    indent: function(state) {
      return state.scopes[0].offset;
    }
  };
}, "css");

CodeMirror.defineMIME("text/x-sass", "sass");

});


/***/ }),

/***/ "1be4":
/***/ (function(module, exports, __webpack_require__) {

var getBuiltIn = __webpack_require__("d066");

module.exports = getBuiltIn('document', 'documentElement');


/***/ }),

/***/ "1c0b":
/***/ (function(module, exports) {

module.exports = function (it) {
  if (typeof it != 'function') {
    throw TypeError(String(it) + ' is not a function');
  } return it;
};


/***/ }),

/***/ "1c7e":
/***/ (function(module, exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__("b622");

var ITERATOR = wellKnownSymbol('iterator');
var SAFE_CLOSING = false;

try {
  var called = 0;
  var iteratorWithReturn = {
    next: function () {
      return { done: !!called++ };
    },
    'return': function () {
      SAFE_CLOSING = true;
    }
  };
  iteratorWithReturn[ITERATOR] = function () {
    return this;
  };
  // eslint-disable-next-line no-throw-literal
  Array.from(iteratorWithReturn, function () { throw 2; });
} catch (error) { /* empty */ }

module.exports = function (exec, SKIP_CLOSING) {
  if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
  var ITERATION_SUPPORT = false;
  try {
    var object = {};
    object[ITERATOR] = function () {
      return {
        next: function () {
          return { done: ITERATION_SUPPORT = true };
        }
      };
    };
    exec(object);
  } catch (error) { /* empty */ }
  return ITERATION_SUPPORT;
};


/***/ }),

/***/ "1c97":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "1cdc":
/***/ (function(module, exports, __webpack_require__) {

var userAgent = __webpack_require__("342f");

module.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent);


/***/ }),

/***/ "1cfa":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "1d2b":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


module.exports = function bind(fn, thisArg) {
  return function wrap() {
    var args = new Array(arguments.length);
    for (var i = 0; i < args.length; i++) {
      args[i] = arguments[i];
    }
    return fn.apply(thisArg, args);
  };
};


/***/ }),

/***/ "1d80":
/***/ (function(module, exports) {

// `RequireObjectCoercible` abstract operation
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
module.exports = function (it) {
  if (it == undefined) throw TypeError("Can't call method on " + it);
  return it;
};


/***/ }),

/***/ "1dde":
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__("d039");
var wellKnownSymbol = __webpack_require__("b622");
var V8_VERSION = __webpack_require__("2d00");

var SPECIES = wellKnownSymbol('species');

module.exports = function (METHOD_NAME) {
  // We can't use this feature detection in V8 since it causes
  // deoptimization and serious performance degradation
  // https://github.com/zloirock/core-js/issues/677
  return V8_VERSION >= 51 || !fails(function () {
    var array = [];
    var constructor = array.constructor = {};
    constructor[SPECIES] = function () {
      return { foo: 1 };
    };
    return array[METHOD_NAME](Boolean).foo !== 1;
  });
};


/***/ }),

/***/ "202b":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "219c":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__("ebb5");

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var $sort = [].sort;

// `%TypedArray%.prototype.sort` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.sort
exportTypedArrayMethod('sort', function sort(comparefn) {
  return $sort.call(aTypedArray(this), comparefn);
});


/***/ }),

/***/ "21cc":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_code_helper_vue_vue_type_style_index_0_id_d8359e1e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b233");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_code_helper_vue_vue_type_style_index_0_id_d8359e1e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_code_helper_vue_vue_type_style_index_0_id_d8359e1e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_code_helper_vue_vue_type_style_index_0_id_d8359e1e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "2266":
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__("825a");
var isArrayIteratorMethod = __webpack_require__("e95a");
var toLength = __webpack_require__("50c4");
var bind = __webpack_require__("0366");
var getIteratorMethod = __webpack_require__("35a1");
var callWithSafeIterationClosing = __webpack_require__("9bdd");

var Result = function (stopped, result) {
  this.stopped = stopped;
  this.result = result;
};

var iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {
  var boundFunction = bind(fn, that, AS_ENTRIES ? 2 : 1);
  var iterator, iterFn, index, length, result, next, step;

  if (IS_ITERATOR) {
    iterator = iterable;
  } else {
    iterFn = getIteratorMethod(iterable);
    if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
    // optimisation for array iterators
    if (isArrayIteratorMethod(iterFn)) {
      for (index = 0, length = toLength(iterable.length); length > index; index++) {
        result = AS_ENTRIES
          ? boundFunction(anObject(step = iterable[index])[0], step[1])
          : boundFunction(iterable[index]);
        if (result && result instanceof Result) return result;
      } return new Result(false);
    }
    iterator = iterFn.call(iterable);
  }

  next = iterator.next;
  while (!(step = next.call(iterator)).done) {
    result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES);
    if (typeof result == 'object' && result && result instanceof Result) return result;
  } return new Result(false);
};

iterate.stop = function (result) {
  return new Result(true, result);
};


/***/ }),

/***/ "22c0":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_color_picker_vue_vue_type_style_index_1_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8b00");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_color_picker_vue_vue_type_style_index_1_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_color_picker_vue_vue_type_style_index_1_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_color_picker_vue_vue_type_style_index_1_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "2366":
/***/ (function(module, exports) {

/**
 * Convert array of 16 byte values to UUID string format of the form:
 * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
 */
var byteToHex = [];
for (var i = 0; i < 256; ++i) {
  byteToHex[i] = (i + 0x100).toString(16).substr(1);
}

function bytesToUuid(buf, offset) {
  var i = offset || 0;
  var bth = byteToHex;
  // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
  return ([
    bth[buf[i++]], bth[buf[i++]],
    bth[buf[i++]], bth[buf[i++]], '-',
    bth[buf[i++]], bth[buf[i++]], '-',
    bth[buf[i++]], bth[buf[i++]], '-',
    bth[buf[i++]], bth[buf[i++]], '-',
    bth[buf[i++]], bth[buf[i++]],
    bth[buf[i++]], bth[buf[i++]],
    bth[buf[i++]], bth[buf[i++]]
  ]).join('');
}

module.exports = bytesToUuid;


/***/ }),

/***/ "23cb":
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__("a691");

var max = Math.max;
var min = Math.min;

// Helper for a popular repeating case of the spec:
// Let integer be ? ToInteger(index).
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
module.exports = function (index, length) {
  var integer = toInteger(index);
  return integer < 0 ? max(integer + length, 0) : min(integer, length);
};


/***/ }),

/***/ "23dc":
/***/ (function(module, exports, __webpack_require__) {

var setToStringTag = __webpack_require__("d44e");

// Math[@@toStringTag] property
// https://tc39.github.io/ecma262/#sec-math-@@tostringtag
setToStringTag(Math, 'Math', true);


/***/ }),

/***/ "23e7":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var getOwnPropertyDescriptor = __webpack_require__("06cf").f;
var createNonEnumerableProperty = __webpack_require__("9112");
var redefine = __webpack_require__("6eeb");
var setGlobal = __webpack_require__("ce4e");
var copyConstructorProperties = __webpack_require__("e893");
var isForced = __webpack_require__("94ca");

/*
  options.target      - name of the target object
  options.global      - target is the global object
  options.stat        - export as static methods of target
  options.proto       - export as prototype methods of target
  options.real        - real prototype method for the `pure` version
  options.forced      - export even if the native feature is available
  options.bind        - bind methods to the target, required for the `pure` version
  options.wrap        - wrap constructors to preventing global pollution, required for the `pure` version
  options.unsafe      - use the simple assignment of property instead of delete + defineProperty
  options.sham        - add a flag to not completely full polyfills
  options.enumerable  - export as enumerable property
  options.noTargetGet - prevent calling a getter on target
*/
module.exports = function (options, source) {
  var TARGET = options.target;
  var GLOBAL = options.global;
  var STATIC = options.stat;
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  if (GLOBAL) {
    target = global;
  } else if (STATIC) {
    target = global[TARGET] || setGlobal(TARGET, {});
  } else {
    target = (global[TARGET] || {}).prototype;
  }
  if (target) for (key in source) {
    sourceProperty = source[key];
    if (options.noTargetGet) {
      descriptor = getOwnPropertyDescriptor(target, key);
      targetProperty = descriptor && descriptor.value;
    } else targetProperty = target[key];
    FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
    // contained in target
    if (!FORCED && targetProperty !== undefined) {
      if (typeof sourceProperty === typeof targetProperty) continue;
      copyConstructorProperties(sourceProperty, targetProperty);
    }
    // add a flag to not completely full polyfills
    if (options.sham || (targetProperty && targetProperty.sham)) {
      createNonEnumerableProperty(sourceProperty, 'sham', true);
    }
    // extend global
    redefine(target, key, sourceProperty, options);
  }
};


/***/ }),

/***/ "241c":
/***/ (function(module, exports, __webpack_require__) {

var internalObjectKeys = __webpack_require__("ca84");
var enumBugKeys = __webpack_require__("7839");

var hiddenKeys = enumBugKeys.concat('length', 'prototype');

// `Object.getOwnPropertyNames` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  return internalObjectKeys(O, hiddenKeys);
};


/***/ }),

/***/ "2444":
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(process) {

var utils = __webpack_require__("c532");
var normalizeHeaderName = __webpack_require__("c8af");

var DEFAULT_CONTENT_TYPE = {
  'Content-Type': 'application/x-www-form-urlencoded'
};

function setContentTypeIfUnset(headers, value) {
  if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
    headers['Content-Type'] = value;
  }
}

function getDefaultAdapter() {
  var adapter;
  if (typeof XMLHttpRequest !== 'undefined') {
    // For browsers use XHR adapter
    adapter = __webpack_require__("b50d");
  } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
    // For node use HTTP adapter
    adapter = __webpack_require__("b50d");
  }
  return adapter;
}

var defaults = {
  adapter: getDefaultAdapter(),

  transformRequest: [function transformRequest(data, headers) {
    normalizeHeaderName(headers, 'Accept');
    normalizeHeaderName(headers, 'Content-Type');
    if (utils.isFormData(data) ||
      utils.isArrayBuffer(data) ||
      utils.isBuffer(data) ||
      utils.isStream(data) ||
      utils.isFile(data) ||
      utils.isBlob(data)
    ) {
      return data;
    }
    if (utils.isArrayBufferView(data)) {
      return data.buffer;
    }
    if (utils.isURLSearchParams(data)) {
      setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
      return data.toString();
    }
    if (utils.isObject(data)) {
      setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
      return JSON.stringify(data);
    }
    return data;
  }],

  transformResponse: [function transformResponse(data) {
    /*eslint no-param-reassign:0*/
    if (typeof data === 'string') {
      try {
        data = JSON.parse(data);
      } catch (e) { /* Ignore */ }
    }
    return data;
  }],

  /**
   * A timeout in milliseconds to abort a request. If set to 0 (default) a
   * timeout is not created.
   */
  timeout: 0,

  xsrfCookieName: 'XSRF-TOKEN',
  xsrfHeaderName: 'X-XSRF-TOKEN',

  maxContentLength: -1,
  maxBodyLength: -1,

  validateStatus: function validateStatus(status) {
    return status >= 200 && status < 300;
  }
};

defaults.headers = {
  common: {
    'Accept': 'application/json, text/plain, */*'
  }
};

utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
  defaults.headers[method] = {};
});

utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
});

module.exports = defaults;

/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("4362")))

/***/ }),

/***/ "2532":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var notARegExp = __webpack_require__("5a34");
var requireObjectCoercible = __webpack_require__("1d80");
var correctIsRegExpLogic = __webpack_require__("ab13");

// `String.prototype.includes` method
// https://tc39.github.io/ecma262/#sec-string.prototype.includes
$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
  includes: function includes(searchString /* , position = 0 */) {
    return !!~String(requireObjectCoercible(this))
      .indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),

/***/ "25a1":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__("ebb5");
var $reduceRight = __webpack_require__("d58f").right;

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

// `%TypedArray%.prototype.reduceRicht` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reduceright
exportTypedArrayMethod('reduceRight', function reduceRight(callbackfn /* , initialValue */) {
  return $reduceRight(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
});


/***/ }),

/***/ "25f0":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var redefine = __webpack_require__("6eeb");
var anObject = __webpack_require__("825a");
var fails = __webpack_require__("d039");
var flags = __webpack_require__("ad6d");

var TO_STRING = 'toString';
var RegExpPrototype = RegExp.prototype;
var nativeToString = RegExpPrototype[TO_STRING];

var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
// FF44- RegExp#toString has a wrong name
var INCORRECT_NAME = nativeToString.name != TO_STRING;

// `RegExp.prototype.toString` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring
if (NOT_GENERIC || INCORRECT_NAME) {
  redefine(RegExp.prototype, TO_STRING, function toString() {
    var R = anObject(this);
    var p = String(R.source);
    var rf = R.flags;
    var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);
    return '/' + p + '/' + f;
  }, { unsafe: true });
}


/***/ }),

/***/ "2626":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var getBuiltIn = __webpack_require__("d066");
var definePropertyModule = __webpack_require__("9bf2");
var wellKnownSymbol = __webpack_require__("b622");
var DESCRIPTORS = __webpack_require__("83ab");

var SPECIES = wellKnownSymbol('species');

module.exports = function (CONSTRUCTOR_NAME) {
  var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
  var defineProperty = definePropertyModule.f;

  if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
    defineProperty(Constructor, SPECIES, {
      configurable: true,
      get: function () { return this; }
    });
  }
};


/***/ }),

/***/ "2638":
/***/ (function(module, exports, __webpack_require__) {

"use strict";
function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}var normalMerge=["attrs","props","domProps"],toArrayMerge=["class","style","directives"],functionalMerge=["on","nativeOn"],mergeJsxProps=function(a){return a.reduce(function(c,a){for(var b in a)if(!c[b])c[b]=a[b];else if(-1!==normalMerge.indexOf(b))c[b]=_extends({},c[b],a[b]);else if(-1!==toArrayMerge.indexOf(b)){var d=c[b]instanceof Array?c[b]:[c[b]],e=a[b]instanceof Array?a[b]:[a[b]];c[b]=d.concat(e)}else if(-1!==functionalMerge.indexOf(b)){for(var f in a[b])if(c[b][f]){var g=c[b][f]instanceof Array?c[b][f]:[c[b][f]],h=a[b][f]instanceof Array?a[b][f]:[a[b][f]];c[b][f]=g.concat(h)}else c[b][f]=a[b][f];}else if("hook"==b)for(var i in a[b])c[b][i]=c[b][i]?mergeFn(c[b][i],a[b][i]):a[b][i];else c[b]=a[b];return c},{})},mergeFn=function(a,b){return function(){a&&a.apply(this,arguments),b&&b.apply(this,arguments)}};module.exports=mergeJsxProps;


/***/ }),

/***/ "26dd":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var create = __webpack_require__("6f4f");
var descriptor = __webpack_require__("10db");
var setToStringTag = __webpack_require__("92f0");
var IteratorPrototype = {};

// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
__webpack_require__("051b")(IteratorPrototype, __webpack_require__("cc15")('iterator'), function () { return this; });

module.exports = function (Constructor, NAME, next) {
  Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
  setToStringTag(Constructor, NAME + ' Iterator');
};


/***/ }),

/***/ "2877":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
/* globals __VUE_SSR_CONTEXT__ */

// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.

function normalizeComponent (
  scriptExports,
  render,
  staticRenderFns,
  functionalTemplate,
  injectStyles,
  scopeId,
  moduleIdentifier, /* server only */
  shadowMode /* vue-cli only */
) {
  // Vue.extend constructor export interop
  var options = typeof scriptExports === 'function'
    ? scriptExports.options
    : scriptExports

  // render functions
  if (render) {
    options.render = render
    options.staticRenderFns = staticRenderFns
    options._compiled = true
  }

  // functional template
  if (functionalTemplate) {
    options.functional = true
  }

  // scopedId
  if (scopeId) {
    options._scopeId = 'data-v-' + scopeId
  }

  var hook
  if (moduleIdentifier) { // server build
    hook = function (context) {
      // 2.3 injection
      context =
        context || // cached call
        (this.$vnode && this.$vnode.ssrContext) || // stateful
        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
      // 2.2 with runInNewContext: true
      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
        context = __VUE_SSR_CONTEXT__
      }
      // inject component styles
      if (injectStyles) {
        injectStyles.call(this, context)
      }
      // register component module identifier for async chunk inferrence
      if (context && context._registeredComponents) {
        context._registeredComponents.add(moduleIdentifier)
      }
    }
    // used by ssr in case component is cached and beforeCreate
    // never gets called
    options._ssrRegister = hook
  } else if (injectStyles) {
    hook = shadowMode
      ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
      : injectStyles
  }

  if (hook) {
    if (options.functional) {
      // for template-only hot-reload because in that case the render fn doesn't
      // go through the normalizer
      options._injectStyles = hook
      // register for functional component in vue file
      var originalRender = options.render
      options.render = function renderWithStyleInjection (h, context) {
        hook.call(context)
        return originalRender(h, context)
      }
    } else {
      // inject component registration as beforeCreate hook
      var existing = options.beforeCreate
      options.beforeCreate = existing
        ? [].concat(existing, hook)
        : [hook]
    }
  }

  return {
    exports: scriptExports,
    options: options
  }
}


/***/ }),

/***/ "2909":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";

// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
var arrayLikeToArray = __webpack_require__("6b75");

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

function _arrayWithoutHoles(arr) {
  if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
}
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.js
var es_symbol = __webpack_require__("a4d3");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.description.js
var es_symbol_description = __webpack_require__("e01a");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.iterator.js
var es_symbol_iterator = __webpack_require__("d28b");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.from.js
var es_array_from = __webpack_require__("a630");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
var es_array_iterator = __webpack_require__("e260");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js
var es_object_to_string = __webpack_require__("d3b7");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.iterator.js
var es_string_iterator = __webpack_require__("3ca3");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.iterator.js
var web_dom_collections_iterator = __webpack_require__("ddb0");

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








function _iterableToArray(iter) {
  if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
}
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
var unsupportedIterableToArray = __webpack_require__("06c5");

// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() {
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js




function _toConsumableArray(arr) {
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
}

/***/ }),

/***/ "2954":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__("ebb5");
var speciesConstructor = __webpack_require__("4840");
var fails = __webpack_require__("d039");

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var $slice = [].slice;

var FORCED = fails(function () {
  // eslint-disable-next-line no-undef
  new Int8Array(1).slice();
});

// `%TypedArray%.prototype.slice` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.slice
exportTypedArrayMethod('slice', function slice(start, end) {
  var list = $slice.call(aTypedArray(this), start, end);
  var C = speciesConstructor(this, this.constructor);
  var index = 0;
  var length = list.length;
  var result = new (aTypedArrayConstructor(C))(length);
  while (length > index) result[index] = list[index++];
  return result;
}, FORCED);


/***/ }),

/***/ "299c":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("944a");

__webpack_require__("b0c0");

__webpack_require__("0c47");

__webpack_require__("23dc");

__webpack_require__("a9e3");

__webpack_require__("d3b7");

__webpack_require__("ac1f");

__webpack_require__("5319");

var _typeof = __webpack_require__("7037");

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

  /******/

  /******/
  // Load entry module and return exports

  /******/

  return __webpack_require__(__webpack_require__.s = 131);
  /******/
}(
/************************************************************************/

/******/
{
  /***/
  131:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__); // EXTERNAL MODULE: external "element-ui/lib/utils/vue-popper"


    var vue_popper_ = __webpack_require__(5);

    var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_); // EXTERNAL MODULE: external "throttle-debounce/debounce"


    var debounce_ = __webpack_require__(17);

    var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce_); // EXTERNAL MODULE: external "element-ui/lib/utils/dom"


    var dom_ = __webpack_require__(2); // EXTERNAL MODULE: external "element-ui/lib/utils/util"


    var util_ = __webpack_require__(3); // EXTERNAL MODULE: external "vue"


    var external_vue_ = __webpack_require__(7);

    var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_); // CONCATENATED MODULE: ./packages/tooltip/src/main.js

    /* harmony default export */


    var main = {
      name: 'ElTooltip',
      mixins: [vue_popper_default.a],
      props: {
        openDelay: {
          type: Number,
          default: 0
        },
        disabled: Boolean,
        manual: Boolean,
        effect: {
          type: String,
          default: 'dark'
        },
        arrowOffset: {
          type: Number,
          default: 0
        },
        popperClass: String,
        content: String,
        visibleArrow: {
          default: true
        },
        transition: {
          type: String,
          default: 'el-fade-in-linear'
        },
        popperOptions: {
          default: function _default() {
            return {
              boundariesPadding: 10,
              gpuAcceleration: false
            };
          }
        },
        enterable: {
          type: Boolean,
          default: true
        },
        hideAfter: {
          type: Number,
          default: 0
        },
        tabindex: {
          type: Number,
          default: 0
        }
      },
      data: function data() {
        return {
          tooltipId: 'el-tooltip-' + Object(util_["generateId"])(),
          timeoutPending: null,
          focusing: false
        };
      },
      beforeCreate: function beforeCreate() {
        var _this = this;

        if (this.$isServer) return;
        this.popperVM = new external_vue_default.a({
          data: {
            node: ''
          },
          render: function render(h) {
            return this.node;
          }
        }).$mount();
        this.debounceClose = debounce_default()(200, function () {
          return _this.handleClosePopper();
        });
      },
      render: function render(h) {
        var _this2 = this;

        if (this.popperVM) {
          this.popperVM.node = h('transition', {
            attrs: {
              name: this.transition
            },
            on: {
              'afterLeave': this.doDestroy
            }
          }, [h('div', {
            on: {
              'mouseleave': function mouseleave() {
                _this2.setExpectedState(false);

                _this2.debounceClose();
              },
              'mouseenter': function mouseenter() {
                _this2.setExpectedState(true);
              }
            },
            ref: 'popper',
            attrs: {
              role: 'tooltip',
              id: this.tooltipId,
              'aria-hidden': this.disabled || !this.showPopper ? 'true' : 'false'
            },
            directives: [{
              name: 'show',
              value: !this.disabled && this.showPopper
            }],
            'class': ['el-tooltip__popper', 'is-' + this.effect, this.popperClass]
          }, [this.$slots.content || this.content])]);
        }

        var firstElement = this.getFirstElement();
        if (!firstElement) return null;
        var data = firstElement.data = firstElement.data || {};
        data.staticClass = this.addTooltipClass(data.staticClass);
        return firstElement;
      },
      mounted: function mounted() {
        var _this3 = this;

        this.referenceElm = this.$el;

        if (this.$el.nodeType === 1) {
          this.$el.setAttribute('aria-describedby', this.tooltipId);
          this.$el.setAttribute('tabindex', this.tabindex);
          Object(dom_["on"])(this.referenceElm, 'mouseenter', this.show);
          Object(dom_["on"])(this.referenceElm, 'mouseleave', this.hide);
          Object(dom_["on"])(this.referenceElm, 'focus', function () {
            if (!_this3.$slots.default || !_this3.$slots.default.length) {
              _this3.handleFocus();

              return;
            }

            var instance = _this3.$slots.default[0].componentInstance;

            if (instance && instance.focus) {
              instance.focus();
            } else {
              _this3.handleFocus();
            }
          });
          Object(dom_["on"])(this.referenceElm, 'blur', this.handleBlur);
          Object(dom_["on"])(this.referenceElm, 'click', this.removeFocusing);
        } // fix issue https://github.com/ElemeFE/element/issues/14424


        if (this.value && this.popperVM) {
          this.popperVM.$nextTick(function () {
            if (_this3.value) {
              _this3.updatePopper();
            }
          });
        }
      },
      watch: {
        focusing: function focusing(val) {
          if (val) {
            Object(dom_["addClass"])(this.referenceElm, 'focusing');
          } else {
            Object(dom_["removeClass"])(this.referenceElm, 'focusing');
          }
        }
      },
      methods: {
        show: function show() {
          this.setExpectedState(true);
          this.handleShowPopper();
        },
        hide: function hide() {
          this.setExpectedState(false);
          this.debounceClose();
        },
        handleFocus: function handleFocus() {
          this.focusing = true;
          this.show();
        },
        handleBlur: function handleBlur() {
          this.focusing = false;
          this.hide();
        },
        removeFocusing: function removeFocusing() {
          this.focusing = false;
        },
        addTooltipClass: function addTooltipClass(prev) {
          if (!prev) {
            return 'el-tooltip';
          } else {
            return 'el-tooltip ' + prev.replace('el-tooltip', '');
          }
        },
        handleShowPopper: function handleShowPopper() {
          var _this4 = this;

          if (!this.expectedState || this.manual) return;
          clearTimeout(this.timeout);
          this.timeout = setTimeout(function () {
            _this4.showPopper = true;
          }, this.openDelay);

          if (this.hideAfter > 0) {
            this.timeoutPending = setTimeout(function () {
              _this4.showPopper = false;
            }, this.hideAfter);
          }
        },
        handleClosePopper: function handleClosePopper() {
          if (this.enterable && this.expectedState || this.manual) return;
          clearTimeout(this.timeout);

          if (this.timeoutPending) {
            clearTimeout(this.timeoutPending);
          }

          this.showPopper = false;

          if (this.disabled) {
            this.doDestroy();
          }
        },
        setExpectedState: function setExpectedState(expectedState) {
          if (expectedState === false) {
            clearTimeout(this.timeoutPending);
          }

          this.expectedState = expectedState;
        },
        getFirstElement: function getFirstElement() {
          var slots = this.$slots.default;
          if (!Array.isArray(slots)) return null;
          var element = null;

          for (var index = 0; index < slots.length; index++) {
            if (slots[index] && slots[index].tag) {
              element = slots[index];
            }

            ;
          }

          return element;
        }
      },
      beforeDestroy: function beforeDestroy() {
        this.popperVM && this.popperVM.$destroy();
      },
      destroyed: function destroyed() {
        var reference = this.referenceElm;

        if (reference.nodeType === 1) {
          Object(dom_["off"])(reference, 'mouseenter', this.show);
          Object(dom_["off"])(reference, 'mouseleave', this.hide);
          Object(dom_["off"])(reference, 'focus', this.handleFocus);
          Object(dom_["off"])(reference, 'blur', this.handleBlur);
          Object(dom_["off"])(reference, 'click', this.removeFocusing);
        }
      }
    }; // CONCATENATED MODULE: ./packages/tooltip/index.js

    /* istanbul ignore next */

    main.install = function (Vue) {
      Vue.component(main.name, main);
    };
    /* harmony default export */


    var tooltip = __webpack_exports__["default"] = main;
    /***/
  },

  /***/
  17:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("0e15");
    /***/
  },

  /***/
  2:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("5924");
    /***/
  },

  /***/
  3:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("8122");
    /***/
  },

  /***/
  5:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("e974");
    /***/
  },

  /***/
  7:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("8bbf");
    /***/
  }
  /******/

});

/***/ }),

/***/ "2a5e":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


__webpack_require__("13d5");

exports.__esModule = true;
exports.default = scrollIntoView;

var _vue = __webpack_require__("8bbf");

var _vue2 = _interopRequireDefault(_vue);

function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    default: obj
  };
}

function scrollIntoView(container, selected) {
  if (_vue2.default.prototype.$isServer) return;

  if (!selected) {
    container.scrollTop = 0;
    return;
  }

  var offsetParents = [];
  var pointer = selected.offsetParent;

  while (pointer && container !== pointer && container.contains(pointer)) {
    offsetParents.push(pointer);
    pointer = pointer.offsetParent;
  }

  var top = selected.offsetTop + offsetParents.reduce(function (prev, curr) {
    return prev + curr.offsetTop;
  }, 0);
  var bottom = top + selected.offsetHeight;
  var viewRectTop = container.scrollTop;
  var viewRectBottom = viewRectTop + container.clientHeight;

  if (top < viewRectTop) {
    container.scrollTop = top;
  } else if (bottom > viewRectBottom) {
    container.scrollTop = bottom - container.clientHeight;
  }
}

/***/ }),

/***/ "2a95":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(process) {function _extends() {
  _extends = Object.assign || function (target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = arguments[i];

      for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          target[key] = source[key];
        }
      }
    }

    return target;
  };

  return _extends.apply(this, arguments);
}

function _inheritsLoose(subClass, superClass) {
  subClass.prototype = Object.create(superClass.prototype);
  subClass.prototype.constructor = subClass;
  subClass.__proto__ = superClass;
}

function _getPrototypeOf(o) {
  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
    return o.__proto__ || Object.getPrototypeOf(o);
  };
  return _getPrototypeOf(o);
}

function _setPrototypeOf(o, p) {
  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
    o.__proto__ = p;
    return o;
  };

  return _setPrototypeOf(o, p);
}

function _isNativeReflectConstruct() {
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  if (Reflect.construct.sham) return false;
  if (typeof Proxy === "function") return true;

  try {
    Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
    return true;
  } catch (e) {
    return false;
  }
}

function _construct(Parent, args, Class) {
  if (_isNativeReflectConstruct()) {
    _construct = Reflect.construct;
  } else {
    _construct = function _construct(Parent, args, Class) {
      var a = [null];
      a.push.apply(a, args);
      var Constructor = Function.bind.apply(Parent, a);
      var instance = new Constructor();
      if (Class) _setPrototypeOf(instance, Class.prototype);
      return instance;
    };
  }

  return _construct.apply(null, arguments);
}

function _isNativeFunction(fn) {
  return Function.toString.call(fn).indexOf("[native code]") !== -1;
}

function _wrapNativeSuper(Class) {
  var _cache = typeof Map === "function" ? new Map() : undefined;

  _wrapNativeSuper = function _wrapNativeSuper(Class) {
    if (Class === null || !_isNativeFunction(Class)) return Class;

    if (typeof Class !== "function") {
      throw new TypeError("Super expression must either be null or a function");
    }

    if (typeof _cache !== "undefined") {
      if (_cache.has(Class)) return _cache.get(Class);

      _cache.set(Class, Wrapper);
    }

    function Wrapper() {
      return _construct(Class, arguments, _getPrototypeOf(this).constructor);
    }

    Wrapper.prototype = Object.create(Class.prototype, {
      constructor: {
        value: Wrapper,
        enumerable: false,
        writable: true,
        configurable: true
      }
    });
    return _setPrototypeOf(Wrapper, Class);
  };

  return _wrapNativeSuper(Class);
}

/* eslint no-console:0 */
var formatRegExp = /%[sdj%]/g;
var warning = function warning() {}; // don't print warning message when in production env or node runtime

if (typeof process !== 'undefined' && Object({"NODE_ENV":"production","BASE_URL":""}) && "production" !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {
  warning = function warning(type, errors) {
    if (typeof console !== 'undefined' && console.warn) {
      if (errors.every(function (e) {
        return typeof e === 'string';
      })) {
        console.warn(type, errors);
      }
    }
  };
}

function convertFieldsError(errors) {
  if (!errors || !errors.length) return null;
  var fields = {};
  errors.forEach(function (error) {
    var field = error.field;
    fields[field] = fields[field] || [];
    fields[field].push(error);
  });
  return fields;
}
function format() {
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
    args[_key] = arguments[_key];
  }

  var i = 1;
  var f = args[0];
  var len = args.length;

  if (typeof f === 'function') {
    return f.apply(null, args.slice(1));
  }

  if (typeof f === 'string') {
    var str = String(f).replace(formatRegExp, function (x) {
      if (x === '%%') {
        return '%';
      }

      if (i >= len) {
        return x;
      }

      switch (x) {
        case '%s':
          return String(args[i++]);

        case '%d':
          return Number(args[i++]);

        case '%j':
          try {
            return JSON.stringify(args[i++]);
          } catch (_) {
            return '[Circular]';
          }

          break;

        default:
          return x;
      }
    });
    return str;
  }

  return f;
}

function isNativeStringType(type) {
  return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'date' || type === 'pattern';
}

function isEmptyValue(value, type) {
  if (value === undefined || value === null) {
    return true;
  }

  if (type === 'array' && Array.isArray(value) && !value.length) {
    return true;
  }

  if (isNativeStringType(type) && typeof value === 'string' && !value) {
    return true;
  }

  return false;
}

function asyncParallelArray(arr, func, callback) {
  var results = [];
  var total = 0;
  var arrLength = arr.length;

  function count(errors) {
    results.push.apply(results, errors);
    total++;

    if (total === arrLength) {
      callback(results);
    }
  }

  arr.forEach(function (a) {
    func(a, count);
  });
}

function asyncSerialArray(arr, func, callback) {
  var index = 0;
  var arrLength = arr.length;

  function next(errors) {
    if (errors && errors.length) {
      callback(errors);
      return;
    }

    var original = index;
    index = index + 1;

    if (original < arrLength) {
      func(arr[original], next);
    } else {
      callback([]);
    }
  }

  next([]);
}

function flattenObjArr(objArr) {
  var ret = [];
  Object.keys(objArr).forEach(function (k) {
    ret.push.apply(ret, objArr[k]);
  });
  return ret;
}

var AsyncValidationError = /*#__PURE__*/function (_Error) {
  _inheritsLoose(AsyncValidationError, _Error);

  function AsyncValidationError(errors, fields) {
    var _this;

    _this = _Error.call(this, 'Async Validation Error') || this;
    _this.errors = errors;
    _this.fields = fields;
    return _this;
  }

  return AsyncValidationError;
}( /*#__PURE__*/_wrapNativeSuper(Error));
function asyncMap(objArr, option, func, callback) {
  if (option.first) {
    var _pending = new Promise(function (resolve, reject) {
      var next = function next(errors) {
        callback(errors);
        return errors.length ? reject(new AsyncValidationError(errors, convertFieldsError(errors))) : resolve();
      };

      var flattenArr = flattenObjArr(objArr);
      asyncSerialArray(flattenArr, func, next);
    });

    _pending["catch"](function (e) {
      return e;
    });

    return _pending;
  }

  var firstFields = option.firstFields || [];

  if (firstFields === true) {
    firstFields = Object.keys(objArr);
  }

  var objArrKeys = Object.keys(objArr);
  var objArrLength = objArrKeys.length;
  var total = 0;
  var results = [];
  var pending = new Promise(function (resolve, reject) {
    var next = function next(errors) {
      results.push.apply(results, errors);
      total++;

      if (total === objArrLength) {
        callback(results);
        return results.length ? reject(new AsyncValidationError(results, convertFieldsError(results))) : resolve();
      }
    };

    if (!objArrKeys.length) {
      callback(results);
      resolve();
    }

    objArrKeys.forEach(function (key) {
      var arr = objArr[key];

      if (firstFields.indexOf(key) !== -1) {
        asyncSerialArray(arr, func, next);
      } else {
        asyncParallelArray(arr, func, next);
      }
    });
  });
  pending["catch"](function (e) {
    return e;
  });
  return pending;
}
function complementError(rule) {
  return function (oe) {
    if (oe && oe.message) {
      oe.field = oe.field || rule.fullField;
      return oe;
    }

    return {
      message: typeof oe === 'function' ? oe() : oe,
      field: oe.field || rule.fullField
    };
  };
}
function deepMerge(target, source) {
  if (source) {
    for (var s in source) {
      if (source.hasOwnProperty(s)) {
        var value = source[s];

        if (typeof value === 'object' && typeof target[s] === 'object') {
          target[s] = _extends(_extends({}, target[s]), value);
        } else {
          target[s] = value;
        }
      }
    }
  }

  return target;
}

/**
 *  Rule for validating required fields.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param source The source object being validated.
 *  @param errors An array of errors that this rule may add
 *  validation errors to.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function required(rule, value, source, errors, options, type) {
  if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
    errors.push(format(options.messages.required, rule.fullField));
  }
}

/**
 *  Rule for validating whitespace.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param source The source object being validated.
 *  @param errors An array of errors that this rule may add
 *  validation errors to.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function whitespace(rule, value, source, errors, options) {
  if (/^\s+$/.test(value) || value === '') {
    errors.push(format(options.messages.whitespace, rule.fullField));
  }
}

/* eslint max-len:0 */

var pattern = {
  // http://emailregex.com/
  email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
  url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", 'i'),
  hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
};
var types = {
  integer: function integer(value) {
    return types.number(value) && parseInt(value, 10) === value;
  },
  "float": function float(value) {
    return types.number(value) && !types.integer(value);
  },
  array: function array(value) {
    return Array.isArray(value);
  },
  regexp: function regexp(value) {
    if (value instanceof RegExp) {
      return true;
    }

    try {
      return !!new RegExp(value);
    } catch (e) {
      return false;
    }
  },
  date: function date(value) {
    return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function' && !isNaN(value.getTime());
  },
  number: function number(value) {
    if (isNaN(value)) {
      return false;
    }

    return typeof value === 'number';
  },
  object: function object(value) {
    return typeof value === 'object' && !types.array(value);
  },
  method: function method(value) {
    return typeof value === 'function';
  },
  email: function email(value) {
    return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
  },
  url: function url(value) {
    return typeof value === 'string' && !!value.match(pattern.url);
  },
  hex: function hex(value) {
    return typeof value === 'string' && !!value.match(pattern.hex);
  }
};
/**
 *  Rule for validating the type of a value.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param source The source object being validated.
 *  @param errors An array of errors that this rule may add
 *  validation errors to.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function type(rule, value, source, errors, options) {
  if (rule.required && value === undefined) {
    required(rule, value, source, errors, options);
    return;
  }

  var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
  var ruleType = rule.type;

  if (custom.indexOf(ruleType) > -1) {
    if (!types[ruleType](value)) {
      errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
    } // straight typeof check

  } else if (ruleType && typeof value !== rule.type) {
    errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  }
}

/**
 *  Rule for validating minimum and maximum allowed values.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param source The source object being validated.
 *  @param errors An array of errors that this rule may add
 *  validation errors to.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function range(rule, value, source, errors, options) {
  var len = typeof rule.len === 'number';
  var min = typeof rule.min === 'number';
  var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字（补充平面Supplementary Plane）

  var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  var val = value;
  var key = null;
  var num = typeof value === 'number';
  var str = typeof value === 'string';
  var arr = Array.isArray(value);

  if (num) {
    key = 'number';
  } else if (str) {
    key = 'string';
  } else if (arr) {
    key = 'array';
  } // if the value is not of a supported type for range validation
  // the validation rule rule should use the
  // type property to also test for a particular type


  if (!key) {
    return false;
  }

  if (arr) {
    val = value.length;
  }

  if (str) {
    // 处理码点大于U+010000的文字length属性不准确的bug，如"𠮷𠮷𠮷".lenght !== 3
    val = value.replace(spRegexp, '_').length;
  }

  if (len) {
    if (val !== rule.len) {
      errors.push(format(options.messages[key].len, rule.fullField, rule.len));
    }
  } else if (min && !max && val < rule.min) {
    errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  } else if (max && !min && val > rule.max) {
    errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  } else if (min && max && (val < rule.min || val > rule.max)) {
    errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  }
}

var ENUM = 'enum';
/**
 *  Rule for validating a value exists in an enumerable list.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param source The source object being validated.
 *  @param errors An array of errors that this rule may add
 *  validation errors to.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function enumerable(rule, value, source, errors, options) {
  rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];

  if (rule[ENUM].indexOf(value) === -1) {
    errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
  }
}

/**
 *  Rule for validating a regular expression pattern.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param source The source object being validated.
 *  @param errors An array of errors that this rule may add
 *  validation errors to.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function pattern$1(rule, value, source, errors, options) {
  if (rule.pattern) {
    if (rule.pattern instanceof RegExp) {
      // if a RegExp instance is passed, reset `lastIndex` in case its `global`
      // flag is accidentally set to `true`, which in a validation scenario
      // is not necessary and the result might be misleading
      rule.pattern.lastIndex = 0;

      if (!rule.pattern.test(value)) {
        errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
      }
    } else if (typeof rule.pattern === 'string') {
      var _pattern = new RegExp(rule.pattern);

      if (!_pattern.test(value)) {
        errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
      }
    }
  }
}

var rules = {
  required: required,
  whitespace: whitespace,
  type: type,
  range: range,
  "enum": enumerable,
  pattern: pattern$1
};

/**
 *  Performs validation for string types.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function string(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value, 'string') && !rule.required) {
      return callback();
    }

    rules.required(rule, value, source, errors, options, 'string');

    if (!isEmptyValue(value, 'string')) {
      rules.type(rule, value, source, errors, options);
      rules.range(rule, value, source, errors, options);
      rules.pattern(rule, value, source, errors, options);

      if (rule.whitespace === true) {
        rules.whitespace(rule, value, source, errors, options);
      }
    }
  }

  callback(errors);
}

/**
 *  Validates a function.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function method(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value) && !rule.required) {
      return callback();
    }

    rules.required(rule, value, source, errors, options);

    if (value !== undefined) {
      rules.type(rule, value, source, errors, options);
    }
  }

  callback(errors);
}

/**
 *  Validates a number.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function number(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (value === '') {
      value = undefined;
    }

    if (isEmptyValue(value) && !rule.required) {
      return callback();
    }

    rules.required(rule, value, source, errors, options);

    if (value !== undefined) {
      rules.type(rule, value, source, errors, options);
      rules.range(rule, value, source, errors, options);
    }
  }

  callback(errors);
}

/**
 *  Validates a boolean.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function _boolean(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value) && !rule.required) {
      return callback();
    }

    rules.required(rule, value, source, errors, options);

    if (value !== undefined) {
      rules.type(rule, value, source, errors, options);
    }
  }

  callback(errors);
}

/**
 *  Validates the regular expression type.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function regexp(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value) && !rule.required) {
      return callback();
    }

    rules.required(rule, value, source, errors, options);

    if (!isEmptyValue(value)) {
      rules.type(rule, value, source, errors, options);
    }
  }

  callback(errors);
}

/**
 *  Validates a number is an integer.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function integer(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value) && !rule.required) {
      return callback();
    }

    rules.required(rule, value, source, errors, options);

    if (value !== undefined) {
      rules.type(rule, value, source, errors, options);
      rules.range(rule, value, source, errors, options);
    }
  }

  callback(errors);
}

/**
 *  Validates a number is a floating point number.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function floatFn(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value) && !rule.required) {
      return callback();
    }

    rules.required(rule, value, source, errors, options);

    if (value !== undefined) {
      rules.type(rule, value, source, errors, options);
      rules.range(rule, value, source, errors, options);
    }
  }

  callback(errors);
}

/**
 *  Validates an array.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function array(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value, 'array') && !rule.required) {
      return callback();
    }

    rules.required(rule, value, source, errors, options, 'array');

    if (!isEmptyValue(value, 'array')) {
      rules.type(rule, value, source, errors, options);
      rules.range(rule, value, source, errors, options);
    }
  }

  callback(errors);
}

/**
 *  Validates an object.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function object(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value) && !rule.required) {
      return callback();
    }

    rules.required(rule, value, source, errors, options);

    if (value !== undefined) {
      rules.type(rule, value, source, errors, options);
    }
  }

  callback(errors);
}

var ENUM$1 = 'enum';
/**
 *  Validates an enumerable list.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function enumerable$1(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value) && !rule.required) {
      return callback();
    }

    rules.required(rule, value, source, errors, options);

    if (value !== undefined) {
      rules[ENUM$1](rule, value, source, errors, options);
    }
  }

  callback(errors);
}

/**
 *  Validates a regular expression pattern.
 *
 *  Performs validation when a rule only contains
 *  a pattern property but is not declared as a string type.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function pattern$2(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value, 'string') && !rule.required) {
      return callback();
    }

    rules.required(rule, value, source, errors, options);

    if (!isEmptyValue(value, 'string')) {
      rules.pattern(rule, value, source, errors, options);
    }
  }

  callback(errors);
}

function date(rule, value, callback, source, options) {
  // console.log('integer rule called %j', rule);
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); // console.log('validate on %s value', value);

  if (validate) {
    if (isEmptyValue(value, 'date') && !rule.required) {
      return callback();
    }

    rules.required(rule, value, source, errors, options);

    if (!isEmptyValue(value, 'date')) {
      var dateObject;

      if (value instanceof Date) {
        dateObject = value;
      } else {
        dateObject = new Date(value);
      }

      rules.type(rule, dateObject, source, errors, options);

      if (dateObject) {
        rules.range(rule, dateObject.getTime(), source, errors, options);
      }
    }
  }

  callback(errors);
}

function required$1(rule, value, callback, source, options) {
  var errors = [];
  var type = Array.isArray(value) ? 'array' : typeof value;
  rules.required(rule, value, source, errors, options, type);
  callback(errors);
}

function type$1(rule, value, callback, source, options) {
  var ruleType = rule.type;
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value, ruleType) && !rule.required) {
      return callback();
    }

    rules.required(rule, value, source, errors, options, ruleType);

    if (!isEmptyValue(value, ruleType)) {
      rules.type(rule, value, source, errors, options);
    }
  }

  callback(errors);
}

/**
 *  Performs validation for any type.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function any(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value) && !rule.required) {
      return callback();
    }

    rules.required(rule, value, source, errors, options);
  }

  callback(errors);
}

var validators = {
  string: string,
  method: method,
  number: number,
  "boolean": _boolean,
  regexp: regexp,
  integer: integer,
  "float": floatFn,
  array: array,
  object: object,
  "enum": enumerable$1,
  pattern: pattern$2,
  date: date,
  url: type$1,
  hex: type$1,
  email: type$1,
  required: required$1,
  any: any
};

function newMessages() {
  return {
    "default": 'Validation error on field %s',
    required: '%s is required',
    "enum": '%s must be one of %s',
    whitespace: '%s cannot be empty',
    date: {
      format: '%s date %s is invalid for format %s',
      parse: '%s date could not be parsed, %s is invalid ',
      invalid: '%s date %s is invalid'
    },
    types: {
      string: '%s is not a %s',
      method: '%s is not a %s (function)',
      array: '%s is not an %s',
      object: '%s is not an %s',
      number: '%s is not a %s',
      date: '%s is not a %s',
      "boolean": '%s is not a %s',
      integer: '%s is not an %s',
      "float": '%s is not a %s',
      regexp: '%s is not a valid %s',
      email: '%s is not a valid %s',
      url: '%s is not a valid %s',
      hex: '%s is not a valid %s'
    },
    string: {
      len: '%s must be exactly %s characters',
      min: '%s must be at least %s characters',
      max: '%s cannot be longer than %s characters',
      range: '%s must be between %s and %s characters'
    },
    number: {
      len: '%s must equal %s',
      min: '%s cannot be less than %s',
      max: '%s cannot be greater than %s',
      range: '%s must be between %s and %s'
    },
    array: {
      len: '%s must be exactly %s in length',
      min: '%s cannot be less than %s in length',
      max: '%s cannot be greater than %s in length',
      range: '%s must be between %s and %s in length'
    },
    pattern: {
      mismatch: '%s value %s does not match pattern %s'
    },
    clone: function clone() {
      var cloned = JSON.parse(JSON.stringify(this));
      cloned.clone = this.clone;
      return cloned;
    }
  };
}
var messages = newMessages();

/**
 *  Encapsulates a validation schema.
 *
 *  @param descriptor An object declaring validation rules
 *  for this schema.
 */

function Schema(descriptor) {
  this.rules = null;
  this._messages = messages;
  this.define(descriptor);
}

Schema.prototype = {
  messages: function messages(_messages) {
    if (_messages) {
      this._messages = deepMerge(newMessages(), _messages);
    }

    return this._messages;
  },
  define: function define(rules) {
    if (!rules) {
      throw new Error('Cannot configure a schema with no rules');
    }

    if (typeof rules !== 'object' || Array.isArray(rules)) {
      throw new Error('Rules must be an object');
    }

    this.rules = {};
    var z;
    var item;

    for (z in rules) {
      if (rules.hasOwnProperty(z)) {
        item = rules[z];
        this.rules[z] = Array.isArray(item) ? item : [item];
      }
    }
  },
  validate: function validate(source_, o, oc) {
    var _this = this;

    if (o === void 0) {
      o = {};
    }

    if (oc === void 0) {
      oc = function oc() {};
    }

    var source = source_;
    var options = o;
    var callback = oc;

    if (typeof options === 'function') {
      callback = options;
      options = {};
    }

    if (!this.rules || Object.keys(this.rules).length === 0) {
      if (callback) {
        callback();
      }

      return Promise.resolve();
    }

    function complete(results) {
      var i;
      var errors = [];
      var fields = {};

      function add(e) {
        if (Array.isArray(e)) {
          var _errors;

          errors = (_errors = errors).concat.apply(_errors, e);
        } else {
          errors.push(e);
        }
      }

      for (i = 0; i < results.length; i++) {
        add(results[i]);
      }

      if (!errors.length) {
        errors = null;
        fields = null;
      } else {
        fields = convertFieldsError(errors);
      }

      callback(errors, fields);
    }

    if (options.messages) {
      var messages$1 = this.messages();

      if (messages$1 === messages) {
        messages$1 = newMessages();
      }

      deepMerge(messages$1, options.messages);
      options.messages = messages$1;
    } else {
      options.messages = this.messages();
    }

    var arr;
    var value;
    var series = {};
    var keys = options.keys || Object.keys(this.rules);
    keys.forEach(function (z) {
      arr = _this.rules[z];
      value = source[z];
      arr.forEach(function (r) {
        var rule = r;

        if (typeof rule.transform === 'function') {
          if (source === source_) {
            source = _extends({}, source);
          }

          value = source[z] = rule.transform(value);
        }

        if (typeof rule === 'function') {
          rule = {
            validator: rule
          };
        } else {
          rule = _extends({}, rule);
        }

        rule.validator = _this.getValidationMethod(rule);
        rule.field = z;
        rule.fullField = rule.fullField || z;
        rule.type = _this.getType(rule);

        if (!rule.validator) {
          return;
        }

        series[z] = series[z] || [];
        series[z].push({
          rule: rule,
          value: value,
          source: source,
          field: z
        });
      });
    });
    var errorFields = {};
    return asyncMap(series, options, function (data, doIt) {
      var rule = data.rule;
      var deep = (rule.type === 'object' || rule.type === 'array') && (typeof rule.fields === 'object' || typeof rule.defaultField === 'object');
      deep = deep && (rule.required || !rule.required && data.value);
      rule.field = data.field;

      function addFullfield(key, schema) {
        return _extends(_extends({}, schema), {}, {
          fullField: rule.fullField + "." + key
        });
      }

      function cb(e) {
        if (e === void 0) {
          e = [];
        }

        var errors = e;

        if (!Array.isArray(errors)) {
          errors = [errors];
        }

        if (!options.suppressWarning && errors.length) {
          Schema.warning('async-validator:', errors);
        }

        if (errors.length && rule.message) {
          errors = [].concat(rule.message);
        }

        errors = errors.map(complementError(rule));

        if (options.first && errors.length) {
          errorFields[rule.field] = 1;
          return doIt(errors);
        }

        if (!deep) {
          doIt(errors);
        } else {
          // if rule is required but the target object
          // does not exist fail at the rule level and don't
          // go deeper
          if (rule.required && !data.value) {
            if (rule.message) {
              errors = [].concat(rule.message).map(complementError(rule));
            } else if (options.error) {
              errors = [options.error(rule, format(options.messages.required, rule.field))];
            }

            return doIt(errors);
          }

          var fieldsSchema = {};

          if (rule.defaultField) {
            for (var k in data.value) {
              if (data.value.hasOwnProperty(k)) {
                fieldsSchema[k] = rule.defaultField;
              }
            }
          }

          fieldsSchema = _extends(_extends({}, fieldsSchema), data.rule.fields);

          for (var f in fieldsSchema) {
            if (fieldsSchema.hasOwnProperty(f)) {
              var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
              fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
            }
          }

          var schema = new Schema(fieldsSchema);
          schema.messages(options.messages);

          if (data.rule.options) {
            data.rule.options.messages = options.messages;
            data.rule.options.error = options.error;
          }

          schema.validate(data.value, data.rule.options || options, function (errs) {
            var finalErrors = [];

            if (errors && errors.length) {
              finalErrors.push.apply(finalErrors, errors);
            }

            if (errs && errs.length) {
              finalErrors.push.apply(finalErrors, errs);
            }

            doIt(finalErrors.length ? finalErrors : null);
          });
        }
      }

      var res;

      if (rule.asyncValidator) {
        res = rule.asyncValidator(rule, data.value, cb, data.source, options);
      } else if (rule.validator) {
        res = rule.validator(rule, data.value, cb, data.source, options);

        if (res === true) {
          cb();
        } else if (res === false) {
          cb(rule.message || rule.field + " fails");
        } else if (res instanceof Array) {
          cb(res);
        } else if (res instanceof Error) {
          cb(res.message);
        }
      }

      if (res && res.then) {
        res.then(function () {
          return cb();
        }, function (e) {
          return cb(e);
        });
      }
    }, function (results) {
      complete(results);
    });
  },
  getType: function getType(rule) {
    if (rule.type === undefined && rule.pattern instanceof RegExp) {
      rule.type = 'pattern';
    }

    if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) {
      throw new Error(format('Unknown rule type %s', rule.type));
    }

    return rule.type || 'string';
  },
  getValidationMethod: function getValidationMethod(rule) {
    if (typeof rule.validator === 'function') {
      return rule.validator;
    }

    var keys = Object.keys(rule);
    var messageIndex = keys.indexOf('message');

    if (messageIndex !== -1) {
      keys.splice(messageIndex, 1);
    }

    if (keys.length === 1 && keys[0] === 'required') {
      return validators.required;
    }

    return validators[this.getType(rule)] || false;
  }
};

Schema.register = function register(type, validator) {
  if (typeof validator !== 'function') {
    throw new Error('Cannot register a validator by type, validator is not a function');
  }

  validators[type] = validator;
};

Schema.warning = warning;
Schema.messages = messages;
Schema.validators = validators;

/* harmony default export */ __webpack_exports__["a"] = (Schema);
//# sourceMappingURL=index.js.map

/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("4362")))

/***/ }),

/***/ "2ad7":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a9e3");
/* harmony import */ var core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _Users_sunlh_idea_workspace_aws6_vue_aws_awsui_vue_node_modules_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("53ca");


//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["a"] = ({
  name: "AwsuiDictionary",
  props: {
    // 处理v-model
    value: [String, Number],
    // 只读处理
    readonly: Boolean,
    //数据字典的配置项
    config: {
      type: String,
      default: function _default() {
        return "";
      }
    },
    // sessionId
    sid: {
      type: String,
      default: ""
    },
    //appId
    appId: {
      type: String,
      default: ""
    },
    // containerType
    containerType: {
      type: String,
      default: ""
    }
  },
  data: function data() {
    return {
      DDValue: "",
      dialogTitle: "",
      dialogVisible: false,
      iframeOption: {
        url: this.getPath(),
        data: {
          sid: this.sid,
          cmd: "CLIENT_UI_XMLDICT_OPEN",
          config: this.config,
          appId: this.appId,
          pageIndex: 1,
          containerType: this.containerType
        },
        height: "99%"
      },
      otherDiaConfirm: null
    };
  },
  watch: {
    // 处理v-model
    DDValue: function DDValue(newVal) {
      this.$emit("input", newVal);
    },
    value: {
      handler: function handler() {
        this.DDValue = this.value;
      },
      immediate: true
    }
  },
  computed: {
    dialogOnce: function dialogOnce() {
      return window.DataDictionaryOnce == null;
    },
    // 是否显示弹框底部按钮
    isMultiple: function isMultiple() {
      var flag = false;

      if (typeof this.config == "string" && this.config.length != 0) {
        var obj = JSON.parse(this.config);
        flag = obj.multiple;
      }

      return flag;
    }
  },
  methods: {
    // 图标的点击事件
    DDIconClick: function DDIconClick(otherIframeOption, otherDiaConfirm) {
      if (otherIframeOption !== undefined) {
        this.iframeOption = otherIframeOption;
      }

      this.otherDiaConfirm = otherDiaConfirm == null ? this.dialogConfirm : otherDiaConfirm;

      if (window.DataDictionaryOnce != null && window.DataDictionaryOnce !== this) {
        window.DataDictionaryOnce.DDIconClick(this.iframeOption, this.dialogConfirm);
        return;
      }

      this.dialogVisible = true;
    },
    setValue: function setValue(value) {
      if (this.otherDiaConfirm) {
        var fn = this.otherDiaConfirm;
        this.otherDiaConfirm = null;
        fn(value);
        this.dialogVisible = false;
      }
    },
    dialogConfirm: function dialogConfirm(value) {
      if (value != null) {
        if (Object(_Users_sunlh_idea_workspace_aws6_vue_aws_awsui_vue_node_modules_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(value) == "object") {
          this.DDValue = value[0];
        } else {
          this.DDValue = value;
        }

        return;
      }

      if (this.otherDiaConfirm) {
        var fn = this.otherDiaConfirm;
        this.otherDiaConfirm = null;
        fn(this.getValue());
        this.dialogVisible = false;
      }
    },
    getPath: function getPath() {
      return eval("axiosBaseUrl") + "w"; // "/AWSDEVURL/r/w"
    },
    getValue: function getValue() {
      //initFormulaEditor("");
      return this.$refs.DialogDD.getWin().getMultipleVal();
    },
    handleClose: function handleClose() {
      this.dialogVisible = false;
    },
    diaCancel: function diaCancel() {
      this.dialogVisible = false;
    }
  },
  mounted: function mounted() {
    if (!window.DataDictionaryOnce) {
      window.DataDictionaryOnce = this;
    }
  },
  destroyed: function destroyed() {
    window.DataDictionaryOnce = null;
  }
});

/***/ }),

/***/ "2b3d":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
__webpack_require__("3ca3");
var $ = __webpack_require__("23e7");
var DESCRIPTORS = __webpack_require__("83ab");
var USE_NATIVE_URL = __webpack_require__("0d3b");
var global = __webpack_require__("da84");
var defineProperties = __webpack_require__("37e8");
var redefine = __webpack_require__("6eeb");
var anInstance = __webpack_require__("19aa");
var has = __webpack_require__("5135");
var assign = __webpack_require__("60da");
var arrayFrom = __webpack_require__("4df4");
var codeAt = __webpack_require__("6547").codeAt;
var toASCII = __webpack_require__("5fb2");
var setToStringTag = __webpack_require__("d44e");
var URLSearchParamsModule = __webpack_require__("9861");
var InternalStateModule = __webpack_require__("69f3");

var NativeURL = global.URL;
var URLSearchParams = URLSearchParamsModule.URLSearchParams;
var getInternalSearchParamsState = URLSearchParamsModule.getState;
var setInternalState = InternalStateModule.set;
var getInternalURLState = InternalStateModule.getterFor('URL');
var floor = Math.floor;
var pow = Math.pow;

var INVALID_AUTHORITY = 'Invalid authority';
var INVALID_SCHEME = 'Invalid scheme';
var INVALID_HOST = 'Invalid host';
var INVALID_PORT = 'Invalid port';

var ALPHA = /[A-Za-z]/;
var ALPHANUMERIC = /[\d+-.A-Za-z]/;
var DIGIT = /\d/;
var HEX_START = /^(0x|0X)/;
var OCT = /^[0-7]+$/;
var DEC = /^\d+$/;
var HEX = /^[\dA-Fa-f]+$/;
// eslint-disable-next-line no-control-regex
var FORBIDDEN_HOST_CODE_POINT = /[\u0000\u0009\u000A\u000D #%/:?@[\\]]/;
// eslint-disable-next-line no-control-regex
var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\u0000\u0009\u000A\u000D #/:?@[\\]]/;
// eslint-disable-next-line no-control-regex
var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g;
// eslint-disable-next-line no-control-regex
var TAB_AND_NEW_LINE = /[\u0009\u000A\u000D]/g;
var EOF;

var parseHost = function (url, input) {
  var result, codePoints, index;
  if (input.charAt(0) == '[') {
    if (input.charAt(input.length - 1) != ']') return INVALID_HOST;
    result = parseIPv6(input.slice(1, -1));
    if (!result) return INVALID_HOST;
    url.host = result;
  // opaque host
  } else if (!isSpecial(url)) {
    if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;
    result = '';
    codePoints = arrayFrom(input);
    for (index = 0; index < codePoints.length; index++) {
      result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);
    }
    url.host = result;
  } else {
    input = toASCII(input);
    if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST;
    result = parseIPv4(input);
    if (result === null) return INVALID_HOST;
    url.host = result;
  }
};

var parseIPv4 = function (input) {
  var parts = input.split('.');
  var partsLength, numbers, index, part, radix, number, ipv4;
  if (parts.length && parts[parts.length - 1] == '') {
    parts.pop();
  }
  partsLength = parts.length;
  if (partsLength > 4) return input;
  numbers = [];
  for (index = 0; index < partsLength; index++) {
    part = parts[index];
    if (part == '') return input;
    radix = 10;
    if (part.length > 1 && part.charAt(0) == '0') {
      radix = HEX_START.test(part) ? 16 : 8;
      part = part.slice(radix == 8 ? 1 : 2);
    }
    if (part === '') {
      number = 0;
    } else {
      if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;
      number = parseInt(part, radix);
    }
    numbers.push(number);
  }
  for (index = 0; index < partsLength; index++) {
    number = numbers[index];
    if (index == partsLength - 1) {
      if (number >= pow(256, 5 - partsLength)) return null;
    } else if (number > 255) return null;
  }
  ipv4 = numbers.pop();
  for (index = 0; index < numbers.length; index++) {
    ipv4 += numbers[index] * pow(256, 3 - index);
  }
  return ipv4;
};

// eslint-disable-next-line max-statements
var parseIPv6 = function (input) {
  var address = [0, 0, 0, 0, 0, 0, 0, 0];
  var pieceIndex = 0;
  var compress = null;
  var pointer = 0;
  var value, length, numbersSeen, ipv4Piece, number, swaps, swap;

  var char = function () {
    return input.charAt(pointer);
  };

  if (char() == ':') {
    if (input.charAt(1) != ':') return;
    pointer += 2;
    pieceIndex++;
    compress = pieceIndex;
  }
  while (char()) {
    if (pieceIndex == 8) return;
    if (char() == ':') {
      if (compress !== null) return;
      pointer++;
      pieceIndex++;
      compress = pieceIndex;
      continue;
    }
    value = length = 0;
    while (length < 4 && HEX.test(char())) {
      value = value * 16 + parseInt(char(), 16);
      pointer++;
      length++;
    }
    if (char() == '.') {
      if (length == 0) return;
      pointer -= length;
      if (pieceIndex > 6) return;
      numbersSeen = 0;
      while (char()) {
        ipv4Piece = null;
        if (numbersSeen > 0) {
          if (char() == '.' && numbersSeen < 4) pointer++;
          else return;
        }
        if (!DIGIT.test(char())) return;
        while (DIGIT.test(char())) {
          number = parseInt(char(), 10);
          if (ipv4Piece === null) ipv4Piece = number;
          else if (ipv4Piece == 0) return;
          else ipv4Piece = ipv4Piece * 10 + number;
          if (ipv4Piece > 255) return;
          pointer++;
        }
        address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;
        numbersSeen++;
        if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;
      }
      if (numbersSeen != 4) return;
      break;
    } else if (char() == ':') {
      pointer++;
      if (!char()) return;
    } else if (char()) return;
    address[pieceIndex++] = value;
  }
  if (compress !== null) {
    swaps = pieceIndex - compress;
    pieceIndex = 7;
    while (pieceIndex != 0 && swaps > 0) {
      swap = address[pieceIndex];
      address[pieceIndex--] = address[compress + swaps - 1];
      address[compress + --swaps] = swap;
    }
  } else if (pieceIndex != 8) return;
  return address;
};

var findLongestZeroSequence = function (ipv6) {
  var maxIndex = null;
  var maxLength = 1;
  var currStart = null;
  var currLength = 0;
  var index = 0;
  for (; index < 8; index++) {
    if (ipv6[index] !== 0) {
      if (currLength > maxLength) {
        maxIndex = currStart;
        maxLength = currLength;
      }
      currStart = null;
      currLength = 0;
    } else {
      if (currStart === null) currStart = index;
      ++currLength;
    }
  }
  if (currLength > maxLength) {
    maxIndex = currStart;
    maxLength = currLength;
  }
  return maxIndex;
};

var serializeHost = function (host) {
  var result, index, compress, ignore0;
  // ipv4
  if (typeof host == 'number') {
    result = [];
    for (index = 0; index < 4; index++) {
      result.unshift(host % 256);
      host = floor(host / 256);
    } return result.join('.');
  // ipv6
  } else if (typeof host == 'object') {
    result = '';
    compress = findLongestZeroSequence(host);
    for (index = 0; index < 8; index++) {
      if (ignore0 && host[index] === 0) continue;
      if (ignore0) ignore0 = false;
      if (compress === index) {
        result += index ? ':' : '::';
        ignore0 = true;
      } else {
        result += host[index].toString(16);
        if (index < 7) result += ':';
      }
    }
    return '[' + result + ']';
  } return host;
};

var C0ControlPercentEncodeSet = {};
var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {
  ' ': 1, '"': 1, '<': 1, '>': 1, '`': 1
});
var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {
  '#': 1, '?': 1, '{': 1, '}': 1
});
var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {
  '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1
});

var percentEncode = function (char, set) {
  var code = codeAt(char, 0);
  return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char);
};

var specialSchemes = {
  ftp: 21,
  file: null,
  http: 80,
  https: 443,
  ws: 80,
  wss: 443
};

var isSpecial = function (url) {
  return has(specialSchemes, url.scheme);
};

var includesCredentials = function (url) {
  return url.username != '' || url.password != '';
};

var cannotHaveUsernamePasswordPort = function (url) {
  return !url.host || url.cannotBeABaseURL || url.scheme == 'file';
};

var isWindowsDriveLetter = function (string, normalized) {
  var second;
  return string.length == 2 && ALPHA.test(string.charAt(0))
    && ((second = string.charAt(1)) == ':' || (!normalized && second == '|'));
};

var startsWithWindowsDriveLetter = function (string) {
  var third;
  return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (
    string.length == 2 ||
    ((third = string.charAt(2)) === '/' || third === '\\' || third === '?' || third === '#')
  );
};

var shortenURLsPath = function (url) {
  var path = url.path;
  var pathSize = path.length;
  if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {
    path.pop();
  }
};

var isSingleDot = function (segment) {
  return segment === '.' || segment.toLowerCase() === '%2e';
};

var isDoubleDot = function (segment) {
  segment = segment.toLowerCase();
  return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';
};

// States:
var SCHEME_START = {};
var SCHEME = {};
var NO_SCHEME = {};
var SPECIAL_RELATIVE_OR_AUTHORITY = {};
var PATH_OR_AUTHORITY = {};
var RELATIVE = {};
var RELATIVE_SLASH = {};
var SPECIAL_AUTHORITY_SLASHES = {};
var SPECIAL_AUTHORITY_IGNORE_SLASHES = {};
var AUTHORITY = {};
var HOST = {};
var HOSTNAME = {};
var PORT = {};
var FILE = {};
var FILE_SLASH = {};
var FILE_HOST = {};
var PATH_START = {};
var PATH = {};
var CANNOT_BE_A_BASE_URL_PATH = {};
var QUERY = {};
var FRAGMENT = {};

// eslint-disable-next-line max-statements
var parseURL = function (url, input, stateOverride, base) {
  var state = stateOverride || SCHEME_START;
  var pointer = 0;
  var buffer = '';
  var seenAt = false;
  var seenBracket = false;
  var seenPasswordToken = false;
  var codePoints, char, bufferCodePoints, failure;

  if (!stateOverride) {
    url.scheme = '';
    url.username = '';
    url.password = '';
    url.host = null;
    url.port = null;
    url.path = [];
    url.query = null;
    url.fragment = null;
    url.cannotBeABaseURL = false;
    input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');
  }

  input = input.replace(TAB_AND_NEW_LINE, '');

  codePoints = arrayFrom(input);

  while (pointer <= codePoints.length) {
    char = codePoints[pointer];
    switch (state) {
      case SCHEME_START:
        if (char && ALPHA.test(char)) {
          buffer += char.toLowerCase();
          state = SCHEME;
        } else if (!stateOverride) {
          state = NO_SCHEME;
          continue;
        } else return INVALID_SCHEME;
        break;

      case SCHEME:
        if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) {
          buffer += char.toLowerCase();
        } else if (char == ':') {
          if (stateOverride && (
            (isSpecial(url) != has(specialSchemes, buffer)) ||
            (buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||
            (url.scheme == 'file' && !url.host)
          )) return;
          url.scheme = buffer;
          if (stateOverride) {
            if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;
            return;
          }
          buffer = '';
          if (url.scheme == 'file') {
            state = FILE;
          } else if (isSpecial(url) && base && base.scheme == url.scheme) {
            state = SPECIAL_RELATIVE_OR_AUTHORITY;
          } else if (isSpecial(url)) {
            state = SPECIAL_AUTHORITY_SLASHES;
          } else if (codePoints[pointer + 1] == '/') {
            state = PATH_OR_AUTHORITY;
            pointer++;
          } else {
            url.cannotBeABaseURL = true;
            url.path.push('');
            state = CANNOT_BE_A_BASE_URL_PATH;
          }
        } else if (!stateOverride) {
          buffer = '';
          state = NO_SCHEME;
          pointer = 0;
          continue;
        } else return INVALID_SCHEME;
        break;

      case NO_SCHEME:
        if (!base || (base.cannotBeABaseURL && char != '#')) return INVALID_SCHEME;
        if (base.cannotBeABaseURL && char == '#') {
          url.scheme = base.scheme;
          url.path = base.path.slice();
          url.query = base.query;
          url.fragment = '';
          url.cannotBeABaseURL = true;
          state = FRAGMENT;
          break;
        }
        state = base.scheme == 'file' ? FILE : RELATIVE;
        continue;

      case SPECIAL_RELATIVE_OR_AUTHORITY:
        if (char == '/' && codePoints[pointer + 1] == '/') {
          state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
          pointer++;
        } else {
          state = RELATIVE;
          continue;
        } break;

      case PATH_OR_AUTHORITY:
        if (char == '/') {
          state = AUTHORITY;
          break;
        } else {
          state = PATH;
          continue;
        }

      case RELATIVE:
        url.scheme = base.scheme;
        if (char == EOF) {
          url.username = base.username;
          url.password = base.password;
          url.host = base.host;
          url.port = base.port;
          url.path = base.path.slice();
          url.query = base.query;
        } else if (char == '/' || (char == '\\' && isSpecial(url))) {
          state = RELATIVE_SLASH;
        } else if (char == '?') {
          url.username = base.username;
          url.password = base.password;
          url.host = base.host;
          url.port = base.port;
          url.path = base.path.slice();
          url.query = '';
          state = QUERY;
        } else if (char == '#') {
          url.username = base.username;
          url.password = base.password;
          url.host = base.host;
          url.port = base.port;
          url.path = base.path.slice();
          url.query = base.query;
          url.fragment = '';
          state = FRAGMENT;
        } else {
          url.username = base.username;
          url.password = base.password;
          url.host = base.host;
          url.port = base.port;
          url.path = base.path.slice();
          url.path.pop();
          state = PATH;
          continue;
        } break;

      case RELATIVE_SLASH:
        if (isSpecial(url) && (char == '/' || char == '\\')) {
          state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
        } else if (char == '/') {
          state = AUTHORITY;
        } else {
          url.username = base.username;
          url.password = base.password;
          url.host = base.host;
          url.port = base.port;
          state = PATH;
          continue;
        } break;

      case SPECIAL_AUTHORITY_SLASHES:
        state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
        if (char != '/' || buffer.charAt(pointer + 1) != '/') continue;
        pointer++;
        break;

      case SPECIAL_AUTHORITY_IGNORE_SLASHES:
        if (char != '/' && char != '\\') {
          state = AUTHORITY;
          continue;
        } break;

      case AUTHORITY:
        if (char == '@') {
          if (seenAt) buffer = '%40' + buffer;
          seenAt = true;
          bufferCodePoints = arrayFrom(buffer);
          for (var i = 0; i < bufferCodePoints.length; i++) {
            var codePoint = bufferCodePoints[i];
            if (codePoint == ':' && !seenPasswordToken) {
              seenPasswordToken = true;
              continue;
            }
            var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);
            if (seenPasswordToken) url.password += encodedCodePoints;
            else url.username += encodedCodePoints;
          }
          buffer = '';
        } else if (
          char == EOF || char == '/' || char == '?' || char == '#' ||
          (char == '\\' && isSpecial(url))
        ) {
          if (seenAt && buffer == '') return INVALID_AUTHORITY;
          pointer -= arrayFrom(buffer).length + 1;
          buffer = '';
          state = HOST;
        } else buffer += char;
        break;

      case HOST:
      case HOSTNAME:
        if (stateOverride && url.scheme == 'file') {
          state = FILE_HOST;
          continue;
        } else if (char == ':' && !seenBracket) {
          if (buffer == '') return INVALID_HOST;
          failure = parseHost(url, buffer);
          if (failure) return failure;
          buffer = '';
          state = PORT;
          if (stateOverride == HOSTNAME) return;
        } else if (
          char == EOF || char == '/' || char == '?' || char == '#' ||
          (char == '\\' && isSpecial(url))
        ) {
          if (isSpecial(url) && buffer == '') return INVALID_HOST;
          if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return;
          failure = parseHost(url, buffer);
          if (failure) return failure;
          buffer = '';
          state = PATH_START;
          if (stateOverride) return;
          continue;
        } else {
          if (char == '[') seenBracket = true;
          else if (char == ']') seenBracket = false;
          buffer += char;
        } break;

      case PORT:
        if (DIGIT.test(char)) {
          buffer += char;
        } else if (
          char == EOF || char == '/' || char == '?' || char == '#' ||
          (char == '\\' && isSpecial(url)) ||
          stateOverride
        ) {
          if (buffer != '') {
            var port = parseInt(buffer, 10);
            if (port > 0xFFFF) return INVALID_PORT;
            url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port;
            buffer = '';
          }
          if (stateOverride) return;
          state = PATH_START;
          continue;
        } else return INVALID_PORT;
        break;

      case FILE:
        url.scheme = 'file';
        if (char == '/' || char == '\\') state = FILE_SLASH;
        else if (base && base.scheme == 'file') {
          if (char == EOF) {
            url.host = base.host;
            url.path = base.path.slice();
            url.query = base.query;
          } else if (char == '?') {
            url.host = base.host;
            url.path = base.path.slice();
            url.query = '';
            state = QUERY;
          } else if (char == '#') {
            url.host = base.host;
            url.path = base.path.slice();
            url.query = base.query;
            url.fragment = '';
            state = FRAGMENT;
          } else {
            if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
              url.host = base.host;
              url.path = base.path.slice();
              shortenURLsPath(url);
            }
            state = PATH;
            continue;
          }
        } else {
          state = PATH;
          continue;
        } break;

      case FILE_SLASH:
        if (char == '/' || char == '\\') {
          state = FILE_HOST;
          break;
        }
        if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
          if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]);
          else url.host = base.host;
        }
        state = PATH;
        continue;

      case FILE_HOST:
        if (char == EOF || char == '/' || char == '\\' || char == '?' || char == '#') {
          if (!stateOverride && isWindowsDriveLetter(buffer)) {
            state = PATH;
          } else if (buffer == '') {
            url.host = '';
            if (stateOverride) return;
            state = PATH_START;
          } else {
            failure = parseHost(url, buffer);
            if (failure) return failure;
            if (url.host == 'localhost') url.host = '';
            if (stateOverride) return;
            buffer = '';
            state = PATH_START;
          } continue;
        } else buffer += char;
        break;

      case PATH_START:
        if (isSpecial(url)) {
          state = PATH;
          if (char != '/' && char != '\\') continue;
        } else if (!stateOverride && char == '?') {
          url.query = '';
          state = QUERY;
        } else if (!stateOverride && char == '#') {
          url.fragment = '';
          state = FRAGMENT;
        } else if (char != EOF) {
          state = PATH;
          if (char != '/') continue;
        } break;

      case PATH:
        if (
          char == EOF || char == '/' ||
          (char == '\\' && isSpecial(url)) ||
          (!stateOverride && (char == '?' || char == '#'))
        ) {
          if (isDoubleDot(buffer)) {
            shortenURLsPath(url);
            if (char != '/' && !(char == '\\' && isSpecial(url))) {
              url.path.push('');
            }
          } else if (isSingleDot(buffer)) {
            if (char != '/' && !(char == '\\' && isSpecial(url))) {
              url.path.push('');
            }
          } else {
            if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {
              if (url.host) url.host = '';
              buffer = buffer.charAt(0) + ':'; // normalize windows drive letter
            }
            url.path.push(buffer);
          }
          buffer = '';
          if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) {
            while (url.path.length > 1 && url.path[0] === '') {
              url.path.shift();
            }
          }
          if (char == '?') {
            url.query = '';
            state = QUERY;
          } else if (char == '#') {
            url.fragment = '';
            state = FRAGMENT;
          }
        } else {
          buffer += percentEncode(char, pathPercentEncodeSet);
        } break;

      case CANNOT_BE_A_BASE_URL_PATH:
        if (char == '?') {
          url.query = '';
          state = QUERY;
        } else if (char == '#') {
          url.fragment = '';
          state = FRAGMENT;
        } else if (char != EOF) {
          url.path[0] += percentEncode(char, C0ControlPercentEncodeSet);
        } break;

      case QUERY:
        if (!stateOverride && char == '#') {
          url.fragment = '';
          state = FRAGMENT;
        } else if (char != EOF) {
          if (char == "'" && isSpecial(url)) url.query += '%27';
          else if (char == '#') url.query += '%23';
          else url.query += percentEncode(char, C0ControlPercentEncodeSet);
        } break;

      case FRAGMENT:
        if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet);
        break;
    }

    pointer++;
  }
};

// `URL` constructor
// https://url.spec.whatwg.org/#url-class
var URLConstructor = function URL(url /* , base */) {
  var that = anInstance(this, URLConstructor, 'URL');
  var base = arguments.length > 1 ? arguments[1] : undefined;
  var urlString = String(url);
  var state = setInternalState(that, { type: 'URL' });
  var baseState, failure;
  if (base !== undefined) {
    if (base instanceof URLConstructor) baseState = getInternalURLState(base);
    else {
      failure = parseURL(baseState = {}, String(base));
      if (failure) throw TypeError(failure);
    }
  }
  failure = parseURL(state, urlString, null, baseState);
  if (failure) throw TypeError(failure);
  var searchParams = state.searchParams = new URLSearchParams();
  var searchParamsState = getInternalSearchParamsState(searchParams);
  searchParamsState.updateSearchParams(state.query);
  searchParamsState.updateURL = function () {
    state.query = String(searchParams) || null;
  };
  if (!DESCRIPTORS) {
    that.href = serializeURL.call(that);
    that.origin = getOrigin.call(that);
    that.protocol = getProtocol.call(that);
    that.username = getUsername.call(that);
    that.password = getPassword.call(that);
    that.host = getHost.call(that);
    that.hostname = getHostname.call(that);
    that.port = getPort.call(that);
    that.pathname = getPathname.call(that);
    that.search = getSearch.call(that);
    that.searchParams = getSearchParams.call(that);
    that.hash = getHash.call(that);
  }
};

var URLPrototype = URLConstructor.prototype;

var serializeURL = function () {
  var url = getInternalURLState(this);
  var scheme = url.scheme;
  var username = url.username;
  var password = url.password;
  var host = url.host;
  var port = url.port;
  var path = url.path;
  var query = url.query;
  var fragment = url.fragment;
  var output = scheme + ':';
  if (host !== null) {
    output += '//';
    if (includesCredentials(url)) {
      output += username + (password ? ':' + password : '') + '@';
    }
    output += serializeHost(host);
    if (port !== null) output += ':' + port;
  } else if (scheme == 'file') output += '//';
  output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
  if (query !== null) output += '?' + query;
  if (fragment !== null) output += '#' + fragment;
  return output;
};

var getOrigin = function () {
  var url = getInternalURLState(this);
  var scheme = url.scheme;
  var port = url.port;
  if (scheme == 'blob') try {
    return new URL(scheme.path[0]).origin;
  } catch (error) {
    return 'null';
  }
  if (scheme == 'file' || !isSpecial(url)) return 'null';
  return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : '');
};

var getProtocol = function () {
  return getInternalURLState(this).scheme + ':';
};

var getUsername = function () {
  return getInternalURLState(this).username;
};

var getPassword = function () {
  return getInternalURLState(this).password;
};

var getHost = function () {
  var url = getInternalURLState(this);
  var host = url.host;
  var port = url.port;
  return host === null ? ''
    : port === null ? serializeHost(host)
    : serializeHost(host) + ':' + port;
};

var getHostname = function () {
  var host = getInternalURLState(this).host;
  return host === null ? '' : serializeHost(host);
};

var getPort = function () {
  var port = getInternalURLState(this).port;
  return port === null ? '' : String(port);
};

var getPathname = function () {
  var url = getInternalURLState(this);
  var path = url.path;
  return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
};

var getSearch = function () {
  var query = getInternalURLState(this).query;
  return query ? '?' + query : '';
};

var getSearchParams = function () {
  return getInternalURLState(this).searchParams;
};

var getHash = function () {
  var fragment = getInternalURLState(this).fragment;
  return fragment ? '#' + fragment : '';
};

var accessorDescriptor = function (getter, setter) {
  return { get: getter, set: setter, configurable: true, enumerable: true };
};

if (DESCRIPTORS) {
  defineProperties(URLPrototype, {
    // `URL.prototype.href` accessors pair
    // https://url.spec.whatwg.org/#dom-url-href
    href: accessorDescriptor(serializeURL, function (href) {
      var url = getInternalURLState(this);
      var urlString = String(href);
      var failure = parseURL(url, urlString);
      if (failure) throw TypeError(failure);
      getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
    }),
    // `URL.prototype.origin` getter
    // https://url.spec.whatwg.org/#dom-url-origin
    origin: accessorDescriptor(getOrigin),
    // `URL.prototype.protocol` accessors pair
    // https://url.spec.whatwg.org/#dom-url-protocol
    protocol: accessorDescriptor(getProtocol, function (protocol) {
      var url = getInternalURLState(this);
      parseURL(url, String(protocol) + ':', SCHEME_START);
    }),
    // `URL.prototype.username` accessors pair
    // https://url.spec.whatwg.org/#dom-url-username
    username: accessorDescriptor(getUsername, function (username) {
      var url = getInternalURLState(this);
      var codePoints = arrayFrom(String(username));
      if (cannotHaveUsernamePasswordPort(url)) return;
      url.username = '';
      for (var i = 0; i < codePoints.length; i++) {
        url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);
      }
    }),
    // `URL.prototype.password` accessors pair
    // https://url.spec.whatwg.org/#dom-url-password
    password: accessorDescriptor(getPassword, function (password) {
      var url = getInternalURLState(this);
      var codePoints = arrayFrom(String(password));
      if (cannotHaveUsernamePasswordPort(url)) return;
      url.password = '';
      for (var i = 0; i < codePoints.length; i++) {
        url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);
      }
    }),
    // `URL.prototype.host` accessors pair
    // https://url.spec.whatwg.org/#dom-url-host
    host: accessorDescriptor(getHost, function (host) {
      var url = getInternalURLState(this);
      if (url.cannotBeABaseURL) return;
      parseURL(url, String(host), HOST);
    }),
    // `URL.prototype.hostname` accessors pair
    // https://url.spec.whatwg.org/#dom-url-hostname
    hostname: accessorDescriptor(getHostname, function (hostname) {
      var url = getInternalURLState(this);
      if (url.cannotBeABaseURL) return;
      parseURL(url, String(hostname), HOSTNAME);
    }),
    // `URL.prototype.port` accessors pair
    // https://url.spec.whatwg.org/#dom-url-port
    port: accessorDescriptor(getPort, function (port) {
      var url = getInternalURLState(this);
      if (cannotHaveUsernamePasswordPort(url)) return;
      port = String(port);
      if (port == '') url.port = null;
      else parseURL(url, port, PORT);
    }),
    // `URL.prototype.pathname` accessors pair
    // https://url.spec.whatwg.org/#dom-url-pathname
    pathname: accessorDescriptor(getPathname, function (pathname) {
      var url = getInternalURLState(this);
      if (url.cannotBeABaseURL) return;
      url.path = [];
      parseURL(url, pathname + '', PATH_START);
    }),
    // `URL.prototype.search` accessors pair
    // https://url.spec.whatwg.org/#dom-url-search
    search: accessorDescriptor(getSearch, function (search) {
      var url = getInternalURLState(this);
      search = String(search);
      if (search == '') {
        url.query = null;
      } else {
        if ('?' == search.charAt(0)) search = search.slice(1);
        url.query = '';
        parseURL(url, search, QUERY);
      }
      getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
    }),
    // `URL.prototype.searchParams` getter
    // https://url.spec.whatwg.org/#dom-url-searchparams
    searchParams: accessorDescriptor(getSearchParams),
    // `URL.prototype.hash` accessors pair
    // https://url.spec.whatwg.org/#dom-url-hash
    hash: accessorDescriptor(getHash, function (hash) {
      var url = getInternalURLState(this);
      hash = String(hash);
      if (hash == '') {
        url.fragment = null;
        return;
      }
      if ('#' == hash.charAt(0)) hash = hash.slice(1);
      url.fragment = '';
      parseURL(url, hash, FRAGMENT);
    })
  });
}

// `URL.prototype.toJSON` method
// https://url.spec.whatwg.org/#dom-url-tojson
redefine(URLPrototype, 'toJSON', function toJSON() {
  return serializeURL.call(this);
}, { enumerable: true });

// `URL.prototype.toString` method
// https://url.spec.whatwg.org/#URL-stringification-behavior
redefine(URLPrototype, 'toString', function toString() {
  return serializeURL.call(this);
}, { enumerable: true });

if (NativeURL) {
  var nativeCreateObjectURL = NativeURL.createObjectURL;
  var nativeRevokeObjectURL = NativeURL.revokeObjectURL;
  // `URL.createObjectURL` method
  // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
  // eslint-disable-next-line no-unused-vars
  if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) {
    return nativeCreateObjectURL.apply(NativeURL, arguments);
  });
  // `URL.revokeObjectURL` method
  // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
  // eslint-disable-next-line no-unused-vars
  if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) {
    return nativeRevokeObjectURL.apply(NativeURL, arguments);
  });
}

setToStringTag(URLConstructor, 'URL');

$({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {
  URL: URLConstructor
});


/***/ }),

/***/ "2bb5":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


__webpack_require__("b0c0");

exports.__esModule = true;

var _util = __webpack_require__("8122");
/**
 * Show migrating guide in browser console.
 *
 * Usage:
 * import Migrating from 'element-ui/src/mixins/migrating';
 *
 * mixins: [Migrating]
 *
 * add getMigratingConfig method for your component.
 *  getMigratingConfig() {
 *    return {
 *      props: {
 *        'allow-no-selection': 'allow-no-selection is removed.',
 *        'selection-mode': 'selection-mode is removed.'
 *      },
 *      events: {
 *        selectionchange: 'selectionchange is renamed to selection-change.'
 *      }
 *    };
 *  },
 */


exports.default = {
  mounted: function mounted() {
    if (true) return;
    if (!this.$vnode) return;

    var _getMigratingConfig = this.getMigratingConfig(),
        _getMigratingConfig$p = _getMigratingConfig.props,
        props = _getMigratingConfig$p === undefined ? {} : _getMigratingConfig$p,
        _getMigratingConfig$e = _getMigratingConfig.events,
        events = _getMigratingConfig$e === undefined ? {} : _getMigratingConfig$e;

    var _$vnode = this.$vnode,
        data = _$vnode.data,
        componentOptions = _$vnode.componentOptions;
    var definedProps = data.attrs || {};
    var definedEvents = componentOptions.listeners || {};

    for (var propName in definedProps) {
      propName = (0, _util.kebabCase)(propName); // compatible with camel case

      if (props[propName]) {
        console.warn('[Element Migrating][' + this.$options.name + '][Attribute]: ' + props[propName]);
      }
    }

    for (var eventName in definedEvents) {
      eventName = (0, _util.kebabCase)(eventName); // compatible with camel case

      if (events[eventName]) {
        console.warn('[Element Migrating][' + this.$options.name + '][Event]: ' + events[eventName]);
      }
    }
  },
  methods: {
    getMigratingConfig: function getMigratingConfig() {
      return {
        props: {},
        events: {}
      };
    }
  }
};

/***/ }),

/***/ "2c98":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_dialog_vue_vue_type_style_index_1_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("cf11");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_dialog_vue_vue_type_style_index_1_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_dialog_vue_vue_type_style_index_1_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_dialog_vue_vue_type_style_index_1_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "2cf4":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var fails = __webpack_require__("d039");
var classof = __webpack_require__("c6b6");
var bind = __webpack_require__("0366");
var html = __webpack_require__("1be4");
var createElement = __webpack_require__("cc12");
var IS_IOS = __webpack_require__("1cdc");

var location = global.location;
var set = global.setImmediate;
var clear = global.clearImmediate;
var process = global.process;
var MessageChannel = global.MessageChannel;
var Dispatch = global.Dispatch;
var counter = 0;
var queue = {};
var ONREADYSTATECHANGE = 'onreadystatechange';
var defer, channel, port;

var run = function (id) {
  // eslint-disable-next-line no-prototype-builtins
  if (queue.hasOwnProperty(id)) {
    var fn = queue[id];
    delete queue[id];
    fn();
  }
};

var runner = function (id) {
  return function () {
    run(id);
  };
};

var listener = function (event) {
  run(event.data);
};

var post = function (id) {
  // old engines have not location.origin
  global.postMessage(id + '', location.protocol + '//' + location.host);
};

// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
if (!set || !clear) {
  set = function setImmediate(fn) {
    var args = [];
    var i = 1;
    while (arguments.length > i) args.push(arguments[i++]);
    queue[++counter] = function () {
      // eslint-disable-next-line no-new-func
      (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);
    };
    defer(counter);
    return counter;
  };
  clear = function clearImmediate(id) {
    delete queue[id];
  };
  // Node.js 0.8-
  if (classof(process) == 'process') {
    defer = function (id) {
      process.nextTick(runner(id));
    };
  // Sphere (JS game engine) Dispatch API
  } else if (Dispatch && Dispatch.now) {
    defer = function (id) {
      Dispatch.now(runner(id));
    };
  // Browsers with MessageChannel, includes WebWorkers
  // except iOS - https://github.com/zloirock/core-js/issues/624
  } else if (MessageChannel && !IS_IOS) {
    channel = new MessageChannel();
    port = channel.port2;
    channel.port1.onmessage = listener;
    defer = bind(port.postMessage, port, 1);
  // Browsers with postMessage, skip WebWorkers
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  } else if (
    global.addEventListener &&
    typeof postMessage == 'function' &&
    !global.importScripts &&
    !fails(post) &&
    location.protocol !== 'file:'
  ) {
    defer = post;
    global.addEventListener('message', listener, false);
  // IE8-
  } else if (ONREADYSTATECHANGE in createElement('script')) {
    defer = function (id) {
      html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
        html.removeChild(this);
        run(id);
      };
    };
  // Rest old browsers
  } else {
    defer = function (id) {
      setTimeout(runner(id), 0);
    };
  }
}

module.exports = {
  set: set,
  clear: clear
};


/***/ }),

/***/ "2d00":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var userAgent = __webpack_require__("342f");

var process = global.process;
var versions = process && process.versions;
var v8 = versions && versions.v8;
var match, version;

if (v8) {
  match = v8.split('.');
  version = match[0] + match[1];
} else if (userAgent) {
  match = userAgent.match(/Edge\/(\d+)/);
  if (!match || match[1] >= 74) {
    match = userAgent.match(/Chrome\/(\d+)/);
    if (match) version = match[1];
  }
}

module.exports = version && +version;


/***/ }),

/***/ "2d83":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var enhanceError = __webpack_require__("387f");

/**
 * Create an Error with the specified message, config, error code, request and response.
 *
 * @param {string} message The error message.
 * @param {Object} config The config.
 * @param {string} [code] The error code (for example, 'ECONNABORTED').
 * @param {Object} [request] The request.
 * @param {Object} [response] The response.
 * @returns {Error} The created error.
 */
module.exports = function createError(message, config, code, request, response) {
  var error = new Error(message);
  return enhanceError(error, config, code, request, response);
};


/***/ }),

/***/ "2e67":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


module.exports = function isCancel(value) {
  return !!(value && value.__CANCEL__);
};


/***/ }),

/***/ "2f9a":
/***/ (function(module, exports) {

module.exports = function () { /* empty */ };


/***/ }),

/***/ "301c":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("e198")('asyncIterator');


/***/ }),

/***/ "30b5":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");

function encode(val) {
  return encodeURIComponent(val).
    replace(/%3A/gi, ':').
    replace(/%24/g, '$').
    replace(/%2C/gi, ',').
    replace(/%20/g, '+').
    replace(/%5B/gi, '[').
    replace(/%5D/gi, ']');
}

/**
 * Build a URL by appending params to the end
 *
 * @param {string} url The base of the url (e.g., http://www.google.com)
 * @param {object} [params] The params to be appended
 * @returns {string} The formatted url
 */
module.exports = function buildURL(url, params, paramsSerializer) {
  /*eslint no-param-reassign:0*/
  if (!params) {
    return url;
  }

  var serializedParams;
  if (paramsSerializer) {
    serializedParams = paramsSerializer(params);
  } else if (utils.isURLSearchParams(params)) {
    serializedParams = params.toString();
  } else {
    var parts = [];

    utils.forEach(params, function serialize(val, key) {
      if (val === null || typeof val === 'undefined') {
        return;
      }

      if (utils.isArray(val)) {
        key = key + '[]';
      } else {
        val = [val];
      }

      utils.forEach(val, function parseValue(v) {
        if (utils.isDate(v)) {
          v = v.toISOString();
        } else if (utils.isObject(v)) {
          v = JSON.stringify(v);
        }
        parts.push(encode(key) + '=' + encode(v));
      });
    });

    serializedParams = parts.join('&');
  }

  if (serializedParams) {
    var hashmarkIndex = url.indexOf('#');
    if (hashmarkIndex !== -1) {
      url = url.slice(0, hashmarkIndex);
    }

    url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
  }

  return url;
};


/***/ }),

/***/ "3106":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_app_select_vue_vue_type_style_index_0_id_9d9b4566_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c2a2");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_app_select_vue_vue_type_style_index_0_id_9d9b4566_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_app_select_vue_vue_type_style_index_0_id_9d9b4566_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_app_select_vue_vue_type_style_index_0_id_9d9b4566_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "3280":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__("ebb5");
var $lastIndexOf = __webpack_require__("e58c");

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

// `%TypedArray%.prototype.lastIndexOf` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.lastindexof
// eslint-disable-next-line no-unused-vars
exportTypedArrayMethod('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {
  return $lastIndexOf.apply(aTypedArray(this), arguments);
});


/***/ }),

/***/ "3397":
/***/ (function(module, exports, __webpack_require__) {

// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__("7a41");
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (it, S) {
  if (!isObject(it)) return it;
  var fn, val;
  if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
  if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  throw TypeError("Can't convert object to primitive value");
};


/***/ }),

/***/ "3410":
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__("23e7");
var fails = __webpack_require__("d039");
var toObject = __webpack_require__("7b0b");
var nativeGetPrototypeOf = __webpack_require__("e163");
var CORRECT_PROTOTYPE_GETTER = __webpack_require__("e177");

var FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });

// `Object.getPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {
  getPrototypeOf: function getPrototypeOf(it) {
    return nativeGetPrototypeOf(toObject(it));
  }
});



/***/ }),

/***/ "342f":
/***/ (function(module, exports, __webpack_require__) {

var getBuiltIn = __webpack_require__("d066");

module.exports = getBuiltIn('navigator', 'userAgent') || '';


/***/ }),

/***/ "35a1":
/***/ (function(module, exports, __webpack_require__) {

var classof = __webpack_require__("f5df");
var Iterators = __webpack_require__("3f8c");
var wellKnownSymbol = __webpack_require__("b622");

var ITERATOR = wellKnownSymbol('iterator');

module.exports = function (it) {
  if (it != undefined) return it[ITERATOR]
    || it['@@iterator']
    || Iterators[classof(it)];
};


/***/ }),

/***/ "37bc":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tabs_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("60cf");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tabs_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tabs_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tabs_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "37e8":
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__("83ab");
var definePropertyModule = __webpack_require__("9bf2");
var anObject = __webpack_require__("825a");
var objectKeys = __webpack_require__("df75");

// `Object.defineProperties` method
// https://tc39.github.io/ecma262/#sec-object.defineproperties
module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
  anObject(O);
  var keys = objectKeys(Properties);
  var length = keys.length;
  var index = 0;
  var key;
  while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
  return O;
};


/***/ }),

/***/ "387f":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


/**
 * Update an Error with the specified config, error code, and response.
 *
 * @param {Error} error The error to update.
 * @param {Object} config The config.
 * @param {string} [code] The error code (for example, 'ECONNABORTED').
 * @param {Object} [request] The request.
 * @param {Object} [response] The response.
 * @returns {Error} The error.
 */
module.exports = function enhanceError(error, config, code, request, response) {
  error.config = config;
  if (code) {
    error.code = code;
  }

  error.request = request;
  error.response = response;
  error.isAxiosError = true;

  error.toJSON = function toJSON() {
    return {
      // Standard
      message: this.message,
      name: this.name,
      // Microsoft
      description: this.description,
      number: this.number,
      // Mozilla
      fileName: this.fileName,
      lineNumber: this.lineNumber,
      columnNumber: this.columnNumber,
      stack: this.stack,
      // Axios
      config: this.config,
      code: this.code
    };
  };
  return error;
};


/***/ }),

/***/ "391a":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "391f":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "3934":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");

module.exports = (
  utils.isStandardBrowserEnv() ?

  // Standard browser envs have full support of the APIs needed to test
  // whether the request URL is of the same origin as current location.
    (function standardBrowserEnv() {
      var msie = /(msie|trident)/i.test(navigator.userAgent);
      var urlParsingNode = document.createElement('a');
      var originURL;

      /**
    * Parse a URL to discover it's components
    *
    * @param {String} url The URL to be parsed
    * @returns {Object}
    */
      function resolveURL(url) {
        var href = url;

        if (msie) {
        // IE needs attribute set twice to normalize properties
          urlParsingNode.setAttribute('href', href);
          href = urlParsingNode.href;
        }

        urlParsingNode.setAttribute('href', href);

        // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
        return {
          href: urlParsingNode.href,
          protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
          host: urlParsingNode.host,
          search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
          hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
          hostname: urlParsingNode.hostname,
          port: urlParsingNode.port,
          pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
            urlParsingNode.pathname :
            '/' + urlParsingNode.pathname
        };
      }

      originURL = resolveURL(window.location.href);

      /**
    * Determine if a URL shares the same origin as the current location
    *
    * @param {String} requestURL The URL to test
    * @returns {boolean} True if URL shares the same origin, otherwise false
    */
      return function isURLSameOrigin(requestURL) {
        var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
        return (parsed.protocol === originURL.protocol &&
            parsed.host === originURL.host);
      };
    })() :

  // Non standard browser envs (web workers, react-native) lack needed support.
    (function nonStandardBrowserEnv() {
      return function isURLSameOrigin() {
        return true;
      };
    })()
);


/***/ }),

/***/ "393a":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var LIBRARY = __webpack_require__("e444");
var $export = __webpack_require__("512c");
var redefine = __webpack_require__("ba01");
var hide = __webpack_require__("051b");
var Iterators = __webpack_require__("8a0d");
var $iterCreate = __webpack_require__("26dd");
var setToStringTag = __webpack_require__("92f0");
var getPrototypeOf = __webpack_require__("ce7a");
var ITERATOR = __webpack_require__("cc15")('iterator');
var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
var FF_ITERATOR = '@@iterator';
var KEYS = 'keys';
var VALUES = 'values';

var returnThis = function () { return this; };

module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
  $iterCreate(Constructor, NAME, next);
  var getMethod = function (kind) {
    if (!BUGGY && kind in proto) return proto[kind];
    switch (kind) {
      case KEYS: return function keys() { return new Constructor(this, kind); };
      case VALUES: return function values() { return new Constructor(this, kind); };
    } return function entries() { return new Constructor(this, kind); };
  };
  var TAG = NAME + ' Iterator';
  var DEF_VALUES = DEFAULT == VALUES;
  var VALUES_BUG = false;
  var proto = Base.prototype;
  var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
  var $default = $native || getMethod(DEFAULT);
  var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
  var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
  var methods, key, IteratorPrototype;
  // Fix native
  if ($anyNative) {
    IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
    if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
      // Set @@toStringTag to native iterators
      setToStringTag(IteratorPrototype, TAG, true);
      // fix for some old engines
      if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
    }
  }
  // fix Array#{values, @@iterator}.name in V8 / FF
  if (DEF_VALUES && $native && $native.name !== VALUES) {
    VALUES_BUG = true;
    $default = function values() { return $native.call(this); };
  }
  // Define iterator
  if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
    hide(proto, ITERATOR, $default);
  }
  // Plug for library
  Iterators[NAME] = $default;
  Iterators[TAG] = returnThis;
  if (DEFAULT) {
    methods = {
      values: DEF_VALUES ? $default : getMethod(VALUES),
      keys: IS_SET ? $default : getMethod(KEYS),
      entries: $entries
    };
    if (FORCED) for (key in methods) {
      if (!(key in proto)) redefine(proto, key, methods[key]);
    } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
  }
  return methods;
};


/***/ }),

/***/ "39ad":
/***/ (function(module, exports, __webpack_require__) {

// false -> Array#indexOf
// true  -> Array#includes
var toIObject = __webpack_require__("6ca1");
var toLength = __webpack_require__("d16a");
var toAbsoluteIndex = __webpack_require__("9d11");
module.exports = function (IS_INCLUDES) {
  return function ($this, el, fromIndex) {
    var O = toIObject($this);
    var length = toLength(O.length);
    var index = toAbsoluteIndex(fromIndex, length);
    var value;
    // Array#includes uses SameValueZero equality algorithm
    // eslint-disable-next-line no-self-compare
    if (IS_INCLUDES && el != el) while (length > index) {
      value = O[index++];
      // eslint-disable-next-line no-self-compare
      if (value != value) return true;
    // Array#indexOf ignores holes, Array#includes - not
    } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
      if (O[index] === el) return IS_INCLUDES || index || 0;
    } return !IS_INCLUDES && -1;
  };
};


/***/ }),

/***/ "3a7b":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__("ebb5");
var $findIndex = __webpack_require__("b727").findIndex;

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

// `%TypedArray%.prototype.findIndex` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.findindex
exportTypedArrayMethod('findIndex', function findIndex(predicate /* , thisArg */) {
  return $findIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
});


/***/ }),

/***/ "3bbe":
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__("861d");

module.exports = function (it) {
  if (!isObject(it) && it !== null) {
    throw TypeError("Can't set " + String(it) + ' as a prototype');
  } return it;
};


/***/ }),

/***/ "3c47":
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;__webpack_require__("c975");

__webpack_require__("a15b");

__webpack_require__("fb6a");

__webpack_require__("b0c0");

__webpack_require__("d3b7");

__webpack_require__("4d63");

__webpack_require__("ac1f");

__webpack_require__("25f0");

__webpack_require__("466d");

__webpack_require__("5319");

__webpack_require__("1276");

var _typeof = __webpack_require__("7037");

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function (mod) {
  if (( false ? undefined : _typeof(exports)) == "object" && ( false ? undefined : _typeof(module)) == "object") // CommonJS
    mod(__webpack_require__("f3a7"), __webpack_require__("79ef"));else if (true) // AMD
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__("f3a7"), __webpack_require__("79ef")], __WEBPACK_AMD_DEFINE_FACTORY__ = (mod),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else // Plain browser env
    {}
})(function (CodeMirror) {
  "use strict";

  var tables;
  var defaultTable;
  var keywords;
  var identifierQuote;
  var CONS = {
    QUERY_DIV: ";",
    ALIAS_KEYWORD: "AS"
  };
  var Pos = CodeMirror.Pos,
      cmpPos = CodeMirror.cmpPos;

  function isArray(val) {
    return Object.prototype.toString.call(val) == "[object Array]";
  }

  function getKeywords(editor) {
    var mode = editor.doc.modeOption;
    if (mode === "awsAt") mode = "awsAt";
    return CodeMirror.resolveMode(mode).keywords;
  }

  function getIdentifierQuote(editor) {
    var mode = editor.doc.modeOption;
    if (mode === "sql") mode = "text/x-sql";
    return CodeMirror.resolveMode(mode).identifierQuote || "`";
  }

  function getText(item) {
    return typeof item == "string" ? item : item.text;
  }

  function wrapTable(name, value) {
    if (isArray(value)) value = {
      columns: value
    };
    if (!value.text) value.text = name;
    return value;
  }

  function parseTables(input) {
    var result = {};

    if (isArray(input)) {
      for (var i = input.length - 1; i >= 0; i--) {
        var item = input[i];
        result[getText(item).toUpperCase()] = wrapTable(getText(item), item);
      }
    } else if (input) {
      for (var name in input) {
        result[name.toUpperCase()] = wrapTable(name, input[name]);
      }
    }

    return result;
  }

  function getTable(name) {
    return tables[name.toUpperCase()];
  }

  function shallowClone(object) {
    var result = {};

    for (var key in object) {
      if (object.hasOwnProperty(key)) result[key] = object[key];
    }

    return result;
  }

  function match(string, word) {
    var len = string.length;
    var sub = getText(word).substr(0, len);
    return string.toUpperCase() === sub.toUpperCase();
  }

  function addMatches(result, search, wordlist, formatter) {
    if (wordlist) {
      for (var word in wordlist) {
        if (wordlist.hasOwnProperty(word)) {
          var keyObj = wordlist[word];

          if (keyObj && match(search, word)) {
            if (word.indexOf("@") === -1) {
              result.push(formatter(keyObj.name, null, keyObj.id));
            } else {
              result.push(formatter(keyObj.key + " - " + keyObj.title, null, keyObj.key));
            }
          }
        }
      }
    }
  }

  function cleanName(name) {
    // Get rid name from identifierQuote and preceding dot(.)
    if (name.charAt(0) == ".") {
      name = name.substr(1);
    } // replace doublicated identifierQuotes with single identifierQuotes
    // and remove single identifierQuotes


    var nameParts = name.split(identifierQuote + identifierQuote);

    for (var i = 0; i < nameParts.length; i++) {
      nameParts[i] = nameParts[i].replace(new RegExp(identifierQuote, "g"), "");
    }

    return nameParts.join(identifierQuote);
  }

  function insertIdentifierQuotes(name) {
    var nameParts = getText(name).split(".");

    for (var i = 0; i < nameParts.length; i++) {
      nameParts[i] = identifierQuote + // doublicate identifierQuotes
      nameParts[i].replace(new RegExp(identifierQuote, "g"), identifierQuote + identifierQuote) + identifierQuote;
    }

    var escaped = nameParts.join(".");
    if (typeof name == "string") return escaped;
    name = shallowClone(name);
    name.text = escaped;
    return name;
  }

  function nameCompletion(cur, token, result, editor) {
    // Try to complete table, column names and return start position of completion
    var useIdentifierQuotes = false;
    var nameParts = [];
    var start = token.start;
    var cont = true;

    while (cont) {
      cont = token.string.charAt(0) == ".";
      useIdentifierQuotes = useIdentifierQuotes || token.string.charAt(0) == identifierQuote;
      start = token.start;
      nameParts.unshift(cleanName(token.string));
      token = editor.getTokenAt(Pos(cur.line, token.start));

      if (token.string == ".") {
        cont = true;
        token = editor.getTokenAt(Pos(cur.line, token.start));
      }
    } // Try to complete table names


    var string = nameParts.join(".");
    addMatches(result, string, tables, function (w) {
      return useIdentifierQuotes ? insertIdentifierQuotes(w) : w;
    }); // Try to complete columns from defaultTable

    addMatches(result, string, defaultTable, function (w) {
      return useIdentifierQuotes ? insertIdentifierQuotes(w) : w;
    }); // Try to complete columns

    string = nameParts.pop();
    var table = nameParts.join(".");
    var alias = false;
    var aliasTable = table; // Check if table is available. If not, find table by Alias

    if (!getTable(table)) {
      var oldTable = table;
      table = findTableByAlias(table, editor);
      if (table !== oldTable) alias = true;
    }

    var columns = getTable(table);
    if (columns && columns.columns) columns = columns.columns;

    if (columns) {
      addMatches(result, string, columns, function (w) {
        var tableInsert = table;
        if (alias == true) tableInsert = aliasTable;

        if (typeof w == "string") {
          w = tableInsert + "." + w;
        } else {
          w = shallowClone(w);
          w.text = tableInsert + "." + w.text;
        }

        return useIdentifierQuotes ? insertIdentifierQuotes(w) : w;
      });
    }

    return start;
  }

  function eachWord(lineText, f) {
    var words = lineText.split(/\s+/);

    for (var i = 0; i < words.length; i++) {
      if (words[i]) f(words[i].replace(/[,;]/g, ''));
    }
  }

  function findTableByAlias(alias, editor) {
    var doc = editor.doc;
    var fullQuery = doc.getValue();
    var aliasUpperCase = alias.toUpperCase();
    var previousWord = "";
    var table = "";
    var separator = [];
    var validRange = {
      start: Pos(0, 0),
      end: Pos(editor.lastLine(), editor.getLineHandle(editor.lastLine()).length)
    }; //add separator

    var indexOfSeparator = fullQuery.indexOf(CONS.QUERY_DIV);

    while (indexOfSeparator != -1) {
      separator.push(doc.posFromIndex(indexOfSeparator));
      indexOfSeparator = fullQuery.indexOf(CONS.QUERY_DIV, indexOfSeparator + 1);
    }

    separator.unshift(Pos(0, 0));
    separator.push(Pos(editor.lastLine(), editor.getLineHandle(editor.lastLine()).text.length)); //find valid range

    var prevItem = null;
    var current = editor.getCursor();

    for (var i = 0; i < separator.length; i++) {
      if ((prevItem == null || cmpPos(current, prevItem) > 0) && cmpPos(current, separator[i]) <= 0) {
        validRange = {
          start: prevItem,
          end: separator[i]
        };
        break;
      }

      prevItem = separator[i];
    }

    if (validRange.start) {
      var query = doc.getRange(validRange.start, validRange.end, false);

      for (var i = 0; i < query.length; i++) {
        var lineText = query[i];
        eachWord(lineText, function (word) {
          var wordUpperCase = word.toUpperCase();
          if (wordUpperCase === aliasUpperCase && getTable(previousWord)) table = previousWord;
          if (wordUpperCase !== CONS.ALIAS_KEYWORD) previousWord = word;
        });
        if (table) break;
      }
    }

    return table;
  }

  CodeMirror.registerHelper("hint", "atformula", function (editor, options) {
    tables = parseTables(options && options.tables);
    var defaultTableName = options && options.defaultTable;
    var disableKeywords = options && options.disableKeywords;
    defaultTable = defaultTableName && getTable(defaultTableName);
    keywords = editor.keywords ? editor.keywords : getKeywords(editor);
    identifierQuote = getIdentifierQuote(editor);
    if (defaultTableName && !defaultTable) defaultTable = findTableByAlias(defaultTableName, editor);
    defaultTable = defaultTable || [];
    if (defaultTable.columns) defaultTable = defaultTable.columns;
    var cur = editor.getCursor();
    var result = [];
    var token = editor.getTokenAt(cur),
        start,
        end,
        search;

    if (token.end > cur.ch) {
      token.end = cur.ch;
      token.string = token.string.slice(0, cur.ch - token.start);
    }

    if (token.string.match(/^[.`"\w@]\w*$/)) {
      search = token.string;
      start = token.start;
      end = token.end;
    } else {
      start = end = cur.ch;
      search = "";
    }

    if (search.length === 0) return;

    if (search.charAt(0) == "." || search.charAt(0) == identifierQuote) {
      start = nameCompletion(cur, token, result, editor);
    } else {
      addMatches(result, search, defaultTable, function (w) {
        return {
          text: w,
          className: "CodeMirror-hint-table CodeMirror-hint-default-table"
        };
      });
      addMatches(result, search, tables, function (w) {
        if (_typeof(w) === 'object') {
          w.className = "CodeMirror-hint-table";
        } else {
          w = {
            text: w,
            className: "CodeMirror-hint-table"
          };
        }

        return w;
      });
      if (!disableKeywords) // addMatches(result, search, keywords, function(w) {return {text: w.toUpperCase(), className: "CodeMirror-hint-keyword"};});
        //取消转换为大写
        addMatches(result, search, keywords, function (w, q, k) {
          return {
            text: w,
            className: "CodeMirror-hint-keyword",
            desc: q,
            key: k
          };
        });
    }

    return {
      list: result,
      from: Pos(cur.line, start),
      to: Pos(cur.line, end)
    };
  });
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("62e4")(module)))

/***/ }),

/***/ "3c4e":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var isMergeableObject = function isMergeableObject(value) {
	return isNonNullObject(value)
		&& !isSpecial(value)
};

function isNonNullObject(value) {
	return !!value && typeof value === 'object'
}

function isSpecial(value) {
	var stringValue = Object.prototype.toString.call(value);

	return stringValue === '[object RegExp]'
		|| stringValue === '[object Date]'
		|| isReactElement(value)
}

// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;

function isReactElement(value) {
	return value.$$typeof === REACT_ELEMENT_TYPE
}

function emptyTarget(val) {
    return Array.isArray(val) ? [] : {}
}

function cloneIfNecessary(value, optionsArgument) {
    var clone = optionsArgument && optionsArgument.clone === true;
    return (clone && isMergeableObject(value)) ? deepmerge(emptyTarget(value), value, optionsArgument) : value
}

function defaultArrayMerge(target, source, optionsArgument) {
    var destination = target.slice();
    source.forEach(function(e, i) {
        if (typeof destination[i] === 'undefined') {
            destination[i] = cloneIfNecessary(e, optionsArgument);
        } else if (isMergeableObject(e)) {
            destination[i] = deepmerge(target[i], e, optionsArgument);
        } else if (target.indexOf(e) === -1) {
            destination.push(cloneIfNecessary(e, optionsArgument));
        }
    });
    return destination
}

function mergeObject(target, source, optionsArgument) {
    var destination = {};
    if (isMergeableObject(target)) {
        Object.keys(target).forEach(function(key) {
            destination[key] = cloneIfNecessary(target[key], optionsArgument);
        });
    }
    Object.keys(source).forEach(function(key) {
        if (!isMergeableObject(source[key]) || !target[key]) {
            destination[key] = cloneIfNecessary(source[key], optionsArgument);
        } else {
            destination[key] = deepmerge(target[key], source[key], optionsArgument);
        }
    });
    return destination
}

function deepmerge(target, source, optionsArgument) {
    var sourceIsArray = Array.isArray(source);
    var targetIsArray = Array.isArray(target);
    var options = optionsArgument || { arrayMerge: defaultArrayMerge };
    var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;

    if (!sourceAndTargetTypesMatch) {
        return cloneIfNecessary(source, optionsArgument)
    } else if (sourceIsArray) {
        var arrayMerge = options.arrayMerge || defaultArrayMerge;
        return arrayMerge(target, source, optionsArgument)
    } else {
        return mergeObject(target, source, optionsArgument)
    }
}

deepmerge.all = function deepmergeAll(array, optionsArgument) {
    if (!Array.isArray(array) || array.length < 2) {
        throw new Error('first argument should be an array with at least two elements')
    }

    // we are sure there are at least 2 values, so it is safe to have no initial value
    return array.reduce(function(prev, next) {
        return deepmerge(prev, next, optionsArgument)
    })
};

var deepmerge_1 = deepmerge;

module.exports = deepmerge_1;


/***/ }),

/***/ "3c5d":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__("ebb5");
var toLength = __webpack_require__("50c4");
var toOffset = __webpack_require__("182d");
var toObject = __webpack_require__("7b0b");
var fails = __webpack_require__("d039");

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

var FORCED = fails(function () {
  // eslint-disable-next-line no-undef
  new Int8Array(1).set({});
});

// `%TypedArray%.prototype.set` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.set
exportTypedArrayMethod('set', function set(arrayLike /* , offset */) {
  aTypedArray(this);
  var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
  var length = this.length;
  var src = toObject(arrayLike);
  var len = toLength(src.length);
  var index = 0;
  if (len + offset > length) throw RangeError('Wrong length');
  while (index < len) this[offset + index] = src[index++];
}, FORCED);


/***/ }),

/***/ "3ca3":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var charAt = __webpack_require__("6547").charAt;
var InternalStateModule = __webpack_require__("69f3");
var defineIterator = __webpack_require__("7dd0");

var STRING_ITERATOR = 'String Iterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);

// `String.prototype[@@iterator]` method
// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
defineIterator(String, 'String', function (iterated) {
  setInternalState(this, {
    type: STRING_ITERATOR,
    string: String(iterated),
    index: 0
  });
// `%StringIteratorPrototype%.next` method
// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
}, function next() {
  var state = getInternalState(this);
  var string = state.string;
  var index = state.index;
  var point;
  if (index >= string.length) return { value: undefined, done: true };
  point = charAt(string, index);
  state.index += point.length;
  return { value: point, done: false };
});


/***/ }),

/***/ "3d56":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "3f6b":
/***/ (function(module, exports, __webpack_require__) {

module.exports = { "default": __webpack_require__("b9c7"), __esModule: true };

/***/ }),

/***/ "3f8c":
/***/ (function(module, exports) {

module.exports = {};


/***/ }),

/***/ "3fcc":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__("ebb5");
var $map = __webpack_require__("b727").map;
var speciesConstructor = __webpack_require__("4840");

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

// `%TypedArray%.prototype.map` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.map
exportTypedArrayMethod('map', function map(mapfn /* , thisArg */) {
  return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {
    return new (aTypedArrayConstructor(speciesConstructor(O, O.constructor)))(length);
  });
});


/***/ }),

/***/ "4010":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("d28b");

__webpack_require__("4160");

__webpack_require__("c975");

__webpack_require__("e260");

__webpack_require__("a434");

__webpack_require__("d3b7");

__webpack_require__("3ca3");

__webpack_require__("159b");

__webpack_require__("ddb0");

exports.__esModule = true;
exports.removeResizeListener = exports.addResizeListener = undefined;

var _resizeObserverPolyfill = __webpack_require__("6dd8");

var _resizeObserverPolyfill2 = _interopRequireDefault(_resizeObserverPolyfill);

function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    default: obj
  };
}

var isServer = typeof window === 'undefined';
/* istanbul ignore next */

var resizeHandler = function resizeHandler(entries) {
  for (var _iterator = entries, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
    var _ref;

    if (_isArray) {
      if (_i >= _iterator.length) break;
      _ref = _iterator[_i++];
    } else {
      _i = _iterator.next();
      if (_i.done) break;
      _ref = _i.value;
    }

    var entry = _ref;
    var listeners = entry.target.__resizeListeners__ || [];

    if (listeners.length) {
      listeners.forEach(function (fn) {
        fn();
      });
    }
  }
};
/* istanbul ignore next */


var addResizeListener = exports.addResizeListener = function addResizeListener(element, fn) {
  if (isServer) return;

  if (!element.__resizeListeners__) {
    element.__resizeListeners__ = [];
    element.__ro__ = new _resizeObserverPolyfill2.default(resizeHandler);

    element.__ro__.observe(element);
  }

  element.__resizeListeners__.push(fn);
};
/* istanbul ignore next */


var removeResizeListener = exports.removeResizeListener = function removeResizeListener(element, fn) {
  if (!element || !element.__resizeListeners__) return;

  element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);

  if (!element.__resizeListeners__.length) {
    element.__ro__.disconnect();
  }
};

/***/ }),

/***/ "408a":
/***/ (function(module, exports, __webpack_require__) {

var classof = __webpack_require__("c6b6");

// `thisNumberValue` abstract operation
// https://tc39.github.io/ecma262/#sec-thisnumbervalue
module.exports = function (value) {
  if (typeof value != 'number' && classof(value) != 'Number') {
    throw TypeError('Incorrect invocation');
  }
  return +value;
};


/***/ }),

/***/ "4127":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("d233");
var formats = __webpack_require__("b313");

var arrayPrefixGenerators = {
    brackets: function brackets(prefix) { // eslint-disable-line func-name-matching
        return prefix + '[]';
    },
    indices: function indices(prefix, key) { // eslint-disable-line func-name-matching
        return prefix + '[' + key + ']';
    },
    repeat: function repeat(prefix) { // eslint-disable-line func-name-matching
        return prefix;
    }
};

var toISO = Date.prototype.toISOString;

var defaults = {
    delimiter: '&',
    encode: true,
    encoder: utils.encode,
    encodeValuesOnly: false,
    serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching
        return toISO.call(date);
    },
    skipNulls: false,
    strictNullHandling: false
};

var stringify = function stringify( // eslint-disable-line func-name-matching
    object,
    prefix,
    generateArrayPrefix,
    strictNullHandling,
    skipNulls,
    encoder,
    filter,
    sort,
    allowDots,
    serializeDate,
    formatter,
    encodeValuesOnly
) {
    var obj = object;
    if (typeof filter === 'function') {
        obj = filter(prefix, obj);
    } else if (obj instanceof Date) {
        obj = serializeDate(obj);
    } else if (obj === null) {
        if (strictNullHandling) {
            return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix;
        }

        obj = '';
    }

    if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) {
        if (encoder) {
            var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder);
            return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))];
        }
        return [formatter(prefix) + '=' + formatter(String(obj))];
    }

    var values = [];

    if (typeof obj === 'undefined') {
        return values;
    }

    var objKeys;
    if (Array.isArray(filter)) {
        objKeys = filter;
    } else {
        var keys = Object.keys(obj);
        objKeys = sort ? keys.sort(sort) : keys;
    }

    for (var i = 0; i < objKeys.length; ++i) {
        var key = objKeys[i];

        if (skipNulls && obj[key] === null) {
            continue;
        }

        if (Array.isArray(obj)) {
            values = values.concat(stringify(
                obj[key],
                generateArrayPrefix(prefix, key),
                generateArrayPrefix,
                strictNullHandling,
                skipNulls,
                encoder,
                filter,
                sort,
                allowDots,
                serializeDate,
                formatter,
                encodeValuesOnly
            ));
        } else {
            values = values.concat(stringify(
                obj[key],
                prefix + (allowDots ? '.' + key : '[' + key + ']'),
                generateArrayPrefix,
                strictNullHandling,
                skipNulls,
                encoder,
                filter,
                sort,
                allowDots,
                serializeDate,
                formatter,
                encodeValuesOnly
            ));
        }
    }

    return values;
};

module.exports = function (object, opts) {
    var obj = object;
    var options = opts ? utils.assign({}, opts) : {};

    if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {
        throw new TypeError('Encoder has to be a function.');
    }

    var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter;
    var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
    var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls;
    var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode;
    var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder;
    var sort = typeof options.sort === 'function' ? options.sort : null;
    var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots;
    var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate;
    var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly;
    if (typeof options.format === 'undefined') {
        options.format = formats['default'];
    } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) {
        throw new TypeError('Unknown format option provided.');
    }
    var formatter = formats.formatters[options.format];
    var objKeys;
    var filter;

    if (typeof options.filter === 'function') {
        filter = options.filter;
        obj = filter('', obj);
    } else if (Array.isArray(options.filter)) {
        filter = options.filter;
        objKeys = filter;
    }

    var keys = [];

    if (typeof obj !== 'object' || obj === null) {
        return '';
    }

    var arrayFormat;
    if (options.arrayFormat in arrayPrefixGenerators) {
        arrayFormat = options.arrayFormat;
    } else if ('indices' in options) {
        arrayFormat = options.indices ? 'indices' : 'repeat';
    } else {
        arrayFormat = 'indices';
    }

    var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];

    if (!objKeys) {
        objKeys = Object.keys(obj);
    }

    if (sort) {
        objKeys.sort(sort);
    }

    for (var i = 0; i < objKeys.length; ++i) {
        var key = objKeys[i];

        if (skipNulls && obj[key] === null) {
            continue;
        }

        keys = keys.concat(stringify(
            obj[key],
            key,
            generateArrayPrefix,
            strictNullHandling,
            skipNulls,
            encode ? encoder : null,
            filter,
            sort,
            allowDots,
            serializeDate,
            formatter,
            encodeValuesOnly
        ));
    }

    var joined = keys.join(delimiter);
    var prefix = options.addQueryPrefix === true ? '?' : '';

    return joined.length > 0 ? prefix + joined : '';
};


/***/ }),

/***/ "4160":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var forEach = __webpack_require__("17c2");

// `Array.prototype.forEach` method
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
$({ target: 'Array', proto: true, forced: [].forEach != forEach }, {
  forEach: forEach
});


/***/ }),

/***/ "417f":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


__webpack_require__("4160");

__webpack_require__("a434");

exports.__esModule = true;

var _vue = __webpack_require__("8bbf");

var _vue2 = _interopRequireDefault(_vue);

var _dom = __webpack_require__("5924");

function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    default: obj
  };
}

var nodeList = [];
var ctx = '@@clickoutsideContext';
var startClick = void 0;
var seed = 0;
!_vue2.default.prototype.$isServer && (0, _dom.on)(document, 'mousedown', function (e) {
  return startClick = e;
});
!_vue2.default.prototype.$isServer && (0, _dom.on)(document, 'mouseup', function (e) {
  nodeList.forEach(function (node) {
    return node[ctx].documentHandler(e, startClick);
  });
});

function createDocumentHandler(el, binding, vnode) {
  return function () {
    var mouseup = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    var mousedown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
    if (!vnode || !vnode.context || !mouseup.target || !mousedown.target || el.contains(mouseup.target) || el.contains(mousedown.target) || el === mouseup.target || vnode.context.popperElm && (vnode.context.popperElm.contains(mouseup.target) || vnode.context.popperElm.contains(mousedown.target))) return;

    if (binding.expression && el[ctx].methodName && vnode.context[el[ctx].methodName]) {
      vnode.context[el[ctx].methodName]();
    } else {
      el[ctx].bindingFn && el[ctx].bindingFn();
    }
  };
}
/**
 * v-clickoutside
 * @desc 点击元素外面才会触发的事件
 * @example
 * ```vue
 * <div v-element-clickoutside="handleClose">
 * ```
 */


exports.default = {
  bind: function bind(el, binding, vnode) {
    nodeList.push(el);
    var id = seed++;
    el[ctx] = {
      id: id,
      documentHandler: createDocumentHandler(el, binding, vnode),
      methodName: binding.expression,
      bindingFn: binding.value
    };
  },
  update: function update(el, binding, vnode) {
    el[ctx].documentHandler = createDocumentHandler(el, binding, vnode);
    el[ctx].methodName = binding.expression;
    el[ctx].bindingFn = binding.value;
  },
  unbind: function unbind(el) {
    var len = nodeList.length;

    for (var i = 0; i < len; i++) {
      if (nodeList[i][ctx].id === el[ctx].id) {
        nodeList.splice(i, 1);
        break;
      }
    }

    delete el[ctx];
  }
};

/***/ }),

/***/ "41b2":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _assign = __webpack_require__("3f6b");

var _assign2 = _interopRequireDefault(_assign);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = _assign2.default || function (target) {
  for (var i = 1; i < arguments.length; i++) {
    var source = arguments[i];

    for (var key in source) {
      if (Object.prototype.hasOwnProperty.call(source, key)) {
        target[key] = source[key];
      }
    }
  }

  return target;
};

/***/ }),

/***/ "41f8":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("d28b");

__webpack_require__("e260");

__webpack_require__("d3b7");

__webpack_require__("3ca3");

__webpack_require__("ddb0");

var _typeof2 = __webpack_require__("7037");

exports.__esModule = true;

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

exports.isVNode = isVNode;

var _util = __webpack_require__("8122");

function isVNode(node) {
  return node !== null && (typeof node === 'undefined' ? 'undefined' : _typeof(node)) === 'object' && (0, _util.hasOwn)(node, 'componentOptions');
}

;

/***/ }),

/***/ "428f":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");

module.exports = global;


/***/ }),

/***/ "4328":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var stringify = __webpack_require__("4127");
var parse = __webpack_require__("9e6a");
var formats = __webpack_require__("b313");

module.exports = {
    formats: formats,
    parse: parse,
    stringify: stringify
};


/***/ }),

/***/ "4362":
/***/ (function(module, exports, __webpack_require__) {

exports.nextTick = function nextTick(fn) {
    var args = Array.prototype.slice.call(arguments);
    args.shift();
    setTimeout(function () {
        fn.apply(null, args);
    }, 0);
};

exports.platform = exports.arch = 
exports.execPath = exports.title = 'browser';
exports.pid = 1;
exports.browser = true;
exports.env = {};
exports.argv = [];

exports.binding = function (name) {
	throw new Error('No such module. (Possibly not yet loaded)')
};

(function () {
    var cwd = '/';
    var path;
    exports.cwd = function () { return cwd };
    exports.chdir = function (dir) {
        if (!path) path = __webpack_require__("df7c");
        cwd = path.resolve(dir, cwd);
    };
})();

exports.exit = exports.kill = 
exports.umask = exports.dlopen = 
exports.uptime = exports.memoryUsage = 
exports.uvCounters = function() {};
exports.features = {};


/***/ }),

/***/ "43b2":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "43e3":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_icon_picker_vue_vue_type_style_index_1_id_d232a082_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a3c7");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_icon_picker_vue_vue_type_style_index_1_id_d232a082_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_icon_picker_vue_vue_type_style_index_1_id_d232a082_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_icon_picker_vue_vue_type_style_index_1_id_d232a082_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "44ad":
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__("d039");
var classof = __webpack_require__("c6b6");

var split = ''.split;

// fallback for non-array-like ES3 and non-enumerable old V8 strings
module.exports = fails(function () {
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  // eslint-disable-next-line no-prototype-builtins
  return !Object('z').propertyIsEnumerable(0);
}) ? function (it) {
  return classof(it) == 'String' ? split.call(it, '') : Object(it);
} : Object;


/***/ }),

/***/ "44d2":
/***/ (function(module, exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__("b622");
var create = __webpack_require__("7c73");
var definePropertyModule = __webpack_require__("9bf2");

var UNSCOPABLES = wellKnownSymbol('unscopables');
var ArrayPrototype = Array.prototype;

// Array.prototype[@@unscopables]
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
if (ArrayPrototype[UNSCOPABLES] == undefined) {
  definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
    configurable: true,
    value: create(null)
  });
}

// add a key to Array.prototype[@@unscopables]
module.exports = function (key) {
  ArrayPrototype[UNSCOPABLES][key] = true;
};


/***/ }),

/***/ "44de":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");

module.exports = function (a, b) {
  var console = global.console;
  if (console && console.error) {
    arguments.length === 1 ? console.error(a) : console.error(a, b);
  }
};


/***/ }),

/***/ "44e7":
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__("861d");
var classof = __webpack_require__("c6b6");
var wellKnownSymbol = __webpack_require__("b622");

var MATCH = wellKnownSymbol('match');

// `IsRegExp` abstract operation
// https://tc39.github.io/ecma262/#sec-isregexp
module.exports = function (it) {
  var isRegExp;
  return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');
};


/***/ }),

/***/ "45fb":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_slider_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("e240");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_slider_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_slider_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_slider_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "45fc":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var $some = __webpack_require__("b727").some;
var arrayMethodIsStrict = __webpack_require__("a640");
var arrayMethodUsesToLength = __webpack_require__("ae40");

var STRICT_METHOD = arrayMethodIsStrict('some');
var USES_TO_LENGTH = arrayMethodUsesToLength('some');

// `Array.prototype.some` method
// https://tc39.github.io/ecma262/#sec-array.prototype.some
$({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH }, {
  some: function some(callbackfn /* , thisArg */) {
    return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),

/***/ "466d":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fixRegExpWellKnownSymbolLogic = __webpack_require__("d784");
var anObject = __webpack_require__("825a");
var toLength = __webpack_require__("50c4");
var requireObjectCoercible = __webpack_require__("1d80");
var advanceStringIndex = __webpack_require__("8aa5");
var regExpExec = __webpack_require__("14c3");

// @@match logic
fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
  return [
    // `String.prototype.match` method
    // https://tc39.github.io/ecma262/#sec-string.prototype.match
    function match(regexp) {
      var O = requireObjectCoercible(this);
      var matcher = regexp == undefined ? undefined : regexp[MATCH];
      return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
    },
    // `RegExp.prototype[@@match]` method
    // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
    function (regexp) {
      var res = maybeCallNative(nativeMatch, regexp, this);
      if (res.done) return res.value;

      var rx = anObject(regexp);
      var S = String(this);

      if (!rx.global) return regExpExec(rx, S);

      var fullUnicode = rx.unicode;
      rx.lastIndex = 0;
      var A = [];
      var n = 0;
      var result;
      while ((result = regExpExec(rx, S)) !== null) {
        var matchStr = String(result[0]);
        A[n] = matchStr;
        if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
        n++;
      }
      return n === 0 ? null : A;
    }
  ];
});


/***/ }),

/***/ "467f":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var createError = __webpack_require__("2d83");

/**
 * Resolve or reject a Promise based on response status.
 *
 * @param {Function} resolve A function that resolves the promise.
 * @param {Function} reject A function that rejects the promise.
 * @param {object} response The response.
 */
module.exports = function settle(resolve, reject, response) {
  var validateStatus = response.config.validateStatus;
  if (!response.status || !validateStatus || validateStatus(response.status)) {
    resolve(response);
  } else {
    reject(createError(
      'Request failed with status code ' + response.status,
      response.config,
      null,
      response.request,
      response
    ));
  }
};


/***/ }),

/***/ "4726":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("944a");

__webpack_require__("99af");

__webpack_require__("a623");

__webpack_require__("4de4");

__webpack_require__("4160");

__webpack_require__("c975");

__webpack_require__("e260");

__webpack_require__("a15b");

__webpack_require__("d81d");

__webpack_require__("13d5");

__webpack_require__("fb6a");

__webpack_require__("45fc");

__webpack_require__("b0c0");

__webpack_require__("0c47");

__webpack_require__("23dc");

__webpack_require__("a9e3");

__webpack_require__("cca6");

__webpack_require__("d3b7");

__webpack_require__("ac1f");

__webpack_require__("1276");

__webpack_require__("159b");

__webpack_require__("ddb0");

var _typeof = __webpack_require__("7037");

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

  /******/

  /******/
  // Load entry module and return exports

  /******/

  return __webpack_require__(__webpack_require__.s = 59);
  /******/
}(
/************************************************************************/

/******/
{
  /***/
  0:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";
    /* harmony export (binding) */

    __webpack_require__.d(__webpack_exports__, "a", function () {
      return normalizeComponent;
    });
    /* globals __VUE_SSR_CONTEXT__ */
    // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
    // This module is a runtime utility for cleaner component module output and will
    // be included in the final webpack user bundle.


    function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier,
    /* server only */
    shadowMode
    /* vue-cli only */
    ) {
      // Vue.extend constructor export interop
      var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports; // render functions

      if (render) {
        options.render = render;
        options.staticRenderFns = staticRenderFns;
        options._compiled = true;
      } // functional template


      if (functionalTemplate) {
        options.functional = true;
      } // scopedId


      if (scopeId) {
        options._scopeId = 'data-v-' + scopeId;
      }

      var hook;

      if (moduleIdentifier) {
        // server build
        hook = function hook(context) {
          // 2.3 injection
          context = context || // cached call
          this.$vnode && this.$vnode.ssrContext || // stateful
          this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
          // 2.2 with runInNewContext: true

          if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
            context = __VUE_SSR_CONTEXT__;
          } // inject component styles


          if (injectStyles) {
            injectStyles.call(this, context);
          } // register component module identifier for async chunk inferrence


          if (context && context._registeredComponents) {
            context._registeredComponents.add(moduleIdentifier);
          }
        }; // used by ssr in case component is cached and beforeCreate
        // never gets called


        options._ssrRegister = hook;
      } else if (injectStyles) {
        hook = shadowMode ? function () {
          injectStyles.call(this, this.$root.$options.shadowRoot);
        } : injectStyles;
      }

      if (hook) {
        if (options.functional) {
          // for template-only hot-reload because in that case the render fn doesn't
          // go through the normalizer
          options._injectStyles = hook; // register for functioal component in vue file

          var originalRender = options.render;

          options.render = function renderWithStyleInjection(h, context) {
            hook.call(context);
            return originalRender(h, context);
          };
        } else {
          // inject component registration as beforeCreate hook
          var existing = options.beforeCreate;
          options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
        }
      }

      return {
        exports: scriptExports,
        options: options
      };
    }
    /***/

  },

  /***/
  14:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("14e9");
    /***/
  },

  /***/
  18:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("dcdc");
    /***/
  },

  /***/
  21:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("d397");
    /***/
  },

  /***/
  26:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("92fa");
    /***/
  },

  /***/
  3:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("8122");
    /***/
  },

  /***/
  31:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("2a5e");
    /***/
  },

  /***/
  32:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("e452");
    /***/
  },

  /***/
  51:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("f494");
    /***/
  },

  /***/
  59:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-panel.vue?vue&type=template&id=34932346&


    var cascader_panelvue_type_template_id_34932346_render = function cascader_panelvue_type_template_id_34932346_render() {
      var _vm = this;

      var _h = _vm.$createElement;

      var _c = _vm._self._c || _h;

      return _c("div", {
        class: ["el-cascader-panel", _vm.border && "is-bordered"],
        on: {
          keydown: _vm.handleKeyDown
        }
      }, _vm._l(_vm.menus, function (menu, index) {
        return _c("cascader-menu", {
          key: index,
          ref: "menu",
          refInFor: true,
          attrs: {
            index: index,
            nodes: menu
          }
        });
      }), 1);
    };

    var staticRenderFns = [];
    cascader_panelvue_type_template_id_34932346_render._withStripped = true; // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue?vue&type=template&id=34932346&
    // EXTERNAL MODULE: external "babel-helper-vue-jsx-merge-props"

    var external_babel_helper_vue_jsx_merge_props_ = __webpack_require__(26);

    var external_babel_helper_vue_jsx_merge_props_default = /*#__PURE__*/__webpack_require__.n(external_babel_helper_vue_jsx_merge_props_); // EXTERNAL MODULE: external "element-ui/lib/scrollbar"


    var scrollbar_ = __webpack_require__(14);

    var scrollbar_default = /*#__PURE__*/__webpack_require__.n(scrollbar_); // EXTERNAL MODULE: external "element-ui/lib/checkbox"


    var checkbox_ = __webpack_require__(18);

    var checkbox_default = /*#__PURE__*/__webpack_require__.n(checkbox_); // EXTERNAL MODULE: external "element-ui/lib/radio"


    var radio_ = __webpack_require__(51);

    var radio_default = /*#__PURE__*/__webpack_require__.n(radio_); // EXTERNAL MODULE: external "element-ui/lib/utils/util"


    var util_ = __webpack_require__(3); // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-node.vue?vue&type=script&lang=js&


    var stopPropagation = function stopPropagation(e) {
      return e.stopPropagation();
    };
    /* harmony default export */


    var cascader_nodevue_type_script_lang_js_ = {
      inject: ['panel'],
      components: {
        ElCheckbox: checkbox_default.a,
        ElRadio: radio_default.a
      },
      props: {
        node: {
          required: true
        },
        nodeId: String
      },
      computed: {
        config: function config() {
          return this.panel.config;
        },
        isLeaf: function isLeaf() {
          return this.node.isLeaf;
        },
        isDisabled: function isDisabled() {
          return this.node.isDisabled;
        },
        checkedValue: function checkedValue() {
          return this.panel.checkedValue;
        },
        isChecked: function isChecked() {
          return this.node.isSameNode(this.checkedValue);
        },
        inActivePath: function inActivePath() {
          return this.isInPath(this.panel.activePath);
        },
        inCheckedPath: function inCheckedPath() {
          var _this = this;

          if (!this.config.checkStrictly) return false;
          return this.panel.checkedNodePaths.some(function (checkedPath) {
            return _this.isInPath(checkedPath);
          });
        },
        value: function value() {
          return this.node.getValueByOption();
        }
      },
      methods: {
        handleExpand: function handleExpand() {
          var _this2 = this;

          var panel = this.panel,
              node = this.node,
              isDisabled = this.isDisabled,
              config = this.config;
          var multiple = config.multiple,
              checkStrictly = config.checkStrictly;
          if (!checkStrictly && isDisabled || node.loading) return;

          if (config.lazy && !node.loaded) {
            panel.lazyLoad(node, function () {
              // do not use cached leaf value here, invoke this.isLeaf to get new value.
              var isLeaf = _this2.isLeaf;
              if (!isLeaf) _this2.handleExpand();

              if (multiple) {
                // if leaf sync checked state, else clear checked state
                var checked = isLeaf ? node.checked : false;

                _this2.handleMultiCheckChange(checked);
              }
            });
          } else {
            panel.handleExpand(node);
          }
        },
        handleCheckChange: function handleCheckChange() {
          var panel = this.panel,
              value = this.value,
              node = this.node;
          panel.handleCheckChange(value);
          panel.handleExpand(node);
        },
        handleMultiCheckChange: function handleMultiCheckChange(checked) {
          this.node.doCheck(checked);
          this.panel.calculateMultiCheckedValue();
        },
        isInPath: function isInPath(pathNodes) {
          var node = this.node;
          var selectedPathNode = pathNodes[node.level - 1] || {};
          return selectedPathNode.uid === node.uid;
        },
        renderPrefix: function renderPrefix(h) {
          var isLeaf = this.isLeaf,
              isChecked = this.isChecked,
              config = this.config;
          var checkStrictly = config.checkStrictly,
              multiple = config.multiple;

          if (multiple) {
            return this.renderCheckbox(h);
          } else if (checkStrictly) {
            return this.renderRadio(h);
          } else if (isLeaf && isChecked) {
            return this.renderCheckIcon(h);
          }

          return null;
        },
        renderPostfix: function renderPostfix(h) {
          var node = this.node,
              isLeaf = this.isLeaf;

          if (node.loading) {
            return this.renderLoadingIcon(h);
          } else if (!isLeaf) {
            return this.renderExpandIcon(h);
          }

          return null;
        },
        renderCheckbox: function renderCheckbox(h) {
          var node = this.node,
              config = this.config,
              isDisabled = this.isDisabled;
          var events = {
            on: {
              change: this.handleMultiCheckChange
            },
            nativeOn: {}
          };

          if (config.checkStrictly) {
            // when every node is selectable, click event should not trigger expand event.
            events.nativeOn.click = stopPropagation;
          }

          return h('el-checkbox', external_babel_helper_vue_jsx_merge_props_default()([{
            attrs: {
              value: node.checked,
              indeterminate: node.indeterminate,
              disabled: isDisabled
            }
          }, events]));
        },
        renderRadio: function renderRadio(h) {
          var checkedValue = this.checkedValue,
              value = this.value,
              isDisabled = this.isDisabled; // to keep same reference if value cause radio's checked state is calculated by reference comparision;

          if (Object(util_["isEqual"])(value, checkedValue)) {
            value = checkedValue;
          }

          return h('el-radio', {
            attrs: {
              value: checkedValue,
              label: value,
              disabled: isDisabled
            },
            on: {
              'change': this.handleCheckChange
            },
            nativeOn: {
              'click': stopPropagation
            }
          }, [h('span')]);
        },
        renderCheckIcon: function renderCheckIcon(h) {
          return h('i', {
            'class': 'el-icon-check el-cascader-node__prefix'
          });
        },
        renderLoadingIcon: function renderLoadingIcon(h) {
          return h('i', {
            'class': 'el-icon-loading el-cascader-node__postfix'
          });
        },
        renderExpandIcon: function renderExpandIcon(h) {
          return h('i', {
            'class': 'el-icon-arrow-right el-cascader-node__postfix'
          });
        },
        renderContent: function renderContent(h) {
          var panel = this.panel,
              node = this.node;
          var render = panel.renderLabelFn;
          var vnode = render ? render({
            node: node,
            data: node.data
          }) : null;
          return h('span', {
            'class': 'el-cascader-node__label'
          }, [vnode || node.label]);
        }
      },
      render: function render(h) {
        var _this3 = this;

        var inActivePath = this.inActivePath,
            inCheckedPath = this.inCheckedPath,
            isChecked = this.isChecked,
            isLeaf = this.isLeaf,
            isDisabled = this.isDisabled,
            config = this.config,
            nodeId = this.nodeId;
        var expandTrigger = config.expandTrigger,
            checkStrictly = config.checkStrictly,
            multiple = config.multiple;
        var disabled = !checkStrictly && isDisabled;
        var events = {
          on: {}
        };

        if (expandTrigger === 'click') {
          events.on.click = this.handleExpand;
        } else {
          events.on.mouseenter = function (e) {
            _this3.handleExpand();

            _this3.$emit('expand', e);
          };

          events.on.focus = function (e) {
            _this3.handleExpand();

            _this3.$emit('expand', e);
          };
        }

        if (isLeaf && !isDisabled && !checkStrictly && !multiple) {
          events.on.click = this.handleCheckChange;
        }

        return h('li', external_babel_helper_vue_jsx_merge_props_default()([{
          attrs: {
            role: 'menuitem',
            id: nodeId,
            'aria-expanded': inActivePath,
            tabindex: disabled ? null : -1
          },
          'class': {
            'el-cascader-node': true,
            'is-selectable': checkStrictly,
            'in-active-path': inActivePath,
            'in-checked-path': inCheckedPath,
            'is-active': isChecked,
            'is-disabled': disabled
          }
        }, events]), [this.renderPrefix(h), this.renderContent(h), this.renderPostfix(h)]);
      }
    }; // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-node.vue?vue&type=script&lang=js&

    /* harmony default export */

    var src_cascader_nodevue_type_script_lang_js_ = cascader_nodevue_type_script_lang_js_; // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js

    var componentNormalizer = __webpack_require__(0); // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-node.vue


    var cascader_node_render, cascader_node_staticRenderFns;
    /* normalize component */

    var component = Object(componentNormalizer["a"
    /* default */
    ])(src_cascader_nodevue_type_script_lang_js_, cascader_node_render, cascader_node_staticRenderFns, false, null, null, null);
    /* hot reload */

    if (false) { var api; }

    component.options.__file = "packages/cascader-panel/src/cascader-node.vue";
    /* harmony default export */

    var cascader_node = component.exports; // EXTERNAL MODULE: external "element-ui/lib/mixins/locale"

    var locale_ = __webpack_require__(6);

    var locale_default = /*#__PURE__*/__webpack_require__.n(locale_); // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-menu.vue?vue&type=script&lang=js&

    /* harmony default export */


    var cascader_menuvue_type_script_lang_js_ = {
      name: 'ElCascaderMenu',
      mixins: [locale_default.a],
      inject: ['panel'],
      components: {
        ElScrollbar: scrollbar_default.a,
        CascaderNode: cascader_node
      },
      props: {
        nodes: {
          type: Array,
          required: true
        },
        index: Number
      },
      data: function data() {
        return {
          activeNode: null,
          hoverTimer: null,
          id: Object(util_["generateId"])()
        };
      },
      computed: {
        isEmpty: function isEmpty() {
          return !this.nodes.length;
        },
        menuId: function menuId() {
          return 'cascader-menu-' + this.id + '-' + this.index;
        }
      },
      methods: {
        handleExpand: function handleExpand(e) {
          this.activeNode = e.target;
        },
        handleMouseMove: function handleMouseMove(e) {
          var activeNode = this.activeNode,
              hoverTimer = this.hoverTimer;
          var hoverZone = this.$refs.hoverZone;
          if (!activeNode || !hoverZone) return;

          if (activeNode.contains(e.target)) {
            clearTimeout(hoverTimer);

            var _$el$getBoundingClien = this.$el.getBoundingClientRect(),
                left = _$el$getBoundingClien.left;

            var startX = e.clientX - left;
            var _$el = this.$el,
                offsetWidth = _$el.offsetWidth,
                offsetHeight = _$el.offsetHeight;
            var top = activeNode.offsetTop;
            var bottom = top + activeNode.offsetHeight;
            hoverZone.innerHTML = '\n          <path style="pointer-events: auto;" fill="transparent" d="M' + startX + ' ' + top + ' L' + offsetWidth + ' 0 V' + top + ' Z" />\n          <path style="pointer-events: auto;" fill="transparent" d="M' + startX + ' ' + bottom + ' L' + offsetWidth + ' ' + offsetHeight + ' V' + bottom + ' Z" />\n        ';
          } else if (!hoverTimer) {
            this.hoverTimer = setTimeout(this.clearHoverZone, this.panel.config.hoverThreshold);
          }
        },
        clearHoverZone: function clearHoverZone() {
          var hoverZone = this.$refs.hoverZone;
          if (!hoverZone) return;
          hoverZone.innerHTML = '';
        },
        renderEmptyText: function renderEmptyText(h) {
          return h('div', {
            'class': 'el-cascader-menu__empty-text'
          }, [this.t('el.cascader.noData')]);
        },
        renderNodeList: function renderNodeList(h) {
          var menuId = this.menuId;
          var isHoverMenu = this.panel.isHoverMenu;
          var events = {
            on: {}
          };

          if (isHoverMenu) {
            events.on.expand = this.handleExpand;
          }

          var nodes = this.nodes.map(function (node, index) {
            var hasChildren = node.hasChildren;
            return h('cascader-node', external_babel_helper_vue_jsx_merge_props_default()([{
              key: node.uid,
              attrs: {
                node: node,
                'node-id': menuId + '-' + index,
                'aria-haspopup': hasChildren,
                'aria-owns': hasChildren ? menuId : null
              }
            }, events]));
          });
          return [].concat(nodes, [isHoverMenu ? h('svg', {
            ref: 'hoverZone',
            'class': 'el-cascader-menu__hover-zone'
          }) : null]);
        }
      },
      render: function render(h) {
        var isEmpty = this.isEmpty,
            menuId = this.menuId;
        var events = {
          nativeOn: {}
        }; // optimize hover to expand experience (#8010)

        if (this.panel.isHoverMenu) {
          events.nativeOn.mousemove = this.handleMouseMove; // events.nativeOn.mouseleave = this.clearHoverZone;
        }

        return h('el-scrollbar', external_babel_helper_vue_jsx_merge_props_default()([{
          attrs: {
            tag: 'ul',
            role: 'menu',
            id: menuId,
            'wrap-class': 'el-cascader-menu__wrap',
            'view-class': {
              'el-cascader-menu__list': true,
              'is-empty': isEmpty
            }
          },
          'class': 'el-cascader-menu'
        }, events]), [isEmpty ? this.renderEmptyText(h) : this.renderNodeList(h)]);
      }
    }; // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-menu.vue?vue&type=script&lang=js&

    /* harmony default export */

    var src_cascader_menuvue_type_script_lang_js_ = cascader_menuvue_type_script_lang_js_; // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-menu.vue

    var cascader_menu_render, cascader_menu_staticRenderFns;
    /* normalize component */

    var cascader_menu_component = Object(componentNormalizer["a"
    /* default */
    ])(src_cascader_menuvue_type_script_lang_js_, cascader_menu_render, cascader_menu_staticRenderFns, false, null, null, null);
    /* hot reload */

    if (false) { var cascader_menu_api; }

    cascader_menu_component.options.__file = "packages/cascader-panel/src/cascader-menu.vue";
    /* harmony default export */

    var cascader_menu = cascader_menu_component.exports; // EXTERNAL MODULE: external "element-ui/lib/utils/shared"

    var shared_ = __webpack_require__(21); // CONCATENATED MODULE: ./packages/cascader-panel/src/node.js


    var _createClass = function () {
      function defineProperties(target, props) {
        for (var i = 0; i < props.length; i++) {
          var descriptor = props[i];
          descriptor.enumerable = descriptor.enumerable || false;
          descriptor.configurable = true;
          if ("value" in descriptor) descriptor.writable = true;
          Object.defineProperty(target, descriptor.key, descriptor);
        }
      }

      return function (Constructor, protoProps, staticProps) {
        if (protoProps) defineProperties(Constructor.prototype, protoProps);
        if (staticProps) defineProperties(Constructor, staticProps);
        return Constructor;
      };
    }();

    function _classCallCheck(instance, Constructor) {
      if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
      }
    }

    var uid = 0;

    var node_Node = function () {
      function Node(data, config, parentNode) {
        _classCallCheck(this, Node);

        this.data = data;
        this.config = config;
        this.parent = parentNode || null;
        this.level = !this.parent ? 1 : this.parent.level + 1;
        this.uid = uid++;
        this.initState();
        this.initChildren();
      }

      Node.prototype.initState = function initState() {
        var _config = this.config,
            valueKey = _config.value,
            labelKey = _config.label;
        this.value = this.data[valueKey];
        this.label = this.data[labelKey];
        this.pathNodes = this.calculatePathNodes();
        this.path = this.pathNodes.map(function (node) {
          return node.value;
        });
        this.pathLabels = this.pathNodes.map(function (node) {
          return node.label;
        }); // lazy load

        this.loading = false;
        this.loaded = false;
      };

      Node.prototype.initChildren = function initChildren() {
        var _this = this;

        var config = this.config;
        var childrenKey = config.children;
        var childrenData = this.data[childrenKey];
        this.hasChildren = Array.isArray(childrenData);
        this.children = (childrenData || []).map(function (child) {
          return new Node(child, config, _this);
        });
      };

      Node.prototype.calculatePathNodes = function calculatePathNodes() {
        var nodes = [this];
        var parent = this.parent;

        while (parent) {
          nodes.unshift(parent);
          parent = parent.parent;
        }

        return nodes;
      };

      Node.prototype.getPath = function getPath() {
        return this.path;
      };

      Node.prototype.getValue = function getValue() {
        return this.value;
      };

      Node.prototype.getValueByOption = function getValueByOption() {
        return this.config.emitPath ? this.getPath() : this.getValue();
      };

      Node.prototype.getText = function getText(allLevels, separator) {
        return allLevels ? this.pathLabels.join(separator) : this.label;
      };

      Node.prototype.isSameNode = function isSameNode(checkedValue) {
        var value = this.getValueByOption();
        return this.config.multiple && Array.isArray(checkedValue) ? checkedValue.some(function (val) {
          return Object(util_["isEqual"])(val, value);
        }) : Object(util_["isEqual"])(checkedValue, value);
      };

      Node.prototype.broadcast = function broadcast(event) {
        for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
          args[_key - 1] = arguments[_key];
        }

        var handlerName = 'onParent' + Object(util_["capitalize"])(event);
        this.children.forEach(function (child) {
          if (child) {
            // bottom up
            child.broadcast.apply(child, [event].concat(args));
            child[handlerName] && child[handlerName].apply(child, args);
          }
        });
      };

      Node.prototype.emit = function emit(event) {
        var parent = this.parent;
        var handlerName = 'onChild' + Object(util_["capitalize"])(event);

        if (parent) {
          for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
            args[_key2 - 1] = arguments[_key2];
          }

          parent[handlerName] && parent[handlerName].apply(parent, args);
          parent.emit.apply(parent, [event].concat(args));
        }
      };

      Node.prototype.onParentCheck = function onParentCheck(checked) {
        if (!this.isDisabled) {
          this.setCheckState(checked);
        }
      };

      Node.prototype.onChildCheck = function onChildCheck() {
        var children = this.children;
        var validChildren = children.filter(function (child) {
          return !child.isDisabled;
        });
        var checked = validChildren.length ? validChildren.every(function (child) {
          return child.checked;
        }) : false;
        this.setCheckState(checked);
      };

      Node.prototype.setCheckState = function setCheckState(checked) {
        var totalNum = this.children.length;
        var checkedNum = this.children.reduce(function (c, p) {
          var num = p.checked ? 1 : p.indeterminate ? 0.5 : 0;
          return c + num;
        }, 0);
        this.checked = checked;
        this.indeterminate = checkedNum !== totalNum && checkedNum > 0;
      };

      Node.prototype.syncCheckState = function syncCheckState(checkedValue) {
        var value = this.getValueByOption();
        var checked = this.isSameNode(checkedValue, value);
        this.doCheck(checked);
      };

      Node.prototype.doCheck = function doCheck(checked) {
        if (this.checked !== checked) {
          if (this.config.checkStrictly) {
            this.checked = checked;
          } else {
            // bottom up to unify the calculation of the indeterminate state
            this.broadcast('check', checked);
            this.setCheckState(checked);
            this.emit('check');
          }
        }
      };

      _createClass(Node, [{
        key: 'isDisabled',
        get: function get() {
          var data = this.data,
              parent = this.parent,
              config = this.config;
          var disabledKey = config.disabled;
          var checkStrictly = config.checkStrictly;
          return data[disabledKey] || !checkStrictly && parent && parent.isDisabled;
        }
      }, {
        key: 'isLeaf',
        get: function get() {
          var data = this.data,
              loaded = this.loaded,
              hasChildren = this.hasChildren,
              children = this.children;
          var _config2 = this.config,
              lazy = _config2.lazy,
              leafKey = _config2.leaf;

          if (lazy) {
            var isLeaf = Object(shared_["isDef"])(data[leafKey]) ? data[leafKey] : loaded ? !children.length : false;
            this.hasChildren = !isLeaf;
            return isLeaf;
          }

          return !hasChildren;
        }
      }]);

      return Node;
    }();
    /* harmony default export */


    var src_node = node_Node; // CONCATENATED MODULE: ./packages/cascader-panel/src/store.js

    function store_classCallCheck(instance, Constructor) {
      if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
      }
    }

    var flatNodes = function flatNodes(data, leafOnly) {
      return data.reduce(function (res, node) {
        if (node.isLeaf) {
          res.push(node);
        } else {
          !leafOnly && res.push(node);
          res = res.concat(flatNodes(node.children, leafOnly));
        }

        return res;
      }, []);
    };

    var store_Store = function () {
      function Store(data, config) {
        store_classCallCheck(this, Store);
        this.config = config;
        this.initNodes(data);
      }

      Store.prototype.initNodes = function initNodes(data) {
        var _this = this;

        data = Object(util_["coerceTruthyValueToArray"])(data);
        this.nodes = data.map(function (nodeData) {
          return new src_node(nodeData, _this.config);
        });
        this.flattedNodes = this.getFlattedNodes(false, false);
        this.leafNodes = this.getFlattedNodes(true, false);
      };

      Store.prototype.appendNode = function appendNode(nodeData, parentNode) {
        var node = new src_node(nodeData, this.config, parentNode);
        var children = parentNode ? parentNode.children : this.nodes;
        children.push(node);
      };

      Store.prototype.appendNodes = function appendNodes(nodeDataList, parentNode) {
        var _this2 = this;

        nodeDataList = Object(util_["coerceTruthyValueToArray"])(nodeDataList);
        nodeDataList.forEach(function (nodeData) {
          return _this2.appendNode(nodeData, parentNode);
        });
      };

      Store.prototype.getNodes = function getNodes() {
        return this.nodes;
      };

      Store.prototype.getFlattedNodes = function getFlattedNodes(leafOnly) {
        var cached = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
        var cachedNodes = leafOnly ? this.leafNodes : this.flattedNodes;
        return cached ? cachedNodes : flatNodes(this.nodes, leafOnly);
      };

      Store.prototype.getNodeByValue = function getNodeByValue(value) {
        if (value) {
          var nodes = this.getFlattedNodes(false, !this.config.lazy).filter(function (node) {
            return Object(util_["valueEquals"])(node.path, value) || node.value === value;
          });
          return nodes && nodes.length ? nodes[0] : null;
        }

        return null;
      };

      return Store;
    }();
    /* harmony default export */


    var src_store = store_Store; // EXTERNAL MODULE: external "element-ui/lib/utils/merge"

    var merge_ = __webpack_require__(9);

    var merge_default = /*#__PURE__*/__webpack_require__.n(merge_); // EXTERNAL MODULE: external "element-ui/lib/utils/aria-utils"


    var aria_utils_ = __webpack_require__(32);

    var aria_utils_default = /*#__PURE__*/__webpack_require__.n(aria_utils_); // EXTERNAL MODULE: external "element-ui/lib/utils/scroll-into-view"


    var scroll_into_view_ = __webpack_require__(31);

    var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_view_); // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-panel.vue?vue&type=script&lang=js&


    var _extends = Object.assign || function (target) {
      for (var i = 1; i < arguments.length; i++) {
        var source = arguments[i];

        for (var key in source) {
          if (Object.prototype.hasOwnProperty.call(source, key)) {
            target[key] = source[key];
          }
        }
      }

      return target;
    }; //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //


    var KeyCode = aria_utils_default.a.keys;
    var DefaultProps = {
      expandTrigger: 'click',
      // or hover
      multiple: false,
      checkStrictly: false,
      // whether all nodes can be selected
      emitPath: true,
      // wether to emit an array of all levels value in which node is located
      lazy: false,
      lazyLoad: util_["noop"],
      value: 'value',
      label: 'label',
      children: 'children',
      leaf: 'leaf',
      disabled: 'disabled',
      hoverThreshold: 500
    };

    var cascader_panelvue_type_script_lang_js_isLeaf = function isLeaf(el) {
      return !el.getAttribute('aria-owns');
    };

    var getSibling = function getSibling(el, distance) {
      var parentNode = el.parentNode;

      if (parentNode) {
        var siblings = parentNode.querySelectorAll('.el-cascader-node[tabindex="-1"]');
        var index = Array.prototype.indexOf.call(siblings, el);
        return siblings[index + distance] || null;
      }

      return null;
    };

    var getMenuIndex = function getMenuIndex(el, distance) {
      if (!el) return;
      var pieces = el.id.split('-');
      return Number(pieces[pieces.length - 2]);
    };

    var focusNode = function focusNode(el) {
      if (!el) return;
      el.focus();
      !cascader_panelvue_type_script_lang_js_isLeaf(el) && el.click();
    };

    var checkNode = function checkNode(el) {
      if (!el) return;
      var input = el.querySelector('input');

      if (input) {
        input.click();
      } else if (cascader_panelvue_type_script_lang_js_isLeaf(el)) {
        el.click();
      }
    };
    /* harmony default export */


    var cascader_panelvue_type_script_lang_js_ = {
      name: 'ElCascaderPanel',
      components: {
        CascaderMenu: cascader_menu
      },
      props: {
        value: {},
        options: Array,
        props: Object,
        border: {
          type: Boolean,
          default: true
        },
        renderLabel: Function
      },
      provide: function provide() {
        return {
          panel: this
        };
      },
      data: function data() {
        return {
          checkedValue: null,
          checkedNodePaths: [],
          store: [],
          menus: [],
          activePath: [],
          loadCount: 0
        };
      },
      computed: {
        config: function config() {
          return merge_default()(_extends({}, DefaultProps), this.props || {});
        },
        multiple: function multiple() {
          return this.config.multiple;
        },
        checkStrictly: function checkStrictly() {
          return this.config.checkStrictly;
        },
        leafOnly: function leafOnly() {
          return !this.checkStrictly;
        },
        isHoverMenu: function isHoverMenu() {
          return this.config.expandTrigger === 'hover';
        },
        renderLabelFn: function renderLabelFn() {
          return this.renderLabel || this.$scopedSlots.default;
        }
      },
      watch: {
        options: {
          handler: function handler() {
            this.initStore();
          },
          immediate: true,
          deep: true
        },
        value: function value() {
          this.syncCheckedValue();
          this.checkStrictly && this.calculateCheckedNodePaths();
        },
        checkedValue: function checkedValue(val) {
          if (!Object(util_["isEqual"])(val, this.value)) {
            this.checkStrictly && this.calculateCheckedNodePaths();
            this.$emit('input', val);
            this.$emit('change', val);
          }
        }
      },
      mounted: function mounted() {
        if (!Object(util_["isEmpty"])(this.value)) {
          this.syncCheckedValue();
        }
      },
      methods: {
        initStore: function initStore() {
          var config = this.config,
              options = this.options;

          if (config.lazy && Object(util_["isEmpty"])(options)) {
            this.lazyLoad();
          } else {
            this.store = new src_store(options, config);
            this.menus = [this.store.getNodes()];
            this.syncMenuState();
          }
        },
        syncCheckedValue: function syncCheckedValue() {
          var value = this.value,
              checkedValue = this.checkedValue;

          if (!Object(util_["isEqual"])(value, checkedValue)) {
            this.checkedValue = value;
            this.syncMenuState();
          }
        },
        syncMenuState: function syncMenuState() {
          var multiple = this.multiple,
              checkStrictly = this.checkStrictly;
          this.syncActivePath();
          multiple && this.syncMultiCheckState();
          checkStrictly && this.calculateCheckedNodePaths();
          this.$nextTick(this.scrollIntoView);
        },
        syncMultiCheckState: function syncMultiCheckState() {
          var _this = this;

          var nodes = this.getFlattedNodes(this.leafOnly);
          nodes.forEach(function (node) {
            node.syncCheckState(_this.checkedValue);
          });
        },
        syncActivePath: function syncActivePath() {
          var _this2 = this;

          var store = this.store,
              multiple = this.multiple,
              activePath = this.activePath,
              checkedValue = this.checkedValue;

          if (!Object(util_["isEmpty"])(activePath)) {
            var nodes = activePath.map(function (node) {
              return _this2.getNodeByValue(node.getValue());
            });
            this.expandNodes(nodes);
          } else if (!Object(util_["isEmpty"])(checkedValue)) {
            var value = multiple ? checkedValue[0] : checkedValue;
            var checkedNode = this.getNodeByValue(value) || {};

            var _nodes = (checkedNode.pathNodes || []).slice(0, -1);

            this.expandNodes(_nodes);
          } else {
            this.activePath = [];
            this.menus = [store.getNodes()];
          }
        },
        expandNodes: function expandNodes(nodes) {
          var _this3 = this;

          nodes.forEach(function (node) {
            return _this3.handleExpand(node, true
            /* silent */
            );
          });
        },
        calculateCheckedNodePaths: function calculateCheckedNodePaths() {
          var _this4 = this;

          var checkedValue = this.checkedValue,
              multiple = this.multiple;
          var checkedValues = multiple ? Object(util_["coerceTruthyValueToArray"])(checkedValue) : [checkedValue];
          this.checkedNodePaths = checkedValues.map(function (v) {
            var checkedNode = _this4.getNodeByValue(v);

            return checkedNode ? checkedNode.pathNodes : [];
          });
        },
        handleKeyDown: function handleKeyDown(e) {
          var target = e.target,
              keyCode = e.keyCode;

          switch (keyCode) {
            case KeyCode.up:
              var prev = getSibling(target, -1);
              focusNode(prev);
              break;

            case KeyCode.down:
              var next = getSibling(target, 1);
              focusNode(next);
              break;

            case KeyCode.left:
              var preMenu = this.$refs.menu[getMenuIndex(target) - 1];

              if (preMenu) {
                var expandedNode = preMenu.$el.querySelector('.el-cascader-node[aria-expanded="true"]');
                focusNode(expandedNode);
              }

              break;

            case KeyCode.right:
              var nextMenu = this.$refs.menu[getMenuIndex(target) + 1];

              if (nextMenu) {
                var firstNode = nextMenu.$el.querySelector('.el-cascader-node[tabindex="-1"]');
                focusNode(firstNode);
              }

              break;

            case KeyCode.enter:
              checkNode(target);
              break;

            case KeyCode.esc:
            case KeyCode.tab:
              this.$emit('close');
              break;

            default:
              return;
          }
        },
        handleExpand: function handleExpand(node, silent) {
          var activePath = this.activePath;
          var level = node.level;
          var path = activePath.slice(0, level - 1);
          var menus = this.menus.slice(0, level);

          if (!node.isLeaf) {
            path.push(node);
            menus.push(node.children);
          }

          this.activePath = path;
          this.menus = menus;

          if (!silent) {
            var pathValues = path.map(function (node) {
              return node.getValue();
            });
            var activePathValues = activePath.map(function (node) {
              return node.getValue();
            });

            if (!Object(util_["valueEquals"])(pathValues, activePathValues)) {
              this.$emit('active-item-change', pathValues); // Deprecated

              this.$emit('expand-change', pathValues);
            }
          }
        },
        handleCheckChange: function handleCheckChange(value) {
          this.checkedValue = value;
        },
        lazyLoad: function lazyLoad(node, onFullfiled) {
          var _this5 = this;

          var config = this.config;

          if (!node) {
            node = node || {
              root: true,
              level: 0
            };
            this.store = new src_store([], config);
            this.menus = [this.store.getNodes()];
          }

          node.loading = true;

          var resolve = function resolve(dataList) {
            var parent = node.root ? null : node;
            dataList && dataList.length && _this5.store.appendNodes(dataList, parent);
            node.loading = false;
            node.loaded = true; // dispose default value on lazy load mode

            if (Array.isArray(_this5.checkedValue)) {
              var nodeValue = _this5.checkedValue[_this5.loadCount++];
              var valueKey = _this5.config.value;
              var leafKey = _this5.config.leaf;

              if (Array.isArray(dataList) && dataList.filter(function (item) {
                return item[valueKey] === nodeValue;
              }).length > 0) {
                var checkedNode = _this5.store.getNodeByValue(nodeValue);

                if (!checkedNode.data[leafKey]) {
                  _this5.lazyLoad(checkedNode, function () {
                    _this5.handleExpand(checkedNode);
                  });
                }

                if (_this5.loadCount === _this5.checkedValue.length) {
                  _this5.$parent.computePresentText();
                }
              }
            }

            onFullfiled && onFullfiled(dataList);
          };

          config.lazyLoad(node, resolve);
        },

        /**
         * public methods
        */
        calculateMultiCheckedValue: function calculateMultiCheckedValue() {
          this.checkedValue = this.getCheckedNodes(this.leafOnly).map(function (node) {
            return node.getValueByOption();
          });
        },
        scrollIntoView: function scrollIntoView() {
          if (this.$isServer) return;
          var menus = this.$refs.menu || [];
          menus.forEach(function (menu) {
            var menuElement = menu.$el;

            if (menuElement) {
              var container = menuElement.querySelector('.el-scrollbar__wrap');
              var activeNode = menuElement.querySelector('.el-cascader-node.is-active') || menuElement.querySelector('.el-cascader-node.in-active-path');
              scroll_into_view_default()(container, activeNode);
            }
          });
        },
        getNodeByValue: function getNodeByValue(val) {
          return this.store.getNodeByValue(val);
        },
        getFlattedNodes: function getFlattedNodes(leafOnly) {
          var cached = !this.config.lazy;
          return this.store.getFlattedNodes(leafOnly, cached);
        },
        getCheckedNodes: function getCheckedNodes(leafOnly) {
          var checkedValue = this.checkedValue,
              multiple = this.multiple;

          if (multiple) {
            var nodes = this.getFlattedNodes(leafOnly);
            return nodes.filter(function (node) {
              return node.checked;
            });
          } else {
            return Object(util_["isEmpty"])(checkedValue) ? [] : [this.getNodeByValue(checkedValue)];
          }
        },
        clearCheckedNodes: function clearCheckedNodes() {
          var config = this.config,
              leafOnly = this.leafOnly;
          var multiple = config.multiple,
              emitPath = config.emitPath;

          if (multiple) {
            this.getCheckedNodes(leafOnly).filter(function (node) {
              return !node.isDisabled;
            }).forEach(function (node) {
              return node.doCheck(false);
            });
            this.calculateMultiCheckedValue();
          } else {
            this.checkedValue = emitPath ? [] : null;
          }
        }
      }
    }; // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue?vue&type=script&lang=js&

    /* harmony default export */

    var src_cascader_panelvue_type_script_lang_js_ = cascader_panelvue_type_script_lang_js_; // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue

    /* normalize component */

    var cascader_panel_component = Object(componentNormalizer["a"
    /* default */
    ])(src_cascader_panelvue_type_script_lang_js_, cascader_panelvue_type_template_id_34932346_render, staticRenderFns, false, null, null, null);
    /* hot reload */

    if (false) { var cascader_panel_api; }

    cascader_panel_component.options.__file = "packages/cascader-panel/src/cascader-panel.vue";
    /* harmony default export */

    var cascader_panel = cascader_panel_component.exports; // CONCATENATED MODULE: ./packages/cascader-panel/index.js

    /* istanbul ignore next */

    cascader_panel.install = function (Vue) {
      Vue.component(cascader_panel.name, cascader_panel);
    };
    /* harmony default export */


    var packages_cascader_panel = __webpack_exports__["default"] = cascader_panel;
    /***/
  },

  /***/
  6:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("6b7c");
    /***/
  },

  /***/
  9:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("7f4d");
    /***/
  }
  /******/

});

/***/ }),

/***/ "4840":
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__("825a");
var aFunction = __webpack_require__("1c0b");
var wellKnownSymbol = __webpack_require__("b622");

var SPECIES = wellKnownSymbol('species');

// `SpeciesConstructor` abstract operation
// https://tc39.github.io/ecma262/#sec-speciesconstructor
module.exports = function (O, defaultConstructor) {
  var C = anObject(O).constructor;
  var S;
  return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);
};


/***/ }),

/***/ "4897":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


__webpack_require__("3410");

__webpack_require__("ac1f");

__webpack_require__("1276");

exports.__esModule = true;
exports.i18n = exports.use = exports.t = undefined;

var _zhCN = __webpack_require__("f0d9");

var _zhCN2 = _interopRequireDefault(_zhCN);

var _vue = __webpack_require__("8bbf");

var _vue2 = _interopRequireDefault(_vue);

var _deepmerge = __webpack_require__("3c4e");

var _deepmerge2 = _interopRequireDefault(_deepmerge);

var _format = __webpack_require__("9d7e");

var _format2 = _interopRequireDefault(_format);

function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    default: obj
  };
}

var format = (0, _format2.default)(_vue2.default);
var lang = _zhCN2.default;
var merged = false;

var i18nHandler = function i18nHandler() {
  var vuei18n = Object.getPrototypeOf(this || _vue2.default).$t;

  if (typeof vuei18n === 'function' && !!_vue2.default.locale) {
    if (!merged) {
      merged = true;

      _vue2.default.locale(_vue2.default.config.lang, (0, _deepmerge2.default)(lang, _vue2.default.locale(_vue2.default.config.lang) || {}, {
        clone: true
      }));
    }

    return vuei18n.apply(this, arguments);
  }
};

var t = exports.t = function t(path, options) {
  var value = i18nHandler.apply(this, arguments);
  if (value !== null && value !== undefined) return value;
  var array = path.split('.');
  var current = lang;

  for (var i = 0, j = array.length; i < j; i++) {
    var property = array[i];
    value = current[property];
    if (i === j - 1) return format(value, options);
    if (!value) return '';
    current = value;
  }

  return '';
};

var use = exports.use = function use(l) {
  lang = l || lang;
};

var i18n = exports.i18n = function i18n(fn) {
  i18nHandler = fn || i18nHandler;
};

exports.default = {
  use: use,
  t: t,
  i18n: i18n
};

/***/ }),

/***/ "4930":
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__("d039");

module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
  // Chrome 38 Symbol has incorrect toString conversion
  // eslint-disable-next-line no-undef
  return !String(Symbol());
});


/***/ }),

/***/ "498a":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var $trim = __webpack_require__("58a8").trim;
var forcedStringTrimMethod = __webpack_require__("c8d2");

// `String.prototype.trim` method
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
  trim: function trim() {
    return $trim(this);
  }
});


/***/ }),

/***/ "4a35":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "4a7b":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");

/**
 * Config-specific merge-function which creates a new config-object
 * by merging two configuration objects together.
 *
 * @param {Object} config1
 * @param {Object} config2
 * @returns {Object} New object resulting from merging config2 to config1
 */
module.exports = function mergeConfig(config1, config2) {
  // eslint-disable-next-line no-param-reassign
  config2 = config2 || {};
  var config = {};

  var valueFromConfig2Keys = ['url', 'method', 'data'];
  var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
  var defaultToConfig2Keys = [
    'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
    'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
    'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
    'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
    'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
  ];
  var directMergeKeys = ['validateStatus'];

  function getMergedValue(target, source) {
    if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
      return utils.merge(target, source);
    } else if (utils.isPlainObject(source)) {
      return utils.merge({}, source);
    } else if (utils.isArray(source)) {
      return source.slice();
    }
    return source;
  }

  function mergeDeepProperties(prop) {
    if (!utils.isUndefined(config2[prop])) {
      config[prop] = getMergedValue(config1[prop], config2[prop]);
    } else if (!utils.isUndefined(config1[prop])) {
      config[prop] = getMergedValue(undefined, config1[prop]);
    }
  }

  utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
    if (!utils.isUndefined(config2[prop])) {
      config[prop] = getMergedValue(undefined, config2[prop]);
    }
  });

  utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);

  utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
    if (!utils.isUndefined(config2[prop])) {
      config[prop] = getMergedValue(undefined, config2[prop]);
    } else if (!utils.isUndefined(config1[prop])) {
      config[prop] = getMergedValue(undefined, config1[prop]);
    }
  });

  utils.forEach(directMergeKeys, function merge(prop) {
    if (prop in config2) {
      config[prop] = getMergedValue(config1[prop], config2[prop]);
    } else if (prop in config1) {
      config[prop] = getMergedValue(undefined, config1[prop]);
    }
  });

  var axiosKeys = valueFromConfig2Keys
    .concat(mergeDeepPropertiesKeys)
    .concat(defaultToConfig2Keys)
    .concat(directMergeKeys);

  var otherKeys = Object
    .keys(config1)
    .concat(Object.keys(config2))
    .filter(function filterAxiosKeys(key) {
      return axiosKeys.indexOf(key) === -1;
    });

  utils.forEach(otherKeys, mergeDeepProperties);

  return config;
};


/***/ }),

/***/ "4b26":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


__webpack_require__("4160");

__webpack_require__("a434");

__webpack_require__("ac1f");

__webpack_require__("1276");

__webpack_require__("498a");

__webpack_require__("159b");

exports.__esModule = true;

var _vue = __webpack_require__("8bbf");

var _vue2 = _interopRequireDefault(_vue);

var _dom = __webpack_require__("5924");

function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    default: obj
  };
}

var hasModal = false;
var hasInitZIndex = false;
var zIndex = void 0;

var getModal = function getModal() {
  if (_vue2.default.prototype.$isServer) return;
  var modalDom = PopupManager.modalDom;

  if (modalDom) {
    hasModal = true;
  } else {
    hasModal = false;
    modalDom = document.createElement('div');
    PopupManager.modalDom = modalDom;
    modalDom.addEventListener('touchmove', function (event) {
      event.preventDefault();
      event.stopPropagation();
    });
    modalDom.addEventListener('click', function () {
      PopupManager.doOnModalClick && PopupManager.doOnModalClick();
    });
  }

  return modalDom;
};

var instances = {};
var PopupManager = {
  modalFade: true,
  getInstance: function getInstance(id) {
    return instances[id];
  },
  register: function register(id, instance) {
    if (id && instance) {
      instances[id] = instance;
    }
  },
  deregister: function deregister(id) {
    if (id) {
      instances[id] = null;
      delete instances[id];
    }
  },
  nextZIndex: function nextZIndex() {
    return PopupManager.zIndex++;
  },
  modalStack: [],
  doOnModalClick: function doOnModalClick() {
    var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
    if (!topItem) return;
    var instance = PopupManager.getInstance(topItem.id);

    if (instance && instance.closeOnClickModal) {
      instance.close();
    }
  },
  openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
    if (_vue2.default.prototype.$isServer) return;
    if (!id || zIndex === undefined) return;
    this.modalFade = modalFade;
    var modalStack = this.modalStack;

    for (var i = 0, j = modalStack.length; i < j; i++) {
      var item = modalStack[i];

      if (item.id === id) {
        return;
      }
    }

    var modalDom = getModal();
    (0, _dom.addClass)(modalDom, 'v-modal');

    if (this.modalFade && !hasModal) {
      (0, _dom.addClass)(modalDom, 'v-modal-enter');
    }

    if (modalClass) {
      var classArr = modalClass.trim().split(/\s+/);
      classArr.forEach(function (item) {
        return (0, _dom.addClass)(modalDom, item);
      });
    }

    setTimeout(function () {
      (0, _dom.removeClass)(modalDom, 'v-modal-enter');
    }, 200);

    if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
      dom.parentNode.appendChild(modalDom);
    } else {
      document.body.appendChild(modalDom);
    }

    if (zIndex) {
      modalDom.style.zIndex = zIndex;
    }

    modalDom.tabIndex = 0;
    modalDom.style.display = '';
    this.modalStack.push({
      id: id,
      zIndex: zIndex,
      modalClass: modalClass
    });
  },
  closeModal: function closeModal(id) {
    var modalStack = this.modalStack;
    var modalDom = getModal();

    if (modalStack.length > 0) {
      var topItem = modalStack[modalStack.length - 1];

      if (topItem.id === id) {
        if (topItem.modalClass) {
          var classArr = topItem.modalClass.trim().split(/\s+/);
          classArr.forEach(function (item) {
            return (0, _dom.removeClass)(modalDom, item);
          });
        }

        modalStack.pop();

        if (modalStack.length > 0) {
          modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
        }
      } else {
        for (var i = modalStack.length - 1; i >= 0; i--) {
          if (modalStack[i].id === id) {
            modalStack.splice(i, 1);
            break;
          }
        }
      }
    }

    if (modalStack.length === 0) {
      if (this.modalFade) {
        (0, _dom.addClass)(modalDom, 'v-modal-leave');
      }

      setTimeout(function () {
        if (modalStack.length === 0) {
          if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
          modalDom.style.display = 'none';
          PopupManager.modalDom = undefined;
        }

        (0, _dom.removeClass)(modalDom, 'v-modal-leave');
      }, 200);
    }
  }
};
Object.defineProperty(PopupManager, 'zIndex', {
  configurable: true,
  get: function get() {
    if (!hasInitZIndex) {
      zIndex = zIndex || (_vue2.default.prototype.$ELEMENT || {}).zIndex || 2000;
      hasInitZIndex = true;
    }

    return zIndex;
  },
  set: function set(value) {
    zIndex = value;
  }
});

var getTopPopup = function getTopPopup() {
  if (_vue2.default.prototype.$isServer) return;

  if (PopupManager.modalStack.length > 0) {
    var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
    if (!topPopup) return;
    var instance = PopupManager.getInstance(topPopup.id);
    return instance;
  }
};

if (!_vue2.default.prototype.$isServer) {
  // handle `esc` key when the popup is shown
  window.addEventListener('keydown', function (event) {
    if (event.keyCode === 27) {
      var topPopup = getTopPopup();

      if (topPopup && topPopup.closeOnPressEscape) {
        topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
      }
    }
  });
}

exports.default = PopupManager;

/***/ }),

/***/ "4b8b":
/***/ (function(module, exports) {

module.exports = function (exec) {
  try {
    return !!exec();
  } catch (e) {
    return true;
  }
};


/***/ }),

/***/ "4ba6":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"));
  else {}
})(function(CodeMirror) {
"use strict";

function Context(indented, column, type, info, align, prev) {
  this.indented = indented;
  this.column = column;
  this.type = type;
  this.info = info;
  this.align = align;
  this.prev = prev;
}
function pushContext(state, col, type, info) {
  var indent = state.indented;
  if (state.context && state.context.type == "statement" && type != "statement")
    indent = state.context.indented;
  return state.context = new Context(indent, col, type, info, null, state.context);
}
function popContext(state) {
  var t = state.context.type;
  if (t == ")" || t == "]" || t == "}")
    state.indented = state.context.indented;
  return state.context = state.context.prev;
}

function typeBefore(stream, state, pos) {
  if (state.prevToken == "variable" || state.prevToken == "type") return true;
  if (/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(stream.string.slice(0, pos))) return true;
  if (state.typeAtEndOfLine && stream.column() == stream.indentation()) return true;
}

function isTopScope(context) {
  for (;;) {
    if (!context || context.type == "top") return true;
    if (context.type == "}" && context.prev.info != "namespace") return false;
    context = context.prev;
  }
}

CodeMirror.defineMode("clike", function(config, parserConfig) {
  var indentUnit = config.indentUnit,
      statementIndentUnit = parserConfig.statementIndentUnit || indentUnit,
      dontAlignCalls = parserConfig.dontAlignCalls,
      keywords = parserConfig.keywords || {},
      types = parserConfig.types || {},
      builtin = parserConfig.builtin || {},
      blockKeywords = parserConfig.blockKeywords || {},
      defKeywords = parserConfig.defKeywords || {},
      atoms = parserConfig.atoms || {},
      hooks = parserConfig.hooks || {},
      multiLineStrings = parserConfig.multiLineStrings,
      indentStatements = parserConfig.indentStatements !== false,
      indentSwitch = parserConfig.indentSwitch !== false,
      namespaceSeparator = parserConfig.namespaceSeparator,
      isPunctuationChar = parserConfig.isPunctuationChar || /[\[\]{}\(\),;\:\.]/,
      numberStart = parserConfig.numberStart || /[\d\.]/,
      number = parserConfig.number || /^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,
      isOperatorChar = parserConfig.isOperatorChar || /[+\-*&%=<>!?|\/]/,
      isIdentifierChar = parserConfig.isIdentifierChar || /[\w\$_\xa1-\uffff]/,
      // An optional function that takes a {string} token and returns true if it
      // should be treated as a builtin.
      isReservedIdentifier = parserConfig.isReservedIdentifier || false;

  var curPunc, isDefKeyword;

  function tokenBase(stream, state) {
    var ch = stream.next();
    if (hooks[ch]) {
      var result = hooks[ch](stream, state);
      if (result !== false) return result;
    }
    if (ch == '"' || ch == "'") {
      state.tokenize = tokenString(ch);
      return state.tokenize(stream, state);
    }
    if (numberStart.test(ch)) {
      stream.backUp(1)
      if (stream.match(number)) return "number"
      stream.next()
    }
    if (isPunctuationChar.test(ch)) {
      curPunc = ch;
      return null;
    }
    if (ch == "/") {
      if (stream.eat("*")) {
        state.tokenize = tokenComment;
        return tokenComment(stream, state);
      }
      if (stream.eat("/")) {
        stream.skipToEnd();
        return "comment";
      }
    }
    if (isOperatorChar.test(ch)) {
      while (!stream.match(/^\/[\/*]/, false) && stream.eat(isOperatorChar)) {}
      return "operator";
    }
    stream.eatWhile(isIdentifierChar);
    if (namespaceSeparator) while (stream.match(namespaceSeparator))
      stream.eatWhile(isIdentifierChar);

    var cur = stream.current();
    if (contains(keywords, cur)) {
      if (contains(blockKeywords, cur)) curPunc = "newstatement";
      if (contains(defKeywords, cur)) isDefKeyword = true;
      return "keyword";
    }
    if (contains(types, cur)) return "type";
    if (contains(builtin, cur)
        || (isReservedIdentifier && isReservedIdentifier(cur))) {
      if (contains(blockKeywords, cur)) curPunc = "newstatement";
      return "builtin";
    }
    if (contains(atoms, cur)) return "atom";
    return "variable";
  }

  function tokenString(quote) {
    return function(stream, state) {
      var escaped = false, next, end = false;
      while ((next = stream.next()) != null) {
        if (next == quote && !escaped) {end = true; break;}
        escaped = !escaped && next == "\\";
      }
      if (end || !(escaped || multiLineStrings))
        state.tokenize = null;
      return "string";
    };
  }

  function tokenComment(stream, state) {
    var maybeEnd = false, ch;
    while (ch = stream.next()) {
      if (ch == "/" && maybeEnd) {
        state.tokenize = null;
        break;
      }
      maybeEnd = (ch == "*");
    }
    return "comment";
  }

  function maybeEOL(stream, state) {
    if (parserConfig.typeFirstDefinitions && stream.eol() && isTopScope(state.context))
      state.typeAtEndOfLine = typeBefore(stream, state, stream.pos)
  }

  // Interface

  return {
    startState: function(basecolumn) {
      return {
        tokenize: null,
        context: new Context((basecolumn || 0) - indentUnit, 0, "top", null, false),
        indented: 0,
        startOfLine: true,
        prevToken: null
      };
    },

    token: function(stream, state) {
      var ctx = state.context;
      if (stream.sol()) {
        if (ctx.align == null) ctx.align = false;
        state.indented = stream.indentation();
        state.startOfLine = true;
      }
      if (stream.eatSpace()) { maybeEOL(stream, state); return null; }
      curPunc = isDefKeyword = null;
      var style = (state.tokenize || tokenBase)(stream, state);
      if (style == "comment" || style == "meta") return style;
      if (ctx.align == null) ctx.align = true;

      if (curPunc == ";" || curPunc == ":" || (curPunc == "," && stream.match(/^\s*(?:\/\/.*)?$/, false)))
        while (state.context.type == "statement") popContext(state);
      else if (curPunc == "{") pushContext(state, stream.column(), "}");
      else if (curPunc == "[") pushContext(state, stream.column(), "]");
      else if (curPunc == "(") pushContext(state, stream.column(), ")");
      else if (curPunc == "}") {
        while (ctx.type == "statement") ctx = popContext(state);
        if (ctx.type == "}") ctx = popContext(state);
        while (ctx.type == "statement") ctx = popContext(state);
      }
      else if (curPunc == ctx.type) popContext(state);
      else if (indentStatements &&
               (((ctx.type == "}" || ctx.type == "top") && curPunc != ";") ||
                (ctx.type == "statement" && curPunc == "newstatement"))) {
        pushContext(state, stream.column(), "statement", stream.current());
      }

      if (style == "variable" &&
          ((state.prevToken == "def" ||
            (parserConfig.typeFirstDefinitions && typeBefore(stream, state, stream.start) &&
             isTopScope(state.context) && stream.match(/^\s*\(/, false)))))
        style = "def";

      if (hooks.token) {
        var result = hooks.token(stream, state, style);
        if (result !== undefined) style = result;
      }

      if (style == "def" && parserConfig.styleDefs === false) style = "variable";

      state.startOfLine = false;
      state.prevToken = isDefKeyword ? "def" : style || curPunc;
      maybeEOL(stream, state);
      return style;
    },

    indent: function(state, textAfter) {
      if (state.tokenize != tokenBase && state.tokenize != null || state.typeAtEndOfLine) return CodeMirror.Pass;
      var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
      var closing = firstChar == ctx.type;
      if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev;
      if (parserConfig.dontIndentStatements)
        while (ctx.type == "statement" && parserConfig.dontIndentStatements.test(ctx.info))
          ctx = ctx.prev
      if (hooks.indent) {
        var hook = hooks.indent(state, ctx, textAfter, indentUnit);
        if (typeof hook == "number") return hook
      }
      var switchBlock = ctx.prev && ctx.prev.info == "switch";
      if (parserConfig.allmanIndentation && /[{(]/.test(firstChar)) {
        while (ctx.type != "top" && ctx.type != "}") ctx = ctx.prev
        return ctx.indented
      }
      if (ctx.type == "statement")
        return ctx.indented + (firstChar == "{" ? 0 : statementIndentUnit);
      if (ctx.align && (!dontAlignCalls || ctx.type != ")"))
        return ctx.column + (closing ? 0 : 1);
      if (ctx.type == ")" && !closing)
        return ctx.indented + statementIndentUnit;

      return ctx.indented + (closing ? 0 : indentUnit) +
        (!closing && switchBlock && !/^(?:case|default)\b/.test(textAfter) ? indentUnit : 0);
    },

    electricInput: indentSwitch ? /^\s*(?:case .*?:|default:|\{\}?|\})$/ : /^\s*[{}]$/,
    blockCommentStart: "/*",
    blockCommentEnd: "*/",
    blockCommentContinue: " * ",
    lineComment: "//",
    fold: "brace"
  };
});

  function words(str) {
    var obj = {}, words = str.split(" ");
    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
    return obj;
  }
  function contains(words, word) {
    if (typeof words === "function") {
      return words(word);
    } else {
      return words.propertyIsEnumerable(word);
    }
  }
  var cKeywords = "auto if break case register continue return default do sizeof " +
    "static else struct switch extern typedef union for goto while enum const " +
    "volatile inline restrict asm fortran";

  // Keywords from https://en.cppreference.com/w/cpp/keyword includes C++20.
  var cppKeywords = "alignas alignof and and_eq audit axiom bitand bitor catch " +
  "class compl concept constexpr const_cast decltype delete dynamic_cast " +
  "explicit export final friend import module mutable namespace new noexcept " +
  "not not_eq operator or or_eq override private protected public " +
  "reinterpret_cast requires static_assert static_cast template this " +
  "thread_local throw try typeid typename using virtual xor xor_eq";

  var objCKeywords = "bycopy byref in inout oneway out self super atomic nonatomic retain copy " +
  "readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd " +
  "@interface @implementation @end @protocol @encode @property @synthesize @dynamic @class " +
  "@public @package @private @protected @required @optional @try @catch @finally @import " +
  "@selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available";

  var objCBuiltins = "FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION " +
  " NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER " +
  "NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION " +
  "NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT"

  // Do not use this. Use the cTypes function below. This is global just to avoid
  // excessive calls when cTypes is being called multiple times during a parse.
  var basicCTypes = words("int long char short double float unsigned signed " +
    "void bool");

  // Do not use this. Use the objCTypes function below. This is global just to avoid
  // excessive calls when objCTypes is being called multiple times during a parse.
  var basicObjCTypes = words("SEL instancetype id Class Protocol BOOL");

  // Returns true if identifier is a "C" type.
  // C type is defined as those that are reserved by the compiler (basicTypes),
  // and those that end in _t (Reserved by POSIX for types)
  // http://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html
  function cTypes(identifier) {
    return contains(basicCTypes, identifier) || /.+_t$/.test(identifier);
  }

  // Returns true if identifier is a "Objective C" type.
  function objCTypes(identifier) {
    return cTypes(identifier) || contains(basicObjCTypes, identifier);
  }

  var cBlockKeywords = "case do else for if switch while struct enum union";
  var cDefKeywords = "struct enum union";

  function cppHook(stream, state) {
    if (!state.startOfLine) return false
    for (var ch, next = null; ch = stream.peek();) {
      if (ch == "\\" && stream.match(/^.$/)) {
        next = cppHook
        break
      } else if (ch == "/" && stream.match(/^\/[\/\*]/, false)) {
        break
      }
      stream.next()
    }
    state.tokenize = next
    return "meta"
  }

  function pointerHook(_stream, state) {
    if (state.prevToken == "type") return "type";
    return false;
  }

  // For C and C++ (and ObjC): identifiers starting with __
  // or _ followed by a capital letter are reserved for the compiler.
  function cIsReservedIdentifier(token) {
    if (!token || token.length < 2) return false;
    if (token[0] != '_') return false;
    return (token[1] == '_') || (token[1] !== token[1].toLowerCase());
  }

  function cpp14Literal(stream) {
    stream.eatWhile(/[\w\.']/);
    return "number";
  }

  function cpp11StringHook(stream, state) {
    stream.backUp(1);
    // Raw strings.
    if (stream.match(/(R|u8R|uR|UR|LR)/)) {
      var match = stream.match(/"([^\s\\()]{0,16})\(/);
      if (!match) {
        return false;
      }
      state.cpp11RawStringDelim = match[1];
      state.tokenize = tokenRawString;
      return tokenRawString(stream, state);
    }
    // Unicode strings/chars.
    if (stream.match(/(u8|u|U|L)/)) {
      if (stream.match(/["']/, /* eat */ false)) {
        return "string";
      }
      return false;
    }
    // Ignore this hook.
    stream.next();
    return false;
  }

  function cppLooksLikeConstructor(word) {
    var lastTwo = /(\w+)::~?(\w+)$/.exec(word);
    return lastTwo && lastTwo[1] == lastTwo[2];
  }

  // C#-style strings where "" escapes a quote.
  function tokenAtString(stream, state) {
    var next;
    while ((next = stream.next()) != null) {
      if (next == '"' && !stream.eat('"')) {
        state.tokenize = null;
        break;
      }
    }
    return "string";
  }

  // C++11 raw string literal is <prefix>"<delim>( anything )<delim>", where
  // <delim> can be a string up to 16 characters long.
  function tokenRawString(stream, state) {
    // Escape characters that have special regex meanings.
    var delim = state.cpp11RawStringDelim.replace(/[^\w\s]/g, '\\$&');
    var match = stream.match(new RegExp(".*?\\)" + delim + '"'));
    if (match)
      state.tokenize = null;
    else
      stream.skipToEnd();
    return "string";
  }

  function def(mimes, mode) {
    if (typeof mimes == "string") mimes = [mimes];
    var words = [];
    function add(obj) {
      if (obj) for (var prop in obj) if (obj.hasOwnProperty(prop))
        words.push(prop);
    }
    add(mode.keywords);
    add(mode.types);
    add(mode.builtin);
    add(mode.atoms);
    if (words.length) {
      mode.helperType = mimes[0];
      CodeMirror.registerHelper("hintWords", mimes[0], words);
    }

    for (var i = 0; i < mimes.length; ++i)
      CodeMirror.defineMIME(mimes[i], mode);
  }

  def(["text/x-csrc", "text/x-c", "text/x-chdr"], {
    name: "clike",
    keywords: words(cKeywords),
    types: cTypes,
    blockKeywords: words(cBlockKeywords),
    defKeywords: words(cDefKeywords),
    typeFirstDefinitions: true,
    atoms: words("NULL true false"),
    isReservedIdentifier: cIsReservedIdentifier,
    hooks: {
      "#": cppHook,
      "*": pointerHook,
    },
    modeProps: {fold: ["brace", "include"]}
  });

  def(["text/x-c++src", "text/x-c++hdr"], {
    name: "clike",
    keywords: words(cKeywords + " " + cppKeywords),
    types: cTypes,
    blockKeywords: words(cBlockKeywords + " class try catch"),
    defKeywords: words(cDefKeywords + " class namespace"),
    typeFirstDefinitions: true,
    atoms: words("true false NULL nullptr"),
    dontIndentStatements: /^template$/,
    isIdentifierChar: /[\w\$_~\xa1-\uffff]/,
    isReservedIdentifier: cIsReservedIdentifier,
    hooks: {
      "#": cppHook,
      "*": pointerHook,
      "u": cpp11StringHook,
      "U": cpp11StringHook,
      "L": cpp11StringHook,
      "R": cpp11StringHook,
      "0": cpp14Literal,
      "1": cpp14Literal,
      "2": cpp14Literal,
      "3": cpp14Literal,
      "4": cpp14Literal,
      "5": cpp14Literal,
      "6": cpp14Literal,
      "7": cpp14Literal,
      "8": cpp14Literal,
      "9": cpp14Literal,
      token: function(stream, state, style) {
        if (style == "variable" && stream.peek() == "(" &&
            (state.prevToken == ";" || state.prevToken == null ||
             state.prevToken == "}") &&
            cppLooksLikeConstructor(stream.current()))
          return "def";
      }
    },
    namespaceSeparator: "::",
    modeProps: {fold: ["brace", "include"]}
  });

  def("text/x-java", {
    name: "clike",
    keywords: words("abstract assert break case catch class const continue default " +
                    "do else enum extends final finally for goto if implements import " +
                    "instanceof interface native new package private protected public " +
                    "return static strictfp super switch synchronized this throw throws transient " +
                    "try volatile while @interface"),
    types: words("byte short int long float double boolean char void Boolean Byte Character Double Float " +
                 "Integer Long Number Object Short String StringBuffer StringBuilder Void"),
    blockKeywords: words("catch class do else finally for if switch try while"),
    defKeywords: words("class interface enum @interface"),
    typeFirstDefinitions: true,
    atoms: words("true false null"),
    number: /^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,
    hooks: {
      "@": function(stream) {
        // Don't match the @interface keyword.
        if (stream.match('interface', false)) return false;

        stream.eatWhile(/[\w\$_]/);
        return "meta";
      }
    },
    modeProps: {fold: ["brace", "import"]}
  });

  def("text/x-csharp", {
    name: "clike",
    keywords: words("abstract as async await base break case catch checked class const continue" +
                    " default delegate do else enum event explicit extern finally fixed for" +
                    " foreach goto if implicit in interface internal is lock namespace new" +
                    " operator out override params private protected public readonly ref return sealed" +
                    " sizeof stackalloc static struct switch this throw try typeof unchecked" +
                    " unsafe using virtual void volatile while add alias ascending descending dynamic from get" +
                    " global group into join let orderby partial remove select set value var yield"),
    types: words("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func" +
                 " Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32" +
                 " UInt64 bool byte char decimal double short int long object"  +
                 " sbyte float string ushort uint ulong"),
    blockKeywords: words("catch class do else finally for foreach if struct switch try while"),
    defKeywords: words("class interface namespace struct var"),
    typeFirstDefinitions: true,
    atoms: words("true false null"),
    hooks: {
      "@": function(stream, state) {
        if (stream.eat('"')) {
          state.tokenize = tokenAtString;
          return tokenAtString(stream, state);
        }
        stream.eatWhile(/[\w\$_]/);
        return "meta";
      }
    }
  });

  function tokenTripleString(stream, state) {
    var escaped = false;
    while (!stream.eol()) {
      if (!escaped && stream.match('"""')) {
        state.tokenize = null;
        break;
      }
      escaped = stream.next() == "\\" && !escaped;
    }
    return "string";
  }

  function tokenNestedComment(depth) {
    return function (stream, state) {
      var ch
      while (ch = stream.next()) {
        if (ch == "*" && stream.eat("/")) {
          if (depth == 1) {
            state.tokenize = null
            break
          } else {
            state.tokenize = tokenNestedComment(depth - 1)
            return state.tokenize(stream, state)
          }
        } else if (ch == "/" && stream.eat("*")) {
          state.tokenize = tokenNestedComment(depth + 1)
          return state.tokenize(stream, state)
        }
      }
      return "comment"
    }
  }

  def("text/x-scala", {
    name: "clike",
    keywords: words(
      /* scala */
      "abstract case catch class def do else extends final finally for forSome if " +
      "implicit import lazy match new null object override package private protected return " +
      "sealed super this throw trait try type val var while with yield _ " +

      /* package scala */
      "assert assume require print println printf readLine readBoolean readByte readShort " +
      "readChar readInt readLong readFloat readDouble"
    ),
    types: words(
      "AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either " +
      "Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable " +
      "Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering " +
      "Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder " +
      "StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector " +

      /* package java.lang */
      "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " +
      "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " +
      "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " +
      "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"
    ),
    multiLineStrings: true,
    blockKeywords: words("catch class enum do else finally for forSome if match switch try while"),
    defKeywords: words("class enum def object package trait type val var"),
    atoms: words("true false null"),
    indentStatements: false,
    indentSwitch: false,
    isOperatorChar: /[+\-*&%=<>!?|\/#:@]/,
    hooks: {
      "@": function(stream) {
        stream.eatWhile(/[\w\$_]/);
        return "meta";
      },
      '"': function(stream, state) {
        if (!stream.match('""')) return false;
        state.tokenize = tokenTripleString;
        return state.tokenize(stream, state);
      },
      "'": function(stream) {
        stream.eatWhile(/[\w\$_\xa1-\uffff]/);
        return "atom";
      },
      "=": function(stream, state) {
        var cx = state.context
        if (cx.type == "}" && cx.align && stream.eat(">")) {
          state.context = new Context(cx.indented, cx.column, cx.type, cx.info, null, cx.prev)
          return "operator"
        } else {
          return false
        }
      },

      "/": function(stream, state) {
        if (!stream.eat("*")) return false
        state.tokenize = tokenNestedComment(1)
        return state.tokenize(stream, state)
      }
    },
    modeProps: {closeBrackets: {pairs: '()[]{}""', triples: '"'}}
  });

  function tokenKotlinString(tripleString){
    return function (stream, state) {
      var escaped = false, next, end = false;
      while (!stream.eol()) {
        if (!tripleString && !escaped && stream.match('"') ) {end = true; break;}
        if (tripleString && stream.match('"""')) {end = true; break;}
        next = stream.next();
        if(!escaped && next == "$" && stream.match('{'))
          stream.skipTo("}");
        escaped = !escaped && next == "\\" && !tripleString;
      }
      if (end || !tripleString)
        state.tokenize = null;
      return "string";
    }
  }

  def("text/x-kotlin", {
    name: "clike",
    keywords: words(
      /*keywords*/
      "package as typealias class interface this super val operator " +
      "var fun for is in This throw return annotation " +
      "break continue object if else while do try when !in !is as? " +

      /*soft keywords*/
      "file import where by get set abstract enum open inner override private public internal " +
      "protected catch finally out final vararg reified dynamic companion constructor init " +
      "sealed field property receiver param sparam lateinit data inline noinline tailrec " +
      "external annotation crossinline const operator infix suspend actual expect setparam"
    ),
    types: words(
      /* package java.lang */
      "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " +
      "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " +
      "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " +
      "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray " +
      "ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy " +
      "LazyThreadSafetyMode LongArray Nothing ShortArray Unit"
    ),
    intendSwitch: false,
    indentStatements: false,
    multiLineStrings: true,
    number: /^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,
    blockKeywords: words("catch class do else finally for if where try while enum"),
    defKeywords: words("class val var object interface fun"),
    atoms: words("true false null this"),
    hooks: {
      "@": function(stream) {
        stream.eatWhile(/[\w\$_]/);
        return "meta";
      },
      '*': function(_stream, state) {
        return state.prevToken == '.' ? 'variable' : 'operator';
      },
      '"': function(stream, state) {
        state.tokenize = tokenKotlinString(stream.match('""'));
        return state.tokenize(stream, state);
      },
      "/": function(stream, state) {
        if (!stream.eat("*")) return false;
        state.tokenize = tokenNestedComment(1);
        return state.tokenize(stream, state)
      },
      indent: function(state, ctx, textAfter, indentUnit) {
        var firstChar = textAfter && textAfter.charAt(0);
        if ((state.prevToken == "}" || state.prevToken == ")") && textAfter == "")
          return state.indented;
        if ((state.prevToken == "operator" && textAfter != "}" && state.context.type != "}") ||
          state.prevToken == "variable" && firstChar == "." ||
          (state.prevToken == "}" || state.prevToken == ")") && firstChar == ".")
          return indentUnit * 2 + ctx.indented;
        if (ctx.align && ctx.type == "}")
          return ctx.indented + (state.context.type == (textAfter || "").charAt(0) ? 0 : indentUnit);
      }
    },
    modeProps: {closeBrackets: {triples: '"'}}
  });

  def(["x-shader/x-vertex", "x-shader/x-fragment"], {
    name: "clike",
    keywords: words("sampler1D sampler2D sampler3D samplerCube " +
                    "sampler1DShadow sampler2DShadow " +
                    "const attribute uniform varying " +
                    "break continue discard return " +
                    "for while do if else struct " +
                    "in out inout"),
    types: words("float int bool void " +
                 "vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 " +
                 "mat2 mat3 mat4"),
    blockKeywords: words("for while do if else struct"),
    builtin: words("radians degrees sin cos tan asin acos atan " +
                    "pow exp log exp2 sqrt inversesqrt " +
                    "abs sign floor ceil fract mod min max clamp mix step smoothstep " +
                    "length distance dot cross normalize ftransform faceforward " +
                    "reflect refract matrixCompMult " +
                    "lessThan lessThanEqual greaterThan greaterThanEqual " +
                    "equal notEqual any all not " +
                    "texture1D texture1DProj texture1DLod texture1DProjLod " +
                    "texture2D texture2DProj texture2DLod texture2DProjLod " +
                    "texture3D texture3DProj texture3DLod texture3DProjLod " +
                    "textureCube textureCubeLod " +
                    "shadow1D shadow2D shadow1DProj shadow2DProj " +
                    "shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod " +
                    "dFdx dFdy fwidth " +
                    "noise1 noise2 noise3 noise4"),
    atoms: words("true false " +
                "gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex " +
                "gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 " +
                "gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 " +
                "gl_FogCoord gl_PointCoord " +
                "gl_Position gl_PointSize gl_ClipVertex " +
                "gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor " +
                "gl_TexCoord gl_FogFragCoord " +
                "gl_FragCoord gl_FrontFacing " +
                "gl_FragData gl_FragDepth " +
                "gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix " +
                "gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse " +
                "gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse " +
                "gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose " +
                "gl_ProjectionMatrixInverseTranspose " +
                "gl_ModelViewProjectionMatrixInverseTranspose " +
                "gl_TextureMatrixInverseTranspose " +
                "gl_NormalScale gl_DepthRange gl_ClipPlane " +
                "gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel " +
                "gl_FrontLightModelProduct gl_BackLightModelProduct " +
                "gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ " +
                "gl_FogParameters " +
                "gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords " +
                "gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats " +
                "gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits " +
                "gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits " +
                "gl_MaxDrawBuffers"),
    indentSwitch: false,
    hooks: {"#": cppHook},
    modeProps: {fold: ["brace", "include"]}
  });

  def("text/x-nesc", {
    name: "clike",
    keywords: words(cKeywords + " as atomic async call command component components configuration event generic " +
                    "implementation includes interface module new norace nx_struct nx_union post provides " +
                    "signal task uses abstract extends"),
    types: cTypes,
    blockKeywords: words(cBlockKeywords),
    atoms: words("null true false"),
    hooks: {"#": cppHook},
    modeProps: {fold: ["brace", "include"]}
  });

  def("text/x-objectivec", {
    name: "clike",
    keywords: words(cKeywords + " " + objCKeywords),
    types: objCTypes,
    builtin: words(objCBuiltins),
    blockKeywords: words(cBlockKeywords + " @synthesize @try @catch @finally @autoreleasepool @synchronized"),
    defKeywords: words(cDefKeywords + " @interface @implementation @protocol @class"),
    dontIndentStatements: /^@.*$/,
    typeFirstDefinitions: true,
    atoms: words("YES NO NULL Nil nil true false nullptr"),
    isReservedIdentifier: cIsReservedIdentifier,
    hooks: {
      "#": cppHook,
      "*": pointerHook,
    },
    modeProps: {fold: ["brace", "include"]}
  });

  def("text/x-objectivec++", {
    name: "clike",
    keywords: words(cKeywords + " " + objCKeywords + " " + cppKeywords),
    types: objCTypes,
    builtin: words(objCBuiltins),
    blockKeywords: words(cBlockKeywords + " @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),
    defKeywords: words(cDefKeywords + " @interface @implementation @protocol @class class namespace"),
    dontIndentStatements: /^@.*$|^template$/,
    typeFirstDefinitions: true,
    atoms: words("YES NO NULL Nil nil true false nullptr"),
    isReservedIdentifier: cIsReservedIdentifier,
    hooks: {
      "#": cppHook,
      "*": pointerHook,
      "u": cpp11StringHook,
      "U": cpp11StringHook,
      "L": cpp11StringHook,
      "R": cpp11StringHook,
      "0": cpp14Literal,
      "1": cpp14Literal,
      "2": cpp14Literal,
      "3": cpp14Literal,
      "4": cpp14Literal,
      "5": cpp14Literal,
      "6": cpp14Literal,
      "7": cpp14Literal,
      "8": cpp14Literal,
      "9": cpp14Literal,
      token: function(stream, state, style) {
        if (style == "variable" && stream.peek() == "(" &&
            (state.prevToken == ";" || state.prevToken == null ||
             state.prevToken == "}") &&
            cppLooksLikeConstructor(stream.current()))
          return "def";
      }
    },
    namespaceSeparator: "::",
    modeProps: {fold: ["brace", "include"]}
  });

  def("text/x-squirrel", {
    name: "clike",
    keywords: words("base break clone continue const default delete enum extends function in class" +
                    " foreach local resume return this throw typeof yield constructor instanceof static"),
    types: cTypes,
    blockKeywords: words("case catch class else for foreach if switch try while"),
    defKeywords: words("function local class"),
    typeFirstDefinitions: true,
    atoms: words("true false null"),
    hooks: {"#": cppHook},
    modeProps: {fold: ["brace", "include"]}
  });

  // Ceylon Strings need to deal with interpolation
  var stringTokenizer = null;
  function tokenCeylonString(type) {
    return function(stream, state) {
      var escaped = false, next, end = false;
      while (!stream.eol()) {
        if (!escaped && stream.match('"') &&
              (type == "single" || stream.match('""'))) {
          end = true;
          break;
        }
        if (!escaped && stream.match('``')) {
          stringTokenizer = tokenCeylonString(type);
          end = true;
          break;
        }
        next = stream.next();
        escaped = type == "single" && !escaped && next == "\\";
      }
      if (end)
          state.tokenize = null;
      return "string";
    }
  }

  def("text/x-ceylon", {
    name: "clike",
    keywords: words("abstracts alias assembly assert assign break case catch class continue dynamic else" +
                    " exists extends finally for function given if import in interface is let module new" +
                    " nonempty object of out outer package return satisfies super switch then this throw" +
                    " try value void while"),
    types: function(word) {
        // In Ceylon all identifiers that start with an uppercase are types
        var first = word.charAt(0);
        return (first === first.toUpperCase() && first !== first.toLowerCase());
    },
    blockKeywords: words("case catch class dynamic else finally for function if interface module new object switch try while"),
    defKeywords: words("class dynamic function interface module object package value"),
    builtin: words("abstract actual aliased annotation by default deprecated doc final formal late license" +
                   " native optional sealed see serializable shared suppressWarnings tagged throws variable"),
    isPunctuationChar: /[\[\]{}\(\),;\:\.`]/,
    isOperatorChar: /[+\-*&%=<>!?|^~:\/]/,
    numberStart: /[\d#$]/,
    number: /^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,
    multiLineStrings: true,
    typeFirstDefinitions: true,
    atoms: words("true false null larger smaller equal empty finished"),
    indentSwitch: false,
    styleDefs: false,
    hooks: {
      "@": function(stream) {
        stream.eatWhile(/[\w\$_]/);
        return "meta";
      },
      '"': function(stream, state) {
          state.tokenize = tokenCeylonString(stream.match('""') ? "triple" : "single");
          return state.tokenize(stream, state);
        },
      '`': function(stream, state) {
          if (!stringTokenizer || !stream.match('`')) return false;
          state.tokenize = stringTokenizer;
          stringTokenizer = null;
          return state.tokenize(stream, state);
        },
      "'": function(stream) {
        stream.eatWhile(/[\w\$_\xa1-\uffff]/);
        return "atom";
      },
      token: function(_stream, state, style) {
          if ((style == "variable" || style == "type") &&
              state.prevToken == ".") {
            return "variable-2";
          }
        }
    },
    modeProps: {
        fold: ["brace", "import"],
        closeBrackets: {triples: '"'}
    }
  });

});


/***/ }),

/***/ "4c25":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "4cb2":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
var es_array_concat = __webpack_require__("99af");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.for-each.js
var es_array_for_each = __webpack_require__("4160");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.index-of.js
var es_array_index_of = __webpack_require__("c975");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
var es_array_iterator = __webpack_require__("e260");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
var es_array_map = __webpack_require__("d81d");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.splice.js
var es_array_splice = __webpack_require__("a434");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js
var es_object_keys = __webpack_require__("b64b");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js
var es_object_to_string = __webpack_require__("d3b7");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.constructor.js
var es_regexp_constructor = __webpack_require__("4d63");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js
var es_regexp_exec = __webpack_require__("ac1f");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.to-string.js
var es_regexp_to_string = __webpack_require__("25f0");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js
var web_dom_collections_for_each = __webpack_require__("159b");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.iterator.js
var web_dom_collections_iterator = __webpack_require__("ddb0");

// EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/extends.js
var helpers_extends = __webpack_require__("41b2");
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);

// EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/typeof.js
var helpers_typeof = __webpack_require__("1098");
var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof);

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.every.js
var es_array_every = __webpack_require__("a623");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.slice.js
var es_array_slice = __webpack_require__("fb6a");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.constructor.js
var es_number_constructor = __webpack_require__("a9e3");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js
var es_string_replace = __webpack_require__("5319");

// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/util.js











var formatRegExp = /%[sdj%]/g;
var warning = function warning() {}; // don't print warning message when in production env or node runtime

if (false) {}

function format() {
  for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
    args[_key] = arguments[_key];
  }

  var i = 1;
  var f = args[0];
  var len = args.length;

  if (typeof f === 'function') {
    return f.apply(null, args.slice(1));
  }

  if (typeof f === 'string') {
    var str = String(f).replace(formatRegExp, function (x) {
      if (x === '%%') {
        return '%';
      }

      if (i >= len) {
        return x;
      }

      switch (x) {
        case '%s':
          return String(args[i++]);

        case '%d':
          return Number(args[i++]);

        case '%j':
          try {
            return JSON.stringify(args[i++]);
          } catch (_) {
            return '[Circular]';
          }

          break;

        default:
          return x;
      }
    });

    for (var arg = args[i]; i < len; arg = args[++i]) {
      str += ' ' + arg;
    }

    return str;
  }

  return f;
}

function isNativeStringType(type) {
  return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
}

function isEmptyValue(value, type) {
  if (value === undefined || value === null) {
    return true;
  }

  if (type === 'array' && Array.isArray(value) && !value.length) {
    return true;
  }

  if (isNativeStringType(type) && typeof value === 'string' && !value) {
    return true;
  }

  return false;
}
function isEmptyObject(obj) {
  return Object.keys(obj).length === 0;
}

function asyncParallelArray(arr, func, callback) {
  var results = [];
  var total = 0;
  var arrLength = arr.length;

  function count(errors) {
    results.push.apply(results, errors);
    total++;

    if (total === arrLength) {
      callback(results);
    }
  }

  arr.forEach(function (a) {
    func(a, count);
  });
}

function asyncSerialArray(arr, func, callback) {
  var index = 0;
  var arrLength = arr.length;

  function next(errors) {
    if (errors && errors.length) {
      callback(errors);
      return;
    }

    var original = index;
    index = index + 1;

    if (original < arrLength) {
      func(arr[original], next);
    } else {
      callback([]);
    }
  }

  next([]);
}

function flattenObjArr(objArr) {
  var ret = [];
  Object.keys(objArr).forEach(function (k) {
    ret.push.apply(ret, objArr[k]);
  });
  return ret;
}

function asyncMap(objArr, option, func, callback) {
  if (option.first) {
    var flattenArr = flattenObjArr(objArr);
    return asyncSerialArray(flattenArr, func, callback);
  }

  var firstFields = option.firstFields || [];

  if (firstFields === true) {
    firstFields = Object.keys(objArr);
  }

  var objArrKeys = Object.keys(objArr);
  var objArrLength = objArrKeys.length;
  var total = 0;
  var results = [];

  var next = function next(errors) {
    results.push.apply(results, errors);
    total++;

    if (total === objArrLength) {
      callback(results);
    }
  };

  objArrKeys.forEach(function (key) {
    var arr = objArr[key];

    if (firstFields.indexOf(key) !== -1) {
      asyncSerialArray(arr, func, next);
    } else {
      asyncParallelArray(arr, func, next);
    }
  });
}
function complementError(rule) {
  return function (oe) {
    if (oe && oe.message) {
      oe.field = oe.field || rule.fullField;
      return oe;
    }

    return {
      message: oe,
      field: oe.field || rule.fullField
    };
  };
}
function deepMerge(target, source) {
  if (source) {
    for (var s in source) {
      if (source.hasOwnProperty(s)) {
        var value = source[s];

        if ((typeof value === 'undefined' ? 'undefined' : typeof_default()(value)) === 'object' && typeof_default()(target[s]) === 'object') {
          target[s] = extends_default()({}, target[s], value);
        } else {
          target[s] = value;
        }
      }
    }
  }

  return target;
}
// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/rule/required.js

/**
 *  Rule for validating required fields.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param source The source object being validated.
 *  @param errors An array of errors that this rule may add
 *  validation errors to.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function required(rule, value, source, errors, options, type) {
  if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
    errors.push(format(options.messages.required, rule.fullField));
  }
}

/* harmony default export */ var rule_required = (required);
// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/rule/whitespace.js

/**
 *  Rule for validating whitespace.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param source The source object being validated.
 *  @param errors An array of errors that this rule may add
 *  validation errors to.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function whitespace(rule, value, source, errors, options) {
  if (/^\s+$/.test(value) || value === '') {
    errors.push(format(options.messages.whitespace, rule.fullField));
  }
}

/* harmony default export */ var rule_whitespace = (whitespace);
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.match.js
var es_string_match = __webpack_require__("466d");

// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/rule/type.js








/* eslint max-len:0 */

var pattern = {
  // http://emailregex.com/
  email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
  url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", 'i'),
  hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
};
var types = {
  integer: function integer(value) {
    return types.number(value) && parseInt(value, 10) === value;
  },
  float: function float(value) {
    return types.number(value) && !types.integer(value);
  },
  array: function array(value) {
    return Array.isArray(value);
  },
  regexp: function regexp(value) {
    if (value instanceof RegExp) {
      return true;
    }

    try {
      return !!new RegExp(value);
    } catch (e) {
      return false;
    }
  },
  date: function date(value) {
    return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function';
  },
  number: function number(value) {
    if (isNaN(value)) {
      return false;
    }

    return typeof value === 'number';
  },
  object: function object(value) {
    return (typeof value === 'undefined' ? 'undefined' : typeof_default()(value)) === 'object' && !types.array(value);
  },
  method: function method(value) {
    return typeof value === 'function';
  },
  email: function email(value) {
    return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
  },
  url: function url(value) {
    return typeof value === 'string' && !!value.match(pattern.url);
  },
  hex: function hex(value) {
    return typeof value === 'string' && !!value.match(pattern.hex);
  }
};
/**
 *  Rule for validating the type of a value.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param source The source object being validated.
 *  @param errors An array of errors that this rule may add
 *  validation errors to.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function type_type(rule, value, source, errors, options) {
  if (rule.required && value === undefined) {
    rule_required(rule, value, source, errors, options);
    return;
  }

  var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
  var ruleType = rule.type;

  if (custom.indexOf(ruleType) > -1) {
    if (!types[ruleType](value)) {
      errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
    } // straight typeof check

  } else if (ruleType && (typeof value === 'undefined' ? 'undefined' : typeof_default()(value)) !== rule.type) {
    errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  }
}

/* harmony default export */ var rule_type = (type_type);
// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/rule/range.js



/**
 *  Rule for validating minimum and maximum allowed values.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param source The source object being validated.
 *  @param errors An array of errors that this rule may add
 *  validation errors to.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function range(rule, value, source, errors, options) {
  var len = typeof rule.len === 'number';
  var min = typeof rule.min === 'number';
  var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字（补充平面Supplementary Plane）

  var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  var val = value;
  var key = null;
  var num = typeof value === 'number';
  var str = typeof value === 'string';
  var arr = Array.isArray(value);

  if (num) {
    key = 'number';
  } else if (str) {
    key = 'string';
  } else if (arr) {
    key = 'array';
  } // if the value is not of a supported type for range validation
  // the validation rule rule should use the
  // type property to also test for a particular type


  if (!key) {
    return false;
  }

  if (arr) {
    val = value.length;
  }

  if (str) {
    // 处理码点大于U+010000的文字length属性不准确的bug，如"𠮷𠮷𠮷".lenght !== 3
    val = value.replace(spRegexp, '_').length;
  }

  if (len) {
    if (val !== rule.len) {
      errors.push(format(options.messages[key].len, rule.fullField, rule.len));
    }
  } else if (min && !max && val < rule.min) {
    errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  } else if (max && !min && val > rule.max) {
    errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  } else if (min && max && (val < rule.min || val > rule.max)) {
    errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  }
}

/* harmony default export */ var rule_range = (range);
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.join.js
var es_array_join = __webpack_require__("a15b");

// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/rule/enum.js



var ENUM = 'enum';
/**
 *  Rule for validating a value exists in an enumerable list.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param source The source object being validated.
 *  @param errors An array of errors that this rule may add
 *  validation errors to.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function enumerable(rule, value, source, errors, options) {
  rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];

  if (rule[ENUM].indexOf(value) === -1) {
    errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
  }
}

/* harmony default export */ var rule_enum = (enumerable);
// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/rule/pattern.js




/**
 *  Rule for validating a regular expression pattern.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param source The source object being validated.
 *  @param errors An array of errors that this rule may add
 *  validation errors to.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function pattern_pattern(rule, value, source, errors, options) {
  if (rule.pattern) {
    if (rule.pattern instanceof RegExp) {
      // if a RegExp instance is passed, reset `lastIndex` in case its `global`
      // flag is accidentally set to `true`, which in a validation scenario
      // is not necessary and the result might be misleading
      rule.pattern.lastIndex = 0;

      if (!rule.pattern.test(value)) {
        errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
      }
    } else if (typeof rule.pattern === 'string') {
      var _pattern = new RegExp(rule.pattern);

      if (!_pattern.test(value)) {
        errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
      }
    }
  }
}

/* harmony default export */ var rule_pattern = (pattern_pattern);
// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/rule/index.js






/* harmony default export */ var es_rule = ({
  required: rule_required,
  whitespace: rule_whitespace,
  type: rule_type,
  range: rule_range,
  'enum': rule_enum,
  pattern: rule_pattern
});
// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/validator/string.js


/**
 *  Performs validation for string types.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function string(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value, 'string') && !rule.required) {
      return callback();
    }

    es_rule.required(rule, value, source, errors, options, 'string');

    if (!isEmptyValue(value, 'string')) {
      es_rule.type(rule, value, source, errors, options);
      es_rule.range(rule, value, source, errors, options);
      es_rule.pattern(rule, value, source, errors, options);

      if (rule.whitespace === true) {
        es_rule.whitespace(rule, value, source, errors, options);
      }
    }
  }

  callback(errors);
}

/* harmony default export */ var validator_string = (string);
// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/validator/method.js


/**
 *  Validates a function.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function method(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value) && !rule.required) {
      return callback();
    }

    es_rule.required(rule, value, source, errors, options);

    if (value !== undefined) {
      es_rule.type(rule, value, source, errors, options);
    }
  }

  callback(errors);
}

/* harmony default export */ var validator_method = (method);
// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/validator/number.js


/**
 *  Validates a number.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function number(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value) && !rule.required) {
      return callback();
    }

    es_rule.required(rule, value, source, errors, options);

    if (value !== undefined) {
      es_rule.type(rule, value, source, errors, options);
      es_rule.range(rule, value, source, errors, options);
    }
  }

  callback(errors);
}

/* harmony default export */ var validator_number = (number);
// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/validator/boolean.js


/**
 *  Validates a boolean.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function boolean_boolean(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value) && !rule.required) {
      return callback();
    }

    es_rule.required(rule, value, source, errors, options);

    if (value !== undefined) {
      es_rule.type(rule, value, source, errors, options);
    }
  }

  callback(errors);
}

/* harmony default export */ var validator_boolean = (boolean_boolean);
// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/validator/regexp.js


/**
 *  Validates the regular expression type.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function regexp(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value) && !rule.required) {
      return callback();
    }

    es_rule.required(rule, value, source, errors, options);

    if (!isEmptyValue(value)) {
      es_rule.type(rule, value, source, errors, options);
    }
  }

  callback(errors);
}

/* harmony default export */ var validator_regexp = (regexp);
// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/validator/integer.js


/**
 *  Validates a number is an integer.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function integer(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value) && !rule.required) {
      return callback();
    }

    es_rule.required(rule, value, source, errors, options);

    if (value !== undefined) {
      es_rule.type(rule, value, source, errors, options);
      es_rule.range(rule, value, source, errors, options);
    }
  }

  callback(errors);
}

/* harmony default export */ var validator_integer = (integer);
// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/validator/float.js


/**
 *  Validates a number is a floating point number.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function floatFn(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value) && !rule.required) {
      return callback();
    }

    es_rule.required(rule, value, source, errors, options);

    if (value !== undefined) {
      es_rule.type(rule, value, source, errors, options);
      es_rule.range(rule, value, source, errors, options);
    }
  }

  callback(errors);
}

/* harmony default export */ var validator_float = (floatFn);
// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/validator/array.js


/**
 *  Validates an array.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function array(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value, 'array') && !rule.required) {
      return callback();
    }

    es_rule.required(rule, value, source, errors, options, 'array');

    if (!isEmptyValue(value, 'array')) {
      es_rule.type(rule, value, source, errors, options);
      es_rule.range(rule, value, source, errors, options);
    }
  }

  callback(errors);
}

/* harmony default export */ var validator_array = (array);
// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/validator/object.js


/**
 *  Validates an object.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function object_object(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value) && !rule.required) {
      return callback();
    }

    es_rule.required(rule, value, source, errors, options);

    if (value !== undefined) {
      es_rule.type(rule, value, source, errors, options);
    }
  }

  callback(errors);
}

/* harmony default export */ var validator_object = (object_object);
// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/validator/enum.js


var enum_ENUM = 'enum';
/**
 *  Validates an enumerable list.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function enum_enumerable(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value) && !rule.required) {
      return callback();
    }

    es_rule.required(rule, value, source, errors, options);

    if (value) {
      es_rule[enum_ENUM](rule, value, source, errors, options);
    }
  }

  callback(errors);
}

/* harmony default export */ var validator_enum = (enum_enumerable);
// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/validator/pattern.js


/**
 *  Validates a regular expression pattern.
 *
 *  Performs validation when a rule only contains
 *  a pattern property but is not declared as a string type.
 *
 *  @param rule The validation rule.
 *  @param value The value of the field on the source object.
 *  @param callback The callback function.
 *  @param source The source object being validated.
 *  @param options The validation options.
 *  @param options.messages The validation messages.
 */

function validator_pattern_pattern(rule, value, callback, source, options) {
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value, 'string') && !rule.required) {
      return callback();
    }

    es_rule.required(rule, value, source, errors, options);

    if (!isEmptyValue(value, 'string')) {
      es_rule.pattern(rule, value, source, errors, options);
    }
  }

  callback(errors);
}

/* harmony default export */ var validator_pattern = (validator_pattern_pattern);
// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/validator/date.js



function date(rule, value, callback, source, options) {
  // console.log('integer rule called %j', rule);
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); // console.log('validate on %s value', value);

  if (validate) {
    if (isEmptyValue(value) && !rule.required) {
      return callback();
    }

    es_rule.required(rule, value, source, errors, options);

    if (!isEmptyValue(value)) {
      var dateObject = void 0;

      if (typeof value === 'number') {
        dateObject = new Date(value);
      } else {
        dateObject = value;
      }

      es_rule.type(rule, dateObject, source, errors, options);

      if (dateObject) {
        es_rule.range(rule, dateObject.getTime(), source, errors, options);
      }
    }
  }

  callback(errors);
}

/* harmony default export */ var validator_date = (date);
// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/validator/required.js



function required_required(rule, value, callback, source, options) {
  var errors = [];
  var type = Array.isArray(value) ? 'array' : typeof value === 'undefined' ? 'undefined' : typeof_default()(value);
  es_rule.required(rule, value, source, errors, options, type);
  callback(errors);
}

/* harmony default export */ var validator_required = (required_required);
// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/validator/type.js



function validator_type_type(rule, value, callback, source, options) {
  var ruleType = rule.type;
  var errors = [];
  var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);

  if (validate) {
    if (isEmptyValue(value, ruleType) && !rule.required) {
      return callback();
    }

    es_rule.required(rule, value, source, errors, options, ruleType);

    if (!isEmptyValue(value, ruleType)) {
      es_rule.type(rule, value, source, errors, options);
    }
  }

  callback(errors);
}

/* harmony default export */ var validator_type = (validator_type_type);
// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/validator/index.js














/* harmony default export */ var es_validator = ({
  string: validator_string,
  method: validator_method,
  number: validator_number,
  boolean: validator_boolean,
  regexp: validator_regexp,
  integer: validator_integer,
  float: validator_float,
  array: validator_array,
  object: validator_object,
  'enum': validator_enum,
  pattern: validator_pattern,
  date: validator_date,
  url: validator_type,
  hex: validator_type,
  email: validator_type,
  required: validator_required
});
// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/messages.js
function newMessages() {
  return {
    'default': 'Validation error on field %s',
    required: '%s is required',
    'enum': '%s must be one of %s',
    whitespace: '%s cannot be empty',
    date: {
      format: '%s date %s is invalid for format %s',
      parse: '%s date could not be parsed, %s is invalid ',
      invalid: '%s date %s is invalid'
    },
    types: {
      string: '%s is not a %s',
      method: '%s is not a %s (function)',
      array: '%s is not an %s',
      object: '%s is not an %s',
      number: '%s is not a %s',
      date: '%s is not a %s',
      boolean: '%s is not a %s',
      integer: '%s is not an %s',
      float: '%s is not a %s',
      regexp: '%s is not a valid %s',
      email: '%s is not a valid %s',
      url: '%s is not a valid %s',
      hex: '%s is not a valid %s'
    },
    string: {
      len: '%s must be exactly %s characters',
      min: '%s must be at least %s characters',
      max: '%s cannot be longer than %s characters',
      range: '%s must be between %s and %s characters'
    },
    number: {
      len: '%s must equal %s',
      min: '%s cannot be less than %s',
      max: '%s cannot be greater than %s',
      range: '%s must be between %s and %s'
    },
    array: {
      len: '%s must be exactly %s in length',
      min: '%s cannot be less than %s in length',
      max: '%s cannot be greater than %s in length',
      range: '%s must be between %s and %s in length'
    },
    pattern: {
      mismatch: '%s value %s does not match pattern %s'
    },
    clone: function clone() {
      var cloned = JSON.parse(JSON.stringify(this));
      cloned.clone = this.clone;
      return cloned;
    }
  };
}
var messages_messages = newMessages();
// CONCATENATED MODULE: ./node_modules/element-ui/node_modules/async-validator/es/index.js


















/**
 *  Encapsulates a validation schema.
 *
 *  @param descriptor An object declaring validation rules
 *  for this schema.
 */

function Schema(descriptor) {
  this.rules = null;
  this._messages = messages_messages;
  this.define(descriptor);
}

Schema.prototype = {
  messages: function messages(_messages) {
    if (_messages) {
      this._messages = deepMerge(newMessages(), _messages);
    }

    return this._messages;
  },
  define: function define(rules) {
    if (!rules) {
      throw new Error('Cannot configure a schema with no rules');
    }

    if ((typeof rules === 'undefined' ? 'undefined' : typeof_default()(rules)) !== 'object' || Array.isArray(rules)) {
      throw new Error('Rules must be an object');
    }

    this.rules = {};
    var z = void 0;
    var item = void 0;

    for (z in rules) {
      if (rules.hasOwnProperty(z)) {
        item = rules[z];
        this.rules[z] = Array.isArray(item) ? item : [item];
      }
    }
  },
  validate: function validate(source_) {
    var _this = this;

    var o = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
    var oc = arguments[2];
    var source = source_;
    var options = o;
    var callback = oc;

    if (typeof options === 'function') {
      callback = options;
      options = {};
    }

    if (!this.rules || Object.keys(this.rules).length === 0) {
      if (callback) {
        callback();
      }

      return;
    }

    function complete(results) {
      var i = void 0;
      var field = void 0;
      var errors = [];
      var fields = {};

      function add(e) {
        if (Array.isArray(e)) {
          errors = errors.concat.apply(errors, e);
        } else {
          errors.push(e);
        }
      }

      for (i = 0; i < results.length; i++) {
        add(results[i]);
      }

      if (!errors.length) {
        errors = null;
        fields = null;
      } else {
        for (i = 0; i < errors.length; i++) {
          field = errors[i].field;
          fields[field] = fields[field] || [];
          fields[field].push(errors[i]);
        }
      }

      callback(errors, fields);
    }

    if (options.messages) {
      var messages = this.messages();

      if (messages === messages_messages) {
        messages = newMessages();
      }

      deepMerge(messages, options.messages);
      options.messages = messages;
    } else {
      options.messages = this.messages();
    }

    var arr = void 0;
    var value = void 0;
    var series = {};
    var keys = options.keys || Object.keys(this.rules);
    keys.forEach(function (z) {
      arr = _this.rules[z];
      value = source[z];
      arr.forEach(function (r) {
        var rule = r;

        if (typeof rule.transform === 'function') {
          if (source === source_) {
            source = extends_default()({}, source);
          }

          value = source[z] = rule.transform(value);
        }

        if (typeof rule === 'function') {
          rule = {
            validator: rule
          };
        } else {
          rule = extends_default()({}, rule);
        }

        rule.validator = _this.getValidationMethod(rule);
        rule.field = z;
        rule.fullField = rule.fullField || z;
        rule.type = _this.getType(rule);

        if (!rule.validator) {
          return;
        }

        series[z] = series[z] || [];
        series[z].push({
          rule: rule,
          value: value,
          source: source,
          field: z
        });
      });
    });
    var errorFields = {};
    asyncMap(series, options, function (data, doIt) {
      var rule = data.rule;
      var deep = (rule.type === 'object' || rule.type === 'array') && (typeof_default()(rule.fields) === 'object' || typeof_default()(rule.defaultField) === 'object');
      deep = deep && (rule.required || !rule.required && data.value);
      rule.field = data.field;

      function addFullfield(key, schema) {
        return extends_default()({}, schema, {
          fullField: rule.fullField + '.' + key
        });
      }

      function cb() {
        var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
        var errors = e;

        if (!Array.isArray(errors)) {
          errors = [errors];
        }

        if (errors.length) {
          warning('async-validator:', errors);
        }

        if (errors.length && rule.message) {
          errors = [].concat(rule.message);
        }

        errors = errors.map(complementError(rule));

        if (options.first && errors.length) {
          errorFields[rule.field] = 1;
          return doIt(errors);
        }

        if (!deep) {
          doIt(errors);
        } else {
          // if rule is required but the target object
          // does not exist fail at the rule level and don't
          // go deeper
          if (rule.required && !data.value) {
            if (rule.message) {
              errors = [].concat(rule.message).map(complementError(rule));
            } else if (options.error) {
              errors = [options.error(rule, format(options.messages.required, rule.field))];
            } else {
              errors = [];
            }

            return doIt(errors);
          }

          var fieldsSchema = {};

          if (rule.defaultField) {
            for (var k in data.value) {
              if (data.value.hasOwnProperty(k)) {
                fieldsSchema[k] = rule.defaultField;
              }
            }
          }

          fieldsSchema = extends_default()({}, fieldsSchema, data.rule.fields);

          for (var f in fieldsSchema) {
            if (fieldsSchema.hasOwnProperty(f)) {
              var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
              fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
            }
          }

          var schema = new Schema(fieldsSchema);
          schema.messages(options.messages);

          if (data.rule.options) {
            data.rule.options.messages = options.messages;
            data.rule.options.error = options.error;
          }

          schema.validate(data.value, data.rule.options || options, function (errs) {
            doIt(errs && errs.length ? errors.concat(errs) : errs);
          });
        }
      }

      var res = rule.validator(rule, data.value, cb, data.source, options);

      if (res && res.then) {
        res.then(function () {
          return cb();
        }, function (e) {
          return cb(e);
        });
      }
    }, function (results) {
      complete(results);
    });
  },
  getType: function getType(rule) {
    if (rule.type === undefined && rule.pattern instanceof RegExp) {
      rule.type = 'pattern';
    }

    if (typeof rule.validator !== 'function' && rule.type && !es_validator.hasOwnProperty(rule.type)) {
      throw new Error(format('Unknown rule type %s', rule.type));
    }

    return rule.type || 'string';
  },
  getValidationMethod: function getValidationMethod(rule) {
    if (typeof rule.validator === 'function') {
      return rule.validator;
    }

    var keys = Object.keys(rule);
    var messageIndex = keys.indexOf('message');

    if (messageIndex !== -1) {
      keys.splice(messageIndex, 1);
    }

    if (keys.length === 1 && keys[0] === 'required') {
      return es_validator.required;
    }

    return es_validator[this.getType(rule)] || false;
  }
};

Schema.register = function register(type, validator) {
  if (typeof validator !== 'function') {
    throw new Error('Cannot register a validator by type, validator is not a function');
  }

  es_validator[type] = validator;
};

Schema.messages = messages_messages;
/* harmony default export */ var es = __webpack_exports__["default"] = (Schema);

/***/ }),

/***/ "4d20":
/***/ (function(module, exports, __webpack_require__) {

var pIE = __webpack_require__("1917");
var createDesc = __webpack_require__("10db");
var toIObject = __webpack_require__("6ca1");
var toPrimitive = __webpack_require__("3397");
var has = __webpack_require__("9c0e");
var IE8_DOM_DEFINE = __webpack_require__("faf5");
var gOPD = Object.getOwnPropertyDescriptor;

exports.f = __webpack_require__("0bad") ? gOPD : function getOwnPropertyDescriptor(O, P) {
  O = toIObject(O);
  P = toPrimitive(P, true);
  if (IE8_DOM_DEFINE) try {
    return gOPD(O, P);
  } catch (e) { /* empty */ }
  if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
};


/***/ }),

/***/ "4d63":
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__("83ab");
var global = __webpack_require__("da84");
var isForced = __webpack_require__("94ca");
var inheritIfRequired = __webpack_require__("7156");
var defineProperty = __webpack_require__("9bf2").f;
var getOwnPropertyNames = __webpack_require__("241c").f;
var isRegExp = __webpack_require__("44e7");
var getFlags = __webpack_require__("ad6d");
var stickyHelpers = __webpack_require__("9f7fd");
var redefine = __webpack_require__("6eeb");
var fails = __webpack_require__("d039");
var setInternalState = __webpack_require__("69f3").set;
var setSpecies = __webpack_require__("2626");
var wellKnownSymbol = __webpack_require__("b622");

var MATCH = wellKnownSymbol('match');
var NativeRegExp = global.RegExp;
var RegExpPrototype = NativeRegExp.prototype;
var re1 = /a/g;
var re2 = /a/g;

// "new" should create a new object, old webkit bug
var CORRECT_NEW = new NativeRegExp(re1) !== re1;

var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;

var FORCED = DESCRIPTORS && isForced('RegExp', (!CORRECT_NEW || UNSUPPORTED_Y || fails(function () {
  re2[MATCH] = false;
  // RegExp constructor can alter flags and IsRegExp works correct with @@match
  return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';
})));

// `RegExp` constructor
// https://tc39.github.io/ecma262/#sec-regexp-constructor
if (FORCED) {
  var RegExpWrapper = function RegExp(pattern, flags) {
    var thisIsRegExp = this instanceof RegExpWrapper;
    var patternIsRegExp = isRegExp(pattern);
    var flagsAreUndefined = flags === undefined;
    var sticky;

    if (!thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined) {
      return pattern;
    }

    if (CORRECT_NEW) {
      if (patternIsRegExp && !flagsAreUndefined) pattern = pattern.source;
    } else if (pattern instanceof RegExpWrapper) {
      if (flagsAreUndefined) flags = getFlags.call(pattern);
      pattern = pattern.source;
    }

    if (UNSUPPORTED_Y) {
      sticky = !!flags && flags.indexOf('y') > -1;
      if (sticky) flags = flags.replace(/y/g, '');
    }

    var result = inheritIfRequired(
      CORRECT_NEW ? new NativeRegExp(pattern, flags) : NativeRegExp(pattern, flags),
      thisIsRegExp ? this : RegExpPrototype,
      RegExpWrapper
    );

    if (UNSUPPORTED_Y && sticky) setInternalState(result, { sticky: sticky });

    return result;
  };
  var proxy = function (key) {
    key in RegExpWrapper || defineProperty(RegExpWrapper, key, {
      configurable: true,
      get: function () { return NativeRegExp[key]; },
      set: function (it) { NativeRegExp[key] = it; }
    });
  };
  var keys = getOwnPropertyNames(NativeRegExp);
  var index = 0;
  while (keys.length > index) proxy(keys[index++]);
  RegExpPrototype.constructor = RegExpWrapper;
  RegExpWrapper.prototype = RegExpPrototype;
  redefine(global, 'RegExp', RegExpWrapper);
}

// https://tc39.github.io/ecma262/#sec-get-regexp-@@species
setSpecies('RegExp');


/***/ }),

/***/ "4d64":
/***/ (function(module, exports, __webpack_require__) {

var toIndexedObject = __webpack_require__("fc6a");
var toLength = __webpack_require__("50c4");
var toAbsoluteIndex = __webpack_require__("23cb");

// `Array.prototype.{ indexOf, includes }` methods implementation
var createMethod = function (IS_INCLUDES) {
  return function ($this, el, fromIndex) {
    var O = toIndexedObject($this);
    var length = toLength(O.length);
    var index = toAbsoluteIndex(fromIndex, length);
    var value;
    // Array#includes uses SameValueZero equality algorithm
    // eslint-disable-next-line no-self-compare
    if (IS_INCLUDES && el != el) while (length > index) {
      value = O[index++];
      // eslint-disable-next-line no-self-compare
      if (value != value) return true;
    // Array#indexOf ignores holes, Array#includes - not
    } else for (;length > index; index++) {
      if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
    } return !IS_INCLUDES && -1;
  };
};

module.exports = {
  // `Array.prototype.includes` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.includes
  includes: createMethod(true),
  // `Array.prototype.indexOf` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
  indexOf: createMethod(false)
};


/***/ }),

/***/ "4d88":
/***/ (function(module, exports) {

var toString = {}.toString;

module.exports = function (it) {
  return toString.call(it).slice(8, -1);
};


/***/ }),

/***/ "4de4":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var $filter = __webpack_require__("b727").filter;
var arrayMethodHasSpeciesSupport = __webpack_require__("1dde");
var arrayMethodUsesToLength = __webpack_require__("ae40");

var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
// Edge 14- issue
var USES_TO_LENGTH = arrayMethodUsesToLength('filter');

// `Array.prototype.filter` method
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
  filter: function filter(callbackfn /* , thisArg */) {
    return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),

/***/ "4df4":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var bind = __webpack_require__("0366");
var toObject = __webpack_require__("7b0b");
var callWithSafeIterationClosing = __webpack_require__("9bdd");
var isArrayIteratorMethod = __webpack_require__("e95a");
var toLength = __webpack_require__("50c4");
var createProperty = __webpack_require__("8418");
var getIteratorMethod = __webpack_require__("35a1");

// `Array.from` method implementation
// https://tc39.github.io/ecma262/#sec-array.from
module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
  var O = toObject(arrayLike);
  var C = typeof this == 'function' ? this : Array;
  var argumentsLength = arguments.length;
  var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
  var mapping = mapfn !== undefined;
  var iteratorMethod = getIteratorMethod(O);
  var index = 0;
  var length, result, step, iterator, next, value;
  if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);
  // if the target is not iterable or it's an array with the default iterator - use a simple case
  if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
    iterator = iteratorMethod.call(O);
    next = iterator.next;
    result = new C();
    for (;!(step = next.call(iterator)).done; index++) {
      value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
      createProperty(result, index, value);
    }
  } else {
    length = toLength(O.length);
    result = new C(length);
    for (;length > index; index++) {
      value = mapping ? mapfn(O[index], index) : O[index];
      createProperty(result, index, value);
    }
  }
  result.length = index;
  return result;
};


/***/ }),

/***/ "4e4b":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("d28b");

__webpack_require__("944a");

__webpack_require__("99af");

__webpack_require__("a623");

__webpack_require__("4de4");

__webpack_require__("4160");

__webpack_require__("c975");

__webpack_require__("e260");

__webpack_require__("d81d");

__webpack_require__("fb6a");

__webpack_require__("45fc");

__webpack_require__("a434");

__webpack_require__("b0c0");

__webpack_require__("0c47");

__webpack_require__("23dc");

__webpack_require__("a9e3");

__webpack_require__("d3b7");

__webpack_require__("4d63");

__webpack_require__("ac1f");

__webpack_require__("25f0");

__webpack_require__("3ca3");

__webpack_require__("159b");

__webpack_require__("ddb0");

var _typeof2 = __webpack_require__("7037");

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 && _typeof2(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 = "/dist/";
  /******/

  /******/

  /******/
  // Load entry module and return exports

  /******/

  return __webpack_require__(__webpack_require__.s = 61);
  /******/
}(
/************************************************************************/

/******/
[
/* 0 */

/***/
function (module, __webpack_exports__, __webpack_require__) {
  "use strict";
  /* harmony export (binding) */

  __webpack_require__.d(__webpack_exports__, "a", function () {
    return normalizeComponent;
  });
  /* globals __VUE_SSR_CONTEXT__ */
  // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  // This module is a runtime utility for cleaner component module output and will
  // be included in the final webpack user bundle.


  function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier,
  /* server only */
  shadowMode
  /* vue-cli only */
  ) {
    // Vue.extend constructor export interop
    var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports; // render functions

    if (render) {
      options.render = render;
      options.staticRenderFns = staticRenderFns;
      options._compiled = true;
    } // functional template


    if (functionalTemplate) {
      options.functional = true;
    } // scopedId


    if (scopeId) {
      options._scopeId = 'data-v-' + scopeId;
    }

    var hook;

    if (moduleIdentifier) {
      // server build
      hook = function hook(context) {
        // 2.3 injection
        context = context || // cached call
        this.$vnode && this.$vnode.ssrContext || // stateful
        this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
        // 2.2 with runInNewContext: true

        if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
          context = __VUE_SSR_CONTEXT__;
        } // inject component styles


        if (injectStyles) {
          injectStyles.call(this, context);
        } // register component module identifier for async chunk inferrence


        if (context && context._registeredComponents) {
          context._registeredComponents.add(moduleIdentifier);
        }
      }; // used by ssr in case component is cached and beforeCreate
      // never gets called


      options._ssrRegister = hook;
    } else if (injectStyles) {
      hook = shadowMode ? function () {
        injectStyles.call(this, this.$root.$options.shadowRoot);
      } : injectStyles;
    }

    if (hook) {
      if (options.functional) {
        // for template-only hot-reload because in that case the render fn doesn't
        // go through the normalizer
        options._injectStyles = hook; // register for functioal component in vue file

        var originalRender = options.render;

        options.render = function renderWithStyleInjection(h, context) {
          hook.call(context);
          return originalRender(h, context);
        };
      } else {
        // inject component registration as beforeCreate hook
        var existing = options.beforeCreate;
        options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
      }
    }

    return {
      exports: scriptExports,
      options: options
    };
  }
  /***/

},,,
/* 1 */

/* 2 */

/* 3 */

/***/
function (module, exports) {
  module.exports = __webpack_require__("8122");
  /***/
},
/* 4 */

/***/
function (module, exports) {
  module.exports = __webpack_require__("d010");
  /***/
},
/* 5 */

/***/
function (module, exports) {
  module.exports = __webpack_require__("e974");
  /***/
},
/* 6 */

/***/
function (module, exports) {
  module.exports = __webpack_require__("6b7c");
  /***/
},,,,
/* 7 */

/* 8 */

/* 9 */

/* 10 */

/***/
function (module, exports) {
  module.exports = __webpack_require__("f3ad");
  /***/
},,
/* 11 */

/* 12 */

/***/
function (module, exports) {
  module.exports = __webpack_require__("417f");
  /***/
},,
/* 13 */

/* 14 */

/***/
function (module, exports) {
  module.exports = __webpack_require__("14e9");
  /***/
},,
/* 15 */

/* 16 */

/***/
function (module, exports) {
  module.exports = __webpack_require__("4010");
  /***/
},
/* 17 */

/***/
function (module, exports) {
  module.exports = __webpack_require__("0e15");
  /***/
},,
/* 18 */

/* 19 */

/***/
function (module, exports) {
  module.exports = __webpack_require__("4897");
  /***/
},,
/* 20 */

/* 21 */

/***/
function (module, exports) {
  module.exports = __webpack_require__("d397");
  /***/
},
/* 22 */

/***/
function (module, exports) {
  module.exports = __webpack_require__("12f2");
  /***/
},,,,,,,,,
/* 23 */

/* 24 */

/* 25 */

/* 26 */

/* 27 */

/* 28 */

/* 29 */

/* 30 */

/* 31 */

/***/
function (module, exports) {
  module.exports = __webpack_require__("2a5e");
  /***/
},,,
/* 32 */

/* 33 */

/* 34 */

/***/
function (module, __webpack_exports__, __webpack_require__) {
  "use strict"; // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option.vue?vue&type=template&id=7a44c642&

  var render = function render() {
    var _vm = this;

    var _h = _vm.$createElement;

    var _c = _vm._self._c || _h;

    return _c("li", {
      directives: [{
        name: "show",
        rawName: "v-show",
        value: _vm.visible,
        expression: "visible"
      }],
      staticClass: "el-select-dropdown__item",
      class: {
        selected: _vm.itemSelected,
        "is-disabled": _vm.disabled || _vm.groupDisabled || _vm.limitReached,
        hover: _vm.hover
      },
      on: {
        mouseenter: _vm.hoverItem,
        click: function click($event) {
          $event.stopPropagation();
          return _vm.selectOptionClick($event);
        }
      }
    }, [_vm._t("default", [_c("span", [_vm._v(_vm._s(_vm.currentLabel))])])], 2);
  };

  var staticRenderFns = [];
  render._withStripped = true; // CONCATENATED MODULE: ./packages/select/src/option.vue?vue&type=template&id=7a44c642&
  // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"

  var emitter_ = __webpack_require__(4);

  var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_); // EXTERNAL MODULE: external "element-ui/lib/utils/util"


  var util_ = __webpack_require__(3); // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option.vue?vue&type=script&lang=js&


  var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) {
    return _typeof2(obj);
  } : function (obj) {
    return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
  }; //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //

  /* harmony default export */


  var optionvue_type_script_lang_js_ = {
    mixins: [emitter_default.a],
    name: 'ElOption',
    componentName: 'ElOption',
    inject: ['select'],
    props: {
      value: {
        required: true
      },
      label: [String, Number],
      created: Boolean,
      disabled: {
        type: Boolean,
        default: false
      }
    },
    data: function data() {
      return {
        index: -1,
        groupDisabled: false,
        visible: true,
        hitState: false,
        hover: false
      };
    },
    computed: {
      isObject: function isObject() {
        return Object.prototype.toString.call(this.value).toLowerCase() === '[object object]';
      },
      currentLabel: function currentLabel() {
        return this.label || (this.isObject ? '' : this.value);
      },
      currentValue: function currentValue() {
        return this.value || this.label || '';
      },
      itemSelected: function itemSelected() {
        if (!this.select.multiple) {
          return this.isEqual(this.value, this.select.value);
        } else {
          return this.contains(this.select.value, this.value);
        }
      },
      limitReached: function limitReached() {
        if (this.select.multiple) {
          return !this.itemSelected && (this.select.value || []).length >= this.select.multipleLimit && this.select.multipleLimit > 0;
        } else {
          return false;
        }
      }
    },
    watch: {
      currentLabel: function currentLabel() {
        if (!this.created && !this.select.remote) this.dispatch('ElSelect', 'setSelected');
      },
      value: function value(val, oldVal) {
        var _select = this.select,
            remote = _select.remote,
            valueKey = _select.valueKey;

        if (!this.created && !remote) {
          if (valueKey && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object' && (typeof oldVal === 'undefined' ? 'undefined' : _typeof(oldVal)) === 'object' && val[valueKey] === oldVal[valueKey]) {
            return;
          }

          this.dispatch('ElSelect', 'setSelected');
        }
      }
    },
    methods: {
      isEqual: function isEqual(a, b) {
        if (!this.isObject) {
          return a === b;
        } else {
          var valueKey = this.select.valueKey;
          return Object(util_["getValueByPath"])(a, valueKey) === Object(util_["getValueByPath"])(b, valueKey);
        }
      },
      contains: function contains() {
        var arr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
        var target = arguments[1];

        if (!this.isObject) {
          return arr && arr.indexOf(target) > -1;
        } else {
          var valueKey = this.select.valueKey;
          return arr && arr.some(function (item) {
            return Object(util_["getValueByPath"])(item, valueKey) === Object(util_["getValueByPath"])(target, valueKey);
          });
        }
      },
      handleGroupDisabled: function handleGroupDisabled(val) {
        this.groupDisabled = val;
      },
      hoverItem: function hoverItem() {
        if (!this.disabled && !this.groupDisabled) {
          this.select.hoverIndex = this.select.options.indexOf(this);
        }
      },
      selectOptionClick: function selectOptionClick() {
        if (this.disabled !== true && this.groupDisabled !== true) {
          this.dispatch('ElSelect', 'handleOptionClick', [this, true]);
        }
      },
      queryChange: function queryChange(query) {
        this.visible = new RegExp(Object(util_["escapeRegexpString"])(query), 'i').test(this.currentLabel) || this.created;

        if (!this.visible) {
          this.select.filteredOptionsCount--;
        }
      }
    },
    created: function created() {
      this.select.options.push(this);
      this.select.cachedOptions.push(this);
      this.select.optionsCount++;
      this.select.filteredOptionsCount++;
      this.$on('queryChange', this.queryChange);
      this.$on('handleGroupDisabled', this.handleGroupDisabled);
    },
    beforeDestroy: function beforeDestroy() {
      var _select2 = this.select,
          selected = _select2.selected,
          multiple = _select2.multiple;
      var selectedOptions = multiple ? selected : [selected];
      var index = this.select.cachedOptions.indexOf(this);
      var selectedIndex = selectedOptions.indexOf(this); // if option is not selected, remove it from cache

      if (index > -1 && selectedIndex < 0) {
        this.select.cachedOptions.splice(index, 1);
      }

      this.select.onOptionDestroy(this.select.options.indexOf(this));
    }
  }; // CONCATENATED MODULE: ./packages/select/src/option.vue?vue&type=script&lang=js&

  /* harmony default export */

  var src_optionvue_type_script_lang_js_ = optionvue_type_script_lang_js_; // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js

  var componentNormalizer = __webpack_require__(0); // CONCATENATED MODULE: ./packages/select/src/option.vue

  /* normalize component */


  var component = Object(componentNormalizer["a"
  /* default */
  ])(src_optionvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null);
  /* hot reload */

  if (false) { var api; }

  component.options.__file = "packages/select/src/option.vue";
  /* harmony default export */

  var src_option = __webpack_exports__["a"] = component.exports;
  /***/
},,,,
/* 35 */

/* 36 */

/* 37 */

/* 38 */

/***/
function (module, exports) {
  module.exports = __webpack_require__("8bbc");
  /***/
},,,,,,,,,,,,,,,,,,,,,,,
/* 39 */

/* 40 */

/* 41 */

/* 42 */

/* 43 */

/* 44 */

/* 45 */

/* 46 */

/* 47 */

/* 48 */

/* 49 */

/* 50 */

/* 51 */

/* 52 */

/* 53 */

/* 54 */

/* 55 */

/* 56 */

/* 57 */

/* 58 */

/* 59 */

/* 60 */

/* 61 */

/***/
function (module, __webpack_exports__, __webpack_require__) {
  "use strict";

  __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select.vue?vue&type=template&id=0e4aade6&


  var render = function render() {
    var _vm = this;

    var _h = _vm.$createElement;

    var _c = _vm._self._c || _h;

    return _c("div", {
      directives: [{
        name: "clickoutside",
        rawName: "v-clickoutside",
        value: _vm.handleClose,
        expression: "handleClose"
      }],
      staticClass: "el-select",
      class: [_vm.selectSize ? "el-select--" + _vm.selectSize : ""],
      on: {
        click: function click($event) {
          $event.stopPropagation();
          return _vm.toggleMenu($event);
        }
      }
    }, [_vm.multiple ? _c("div", {
      ref: "tags",
      staticClass: "el-select__tags",
      style: {
        "max-width": _vm.inputWidth - 32 + "px",
        width: "100%"
      }
    }, [_vm.collapseTags && _vm.selected.length ? _c("span", [_c("el-tag", {
      attrs: {
        closable: !_vm.selectDisabled,
        size: _vm.collapseTagSize,
        hit: _vm.selected[0].hitState,
        type: "info",
        "disable-transitions": ""
      },
      on: {
        close: function close($event) {
          _vm.deleteTag($event, _vm.selected[0]);
        }
      }
    }, [_c("span", {
      staticClass: "el-select__tags-text"
    }, [_vm._v(_vm._s(_vm.selected[0].currentLabel))])]), _vm.selected.length > 1 ? _c("el-tag", {
      attrs: {
        closable: false,
        size: _vm.collapseTagSize,
        type: "info",
        "disable-transitions": ""
      }
    }, [_c("span", {
      staticClass: "el-select__tags-text"
    }, [_vm._v("+ " + _vm._s(_vm.selected.length - 1))])]) : _vm._e()], 1) : _vm._e(), !_vm.collapseTags ? _c("transition-group", {
      on: {
        "after-leave": _vm.resetInputHeight
      }
    }, _vm._l(_vm.selected, function (item) {
      return _c("el-tag", {
        key: _vm.getValueKey(item),
        attrs: {
          closable: !_vm.selectDisabled,
          size: _vm.collapseTagSize,
          hit: item.hitState,
          type: "info",
          "disable-transitions": ""
        },
        on: {
          close: function close($event) {
            _vm.deleteTag($event, item);
          }
        }
      }, [_c("span", {
        staticClass: "el-select__tags-text"
      }, [_vm._v(_vm._s(item.currentLabel))])]);
    }), 1) : _vm._e(), _vm.filterable ? _c("input", {
      directives: [{
        name: "model",
        rawName: "v-model",
        value: _vm.query,
        expression: "query"
      }],
      ref: "input",
      staticClass: "el-select__input",
      class: [_vm.selectSize ? "is-" + _vm.selectSize : ""],
      style: {
        "flex-grow": "1",
        width: _vm.inputLength / (_vm.inputWidth - 32) + "%",
        "max-width": _vm.inputWidth - 42 + "px"
      },
      attrs: {
        type: "text",
        disabled: _vm.selectDisabled,
        autocomplete: _vm.autoComplete || _vm.autocomplete
      },
      domProps: {
        value: _vm.query
      },
      on: {
        focus: _vm.handleFocus,
        blur: function blur($event) {
          _vm.softFocus = false;
        },
        keyup: _vm.managePlaceholder,
        keydown: [_vm.resetInputState, function ($event) {
          if (!("button" in $event) && _vm._k($event.keyCode, "down", 40, $event.key, ["Down", "ArrowDown"])) {
            return null;
          }

          $event.preventDefault();

          _vm.navigateOptions("next");
        }, function ($event) {
          if (!("button" in $event) && _vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"])) {
            return null;
          }

          $event.preventDefault();

          _vm.navigateOptions("prev");
        }, function ($event) {
          if (!("button" in $event) && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) {
            return null;
          }

          $event.preventDefault();
          return _vm.selectOption($event);
        }, function ($event) {
          if (!("button" in $event) && _vm._k($event.keyCode, "esc", 27, $event.key, ["Esc", "Escape"])) {
            return null;
          }

          $event.stopPropagation();
          $event.preventDefault();
          _vm.visible = false;
        }, function ($event) {
          if (!("button" in $event) && _vm._k($event.keyCode, "delete", [8, 46], $event.key, ["Backspace", "Delete", "Del"])) {
            return null;
          }

          return _vm.deletePrevTag($event);
        }, function ($event) {
          if (!("button" in $event) && _vm._k($event.keyCode, "tab", 9, $event.key, "Tab")) {
            return null;
          }

          _vm.visible = false;
        }],
        compositionstart: _vm.handleComposition,
        compositionupdate: _vm.handleComposition,
        compositionend: _vm.handleComposition,
        input: [function ($event) {
          if ($event.target.composing) {
            return;
          }

          _vm.query = $event.target.value;
        }, _vm.debouncedQueryChange]
      }
    }) : _vm._e()], 1) : _vm._e(), _c("el-input", {
      ref: "reference",
      class: {
        "is-focus": _vm.visible
      },
      attrs: {
        type: "text",
        placeholder: _vm.currentPlaceholder,
        name: _vm.name,
        id: _vm.id,
        autocomplete: _vm.autoComplete || _vm.autocomplete,
        size: _vm.selectSize,
        disabled: _vm.selectDisabled,
        readonly: _vm.readonly,
        "validate-event": false,
        tabindex: _vm.multiple && _vm.filterable ? "-1" : null
      },
      on: {
        focus: _vm.handleFocus,
        blur: _vm.handleBlur
      },
      nativeOn: {
        keyup: function keyup($event) {
          return _vm.debouncedOnInputChange($event);
        },
        keydown: [function ($event) {
          if (!("button" in $event) && _vm._k($event.keyCode, "down", 40, $event.key, ["Down", "ArrowDown"])) {
            return null;
          }

          $event.stopPropagation();
          $event.preventDefault();

          _vm.navigateOptions("next");
        }, function ($event) {
          if (!("button" in $event) && _vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"])) {
            return null;
          }

          $event.stopPropagation();
          $event.preventDefault();

          _vm.navigateOptions("prev");
        }, function ($event) {
          if (!("button" in $event) && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) {
            return null;
          }

          $event.preventDefault();
          return _vm.selectOption($event);
        }, function ($event) {
          if (!("button" in $event) && _vm._k($event.keyCode, "esc", 27, $event.key, ["Esc", "Escape"])) {
            return null;
          }

          $event.stopPropagation();
          $event.preventDefault();
          _vm.visible = false;
        }, function ($event) {
          if (!("button" in $event) && _vm._k($event.keyCode, "tab", 9, $event.key, "Tab")) {
            return null;
          }

          _vm.visible = false;
        }],
        paste: function paste($event) {
          return _vm.debouncedOnInputChange($event);
        },
        mouseenter: function mouseenter($event) {
          _vm.inputHovering = true;
        },
        mouseleave: function mouseleave($event) {
          _vm.inputHovering = false;
        }
      },
      model: {
        value: _vm.selectedLabel,
        callback: function callback($$v) {
          _vm.selectedLabel = $$v;
        },
        expression: "selectedLabel"
      }
    }, [_vm.$slots.prefix ? _c("template", {
      slot: "prefix"
    }, [_vm._t("prefix")], 2) : _vm._e(), _c("template", {
      slot: "suffix"
    }, [_c("i", {
      directives: [{
        name: "show",
        rawName: "v-show",
        value: !_vm.showClose,
        expression: "!showClose"
      }],
      class: ["el-select__caret", "el-input__icon", "el-icon-" + _vm.iconClass]
    }), _vm.showClose ? _c("i", {
      staticClass: "el-select__caret el-input__icon el-icon-circle-close",
      on: {
        click: _vm.handleClearClick
      }
    }) : _vm._e()])], 2), _c("transition", {
      attrs: {
        name: "el-zoom-in-top"
      },
      on: {
        "before-enter": _vm.handleMenuEnter,
        "after-leave": _vm.doDestroy
      }
    }, [_c("el-select-menu", {
      directives: [{
        name: "show",
        rawName: "v-show",
        value: _vm.visible && _vm.emptyText !== false,
        expression: "visible && emptyText !== false"
      }],
      ref: "popper",
      attrs: {
        "append-to-body": _vm.popperAppendToBody
      }
    }, [_c("el-scrollbar", {
      directives: [{
        name: "show",
        rawName: "v-show",
        value: _vm.options.length > 0 && !_vm.loading,
        expression: "options.length > 0 && !loading"
      }],
      ref: "scrollbar",
      class: {
        "is-empty": !_vm.allowCreate && _vm.query && _vm.filteredOptionsCount === 0
      },
      attrs: {
        tag: "ul",
        "wrap-class": "el-select-dropdown__wrap",
        "view-class": "el-select-dropdown__list"
      }
    }, [_vm.showNewOption ? _c("el-option", {
      attrs: {
        value: _vm.query,
        created: ""
      }
    }) : _vm._e(), _vm._t("default")], 2), _vm.emptyText && (!_vm.allowCreate || _vm.loading || _vm.allowCreate && _vm.options.length === 0) ? [_vm.$slots.empty ? _vm._t("empty") : _c("p", {
      staticClass: "el-select-dropdown__empty"
    }, [_vm._v("\n          " + _vm._s(_vm.emptyText) + "\n        ")])] : _vm._e()], 2)], 1)], 1);
  };

  var staticRenderFns = [];
  render._withStripped = true; // CONCATENATED MODULE: ./packages/select/src/select.vue?vue&type=template&id=0e4aade6&
  // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"

  var emitter_ = __webpack_require__(4);

  var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_); // EXTERNAL MODULE: external "element-ui/lib/mixins/focus"


  var focus_ = __webpack_require__(22);

  var focus_default = /*#__PURE__*/__webpack_require__.n(focus_); // EXTERNAL MODULE: external "element-ui/lib/mixins/locale"


  var locale_ = __webpack_require__(6);

  var locale_default = /*#__PURE__*/__webpack_require__.n(locale_); // EXTERNAL MODULE: external "element-ui/lib/input"


  var input_ = __webpack_require__(10);

  var input_default = /*#__PURE__*/__webpack_require__.n(input_); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select-dropdown.vue?vue&type=template&id=06828748&


  var select_dropdownvue_type_template_id_06828748_render = function select_dropdownvue_type_template_id_06828748_render() {
    var _vm = this;

    var _h = _vm.$createElement;

    var _c = _vm._self._c || _h;

    return _c("div", {
      staticClass: "el-select-dropdown el-popper",
      class: [{
        "is-multiple": _vm.$parent.multiple
      }, _vm.popperClass],
      style: {
        minWidth: _vm.minWidth
      }
    }, [_vm._t("default")], 2);
  };

  var select_dropdownvue_type_template_id_06828748_staticRenderFns = [];
  select_dropdownvue_type_template_id_06828748_render._withStripped = true; // CONCATENATED MODULE: ./packages/select/src/select-dropdown.vue?vue&type=template&id=06828748&
  // EXTERNAL MODULE: external "element-ui/lib/utils/vue-popper"

  var vue_popper_ = __webpack_require__(5);

  var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_); // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select-dropdown.vue?vue&type=script&lang=js&
  //
  //
  //
  //
  //
  //
  //
  //
  //

  /* harmony default export */


  var select_dropdownvue_type_script_lang_js_ = {
    name: 'ElSelectDropdown',
    componentName: 'ElSelectDropdown',
    mixins: [vue_popper_default.a],
    props: {
      placement: {
        default: 'bottom-start'
      },
      boundariesPadding: {
        default: 0
      },
      popperOptions: {
        default: function _default() {
          return {
            gpuAcceleration: false
          };
        }
      },
      visibleArrow: {
        default: true
      },
      appendToBody: {
        type: Boolean,
        default: true
      }
    },
    data: function data() {
      return {
        minWidth: ''
      };
    },
    computed: {
      popperClass: function popperClass() {
        return this.$parent.popperClass;
      }
    },
    watch: {
      '$parent.inputWidth': function $parentInputWidth() {
        this.minWidth = this.$parent.$el.getBoundingClientRect().width + 'px';
      }
    },
    mounted: function mounted() {
      var _this = this;

      this.referenceElm = this.$parent.$refs.reference.$el;
      this.$parent.popperElm = this.popperElm = this.$el;
      this.$on('updatePopper', function () {
        if (_this.$parent.visible) _this.updatePopper();
      });
      this.$on('destroyPopper', this.destroyPopper);
    }
  }; // CONCATENATED MODULE: ./packages/select/src/select-dropdown.vue?vue&type=script&lang=js&

  /* harmony default export */

  var src_select_dropdownvue_type_script_lang_js_ = select_dropdownvue_type_script_lang_js_; // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js

  var componentNormalizer = __webpack_require__(0); // CONCATENATED MODULE: ./packages/select/src/select-dropdown.vue

  /* normalize component */


  var component = Object(componentNormalizer["a"
  /* default */
  ])(src_select_dropdownvue_type_script_lang_js_, select_dropdownvue_type_template_id_06828748_render, select_dropdownvue_type_template_id_06828748_staticRenderFns, false, null, null, null);
  /* hot reload */

  if (false) { var api; }

  component.options.__file = "packages/select/src/select-dropdown.vue";
  /* harmony default export */

  var select_dropdown = component.exports; // EXTERNAL MODULE: ./packages/select/src/option.vue + 4 modules

  var src_option = __webpack_require__(34); // EXTERNAL MODULE: external "element-ui/lib/tag"


  var tag_ = __webpack_require__(38);

  var tag_default = /*#__PURE__*/__webpack_require__.n(tag_); // EXTERNAL MODULE: external "element-ui/lib/scrollbar"


  var scrollbar_ = __webpack_require__(14);

  var scrollbar_default = /*#__PURE__*/__webpack_require__.n(scrollbar_); // EXTERNAL MODULE: external "throttle-debounce/debounce"


  var debounce_ = __webpack_require__(17);

  var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce_); // EXTERNAL MODULE: external "element-ui/lib/utils/clickoutside"


  var clickoutside_ = __webpack_require__(12);

  var clickoutside_default = /*#__PURE__*/__webpack_require__.n(clickoutside_); // EXTERNAL MODULE: external "element-ui/lib/utils/resize-event"


  var resize_event_ = __webpack_require__(16); // EXTERNAL MODULE: external "element-ui/lib/locale"


  var lib_locale_ = __webpack_require__(19); // EXTERNAL MODULE: external "element-ui/lib/utils/scroll-into-view"


  var scroll_into_view_ = __webpack_require__(31);

  var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_view_); // EXTERNAL MODULE: external "element-ui/lib/utils/util"


  var util_ = __webpack_require__(3); // CONCATENATED MODULE: ./packages/select/src/navigation-mixin.js

  /* harmony default export */


  var navigation_mixin = {
    data: function data() {
      return {
        hoverOption: -1
      };
    },
    computed: {
      optionsAllDisabled: function optionsAllDisabled() {
        return this.options.filter(function (option) {
          return option.visible;
        }).every(function (option) {
          return option.disabled;
        });
      }
    },
    watch: {
      hoverIndex: function hoverIndex(val) {
        var _this = this;

        if (typeof val === 'number' && val > -1) {
          this.hoverOption = this.options[val] || {};
        }

        this.options.forEach(function (option) {
          option.hover = _this.hoverOption === option;
        });
      }
    },
    methods: {
      navigateOptions: function navigateOptions(direction) {
        var _this2 = this;

        if (!this.visible) {
          this.visible = true;
          return;
        }

        if (this.options.length === 0 || this.filteredOptionsCount === 0) return;

        if (!this.optionsAllDisabled) {
          if (direction === 'next') {
            this.hoverIndex++;

            if (this.hoverIndex === this.options.length) {
              this.hoverIndex = 0;
            }
          } else if (direction === 'prev') {
            this.hoverIndex--;

            if (this.hoverIndex < 0) {
              this.hoverIndex = this.options.length - 1;
            }
          }

          var option = this.options[this.hoverIndex];

          if (option.disabled === true || option.groupDisabled === true || !option.visible) {
            this.navigateOptions(direction);
          }

          this.$nextTick(function () {
            return _this2.scrollToOption(_this2.hoverOption);
          });
        }
      }
    }
  }; // EXTERNAL MODULE: external "element-ui/lib/utils/shared"

  var shared_ = __webpack_require__(21); // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select.vue?vue&type=script&lang=js&
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //

  /* harmony default export */


  var selectvue_type_script_lang_js_ = {
    mixins: [emitter_default.a, locale_default.a, focus_default()('reference'), navigation_mixin],
    name: 'ElSelect',
    componentName: 'ElSelect',
    inject: {
      elForm: {
        default: ''
      },
      elFormItem: {
        default: ''
      }
    },
    provide: function provide() {
      return {
        'select': this
      };
    },
    computed: {
      _elFormItemSize: function _elFormItemSize() {
        return (this.elFormItem || {}).elFormItemSize;
      },
      readonly: function readonly() {
        return !this.filterable || this.multiple || !Object(util_["isIE"])() && !Object(util_["isEdge"])() && !this.visible;
      },
      showClose: function showClose() {
        var hasValue = this.multiple ? Array.isArray(this.value) && this.value.length > 0 : this.value !== undefined && this.value !== null && this.value !== '';
        var criteria = this.clearable && !this.selectDisabled && this.inputHovering && hasValue;
        return criteria;
      },
      iconClass: function iconClass() {
        return this.remote && this.filterable ? '' : this.visible ? 'arrow-up is-reverse' : 'arrow-up';
      },
      debounce: function debounce() {
        return this.remote ? 300 : 0;
      },
      emptyText: function emptyText() {
        if (this.loading) {
          return this.loadingText || this.t('el.select.loading');
        } else {
          if (this.remote && this.query === '' && this.options.length === 0) return false;

          if (this.filterable && this.query && this.options.length > 0 && this.filteredOptionsCount === 0) {
            return this.noMatchText || this.t('el.select.noMatch');
          }

          if (this.options.length === 0) {
            return this.noDataText || this.t('el.select.noData');
          }
        }

        return null;
      },
      showNewOption: function showNewOption() {
        var _this = this;

        var hasExistingOption = this.options.filter(function (option) {
          return !option.created;
        }).some(function (option) {
          return option.currentLabel === _this.query;
        });
        return this.filterable && this.allowCreate && this.query !== '' && !hasExistingOption;
      },
      selectSize: function selectSize() {
        return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
      },
      selectDisabled: function selectDisabled() {
        return this.disabled || (this.elForm || {}).disabled;
      },
      collapseTagSize: function collapseTagSize() {
        return ['small', 'mini'].indexOf(this.selectSize) > -1 ? 'mini' : 'small';
      }
    },
    components: {
      ElInput: input_default.a,
      ElSelectMenu: select_dropdown,
      ElOption: src_option["a"
      /* default */
      ],
      ElTag: tag_default.a,
      ElScrollbar: scrollbar_default.a
    },
    directives: {
      Clickoutside: clickoutside_default.a
    },
    props: {
      name: String,
      id: String,
      value: {
        required: true
      },
      autocomplete: {
        type: String,
        default: 'off'
      },

      /** @Deprecated in next major version */
      autoComplete: {
        type: String,
        validator: function validator(val) {
           false && false;
          return true;
        }
      },
      automaticDropdown: Boolean,
      size: String,
      disabled: Boolean,
      clearable: Boolean,
      filterable: Boolean,
      allowCreate: Boolean,
      loading: Boolean,
      popperClass: String,
      remote: Boolean,
      loadingText: String,
      noMatchText: String,
      noDataText: String,
      remoteMethod: Function,
      filterMethod: Function,
      multiple: Boolean,
      multipleLimit: {
        type: Number,
        default: 0
      },
      placeholder: {
        type: String,
        default: function _default() {
          return Object(lib_locale_["t"])('el.select.placeholder');
        }
      },
      defaultFirstOption: Boolean,
      reserveKeyword: Boolean,
      valueKey: {
        type: String,
        default: 'value'
      },
      collapseTags: Boolean,
      popperAppendToBody: {
        type: Boolean,
        default: true
      }
    },
    data: function data() {
      return {
        options: [],
        cachedOptions: [],
        createdLabel: null,
        createdSelected: false,
        selected: this.multiple ? [] : {},
        inputLength: 20,
        inputWidth: 0,
        initialInputHeight: 0,
        cachedPlaceHolder: '',
        optionsCount: 0,
        filteredOptionsCount: 0,
        visible: false,
        softFocus: false,
        selectedLabel: '',
        hoverIndex: -1,
        query: '',
        previousQuery: null,
        inputHovering: false,
        currentPlaceholder: '',
        menuVisibleOnFocus: false,
        isOnComposition: false,
        isSilentBlur: false
      };
    },
    watch: {
      selectDisabled: function selectDisabled() {
        var _this2 = this;

        this.$nextTick(function () {
          _this2.resetInputHeight();
        });
      },
      placeholder: function placeholder(val) {
        this.cachedPlaceHolder = this.currentPlaceholder = val;
      },
      value: function value(val, oldVal) {
        if (this.multiple) {
          this.resetInputHeight();

          if (val && val.length > 0 || this.$refs.input && this.query !== '') {
            this.currentPlaceholder = '';
          } else {
            this.currentPlaceholder = this.cachedPlaceHolder;
          }

          if (this.filterable && !this.reserveKeyword) {
            this.query = '';
            this.handleQueryChange(this.query);
          }
        }

        this.setSelected();

        if (this.filterable && !this.multiple) {
          this.inputLength = 20;
        }

        if (!Object(util_["valueEquals"])(val, oldVal)) {
          this.dispatch('ElFormItem', 'el.form.change', val);
        }
      },
      visible: function visible(val) {
        var _this3 = this;

        if (!val) {
          this.broadcast('ElSelectDropdown', 'destroyPopper');

          if (this.$refs.input) {
            this.$refs.input.blur();
          }

          this.query = '';
          this.previousQuery = null;
          this.selectedLabel = '';
          this.inputLength = 20;
          this.menuVisibleOnFocus = false;
          this.resetHoverIndex();
          this.$nextTick(function () {
            if (_this3.$refs.input && _this3.$refs.input.value === '' && _this3.selected.length === 0) {
              _this3.currentPlaceholder = _this3.cachedPlaceHolder;
            }
          });

          if (!this.multiple) {
            if (this.selected) {
              if (this.filterable && this.allowCreate && this.createdSelected && this.createdLabel) {
                this.selectedLabel = this.createdLabel;
              } else {
                this.selectedLabel = this.selected.currentLabel;
              }

              if (this.filterable) this.query = this.selectedLabel;
            }

            if (this.filterable) {
              this.currentPlaceholder = this.cachedPlaceHolder;
            }
          }
        } else {
          this.broadcast('ElSelectDropdown', 'updatePopper');

          if (this.filterable) {
            this.query = this.remote ? '' : this.selectedLabel;
            this.handleQueryChange(this.query);

            if (this.multiple) {
              this.$refs.input.focus();
            } else {
              if (!this.remote) {
                this.broadcast('ElOption', 'queryChange', '');
                this.broadcast('ElOptionGroup', 'queryChange');
              }

              if (this.selectedLabel) {
                this.currentPlaceholder = this.selectedLabel;
                this.selectedLabel = '';
              }
            }
          }
        }

        this.$emit('visible-change', val);
      },
      options: function options() {
        var _this4 = this;

        if (this.$isServer) return;
        this.$nextTick(function () {
          _this4.broadcast('ElSelectDropdown', 'updatePopper');
        });

        if (this.multiple) {
          this.resetInputHeight();
        }

        var inputs = this.$el.querySelectorAll('input');

        if ([].indexOf.call(inputs, document.activeElement) === -1) {
          this.setSelected();
        }

        if (this.defaultFirstOption && (this.filterable || this.remote) && this.filteredOptionsCount) {
          this.checkDefaultFirstOption();
        }
      }
    },
    methods: {
      handleComposition: function handleComposition(event) {
        var _this5 = this;

        var text = event.target.value;

        if (event.type === 'compositionend') {
          this.isOnComposition = false;
          this.$nextTick(function (_) {
            return _this5.handleQueryChange(text);
          });
        } else {
          var lastCharacter = text[text.length - 1] || '';
          this.isOnComposition = !Object(shared_["isKorean"])(lastCharacter);
        }
      },
      handleQueryChange: function handleQueryChange(val) {
        var _this6 = this;

        if (this.previousQuery === val || this.isOnComposition) return;

        if (this.previousQuery === null && (typeof this.filterMethod === 'function' || typeof this.remoteMethod === 'function')) {
          this.previousQuery = val;
          return;
        }

        this.previousQuery = val;
        this.$nextTick(function () {
          if (_this6.visible) _this6.broadcast('ElSelectDropdown', 'updatePopper');
        });
        this.hoverIndex = -1;

        if (this.multiple && this.filterable) {
          this.$nextTick(function () {
            var length = _this6.$refs.input.value.length * 15 + 20;
            _this6.inputLength = _this6.collapseTags ? Math.min(50, length) : length;

            _this6.managePlaceholder();

            _this6.resetInputHeight();
          });
        }

        if (this.remote && typeof this.remoteMethod === 'function') {
          this.hoverIndex = -1;
          this.remoteMethod(val);
        } else if (typeof this.filterMethod === 'function') {
          this.filterMethod(val);
          this.broadcast('ElOptionGroup', 'queryChange');
        } else {
          this.filteredOptionsCount = this.optionsCount;
          this.broadcast('ElOption', 'queryChange', val);
          this.broadcast('ElOptionGroup', 'queryChange');
        }

        if (this.defaultFirstOption && (this.filterable || this.remote) && this.filteredOptionsCount) {
          this.checkDefaultFirstOption();
        }
      },
      scrollToOption: function scrollToOption(option) {
        var target = Array.isArray(option) && option[0] ? option[0].$el : option.$el;

        if (this.$refs.popper && target) {
          var menu = this.$refs.popper.$el.querySelector('.el-select-dropdown__wrap');
          scroll_into_view_default()(menu, target);
        }

        this.$refs.scrollbar && this.$refs.scrollbar.handleScroll();
      },
      handleMenuEnter: function handleMenuEnter() {
        var _this7 = this;

        this.$nextTick(function () {
          return _this7.scrollToOption(_this7.selected);
        });
      },
      emitChange: function emitChange(val) {
        if (!Object(util_["valueEquals"])(this.value, val)) {
          this.$emit('change', val);
        }
      },
      getOption: function getOption(value) {
        var option = void 0;
        var isObject = Object.prototype.toString.call(value).toLowerCase() === '[object object]';
        var isNull = Object.prototype.toString.call(value).toLowerCase() === '[object null]';
        var isUndefined = Object.prototype.toString.call(value).toLowerCase() === '[object undefined]';

        for (var i = this.cachedOptions.length - 1; i >= 0; i--) {
          var cachedOption = this.cachedOptions[i];
          var isEqual = isObject ? Object(util_["getValueByPath"])(cachedOption.value, this.valueKey) === Object(util_["getValueByPath"])(value, this.valueKey) : cachedOption.value === value;

          if (isEqual) {
            option = cachedOption;
            break;
          }
        }

        if (option) return option;
        var label = !isObject && !isNull && !isUndefined ? value : '';
        var newOption = {
          value: value,
          currentLabel: label
        };

        if (this.multiple) {
          newOption.hitState = false;
        }

        return newOption;
      },
      setSelected: function setSelected() {
        var _this8 = this;

        if (!this.multiple) {
          var option = this.getOption(this.value);

          if (option.created) {
            this.createdLabel = option.currentLabel;
            this.createdSelected = true;
          } else {
            this.createdSelected = false;
          }

          this.selectedLabel = option.currentLabel;
          this.selected = option;
          if (this.filterable) this.query = this.selectedLabel;
          return;
        }

        var result = [];

        if (Array.isArray(this.value)) {
          this.value.forEach(function (value) {
            result.push(_this8.getOption(value));
          });
        }

        this.selected = result;
        this.$nextTick(function () {
          _this8.resetInputHeight();
        });
      },
      handleFocus: function handleFocus(event) {
        if (!this.softFocus) {
          if (this.automaticDropdown || this.filterable) {
            this.visible = true;

            if (this.filterable) {
              this.menuVisibleOnFocus = true;
            }
          }

          this.$emit('focus', event);
        } else {
          this.softFocus = false;
        }
      },
      blur: function blur() {
        this.visible = false;
        this.$refs.reference.blur();
      },
      handleBlur: function handleBlur(event) {
        var _this9 = this;

        setTimeout(function () {
          if (_this9.isSilentBlur) {
            _this9.isSilentBlur = false;
          } else {
            _this9.$emit('blur', event);
          }
        }, 50);
        this.softFocus = false;
      },
      handleClearClick: function handleClearClick(event) {
        this.deleteSelected(event);
      },
      doDestroy: function doDestroy() {
        this.$refs.popper && this.$refs.popper.doDestroy();
      },
      handleClose: function handleClose() {
        this.visible = false;
      },
      toggleLastOptionHitState: function toggleLastOptionHitState(hit) {
        if (!Array.isArray(this.selected)) return;
        var option = this.selected[this.selected.length - 1];
        if (!option) return;

        if (hit === true || hit === false) {
          option.hitState = hit;
          return hit;
        }

        option.hitState = !option.hitState;
        return option.hitState;
      },
      deletePrevTag: function deletePrevTag(e) {
        if (e.target.value.length <= 0 && !this.toggleLastOptionHitState()) {
          var value = this.value.slice();
          value.pop();
          this.$emit('input', value);
          this.emitChange(value);
        }
      },
      managePlaceholder: function managePlaceholder() {
        if (this.currentPlaceholder !== '') {
          this.currentPlaceholder = this.$refs.input.value ? '' : this.cachedPlaceHolder;
        }
      },
      resetInputState: function resetInputState(e) {
        if (e.keyCode !== 8) this.toggleLastOptionHitState(false);
        this.inputLength = this.$refs.input.value.length * 15 + 20;
        this.resetInputHeight();
      },
      resetInputHeight: function resetInputHeight() {
        var _this10 = this;

        if (this.collapseTags && !this.filterable) return;
        this.$nextTick(function () {
          if (!_this10.$refs.reference) return;
          var inputChildNodes = _this10.$refs.reference.$el.childNodes;
          var input = [].filter.call(inputChildNodes, function (item) {
            return item.tagName === 'INPUT';
          })[0];
          var tags = _this10.$refs.tags;
          var sizeInMap = _this10.initialInputHeight || 40;
          input.style.height = _this10.selected.length === 0 ? sizeInMap + 'px' : Math.max(tags ? tags.clientHeight + (tags.clientHeight > sizeInMap ? 6 : 0) : 0, sizeInMap) + 'px';

          if (_this10.visible && _this10.emptyText !== false) {
            _this10.broadcast('ElSelectDropdown', 'updatePopper');
          }
        });
      },
      resetHoverIndex: function resetHoverIndex() {
        var _this11 = this;

        setTimeout(function () {
          if (!_this11.multiple) {
            _this11.hoverIndex = _this11.options.indexOf(_this11.selected);
          } else {
            if (_this11.selected.length > 0) {
              _this11.hoverIndex = Math.min.apply(null, _this11.selected.map(function (item) {
                return _this11.options.indexOf(item);
              }));
            } else {
              _this11.hoverIndex = -1;
            }
          }
        }, 300);
      },
      handleOptionSelect: function handleOptionSelect(option, byClick) {
        var _this12 = this;

        if (this.multiple) {
          var value = (this.value || []).slice();
          var optionIndex = this.getValueIndex(value, option.value);

          if (optionIndex > -1) {
            value.splice(optionIndex, 1);
          } else if (this.multipleLimit <= 0 || value.length < this.multipleLimit) {
            value.push(option.value);
          }

          this.$emit('input', value);
          this.emitChange(value);

          if (option.created) {
            this.query = '';
            this.handleQueryChange('');
            this.inputLength = 20;
          }

          if (this.filterable) this.$refs.input.focus();
        } else {
          this.$emit('input', option.value);
          this.emitChange(option.value);
          this.visible = false;
        }

        this.isSilentBlur = byClick;
        this.setSoftFocus();
        if (this.visible) return;
        this.$nextTick(function () {
          _this12.scrollToOption(option);
        });
      },
      setSoftFocus: function setSoftFocus() {
        this.softFocus = true;
        var input = this.$refs.input || this.$refs.reference;

        if (input) {
          input.focus();
        }
      },
      getValueIndex: function getValueIndex() {
        var arr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
        var value = arguments[1];
        var isObject = Object.prototype.toString.call(value).toLowerCase() === '[object object]';

        if (!isObject) {
          return arr.indexOf(value);
        } else {
          var valueKey = this.valueKey;
          var index = -1;
          arr.some(function (item, i) {
            if (Object(util_["getValueByPath"])(item, valueKey) === Object(util_["getValueByPath"])(value, valueKey)) {
              index = i;
              return true;
            }

            return false;
          });
          return index;
        }
      },
      toggleMenu: function toggleMenu() {
        if (!this.selectDisabled) {
          if (this.menuVisibleOnFocus) {
            this.menuVisibleOnFocus = false;
          } else {
            this.visible = !this.visible;
          }

          if (this.visible) {
            (this.$refs.input || this.$refs.reference).focus();
          }
        }
      },
      selectOption: function selectOption() {
        if (!this.visible) {
          this.toggleMenu();
        } else {
          if (this.options[this.hoverIndex]) {
            this.handleOptionSelect(this.options[this.hoverIndex]);
          }
        }
      },
      deleteSelected: function deleteSelected(event) {
        event.stopPropagation();
        var value = this.multiple ? [] : '';
        this.$emit('input', value);
        this.emitChange(value);
        this.visible = false;
        this.$emit('clear');
      },
      deleteTag: function deleteTag(event, tag) {
        var index = this.selected.indexOf(tag);

        if (index > -1 && !this.selectDisabled) {
          var value = this.value.slice();
          value.splice(index, 1);
          this.$emit('input', value);
          this.emitChange(value);
          this.$emit('remove-tag', tag.value);
        }

        event.stopPropagation();
      },
      onInputChange: function onInputChange() {
        if (this.filterable && this.query !== this.selectedLabel) {
          this.query = this.selectedLabel;
          this.handleQueryChange(this.query);
        }
      },
      onOptionDestroy: function onOptionDestroy(index) {
        if (index > -1) {
          this.optionsCount--;
          this.filteredOptionsCount--;
          this.options.splice(index, 1);
        }
      },
      resetInputWidth: function resetInputWidth() {
        this.inputWidth = this.$refs.reference.$el.getBoundingClientRect().width;
      },
      handleResize: function handleResize() {
        this.resetInputWidth();
        if (this.multiple) this.resetInputHeight();
      },
      checkDefaultFirstOption: function checkDefaultFirstOption() {
        this.hoverIndex = -1; // highlight the created option

        var hasCreated = false;

        for (var i = this.options.length - 1; i >= 0; i--) {
          if (this.options[i].created) {
            hasCreated = true;
            this.hoverIndex = i;
            break;
          }
        }

        if (hasCreated) return;

        for (var _i = 0; _i !== this.options.length; ++_i) {
          var option = this.options[_i];

          if (this.query) {
            // highlight first options that passes the filter
            if (!option.disabled && !option.groupDisabled && option.visible) {
              this.hoverIndex = _i;
              break;
            }
          } else {
            // highlight currently selected option
            if (option.itemSelected) {
              this.hoverIndex = _i;
              break;
            }
          }
        }
      },
      getValueKey: function getValueKey(item) {
        if (Object.prototype.toString.call(item.value).toLowerCase() !== '[object object]') {
          return item.value;
        } else {
          return Object(util_["getValueByPath"])(item.value, this.valueKey);
        }
      }
    },
    created: function created() {
      var _this13 = this;

      this.cachedPlaceHolder = this.currentPlaceholder = this.placeholder;

      if (this.multiple && !Array.isArray(this.value)) {
        this.$emit('input', []);
      }

      if (!this.multiple && Array.isArray(this.value)) {
        this.$emit('input', '');
      }

      this.debouncedOnInputChange = debounce_default()(this.debounce, function () {
        _this13.onInputChange();
      });
      this.debouncedQueryChange = debounce_default()(this.debounce, function (e) {
        _this13.handleQueryChange(e.target.value);
      });
      this.$on('handleOptionClick', this.handleOptionSelect);
      this.$on('setSelected', this.setSelected);
    },
    mounted: function mounted() {
      var _this14 = this;

      if (this.multiple && Array.isArray(this.value) && this.value.length > 0) {
        this.currentPlaceholder = '';
      }

      Object(resize_event_["addResizeListener"])(this.$el, this.handleResize);
      var reference = this.$refs.reference;

      if (reference && reference.$el) {
        var sizeMap = {
          medium: 36,
          small: 32,
          mini: 28
        };
        var input = reference.$el.querySelector('input');
        this.initialInputHeight = input.getBoundingClientRect().height || sizeMap[this.selectSize];
      }

      if (this.remote && this.multiple) {
        this.resetInputHeight();
      }

      this.$nextTick(function () {
        if (reference && reference.$el) {
          _this14.inputWidth = reference.$el.getBoundingClientRect().width;
        }
      });
      this.setSelected();
    },
    beforeDestroy: function beforeDestroy() {
      if (this.$el && this.handleResize) Object(resize_event_["removeResizeListener"])(this.$el, this.handleResize);
    }
  }; // CONCATENATED MODULE: ./packages/select/src/select.vue?vue&type=script&lang=js&

  /* harmony default export */

  var src_selectvue_type_script_lang_js_ = selectvue_type_script_lang_js_; // CONCATENATED MODULE: ./packages/select/src/select.vue

  /* normalize component */

  var select_component = Object(componentNormalizer["a"
  /* default */
  ])(src_selectvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null);
  /* hot reload */

  if (false) { var select_api; }

  select_component.options.__file = "packages/select/src/select.vue";
  /* harmony default export */

  var src_select = select_component.exports; // CONCATENATED MODULE: ./packages/select/index.js

  /* istanbul ignore next */

  src_select.install = function (Vue) {
    Vue.component(src_select.name, src_select);
  };
  /* harmony default export */


  var packages_select = __webpack_exports__["default"] = src_select;
  /***/
}
/******/
]);

/***/ }),

/***/ "4e71":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("e198")('observable');


/***/ }),

/***/ "4ebc":
/***/ (function(module, exports, __webpack_require__) {

// 7.2.2 IsArray(argument)
var cof = __webpack_require__("4d88");
module.exports = Array.isArray || function isArray(arg) {
  return cof(arg) == 'Array';
};


/***/ }),

/***/ "50c4":
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__("a691");

var min = Math.min;

// `ToLength` abstract operation
// https://tc39.github.io/ecma262/#sec-tolength
module.exports = function (argument) {
  return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
};


/***/ }),

/***/ "511f":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("0b99");
__webpack_require__("658f");
module.exports = __webpack_require__("fcd4").f('iterator');


/***/ }),

/***/ "5128":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


__webpack_require__("a9e3");

exports.__esModule = true;
exports.PopupManager = undefined;

var _vue = __webpack_require__("8bbf");

var _vue2 = _interopRequireDefault(_vue);

var _merge = __webpack_require__("7f4d");

var _merge2 = _interopRequireDefault(_merge);

var _popupManager = __webpack_require__("4b26");

var _popupManager2 = _interopRequireDefault(_popupManager);

var _scrollbarWidth = __webpack_require__("e62d");

var _scrollbarWidth2 = _interopRequireDefault(_scrollbarWidth);

var _dom = __webpack_require__("5924");

function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    default: obj
  };
}

var idSeed = 1;
var scrollBarWidth = void 0;
exports.default = {
  props: {
    visible: {
      type: Boolean,
      default: false
    },
    openDelay: {},
    closeDelay: {},
    zIndex: {},
    modal: {
      type: Boolean,
      default: false
    },
    modalFade: {
      type: Boolean,
      default: true
    },
    modalClass: {},
    modalAppendToBody: {
      type: Boolean,
      default: false
    },
    lockScroll: {
      type: Boolean,
      default: true
    },
    closeOnPressEscape: {
      type: Boolean,
      default: false
    },
    closeOnClickModal: {
      type: Boolean,
      default: false
    }
  },
  beforeMount: function beforeMount() {
    this._popupId = 'popup-' + idSeed++;

    _popupManager2.default.register(this._popupId, this);
  },
  beforeDestroy: function beforeDestroy() {
    _popupManager2.default.deregister(this._popupId);

    _popupManager2.default.closeModal(this._popupId);

    this.restoreBodyStyle();
  },
  data: function data() {
    return {
      opened: false,
      bodyPaddingRight: null,
      computedBodyPaddingRight: 0,
      withoutHiddenClass: true,
      rendered: false
    };
  },
  watch: {
    visible: function visible(val) {
      var _this = this;

      if (val) {
        if (this._opening) return;

        if (!this.rendered) {
          this.rendered = true;

          _vue2.default.nextTick(function () {
            _this.open();
          });
        } else {
          this.open();
        }
      } else {
        this.close();
      }
    }
  },
  methods: {
    open: function open(options) {
      var _this2 = this;

      if (!this.rendered) {
        this.rendered = true;
      }

      var props = (0, _merge2.default)({}, this.$props || this, options);

      if (this._closeTimer) {
        clearTimeout(this._closeTimer);
        this._closeTimer = null;
      }

      clearTimeout(this._openTimer);
      var openDelay = Number(props.openDelay);

      if (openDelay > 0) {
        this._openTimer = setTimeout(function () {
          _this2._openTimer = null;

          _this2.doOpen(props);
        }, openDelay);
      } else {
        this.doOpen(props);
      }
    },
    doOpen: function doOpen(props) {
      if (this.$isServer) return;
      if (this.willOpen && !this.willOpen()) return;
      if (this.opened) return;
      this._opening = true;
      var dom = this.$el;
      var modal = props.modal;
      var zIndex = props.zIndex;

      if (zIndex) {
        _popupManager2.default.zIndex = zIndex;
      }

      if (modal) {
        if (this._closing) {
          _popupManager2.default.closeModal(this._popupId);

          this._closing = false;
        }

        _popupManager2.default.openModal(this._popupId, _popupManager2.default.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);

        if (props.lockScroll) {
          this.withoutHiddenClass = !(0, _dom.hasClass)(document.body, 'el-popup-parent--hidden');

          if (this.withoutHiddenClass) {
            this.bodyPaddingRight = document.body.style.paddingRight;
            this.computedBodyPaddingRight = parseInt((0, _dom.getStyle)(document.body, 'paddingRight'), 10);
          }

          scrollBarWidth = (0, _scrollbarWidth2.default)();
          var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
          var bodyOverflowY = (0, _dom.getStyle)(document.body, 'overflowY');

          if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
            document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
          }

          (0, _dom.addClass)(document.body, 'el-popup-parent--hidden');
        }
      }

      if (getComputedStyle(dom).position === 'static') {
        dom.style.position = 'absolute';
      }

      dom.style.zIndex = _popupManager2.default.nextZIndex();
      this.opened = true;
      this.onOpen && this.onOpen();
      this.doAfterOpen();
    },
    doAfterOpen: function doAfterOpen() {
      this._opening = false;
    },
    close: function close() {
      var _this3 = this;

      if (this.willClose && !this.willClose()) return;

      if (this._openTimer !== null) {
        clearTimeout(this._openTimer);
        this._openTimer = null;
      }

      clearTimeout(this._closeTimer);
      var closeDelay = Number(this.closeDelay);

      if (closeDelay > 0) {
        this._closeTimer = setTimeout(function () {
          _this3._closeTimer = null;

          _this3.doClose();
        }, closeDelay);
      } else {
        this.doClose();
      }
    },
    doClose: function doClose() {
      this._closing = true;
      this.onClose && this.onClose();

      if (this.lockScroll) {
        setTimeout(this.restoreBodyStyle, 200);
      }

      this.opened = false;
      this.doAfterClose();
    },
    doAfterClose: function doAfterClose() {
      _popupManager2.default.closeModal(this._popupId);

      this._closing = false;
    },
    restoreBodyStyle: function restoreBodyStyle() {
      if (this.modal && this.withoutHiddenClass) {
        document.body.style.paddingRight = this.bodyPaddingRight;
        (0, _dom.removeClass)(document.body, 'el-popup-parent--hidden');
      }

      this.withoutHiddenClass = true;
    }
  }
};
exports.PopupManager = _popupManager2.default;

/***/ }),

/***/ "512c":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("ef08");
var core = __webpack_require__("5524");
var ctx = __webpack_require__("9c0c");
var hide = __webpack_require__("051b");
var has = __webpack_require__("9c0e");
var PROTOTYPE = 'prototype';

var $export = function (type, name, source) {
  var IS_FORCED = type & $export.F;
  var IS_GLOBAL = type & $export.G;
  var IS_STATIC = type & $export.S;
  var IS_PROTO = type & $export.P;
  var IS_BIND = type & $export.B;
  var IS_WRAP = type & $export.W;
  var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
  var expProto = exports[PROTOTYPE];
  var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
  var key, own, out;
  if (IS_GLOBAL) source = name;
  for (key in source) {
    // contains in native
    own = !IS_FORCED && target && target[key] !== undefined;
    if (own && has(exports, key)) continue;
    // export native or passed
    out = own ? target[key] : source[key];
    // prevent global pollution for namespaces
    exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
    // bind timers to global for call from export context
    : IS_BIND && own ? ctx(out, global)
    // wrap global constructors for prevent change them in library
    : IS_WRAP && target[key] == out ? (function (C) {
      var F = function (a, b, c) {
        if (this instanceof C) {
          switch (arguments.length) {
            case 0: return new C();
            case 1: return new C(a);
            case 2: return new C(a, b);
          } return new C(a, b, c);
        } return C.apply(this, arguments);
      };
      F[PROTOTYPE] = C[PROTOTYPE];
      return F;
    // make static versions for prototype methods
    })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
    // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
    if (IS_PROTO) {
      (exports.virtual || (exports.virtual = {}))[key] = out;
      // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
      if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
    }
  }
};
// type bitmap
$export.F = 1;   // forced
$export.G = 2;   // global
$export.S = 4;   // static
$export.P = 8;   // proto
$export.B = 16;  // bind
$export.W = 32;  // wrap
$export.U = 64;  // safe
$export.R = 128; // real proto method for `library`
module.exports = $export;


/***/ }),

/***/ "5135":
/***/ (function(module, exports) {

var hasOwnProperty = {}.hasOwnProperty;

module.exports = function (it, key) {
  return hasOwnProperty.call(it, key);
};


/***/ }),

/***/ "5270":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");
var transformData = __webpack_require__("c401");
var isCancel = __webpack_require__("2e67");
var defaults = __webpack_require__("2444");

/**
 * Throws a `Cancel` if cancellation has been requested.
 */
function throwIfCancellationRequested(config) {
  if (config.cancelToken) {
    config.cancelToken.throwIfRequested();
  }
}

/**
 * Dispatch a request to the server using the configured adapter.
 *
 * @param {object} config The config that is to be used for the request
 * @returns {Promise} The Promise to be fulfilled
 */
module.exports = function dispatchRequest(config) {
  throwIfCancellationRequested(config);

  // Ensure headers exist
  config.headers = config.headers || {};

  // Transform request data
  config.data = transformData(
    config.data,
    config.headers,
    config.transformRequest
  );

  // Flatten headers
  config.headers = utils.merge(
    config.headers.common || {},
    config.headers[config.method] || {},
    config.headers
  );

  utils.forEach(
    ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
    function cleanHeaderConfig(method) {
      delete config.headers[method];
    }
  );

  var adapter = config.adapter || defaults.adapter;

  return adapter(config).then(function onAdapterResolution(response) {
    throwIfCancellationRequested(config);

    // Transform response data
    response.data = transformData(
      response.data,
      response.headers,
      config.transformResponse
    );

    return response;
  }, function onAdapterRejection(reason) {
    if (!isCancel(reason)) {
      throwIfCancellationRequested(config);

      // Transform response data
      if (reason && reason.response) {
        reason.response.data = transformData(
          reason.response.data,
          reason.response.headers,
          config.transformResponse
        );
      }
    }

    return Promise.reject(reason);
  });
};


/***/ }),

/***/ "5319":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fixRegExpWellKnownSymbolLogic = __webpack_require__("d784");
var anObject = __webpack_require__("825a");
var toObject = __webpack_require__("7b0b");
var toLength = __webpack_require__("50c4");
var toInteger = __webpack_require__("a691");
var requireObjectCoercible = __webpack_require__("1d80");
var advanceStringIndex = __webpack_require__("8aa5");
var regExpExec = __webpack_require__("14c3");

var max = Math.max;
var min = Math.min;
var floor = Math.floor;
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;

var maybeToString = function (it) {
  return it === undefined ? it : String(it);
};

// @@replace logic
fixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
  var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
  var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
  var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';

  return [
    // `String.prototype.replace` method
    // https://tc39.github.io/ecma262/#sec-string.prototype.replace
    function replace(searchValue, replaceValue) {
      var O = requireObjectCoercible(this);
      var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
      return replacer !== undefined
        ? replacer.call(searchValue, O, replaceValue)
        : nativeReplace.call(String(O), searchValue, replaceValue);
    },
    // `RegExp.prototype[@@replace]` method
    // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
    function (regexp, replaceValue) {
      if (
        (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
        (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
      ) {
        var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
        if (res.done) return res.value;
      }

      var rx = anObject(regexp);
      var S = String(this);

      var functionalReplace = typeof replaceValue === 'function';
      if (!functionalReplace) replaceValue = String(replaceValue);

      var global = rx.global;
      if (global) {
        var fullUnicode = rx.unicode;
        rx.lastIndex = 0;
      }
      var results = [];
      while (true) {
        var result = regExpExec(rx, S);
        if (result === null) break;

        results.push(result);
        if (!global) break;

        var matchStr = String(result[0]);
        if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
      }

      var accumulatedResult = '';
      var nextSourcePosition = 0;
      for (var i = 0; i < results.length; i++) {
        result = results[i];

        var matched = String(result[0]);
        var position = max(min(toInteger(result.index), S.length), 0);
        var captures = [];
        // NOTE: This is equivalent to
        //   captures = result.slice(1).map(maybeToString)
        // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
        // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
        // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
        for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
        var namedCaptures = result.groups;
        if (functionalReplace) {
          var replacerArgs = [matched].concat(captures, position, S);
          if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
          var replacement = String(replaceValue.apply(undefined, replacerArgs));
        } else {
          replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
        }
        if (position >= nextSourcePosition) {
          accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
          nextSourcePosition = position + matched.length;
        }
      }
      return accumulatedResult + S.slice(nextSourcePosition);
    }
  ];

  // https://tc39.github.io/ecma262/#sec-getsubstitution
  function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
    var tailPos = position + matched.length;
    var m = captures.length;
    var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
    if (namedCaptures !== undefined) {
      namedCaptures = toObject(namedCaptures);
      symbols = SUBSTITUTION_SYMBOLS;
    }
    return nativeReplace.call(replacement, symbols, function (match, ch) {
      var capture;
      switch (ch.charAt(0)) {
        case '$': return '$';
        case '&': return matched;
        case '`': return str.slice(0, position);
        case "'": return str.slice(tailPos);
        case '<':
          capture = namedCaptures[ch.slice(1, -1)];
          break;
        default: // \d\d?
          var n = +ch;
          if (n === 0) return match;
          if (n > m) {
            var f = floor(n / 10);
            if (f === 0) return match;
            if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
            return match;
          }
          capture = captures[n - 1];
      }
      return capture === undefined ? '' : capture;
    });
  }
});


/***/ }),

/***/ "53ca":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
/* harmony import */ var core_js_modules_es_symbol__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a4d3");
/* harmony import */ var core_js_modules_es_symbol__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_symbol_description__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("e01a");
/* harmony import */ var core_js_modules_es_symbol_description__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_symbol_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("d28b");
/* harmony import */ var core_js_modules_es_symbol_iterator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_array_iterator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("e260");
/* harmony import */ var core_js_modules_es_array_iterator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("d3b7");
/* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_string_iterator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("3ca3");
/* harmony import */ var core_js_modules_es_string_iterator__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("ddb0");
/* harmony import */ var core_js_modules_web_dom_collections_iterator__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator__WEBPACK_IMPORTED_MODULE_6__);







function _typeof(obj) {
  "@babel/helpers - typeof";

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

  return _typeof(obj);
}

/***/ }),

/***/ "545f":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_sidebar_vue_vue_type_style_index_0_id_6e5ea5c2_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dda2");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_sidebar_vue_vue_type_style_index_0_id_6e5ea5c2_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_sidebar_vue_vue_type_style_index_0_id_6e5ea5c2_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_sidebar_vue_vue_type_style_index_0_id_6e5ea5c2_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "5488":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _dom = __webpack_require__("5924");

function _classCallCheck(instance, Constructor) {
  if (!(instance instanceof Constructor)) {
    throw new TypeError("Cannot call a class as a function");
  }
}

var Transition = function () {
  function Transition() {
    _classCallCheck(this, Transition);
  }

  Transition.prototype.beforeEnter = function beforeEnter(el) {
    (0, _dom.addClass)(el, 'collapse-transition');
    if (!el.dataset) el.dataset = {};
    el.dataset.oldPaddingTop = el.style.paddingTop;
    el.dataset.oldPaddingBottom = el.style.paddingBottom;
    el.style.height = '0';
    el.style.paddingTop = 0;
    el.style.paddingBottom = 0;
  };

  Transition.prototype.enter = function enter(el) {
    el.dataset.oldOverflow = el.style.overflow;

    if (el.scrollHeight !== 0) {
      el.style.height = el.scrollHeight + 'px';
      el.style.paddingTop = el.dataset.oldPaddingTop;
      el.style.paddingBottom = el.dataset.oldPaddingBottom;
    } else {
      el.style.height = '';
      el.style.paddingTop = el.dataset.oldPaddingTop;
      el.style.paddingBottom = el.dataset.oldPaddingBottom;
    }

    el.style.overflow = 'hidden';
  };

  Transition.prototype.afterEnter = function afterEnter(el) {
    // for safari: remove class then reset height is necessary
    (0, _dom.removeClass)(el, 'collapse-transition');
    el.style.height = '';
    el.style.overflow = el.dataset.oldOverflow;
  };

  Transition.prototype.beforeLeave = function beforeLeave(el) {
    if (!el.dataset) el.dataset = {};
    el.dataset.oldPaddingTop = el.style.paddingTop;
    el.dataset.oldPaddingBottom = el.style.paddingBottom;
    el.dataset.oldOverflow = el.style.overflow;
    el.style.height = el.scrollHeight + 'px';
    el.style.overflow = 'hidden';
  };

  Transition.prototype.leave = function leave(el) {
    if (el.scrollHeight !== 0) {
      // for safari: add class after set height, or it will jump to zero height suddenly, weired
      (0, _dom.addClass)(el, 'collapse-transition');
      el.style.height = 0;
      el.style.paddingTop = 0;
      el.style.paddingBottom = 0;
    }
  };

  Transition.prototype.afterLeave = function afterLeave(el) {
    (0, _dom.removeClass)(el, 'collapse-transition');
    el.style.height = '';
    el.style.overflow = el.dataset.oldOverflow;
    el.style.paddingTop = el.dataset.oldPaddingTop;
    el.style.paddingBottom = el.dataset.oldPaddingBottom;
  };

  return Transition;
}();

exports.default = {
  name: 'ElCollapseTransition',
  functional: true,
  render: function render(h, _ref) {
    var children = _ref.children;
    var data = {
      on: new Transition()
    };
    return h('transition', data, children);
  }
};

/***/ }),

/***/ "5524":
/***/ (function(module, exports) {

var core = module.exports = { version: '2.6.11' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef


/***/ }),

/***/ "5692":
/***/ (function(module, exports, __webpack_require__) {

var IS_PURE = __webpack_require__("c430");
var store = __webpack_require__("c6cd");

(module.exports = function (key, value) {
  return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
  version: '3.6.5',
  mode: IS_PURE ? 'pure' : 'global',
  copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
});


/***/ }),

/***/ "56b3":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

// This is CodeMirror (https://codemirror.net), a code editor
// implemented in JavaScript on top of the browser's DOM.
//
// You can find some technical background for some of the code below
// at http://marijnhaverbeke.nl/blog/#cm-internals .

(function (global, factory) {
   true ? module.exports = factory() :
  undefined;
}(this, (function () { 'use strict';

  // Kludges for bugs and behavior differences that can't be feature
  // detected are enabled based on userAgent etc sniffing.
  var userAgent = navigator.userAgent;
  var platform = navigator.platform;

  var gecko = /gecko\/\d/i.test(userAgent);
  var ie_upto10 = /MSIE \d/.test(userAgent);
  var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(userAgent);
  var edge = /Edge\/(\d+)/.exec(userAgent);
  var ie = ie_upto10 || ie_11up || edge;
  var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]);
  var webkit = !edge && /WebKit\//.test(userAgent);
  var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(userAgent);
  var chrome = !edge && /Chrome\//.test(userAgent);
  var presto = /Opera\//.test(userAgent);
  var safari = /Apple Computer/.test(navigator.vendor);
  var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(userAgent);
  var phantom = /PhantomJS/.test(userAgent);

  var ios = !edge && /AppleWebKit/.test(userAgent) && /Mobile\/\w+/.test(userAgent);
  var android = /Android/.test(userAgent);
  // This is woefully incomplete. Suggestions for alternative methods welcome.
  var mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);
  var mac = ios || /Mac/.test(platform);
  var chromeOS = /\bCrOS\b/.test(userAgent);
  var windows = /win/i.test(platform);

  var presto_version = presto && userAgent.match(/Version\/(\d*\.\d*)/);
  if (presto_version) { presto_version = Number(presto_version[1]); }
  if (presto_version && presto_version >= 15) { presto = false; webkit = true; }
  // Some browsers use the wrong event properties to signal cmd/ctrl on OS X
  var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));
  var captureRightClick = gecko || (ie && ie_version >= 9);

  function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*") }

  var rmClass = function(node, cls) {
    var current = node.className;
    var match = classTest(cls).exec(current);
    if (match) {
      var after = current.slice(match.index + match[0].length);
      node.className = current.slice(0, match.index) + (after ? match[1] + after : "");
    }
  };

  function removeChildren(e) {
    for (var count = e.childNodes.length; count > 0; --count)
      { e.removeChild(e.firstChild); }
    return e
  }

  function removeChildrenAndAdd(parent, e) {
    return removeChildren(parent).appendChild(e)
  }

  function elt(tag, content, className, style) {
    var e = document.createElement(tag);
    if (className) { e.className = className; }
    if (style) { e.style.cssText = style; }
    if (typeof content == "string") { e.appendChild(document.createTextNode(content)); }
    else if (content) { for (var i = 0; i < content.length; ++i) { e.appendChild(content[i]); } }
    return e
  }
  // wrapper for elt, which removes the elt from the accessibility tree
  function eltP(tag, content, className, style) {
    var e = elt(tag, content, className, style);
    e.setAttribute("role", "presentation");
    return e
  }

  var range;
  if (document.createRange) { range = function(node, start, end, endNode) {
    var r = document.createRange();
    r.setEnd(endNode || node, end);
    r.setStart(node, start);
    return r
  }; }
  else { range = function(node, start, end) {
    var r = document.body.createTextRange();
    try { r.moveToElementText(node.parentNode); }
    catch(e) { return r }
    r.collapse(true);
    r.moveEnd("character", end);
    r.moveStart("character", start);
    return r
  }; }

  function contains(parent, child) {
    if (child.nodeType == 3) // Android browser always returns false when child is a textnode
      { child = child.parentNode; }
    if (parent.contains)
      { return parent.contains(child) }
    do {
      if (child.nodeType == 11) { child = child.host; }
      if (child == parent) { return true }
    } while (child = child.parentNode)
  }

  function activeElt() {
    // IE and Edge may throw an "Unspecified Error" when accessing document.activeElement.
    // IE < 10 will throw when accessed while the page is loading or in an iframe.
    // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.
    var activeElement;
    try {
      activeElement = document.activeElement;
    } catch(e) {
      activeElement = document.body || null;
    }
    while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement)
      { activeElement = activeElement.shadowRoot.activeElement; }
    return activeElement
  }

  function addClass(node, cls) {
    var current = node.className;
    if (!classTest(cls).test(current)) { node.className += (current ? " " : "") + cls; }
  }
  function joinClasses(a, b) {
    var as = a.split(" ");
    for (var i = 0; i < as.length; i++)
      { if (as[i] && !classTest(as[i]).test(b)) { b += " " + as[i]; } }
    return b
  }

  var selectInput = function(node) { node.select(); };
  if (ios) // Mobile Safari apparently has a bug where select() is broken.
    { selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; }
  else if (ie) // Suppress mysterious IE10 errors
    { selectInput = function(node) { try { node.select(); } catch(_e) {} }; }

  function bind(f) {
    var args = Array.prototype.slice.call(arguments, 1);
    return function(){return f.apply(null, args)}
  }

  function copyObj(obj, target, overwrite) {
    if (!target) { target = {}; }
    for (var prop in obj)
      { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))
        { target[prop] = obj[prop]; } }
    return target
  }

  // Counts the column offset in a string, taking tabs into account.
  // Used mostly to find indentation.
  function countColumn(string, end, tabSize, startIndex, startValue) {
    if (end == null) {
      end = string.search(/[^\s\u00a0]/);
      if (end == -1) { end = string.length; }
    }
    for (var i = startIndex || 0, n = startValue || 0;;) {
      var nextTab = string.indexOf("\t", i);
      if (nextTab < 0 || nextTab >= end)
        { return n + (end - i) }
      n += nextTab - i;
      n += tabSize - (n % tabSize);
      i = nextTab + 1;
    }
  }

  var Delayed = function() {
    this.id = null;
    this.f = null;
    this.time = 0;
    this.handler = bind(this.onTimeout, this);
  };
  Delayed.prototype.onTimeout = function (self) {
    self.id = 0;
    if (self.time <= +new Date) {
      self.f();
    } else {
      setTimeout(self.handler, self.time - +new Date);
    }
  };
  Delayed.prototype.set = function (ms, f) {
    this.f = f;
    var time = +new Date + ms;
    if (!this.id || time < this.time) {
      clearTimeout(this.id);
      this.id = setTimeout(this.handler, ms);
      this.time = time;
    }
  };

  function indexOf(array, elt) {
    for (var i = 0; i < array.length; ++i)
      { if (array[i] == elt) { return i } }
    return -1
  }

  // Number of pixels added to scroller and sizer to hide scrollbar
  var scrollerGap = 50;

  // Returned or thrown by various protocols to signal 'I'm not
  // handling this'.
  var Pass = {toString: function(){return "CodeMirror.Pass"}};

  // Reused option objects for setSelection & friends
  var sel_dontScroll = {scroll: false}, sel_mouse = {origin: "*mouse"}, sel_move = {origin: "+move"};

  // The inverse of countColumn -- find the offset that corresponds to
  // a particular column.
  function findColumn(string, goal, tabSize) {
    for (var pos = 0, col = 0;;) {
      var nextTab = string.indexOf("\t", pos);
      if (nextTab == -1) { nextTab = string.length; }
      var skipped = nextTab - pos;
      if (nextTab == string.length || col + skipped >= goal)
        { return pos + Math.min(skipped, goal - col) }
      col += nextTab - pos;
      col += tabSize - (col % tabSize);
      pos = nextTab + 1;
      if (col >= goal) { return pos }
    }
  }

  var spaceStrs = [""];
  function spaceStr(n) {
    while (spaceStrs.length <= n)
      { spaceStrs.push(lst(spaceStrs) + " "); }
    return spaceStrs[n]
  }

  function lst(arr) { return arr[arr.length-1] }

  function map(array, f) {
    var out = [];
    for (var i = 0; i < array.length; i++) { out[i] = f(array[i], i); }
    return out
  }

  function insertSorted(array, value, score) {
    var pos = 0, priority = score(value);
    while (pos < array.length && score(array[pos]) <= priority) { pos++; }
    array.splice(pos, 0, value);
  }

  function nothing() {}

  function createObj(base, props) {
    var inst;
    if (Object.create) {
      inst = Object.create(base);
    } else {
      nothing.prototype = base;
      inst = new nothing();
    }
    if (props) { copyObj(props, inst); }
    return inst
  }

  var nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
  function isWordCharBasic(ch) {
    return /\w/.test(ch) || ch > "\x80" &&
      (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch))
  }
  function isWordChar(ch, helper) {
    if (!helper) { return isWordCharBasic(ch) }
    if (helper.source.indexOf("\\w") > -1 && isWordCharBasic(ch)) { return true }
    return helper.test(ch)
  }

  function isEmpty(obj) {
    for (var n in obj) { if (obj.hasOwnProperty(n) && obj[n]) { return false } }
    return true
  }

  // Extending unicode characters. A series of a non-extending char +
  // any number of extending chars is treated as a single unit as far
  // as editing and measuring is concerned. This is not fully correct,
  // since some scripts/fonts/browsers also treat other configurations
  // of code points as a group.
  var extendingChars = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;
  function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch) }

  // Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range.
  function skipExtendingChars(str, pos, dir) {
    while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }
    return pos
  }

  // Returns the value from the range [`from`; `to`] that satisfies
  // `pred` and is closest to `from`. Assumes that at least `to`
  // satisfies `pred`. Supports `from` being greater than `to`.
  function findFirst(pred, from, to) {
    // At any point we are certain `to` satisfies `pred`, don't know
    // whether `from` does.
    var dir = from > to ? -1 : 1;
    for (;;) {
      if (from == to) { return from }
      var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);
      if (mid == from) { return pred(mid) ? from : to }
      if (pred(mid)) { to = mid; }
      else { from = mid + dir; }
    }
  }

  // BIDI HELPERS

  function iterateBidiSections(order, from, to, f) {
    if (!order) { return f(from, to, "ltr", 0) }
    var found = false;
    for (var i = 0; i < order.length; ++i) {
      var part = order[i];
      if (part.from < to && part.to > from || from == to && part.to == from) {
        f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr", i);
        found = true;
      }
    }
    if (!found) { f(from, to, "ltr"); }
  }

  var bidiOther = null;
  function getBidiPartAt(order, ch, sticky) {
    var found;
    bidiOther = null;
    for (var i = 0; i < order.length; ++i) {
      var cur = order[i];
      if (cur.from < ch && cur.to > ch) { return i }
      if (cur.to == ch) {
        if (cur.from != cur.to && sticky == "before") { found = i; }
        else { bidiOther = i; }
      }
      if (cur.from == ch) {
        if (cur.from != cur.to && sticky != "before") { found = i; }
        else { bidiOther = i; }
      }
    }
    return found != null ? found : bidiOther
  }

  // Bidirectional ordering algorithm
  // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm
  // that this (partially) implements.

  // One-char codes used for character types:
  // L (L):   Left-to-Right
  // R (R):   Right-to-Left
  // r (AL):  Right-to-Left Arabic
  // 1 (EN):  European Number
  // + (ES):  European Number Separator
  // % (ET):  European Number Terminator
  // n (AN):  Arabic Number
  // , (CS):  Common Number Separator
  // m (NSM): Non-Spacing Mark
  // b (BN):  Boundary Neutral
  // s (B):   Paragraph Separator
  // t (S):   Segment Separator
  // w (WS):  Whitespace
  // N (ON):  Other Neutrals

  // Returns null if characters are ordered as they appear
  // (left-to-right), or an array of sections ({from, to, level}
  // objects) in the order in which they occur visually.
  var bidiOrdering = (function() {
    // Character types for codepoints 0 to 0xff
    var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";
    // Character types for codepoints 0x600 to 0x6f9
    var arabicTypes = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";
    function charType(code) {
      if (code <= 0xf7) { return lowTypes.charAt(code) }
      else if (0x590 <= code && code <= 0x5f4) { return "R" }
      else if (0x600 <= code && code <= 0x6f9) { return arabicTypes.charAt(code - 0x600) }
      else if (0x6ee <= code && code <= 0x8ac) { return "r" }
      else if (0x2000 <= code && code <= 0x200b) { return "w" }
      else if (code == 0x200c) { return "b" }
      else { return "L" }
    }

    var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
    var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;

    function BidiSpan(level, from, to) {
      this.level = level;
      this.from = from; this.to = to;
    }

    return function(str, direction) {
      var outerType = direction == "ltr" ? "L" : "R";

      if (str.length == 0 || direction == "ltr" && !bidiRE.test(str)) { return false }
      var len = str.length, types = [];
      for (var i = 0; i < len; ++i)
        { types.push(charType(str.charCodeAt(i))); }

      // W1. Examine each non-spacing mark (NSM) in the level run, and
      // change the type of the NSM to the type of the previous
      // character. If the NSM is at the start of the level run, it will
      // get the type of sor.
      for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) {
        var type = types[i$1];
        if (type == "m") { types[i$1] = prev; }
        else { prev = type; }
      }

      // W2. Search backwards from each instance of a European number
      // until the first strong type (R, L, AL, or sor) is found. If an
      // AL is found, change the type of the European number to Arabic
      // number.
      // W3. Change all ALs to R.
      for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) {
        var type$1 = types[i$2];
        if (type$1 == "1" && cur == "r") { types[i$2] = "n"; }
        else if (isStrong.test(type$1)) { cur = type$1; if (type$1 == "r") { types[i$2] = "R"; } }
      }

      // W4. A single European separator between two European numbers
      // changes to a European number. A single common separator between
      // two numbers of the same type changes to that type.
      for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) {
        var type$2 = types[i$3];
        if (type$2 == "+" && prev$1 == "1" && types[i$3+1] == "1") { types[i$3] = "1"; }
        else if (type$2 == "," && prev$1 == types[i$3+1] &&
                 (prev$1 == "1" || prev$1 == "n")) { types[i$3] = prev$1; }
        prev$1 = type$2;
      }

      // W5. A sequence of European terminators adjacent to European
      // numbers changes to all European numbers.
      // W6. Otherwise, separators and terminators change to Other
      // Neutral.
      for (var i$4 = 0; i$4 < len; ++i$4) {
        var type$3 = types[i$4];
        if (type$3 == ",") { types[i$4] = "N"; }
        else if (type$3 == "%") {
          var end = (void 0);
          for (end = i$4 + 1; end < len && types[end] == "%"; ++end) {}
          var replace = (i$4 && types[i$4-1] == "!") || (end < len && types[end] == "1") ? "1" : "N";
          for (var j = i$4; j < end; ++j) { types[j] = replace; }
          i$4 = end - 1;
        }
      }

      // W7. Search backwards from each instance of a European number
      // until the first strong type (R, L, or sor) is found. If an L is
      // found, then change the type of the European number to L.
      for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) {
        var type$4 = types[i$5];
        if (cur$1 == "L" && type$4 == "1") { types[i$5] = "L"; }
        else if (isStrong.test(type$4)) { cur$1 = type$4; }
      }

      // N1. A sequence of neutrals takes the direction of the
      // surrounding strong text if the text on both sides has the same
      // direction. European and Arabic numbers act as if they were R in
      // terms of their influence on neutrals. Start-of-level-run (sor)
      // and end-of-level-run (eor) are used at level run boundaries.
      // N2. Any remaining neutrals take the embedding direction.
      for (var i$6 = 0; i$6 < len; ++i$6) {
        if (isNeutral.test(types[i$6])) {
          var end$1 = (void 0);
          for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {}
          var before = (i$6 ? types[i$6-1] : outerType) == "L";
          var after = (end$1 < len ? types[end$1] : outerType) == "L";
          var replace$1 = before == after ? (before ? "L" : "R") : outerType;
          for (var j$1 = i$6; j$1 < end$1; ++j$1) { types[j$1] = replace$1; }
          i$6 = end$1 - 1;
        }
      }

      // Here we depart from the documented algorithm, in order to avoid
      // building up an actual levels array. Since there are only three
      // levels (0, 1, 2) in an implementation that doesn't take
      // explicit embedding into account, we can build up the order on
      // the fly, without following the level-based algorithm.
      var order = [], m;
      for (var i$7 = 0; i$7 < len;) {
        if (countsAsLeft.test(types[i$7])) {
          var start = i$7;
          for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {}
          order.push(new BidiSpan(0, start, i$7));
        } else {
          var pos = i$7, at = order.length, isRTL = direction == "rtl" ? 1 : 0;
          for (++i$7; i$7 < len && types[i$7] != "L"; ++i$7) {}
          for (var j$2 = pos; j$2 < i$7;) {
            if (countsAsNum.test(types[j$2])) {
              if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); at += isRTL; }
              var nstart = j$2;
              for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}
              order.splice(at, 0, new BidiSpan(2, nstart, j$2));
              at += isRTL;
              pos = j$2;
            } else { ++j$2; }
          }
          if (pos < i$7) { order.splice(at, 0, new BidiSpan(1, pos, i$7)); }
        }
      }
      if (direction == "ltr") {
        if (order[0].level == 1 && (m = str.match(/^\s+/))) {
          order[0].from = m[0].length;
          order.unshift(new BidiSpan(0, 0, m[0].length));
        }
        if (lst(order).level == 1 && (m = str.match(/\s+$/))) {
          lst(order).to -= m[0].length;
          order.push(new BidiSpan(0, len - m[0].length, len));
        }
      }

      return direction == "rtl" ? order.reverse() : order
    }
  })();

  // Get the bidi ordering for the given line (and cache it). Returns
  // false for lines that are fully left-to-right, and an array of
  // BidiSpan objects otherwise.
  function getOrder(line, direction) {
    var order = line.order;
    if (order == null) { order = line.order = bidiOrdering(line.text, direction); }
    return order
  }

  // EVENT HANDLING

  // Lightweight event framework. on/off also work on DOM nodes,
  // registering native DOM handlers.

  var noHandlers = [];

  var on = function(emitter, type, f) {
    if (emitter.addEventListener) {
      emitter.addEventListener(type, f, false);
    } else if (emitter.attachEvent) {
      emitter.attachEvent("on" + type, f);
    } else {
      var map = emitter._handlers || (emitter._handlers = {});
      map[type] = (map[type] || noHandlers).concat(f);
    }
  };

  function getHandlers(emitter, type) {
    return emitter._handlers && emitter._handlers[type] || noHandlers
  }

  function off(emitter, type, f) {
    if (emitter.removeEventListener) {
      emitter.removeEventListener(type, f, false);
    } else if (emitter.detachEvent) {
      emitter.detachEvent("on" + type, f);
    } else {
      var map = emitter._handlers, arr = map && map[type];
      if (arr) {
        var index = indexOf(arr, f);
        if (index > -1)
          { map[type] = arr.slice(0, index).concat(arr.slice(index + 1)); }
      }
    }
  }

  function signal(emitter, type /*, values...*/) {
    var handlers = getHandlers(emitter, type);
    if (!handlers.length) { return }
    var args = Array.prototype.slice.call(arguments, 2);
    for (var i = 0; i < handlers.length; ++i) { handlers[i].apply(null, args); }
  }

  // The DOM events that CodeMirror handles can be overridden by
  // registering a (non-DOM) handler on the editor for the event name,
  // and preventDefault-ing the event in that handler.
  function signalDOMEvent(cm, e, override) {
    if (typeof e == "string")
      { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }
    signal(cm, override || e.type, cm, e);
    return e_defaultPrevented(e) || e.codemirrorIgnore
  }

  function signalCursorActivity(cm) {
    var arr = cm._handlers && cm._handlers.cursorActivity;
    if (!arr) { return }
    var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);
    for (var i = 0; i < arr.length; ++i) { if (indexOf(set, arr[i]) == -1)
      { set.push(arr[i]); } }
  }

  function hasHandler(emitter, type) {
    return getHandlers(emitter, type).length > 0
  }

  // Add on and off methods to a constructor's prototype, to make
  // registering events on such objects more convenient.
  function eventMixin(ctor) {
    ctor.prototype.on = function(type, f) {on(this, type, f);};
    ctor.prototype.off = function(type, f) {off(this, type, f);};
  }

  // Due to the fact that we still support jurassic IE versions, some
  // compatibility wrappers are needed.

  function e_preventDefault(e) {
    if (e.preventDefault) { e.preventDefault(); }
    else { e.returnValue = false; }
  }
  function e_stopPropagation(e) {
    if (e.stopPropagation) { e.stopPropagation(); }
    else { e.cancelBubble = true; }
  }
  function e_defaultPrevented(e) {
    return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false
  }
  function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}

  function e_target(e) {return e.target || e.srcElement}
  function e_button(e) {
    var b = e.which;
    if (b == null) {
      if (e.button & 1) { b = 1; }
      else if (e.button & 2) { b = 3; }
      else if (e.button & 4) { b = 2; }
    }
    if (mac && e.ctrlKey && b == 1) { b = 3; }
    return b
  }

  // Detect drag-and-drop
  var dragAndDrop = function() {
    // There is *some* kind of drag-and-drop support in IE6-8, but I
    // couldn't get it to work yet.
    if (ie && ie_version < 9) { return false }
    var div = elt('div');
    return "draggable" in div || "dragDrop" in div
  }();

  var zwspSupported;
  function zeroWidthElement(measure) {
    if (zwspSupported == null) {
      var test = elt("span", "\u200b");
      removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")]));
      if (measure.firstChild.offsetHeight != 0)
        { zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); }
    }
    var node = zwspSupported ? elt("span", "\u200b") :
      elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px");
    node.setAttribute("cm-text", "");
    return node
  }

  // Feature-detect IE's crummy client rect reporting for bidi text
  var badBidiRects;
  function hasBadBidiRects(measure) {
    if (badBidiRects != null) { return badBidiRects }
    var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA"));
    var r0 = range(txt, 0, 1).getBoundingClientRect();
    var r1 = range(txt, 1, 2).getBoundingClientRect();
    removeChildren(measure);
    if (!r0 || r0.left == r0.right) { return false } // Safari returns null in some cases (#2780)
    return badBidiRects = (r1.right - r0.right < 3)
  }

  // See if "".split is the broken IE version, if so, provide an
  // alternative way to split lines.
  var splitLinesAuto = "\n\nb".split(/\n/).length != 3 ? function (string) {
    var pos = 0, result = [], l = string.length;
    while (pos <= l) {
      var nl = string.indexOf("\n", pos);
      if (nl == -1) { nl = string.length; }
      var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl);
      var rt = line.indexOf("\r");
      if (rt != -1) {
        result.push(line.slice(0, rt));
        pos += rt + 1;
      } else {
        result.push(line);
        pos = nl + 1;
      }
    }
    return result
  } : function (string) { return string.split(/\r\n?|\n/); };

  var hasSelection = window.getSelection ? function (te) {
    try { return te.selectionStart != te.selectionEnd }
    catch(e) { return false }
  } : function (te) {
    var range;
    try {range = te.ownerDocument.selection.createRange();}
    catch(e) {}
    if (!range || range.parentElement() != te) { return false }
    return range.compareEndPoints("StartToEnd", range) != 0
  };

  var hasCopyEvent = (function () {
    var e = elt("div");
    if ("oncopy" in e) { return true }
    e.setAttribute("oncopy", "return;");
    return typeof e.oncopy == "function"
  })();

  var badZoomedRects = null;
  function hasBadZoomedRects(measure) {
    if (badZoomedRects != null) { return badZoomedRects }
    var node = removeChildrenAndAdd(measure, elt("span", "x"));
    var normal = node.getBoundingClientRect();
    var fromRange = range(node, 0, 1).getBoundingClientRect();
    return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1
  }

  // Known modes, by name and by MIME
  var modes = {}, mimeModes = {};

  // Extra arguments are stored as the mode's dependencies, which is
  // used by (legacy) mechanisms like loadmode.js to automatically
  // load a mode. (Preferred mechanism is the require/define calls.)
  function defineMode(name, mode) {
    if (arguments.length > 2)
      { mode.dependencies = Array.prototype.slice.call(arguments, 2); }
    modes[name] = mode;
  }

  function defineMIME(mime, spec) {
    mimeModes[mime] = spec;
  }

  // Given a MIME type, a {name, ...options} config object, or a name
  // string, return a mode config object.
  function resolveMode(spec) {
    if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) {
      spec = mimeModes[spec];
    } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) {
      var found = mimeModes[spec.name];
      if (typeof found == "string") { found = {name: found}; }
      spec = createObj(found, spec);
      spec.name = found.name;
    } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) {
      return resolveMode("application/xml")
    } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(spec)) {
      return resolveMode("application/json")
    }
    if (typeof spec == "string") { return {name: spec} }
    else { return spec || {name: "null"} }
  }

  // Given a mode spec (anything that resolveMode accepts), find and
  // initialize an actual mode object.
  function getMode(options, spec) {
    spec = resolveMode(spec);
    var mfactory = modes[spec.name];
    if (!mfactory) { return getMode(options, "text/plain") }
    var modeObj = mfactory(options, spec);
    if (modeExtensions.hasOwnProperty(spec.name)) {
      var exts = modeExtensions[spec.name];
      for (var prop in exts) {
        if (!exts.hasOwnProperty(prop)) { continue }
        if (modeObj.hasOwnProperty(prop)) { modeObj["_" + prop] = modeObj[prop]; }
        modeObj[prop] = exts[prop];
      }
    }
    modeObj.name = spec.name;
    if (spec.helperType) { modeObj.helperType = spec.helperType; }
    if (spec.modeProps) { for (var prop$1 in spec.modeProps)
      { modeObj[prop$1] = spec.modeProps[prop$1]; } }

    return modeObj
  }

  // This can be used to attach properties to mode objects from
  // outside the actual mode definition.
  var modeExtensions = {};
  function extendMode(mode, properties) {
    var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});
    copyObj(properties, exts);
  }

  function copyState(mode, state) {
    if (state === true) { return state }
    if (mode.copyState) { return mode.copyState(state) }
    var nstate = {};
    for (var n in state) {
      var val = state[n];
      if (val instanceof Array) { val = val.concat([]); }
      nstate[n] = val;
    }
    return nstate
  }

  // Given a mode and a state (for that mode), find the inner mode and
  // state at the position that the state refers to.
  function innerMode(mode, state) {
    var info;
    while (mode.innerMode) {
      info = mode.innerMode(state);
      if (!info || info.mode == mode) { break }
      state = info.state;
      mode = info.mode;
    }
    return info || {mode: mode, state: state}
  }

  function startState(mode, a1, a2) {
    return mode.startState ? mode.startState(a1, a2) : true
  }

  // STRING STREAM

  // Fed to the mode parsers, provides helper functions to make
  // parsers more succinct.

  var StringStream = function(string, tabSize, lineOracle) {
    this.pos = this.start = 0;
    this.string = string;
    this.tabSize = tabSize || 8;
    this.lastColumnPos = this.lastColumnValue = 0;
    this.lineStart = 0;
    this.lineOracle = lineOracle;
  };

  StringStream.prototype.eol = function () {return this.pos >= this.string.length};
  StringStream.prototype.sol = function () {return this.pos == this.lineStart};
  StringStream.prototype.peek = function () {return this.string.charAt(this.pos) || undefined};
  StringStream.prototype.next = function () {
    if (this.pos < this.string.length)
      { return this.string.charAt(this.pos++) }
  };
  StringStream.prototype.eat = function (match) {
    var ch = this.string.charAt(this.pos);
    var ok;
    if (typeof match == "string") { ok = ch == match; }
    else { ok = ch && (match.test ? match.test(ch) : match(ch)); }
    if (ok) {++this.pos; return ch}
  };
  StringStream.prototype.eatWhile = function (match) {
    var start = this.pos;
    while (this.eat(match)){}
    return this.pos > start
  };
  StringStream.prototype.eatSpace = function () {
    var start = this.pos;
    while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) { ++this.pos; }
    return this.pos > start
  };
  StringStream.prototype.skipToEnd = function () {this.pos = this.string.length;};
  StringStream.prototype.skipTo = function (ch) {
    var found = this.string.indexOf(ch, this.pos);
    if (found > -1) {this.pos = found; return true}
  };
  StringStream.prototype.backUp = function (n) {this.pos -= n;};
  StringStream.prototype.column = function () {
    if (this.lastColumnPos < this.start) {
      this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);
      this.lastColumnPos = this.start;
    }
    return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)
  };
  StringStream.prototype.indentation = function () {
    return countColumn(this.string, null, this.tabSize) -
      (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)
  };
  StringStream.prototype.match = function (pattern, consume, caseInsensitive) {
    if (typeof pattern == "string") {
      var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; };
      var substr = this.string.substr(this.pos, pattern.length);
      if (cased(substr) == cased(pattern)) {
        if (consume !== false) { this.pos += pattern.length; }
        return true
      }
    } else {
      var match = this.string.slice(this.pos).match(pattern);
      if (match && match.index > 0) { return null }
      if (match && consume !== false) { this.pos += match[0].length; }
      return match
    }
  };
  StringStream.prototype.current = function (){return this.string.slice(this.start, this.pos)};
  StringStream.prototype.hideFirstChars = function (n, inner) {
    this.lineStart += n;
    try { return inner() }
    finally { this.lineStart -= n; }
  };
  StringStream.prototype.lookAhead = function (n) {
    var oracle = this.lineOracle;
    return oracle && oracle.lookAhead(n)
  };
  StringStream.prototype.baseToken = function () {
    var oracle = this.lineOracle;
    return oracle && oracle.baseToken(this.pos)
  };

  // Find the line object corresponding to the given line number.
  function getLine(doc, n) {
    n -= doc.first;
    if (n < 0 || n >= doc.size) { throw new Error("There is no line " + (n + doc.first) + " in the document.") }
    var chunk = doc;
    while (!chunk.lines) {
      for (var i = 0;; ++i) {
        var child = chunk.children[i], sz = child.chunkSize();
        if (n < sz) { chunk = child; break }
        n -= sz;
      }
    }
    return chunk.lines[n]
  }

  // Get the part of a document between two positions, as an array of
  // strings.
  function getBetween(doc, start, end) {
    var out = [], n = start.line;
    doc.iter(start.line, end.line + 1, function (line) {
      var text = line.text;
      if (n == end.line) { text = text.slice(0, end.ch); }
      if (n == start.line) { text = text.slice(start.ch); }
      out.push(text);
      ++n;
    });
    return out
  }
  // Get the lines between from and to, as array of strings.
  function getLines(doc, from, to) {
    var out = [];
    doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value
    return out
  }

  // Update the height of a line, propagating the height change
  // upwards to parent nodes.
  function updateLineHeight(line, height) {
    var diff = height - line.height;
    if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }
  }

  // Given a line object, find its line number by walking up through
  // its parent links.
  function lineNo(line) {
    if (line.parent == null) { return null }
    var cur = line.parent, no = indexOf(cur.lines, line);
    for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {
      for (var i = 0;; ++i) {
        if (chunk.children[i] == cur) { break }
        no += chunk.children[i].chunkSize();
      }
    }
    return no + cur.first
  }

  // Find the line at the given vertical position, using the height
  // information in the document tree.
  function lineAtHeight(chunk, h) {
    var n = chunk.first;
    outer: do {
      for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {
        var child = chunk.children[i$1], ch = child.height;
        if (h < ch) { chunk = child; continue outer }
        h -= ch;
        n += child.chunkSize();
      }
      return n
    } while (!chunk.lines)
    var i = 0;
    for (; i < chunk.lines.length; ++i) {
      var line = chunk.lines[i], lh = line.height;
      if (h < lh) { break }
      h -= lh;
    }
    return n + i
  }

  function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size}

  function lineNumberFor(options, i) {
    return String(options.lineNumberFormatter(i + options.firstLineNumber))
  }

  // A Pos instance represents a position within the text.
  function Pos(line, ch, sticky) {
    if ( sticky === void 0 ) sticky = null;

    if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }
    this.line = line;
    this.ch = ch;
    this.sticky = sticky;
  }

  // Compare two positions, return 0 if they are the same, a negative
  // number when a is less, and a positive number otherwise.
  function cmp(a, b) { return a.line - b.line || a.ch - b.ch }

  function equalCursorPos(a, b) { return a.sticky == b.sticky && cmp(a, b) == 0 }

  function copyPos(x) {return Pos(x.line, x.ch)}
  function maxPos(a, b) { return cmp(a, b) < 0 ? b : a }
  function minPos(a, b) { return cmp(a, b) < 0 ? a : b }

  // Most of the external API clips given positions to make sure they
  // actually exist within the document.
  function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))}
  function clipPos(doc, pos) {
    if (pos.line < doc.first) { return Pos(doc.first, 0) }
    var last = doc.first + doc.size - 1;
    if (pos.line > last) { return Pos(last, getLine(doc, last).text.length) }
    return clipToLen(pos, getLine(doc, pos.line).text.length)
  }
  function clipToLen(pos, linelen) {
    var ch = pos.ch;
    if (ch == null || ch > linelen) { return Pos(pos.line, linelen) }
    else if (ch < 0) { return Pos(pos.line, 0) }
    else { return pos }
  }
  function clipPosArray(doc, array) {
    var out = [];
    for (var i = 0; i < array.length; i++) { out[i] = clipPos(doc, array[i]); }
    return out
  }

  var SavedContext = function(state, lookAhead) {
    this.state = state;
    this.lookAhead = lookAhead;
  };

  var Context = function(doc, state, line, lookAhead) {
    this.state = state;
    this.doc = doc;
    this.line = line;
    this.maxLookAhead = lookAhead || 0;
    this.baseTokens = null;
    this.baseTokenPos = 1;
  };

  Context.prototype.lookAhead = function (n) {
    var line = this.doc.getLine(this.line + n);
    if (line != null && n > this.maxLookAhead) { this.maxLookAhead = n; }
    return line
  };

  Context.prototype.baseToken = function (n) {
    if (!this.baseTokens) { return null }
    while (this.baseTokens[this.baseTokenPos] <= n)
      { this.baseTokenPos += 2; }
    var type = this.baseTokens[this.baseTokenPos + 1];
    return {type: type && type.replace(/( |^)overlay .*/, ""),
            size: this.baseTokens[this.baseTokenPos] - n}
  };

  Context.prototype.nextLine = function () {
    this.line++;
    if (this.maxLookAhead > 0) { this.maxLookAhead--; }
  };

  Context.fromSaved = function (doc, saved, line) {
    if (saved instanceof SavedContext)
      { return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead) }
    else
      { return new Context(doc, copyState(doc.mode, saved), line) }
  };

  Context.prototype.save = function (copy) {
    var state = copy !== false ? copyState(this.doc.mode, this.state) : this.state;
    return this.maxLookAhead > 0 ? new SavedContext(state, this.maxLookAhead) : state
  };


  // Compute a style array (an array starting with a mode generation
  // -- for invalidation -- followed by pairs of end positions and
  // style strings), which is used to highlight the tokens on the
  // line.
  function highlightLine(cm, line, context, forceToEnd) {
    // A styles array always starts with a number identifying the
    // mode/overlays that it is based on (for easy invalidation).
    var st = [cm.state.modeGen], lineClasses = {};
    // Compute the base array of styles
    runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },
            lineClasses, forceToEnd);
    var state = context.state;

    // Run overlays, adjust style array.
    var loop = function ( o ) {
      context.baseTokens = st;
      var overlay = cm.state.overlays[o], i = 1, at = 0;
      context.state = true;
      runMode(cm, line.text, overlay.mode, context, function (end, style) {
        var start = i;
        // Ensure there's a token end at the current position, and that i points at it
        while (at < end) {
          var i_end = st[i];
          if (i_end > end)
            { st.splice(i, 1, end, st[i+1], i_end); }
          i += 2;
          at = Math.min(end, i_end);
        }
        if (!style) { return }
        if (overlay.opaque) {
          st.splice(start, i - start, end, "overlay " + style);
          i = start + 2;
        } else {
          for (; start < i; start += 2) {
            var cur = st[start+1];
            st[start+1] = (cur ? cur + " " : "") + "overlay " + style;
          }
        }
      }, lineClasses);
      context.state = state;
      context.baseTokens = null;
      context.baseTokenPos = 1;
    };

    for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );

    return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}
  }

  function getLineStyles(cm, line, updateFrontier) {
    if (!line.styles || line.styles[0] != cm.state.modeGen) {
      var context = getContextBefore(cm, lineNo(line));
      var resetState = line.text.length > cm.options.maxHighlightLength && copyState(cm.doc.mode, context.state);
      var result = highlightLine(cm, line, context);
      if (resetState) { context.state = resetState; }
      line.stateAfter = context.save(!resetState);
      line.styles = result.styles;
      if (result.classes) { line.styleClasses = result.classes; }
      else if (line.styleClasses) { line.styleClasses = null; }
      if (updateFrontier === cm.doc.highlightFrontier)
        { cm.doc.modeFrontier = Math.max(cm.doc.modeFrontier, ++cm.doc.highlightFrontier); }
    }
    return line.styles
  }

  function getContextBefore(cm, n, precise) {
    var doc = cm.doc, display = cm.display;
    if (!doc.mode.startState) { return new Context(doc, true, n) }
    var start = findStartLine(cm, n, precise);
    var saved = start > doc.first && getLine(doc, start - 1).stateAfter;
    var context = saved ? Context.fromSaved(doc, saved, start) : new Context(doc, startState(doc.mode), start);

    doc.iter(start, n, function (line) {
      processLine(cm, line.text, context);
      var pos = context.line;
      line.stateAfter = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo ? context.save() : null;
      context.nextLine();
    });
    if (precise) { doc.modeFrontier = context.line; }
    return context
  }

  // Lightweight form of highlight -- proceed over this line and
  // update state, but don't save a style array. Used for lines that
  // aren't currently visible.
  function processLine(cm, text, context, startAt) {
    var mode = cm.doc.mode;
    var stream = new StringStream(text, cm.options.tabSize, context);
    stream.start = stream.pos = startAt || 0;
    if (text == "") { callBlankLine(mode, context.state); }
    while (!stream.eol()) {
      readToken(mode, stream, context.state);
      stream.start = stream.pos;
    }
  }

  function callBlankLine(mode, state) {
    if (mode.blankLine) { return mode.blankLine(state) }
    if (!mode.innerMode) { return }
    var inner = innerMode(mode, state);
    if (inner.mode.blankLine) { return inner.mode.blankLine(inner.state) }
  }

  function readToken(mode, stream, state, inner) {
    for (var i = 0; i < 10; i++) {
      if (inner) { inner[0] = innerMode(mode, state).mode; }
      var style = mode.token(stream, state);
      if (stream.pos > stream.start) { return style }
    }
    throw new Error("Mode " + mode.name + " failed to advance stream.")
  }

  var Token = function(stream, type, state) {
    this.start = stream.start; this.end = stream.pos;
    this.string = stream.current();
    this.type = type || null;
    this.state = state;
  };

  // Utility for getTokenAt and getLineTokens
  function takeToken(cm, pos, precise, asArray) {
    var doc = cm.doc, mode = doc.mode, style;
    pos = clipPos(doc, pos);
    var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);
    var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;
    if (asArray) { tokens = []; }
    while ((asArray || stream.pos < pos.ch) && !stream.eol()) {
      stream.start = stream.pos;
      style = readToken(mode, stream, context.state);
      if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }
    }
    return asArray ? tokens : new Token(stream, style, context.state)
  }

  function extractLineClasses(type, output) {
    if (type) { for (;;) {
      var lineClass = type.match(/(?:^|\s+)line-(background-)?(\S+)/);
      if (!lineClass) { break }
      type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);
      var prop = lineClass[1] ? "bgClass" : "textClass";
      if (output[prop] == null)
        { output[prop] = lineClass[2]; }
      else if (!(new RegExp("(?:^|\\s)" + lineClass[2] + "(?:$|\\s)")).test(output[prop]))
        { output[prop] += " " + lineClass[2]; }
    } }
    return type
  }

  // Run the given mode's parser over a line, calling f for each token.
  function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {
    var flattenSpans = mode.flattenSpans;
    if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }
    var curStart = 0, curStyle = null;
    var stream = new StringStream(text, cm.options.tabSize, context), style;
    var inner = cm.options.addModeClass && [null];
    if (text == "") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }
    while (!stream.eol()) {
      if (stream.pos > cm.options.maxHighlightLength) {
        flattenSpans = false;
        if (forceToEnd) { processLine(cm, text, context, stream.pos); }
        stream.pos = text.length;
        style = null;
      } else {
        style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);
      }
      if (inner) {
        var mName = inner[0].name;
        if (mName) { style = "m-" + (style ? mName + " " + style : mName); }
      }
      if (!flattenSpans || curStyle != style) {
        while (curStart < stream.start) {
          curStart = Math.min(stream.start, curStart + 5000);
          f(curStart, curStyle);
        }
        curStyle = style;
      }
      stream.start = stream.pos;
    }
    while (curStart < stream.pos) {
      // Webkit seems to refuse to render text nodes longer than 57444
      // characters, and returns inaccurate measurements in nodes
      // starting around 5000 chars.
      var pos = Math.min(stream.pos, curStart + 5000);
      f(pos, curStyle);
      curStart = pos;
    }
  }

  // Finds the line to start with when starting a parse. Tries to
  // find a line with a stateAfter, so that it can start with a
  // valid state. If that fails, it returns the line with the
  // smallest indentation, which tends to need the least context to
  // parse correctly.
  function findStartLine(cm, n, precise) {
    var minindent, minline, doc = cm.doc;
    var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);
    for (var search = n; search > lim; --search) {
      if (search <= doc.first) { return doc.first }
      var line = getLine(doc, search - 1), after = line.stateAfter;
      if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))
        { return search }
      var indented = countColumn(line.text, null, cm.options.tabSize);
      if (minline == null || minindent > indented) {
        minline = search - 1;
        minindent = indented;
      }
    }
    return minline
  }

  function retreatFrontier(doc, n) {
    doc.modeFrontier = Math.min(doc.modeFrontier, n);
    if (doc.highlightFrontier < n - 10) { return }
    var start = doc.first;
    for (var line = n - 1; line > start; line--) {
      var saved = getLine(doc, line).stateAfter;
      // change is on 3
      // state on line 1 looked ahead 2 -- so saw 3
      // test 1 + 2 < 3 should cover this
      if (saved && (!(saved instanceof SavedContext) || line + saved.lookAhead < n)) {
        start = line + 1;
        break
      }
    }
    doc.highlightFrontier = Math.min(doc.highlightFrontier, start);
  }

  // Optimize some code when these features are not used.
  var sawReadOnlySpans = false, sawCollapsedSpans = false;

  function seeReadOnlySpans() {
    sawReadOnlySpans = true;
  }

  function seeCollapsedSpans() {
    sawCollapsedSpans = true;
  }

  // TEXTMARKER SPANS

  function MarkedSpan(marker, from, to) {
    this.marker = marker;
    this.from = from; this.to = to;
  }

  // Search an array of spans for a span matching the given marker.
  function getMarkedSpanFor(spans, marker) {
    if (spans) { for (var i = 0; i < spans.length; ++i) {
      var span = spans[i];
      if (span.marker == marker) { return span }
    } }
  }
  // Remove a span from an array, returning undefined if no spans are
  // left (we don't store arrays for lines without spans).
  function removeMarkedSpan(spans, span) {
    var r;
    for (var i = 0; i < spans.length; ++i)
      { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }
    return r
  }
  // Add a span to a line.
  function addMarkedSpan(line, span) {
    line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];
    span.marker.attachLine(line);
  }

  // Used for the algorithm that adjusts markers for a change in the
  // document. These functions cut an array of spans at a given
  // character position, returning an array of remaining chunks (or
  // undefined if nothing remains).
  function markedSpansBefore(old, startCh, isInsert) {
    var nw;
    if (old) { for (var i = 0; i < old.length; ++i) {
      var span = old[i], marker = span.marker;
      var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);
      if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) {
        var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh)
        ;(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));
      }
    } }
    return nw
  }
  function markedSpansAfter(old, endCh, isInsert) {
    var nw;
    if (old) { for (var i = 0; i < old.length; ++i) {
      var span = old[i], marker = span.marker;
      var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);
      if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) {
        var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh)
        ;(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,
                                              span.to == null ? null : span.to - endCh));
      }
    } }
    return nw
  }

  // Given a change object, compute the new set of marker spans that
  // cover the line in which the change took place. Removes spans
  // entirely within the change, reconnects spans belonging to the
  // same marker that appear on both sides of the change, and cuts off
  // spans partially within the change. Returns an array of span
  // arrays with one element for each line in (after) the change.
  function stretchSpansOverChange(doc, change) {
    if (change.full) { return null }
    var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;
    var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;
    if (!oldFirst && !oldLast) { return null }

    var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;
    // Get the spans that 'stick out' on both sides
    var first = markedSpansBefore(oldFirst, startCh, isInsert);
    var last = markedSpansAfter(oldLast, endCh, isInsert);

    // Next, merge those two ends
    var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);
    if (first) {
      // Fix up .to properties of first
      for (var i = 0; i < first.length; ++i) {
        var span = first[i];
        if (span.to == null) {
          var found = getMarkedSpanFor(last, span.marker);
          if (!found) { span.to = startCh; }
          else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }
        }
      }
    }
    if (last) {
      // Fix up .from in last (or move them into first in case of sameLine)
      for (var i$1 = 0; i$1 < last.length; ++i$1) {
        var span$1 = last[i$1];
        if (span$1.to != null) { span$1.to += offset; }
        if (span$1.from == null) {
          var found$1 = getMarkedSpanFor(first, span$1.marker);
          if (!found$1) {
            span$1.from = offset;
            if (sameLine) { (first || (first = [])).push(span$1); }
          }
        } else {
          span$1.from += offset;
          if (sameLine) { (first || (first = [])).push(span$1); }
        }
      }
    }
    // Make sure we didn't create any zero-length spans
    if (first) { first = clearEmptySpans(first); }
    if (last && last != first) { last = clearEmptySpans(last); }

    var newMarkers = [first];
    if (!sameLine) {
      // Fill gap with whole-line-spans
      var gap = change.text.length - 2, gapMarkers;
      if (gap > 0 && first)
        { for (var i$2 = 0; i$2 < first.length; ++i$2)
          { if (first[i$2].to == null)
            { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }
      for (var i$3 = 0; i$3 < gap; ++i$3)
        { newMarkers.push(gapMarkers); }
      newMarkers.push(last);
    }
    return newMarkers
  }

  // Remove spans that are empty and don't have a clearWhenEmpty
  // option of false.
  function clearEmptySpans(spans) {
    for (var i = 0; i < spans.length; ++i) {
      var span = spans[i];
      if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)
        { spans.splice(i--, 1); }
    }
    if (!spans.length) { return null }
    return spans
  }

  // Used to 'clip' out readOnly ranges when making a change.
  function removeReadOnlyRanges(doc, from, to) {
    var markers = null;
    doc.iter(from.line, to.line + 1, function (line) {
      if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {
        var mark = line.markedSpans[i].marker;
        if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))
          { (markers || (markers = [])).push(mark); }
      } }
    });
    if (!markers) { return null }
    var parts = [{from: from, to: to}];
    for (var i = 0; i < markers.length; ++i) {
      var mk = markers[i], m = mk.find(0);
      for (var j = 0; j < parts.length; ++j) {
        var p = parts[j];
        if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }
        var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);
        if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)
          { newParts.push({from: p.from, to: m.from}); }
        if (dto > 0 || !mk.inclusiveRight && !dto)
          { newParts.push({from: m.to, to: p.to}); }
        parts.splice.apply(parts, newParts);
        j += newParts.length - 3;
      }
    }
    return parts
  }

  // Connect or disconnect spans from a line.
  function detachMarkedSpans(line) {
    var spans = line.markedSpans;
    if (!spans) { return }
    for (var i = 0; i < spans.length; ++i)
      { spans[i].marker.detachLine(line); }
    line.markedSpans = null;
  }
  function attachMarkedSpans(line, spans) {
    if (!spans) { return }
    for (var i = 0; i < spans.length; ++i)
      { spans[i].marker.attachLine(line); }
    line.markedSpans = spans;
  }

  // Helpers used when computing which overlapping collapsed span
  // counts as the larger one.
  function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0 }
  function extraRight(marker) { return marker.inclusiveRight ? 1 : 0 }

  // Returns a number indicating which of two overlapping collapsed
  // spans is larger (and thus includes the other). Falls back to
  // comparing ids when the spans cover exactly the same range.
  function compareCollapsedMarkers(a, b) {
    var lenDiff = a.lines.length - b.lines.length;
    if (lenDiff != 0) { return lenDiff }
    var aPos = a.find(), bPos = b.find();
    var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);
    if (fromCmp) { return -fromCmp }
    var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);
    if (toCmp) { return toCmp }
    return b.id - a.id
  }

  // Find out whether a line ends or starts in a collapsed span. If
  // so, return the marker for that span.
  function collapsedSpanAtSide(line, start) {
    var sps = sawCollapsedSpans && line.markedSpans, found;
    if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {
      sp = sps[i];
      if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&
          (!found || compareCollapsedMarkers(found, sp.marker) < 0))
        { found = sp.marker; }
    } }
    return found
  }
  function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) }
  function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }

  function collapsedSpanAround(line, ch) {
    var sps = sawCollapsedSpans && line.markedSpans, found;
    if (sps) { for (var i = 0; i < sps.length; ++i) {
      var sp = sps[i];
      if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) &&
          (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; }
    } }
    return found
  }

  // Test whether there exists a collapsed span that partially
  // overlaps (covers the start or end, but not both) of a new span.
  // Such overlap is not allowed.
  function conflictingCollapsedRange(doc, lineNo, from, to, marker) {
    var line = getLine(doc, lineNo);
    var sps = sawCollapsedSpans && line.markedSpans;
    if (sps) { for (var i = 0; i < sps.length; ++i) {
      var sp = sps[i];
      if (!sp.marker.collapsed) { continue }
      var found = sp.marker.find(0);
      var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);
      var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);
      if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }
      if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||
          fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))
        { return true }
    } }
  }

  // A visual line is a line as drawn on the screen. Folding, for
  // example, can cause multiple logical lines to appear on the same
  // visual line. This finds the start of the visual line that the
  // given line is part of (usually that is the line itself).
  function visualLine(line) {
    var merged;
    while (merged = collapsedSpanAtStart(line))
      { line = merged.find(-1, true).line; }
    return line
  }

  function visualLineEnd(line) {
    var merged;
    while (merged = collapsedSpanAtEnd(line))
      { line = merged.find(1, true).line; }
    return line
  }

  // Returns an array of logical lines that continue the visual line
  // started by the argument, or undefined if there are no such lines.
  function visualLineContinued(line) {
    var merged, lines;
    while (merged = collapsedSpanAtEnd(line)) {
      line = merged.find(1, true).line
      ;(lines || (lines = [])).push(line);
    }
    return lines
  }

  // Get the line number of the start of the visual line that the
  // given line number is part of.
  function visualLineNo(doc, lineN) {
    var line = getLine(doc, lineN), vis = visualLine(line);
    if (line == vis) { return lineN }
    return lineNo(vis)
  }

  // Get the line number of the start of the next visual line after
  // the given line.
  function visualLineEndNo(doc, lineN) {
    if (lineN > doc.lastLine()) { return lineN }
    var line = getLine(doc, lineN), merged;
    if (!lineIsHidden(doc, line)) { return lineN }
    while (merged = collapsedSpanAtEnd(line))
      { line = merged.find(1, true).line; }
    return lineNo(line) + 1
  }

  // Compute whether a line is hidden. Lines count as hidden when they
  // are part of a visual line that starts with another line, or when
  // they are entirely covered by collapsed, non-widget span.
  function lineIsHidden(doc, line) {
    var sps = sawCollapsedSpans && line.markedSpans;
    if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {
      sp = sps[i];
      if (!sp.marker.collapsed) { continue }
      if (sp.from == null) { return true }
      if (sp.marker.widgetNode) { continue }
      if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))
        { return true }
    } }
  }
  function lineIsHiddenInner(doc, line, span) {
    if (span.to == null) {
      var end = span.marker.find(1, true);
      return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker))
    }
    if (span.marker.inclusiveRight && span.to == line.text.length)
      { return true }
    for (var sp = (void 0), i = 0; i < line.markedSpans.length; ++i) {
      sp = line.markedSpans[i];
      if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&
          (sp.to == null || sp.to != span.from) &&
          (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&
          lineIsHiddenInner(doc, line, sp)) { return true }
    }
  }

  // Find the height above the given line.
  function heightAtLine(lineObj) {
    lineObj = visualLine(lineObj);

    var h = 0, chunk = lineObj.parent;
    for (var i = 0; i < chunk.lines.length; ++i) {
      var line = chunk.lines[i];
      if (line == lineObj) { break }
      else { h += line.height; }
    }
    for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {
      for (var i$1 = 0; i$1 < p.children.length; ++i$1) {
        var cur = p.children[i$1];
        if (cur == chunk) { break }
        else { h += cur.height; }
      }
    }
    return h
  }

  // Compute the character length of a line, taking into account
  // collapsed ranges (see markText) that might hide parts, and join
  // other lines onto it.
  function lineLength(line) {
    if (line.height == 0) { return 0 }
    var len = line.text.length, merged, cur = line;
    while (merged = collapsedSpanAtStart(cur)) {
      var found = merged.find(0, true);
      cur = found.from.line;
      len += found.from.ch - found.to.ch;
    }
    cur = line;
    while (merged = collapsedSpanAtEnd(cur)) {
      var found$1 = merged.find(0, true);
      len -= cur.text.length - found$1.from.ch;
      cur = found$1.to.line;
      len += cur.text.length - found$1.to.ch;
    }
    return len
  }

  // Find the longest line in the document.
  function findMaxLine(cm) {
    var d = cm.display, doc = cm.doc;
    d.maxLine = getLine(doc, doc.first);
    d.maxLineLength = lineLength(d.maxLine);
    d.maxLineChanged = true;
    doc.iter(function (line) {
      var len = lineLength(line);
      if (len > d.maxLineLength) {
        d.maxLineLength = len;
        d.maxLine = line;
      }
    });
  }

  // LINE DATA STRUCTURE

  // Line objects. These hold state related to a line, including
  // highlighting info (the styles array).
  var Line = function(text, markedSpans, estimateHeight) {
    this.text = text;
    attachMarkedSpans(this, markedSpans);
    this.height = estimateHeight ? estimateHeight(this) : 1;
  };

  Line.prototype.lineNo = function () { return lineNo(this) };
  eventMixin(Line);

  // Change the content (text, markers) of a line. Automatically
  // invalidates cached information and tries to re-estimate the
  // line's height.
  function updateLine(line, text, markedSpans, estimateHeight) {
    line.text = text;
    if (line.stateAfter) { line.stateAfter = null; }
    if (line.styles) { line.styles = null; }
    if (line.order != null) { line.order = null; }
    detachMarkedSpans(line);
    attachMarkedSpans(line, markedSpans);
    var estHeight = estimateHeight ? estimateHeight(line) : 1;
    if (estHeight != line.height) { updateLineHeight(line, estHeight); }
  }

  // Detach a line from the document tree and its markers.
  function cleanUpLine(line) {
    line.parent = null;
    detachMarkedSpans(line);
  }

  // Convert a style as returned by a mode (either null, or a string
  // containing one or more styles) to a CSS style. This is cached,
  // and also looks for line-wide styles.
  var styleToClassCache = {}, styleToClassCacheWithMode = {};
  function interpretTokenStyle(style, options) {
    if (!style || /^\s*$/.test(style)) { return null }
    var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;
    return cache[style] ||
      (cache[style] = style.replace(/\S+/g, "cm-$&"))
  }

  // Render the DOM representation of the text of a line. Also builds
  // up a 'line map', which points at the DOM nodes that represent
  // specific stretches of text, and is used by the measuring code.
  // The returned object contains the DOM node, this map, and
  // information about line-wide styles that were set by the mode.
  function buildLineContent(cm, lineView) {
    // The padding-right forces the element to have a 'border', which
    // is needed on Webkit to be able to get line-level bounding
    // rectangles for it (in measureChar).
    var content = eltP("span", null, null, webkit ? "padding-right: .1px" : null);
    var builder = {pre: eltP("pre", [content], "CodeMirror-line"), content: content,
                   col: 0, pos: 0, cm: cm,
                   trailingSpace: false,
                   splitSpaces: cm.getOption("lineWrapping")};
    lineView.measure = {};

    // Iterate over the logical lines that make up this visual line.
    for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {
      var line = i ? lineView.rest[i - 1] : lineView.line, order = (void 0);
      builder.pos = 0;
      builder.addToken = buildToken;
      // Optionally wire in some hacks into the token-rendering
      // algorithm, to deal with browser quirks.
      if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction)))
        { builder.addToken = buildTokenBadBidi(builder.addToken, order); }
      builder.map = [];
      var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);
      insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));
      if (line.styleClasses) {
        if (line.styleClasses.bgClass)
          { builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || ""); }
        if (line.styleClasses.textClass)
          { builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || ""); }
      }

      // Ensure at least a single node is present, for measuring.
      if (builder.map.length == 0)
        { builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); }

      // Store the map and a cache object for the current logical line
      if (i == 0) {
        lineView.measure.map = builder.map;
        lineView.measure.cache = {};
      } else {
  (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map)
        ;(lineView.measure.caches || (lineView.measure.caches = [])).push({});
      }
    }

    // See issue #2901
    if (webkit) {
      var last = builder.content.lastChild;
      if (/\bcm-tab\b/.test(last.className) || (last.querySelector && last.querySelector(".cm-tab")))
        { builder.content.className = "cm-tab-wrap-hack"; }
    }

    signal(cm, "renderLine", cm, lineView.line, builder.pre);
    if (builder.pre.className)
      { builder.textClass = joinClasses(builder.pre.className, builder.textClass || ""); }

    return builder
  }

  function defaultSpecialCharPlaceholder(ch) {
    var token = elt("span", "\u2022", "cm-invalidchar");
    token.title = "\\u" + ch.charCodeAt(0).toString(16);
    token.setAttribute("aria-label", token.title);
    return token
  }

  // Build up the DOM representation for a single token, and add it to
  // the line map. Takes care to render special characters separately.
  function buildToken(builder, text, style, startStyle, endStyle, css, attributes) {
    if (!text) { return }
    var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text;
    var special = builder.cm.state.specialChars, mustWrap = false;
    var content;
    if (!special.test(text)) {
      builder.col += text.length;
      content = document.createTextNode(displayText);
      builder.map.push(builder.pos, builder.pos + text.length, content);
      if (ie && ie_version < 9) { mustWrap = true; }
      builder.pos += text.length;
    } else {
      content = document.createDocumentFragment();
      var pos = 0;
      while (true) {
        special.lastIndex = pos;
        var m = special.exec(text);
        var skipped = m ? m.index - pos : text.length - pos;
        if (skipped) {
          var txt = document.createTextNode(displayText.slice(pos, pos + skipped));
          if (ie && ie_version < 9) { content.appendChild(elt("span", [txt])); }
          else { content.appendChild(txt); }
          builder.map.push(builder.pos, builder.pos + skipped, txt);
          builder.col += skipped;
          builder.pos += skipped;
        }
        if (!m) { break }
        pos += skipped + 1;
        var txt$1 = (void 0);
        if (m[0] == "\t") {
          var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;
          txt$1 = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab"));
          txt$1.setAttribute("role", "presentation");
          txt$1.setAttribute("cm-text", "\t");
          builder.col += tabWidth;
        } else if (m[0] == "\r" || m[0] == "\n") {
          txt$1 = content.appendChild(elt("span", m[0] == "\r" ? "\u240d" : "\u2424", "cm-invalidchar"));
          txt$1.setAttribute("cm-text", m[0]);
          builder.col += 1;
        } else {
          txt$1 = builder.cm.options.specialCharPlaceholder(m[0]);
          txt$1.setAttribute("cm-text", m[0]);
          if (ie && ie_version < 9) { content.appendChild(elt("span", [txt$1])); }
          else { content.appendChild(txt$1); }
          builder.col += 1;
        }
        builder.map.push(builder.pos, builder.pos + 1, txt$1);
        builder.pos++;
      }
    }
    builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32;
    if (style || startStyle || endStyle || mustWrap || css || attributes) {
      var fullStyle = style || "";
      if (startStyle) { fullStyle += startStyle; }
      if (endStyle) { fullStyle += endStyle; }
      var token = elt("span", [content], fullStyle, css);
      if (attributes) {
        for (var attr in attributes) { if (attributes.hasOwnProperty(attr) && attr != "style" && attr != "class")
          { token.setAttribute(attr, attributes[attr]); } }
      }
      return builder.content.appendChild(token)
    }
    builder.content.appendChild(content);
  }

  // Change some spaces to NBSP to prevent the browser from collapsing
  // trailing spaces at the end of a line when rendering text (issue #1362).
  function splitSpaces(text, trailingBefore) {
    if (text.length > 1 && !/  /.test(text)) { return text }
    var spaceBefore = trailingBefore, result = "";
    for (var i = 0; i < text.length; i++) {
      var ch = text.charAt(i);
      if (ch == " " && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32))
        { ch = "\u00a0"; }
      result += ch;
      spaceBefore = ch == " ";
    }
    return result
  }

  // Work around nonsense dimensions being reported for stretches of
  // right-to-left text.
  function buildTokenBadBidi(inner, order) {
    return function (builder, text, style, startStyle, endStyle, css, attributes) {
      style = style ? style + " cm-force-border" : "cm-force-border";
      var start = builder.pos, end = start + text.length;
      for (;;) {
        // Find the part that overlaps with the start of this text
        var part = (void 0);
        for (var i = 0; i < order.length; i++) {
          part = order[i];
          if (part.to > start && part.from <= start) { break }
        }
        if (part.to >= end) { return inner(builder, text, style, startStyle, endStyle, css, attributes) }
        inner(builder, text.slice(0, part.to - start), style, startStyle, null, css, attributes);
        startStyle = null;
        text = text.slice(part.to - start);
        start = part.to;
      }
    }
  }

  function buildCollapsedSpan(builder, size, marker, ignoreWidget) {
    var widget = !ignoreWidget && marker.widgetNode;
    if (widget) { builder.map.push(builder.pos, builder.pos + size, widget); }
    if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {
      if (!widget)
        { widget = builder.content.appendChild(document.createElement("span")); }
      widget.setAttribute("cm-marker", marker.id);
    }
    if (widget) {
      builder.cm.display.input.setUneditable(widget);
      builder.content.appendChild(widget);
    }
    builder.pos += size;
    builder.trailingSpace = false;
  }

  // Outputs a number of spans to make up a line, taking highlighting
  // and marked text into account.
  function insertLineContent(line, builder, styles) {
    var spans = line.markedSpans, allText = line.text, at = 0;
    if (!spans) {
      for (var i$1 = 1; i$1 < styles.length; i$1+=2)
        { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }
      return
    }

    var len = allText.length, pos = 0, i = 1, text = "", style, css;
    var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;
    for (;;) {
      if (nextChange == pos) { // Update current marker set
        spanStyle = spanEndStyle = spanStartStyle = css = "";
        attributes = null;
        collapsed = null; nextChange = Infinity;
        var foundBookmarks = [], endStyles = (void 0);
        for (var j = 0; j < spans.length; ++j) {
          var sp = spans[j], m = sp.marker;
          if (m.type == "bookmark" && sp.from == pos && m.widgetNode) {
            foundBookmarks.push(m);
          } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {
            if (sp.to != null && sp.to != pos && nextChange > sp.to) {
              nextChange = sp.to;
              spanEndStyle = "";
            }
            if (m.className) { spanStyle += " " + m.className; }
            if (m.css) { css = (css ? css + ";" : "") + m.css; }
            if (m.startStyle && sp.from == pos) { spanStartStyle += " " + m.startStyle; }
            if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }
            // support for the old title property
            // https://github.com/codemirror/CodeMirror/pull/5673
            if (m.title) { (attributes || (attributes = {})).title = m.title; }
            if (m.attributes) {
              for (var attr in m.attributes)
                { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }
            }
            if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))
              { collapsed = sp; }
          } else if (sp.from > pos && nextChange > sp.from) {
            nextChange = sp.from;
          }
        }
        if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)
          { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += " " + endStyles[j$1]; } } }

        if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)
          { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }
        if (collapsed && (collapsed.from || 0) == pos) {
          buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,
                             collapsed.marker, collapsed.from == null);
          if (collapsed.to == null) { return }
          if (collapsed.to == pos) { collapsed = false; }
        }
      }
      if (pos >= len) { break }

      var upto = Math.min(len, nextChange);
      while (true) {
        if (text) {
          var end = pos + text.length;
          if (!collapsed) {
            var tokenText = end > upto ? text.slice(0, upto - pos) : text;
            builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,
                             spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", css, attributes);
          }
          if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}
          pos = end;
          spanStartStyle = "";
        }
        text = allText.slice(at, at = styles[i++]);
        style = interpretTokenStyle(styles[i++], builder.cm.options);
      }
    }
  }


  // These objects are used to represent the visible (currently drawn)
  // part of the document. A LineView may correspond to multiple
  // logical lines, if those are connected by collapsed ranges.
  function LineView(doc, line, lineN) {
    // The starting line
    this.line = line;
    // Continuing lines, if any
    this.rest = visualLineContinued(line);
    // Number of logical lines in this visual line
    this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;
    this.node = this.text = null;
    this.hidden = lineIsHidden(doc, line);
  }

  // Create a range of LineView objects for the given lines.
  function buildViewArray(cm, from, to) {
    var array = [], nextPos;
    for (var pos = from; pos < to; pos = nextPos) {
      var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);
      nextPos = pos + view.size;
      array.push(view);
    }
    return array
  }

  var operationGroup = null;

  function pushOperation(op) {
    if (operationGroup) {
      operationGroup.ops.push(op);
    } else {
      op.ownsGroup = operationGroup = {
        ops: [op],
        delayedCallbacks: []
      };
    }
  }

  function fireCallbacksForOps(group) {
    // Calls delayed callbacks and cursorActivity handlers until no
    // new ones appear
    var callbacks = group.delayedCallbacks, i = 0;
    do {
      for (; i < callbacks.length; i++)
        { callbacks[i].call(null); }
      for (var j = 0; j < group.ops.length; j++) {
        var op = group.ops[j];
        if (op.cursorActivityHandlers)
          { while (op.cursorActivityCalled < op.cursorActivityHandlers.length)
            { op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); } }
      }
    } while (i < callbacks.length)
  }

  function finishOperation(op, endCb) {
    var group = op.ownsGroup;
    if (!group) { return }

    try { fireCallbacksForOps(group); }
    finally {
      operationGroup = null;
      endCb(group);
    }
  }

  var orphanDelayedCallbacks = null;

  // Often, we want to signal events at a point where we are in the
  // middle of some work, but don't want the handler to start calling
  // other methods on the editor, which might be in an inconsistent
  // state or simply not expect any other events to happen.
  // signalLater looks whether there are any handlers, and schedules
  // them to be executed when the last operation ends, or, if no
  // operation is active, when a timeout fires.
  function signalLater(emitter, type /*, values...*/) {
    var arr = getHandlers(emitter, type);
    if (!arr.length) { return }
    var args = Array.prototype.slice.call(arguments, 2), list;
    if (operationGroup) {
      list = operationGroup.delayedCallbacks;
    } else if (orphanDelayedCallbacks) {
      list = orphanDelayedCallbacks;
    } else {
      list = orphanDelayedCallbacks = [];
      setTimeout(fireOrphanDelayed, 0);
    }
    var loop = function ( i ) {
      list.push(function () { return arr[i].apply(null, args); });
    };

    for (var i = 0; i < arr.length; ++i)
      loop( i );
  }

  function fireOrphanDelayed() {
    var delayed = orphanDelayedCallbacks;
    orphanDelayedCallbacks = null;
    for (var i = 0; i < delayed.length; ++i) { delayed[i](); }
  }

  // When an aspect of a line changes, a string is added to
  // lineView.changes. This updates the relevant part of the line's
  // DOM structure.
  function updateLineForChanges(cm, lineView, lineN, dims) {
    for (var j = 0; j < lineView.changes.length; j++) {
      var type = lineView.changes[j];
      if (type == "text") { updateLineText(cm, lineView); }
      else if (type == "gutter") { updateLineGutter(cm, lineView, lineN, dims); }
      else if (type == "class") { updateLineClasses(cm, lineView); }
      else if (type == "widget") { updateLineWidgets(cm, lineView, dims); }
    }
    lineView.changes = null;
  }

  // Lines with gutter elements, widgets or a background class need to
  // be wrapped, and have the extra elements added to the wrapper div
  function ensureLineWrapped(lineView) {
    if (lineView.node == lineView.text) {
      lineView.node = elt("div", null, null, "position: relative");
      if (lineView.text.parentNode)
        { lineView.text.parentNode.replaceChild(lineView.node, lineView.text); }
      lineView.node.appendChild(lineView.text);
      if (ie && ie_version < 8) { lineView.node.style.zIndex = 2; }
    }
    return lineView.node
  }

  function updateLineBackground(cm, lineView) {
    var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass;
    if (cls) { cls += " CodeMirror-linebackground"; }
    if (lineView.background) {
      if (cls) { lineView.background.className = cls; }
      else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }
    } else if (cls) {
      var wrap = ensureLineWrapped(lineView);
      lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild);
      cm.display.input.setUneditable(lineView.background);
    }
  }

  // Wrapper around buildLineContent which will reuse the structure
  // in display.externalMeasured when possible.
  function getLineContent(cm, lineView) {
    var ext = cm.display.externalMeasured;
    if (ext && ext.line == lineView.line) {
      cm.display.externalMeasured = null;
      lineView.measure = ext.measure;
      return ext.built
    }
    return buildLineContent(cm, lineView)
  }

  // Redraw the line's text. Interacts with the background and text
  // classes because the mode may output tokens that influence these
  // classes.
  function updateLineText(cm, lineView) {
    var cls = lineView.text.className;
    var built = getLineContent(cm, lineView);
    if (lineView.text == lineView.node) { lineView.node = built.pre; }
    lineView.text.parentNode.replaceChild(built.pre, lineView.text);
    lineView.text = built.pre;
    if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {
      lineView.bgClass = built.bgClass;
      lineView.textClass = built.textClass;
      updateLineClasses(cm, lineView);
    } else if (cls) {
      lineView.text.className = cls;
    }
  }

  function updateLineClasses(cm, lineView) {
    updateLineBackground(cm, lineView);
    if (lineView.line.wrapClass)
      { ensureLineWrapped(lineView).className = lineView.line.wrapClass; }
    else if (lineView.node != lineView.text)
      { lineView.node.className = ""; }
    var textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass;
    lineView.text.className = textClass || "";
  }

  function updateLineGutter(cm, lineView, lineN, dims) {
    if (lineView.gutter) {
      lineView.node.removeChild(lineView.gutter);
      lineView.gutter = null;
    }
    if (lineView.gutterBackground) {
      lineView.node.removeChild(lineView.gutterBackground);
      lineView.gutterBackground = null;
    }
    if (lineView.line.gutterClass) {
      var wrap = ensureLineWrapped(lineView);
      lineView.gutterBackground = elt("div", null, "CodeMirror-gutter-background " + lineView.line.gutterClass,
                                      ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px; width: " + (dims.gutterTotalWidth) + "px"));
      cm.display.input.setUneditable(lineView.gutterBackground);
      wrap.insertBefore(lineView.gutterBackground, lineView.text);
    }
    var markers = lineView.line.gutterMarkers;
    if (cm.options.lineNumbers || markers) {
      var wrap$1 = ensureLineWrapped(lineView);
      var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px"));
      cm.display.input.setUneditable(gutterWrap);
      wrap$1.insertBefore(gutterWrap, lineView.text);
      if (lineView.line.gutterClass)
        { gutterWrap.className += " " + lineView.line.gutterClass; }
      if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"]))
        { lineView.lineNumber = gutterWrap.appendChild(
          elt("div", lineNumberFor(cm.options, lineN),
              "CodeMirror-linenumber CodeMirror-gutter-elt",
              ("left: " + (dims.gutterLeft["CodeMirror-linenumbers"]) + "px; width: " + (cm.display.lineNumInnerWidth) + "px"))); }
      if (markers) { for (var k = 0; k < cm.display.gutterSpecs.length; ++k) {
        var id = cm.display.gutterSpecs[k].className, found = markers.hasOwnProperty(id) && markers[id];
        if (found)
          { gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt",
                                     ("left: " + (dims.gutterLeft[id]) + "px; width: " + (dims.gutterWidth[id]) + "px"))); }
      } }
    }
  }

  function updateLineWidgets(cm, lineView, dims) {
    if (lineView.alignable) { lineView.alignable = null; }
    var isWidget = classTest("CodeMirror-linewidget");
    for (var node = lineView.node.firstChild, next = (void 0); node; node = next) {
      next = node.nextSibling;
      if (isWidget.test(node.className)) { lineView.node.removeChild(node); }
    }
    insertLineWidgets(cm, lineView, dims);
  }

  // Build a line's DOM representation from scratch
  function buildLineElement(cm, lineView, lineN, dims) {
    var built = getLineContent(cm, lineView);
    lineView.text = lineView.node = built.pre;
    if (built.bgClass) { lineView.bgClass = built.bgClass; }
    if (built.textClass) { lineView.textClass = built.textClass; }

    updateLineClasses(cm, lineView);
    updateLineGutter(cm, lineView, lineN, dims);
    insertLineWidgets(cm, lineView, dims);
    return lineView.node
  }

  // A lineView may contain multiple logical lines (when merged by
  // collapsed spans). The widgets for all of them need to be drawn.
  function insertLineWidgets(cm, lineView, dims) {
    insertLineWidgetsFor(cm, lineView.line, lineView, dims, true);
    if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)
      { insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); } }
  }

  function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {
    if (!line.widgets) { return }
    var wrap = ensureLineWrapped(lineView);
    for (var i = 0, ws = line.widgets; i < ws.length; ++i) {
      var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget" + (widget.className ? " " + widget.className : ""));
      if (!widget.handleMouseEvents) { node.setAttribute("cm-ignore-events", "true"); }
      positionLineWidget(widget, node, lineView, dims);
      cm.display.input.setUneditable(node);
      if (allowAbove && widget.above)
        { wrap.insertBefore(node, lineView.gutter || lineView.text); }
      else
        { wrap.appendChild(node); }
      signalLater(widget, "redraw");
    }
  }

  function positionLineWidget(widget, node, lineView, dims) {
    if (widget.noHScroll) {
  (lineView.alignable || (lineView.alignable = [])).push(node);
      var width = dims.wrapperWidth;
      node.style.left = dims.fixedPos + "px";
      if (!widget.coverGutter) {
        width -= dims.gutterTotalWidth;
        node.style.paddingLeft = dims.gutterTotalWidth + "px";
      }
      node.style.width = width + "px";
    }
    if (widget.coverGutter) {
      node.style.zIndex = 5;
      node.style.position = "relative";
      if (!widget.noHScroll) { node.style.marginLeft = -dims.gutterTotalWidth + "px"; }
    }
  }

  function widgetHeight(widget) {
    if (widget.height != null) { return widget.height }
    var cm = widget.doc.cm;
    if (!cm) { return 0 }
    if (!contains(document.body, widget.node)) {
      var parentStyle = "position: relative;";
      if (widget.coverGutter)
        { parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;"; }
      if (widget.noHScroll)
        { parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;"; }
      removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle));
    }
    return widget.height = widget.node.parentNode.offsetHeight
  }

  // Return true when the given mouse event happened in a widget
  function eventInWidget(display, e) {
    for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {
      if (!n || (n.nodeType == 1 && n.getAttribute("cm-ignore-events") == "true") ||
          (n.parentNode == display.sizer && n != display.mover))
        { return true }
    }
  }

  // POSITION MEASUREMENT

  function paddingTop(display) {return display.lineSpace.offsetTop}
  function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight}
  function paddingH(display) {
    if (display.cachedPaddingH) { return display.cachedPaddingH }
    var e = removeChildrenAndAdd(display.measure, elt("pre", "x", "CodeMirror-line-like"));
    var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;
    var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};
    if (!isNaN(data.left) && !isNaN(data.right)) { display.cachedPaddingH = data; }
    return data
  }

  function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth }
  function displayWidth(cm) {
    return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth
  }
  function displayHeight(cm) {
    return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight
  }

  // Ensure the lineView.wrapping.heights array is populated. This is
  // an array of bottom offsets for the lines that make up a drawn
  // line. When lineWrapping is on, there might be more than one
  // height.
  function ensureLineHeights(cm, lineView, rect) {
    var wrapping = cm.options.lineWrapping;
    var curWidth = wrapping && displayWidth(cm);
    if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {
      var heights = lineView.measure.heights = [];
      if (wrapping) {
        lineView.measure.width = curWidth;
        var rects = lineView.text.firstChild.getClientRects();
        for (var i = 0; i < rects.length - 1; i++) {
          var cur = rects[i], next = rects[i + 1];
          if (Math.abs(cur.bottom - next.bottom) > 2)
            { heights.push((cur.bottom + next.top) / 2 - rect.top); }
        }
      }
      heights.push(rect.bottom - rect.top);
    }
  }

  // Find a line map (mapping character offsets to text nodes) and a
  // measurement cache for the given line number. (A line view might
  // contain multiple lines when collapsed ranges are present.)
  function mapFromLineView(lineView, line, lineN) {
    if (lineView.line == line)
      { return {map: lineView.measure.map, cache: lineView.measure.cache} }
    for (var i = 0; i < lineView.rest.length; i++)
      { if (lineView.rest[i] == line)
        { return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]} } }
    for (var i$1 = 0; i$1 < lineView.rest.length; i$1++)
      { if (lineNo(lineView.rest[i$1]) > lineN)
        { return {map: lineView.measure.maps[i$1], cache: lineView.measure.caches[i$1], before: true} } }
  }

  // Render a line into the hidden node display.externalMeasured. Used
  // when measurement is needed for a line that's not in the viewport.
  function updateExternalMeasurement(cm, line) {
    line = visualLine(line);
    var lineN = lineNo(line);
    var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);
    view.lineN = lineN;
    var built = view.built = buildLineContent(cm, view);
    view.text = built.pre;
    removeChildrenAndAdd(cm.display.lineMeasure, built.pre);
    return view
  }

  // Get a {top, bottom, left, right} box (in line-local coordinates)
  // for a given character.
  function measureChar(cm, line, ch, bias) {
    return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias)
  }

  // Find a line view that corresponds to the given line number.
  function findViewForLine(cm, lineN) {
    if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)
      { return cm.display.view[findViewIndex(cm, lineN)] }
    var ext = cm.display.externalMeasured;
    if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)
      { return ext }
  }

  // Measurement can be split in two steps, the set-up work that
  // applies to the whole line, and the measurement of the actual
  // character. Functions like coordsChar, that need to do a lot of
  // measurements in a row, can thus ensure that the set-up work is
  // only done once.
  function prepareMeasureForLine(cm, line) {
    var lineN = lineNo(line);
    var view = findViewForLine(cm, lineN);
    if (view && !view.text) {
      view = null;
    } else if (view && view.changes) {
      updateLineForChanges(cm, view, lineN, getDimensions(cm));
      cm.curOp.forceUpdate = true;
    }
    if (!view)
      { view = updateExternalMeasurement(cm, line); }

    var info = mapFromLineView(view, line, lineN);
    return {
      line: line, view: view, rect: null,
      map: info.map, cache: info.cache, before: info.before,
      hasHeights: false
    }
  }

  // Given a prepared measurement object, measures the position of an
  // actual character (or fetches it from the cache).
  function measureCharPrepared(cm, prepared, ch, bias, varHeight) {
    if (prepared.before) { ch = -1; }
    var key = ch + (bias || ""), found;
    if (prepared.cache.hasOwnProperty(key)) {
      found = prepared.cache[key];
    } else {
      if (!prepared.rect)
        { prepared.rect = prepared.view.text.getBoundingClientRect(); }
      if (!prepared.hasHeights) {
        ensureLineHeights(cm, prepared.view, prepared.rect);
        prepared.hasHeights = true;
      }
      found = measureCharInner(cm, prepared, ch, bias);
      if (!found.bogus) { prepared.cache[key] = found; }
    }
    return {left: found.left, right: found.right,
            top: varHeight ? found.rtop : found.top,
            bottom: varHeight ? found.rbottom : found.bottom}
  }

  var nullRect = {left: 0, right: 0, top: 0, bottom: 0};

  function nodeAndOffsetInLineMap(map, ch, bias) {
    var node, start, end, collapse, mStart, mEnd;
    // First, search the line map for the text node corresponding to,
    // or closest to, the target character.
    for (var i = 0; i < map.length; i += 3) {
      mStart = map[i];
      mEnd = map[i + 1];
      if (ch < mStart) {
        start = 0; end = 1;
        collapse = "left";
      } else if (ch < mEnd) {
        start = ch - mStart;
        end = start + 1;
      } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) {
        end = mEnd - mStart;
        start = end - 1;
        if (ch >= mEnd) { collapse = "right"; }
      }
      if (start != null) {
        node = map[i + 2];
        if (mStart == mEnd && bias == (node.insertLeft ? "left" : "right"))
          { collapse = bias; }
        if (bias == "left" && start == 0)
          { while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) {
            node = map[(i -= 3) + 2];
            collapse = "left";
          } }
        if (bias == "right" && start == mEnd - mStart)
          { while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) {
            node = map[(i += 3) + 2];
            collapse = "right";
          } }
        break
      }
    }
    return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd}
  }

  function getUsefulRect(rects, bias) {
    var rect = nullRect;
    if (bias == "left") { for (var i = 0; i < rects.length; i++) {
      if ((rect = rects[i]).left != rect.right) { break }
    } } else { for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) {
      if ((rect = rects[i$1]).left != rect.right) { break }
    } }
    return rect
  }

  function measureCharInner(cm, prepared, ch, bias) {
    var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);
    var node = place.node, start = place.start, end = place.end, collapse = place.collapse;

    var rect;
    if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.
      for (var i$1 = 0; i$1 < 4; i$1++) { // Retry a maximum of 4 times when nonsense rectangles are returned
        while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) { --start; }
        while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) { ++end; }
        if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart)
          { rect = node.parentNode.getBoundingClientRect(); }
        else
          { rect = getUsefulRect(range(node, start, end).getClientRects(), bias); }
        if (rect.left || rect.right || start == 0) { break }
        end = start;
        start = start - 1;
        collapse = "right";
      }
      if (ie && ie_version < 11) { rect = maybeUpdateRectForZooming(cm.display.measure, rect); }
    } else { // If it is a widget, simply get the box for the whole widget.
      if (start > 0) { collapse = bias = "right"; }
      var rects;
      if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1)
        { rect = rects[bias == "right" ? rects.length - 1 : 0]; }
      else
        { rect = node.getBoundingClientRect(); }
    }
    if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {
      var rSpan = node.parentNode.getClientRects()[0];
      if (rSpan)
        { rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; }
      else
        { rect = nullRect; }
    }

    var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top;
    var mid = (rtop + rbot) / 2;
    var heights = prepared.view.measure.heights;
    var i = 0;
    for (; i < heights.length - 1; i++)
      { if (mid < heights[i]) { break } }
    var top = i ? heights[i - 1] : 0, bot = heights[i];
    var result = {left: (collapse == "right" ? rect.right : rect.left) - prepared.rect.left,
                  right: (collapse == "left" ? rect.left : rect.right) - prepared.rect.left,
                  top: top, bottom: bot};
    if (!rect.left && !rect.right) { result.bogus = true; }
    if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; }

    return result
  }

  // Work around problem with bounding client rects on ranges being
  // returned incorrectly when zoomed on IE10 and below.
  function maybeUpdateRectForZooming(measure, rect) {
    if (!window.screen || screen.logicalXDPI == null ||
        screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))
      { return rect }
    var scaleX = screen.logicalXDPI / screen.deviceXDPI;
    var scaleY = screen.logicalYDPI / screen.deviceYDPI;
    return {left: rect.left * scaleX, right: rect.right * scaleX,
            top: rect.top * scaleY, bottom: rect.bottom * scaleY}
  }

  function clearLineMeasurementCacheFor(lineView) {
    if (lineView.measure) {
      lineView.measure.cache = {};
      lineView.measure.heights = null;
      if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)
        { lineView.measure.caches[i] = {}; } }
    }
  }

  function clearLineMeasurementCache(cm) {
    cm.display.externalMeasure = null;
    removeChildren(cm.display.lineMeasure);
    for (var i = 0; i < cm.display.view.length; i++)
      { clearLineMeasurementCacheFor(cm.display.view[i]); }
  }

  function clearCaches(cm) {
    clearLineMeasurementCache(cm);
    cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;
    if (!cm.options.lineWrapping) { cm.display.maxLineChanged = true; }
    cm.display.lineNumChars = null;
  }

  function pageScrollX() {
    // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206
    // which causes page_Offset and bounding client rects to use
    // different reference viewports and invalidate our calculations.
    if (chrome && android) { return -(document.body.getBoundingClientRect().left - parseInt(getComputedStyle(document.body).marginLeft)) }
    return window.pageXOffset || (document.documentElement || document.body).scrollLeft
  }
  function pageScrollY() {
    if (chrome && android) { return -(document.body.getBoundingClientRect().top - parseInt(getComputedStyle(document.body).marginTop)) }
    return window.pageYOffset || (document.documentElement || document.body).scrollTop
  }

  function widgetTopHeight(lineObj) {
    var height = 0;
    if (lineObj.widgets) { for (var i = 0; i < lineObj.widgets.length; ++i) { if (lineObj.widgets[i].above)
      { height += widgetHeight(lineObj.widgets[i]); } } }
    return height
  }

  // Converts a {top, bottom, left, right} box from line-local
  // coordinates into another coordinate system. Context may be one of
  // "line", "div" (display.lineDiv), "local"./null (editor), "window",
  // or "page".
  function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) {
    if (!includeWidgets) {
      var height = widgetTopHeight(lineObj);
      rect.top += height; rect.bottom += height;
    }
    if (context == "line") { return rect }
    if (!context) { context = "local"; }
    var yOff = heightAtLine(lineObj);
    if (context == "local") { yOff += paddingTop(cm.display); }
    else { yOff -= cm.display.viewOffset; }
    if (context == "page" || context == "window") {
      var lOff = cm.display.lineSpace.getBoundingClientRect();
      yOff += lOff.top + (context == "window" ? 0 : pageScrollY());
      var xOff = lOff.left + (context == "window" ? 0 : pageScrollX());
      rect.left += xOff; rect.right += xOff;
    }
    rect.top += yOff; rect.bottom += yOff;
    return rect
  }

  // Coverts a box from "div" coords to another coordinate system.
  // Context may be "window", "page", "div", or "local"./null.
  function fromCoordSystem(cm, coords, context) {
    if (context == "div") { return coords }
    var left = coords.left, top = coords.top;
    // First move into "page" coordinate system
    if (context == "page") {
      left -= pageScrollX();
      top -= pageScrollY();
    } else if (context == "local" || !context) {
      var localBox = cm.display.sizer.getBoundingClientRect();
      left += localBox.left;
      top += localBox.top;
    }

    var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();
    return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}
  }

  function charCoords(cm, pos, context, lineObj, bias) {
    if (!lineObj) { lineObj = getLine(cm.doc, pos.line); }
    return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context)
  }

  // Returns a box for a given cursor position, which may have an
  // 'other' property containing the position of the secondary cursor
  // on a bidi boundary.
  // A cursor Pos(line, char, "before") is on the same visual line as `char - 1`
  // and after `char - 1` in writing order of `char - 1`
  // A cursor Pos(line, char, "after") is on the same visual line as `char`
  // and before `char` in writing order of `char`
  // Examples (upper-case letters are RTL, lower-case are LTR):
  //     Pos(0, 1, ...)
  //     before   after
  // ab     a|b     a|b
  // aB     a|B     aB|
  // Ab     |Ab     A|b
  // AB     B|A     B|A
  // Every position after the last character on a line is considered to stick
  // to the last character on the line.
  function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {
    lineObj = lineObj || getLine(cm.doc, pos.line);
    if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }
    function get(ch, right) {
      var m = measureCharPrepared(cm, preparedMeasure, ch, right ? "right" : "left", varHeight);
      if (right) { m.left = m.right; } else { m.right = m.left; }
      return intoCoordSystem(cm, lineObj, m, context)
    }
    var order = getOrder(lineObj, cm.doc.direction), ch = pos.ch, sticky = pos.sticky;
    if (ch >= lineObj.text.length) {
      ch = lineObj.text.length;
      sticky = "before";
    } else if (ch <= 0) {
      ch = 0;
      sticky = "after";
    }
    if (!order) { return get(sticky == "before" ? ch - 1 : ch, sticky == "before") }

    function getBidi(ch, partPos, invert) {
      var part = order[partPos], right = part.level == 1;
      return get(invert ? ch - 1 : ch, right != invert)
    }
    var partPos = getBidiPartAt(order, ch, sticky);
    var other = bidiOther;
    var val = getBidi(ch, partPos, sticky == "before");
    if (other != null) { val.other = getBidi(ch, other, sticky != "before"); }
    return val
  }

  // Used to cheaply estimate the coordinates for a position. Used for
  // intermediate scroll updates.
  function estimateCoords(cm, pos) {
    var left = 0;
    pos = clipPos(cm.doc, pos);
    if (!cm.options.lineWrapping) { left = charWidth(cm.display) * pos.ch; }
    var lineObj = getLine(cm.doc, pos.line);
    var top = heightAtLine(lineObj) + paddingTop(cm.display);
    return {left: left, right: left, top: top, bottom: top + lineObj.height}
  }

  // Positions returned by coordsChar contain some extra information.
  // xRel is the relative x position of the input coordinates compared
  // to the found position (so xRel > 0 means the coordinates are to
  // the right of the character position, for example). When outside
  // is true, that means the coordinates lie outside the line's
  // vertical range.
  function PosWithInfo(line, ch, sticky, outside, xRel) {
    var pos = Pos(line, ch, sticky);
    pos.xRel = xRel;
    if (outside) { pos.outside = outside; }
    return pos
  }

  // Compute the character position closest to the given coordinates.
  // Input must be lineSpace-local ("div" coordinate system).
  function coordsChar(cm, x, y) {
    var doc = cm.doc;
    y += cm.display.viewOffset;
    if (y < 0) { return PosWithInfo(doc.first, 0, null, -1, -1) }
    var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1;
    if (lineN > last)
      { return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, 1, 1) }
    if (x < 0) { x = 0; }

    var lineObj = getLine(doc, lineN);
    for (;;) {
      var found = coordsCharInner(cm, lineObj, lineN, x, y);
      var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 || found.outside > 0 ? 1 : 0));
      if (!collapsed) { return found }
      var rangeEnd = collapsed.find(1);
      if (rangeEnd.line == lineN) { return rangeEnd }
      lineObj = getLine(doc, lineN = rangeEnd.line);
    }
  }

  function wrappedLineExtent(cm, lineObj, preparedMeasure, y) {
    y -= widgetTopHeight(lineObj);
    var end = lineObj.text.length;
    var begin = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y; }, end, 0);
    end = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch).top > y; }, begin, end);
    return {begin: begin, end: end}
  }

  function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) {
    if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }
    var targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), "line").top;
    return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop)
  }

  // Returns true if the given side of a box is after the given
  // coordinates, in top-to-bottom, left-to-right order.
  function boxIsAfter(box, x, y, left) {
    return box.bottom <= y ? false : box.top > y ? true : (left ? box.left : box.right) > x
  }

  function coordsCharInner(cm, lineObj, lineNo, x, y) {
    // Move y into line-local coordinate space
    y -= heightAtLine(lineObj);
    var preparedMeasure = prepareMeasureForLine(cm, lineObj);
    // When directly calling `measureCharPrepared`, we have to adjust
    // for the widgets at this line.
    var widgetHeight = widgetTopHeight(lineObj);
    var begin = 0, end = lineObj.text.length, ltr = true;

    var order = getOrder(lineObj, cm.doc.direction);
    // If the line isn't plain left-to-right text, first figure out
    // which bidi section the coordinates fall into.
    if (order) {
      var part = (cm.options.lineWrapping ? coordsBidiPartWrapped : coordsBidiPart)
                   (cm, lineObj, lineNo, preparedMeasure, order, x, y);
      ltr = part.level != 1;
      // The awkward -1 offsets are needed because findFirst (called
      // on these below) will treat its first bound as inclusive,
      // second as exclusive, but we want to actually address the
      // characters in the part's range
      begin = ltr ? part.from : part.to - 1;
      end = ltr ? part.to : part.from - 1;
    }

    // A binary search to find the first character whose bounding box
    // starts after the coordinates. If we run across any whose box wrap
    // the coordinates, store that.
    var chAround = null, boxAround = null;
    var ch = findFirst(function (ch) {
      var box = measureCharPrepared(cm, preparedMeasure, ch);
      box.top += widgetHeight; box.bottom += widgetHeight;
      if (!boxIsAfter(box, x, y, false)) { return false }
      if (box.top <= y && box.left <= x) {
        chAround = ch;
        boxAround = box;
      }
      return true
    }, begin, end);

    var baseX, sticky, outside = false;
    // If a box around the coordinates was found, use that
    if (boxAround) {
      // Distinguish coordinates nearer to the left or right side of the box
      var atLeft = x - boxAround.left < boxAround.right - x, atStart = atLeft == ltr;
      ch = chAround + (atStart ? 0 : 1);
      sticky = atStart ? "after" : "before";
      baseX = atLeft ? boxAround.left : boxAround.right;
    } else {
      // (Adjust for extended bound, if necessary.)
      if (!ltr && (ch == end || ch == begin)) { ch++; }
      // To determine which side to associate with, get the box to the
      // left of the character and compare it's vertical position to the
      // coordinates
      sticky = ch == 0 ? "after" : ch == lineObj.text.length ? "before" :
        (measureCharPrepared(cm, preparedMeasure, ch - (ltr ? 1 : 0)).bottom + widgetHeight <= y) == ltr ?
        "after" : "before";
      // Now get accurate coordinates for this place, in order to get a
      // base X position
      var coords = cursorCoords(cm, Pos(lineNo, ch, sticky), "line", lineObj, preparedMeasure);
      baseX = coords.left;
      outside = y < coords.top ? -1 : y >= coords.bottom ? 1 : 0;
    }

    ch = skipExtendingChars(lineObj.text, ch, 1);
    return PosWithInfo(lineNo, ch, sticky, outside, x - baseX)
  }

  function coordsBidiPart(cm, lineObj, lineNo, preparedMeasure, order, x, y) {
    // Bidi parts are sorted left-to-right, and in a non-line-wrapping
    // situation, we can take this ordering to correspond to the visual
    // ordering. This finds the first part whose end is after the given
    // coordinates.
    var index = findFirst(function (i) {
      var part = order[i], ltr = part.level != 1;
      return boxIsAfter(cursorCoords(cm, Pos(lineNo, ltr ? part.to : part.from, ltr ? "before" : "after"),
                                     "line", lineObj, preparedMeasure), x, y, true)
    }, 0, order.length - 1);
    var part = order[index];
    // If this isn't the first part, the part's start is also after
    // the coordinates, and the coordinates aren't on the same line as
    // that start, move one part back.
    if (index > 0) {
      var ltr = part.level != 1;
      var start = cursorCoords(cm, Pos(lineNo, ltr ? part.from : part.to, ltr ? "after" : "before"),
                               "line", lineObj, preparedMeasure);
      if (boxIsAfter(start, x, y, true) && start.top > y)
        { part = order[index - 1]; }
    }
    return part
  }

  function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) {
    // In a wrapped line, rtl text on wrapping boundaries can do things
    // that don't correspond to the ordering in our `order` array at
    // all, so a binary search doesn't work, and we want to return a
    // part that only spans one line so that the binary search in
    // coordsCharInner is safe. As such, we first find the extent of the
    // wrapped line, and then do a flat search in which we discard any
    // spans that aren't on the line.
    var ref = wrappedLineExtent(cm, lineObj, preparedMeasure, y);
    var begin = ref.begin;
    var end = ref.end;
    if (/\s/.test(lineObj.text.charAt(end - 1))) { end--; }
    var part = null, closestDist = null;
    for (var i = 0; i < order.length; i++) {
      var p = order[i];
      if (p.from >= end || p.to <= begin) { continue }
      var ltr = p.level != 1;
      var endX = measureCharPrepared(cm, preparedMeasure, ltr ? Math.min(end, p.to) - 1 : Math.max(begin, p.from)).right;
      // Weigh against spans ending before this, so that they are only
      // picked if nothing ends after
      var dist = endX < x ? x - endX + 1e9 : endX - x;
      if (!part || closestDist > dist) {
        part = p;
        closestDist = dist;
      }
    }
    if (!part) { part = order[order.length - 1]; }
    // Clip the part to the wrapped line.
    if (part.from < begin) { part = {from: begin, to: part.to, level: part.level}; }
    if (part.to > end) { part = {from: part.from, to: end, level: part.level}; }
    return part
  }

  var measureText;
  // Compute the default text height.
  function textHeight(display) {
    if (display.cachedTextHeight != null) { return display.cachedTextHeight }
    if (measureText == null) {
      measureText = elt("pre", null, "CodeMirror-line-like");
      // Measure a bunch of lines, for browsers that compute
      // fractional heights.
      for (var i = 0; i < 49; ++i) {
        measureText.appendChild(document.createTextNode("x"));
        measureText.appendChild(elt("br"));
      }
      measureText.appendChild(document.createTextNode("x"));
    }
    removeChildrenAndAdd(display.measure, measureText);
    var height = measureText.offsetHeight / 50;
    if (height > 3) { display.cachedTextHeight = height; }
    removeChildren(display.measure);
    return height || 1
  }

  // Compute the default character width.
  function charWidth(display) {
    if (display.cachedCharWidth != null) { return display.cachedCharWidth }
    var anchor = elt("span", "xxxxxxxxxx");
    var pre = elt("pre", [anchor], "CodeMirror-line-like");
    removeChildrenAndAdd(display.measure, pre);
    var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;
    if (width > 2) { display.cachedCharWidth = width; }
    return width || 10
  }

  // Do a bulk-read of the DOM positions and sizes needed to draw the
  // view, so that we don't interleave reading and writing to the DOM.
  function getDimensions(cm) {
    var d = cm.display, left = {}, width = {};
    var gutterLeft = d.gutters.clientLeft;
    for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {
      var id = cm.display.gutterSpecs[i].className;
      left[id] = n.offsetLeft + n.clientLeft + gutterLeft;
      width[id] = n.clientWidth;
    }
    return {fixedPos: compensateForHScroll(d),
            gutterTotalWidth: d.gutters.offsetWidth,
            gutterLeft: left,
            gutterWidth: width,
            wrapperWidth: d.wrapper.clientWidth}
  }

  // Computes display.scroller.scrollLeft + display.gutters.offsetWidth,
  // but using getBoundingClientRect to get a sub-pixel-accurate
  // result.
  function compensateForHScroll(display) {
    return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left
  }

  // Returns a function that estimates the height of a line, to use as
  // first approximation until the line becomes visible (and is thus
  // properly measurable).
  function estimateHeight(cm) {
    var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;
    var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);
    return function (line) {
      if (lineIsHidden(cm.doc, line)) { return 0 }

      var widgetsHeight = 0;
      if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {
        if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }
      } }

      if (wrapping)
        { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }
      else
        { return widgetsHeight + th }
    }
  }

  function estimateLineHeights(cm) {
    var doc = cm.doc, est = estimateHeight(cm);
    doc.iter(function (line) {
      var estHeight = est(line);
      if (estHeight != line.height) { updateLineHeight(line, estHeight); }
    });
  }

  // Given a mouse event, find the corresponding position. If liberal
  // is false, it checks whether a gutter or scrollbar was clicked,
  // and returns null if it was. forRect is used by rectangular
  // selections, and tries to estimate a character position even for
  // coordinates beyond the right of the text.
  function posFromMouse(cm, e, liberal, forRect) {
    var display = cm.display;
    if (!liberal && e_target(e).getAttribute("cm-not-content") == "true") { return null }

    var x, y, space = display.lineSpace.getBoundingClientRect();
    // Fails unpredictably on IE[67] when mouse is dragged around quickly.
    try { x = e.clientX - space.left; y = e.clientY - space.top; }
    catch (e$1) { return null }
    var coords = coordsChar(cm, x, y), line;
    if (forRect && coords.xRel > 0 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {
      var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;
      coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));
    }
    return coords
  }

  // Find the view element corresponding to a given line. Return null
  // when the line isn't visible.
  function findViewIndex(cm, n) {
    if (n >= cm.display.viewTo) { return null }
    n -= cm.display.viewFrom;
    if (n < 0) { return null }
    var view = cm.display.view;
    for (var i = 0; i < view.length; i++) {
      n -= view[i].size;
      if (n < 0) { return i }
    }
  }

  // Updates the display.view data structure for a given change to the
  // document. From and to are in pre-change coordinates. Lendiff is
  // the amount of lines added or subtracted by the change. This is
  // used for changes that span multiple lines, or change the way
  // lines are divided into visual lines. regLineChange (below)
  // registers single-line changes.
  function regChange(cm, from, to, lendiff) {
    if (from == null) { from = cm.doc.first; }
    if (to == null) { to = cm.doc.first + cm.doc.size; }
    if (!lendiff) { lendiff = 0; }

    var display = cm.display;
    if (lendiff && to < display.viewTo &&
        (display.updateLineNumbers == null || display.updateLineNumbers > from))
      { display.updateLineNumbers = from; }

    cm.curOp.viewChanged = true;

    if (from >= display.viewTo) { // Change after
      if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo)
        { resetView(cm); }
    } else if (to <= display.viewFrom) { // Change before
      if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {
        resetView(cm);
      } else {
        display.viewFrom += lendiff;
        display.viewTo += lendiff;
      }
    } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap
      resetView(cm);
    } else if (from <= display.viewFrom) { // Top overlap
      var cut = viewCuttingPoint(cm, to, to + lendiff, 1);
      if (cut) {
        display.view = display.view.slice(cut.index);
        display.viewFrom = cut.lineN;
        display.viewTo += lendiff;
      } else {
        resetView(cm);
      }
    } else if (to >= display.viewTo) { // Bottom overlap
      var cut$1 = viewCuttingPoint(cm, from, from, -1);
      if (cut$1) {
        display.view = display.view.slice(0, cut$1.index);
        display.viewTo = cut$1.lineN;
      } else {
        resetView(cm);
      }
    } else { // Gap in the middle
      var cutTop = viewCuttingPoint(cm, from, from, -1);
      var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1);
      if (cutTop && cutBot) {
        display.view = display.view.slice(0, cutTop.index)
          .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN))
          .concat(display.view.slice(cutBot.index));
        display.viewTo += lendiff;
      } else {
        resetView(cm);
      }
    }

    var ext = display.externalMeasured;
    if (ext) {
      if (to < ext.lineN)
        { ext.lineN += lendiff; }
      else if (from < ext.lineN + ext.size)
        { display.externalMeasured = null; }
    }
  }

  // Register a change to a single line. Type must be one of "text",
  // "gutter", "class", "widget"
  function regLineChange(cm, line, type) {
    cm.curOp.viewChanged = true;
    var display = cm.display, ext = cm.display.externalMeasured;
    if (ext && line >= ext.lineN && line < ext.lineN + ext.size)
      { display.externalMeasured = null; }

    if (line < display.viewFrom || line >= display.viewTo) { return }
    var lineView = display.view[findViewIndex(cm, line)];
    if (lineView.node == null) { return }
    var arr = lineView.changes || (lineView.changes = []);
    if (indexOf(arr, type) == -1) { arr.push(type); }
  }

  // Clear the view.
  function resetView(cm) {
    cm.display.viewFrom = cm.display.viewTo = cm.doc.first;
    cm.display.view = [];
    cm.display.viewOffset = 0;
  }

  function viewCuttingPoint(cm, oldN, newN, dir) {
    var index = findViewIndex(cm, oldN), diff, view = cm.display.view;
    if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size)
      { return {index: index, lineN: newN} }
    var n = cm.display.viewFrom;
    for (var i = 0; i < index; i++)
      { n += view[i].size; }
    if (n != oldN) {
      if (dir > 0) {
        if (index == view.length - 1) { return null }
        diff = (n + view[index].size) - oldN;
        index++;
      } else {
        diff = n - oldN;
      }
      oldN += diff; newN += diff;
    }
    while (visualLineNo(cm.doc, newN) != newN) {
      if (index == (dir < 0 ? 0 : view.length - 1)) { return null }
      newN += dir * view[index - (dir < 0 ? 1 : 0)].size;
      index += dir;
    }
    return {index: index, lineN: newN}
  }

  // Force the view to cover a given range, adding empty view element
  // or clipping off existing ones as needed.
  function adjustView(cm, from, to) {
    var display = cm.display, view = display.view;
    if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) {
      display.view = buildViewArray(cm, from, to);
      display.viewFrom = from;
    } else {
      if (display.viewFrom > from)
        { display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); }
      else if (display.viewFrom < from)
        { display.view = display.view.slice(findViewIndex(cm, from)); }
      display.viewFrom = from;
      if (display.viewTo < to)
        { display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); }
      else if (display.viewTo > to)
        { display.view = display.view.slice(0, findViewIndex(cm, to)); }
    }
    display.viewTo = to;
  }

  // Count the number of lines in the view whose DOM representation is
  // out of date (or nonexistent).
  function countDirtyView(cm) {
    var view = cm.display.view, dirty = 0;
    for (var i = 0; i < view.length; i++) {
      var lineView = view[i];
      if (!lineView.hidden && (!lineView.node || lineView.changes)) { ++dirty; }
    }
    return dirty
  }

  function updateSelection(cm) {
    cm.display.input.showSelection(cm.display.input.prepareSelection());
  }

  function prepareSelection(cm, primary) {
    if ( primary === void 0 ) primary = true;

    var doc = cm.doc, result = {};
    var curFragment = result.cursors = document.createDocumentFragment();
    var selFragment = result.selection = document.createDocumentFragment();

    for (var i = 0; i < doc.sel.ranges.length; i++) {
      if (!primary && i == doc.sel.primIndex) { continue }
      var range = doc.sel.ranges[i];
      if (range.from().line >= cm.display.viewTo || range.to().line < cm.display.viewFrom) { continue }
      var collapsed = range.empty();
      if (collapsed || cm.options.showCursorWhenSelecting)
        { drawSelectionCursor(cm, range.head, curFragment); }
      if (!collapsed)
        { drawSelectionRange(cm, range, selFragment); }
    }
    return result
  }

  // Draws a cursor for the given range
  function drawSelectionCursor(cm, head, output) {
    var pos = cursorCoords(cm, head, "div", null, null, !cm.options.singleCursorHeightPerLine);

    var cursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor"));
    cursor.style.left = pos.left + "px";
    cursor.style.top = pos.top + "px";
    cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px";

    if (pos.other) {
      // Secondary cursor, shown when on a 'jump' in bi-directional text
      var otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor"));
      otherCursor.style.display = "";
      otherCursor.style.left = pos.other.left + "px";
      otherCursor.style.top = pos.other.top + "px";
      otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px";
    }
  }

  function cmpCoords(a, b) { return a.top - b.top || a.left - b.left }

  // Draws the given range as a highlighted selection
  function drawSelectionRange(cm, range, output) {
    var display = cm.display, doc = cm.doc;
    var fragment = document.createDocumentFragment();
    var padding = paddingH(cm.display), leftSide = padding.left;
    var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;
    var docLTR = doc.direction == "ltr";

    function add(left, top, width, bottom) {
      if (top < 0) { top = 0; }
      top = Math.round(top);
      bottom = Math.round(bottom);
      fragment.appendChild(elt("div", null, "CodeMirror-selected", ("position: absolute; left: " + left + "px;\n                             top: " + top + "px; width: " + (width == null ? rightSide - left : width) + "px;\n                             height: " + (bottom - top) + "px")));
    }

    function drawForLine(line, fromArg, toArg) {
      var lineObj = getLine(doc, line);
      var lineLen = lineObj.text.length;
      var start, end;
      function coords(ch, bias) {
        return charCoords(cm, Pos(line, ch), "div", lineObj, bias)
      }

      function wrapX(pos, dir, side) {
        var extent = wrappedLineExtentChar(cm, lineObj, null, pos);
        var prop = (dir == "ltr") == (side == "after") ? "left" : "right";
        var ch = side == "after" ? extent.begin : extent.end - (/\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);
        return coords(ch, prop)[prop]
      }

      var order = getOrder(lineObj, doc.direction);
      iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {
        var ltr = dir == "ltr";
        var fromPos = coords(from, ltr ? "left" : "right");
        var toPos = coords(to - 1, ltr ? "right" : "left");

        var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;
        var first = i == 0, last = !order || i == order.length - 1;
        if (toPos.top - fromPos.top <= 3) { // Single line
          var openLeft = (docLTR ? openStart : openEnd) && first;
          var openRight = (docLTR ? openEnd : openStart) && last;
          var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;
          var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;
          add(left, fromPos.top, right - left, fromPos.bottom);
        } else { // Multiple lines
          var topLeft, topRight, botLeft, botRight;
          if (ltr) {
            topLeft = docLTR && openStart && first ? leftSide : fromPos.left;
            topRight = docLTR ? rightSide : wrapX(from, dir, "before");
            botLeft = docLTR ? leftSide : wrapX(to, dir, "after");
            botRight = docLTR && openEnd && last ? rightSide : toPos.right;
          } else {
            topLeft = !docLTR ? leftSide : wrapX(from, dir, "before");
            topRight = !docLTR && openStart && first ? rightSide : fromPos.right;
            botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;
            botRight = !docLTR ? rightSide : wrapX(to, dir, "after");
          }
          add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);
          if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }
          add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);
        }

        if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }
        if (cmpCoords(toPos, start) < 0) { start = toPos; }
        if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }
        if (cmpCoords(toPos, end) < 0) { end = toPos; }
      });
      return {start: start, end: end}
    }

    var sFrom = range.from(), sTo = range.to();
    if (sFrom.line == sTo.line) {
      drawForLine(sFrom.line, sFrom.ch, sTo.ch);
    } else {
      var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);
      var singleVLine = visualLine(fromLine) == visualLine(toLine);
      var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;
      var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;
      if (singleVLine) {
        if (leftEnd.top < rightStart.top - 2) {
          add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);
          add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);
        } else {
          add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);
        }
      }
      if (leftEnd.bottom < rightStart.top)
        { add(leftSide, leftEnd.bottom, null, rightStart.top); }
    }

    output.appendChild(fragment);
  }

  // Cursor-blinking
  function restartBlink(cm) {
    if (!cm.state.focused) { return }
    var display = cm.display;
    clearInterval(display.blinker);
    var on = true;
    display.cursorDiv.style.visibility = "";
    if (cm.options.cursorBlinkRate > 0)
      { display.blinker = setInterval(function () {
        if (!cm.hasFocus()) { onBlur(cm); }
        display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden";
      }, cm.options.cursorBlinkRate); }
    else if (cm.options.cursorBlinkRate < 0)
      { display.cursorDiv.style.visibility = "hidden"; }
  }

  function ensureFocus(cm) {
    if (!cm.hasFocus()) {
      cm.display.input.focus();
      if (!cm.state.focused) { onFocus(cm); }
    }
  }

  function delayBlurEvent(cm) {
    cm.state.delayingBlurEvent = true;
    setTimeout(function () { if (cm.state.delayingBlurEvent) {
      cm.state.delayingBlurEvent = false;
      if (cm.state.focused) { onBlur(cm); }
    } }, 100);
  }

  function onFocus(cm, e) {
    if (cm.state.delayingBlurEvent && !cm.state.draggingText) { cm.state.delayingBlurEvent = false; }

    if (cm.options.readOnly == "nocursor") { return }
    if (!cm.state.focused) {
      signal(cm, "focus", cm, e);
      cm.state.focused = true;
      addClass(cm.display.wrapper, "CodeMirror-focused");
      // This test prevents this from firing when a context
      // menu is closed (since the input reset would kill the
      // select-all detection hack)
      if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {
        cm.display.input.reset();
        if (webkit) { setTimeout(function () { return cm.display.input.reset(true); }, 20); } // Issue #1730
      }
      cm.display.input.receivedFocus();
    }
    restartBlink(cm);
  }
  function onBlur(cm, e) {
    if (cm.state.delayingBlurEvent) { return }

    if (cm.state.focused) {
      signal(cm, "blur", cm, e);
      cm.state.focused = false;
      rmClass(cm.display.wrapper, "CodeMirror-focused");
    }
    clearInterval(cm.display.blinker);
    setTimeout(function () { if (!cm.state.focused) { cm.display.shift = false; } }, 150);
  }

  // Read the actual heights of the rendered lines, and update their
  // stored heights to match.
  function updateHeightsInViewport(cm) {
    var display = cm.display;
    var prevBottom = display.lineDiv.offsetTop;
    for (var i = 0; i < display.view.length; i++) {
      var cur = display.view[i], wrapping = cm.options.lineWrapping;
      var height = (void 0), width = 0;
      if (cur.hidden) { continue }
      if (ie && ie_version < 8) {
        var bot = cur.node.offsetTop + cur.node.offsetHeight;
        height = bot - prevBottom;
        prevBottom = bot;
      } else {
        var box = cur.node.getBoundingClientRect();
        height = box.bottom - box.top;
        // Check that lines don't extend past the right of the current
        // editor width
        if (!wrapping && cur.text.firstChild)
          { width = cur.text.firstChild.getBoundingClientRect().right - box.left - 1; }
      }
      var diff = cur.line.height - height;
      if (diff > .005 || diff < -.005) {
        updateLineHeight(cur.line, height);
        updateWidgetHeight(cur.line);
        if (cur.rest) { for (var j = 0; j < cur.rest.length; j++)
          { updateWidgetHeight(cur.rest[j]); } }
      }
      if (width > cm.display.sizerWidth) {
        var chWidth = Math.ceil(width / charWidth(cm.display));
        if (chWidth > cm.display.maxLineLength) {
          cm.display.maxLineLength = chWidth;
          cm.display.maxLine = cur.line;
          cm.display.maxLineChanged = true;
        }
      }
    }
  }

  // Read and store the height of line widgets associated with the
  // given line.
  function updateWidgetHeight(line) {
    if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {
      var w = line.widgets[i], parent = w.node.parentNode;
      if (parent) { w.height = parent.offsetHeight; }
    } }
  }

  // Compute the lines that are visible in a given viewport (defaults
  // the the current scroll position). viewport may contain top,
  // height, and ensure (see op.scrollToPos) properties.
  function visibleLines(display, doc, viewport) {
    var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;
    top = Math.floor(top - paddingTop(display));
    var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;

    var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom);
    // Ensure is a {from: {line, ch}, to: {line, ch}} object, and
    // forces those lines into the viewport (if possible).
    if (viewport && viewport.ensure) {
      var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line;
      if (ensureFrom < from) {
        from = ensureFrom;
        to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight);
      } else if (Math.min(ensureTo, doc.lastLine()) >= to) {
        from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight);
        to = ensureTo;
      }
    }
    return {from: from, to: Math.max(to, from + 1)}
  }

  // SCROLLING THINGS INTO VIEW

  // If an editor sits on the top or bottom of the window, partially
  // scrolled out of view, this ensures that the cursor is visible.
  function maybeScrollWindow(cm, rect) {
    if (signalDOMEvent(cm, "scrollCursorIntoView")) { return }

    var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;
    if (rect.top + box.top < 0) { doScroll = true; }
    else if (rect.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) { doScroll = false; }
    if (doScroll != null && !phantom) {
      var scrollNode = elt("div", "\u200b", null, ("position: absolute;\n                         top: " + (rect.top - display.viewOffset - paddingTop(cm.display)) + "px;\n                         height: " + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + "px;\n                         left: " + (rect.left) + "px; width: " + (Math.max(2, rect.right - rect.left)) + "px;"));
      cm.display.lineSpace.appendChild(scrollNode);
      scrollNode.scrollIntoView(doScroll);
      cm.display.lineSpace.removeChild(scrollNode);
    }
  }

  // Scroll a given position into view (immediately), verifying that
  // it actually became visible (as line heights are accurately
  // measured, the position of something may 'drift' during drawing).
  function scrollPosIntoView(cm, pos, end, margin) {
    if (margin == null) { margin = 0; }
    var rect;
    if (!cm.options.lineWrapping && pos == end) {
      // Set pos and end to the cursor positions around the character pos sticks to
      // If pos.sticky == "before", that is around pos.ch - 1, otherwise around pos.ch
      // If pos == Pos(_, 0, "before"), pos and end are unchanged
      pos = pos.ch ? Pos(pos.line, pos.sticky == "before" ? pos.ch - 1 : pos.ch, "after") : pos;
      end = pos.sticky == "before" ? Pos(pos.line, pos.ch + 1, "before") : pos;
    }
    for (var limit = 0; limit < 5; limit++) {
      var changed = false;
      var coords = cursorCoords(cm, pos);
      var endCoords = !end || end == pos ? coords : cursorCoords(cm, end);
      rect = {left: Math.min(coords.left, endCoords.left),
              top: Math.min(coords.top, endCoords.top) - margin,
              right: Math.max(coords.left, endCoords.left),
              bottom: Math.max(coords.bottom, endCoords.bottom) + margin};
      var scrollPos = calculateScrollPos(cm, rect);
      var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;
      if (scrollPos.scrollTop != null) {
        updateScrollTop(cm, scrollPos.scrollTop);
        if (Math.abs(cm.doc.scrollTop - startTop) > 1) { changed = true; }
      }
      if (scrollPos.scrollLeft != null) {
        setScrollLeft(cm, scrollPos.scrollLeft);
        if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { changed = true; }
      }
      if (!changed) { break }
    }
    return rect
  }

  // Scroll a given set of coordinates into view (immediately).
  function scrollIntoView(cm, rect) {
    var scrollPos = calculateScrollPos(cm, rect);
    if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }
    if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }
  }

  // Calculate a new scroll position needed to scroll the given
  // rectangle into view. Returns an object with scrollTop and
  // scrollLeft properties. When these are undefined, the
  // vertical/horizontal position does not need to be adjusted.
  function calculateScrollPos(cm, rect) {
    var display = cm.display, snapMargin = textHeight(cm.display);
    if (rect.top < 0) { rect.top = 0; }
    var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;
    var screen = displayHeight(cm), result = {};
    if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }
    var docBottom = cm.doc.height + paddingVert(display);
    var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;
    if (rect.top < screentop) {
      result.scrollTop = atTop ? 0 : rect.top;
    } else if (rect.bottom > screentop + screen) {
      var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);
      if (newTop != screentop) { result.scrollTop = newTop; }
    }

    var gutterSpace = cm.options.fixedGutter ? 0 : display.gutters.offsetWidth;
    var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft - gutterSpace;
    var screenw = displayWidth(cm) - display.gutters.offsetWidth;
    var tooWide = rect.right - rect.left > screenw;
    if (tooWide) { rect.right = rect.left + screenw; }
    if (rect.left < 10)
      { result.scrollLeft = 0; }
    else if (rect.left < screenleft)
      { result.scrollLeft = Math.max(0, rect.left + gutterSpace - (tooWide ? 0 : 10)); }
    else if (rect.right > screenw + screenleft - 3)
      { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }
    return result
  }

  // Store a relative adjustment to the scroll position in the current
  // operation (to be applied when the operation finishes).
  function addToScrollTop(cm, top) {
    if (top == null) { return }
    resolveScrollToPos(cm);
    cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top;
  }

  // Make sure that at the end of the operation the current cursor is
  // shown.
  function ensureCursorVisible(cm) {
    resolveScrollToPos(cm);
    var cur = cm.getCursor();
    cm.curOp.scrollToPos = {from: cur, to: cur, margin: cm.options.cursorScrollMargin};
  }

  function scrollToCoords(cm, x, y) {
    if (x != null || y != null) { resolveScrollToPos(cm); }
    if (x != null) { cm.curOp.scrollLeft = x; }
    if (y != null) { cm.curOp.scrollTop = y; }
  }

  function scrollToRange(cm, range) {
    resolveScrollToPos(cm);
    cm.curOp.scrollToPos = range;
  }

  // When an operation has its scrollToPos property set, and another
  // scroll action is applied before the end of the operation, this
  // 'simulates' scrolling that position into view in a cheap way, so
  // that the effect of intermediate scroll commands is not ignored.
  function resolveScrollToPos(cm) {
    var range = cm.curOp.scrollToPos;
    if (range) {
      cm.curOp.scrollToPos = null;
      var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);
      scrollToCoordsRange(cm, from, to, range.margin);
    }
  }

  function scrollToCoordsRange(cm, from, to, margin) {
    var sPos = calculateScrollPos(cm, {
      left: Math.min(from.left, to.left),
      top: Math.min(from.top, to.top) - margin,
      right: Math.max(from.right, to.right),
      bottom: Math.max(from.bottom, to.bottom) + margin
    });
    scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop);
  }

  // Sync the scrollable area and scrollbars, ensure the viewport
  // covers the visible area.
  function updateScrollTop(cm, val) {
    if (Math.abs(cm.doc.scrollTop - val) < 2) { return }
    if (!gecko) { updateDisplaySimple(cm, {top: val}); }
    setScrollTop(cm, val, true);
    if (gecko) { updateDisplaySimple(cm); }
    startWorker(cm, 100);
  }

  function setScrollTop(cm, val, forceScroll) {
    val = Math.max(0, Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val));
    if (cm.display.scroller.scrollTop == val && !forceScroll) { return }
    cm.doc.scrollTop = val;
    cm.display.scrollbars.setScrollTop(val);
    if (cm.display.scroller.scrollTop != val) { cm.display.scroller.scrollTop = val; }
  }

  // Sync scroller and scrollbar, ensure the gutter elements are
  // aligned.
  function setScrollLeft(cm, val, isScroller, forceScroll) {
    val = Math.max(0, Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth));
    if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) { return }
    cm.doc.scrollLeft = val;
    alignHorizontally(cm);
    if (cm.display.scroller.scrollLeft != val) { cm.display.scroller.scrollLeft = val; }
    cm.display.scrollbars.setScrollLeft(val);
  }

  // SCROLLBARS

  // Prepare DOM reads needed to update the scrollbars. Done in one
  // shot to minimize update/measure roundtrips.
  function measureForScrollbars(cm) {
    var d = cm.display, gutterW = d.gutters.offsetWidth;
    var docH = Math.round(cm.doc.height + paddingVert(cm.display));
    return {
      clientHeight: d.scroller.clientHeight,
      viewHeight: d.wrapper.clientHeight,
      scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,
      viewWidth: d.wrapper.clientWidth,
      barLeft: cm.options.fixedGutter ? gutterW : 0,
      docHeight: docH,
      scrollHeight: docH + scrollGap(cm) + d.barHeight,
      nativeBarWidth: d.nativeBarWidth,
      gutterWidth: gutterW
    }
  }

  var NativeScrollbars = function(place, scroll, cm) {
    this.cm = cm;
    var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar");
    var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar");
    vert.tabIndex = horiz.tabIndex = -1;
    place(vert); place(horiz);

    on(vert, "scroll", function () {
      if (vert.clientHeight) { scroll(vert.scrollTop, "vertical"); }
    });
    on(horiz, "scroll", function () {
      if (horiz.clientWidth) { scroll(horiz.scrollLeft, "horizontal"); }
    });

    this.checkedZeroWidth = false;
    // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).
    if (ie && ie_version < 8) { this.horiz.style.minHeight = this.vert.style.minWidth = "18px"; }
  };

  NativeScrollbars.prototype.update = function (measure) {
    var needsH = measure.scrollWidth > measure.clientWidth + 1;
    var needsV = measure.scrollHeight > measure.clientHeight + 1;
    var sWidth = measure.nativeBarWidth;

    if (needsV) {
      this.vert.style.display = "block";
      this.vert.style.bottom = needsH ? sWidth + "px" : "0";
      var totalHeight = measure.viewHeight - (needsH ? sWidth : 0);
      // A bug in IE8 can cause this value to be negative, so guard it.
      this.vert.firstChild.style.height =
        Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px";
    } else {
      this.vert.style.display = "";
      this.vert.firstChild.style.height = "0";
    }

    if (needsH) {
      this.horiz.style.display = "block";
      this.horiz.style.right = needsV ? sWidth + "px" : "0";
      this.horiz.style.left = measure.barLeft + "px";
      var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0);
      this.horiz.firstChild.style.width =
        Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + "px";
    } else {
      this.horiz.style.display = "";
      this.horiz.firstChild.style.width = "0";
    }

    if (!this.checkedZeroWidth && measure.clientHeight > 0) {
      if (sWidth == 0) { this.zeroWidthHack(); }
      this.checkedZeroWidth = true;
    }

    return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0}
  };

  NativeScrollbars.prototype.setScrollLeft = function (pos) {
    if (this.horiz.scrollLeft != pos) { this.horiz.scrollLeft = pos; }
    if (this.disableHoriz) { this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz"); }
  };

  NativeScrollbars.prototype.setScrollTop = function (pos) {
    if (this.vert.scrollTop != pos) { this.vert.scrollTop = pos; }
    if (this.disableVert) { this.enableZeroWidthBar(this.vert, this.disableVert, "vert"); }
  };

  NativeScrollbars.prototype.zeroWidthHack = function () {
    var w = mac && !mac_geMountainLion ? "12px" : "18px";
    this.horiz.style.height = this.vert.style.width = w;
    this.horiz.style.pointerEvents = this.vert.style.pointerEvents = "none";
    this.disableHoriz = new Delayed;
    this.disableVert = new Delayed;
  };

  NativeScrollbars.prototype.enableZeroWidthBar = function (bar, delay, type) {
    bar.style.pointerEvents = "auto";
    function maybeDisable() {
      // To find out whether the scrollbar is still visible, we
      // check whether the element under the pixel in the bottom
      // right corner of the scrollbar box is the scrollbar box
      // itself (when the bar is still visible) or its filler child
      // (when the bar is hidden). If it is still visible, we keep
      // it enabled, if it's hidden, we disable pointer events.
      var box = bar.getBoundingClientRect();
      var elt = type == "vert" ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2)
          : document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1);
      if (elt != bar) { bar.style.pointerEvents = "none"; }
      else { delay.set(1000, maybeDisable); }
    }
    delay.set(1000, maybeDisable);
  };

  NativeScrollbars.prototype.clear = function () {
    var parent = this.horiz.parentNode;
    parent.removeChild(this.horiz);
    parent.removeChild(this.vert);
  };

  var NullScrollbars = function () {};

  NullScrollbars.prototype.update = function () { return {bottom: 0, right: 0} };
  NullScrollbars.prototype.setScrollLeft = function () {};
  NullScrollbars.prototype.setScrollTop = function () {};
  NullScrollbars.prototype.clear = function () {};

  function updateScrollbars(cm, measure) {
    if (!measure) { measure = measureForScrollbars(cm); }
    var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight;
    updateScrollbarsInner(cm, measure);
    for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {
      if (startWidth != cm.display.barWidth && cm.options.lineWrapping)
        { updateHeightsInViewport(cm); }
      updateScrollbarsInner(cm, measureForScrollbars(cm));
      startWidth = cm.display.barWidth; startHeight = cm.display.barHeight;
    }
  }

  // Re-synchronize the fake scrollbars with the actual size of the
  // content.
  function updateScrollbarsInner(cm, measure) {
    var d = cm.display;
    var sizes = d.scrollbars.update(measure);

    d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px";
    d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px";
    d.heightForcer.style.borderBottom = sizes.bottom + "px solid transparent";

    if (sizes.right && sizes.bottom) {
      d.scrollbarFiller.style.display = "block";
      d.scrollbarFiller.style.height = sizes.bottom + "px";
      d.scrollbarFiller.style.width = sizes.right + "px";
    } else { d.scrollbarFiller.style.display = ""; }
    if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {
      d.gutterFiller.style.display = "block";
      d.gutterFiller.style.height = sizes.bottom + "px";
      d.gutterFiller.style.width = measure.gutterWidth + "px";
    } else { d.gutterFiller.style.display = ""; }
  }

  var scrollbarModel = {"native": NativeScrollbars, "null": NullScrollbars};

  function initScrollbars(cm) {
    if (cm.display.scrollbars) {
      cm.display.scrollbars.clear();
      if (cm.display.scrollbars.addClass)
        { rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); }
    }

    cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](function (node) {
      cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);
      // Prevent clicks in the scrollbars from killing focus
      on(node, "mousedown", function () {
        if (cm.state.focused) { setTimeout(function () { return cm.display.input.focus(); }, 0); }
      });
      node.setAttribute("cm-not-content", "true");
    }, function (pos, axis) {
      if (axis == "horizontal") { setScrollLeft(cm, pos); }
      else { updateScrollTop(cm, pos); }
    }, cm);
    if (cm.display.scrollbars.addClass)
      { addClass(cm.display.wrapper, cm.display.scrollbars.addClass); }
  }

  // Operations are used to wrap a series of changes to the editor
  // state in such a way that each change won't have to update the
  // cursor and display (which would be awkward, slow, and
  // error-prone). Instead, display updates are batched and then all
  // combined and executed at once.

  var nextOpId = 0;
  // Start a new operation.
  function startOperation(cm) {
    cm.curOp = {
      cm: cm,
      viewChanged: false,      // Flag that indicates that lines might need to be redrawn
      startHeight: cm.doc.height, // Used to detect need to update scrollbar
      forceUpdate: false,      // Used to force a redraw
      updateInput: 0,       // Whether to reset the input textarea
      typing: false,           // Whether this reset should be careful to leave existing text (for compositing)
      changeObjs: null,        // Accumulated changes, for firing change events
      cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on
      cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already
      selectionChanged: false, // Whether the selection needs to be redrawn
      updateMaxLine: false,    // Set when the widest line needs to be determined anew
      scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet
      scrollToPos: null,       // Used to scroll to a specific position
      focus: false,
      id: ++nextOpId           // Unique ID
    };
    pushOperation(cm.curOp);
  }

  // Finish an operation, updating the display and signalling delayed events
  function endOperation(cm) {
    var op = cm.curOp;
    if (op) { finishOperation(op, function (group) {
      for (var i = 0; i < group.ops.length; i++)
        { group.ops[i].cm.curOp = null; }
      endOperations(group);
    }); }
  }

  // The DOM updates done when an operation finishes are batched so
  // that the minimum number of relayouts are required.
  function endOperations(group) {
    var ops = group.ops;
    for (var i = 0; i < ops.length; i++) // Read DOM
      { endOperation_R1(ops[i]); }
    for (var i$1 = 0; i$1 < ops.length; i$1++) // Write DOM (maybe)
      { endOperation_W1(ops[i$1]); }
    for (var i$2 = 0; i$2 < ops.length; i$2++) // Read DOM
      { endOperation_R2(ops[i$2]); }
    for (var i$3 = 0; i$3 < ops.length; i$3++) // Write DOM (maybe)
      { endOperation_W2(ops[i$3]); }
    for (var i$4 = 0; i$4 < ops.length; i$4++) // Read DOM
      { endOperation_finish(ops[i$4]); }
  }

  function endOperation_R1(op) {
    var cm = op.cm, display = cm.display;
    maybeClipScrollbars(cm);
    if (op.updateMaxLine) { findMaxLine(cm); }

    op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null ||
      op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom ||
                         op.scrollToPos.to.line >= display.viewTo) ||
      display.maxLineChanged && cm.options.lineWrapping;
    op.update = op.mustUpdate &&
      new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate);
  }

  function endOperation_W1(op) {
    op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update);
  }

  function endOperation_R2(op) {
    var cm = op.cm, display = cm.display;
    if (op.updatedDisplay) { updateHeightsInViewport(cm); }

    op.barMeasure = measureForScrollbars(cm);

    // If the max line changed since it was last measured, measure it,
    // and ensure the document's width matches it.
    // updateDisplay_W2 will use these properties to do the actual resizing
    if (display.maxLineChanged && !cm.options.lineWrapping) {
      op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;
      cm.display.sizerWidth = op.adjustWidthTo;
      op.barMeasure.scrollWidth =
        Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);
      op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));
    }

    if (op.updatedDisplay || op.selectionChanged)
      { op.preparedSelection = display.input.prepareSelection(); }
  }

  function endOperation_W2(op) {
    var cm = op.cm;

    if (op.adjustWidthTo != null) {
      cm.display.sizer.style.minWidth = op.adjustWidthTo + "px";
      if (op.maxScrollLeft < cm.doc.scrollLeft)
        { setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); }
      cm.display.maxLineChanged = false;
    }

    var takeFocus = op.focus && op.focus == activeElt();
    if (op.preparedSelection)
      { cm.display.input.showSelection(op.preparedSelection, takeFocus); }
    if (op.updatedDisplay || op.startHeight != cm.doc.height)
      { updateScrollbars(cm, op.barMeasure); }
    if (op.updatedDisplay)
      { setDocumentHeight(cm, op.barMeasure); }

    if (op.selectionChanged) { restartBlink(cm); }

    if (cm.state.focused && op.updateInput)
      { cm.display.input.reset(op.typing); }
    if (takeFocus) { ensureFocus(op.cm); }
  }

  function endOperation_finish(op) {
    var cm = op.cm, display = cm.display, doc = cm.doc;

    if (op.updatedDisplay) { postUpdateDisplay(cm, op.update); }

    // Abort mouse wheel delta measurement, when scrolling explicitly
    if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))
      { display.wheelStartX = display.wheelStartY = null; }

    // Propagate the scroll position to the actual DOM scroller
    if (op.scrollTop != null) { setScrollTop(cm, op.scrollTop, op.forceScroll); }

    if (op.scrollLeft != null) { setScrollLeft(cm, op.scrollLeft, true, true); }
    // If we need to scroll a specific position into view, do so.
    if (op.scrollToPos) {
      var rect = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from),
                                   clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin);
      maybeScrollWindow(cm, rect);
    }

    // Fire events for markers that are hidden/unidden by editing or
    // undoing
    var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;
    if (hidden) { for (var i = 0; i < hidden.length; ++i)
      { if (!hidden[i].lines.length) { signal(hidden[i], "hide"); } } }
    if (unhidden) { for (var i$1 = 0; i$1 < unhidden.length; ++i$1)
      { if (unhidden[i$1].lines.length) { signal(unhidden[i$1], "unhide"); } } }

    if (display.wrapper.offsetHeight)
      { doc.scrollTop = cm.display.scroller.scrollTop; }

    // Fire change events, and delayed event handlers
    if (op.changeObjs)
      { signal(cm, "changes", cm, op.changeObjs); }
    if (op.update)
      { op.update.finish(); }
  }

  // Run the given function in an operation
  function runInOp(cm, f) {
    if (cm.curOp) { return f() }
    startOperation(cm);
    try { return f() }
    finally { endOperation(cm); }
  }
  // Wraps a function in an operation. Returns the wrapped function.
  function operation(cm, f) {
    return function() {
      if (cm.curOp) { return f.apply(cm, arguments) }
      startOperation(cm);
      try { return f.apply(cm, arguments) }
      finally { endOperation(cm); }
    }
  }
  // Used to add methods to editor and doc instances, wrapping them in
  // operations.
  function methodOp(f) {
    return function() {
      if (this.curOp) { return f.apply(this, arguments) }
      startOperation(this);
      try { return f.apply(this, arguments) }
      finally { endOperation(this); }
    }
  }
  function docMethodOp(f) {
    return function() {
      var cm = this.cm;
      if (!cm || cm.curOp) { return f.apply(this, arguments) }
      startOperation(cm);
      try { return f.apply(this, arguments) }
      finally { endOperation(cm); }
    }
  }

  // HIGHLIGHT WORKER

  function startWorker(cm, time) {
    if (cm.doc.highlightFrontier < cm.display.viewTo)
      { cm.state.highlight.set(time, bind(highlightWorker, cm)); }
  }

  function highlightWorker(cm) {
    var doc = cm.doc;
    if (doc.highlightFrontier >= cm.display.viewTo) { return }
    var end = +new Date + cm.options.workTime;
    var context = getContextBefore(cm, doc.highlightFrontier);
    var changedLines = [];

    doc.iter(context.line, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function (line) {
      if (context.line >= cm.display.viewFrom) { // Visible
        var oldStyles = line.styles;
        var resetState = line.text.length > cm.options.maxHighlightLength ? copyState(doc.mode, context.state) : null;
        var highlighted = highlightLine(cm, line, context, true);
        if (resetState) { context.state = resetState; }
        line.styles = highlighted.styles;
        var oldCls = line.styleClasses, newCls = highlighted.classes;
        if (newCls) { line.styleClasses = newCls; }
        else if (oldCls) { line.styleClasses = null; }
        var ischange = !oldStyles || oldStyles.length != line.styles.length ||
          oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass);
        for (var i = 0; !ischange && i < oldStyles.length; ++i) { ischange = oldStyles[i] != line.styles[i]; }
        if (ischange) { changedLines.push(context.line); }
        line.stateAfter = context.save();
        context.nextLine();
      } else {
        if (line.text.length <= cm.options.maxHighlightLength)
          { processLine(cm, line.text, context); }
        line.stateAfter = context.line % 5 == 0 ? context.save() : null;
        context.nextLine();
      }
      if (+new Date > end) {
        startWorker(cm, cm.options.workDelay);
        return true
      }
    });
    doc.highlightFrontier = context.line;
    doc.modeFrontier = Math.max(doc.modeFrontier, context.line);
    if (changedLines.length) { runInOp(cm, function () {
      for (var i = 0; i < changedLines.length; i++)
        { regLineChange(cm, changedLines[i], "text"); }
    }); }
  }

  // DISPLAY DRAWING

  var DisplayUpdate = function(cm, viewport, force) {
    var display = cm.display;

    this.viewport = viewport;
    // Store some values that we'll need later (but don't want to force a relayout for)
    this.visible = visibleLines(display, cm.doc, viewport);
    this.editorIsHidden = !display.wrapper.offsetWidth;
    this.wrapperHeight = display.wrapper.clientHeight;
    this.wrapperWidth = display.wrapper.clientWidth;
    this.oldDisplayWidth = displayWidth(cm);
    this.force = force;
    this.dims = getDimensions(cm);
    this.events = [];
  };

  DisplayUpdate.prototype.signal = function (emitter, type) {
    if (hasHandler(emitter, type))
      { this.events.push(arguments); }
  };
  DisplayUpdate.prototype.finish = function () {
    for (var i = 0; i < this.events.length; i++)
      { signal.apply(null, this.events[i]); }
  };

  function maybeClipScrollbars(cm) {
    var display = cm.display;
    if (!display.scrollbarsClipped && display.scroller.offsetWidth) {
      display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth;
      display.heightForcer.style.height = scrollGap(cm) + "px";
      display.sizer.style.marginBottom = -display.nativeBarWidth + "px";
      display.sizer.style.borderRightWidth = scrollGap(cm) + "px";
      display.scrollbarsClipped = true;
    }
  }

  function selectionSnapshot(cm) {
    if (cm.hasFocus()) { return null }
    var active = activeElt();
    if (!active || !contains(cm.display.lineDiv, active)) { return null }
    var result = {activeElt: active};
    if (window.getSelection) {
      var sel = window.getSelection();
      if (sel.anchorNode && sel.extend && contains(cm.display.lineDiv, sel.anchorNode)) {
        result.anchorNode = sel.anchorNode;
        result.anchorOffset = sel.anchorOffset;
        result.focusNode = sel.focusNode;
        result.focusOffset = sel.focusOffset;
      }
    }
    return result
  }

  function restoreSelection(snapshot) {
    if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt()) { return }
    snapshot.activeElt.focus();
    if (!/^(INPUT|TEXTAREA)$/.test(snapshot.activeElt.nodeName) &&
        snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) {
      var sel = window.getSelection(), range = document.createRange();
      range.setEnd(snapshot.anchorNode, snapshot.anchorOffset);
      range.collapse(false);
      sel.removeAllRanges();
      sel.addRange(range);
      sel.extend(snapshot.focusNode, snapshot.focusOffset);
    }
  }

  // Does the actual updating of the line display. Bails out
  // (returning false) when there is nothing to be done and forced is
  // false.
  function updateDisplayIfNeeded(cm, update) {
    var display = cm.display, doc = cm.doc;

    if (update.editorIsHidden) {
      resetView(cm);
      return false
    }

    // Bail out if the visible area is already rendered and nothing changed.
    if (!update.force &&
        update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo &&
        (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) &&
        display.renderedView == display.view && countDirtyView(cm) == 0)
      { return false }

    if (maybeUpdateLineNumberWidth(cm)) {
      resetView(cm);
      update.dims = getDimensions(cm);
    }

    // Compute a suitable new viewport (from & to)
    var end = doc.first + doc.size;
    var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first);
    var to = Math.min(end, update.visible.to + cm.options.viewportMargin);
    if (display.viewFrom < from && from - display.viewFrom < 20) { from = Math.max(doc.first, display.viewFrom); }
    if (display.viewTo > to && display.viewTo - to < 20) { to = Math.min(end, display.viewTo); }
    if (sawCollapsedSpans) {
      from = visualLineNo(cm.doc, from);
      to = visualLineEndNo(cm.doc, to);
    }

    var different = from != display.viewFrom || to != display.viewTo ||
      display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth;
    adjustView(cm, from, to);

    display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom));
    // Position the mover div to align with the current scroll position
    cm.display.mover.style.top = display.viewOffset + "px";

    var toUpdate = countDirtyView(cm);
    if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&
        (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))
      { return false }

    // For big changes, we hide the enclosing element during the
    // update, since that speeds up the operations on most browsers.
    var selSnapshot = selectionSnapshot(cm);
    if (toUpdate > 4) { display.lineDiv.style.display = "none"; }
    patchDisplay(cm, display.updateLineNumbers, update.dims);
    if (toUpdate > 4) { display.lineDiv.style.display = ""; }
    display.renderedView = display.view;
    // There might have been a widget with a focused element that got
    // hidden or updated, if so re-focus it.
    restoreSelection(selSnapshot);

    // Prevent selection and cursors from interfering with the scroll
    // width and height.
    removeChildren(display.cursorDiv);
    removeChildren(display.selectionDiv);
    display.gutters.style.height = display.sizer.style.minHeight = 0;

    if (different) {
      display.lastWrapHeight = update.wrapperHeight;
      display.lastWrapWidth = update.wrapperWidth;
      startWorker(cm, 400);
    }

    display.updateLineNumbers = null;

    return true
  }

  function postUpdateDisplay(cm, update) {
    var viewport = update.viewport;

    for (var first = true;; first = false) {
      if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {
        // Clip forced viewport to actual scrollable area.
        if (viewport && viewport.top != null)
          { viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; }
        // Updated line heights might result in the drawn area not
        // actually covering the viewport. Keep looping until it does.
        update.visible = visibleLines(cm.display, cm.doc, viewport);
        if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)
          { break }
      } else if (first) {
        update.visible = visibleLines(cm.display, cm.doc, viewport);
      }
      if (!updateDisplayIfNeeded(cm, update)) { break }
      updateHeightsInViewport(cm);
      var barMeasure = measureForScrollbars(cm);
      updateSelection(cm);
      updateScrollbars(cm, barMeasure);
      setDocumentHeight(cm, barMeasure);
      update.force = false;
    }

    update.signal(cm, "update", cm);
    if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {
      update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo);
      cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;
    }
  }

  function updateDisplaySimple(cm, viewport) {
    var update = new DisplayUpdate(cm, viewport);
    if (updateDisplayIfNeeded(cm, update)) {
      updateHeightsInViewport(cm);
      postUpdateDisplay(cm, update);
      var barMeasure = measureForScrollbars(cm);
      updateSelection(cm);
      updateScrollbars(cm, barMeasure);
      setDocumentHeight(cm, barMeasure);
      update.finish();
    }
  }

  // Sync the actual display DOM structure with display.view, removing
  // nodes for lines that are no longer in view, and creating the ones
  // that are not there yet, and updating the ones that are out of
  // date.
  function patchDisplay(cm, updateNumbersFrom, dims) {
    var display = cm.display, lineNumbers = cm.options.lineNumbers;
    var container = display.lineDiv, cur = container.firstChild;

    function rm(node) {
      var next = node.nextSibling;
      // Works around a throw-scroll bug in OS X Webkit
      if (webkit && mac && cm.display.currentWheelTarget == node)
        { node.style.display = "none"; }
      else
        { node.parentNode.removeChild(node); }
      return next
    }

    var view = display.view, lineN = display.viewFrom;
    // Loop over the elements in the view, syncing cur (the DOM nodes
    // in display.lineDiv) with the view as we go.
    for (var i = 0; i < view.length; i++) {
      var lineView = view[i];
      if (lineView.hidden) ; else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet
        var node = buildLineElement(cm, lineView, lineN, dims);
        container.insertBefore(node, cur);
      } else { // Already drawn
        while (cur != lineView.node) { cur = rm(cur); }
        var updateNumber = lineNumbers && updateNumbersFrom != null &&
          updateNumbersFrom <= lineN && lineView.lineNumber;
        if (lineView.changes) {
          if (indexOf(lineView.changes, "gutter") > -1) { updateNumber = false; }
          updateLineForChanges(cm, lineView, lineN, dims);
        }
        if (updateNumber) {
          removeChildren(lineView.lineNumber);
          lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));
        }
        cur = lineView.node.nextSibling;
      }
      lineN += lineView.size;
    }
    while (cur) { cur = rm(cur); }
  }

  function updateGutterSpace(display) {
    var width = display.gutters.offsetWidth;
    display.sizer.style.marginLeft = width + "px";
  }

  function setDocumentHeight(cm, measure) {
    cm.display.sizer.style.minHeight = measure.docHeight + "px";
    cm.display.heightForcer.style.top = measure.docHeight + "px";
    cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + "px";
  }

  // Re-align line numbers and gutter marks to compensate for
  // horizontal scrolling.
  function alignHorizontally(cm) {
    var display = cm.display, view = display.view;
    if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) { return }
    var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;
    var gutterW = display.gutters.offsetWidth, left = comp + "px";
    for (var i = 0; i < view.length; i++) { if (!view[i].hidden) {
      if (cm.options.fixedGutter) {
        if (view[i].gutter)
          { view[i].gutter.style.left = left; }
        if (view[i].gutterBackground)
          { view[i].gutterBackground.style.left = left; }
      }
      var align = view[i].alignable;
      if (align) { for (var j = 0; j < align.length; j++)
        { align[j].style.left = left; } }
    } }
    if (cm.options.fixedGutter)
      { display.gutters.style.left = (comp + gutterW) + "px"; }
  }

  // Used to ensure that the line number gutter is still the right
  // size for the current document size. Returns true when an update
  // is needed.
  function maybeUpdateLineNumberWidth(cm) {
    if (!cm.options.lineNumbers) { return false }
    var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;
    if (last.length != display.lineNumChars) {
      var test = display.measure.appendChild(elt("div", [elt("div", last)],
                                                 "CodeMirror-linenumber CodeMirror-gutter-elt"));
      var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;
      display.lineGutter.style.width = "";
      display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1;
      display.lineNumWidth = display.lineNumInnerWidth + padding;
      display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;
      display.lineGutter.style.width = display.lineNumWidth + "px";
      updateGutterSpace(cm.display);
      return true
    }
    return false
  }

  function getGutters(gutters, lineNumbers) {
    var result = [], sawLineNumbers = false;
    for (var i = 0; i < gutters.length; i++) {
      var name = gutters[i], style = null;
      if (typeof name != "string") { style = name.style; name = name.className; }
      if (name == "CodeMirror-linenumbers") {
        if (!lineNumbers) { continue }
        else { sawLineNumbers = true; }
      }
      result.push({className: name, style: style});
    }
    if (lineNumbers && !sawLineNumbers) { result.push({className: "CodeMirror-linenumbers", style: null}); }
    return result
  }

  // Rebuild the gutter elements, ensure the margin to the left of the
  // code matches their width.
  function renderGutters(display) {
    var gutters = display.gutters, specs = display.gutterSpecs;
    removeChildren(gutters);
    display.lineGutter = null;
    for (var i = 0; i < specs.length; ++i) {
      var ref = specs[i];
      var className = ref.className;
      var style = ref.style;
      var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + className));
      if (style) { gElt.style.cssText = style; }
      if (className == "CodeMirror-linenumbers") {
        display.lineGutter = gElt;
        gElt.style.width = (display.lineNumWidth || 1) + "px";
      }
    }
    gutters.style.display = specs.length ? "" : "none";
    updateGutterSpace(display);
  }

  function updateGutters(cm) {
    renderGutters(cm.display);
    regChange(cm);
    alignHorizontally(cm);
  }

  // The display handles the DOM integration, both for input reading
  // and content drawing. It holds references to DOM nodes and
  // display-related state.

  function Display(place, doc, input, options) {
    var d = this;
    this.input = input;

    // Covers bottom-right square when both scrollbars are present.
    d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler");
    d.scrollbarFiller.setAttribute("cm-not-content", "true");
    // Covers bottom of gutter when coverGutterNextToScrollbar is on
    // and h scrollbar is present.
    d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler");
    d.gutterFiller.setAttribute("cm-not-content", "true");
    // Will contain the actual code, positioned to cover the viewport.
    d.lineDiv = eltP("div", null, "CodeMirror-code");
    // Elements are added to these to represent selection and cursors.
    d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1");
    d.cursorDiv = elt("div", null, "CodeMirror-cursors");
    // A visibility: hidden element used to find the size of things.
    d.measure = elt("div", null, "CodeMirror-measure");
    // When lines outside of the viewport are measured, they are drawn in this.
    d.lineMeasure = elt("div", null, "CodeMirror-measure");
    // Wraps everything that needs to exist inside the vertically-padded coordinate system
    d.lineSpace = eltP("div", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],
                      null, "position: relative; outline: none");
    var lines = eltP("div", [d.lineSpace], "CodeMirror-lines");
    // Moved around its parent to cover visible view.
    d.mover = elt("div", [lines], null, "position: relative");
    // Set to the height of the document, allowing scrolling.
    d.sizer = elt("div", [d.mover], "CodeMirror-sizer");
    d.sizerWidth = null;
    // Behavior of elts with overflow: auto and padding is
    // inconsistent across browsers. This is used to ensure the
    // scrollable area is big enough.
    d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerGap + "px; width: 1px;");
    // Will contain the gutters, if any.
    d.gutters = elt("div", null, "CodeMirror-gutters");
    d.lineGutter = null;
    // Actual scrollable element.
    d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll");
    d.scroller.setAttribute("tabIndex", "-1");
    // The element in which the editor lives.
    d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror");

    // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)
    if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }
    if (!webkit && !(gecko && mobile)) { d.scroller.draggable = true; }

    if (place) {
      if (place.appendChild) { place.appendChild(d.wrapper); }
      else { place(d.wrapper); }
    }

    // Current rendered range (may be bigger than the view window).
    d.viewFrom = d.viewTo = doc.first;
    d.reportedViewFrom = d.reportedViewTo = doc.first;
    // Information about the rendered lines.
    d.view = [];
    d.renderedView = null;
    // Holds info about a single rendered line when it was rendered
    // for measurement, while not in view.
    d.externalMeasured = null;
    // Empty space (in pixels) above the view
    d.viewOffset = 0;
    d.lastWrapHeight = d.lastWrapWidth = 0;
    d.updateLineNumbers = null;

    d.nativeBarWidth = d.barHeight = d.barWidth = 0;
    d.scrollbarsClipped = false;

    // Used to only resize the line number gutter when necessary (when
    // the amount of lines crosses a boundary that makes its width change)
    d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;
    // Set to true when a non-horizontal-scrolling line widget is
    // added. As an optimization, line widget aligning is skipped when
    // this is false.
    d.alignWidgets = false;

    d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;

    // Tracks the maximum line length so that the horizontal scrollbar
    // can be kept static when scrolling.
    d.maxLine = null;
    d.maxLineLength = 0;
    d.maxLineChanged = false;

    // Used for measuring wheel scrolling granularity
    d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;

    // True when shift is held down.
    d.shift = false;

    // Used to track whether anything happened since the context menu
    // was opened.
    d.selForContextMenu = null;

    d.activeTouch = null;

    d.gutterSpecs = getGutters(options.gutters, options.lineNumbers);
    renderGutters(d);

    input.init(d);
  }

  // Since the delta values reported on mouse wheel events are
  // unstandardized between browsers and even browser versions, and
  // generally horribly unpredictable, this code starts by measuring
  // the scroll effect that the first few mouse wheel events have,
  // and, from that, detects the way it can convert deltas to pixel
  // offsets afterwards.
  //
  // The reason we want to know the amount a wheel event will scroll
  // is that it gives us a chance to update the display before the
  // actual scrolling happens, reducing flickering.

  var wheelSamples = 0, wheelPixelsPerUnit = null;
  // Fill in a browser-detected starting value on browsers where we
  // know one. These don't have to be accurate -- the result of them
  // being wrong would just be a slight flicker on the first wheel
  // scroll (if it is large enough).
  if (ie) { wheelPixelsPerUnit = -.53; }
  else if (gecko) { wheelPixelsPerUnit = 15; }
  else if (chrome) { wheelPixelsPerUnit = -.7; }
  else if (safari) { wheelPixelsPerUnit = -1/3; }

  function wheelEventDelta(e) {
    var dx = e.wheelDeltaX, dy = e.wheelDeltaY;
    if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) { dx = e.detail; }
    if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) { dy = e.detail; }
    else if (dy == null) { dy = e.wheelDelta; }
    return {x: dx, y: dy}
  }
  function wheelEventPixels(e) {
    var delta = wheelEventDelta(e);
    delta.x *= wheelPixelsPerUnit;
    delta.y *= wheelPixelsPerUnit;
    return delta
  }

  function onScrollWheel(cm, e) {
    var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;

    var display = cm.display, scroll = display.scroller;
    // Quit if there's nothing to scroll here
    var canScrollX = scroll.scrollWidth > scroll.clientWidth;
    var canScrollY = scroll.scrollHeight > scroll.clientHeight;
    if (!(dx && canScrollX || dy && canScrollY)) { return }

    // Webkit browsers on OS X abort momentum scrolls when the target
    // of the scroll event is removed from the scrollable element.
    // This hack (see related code in patchDisplay) makes sure the
    // element is kept around.
    if (dy && mac && webkit) {
      outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {
        for (var i = 0; i < view.length; i++) {
          if (view[i].node == cur) {
            cm.display.currentWheelTarget = cur;
            break outer
          }
        }
      }
    }

    // On some browsers, horizontal scrolling will cause redraws to
    // happen before the gutter has been realigned, causing it to
    // wriggle around in a most unseemly way. When we have an
    // estimated pixels/delta value, we just handle horizontal
    // scrolling entirely here. It'll be slightly off from native, but
    // better than glitching out.
    if (dx && !gecko && !presto && wheelPixelsPerUnit != null) {
      if (dy && canScrollY)
        { updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * wheelPixelsPerUnit)); }
      setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * wheelPixelsPerUnit));
      // Only prevent default scrolling if vertical scrolling is
      // actually possible. Otherwise, it causes vertical scroll
      // jitter on OSX trackpads when deltaX is small and deltaY
      // is large (issue #3579)
      if (!dy || (dy && canScrollY))
        { e_preventDefault(e); }
      display.wheelStartX = null; // Abort measurement, if in progress
      return
    }

    // 'Project' the visible viewport to cover the area that is being
    // scrolled into view (if we know enough to estimate it).
    if (dy && wheelPixelsPerUnit != null) {
      var pixels = dy * wheelPixelsPerUnit;
      var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;
      if (pixels < 0) { top = Math.max(0, top + pixels - 50); }
      else { bot = Math.min(cm.doc.height, bot + pixels + 50); }
      updateDisplaySimple(cm, {top: top, bottom: bot});
    }

    if (wheelSamples < 20) {
      if (display.wheelStartX == null) {
        display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;
        display.wheelDX = dx; display.wheelDY = dy;
        setTimeout(function () {
          if (display.wheelStartX == null) { return }
          var movedX = scroll.scrollLeft - display.wheelStartX;
          var movedY = scroll.scrollTop - display.wheelStartY;
          var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||
            (movedX && display.wheelDX && movedX / display.wheelDX);
          display.wheelStartX = display.wheelStartY = null;
          if (!sample) { return }
          wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);
          ++wheelSamples;
        }, 200);
      } else {
        display.wheelDX += dx; display.wheelDY += dy;
      }
    }
  }

  // Selection objects are immutable. A new one is created every time
  // the selection changes. A selection is one or more non-overlapping
  // (and non-touching) ranges, sorted, and an integer that indicates
  // which one is the primary selection (the one that's scrolled into
  // view, that getCursor returns, etc).
  var Selection = function(ranges, primIndex) {
    this.ranges = ranges;
    this.primIndex = primIndex;
  };

  Selection.prototype.primary = function () { return this.ranges[this.primIndex] };

  Selection.prototype.equals = function (other) {
    if (other == this) { return true }
    if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) { return false }
    for (var i = 0; i < this.ranges.length; i++) {
      var here = this.ranges[i], there = other.ranges[i];
      if (!equalCursorPos(here.anchor, there.anchor) || !equalCursorPos(here.head, there.head)) { return false }
    }
    return true
  };

  Selection.prototype.deepCopy = function () {
    var out = [];
    for (var i = 0; i < this.ranges.length; i++)
      { out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head)); }
    return new Selection(out, this.primIndex)
  };

  Selection.prototype.somethingSelected = function () {
    for (var i = 0; i < this.ranges.length; i++)
      { if (!this.ranges[i].empty()) { return true } }
    return false
  };

  Selection.prototype.contains = function (pos, end) {
    if (!end) { end = pos; }
    for (var i = 0; i < this.ranges.length; i++) {
      var range = this.ranges[i];
      if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0)
        { return i }
    }
    return -1
  };

  var Range = function(anchor, head) {
    this.anchor = anchor; this.head = head;
  };

  Range.prototype.from = function () { return minPos(this.anchor, this.head) };
  Range.prototype.to = function () { return maxPos(this.anchor, this.head) };
  Range.prototype.empty = function () { return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch };

  // Take an unsorted, potentially overlapping set of ranges, and
  // build a selection out of it. 'Consumes' ranges array (modifying
  // it).
  function normalizeSelection(cm, ranges, primIndex) {
    var mayTouch = cm && cm.options.selectionsMayTouch;
    var prim = ranges[primIndex];
    ranges.sort(function (a, b) { return cmp(a.from(), b.from()); });
    primIndex = indexOf(ranges, prim);
    for (var i = 1; i < ranges.length; i++) {
      var cur = ranges[i], prev = ranges[i - 1];
      var diff = cmp(prev.to(), cur.from());
      if (mayTouch && !cur.empty() ? diff > 0 : diff >= 0) {
        var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to());
        var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head;
        if (i <= primIndex) { --primIndex; }
        ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to));
      }
    }
    return new Selection(ranges, primIndex)
  }

  function simpleSelection(anchor, head) {
    return new Selection([new Range(anchor, head || anchor)], 0)
  }

  // Compute the position of the end of a change (its 'to' property
  // refers to the pre-change end).
  function changeEnd(change) {
    if (!change.text) { return change.to }
    return Pos(change.from.line + change.text.length - 1,
               lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0))
  }

  // Adjust a position to refer to the post-change position of the
  // same text, or the end of the change if the change covers it.
  function adjustForChange(pos, change) {
    if (cmp(pos, change.from) < 0) { return pos }
    if (cmp(pos, change.to) <= 0) { return changeEnd(change) }

    var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;
    if (pos.line == change.to.line) { ch += changeEnd(change).ch - change.to.ch; }
    return Pos(line, ch)
  }

  function computeSelAfterChange(doc, change) {
    var out = [];
    for (var i = 0; i < doc.sel.ranges.length; i++) {
      var range = doc.sel.ranges[i];
      out.push(new Range(adjustForChange(range.anchor, change),
                         adjustForChange(range.head, change)));
    }
    return normalizeSelection(doc.cm, out, doc.sel.primIndex)
  }

  function offsetPos(pos, old, nw) {
    if (pos.line == old.line)
      { return Pos(nw.line, pos.ch - old.ch + nw.ch) }
    else
      { return Pos(nw.line + (pos.line - old.line), pos.ch) }
  }

  // Used by replaceSelections to allow moving the selection to the
  // start or around the replaced test. Hint may be "start" or "around".
  function computeReplacedSel(doc, changes, hint) {
    var out = [];
    var oldPrev = Pos(doc.first, 0), newPrev = oldPrev;
    for (var i = 0; i < changes.length; i++) {
      var change = changes[i];
      var from = offsetPos(change.from, oldPrev, newPrev);
      var to = offsetPos(changeEnd(change), oldPrev, newPrev);
      oldPrev = change.to;
      newPrev = to;
      if (hint == "around") {
        var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0;
        out[i] = new Range(inv ? to : from, inv ? from : to);
      } else {
        out[i] = new Range(from, from);
      }
    }
    return new Selection(out, doc.sel.primIndex)
  }

  // Used to get the editor into a consistent state again when options change.

  function loadMode(cm) {
    cm.doc.mode = getMode(cm.options, cm.doc.modeOption);
    resetModeState(cm);
  }

  function resetModeState(cm) {
    cm.doc.iter(function (line) {
      if (line.stateAfter) { line.stateAfter = null; }
      if (line.styles) { line.styles = null; }
    });
    cm.doc.modeFrontier = cm.doc.highlightFrontier = cm.doc.first;
    startWorker(cm, 100);
    cm.state.modeGen++;
    if (cm.curOp) { regChange(cm); }
  }

  // DOCUMENT DATA STRUCTURE

  // By default, updates that start and end at the beginning of a line
  // are treated specially, in order to make the association of line
  // widgets and marker elements with the text behave more intuitive.
  function isWholeLineUpdate(doc, change) {
    return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == "" &&
      (!doc.cm || doc.cm.options.wholeLineUpdateBefore)
  }

  // Perform a change on the document data structure.
  function updateDoc(doc, change, markedSpans, estimateHeight) {
    function spansFor(n) {return markedSpans ? markedSpans[n] : null}
    function update(line, text, spans) {
      updateLine(line, text, spans, estimateHeight);
      signalLater(line, "change", line, change);
    }
    function linesFor(start, end) {
      var result = [];
      for (var i = start; i < end; ++i)
        { result.push(new Line(text[i], spansFor(i), estimateHeight)); }
      return result
    }

    var from = change.from, to = change.to, text = change.text;
    var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);
    var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;

    // Adjust the line structure
    if (change.full) {
      doc.insert(0, linesFor(0, text.length));
      doc.remove(text.length, doc.size - text.length);
    } else if (isWholeLineUpdate(doc, change)) {
      // This is a whole-line replace. Treated specially to make
      // sure line objects move the way they are supposed to.
      var added = linesFor(0, text.length - 1);
      update(lastLine, lastLine.text, lastSpans);
      if (nlines) { doc.remove(from.line, nlines); }
      if (added.length) { doc.insert(from.line, added); }
    } else if (firstLine == lastLine) {
      if (text.length == 1) {
        update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);
      } else {
        var added$1 = linesFor(1, text.length - 1);
        added$1.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight));
        update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
        doc.insert(from.line + 1, added$1);
      }
    } else if (text.length == 1) {
      update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));
      doc.remove(from.line + 1, nlines);
    } else {
      update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
      update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);
      var added$2 = linesFor(1, text.length - 1);
      if (nlines > 1) { doc.remove(from.line + 1, nlines - 1); }
      doc.insert(from.line + 1, added$2);
    }

    signalLater(doc, "change", doc, change);
  }

  // Call f for all linked documents.
  function linkedDocs(doc, f, sharedHistOnly) {
    function propagate(doc, skip, sharedHist) {
      if (doc.linked) { for (var i = 0; i < doc.linked.length; ++i) {
        var rel = doc.linked[i];
        if (rel.doc == skip) { continue }
        var shared = sharedHist && rel.sharedHist;
        if (sharedHistOnly && !shared) { continue }
        f(rel.doc, shared);
        propagate(rel.doc, doc, shared);
      } }
    }
    propagate(doc, null, true);
  }

  // Attach a document to an editor.
  function attachDoc(cm, doc) {
    if (doc.cm) { throw new Error("This document is already in use.") }
    cm.doc = doc;
    doc.cm = cm;
    estimateLineHeights(cm);
    loadMode(cm);
    setDirectionClass(cm);
    if (!cm.options.lineWrapping) { findMaxLine(cm); }
    cm.options.mode = doc.modeOption;
    regChange(cm);
  }

  function setDirectionClass(cm) {
  (cm.doc.direction == "rtl" ? addClass : rmClass)(cm.display.lineDiv, "CodeMirror-rtl");
  }

  function directionChanged(cm) {
    runInOp(cm, function () {
      setDirectionClass(cm);
      regChange(cm);
    });
  }

  function History(startGen) {
    // Arrays of change events and selections. Doing something adds an
    // event to done and clears undo. Undoing moves events from done
    // to undone, redoing moves them in the other direction.
    this.done = []; this.undone = [];
    this.undoDepth = Infinity;
    // Used to track when changes can be merged into a single undo
    // event
    this.lastModTime = this.lastSelTime = 0;
    this.lastOp = this.lastSelOp = null;
    this.lastOrigin = this.lastSelOrigin = null;
    // Used by the isClean() method
    this.generation = this.maxGeneration = startGen || 1;
  }

  // Create a history change event from an updateDoc-style change
  // object.
  function historyChangeFromChange(doc, change) {
    var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)};
    attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);
    linkedDocs(doc, function (doc) { return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); }, true);
    return histChange
  }

  // Pop all selection events off the end of a history array. Stop at
  // a change event.
  function clearSelectionEvents(array) {
    while (array.length) {
      var last = lst(array);
      if (last.ranges) { array.pop(); }
      else { break }
    }
  }

  // Find the top change event in the history. Pop off selection
  // events that are in the way.
  function lastChangeEvent(hist, force) {
    if (force) {
      clearSelectionEvents(hist.done);
      return lst(hist.done)
    } else if (hist.done.length && !lst(hist.done).ranges) {
      return lst(hist.done)
    } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {
      hist.done.pop();
      return lst(hist.done)
    }
  }

  // Register a change in the history. Merges changes that are within
  // a single operation, or are close together with an origin that
  // allows merging (starting with "+") into a single event.
  function addChangeToHistory(doc, change, selAfter, opId) {
    var hist = doc.history;
    hist.undone.length = 0;
    var time = +new Date, cur;
    var last;

    if ((hist.lastOp == opId ||
         hist.lastOrigin == change.origin && change.origin &&
         ((change.origin.charAt(0) == "+" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) ||
          change.origin.charAt(0) == "*")) &&
        (cur = lastChangeEvent(hist, hist.lastOp == opId))) {
      // Merge this change into the last event
      last = lst(cur.changes);
      if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) {
        // Optimized case for simple insertion -- don't want to add
        // new changesets for every character typed
        last.to = changeEnd(change);
      } else {
        // Add new sub-event
        cur.changes.push(historyChangeFromChange(doc, change));
      }
    } else {
      // Can not be merged, start a new event.
      var before = lst(hist.done);
      if (!before || !before.ranges)
        { pushSelectionToHistory(doc.sel, hist.done); }
      cur = {changes: [historyChangeFromChange(doc, change)],
             generation: hist.generation};
      hist.done.push(cur);
      while (hist.done.length > hist.undoDepth) {
        hist.done.shift();
        if (!hist.done[0].ranges) { hist.done.shift(); }
      }
    }
    hist.done.push(selAfter);
    hist.generation = ++hist.maxGeneration;
    hist.lastModTime = hist.lastSelTime = time;
    hist.lastOp = hist.lastSelOp = opId;
    hist.lastOrigin = hist.lastSelOrigin = change.origin;

    if (!last) { signal(doc, "historyAdded"); }
  }

  function selectionEventCanBeMerged(doc, origin, prev, sel) {
    var ch = origin.charAt(0);
    return ch == "*" ||
      ch == "+" &&
      prev.ranges.length == sel.ranges.length &&
      prev.somethingSelected() == sel.somethingSelected() &&
      new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500)
  }

  // Called whenever the selection changes, sets the new selection as
  // the pending selection in the history, and pushes the old pending
  // selection into the 'done' array when it was significantly
  // different (in number of selected ranges, emptiness, or time).
  function addSelectionToHistory(doc, sel, opId, options) {
    var hist = doc.history, origin = options && options.origin;

    // A new event is started when the previous origin does not match
    // the current, or the origins don't allow matching. Origins
    // starting with * are always merged, those starting with + are
    // merged when similar and close together in time.
    if (opId == hist.lastSelOp ||
        (origin && hist.lastSelOrigin == origin &&
         (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin ||
          selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))))
      { hist.done[hist.done.length - 1] = sel; }
    else
      { pushSelectionToHistory(sel, hist.done); }

    hist.lastSelTime = +new Date;
    hist.lastSelOrigin = origin;
    hist.lastSelOp = opId;
    if (options && options.clearRedo !== false)
      { clearSelectionEvents(hist.undone); }
  }

  function pushSelectionToHistory(sel, dest) {
    var top = lst(dest);
    if (!(top && top.ranges && top.equals(sel)))
      { dest.push(sel); }
  }

  // Used to store marked span information in the history.
  function attachLocalSpans(doc, change, from, to) {
    var existing = change["spans_" + doc.id], n = 0;
    doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function (line) {
      if (line.markedSpans)
        { (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans; }
      ++n;
    });
  }

  // When un/re-doing restores text containing marked spans, those
  // that have been explicitly cleared should not be restored.
  function removeClearedSpans(spans) {
    if (!spans) { return null }
    var out;
    for (var i = 0; i < spans.length; ++i) {
      if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }
      else if (out) { out.push(spans[i]); }
    }
    return !out ? spans : out.length ? out : null
  }

  // Retrieve and filter the old marked spans stored in a change event.
  function getOldSpans(doc, change) {
    var found = change["spans_" + doc.id];
    if (!found) { return null }
    var nw = [];
    for (var i = 0; i < change.text.length; ++i)
      { nw.push(removeClearedSpans(found[i])); }
    return nw
  }

  // Used for un/re-doing changes from the history. Combines the
  // result of computing the existing spans with the set of spans that
  // existed in the history (so that deleting around a span and then
  // undoing brings back the span).
  function mergeOldSpans(doc, change) {
    var old = getOldSpans(doc, change);
    var stretched = stretchSpansOverChange(doc, change);
    if (!old) { return stretched }
    if (!stretched) { return old }

    for (var i = 0; i < old.length; ++i) {
      var oldCur = old[i], stretchCur = stretched[i];
      if (oldCur && stretchCur) {
        spans: for (var j = 0; j < stretchCur.length; ++j) {
          var span = stretchCur[j];
          for (var k = 0; k < oldCur.length; ++k)
            { if (oldCur[k].marker == span.marker) { continue spans } }
          oldCur.push(span);
        }
      } else if (stretchCur) {
        old[i] = stretchCur;
      }
    }
    return old
  }

  // Used both to provide a JSON-safe object in .getHistory, and, when
  // detaching a document, to split the history in two
  function copyHistoryArray(events, newGroup, instantiateSel) {
    var copy = [];
    for (var i = 0; i < events.length; ++i) {
      var event = events[i];
      if (event.ranges) {
        copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);
        continue
      }
      var changes = event.changes, newChanges = [];
      copy.push({changes: newChanges});
      for (var j = 0; j < changes.length; ++j) {
        var change = changes[j], m = (void 0);
        newChanges.push({from: change.from, to: change.to, text: change.text});
        if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\d+)$/)) {
          if (indexOf(newGroup, Number(m[1])) > -1) {
            lst(newChanges)[prop] = change[prop];
            delete change[prop];
          }
        } } }
      }
    }
    return copy
  }

  // The 'scroll' parameter given to many of these indicated whether
  // the new cursor position should be scrolled into view after
  // modifying the selection.

  // If shift is held or the extend flag is set, extends a range to
  // include a given position (and optionally a second position).
  // Otherwise, simply returns the range between the given positions.
  // Used for cursor motion and such.
  function extendRange(range, head, other, extend) {
    if (extend) {
      var anchor = range.anchor;
      if (other) {
        var posBefore = cmp(head, anchor) < 0;
        if (posBefore != (cmp(other, anchor) < 0)) {
          anchor = head;
          head = other;
        } else if (posBefore != (cmp(head, other) < 0)) {
          head = other;
        }
      }
      return new Range(anchor, head)
    } else {
      return new Range(other || head, head)
    }
  }

  // Extend the primary selection range, discard the rest.
  function extendSelection(doc, head, other, options, extend) {
    if (extend == null) { extend = doc.cm && (doc.cm.display.shift || doc.extend); }
    setSelection(doc, new Selection([extendRange(doc.sel.primary(), head, other, extend)], 0), options);
  }

  // Extend all selections (pos is an array of selections with length
  // equal the number of selections)
  function extendSelections(doc, heads, options) {
    var out = [];
    var extend = doc.cm && (doc.cm.display.shift || doc.extend);
    for (var i = 0; i < doc.sel.ranges.length; i++)
      { out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend); }
    var newSel = normalizeSelection(doc.cm, out, doc.sel.primIndex);
    setSelection(doc, newSel, options);
  }

  // Updates a single range in the selection.
  function replaceOneSelection(doc, i, range, options) {
    var ranges = doc.sel.ranges.slice(0);
    ranges[i] = range;
    setSelection(doc, normalizeSelection(doc.cm, ranges, doc.sel.primIndex), options);
  }

  // Reset the selection to a single range.
  function setSimpleSelection(doc, anchor, head, options) {
    setSelection(doc, simpleSelection(anchor, head), options);
  }

  // Give beforeSelectionChange handlers a change to influence a
  // selection update.
  function filterSelectionChange(doc, sel, options) {
    var obj = {
      ranges: sel.ranges,
      update: function(ranges) {
        this.ranges = [];
        for (var i = 0; i < ranges.length; i++)
          { this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),
                                     clipPos(doc, ranges[i].head)); }
      },
      origin: options && options.origin
    };
    signal(doc, "beforeSelectionChange", doc, obj);
    if (doc.cm) { signal(doc.cm, "beforeSelectionChange", doc.cm, obj); }
    if (obj.ranges != sel.ranges) { return normalizeSelection(doc.cm, obj.ranges, obj.ranges.length - 1) }
    else { return sel }
  }

  function setSelectionReplaceHistory(doc, sel, options) {
    var done = doc.history.done, last = lst(done);
    if (last && last.ranges) {
      done[done.length - 1] = sel;
      setSelectionNoUndo(doc, sel, options);
    } else {
      setSelection(doc, sel, options);
    }
  }

  // Set a new selection.
  function setSelection(doc, sel, options) {
    setSelectionNoUndo(doc, sel, options);
    addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options);
  }

  function setSelectionNoUndo(doc, sel, options) {
    if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange"))
      { sel = filterSelectionChange(doc, sel, options); }

    var bias = options && options.bias ||
      (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);
    setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));

    if (!(options && options.scroll === false) && doc.cm)
      { ensureCursorVisible(doc.cm); }
  }

  function setSelectionInner(doc, sel) {
    if (sel.equals(doc.sel)) { return }

    doc.sel = sel;

    if (doc.cm) {
      doc.cm.curOp.updateInput = 1;
      doc.cm.curOp.selectionChanged = true;
      signalCursorActivity(doc.cm);
    }
    signalLater(doc, "cursorActivity", doc);
  }

  // Verify that the selection does not partially select any atomic
  // marked ranges.
  function reCheckSelection(doc) {
    setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false));
  }

  // Return a selection that does not partially select any atomic
  // ranges.
  function skipAtomicInSelection(doc, sel, bias, mayClear) {
    var out;
    for (var i = 0; i < sel.ranges.length; i++) {
      var range = sel.ranges[i];
      var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i];
      var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear);
      var newHead = skipAtomic(doc, range.head, old && old.head, bias, mayClear);
      if (out || newAnchor != range.anchor || newHead != range.head) {
        if (!out) { out = sel.ranges.slice(0, i); }
        out[i] = new Range(newAnchor, newHead);
      }
    }
    return out ? normalizeSelection(doc.cm, out, sel.primIndex) : sel
  }

  function skipAtomicInner(doc, pos, oldPos, dir, mayClear) {
    var line = getLine(doc, pos.line);
    if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {
      var sp = line.markedSpans[i], m = sp.marker;

      // Determine if we should prevent the cursor being placed to the left/right of an atomic marker
      // Historically this was determined using the inclusiveLeft/Right option, but the new way to control it
      // is with selectLeft/Right
      var preventCursorLeft = ("selectLeft" in m) ? !m.selectLeft : m.inclusiveLeft;
      var preventCursorRight = ("selectRight" in m) ? !m.selectRight : m.inclusiveRight;

      if ((sp.from == null || (preventCursorLeft ? sp.from <= pos.ch : sp.from < pos.ch)) &&
          (sp.to == null || (preventCursorRight ? sp.to >= pos.ch : sp.to > pos.ch))) {
        if (mayClear) {
          signal(m, "beforeCursorEnter");
          if (m.explicitlyCleared) {
            if (!line.markedSpans) { break }
            else {--i; continue}
          }
        }
        if (!m.atomic) { continue }

        if (oldPos) {
          var near = m.find(dir < 0 ? 1 : -1), diff = (void 0);
          if (dir < 0 ? preventCursorRight : preventCursorLeft)
            { near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null); }
          if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0))
            { return skipAtomicInner(doc, near, pos, dir, mayClear) }
        }

        var far = m.find(dir < 0 ? -1 : 1);
        if (dir < 0 ? preventCursorLeft : preventCursorRight)
          { far = movePos(doc, far, dir, far.line == pos.line ? line : null); }
        return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null
      }
    } }
    return pos
  }

  // Ensure a given position is not inside an atomic range.
  function skipAtomic(doc, pos, oldPos, bias, mayClear) {
    var dir = bias || 1;
    var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) ||
        (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) ||
        skipAtomicInner(doc, pos, oldPos, -dir, mayClear) ||
        (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true));
    if (!found) {
      doc.cantEdit = true;
      return Pos(doc.first, 0)
    }
    return found
  }

  function movePos(doc, pos, dir, line) {
    if (dir < 0 && pos.ch == 0) {
      if (pos.line > doc.first) { return clipPos(doc, Pos(pos.line - 1)) }
      else { return null }
    } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) {
      if (pos.line < doc.first + doc.size - 1) { return Pos(pos.line + 1, 0) }
      else { return null }
    } else {
      return new Pos(pos.line, pos.ch + dir)
    }
  }

  function selectAll(cm) {
    cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);
  }

  // UPDATING

  // Allow "beforeChange" event handlers to influence a change
  function filterChange(doc, change, update) {
    var obj = {
      canceled: false,
      from: change.from,
      to: change.to,
      text: change.text,
      origin: change.origin,
      cancel: function () { return obj.canceled = true; }
    };
    if (update) { obj.update = function (from, to, text, origin) {
      if (from) { obj.from = clipPos(doc, from); }
      if (to) { obj.to = clipPos(doc, to); }
      if (text) { obj.text = text; }
      if (origin !== undefined) { obj.origin = origin; }
    }; }
    signal(doc, "beforeChange", doc, obj);
    if (doc.cm) { signal(doc.cm, "beforeChange", doc.cm, obj); }

    if (obj.canceled) {
      if (doc.cm) { doc.cm.curOp.updateInput = 2; }
      return null
    }
    return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin}
  }

  // Apply a change to a document, and add it to the document's
  // history, and propagating it to all linked documents.
  function makeChange(doc, change, ignoreReadOnly) {
    if (doc.cm) {
      if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }
      if (doc.cm.state.suppressEdits) { return }
    }

    if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) {
      change = filterChange(doc, change, true);
      if (!change) { return }
    }

    // Possibly split or suppress the update based on the presence
    // of read-only spans in its range.
    var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);
    if (split) {
      for (var i = split.length - 1; i >= 0; --i)
        { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [""] : change.text, origin: change.origin}); }
    } else {
      makeChangeInner(doc, change);
    }
  }

  function makeChangeInner(doc, change) {
    if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) { return }
    var selAfter = computeSelAfterChange(doc, change);
    addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);

    makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));
    var rebased = [];

    linkedDocs(doc, function (doc, sharedHist) {
      if (!sharedHist && indexOf(rebased, doc.history) == -1) {
        rebaseHist(doc.history, change);
        rebased.push(doc.history);
      }
      makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));
    });
  }

  // Revert a change stored in a document's history.
  function makeChangeFromHistory(doc, type, allowSelectionOnly) {
    var suppress = doc.cm && doc.cm.state.suppressEdits;
    if (suppress && !allowSelectionOnly) { return }

    var hist = doc.history, event, selAfter = doc.sel;
    var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done;

    // Verify that there is a useable event (so that ctrl-z won't
    // needlessly clear selection events)
    var i = 0;
    for (; i < source.length; i++) {
      event = source[i];
      if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges)
        { break }
    }
    if (i == source.length) { return }
    hist.lastOrigin = hist.lastSelOrigin = null;

    for (;;) {
      event = source.pop();
      if (event.ranges) {
        pushSelectionToHistory(event, dest);
        if (allowSelectionOnly && !event.equals(doc.sel)) {
          setSelection(doc, event, {clearRedo: false});
          return
        }
        selAfter = event;
      } else if (suppress) {
        source.push(event);
        return
      } else { break }
    }

    // Build up a reverse change object to add to the opposite history
    // stack (redo when undoing, and vice versa).
    var antiChanges = [];
    pushSelectionToHistory(selAfter, dest);
    dest.push({changes: antiChanges, generation: hist.generation});
    hist.generation = event.generation || ++hist.maxGeneration;

    var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange");

    var loop = function ( i ) {
      var change = event.changes[i];
      change.origin = type;
      if (filter && !filterChange(doc, change, false)) {
        source.length = 0;
        return {}
      }

      antiChanges.push(historyChangeFromChange(doc, change));

      var after = i ? computeSelAfterChange(doc, change) : lst(source);
      makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));
      if (!i && doc.cm) { doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}); }
      var rebased = [];

      // Propagate to the linked documents
      linkedDocs(doc, function (doc, sharedHist) {
        if (!sharedHist && indexOf(rebased, doc.history) == -1) {
          rebaseHist(doc.history, change);
          rebased.push(doc.history);
        }
        makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));
      });
    };

    for (var i$1 = event.changes.length - 1; i$1 >= 0; --i$1) {
      var returned = loop( i$1 );

      if ( returned ) return returned.v;
    }
  }

  // Sub-views need their line numbers shifted when text is added
  // above or below them in the parent document.
  function shiftDoc(doc, distance) {
    if (distance == 0) { return }
    doc.first += distance;
    doc.sel = new Selection(map(doc.sel.ranges, function (range) { return new Range(
      Pos(range.anchor.line + distance, range.anchor.ch),
      Pos(range.head.line + distance, range.head.ch)
    ); }), doc.sel.primIndex);
    if (doc.cm) {
      regChange(doc.cm, doc.first, doc.first - distance, distance);
      for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++)
        { regLineChange(doc.cm, l, "gutter"); }
    }
  }

  // More lower-level change function, handling only a single document
  // (not linked ones).
  function makeChangeSingleDoc(doc, change, selAfter, spans) {
    if (doc.cm && !doc.cm.curOp)
      { return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans) }

    if (change.to.line < doc.first) {
      shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));
      return
    }
    if (change.from.line > doc.lastLine()) { return }

    // Clip the change to the size of this doc
    if (change.from.line < doc.first) {
      var shift = change.text.length - 1 - (doc.first - change.from.line);
      shiftDoc(doc, shift);
      change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),
                text: [lst(change.text)], origin: change.origin};
    }
    var last = doc.lastLine();
    if (change.to.line > last) {
      change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),
                text: [change.text[0]], origin: change.origin};
    }

    change.removed = getBetween(doc, change.from, change.to);

    if (!selAfter) { selAfter = computeSelAfterChange(doc, change); }
    if (doc.cm) { makeChangeSingleDocInEditor(doc.cm, change, spans); }
    else { updateDoc(doc, change, spans); }
    setSelectionNoUndo(doc, selAfter, sel_dontScroll);

    if (doc.cantEdit && skipAtomic(doc, Pos(doc.firstLine(), 0)))
      { doc.cantEdit = false; }
  }

  // Handle the interaction of a change to a document with the editor
  // that this document is part of.
  function makeChangeSingleDocInEditor(cm, change, spans) {
    var doc = cm.doc, display = cm.display, from = change.from, to = change.to;

    var recomputeMaxLength = false, checkWidthStart = from.line;
    if (!cm.options.lineWrapping) {
      checkWidthStart = lineNo(visualLine(getLine(doc, from.line)));
      doc.iter(checkWidthStart, to.line + 1, function (line) {
        if (line == display.maxLine) {
          recomputeMaxLength = true;
          return true
        }
      });
    }

    if (doc.sel.contains(change.from, change.to) > -1)
      { signalCursorActivity(cm); }

    updateDoc(doc, change, spans, estimateHeight(cm));

    if (!cm.options.lineWrapping) {
      doc.iter(checkWidthStart, from.line + change.text.length, function (line) {
        var len = lineLength(line);
        if (len > display.maxLineLength) {
          display.maxLine = line;
          display.maxLineLength = len;
          display.maxLineChanged = true;
          recomputeMaxLength = false;
        }
      });
      if (recomputeMaxLength) { cm.curOp.updateMaxLine = true; }
    }

    retreatFrontier(doc, from.line);
    startWorker(cm, 400);

    var lendiff = change.text.length - (to.line - from.line) - 1;
    // Remember that these lines changed, for updating the display
    if (change.full)
      { regChange(cm); }
    else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change))
      { regLineChange(cm, from.line, "text"); }
    else
      { regChange(cm, from.line, to.line + 1, lendiff); }

    var changesHandler = hasHandler(cm, "changes"), changeHandler = hasHandler(cm, "change");
    if (changeHandler || changesHandler) {
      var obj = {
        from: from, to: to,
        text: change.text,
        removed: change.removed,
        origin: change.origin
      };
      if (changeHandler) { signalLater(cm, "change", cm, obj); }
      if (changesHandler) { (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj); }
    }
    cm.display.selForContextMenu = null;
  }

  function replaceRange(doc, code, from, to, origin) {
    var assign;

    if (!to) { to = from; }
    if (cmp(to, from) < 0) { (assign = [to, from], from = assign[0], to = assign[1]); }
    if (typeof code == "string") { code = doc.splitLines(code); }
    makeChange(doc, {from: from, to: to, text: code, origin: origin});
  }

  // Rebasing/resetting history to deal with externally-sourced changes

  function rebaseHistSelSingle(pos, from, to, diff) {
    if (to < pos.line) {
      pos.line += diff;
    } else if (from < pos.line) {
      pos.line = from;
      pos.ch = 0;
    }
  }

  // Tries to rebase an array of history events given a change in the
  // document. If the change touches the same lines as the event, the
  // event, and everything 'behind' it, is discarded. If the change is
  // before the event, the event's positions are updated. Uses a
  // copy-on-write scheme for the positions, to avoid having to
  // reallocate them all on every rebase, but also avoid problems with
  // shared position objects being unsafely updated.
  function rebaseHistArray(array, from, to, diff) {
    for (var i = 0; i < array.length; ++i) {
      var sub = array[i], ok = true;
      if (sub.ranges) {
        if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; }
        for (var j = 0; j < sub.ranges.length; j++) {
          rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff);
          rebaseHistSelSingle(sub.ranges[j].head, from, to, diff);
        }
        continue
      }
      for (var j$1 = 0; j$1 < sub.changes.length; ++j$1) {
        var cur = sub.changes[j$1];
        if (to < cur.from.line) {
          cur.from = Pos(cur.from.line + diff, cur.from.ch);
          cur.to = Pos(cur.to.line + diff, cur.to.ch);
        } else if (from <= cur.to.line) {
          ok = false;
          break
        }
      }
      if (!ok) {
        array.splice(0, i + 1);
        i = 0;
      }
    }
  }

  function rebaseHist(hist, change) {
    var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;
    rebaseHistArray(hist.done, from, to, diff);
    rebaseHistArray(hist.undone, from, to, diff);
  }

  // Utility for applying a change to a line by handle or number,
  // returning the number and optionally registering the line as
  // changed.
  function changeLine(doc, handle, changeType, op) {
    var no = handle, line = handle;
    if (typeof handle == "number") { line = getLine(doc, clipLine(doc, handle)); }
    else { no = lineNo(handle); }
    if (no == null) { return null }
    if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }
    return line
  }

  // The document is represented as a BTree consisting of leaves, with
  // chunk of lines in them, and branches, with up to ten leaves or
  // other branch nodes below them. The top node is always a branch
  // node, and is the document object itself (meaning it has
  // additional methods and properties).
  //
  // All nodes have parent links. The tree is used both to go from
  // line numbers to line objects, and to go from objects to numbers.
  // It also indexes by height, and is used to convert between height
  // and line object, and to find the total height of the document.
  //
  // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html

  function LeafChunk(lines) {
    this.lines = lines;
    this.parent = null;
    var height = 0;
    for (var i = 0; i < lines.length; ++i) {
      lines[i].parent = this;
      height += lines[i].height;
    }
    this.height = height;
  }

  LeafChunk.prototype = {
    chunkSize: function() { return this.lines.length },

    // Remove the n lines at offset 'at'.
    removeInner: function(at, n) {
      for (var i = at, e = at + n; i < e; ++i) {
        var line = this.lines[i];
        this.height -= line.height;
        cleanUpLine(line);
        signalLater(line, "delete");
      }
      this.lines.splice(at, n);
    },

    // Helper used to collapse a small branch into a single leaf.
    collapse: function(lines) {
      lines.push.apply(lines, this.lines);
    },

    // Insert the given array of lines at offset 'at', count them as
    // having the given height.
    insertInner: function(at, lines, height) {
      this.height += height;
      this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));
      for (var i = 0; i < lines.length; ++i) { lines[i].parent = this; }
    },

    // Used to iterate over a part of the tree.
    iterN: function(at, n, op) {
      for (var e = at + n; at < e; ++at)
        { if (op(this.lines[at])) { return true } }
    }
  };

  function BranchChunk(children) {
    this.children = children;
    var size = 0, height = 0;
    for (var i = 0; i < children.length; ++i) {
      var ch = children[i];
      size += ch.chunkSize(); height += ch.height;
      ch.parent = this;
    }
    this.size = size;
    this.height = height;
    this.parent = null;
  }

  BranchChunk.prototype = {
    chunkSize: function() { return this.size },

    removeInner: function(at, n) {
      this.size -= n;
      for (var i = 0; i < this.children.length; ++i) {
        var child = this.children[i], sz = child.chunkSize();
        if (at < sz) {
          var rm = Math.min(n, sz - at), oldHeight = child.height;
          child.removeInner(at, rm);
          this.height -= oldHeight - child.height;
          if (sz == rm) { this.children.splice(i--, 1); child.parent = null; }
          if ((n -= rm) == 0) { break }
          at = 0;
        } else { at -= sz; }
      }
      // If the result is smaller than 25 lines, ensure that it is a
      // single leaf node.
      if (this.size - n < 25 &&
          (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) {
        var lines = [];
        this.collapse(lines);
        this.children = [new LeafChunk(lines)];
        this.children[0].parent = this;
      }
    },

    collapse: function(lines) {
      for (var i = 0; i < this.children.length; ++i) { this.children[i].collapse(lines); }
    },

    insertInner: function(at, lines, height) {
      this.size += lines.length;
      this.height += height;
      for (var i = 0; i < this.children.length; ++i) {
        var child = this.children[i], sz = child.chunkSize();
        if (at <= sz) {
          child.insertInner(at, lines, height);
          if (child.lines && child.lines.length > 50) {
            // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced.
            // Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest.
            var remaining = child.lines.length % 25 + 25;
            for (var pos = remaining; pos < child.lines.length;) {
              var leaf = new LeafChunk(child.lines.slice(pos, pos += 25));
              child.height -= leaf.height;
              this.children.splice(++i, 0, leaf);
              leaf.parent = this;
            }
            child.lines = child.lines.slice(0, remaining);
            this.maybeSpill();
          }
          break
        }
        at -= sz;
      }
    },

    // When a node has grown, check whether it should be split.
    maybeSpill: function() {
      if (this.children.length <= 10) { return }
      var me = this;
      do {
        var spilled = me.children.splice(me.children.length - 5, 5);
        var sibling = new BranchChunk(spilled);
        if (!me.parent) { // Become the parent node
          var copy = new BranchChunk(me.children);
          copy.parent = me;
          me.children = [copy, sibling];
          me = copy;
       } else {
          me.size -= sibling.size;
          me.height -= sibling.height;
          var myIndex = indexOf(me.parent.children, me);
          me.parent.children.splice(myIndex + 1, 0, sibling);
        }
        sibling.parent = me.parent;
      } while (me.children.length > 10)
      me.parent.maybeSpill();
    },

    iterN: function(at, n, op) {
      for (var i = 0; i < this.children.length; ++i) {
        var child = this.children[i], sz = child.chunkSize();
        if (at < sz) {
          var used = Math.min(n, sz - at);
          if (child.iterN(at, used, op)) { return true }
          if ((n -= used) == 0) { break }
          at = 0;
        } else { at -= sz; }
      }
    }
  };

  // Line widgets are block elements displayed above or below a line.

  var LineWidget = function(doc, node, options) {
    if (options) { for (var opt in options) { if (options.hasOwnProperty(opt))
      { this[opt] = options[opt]; } } }
    this.doc = doc;
    this.node = node;
  };

  LineWidget.prototype.clear = function () {
    var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line);
    if (no == null || !ws) { return }
    for (var i = 0; i < ws.length; ++i) { if (ws[i] == this) { ws.splice(i--, 1); } }
    if (!ws.length) { line.widgets = null; }
    var height = widgetHeight(this);
    updateLineHeight(line, Math.max(0, line.height - height));
    if (cm) {
      runInOp(cm, function () {
        adjustScrollWhenAboveVisible(cm, line, -height);
        regLineChange(cm, no, "widget");
      });
      signalLater(cm, "lineWidgetCleared", cm, this, no);
    }
  };

  LineWidget.prototype.changed = function () {
      var this$1 = this;

    var oldH = this.height, cm = this.doc.cm, line = this.line;
    this.height = null;
    var diff = widgetHeight(this) - oldH;
    if (!diff) { return }
    if (!lineIsHidden(this.doc, line)) { updateLineHeight(line, line.height + diff); }
    if (cm) {
      runInOp(cm, function () {
        cm.curOp.forceUpdate = true;
        adjustScrollWhenAboveVisible(cm, line, diff);
        signalLater(cm, "lineWidgetChanged", cm, this$1, lineNo(line));
      });
    }
  };
  eventMixin(LineWidget);

  function adjustScrollWhenAboveVisible(cm, line, diff) {
    if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop))
      { addToScrollTop(cm, diff); }
  }

  function addLineWidget(doc, handle, node, options) {
    var widget = new LineWidget(doc, node, options);
    var cm = doc.cm;
    if (cm && widget.noHScroll) { cm.display.alignWidgets = true; }
    changeLine(doc, handle, "widget", function (line) {
      var widgets = line.widgets || (line.widgets = []);
      if (widget.insertAt == null) { widgets.push(widget); }
      else { widgets.splice(Math.min(widgets.length, Math.max(0, widget.insertAt)), 0, widget); }
      widget.line = line;
      if (cm && !lineIsHidden(doc, line)) {
        var aboveVisible = heightAtLine(line) < doc.scrollTop;
        updateLineHeight(line, line.height + widgetHeight(widget));
        if (aboveVisible) { addToScrollTop(cm, widget.height); }
        cm.curOp.forceUpdate = true;
      }
      return true
    });
    if (cm) { signalLater(cm, "lineWidgetAdded", cm, widget, typeof handle == "number" ? handle : lineNo(handle)); }
    return widget
  }

  // TEXTMARKERS

  // Created with markText and setBookmark methods. A TextMarker is a
  // handle that can be used to clear or find a marked position in the
  // document. Line objects hold arrays (markedSpans) containing
  // {from, to, marker} object pointing to such marker objects, and
  // indicating that such a marker is present on that line. Multiple
  // lines may point to the same marker when it spans across lines.
  // The spans will have null for their from/to properties when the
  // marker continues beyond the start/end of the line. Markers have
  // links back to the lines they currently touch.

  // Collapsed markers have unique ids, in order to be able to order
  // them, which is needed for uniquely determining an outer marker
  // when they overlap (they may nest, but not partially overlap).
  var nextMarkerId = 0;

  var TextMarker = function(doc, type) {
    this.lines = [];
    this.type = type;
    this.doc = doc;
    this.id = ++nextMarkerId;
  };

  // Clear the marker.
  TextMarker.prototype.clear = function () {
    if (this.explicitlyCleared) { return }
    var cm = this.doc.cm, withOp = cm && !cm.curOp;
    if (withOp) { startOperation(cm); }
    if (hasHandler(this, "clear")) {
      var found = this.find();
      if (found) { signalLater(this, "clear", found.from, found.to); }
    }
    var min = null, max = null;
    for (var i = 0; i < this.lines.length; ++i) {
      var line = this.lines[i];
      var span = getMarkedSpanFor(line.markedSpans, this);
      if (cm && !this.collapsed) { regLineChange(cm, lineNo(line), "text"); }
      else if (cm) {
        if (span.to != null) { max = lineNo(line); }
        if (span.from != null) { min = lineNo(line); }
      }
      line.markedSpans = removeMarkedSpan(line.markedSpans, span);
      if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm)
        { updateLineHeight(line, textHeight(cm.display)); }
    }
    if (cm && this.collapsed && !cm.options.lineWrapping) { for (var i$1 = 0; i$1 < this.lines.length; ++i$1) {
      var visual = visualLine(this.lines[i$1]), len = lineLength(visual);
      if (len > cm.display.maxLineLength) {
        cm.display.maxLine = visual;
        cm.display.maxLineLength = len;
        cm.display.maxLineChanged = true;
      }
    } }

    if (min != null && cm && this.collapsed) { regChange(cm, min, max + 1); }
    this.lines.length = 0;
    this.explicitlyCleared = true;
    if (this.atomic && this.doc.cantEdit) {
      this.doc.cantEdit = false;
      if (cm) { reCheckSelection(cm.doc); }
    }
    if (cm) { signalLater(cm, "markerCleared", cm, this, min, max); }
    if (withOp) { endOperation(cm); }
    if (this.parent) { this.parent.clear(); }
  };

  // Find the position of the marker in the document. Returns a {from,
  // to} object by default. Side can be passed to get a specific side
  // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the
  // Pos objects returned contain a line object, rather than a line
  // number (used to prevent looking up the same line twice).
  TextMarker.prototype.find = function (side, lineObj) {
    if (side == null && this.type == "bookmark") { side = 1; }
    var from, to;
    for (var i = 0; i < this.lines.length; ++i) {
      var line = this.lines[i];
      var span = getMarkedSpanFor(line.markedSpans, this);
      if (span.from != null) {
        from = Pos(lineObj ? line : lineNo(line), span.from);
        if (side == -1) { return from }
      }
      if (span.to != null) {
        to = Pos(lineObj ? line : lineNo(line), span.to);
        if (side == 1) { return to }
      }
    }
    return from && {from: from, to: to}
  };

  // Signals that the marker's widget changed, and surrounding layout
  // should be recomputed.
  TextMarker.prototype.changed = function () {
      var this$1 = this;

    var pos = this.find(-1, true), widget = this, cm = this.doc.cm;
    if (!pos || !cm) { return }
    runInOp(cm, function () {
      var line = pos.line, lineN = lineNo(pos.line);
      var view = findViewForLine(cm, lineN);
      if (view) {
        clearLineMeasurementCacheFor(view);
        cm.curOp.selectionChanged = cm.curOp.forceUpdate = true;
      }
      cm.curOp.updateMaxLine = true;
      if (!lineIsHidden(widget.doc, line) && widget.height != null) {
        var oldHeight = widget.height;
        widget.height = null;
        var dHeight = widgetHeight(widget) - oldHeight;
        if (dHeight)
          { updateLineHeight(line, line.height + dHeight); }
      }
      signalLater(cm, "markerChanged", cm, this$1);
    });
  };

  TextMarker.prototype.attachLine = function (line) {
    if (!this.lines.length && this.doc.cm) {
      var op = this.doc.cm.curOp;
      if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)
        { (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); }
    }
    this.lines.push(line);
  };

  TextMarker.prototype.detachLine = function (line) {
    this.lines.splice(indexOf(this.lines, line), 1);
    if (!this.lines.length && this.doc.cm) {
      var op = this.doc.cm.curOp
      ;(op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);
    }
  };
  eventMixin(TextMarker);

  // Create a marker, wire it up to the right lines, and
  function markText(doc, from, to, options, type) {
    // Shared markers (across linked documents) are handled separately
    // (markTextShared will call out to this again, once per
    // document).
    if (options && options.shared) { return markTextShared(doc, from, to, options, type) }
    // Ensure we are in an operation.
    if (doc.cm && !doc.cm.curOp) { return operation(doc.cm, markText)(doc, from, to, options, type) }

    var marker = new TextMarker(doc, type), diff = cmp(from, to);
    if (options) { copyObj(options, marker, false); }
    // Don't connect empty markers unless clearWhenEmpty is false
    if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false)
      { return marker }
    if (marker.replacedWith) {
      // Showing up as a widget implies collapsed (widget replaces text)
      marker.collapsed = true;
      marker.widgetNode = eltP("span", [marker.replacedWith], "CodeMirror-widget");
      if (!options.handleMouseEvents) { marker.widgetNode.setAttribute("cm-ignore-events", "true"); }
      if (options.insertLeft) { marker.widgetNode.insertLeft = true; }
    }
    if (marker.collapsed) {
      if (conflictingCollapsedRange(doc, from.line, from, to, marker) ||
          from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker))
        { throw new Error("Inserting collapsed marker partially overlapping an existing one") }
      seeCollapsedSpans();
    }

    if (marker.addToHistory)
      { addChangeToHistory(doc, {from: from, to: to, origin: "markText"}, doc.sel, NaN); }

    var curLine = from.line, cm = doc.cm, updateMaxLine;
    doc.iter(curLine, to.line + 1, function (line) {
      if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine)
        { updateMaxLine = true; }
      if (marker.collapsed && curLine != from.line) { updateLineHeight(line, 0); }
      addMarkedSpan(line, new MarkedSpan(marker,
                                         curLine == from.line ? from.ch : null,
                                         curLine == to.line ? to.ch : null));
      ++curLine;
    });
    // lineIsHidden depends on the presence of the spans, so needs a second pass
    if (marker.collapsed) { doc.iter(from.line, to.line + 1, function (line) {
      if (lineIsHidden(doc, line)) { updateLineHeight(line, 0); }
    }); }

    if (marker.clearOnEnter) { on(marker, "beforeCursorEnter", function () { return marker.clear(); }); }

    if (marker.readOnly) {
      seeReadOnlySpans();
      if (doc.history.done.length || doc.history.undone.length)
        { doc.clearHistory(); }
    }
    if (marker.collapsed) {
      marker.id = ++nextMarkerId;
      marker.atomic = true;
    }
    if (cm) {
      // Sync editor state
      if (updateMaxLine) { cm.curOp.updateMaxLine = true; }
      if (marker.collapsed)
        { regChange(cm, from.line, to.line + 1); }
      else if (marker.className || marker.startStyle || marker.endStyle || marker.css ||
               marker.attributes || marker.title)
        { for (var i = from.line; i <= to.line; i++) { regLineChange(cm, i, "text"); } }
      if (marker.atomic) { reCheckSelection(cm.doc); }
      signalLater(cm, "markerAdded", cm, marker);
    }
    return marker
  }

  // SHARED TEXTMARKERS

  // A shared marker spans multiple linked documents. It is
  // implemented as a meta-marker-object controlling multiple normal
  // markers.
  var SharedTextMarker = function(markers, primary) {
    this.markers = markers;
    this.primary = primary;
    for (var i = 0; i < markers.length; ++i)
      { markers[i].parent = this; }
  };

  SharedTextMarker.prototype.clear = function () {
    if (this.explicitlyCleared) { return }
    this.explicitlyCleared = true;
    for (var i = 0; i < this.markers.length; ++i)
      { this.markers[i].clear(); }
    signalLater(this, "clear");
  };

  SharedTextMarker.prototype.find = function (side, lineObj) {
    return this.primary.find(side, lineObj)
  };
  eventMixin(SharedTextMarker);

  function markTextShared(doc, from, to, options, type) {
    options = copyObj(options);
    options.shared = false;
    var markers = [markText(doc, from, to, options, type)], primary = markers[0];
    var widget = options.widgetNode;
    linkedDocs(doc, function (doc) {
      if (widget) { options.widgetNode = widget.cloneNode(true); }
      markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));
      for (var i = 0; i < doc.linked.length; ++i)
        { if (doc.linked[i].isParent) { return } }
      primary = lst(markers);
    });
    return new SharedTextMarker(markers, primary)
  }

  function findSharedMarkers(doc) {
    return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), function (m) { return m.parent; })
  }

  function copySharedMarkers(doc, markers) {
    for (var i = 0; i < markers.length; i++) {
      var marker = markers[i], pos = marker.find();
      var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to);
      if (cmp(mFrom, mTo)) {
        var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type);
        marker.markers.push(subMark);
        subMark.parent = marker;
      }
    }
  }

  function detachSharedMarkers(markers) {
    var loop = function ( i ) {
      var marker = markers[i], linked = [marker.primary.doc];
      linkedDocs(marker.primary.doc, function (d) { return linked.push(d); });
      for (var j = 0; j < marker.markers.length; j++) {
        var subMarker = marker.markers[j];
        if (indexOf(linked, subMarker.doc) == -1) {
          subMarker.parent = null;
          marker.markers.splice(j--, 1);
        }
      }
    };

    for (var i = 0; i < markers.length; i++) loop( i );
  }

  var nextDocId = 0;
  var Doc = function(text, mode, firstLine, lineSep, direction) {
    if (!(this instanceof Doc)) { return new Doc(text, mode, firstLine, lineSep, direction) }
    if (firstLine == null) { firstLine = 0; }

    BranchChunk.call(this, [new LeafChunk([new Line("", null)])]);
    this.first = firstLine;
    this.scrollTop = this.scrollLeft = 0;
    this.cantEdit = false;
    this.cleanGeneration = 1;
    this.modeFrontier = this.highlightFrontier = firstLine;
    var start = Pos(firstLine, 0);
    this.sel = simpleSelection(start);
    this.history = new History(null);
    this.id = ++nextDocId;
    this.modeOption = mode;
    this.lineSep = lineSep;
    this.direction = (direction == "rtl") ? "rtl" : "ltr";
    this.extend = false;

    if (typeof text == "string") { text = this.splitLines(text); }
    updateDoc(this, {from: start, to: start, text: text});
    setSelection(this, simpleSelection(start), sel_dontScroll);
  };

  Doc.prototype = createObj(BranchChunk.prototype, {
    constructor: Doc,
    // Iterate over the document. Supports two forms -- with only one
    // argument, it calls that for each line in the document. With
    // three, it iterates over the range given by the first two (with
    // the second being non-inclusive).
    iter: function(from, to, op) {
      if (op) { this.iterN(from - this.first, to - from, op); }
      else { this.iterN(this.first, this.first + this.size, from); }
    },

    // Non-public interface for adding and removing lines.
    insert: function(at, lines) {
      var height = 0;
      for (var i = 0; i < lines.length; ++i) { height += lines[i].height; }
      this.insertInner(at - this.first, lines, height);
    },
    remove: function(at, n) { this.removeInner(at - this.first, n); },

    // From here, the methods are part of the public interface. Most
    // are also available from CodeMirror (editor) instances.

    getValue: function(lineSep) {
      var lines = getLines(this, this.first, this.first + this.size);
      if (lineSep === false) { return lines }
      return lines.join(lineSep || this.lineSeparator())
    },
    setValue: docMethodOp(function(code) {
      var top = Pos(this.first, 0), last = this.first + this.size - 1;
      makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),
                        text: this.splitLines(code), origin: "setValue", full: true}, true);
      if (this.cm) { scrollToCoords(this.cm, 0, 0); }
      setSelection(this, simpleSelection(top), sel_dontScroll);
    }),
    replaceRange: function(code, from, to, origin) {
      from = clipPos(this, from);
      to = to ? clipPos(this, to) : from;
      replaceRange(this, code, from, to, origin);
    },
    getRange: function(from, to, lineSep) {
      var lines = getBetween(this, clipPos(this, from), clipPos(this, to));
      if (lineSep === false) { return lines }
      return lines.join(lineSep || this.lineSeparator())
    },

    getLine: function(line) {var l = this.getLineHandle(line); return l && l.text},

    getLineHandle: function(line) {if (isLine(this, line)) { return getLine(this, line) }},
    getLineNumber: function(line) {return lineNo(line)},

    getLineHandleVisualStart: function(line) {
      if (typeof line == "number") { line = getLine(this, line); }
      return visualLine(line)
    },

    lineCount: function() {return this.size},
    firstLine: function() {return this.first},
    lastLine: function() {return this.first + this.size - 1},

    clipPos: function(pos) {return clipPos(this, pos)},

    getCursor: function(start) {
      var range = this.sel.primary(), pos;
      if (start == null || start == "head") { pos = range.head; }
      else if (start == "anchor") { pos = range.anchor; }
      else if (start == "end" || start == "to" || start === false) { pos = range.to(); }
      else { pos = range.from(); }
      return pos
    },
    listSelections: function() { return this.sel.ranges },
    somethingSelected: function() {return this.sel.somethingSelected()},

    setCursor: docMethodOp(function(line, ch, options) {
      setSimpleSelection(this, clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line), null, options);
    }),
    setSelection: docMethodOp(function(anchor, head, options) {
      setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options);
    }),
    extendSelection: docMethodOp(function(head, other, options) {
      extendSelection(this, clipPos(this, head), other && clipPos(this, other), options);
    }),
    extendSelections: docMethodOp(function(heads, options) {
      extendSelections(this, clipPosArray(this, heads), options);
    }),
    extendSelectionsBy: docMethodOp(function(f, options) {
      var heads = map(this.sel.ranges, f);
      extendSelections(this, clipPosArray(this, heads), options);
    }),
    setSelections: docMethodOp(function(ranges, primary, options) {
      if (!ranges.length) { return }
      var out = [];
      for (var i = 0; i < ranges.length; i++)
        { out[i] = new Range(clipPos(this, ranges[i].anchor),
                           clipPos(this, ranges[i].head)); }
      if (primary == null) { primary = Math.min(ranges.length - 1, this.sel.primIndex); }
      setSelection(this, normalizeSelection(this.cm, out, primary), options);
    }),
    addSelection: docMethodOp(function(anchor, head, options) {
      var ranges = this.sel.ranges.slice(0);
      ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor)));
      setSelection(this, normalizeSelection(this.cm, ranges, ranges.length - 1), options);
    }),

    getSelection: function(lineSep) {
      var ranges = this.sel.ranges, lines;
      for (var i = 0; i < ranges.length; i++) {
        var sel = getBetween(this, ranges[i].from(), ranges[i].to());
        lines = lines ? lines.concat(sel) : sel;
      }
      if (lineSep === false) { return lines }
      else { return lines.join(lineSep || this.lineSeparator()) }
    },
    getSelections: function(lineSep) {
      var parts = [], ranges = this.sel.ranges;
      for (var i = 0; i < ranges.length; i++) {
        var sel = getBetween(this, ranges[i].from(), ranges[i].to());
        if (lineSep !== false) { sel = sel.join(lineSep || this.lineSeparator()); }
        parts[i] = sel;
      }
      return parts
    },
    replaceSelection: function(code, collapse, origin) {
      var dup = [];
      for (var i = 0; i < this.sel.ranges.length; i++)
        { dup[i] = code; }
      this.replaceSelections(dup, collapse, origin || "+input");
    },
    replaceSelections: docMethodOp(function(code, collapse, origin) {
      var changes = [], sel = this.sel;
      for (var i = 0; i < sel.ranges.length; i++) {
        var range = sel.ranges[i];
        changes[i] = {from: range.from(), to: range.to(), text: this.splitLines(code[i]), origin: origin};
      }
      var newSel = collapse && collapse != "end" && computeReplacedSel(this, changes, collapse);
      for (var i$1 = changes.length - 1; i$1 >= 0; i$1--)
        { makeChange(this, changes[i$1]); }
      if (newSel) { setSelectionReplaceHistory(this, newSel); }
      else if (this.cm) { ensureCursorVisible(this.cm); }
    }),
    undo: docMethodOp(function() {makeChangeFromHistory(this, "undo");}),
    redo: docMethodOp(function() {makeChangeFromHistory(this, "redo");}),
    undoSelection: docMethodOp(function() {makeChangeFromHistory(this, "undo", true);}),
    redoSelection: docMethodOp(function() {makeChangeFromHistory(this, "redo", true);}),

    setExtending: function(val) {this.extend = val;},
    getExtending: function() {return this.extend},

    historySize: function() {
      var hist = this.history, done = 0, undone = 0;
      for (var i = 0; i < hist.done.length; i++) { if (!hist.done[i].ranges) { ++done; } }
      for (var i$1 = 0; i$1 < hist.undone.length; i$1++) { if (!hist.undone[i$1].ranges) { ++undone; } }
      return {undo: done, redo: undone}
    },
    clearHistory: function() {
      var this$1 = this;

      this.history = new History(this.history.maxGeneration);
      linkedDocs(this, function (doc) { return doc.history = this$1.history; }, true);
    },

    markClean: function() {
      this.cleanGeneration = this.changeGeneration(true);
    },
    changeGeneration: function(forceSplit) {
      if (forceSplit)
        { this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null; }
      return this.history.generation
    },
    isClean: function (gen) {
      return this.history.generation == (gen || this.cleanGeneration)
    },

    getHistory: function() {
      return {done: copyHistoryArray(this.history.done),
              undone: copyHistoryArray(this.history.undone)}
    },
    setHistory: function(histData) {
      var hist = this.history = new History(this.history.maxGeneration);
      hist.done = copyHistoryArray(histData.done.slice(0), null, true);
      hist.undone = copyHistoryArray(histData.undone.slice(0), null, true);
    },

    setGutterMarker: docMethodOp(function(line, gutterID, value) {
      return changeLine(this, line, "gutter", function (line) {
        var markers = line.gutterMarkers || (line.gutterMarkers = {});
        markers[gutterID] = value;
        if (!value && isEmpty(markers)) { line.gutterMarkers = null; }
        return true
      })
    }),

    clearGutter: docMethodOp(function(gutterID) {
      var this$1 = this;

      this.iter(function (line) {
        if (line.gutterMarkers && line.gutterMarkers[gutterID]) {
          changeLine(this$1, line, "gutter", function () {
            line.gutterMarkers[gutterID] = null;
            if (isEmpty(line.gutterMarkers)) { line.gutterMarkers = null; }
            return true
          });
        }
      });
    }),

    lineInfo: function(line) {
      var n;
      if (typeof line == "number") {
        if (!isLine(this, line)) { return null }
        n = line;
        line = getLine(this, line);
        if (!line) { return null }
      } else {
        n = lineNo(line);
        if (n == null) { return null }
      }
      return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,
              textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass,
              widgets: line.widgets}
    },

    addLineClass: docMethodOp(function(handle, where, cls) {
      return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function (line) {
        var prop = where == "text" ? "textClass"
                 : where == "background" ? "bgClass"
                 : where == "gutter" ? "gutterClass" : "wrapClass";
        if (!line[prop]) { line[prop] = cls; }
        else if (classTest(cls).test(line[prop])) { return false }
        else { line[prop] += " " + cls; }
        return true
      })
    }),
    removeLineClass: docMethodOp(function(handle, where, cls) {
      return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function (line) {
        var prop = where == "text" ? "textClass"
                 : where == "background" ? "bgClass"
                 : where == "gutter" ? "gutterClass" : "wrapClass";
        var cur = line[prop];
        if (!cur) { return false }
        else if (cls == null) { line[prop] = null; }
        else {
          var found = cur.match(classTest(cls));
          if (!found) { return false }
          var end = found.index + found[0].length;
          line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null;
        }
        return true
      })
    }),

    addLineWidget: docMethodOp(function(handle, node, options) {
      return addLineWidget(this, handle, node, options)
    }),
    removeLineWidget: function(widget) { widget.clear(); },

    markText: function(from, to, options) {
      return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || "range")
    },
    setBookmark: function(pos, options) {
      var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),
                      insertLeft: options && options.insertLeft,
                      clearWhenEmpty: false, shared: options && options.shared,
                      handleMouseEvents: options && options.handleMouseEvents};
      pos = clipPos(this, pos);
      return markText(this, pos, pos, realOpts, "bookmark")
    },
    findMarksAt: function(pos) {
      pos = clipPos(this, pos);
      var markers = [], spans = getLine(this, pos.line).markedSpans;
      if (spans) { for (var i = 0; i < spans.length; ++i) {
        var span = spans[i];
        if ((span.from == null || span.from <= pos.ch) &&
            (span.to == null || span.to >= pos.ch))
          { markers.push(span.marker.parent || span.marker); }
      } }
      return markers
    },
    findMarks: function(from, to, filter) {
      from = clipPos(this, from); to = clipPos(this, to);
      var found = [], lineNo = from.line;
      this.iter(from.line, to.line + 1, function (line) {
        var spans = line.markedSpans;
        if (spans) { for (var i = 0; i < spans.length; i++) {
          var span = spans[i];
          if (!(span.to != null && lineNo == from.line && from.ch >= span.to ||
                span.from == null && lineNo != from.line ||
                span.from != null && lineNo == to.line && span.from >= to.ch) &&
              (!filter || filter(span.marker)))
            { found.push(span.marker.parent || span.marker); }
        } }
        ++lineNo;
      });
      return found
    },
    getAllMarks: function() {
      var markers = [];
      this.iter(function (line) {
        var sps = line.markedSpans;
        if (sps) { for (var i = 0; i < sps.length; ++i)
          { if (sps[i].from != null) { markers.push(sps[i].marker); } } }
      });
      return markers
    },

    posFromIndex: function(off) {
      var ch, lineNo = this.first, sepSize = this.lineSeparator().length;
      this.iter(function (line) {
        var sz = line.text.length + sepSize;
        if (sz > off) { ch = off; return true }
        off -= sz;
        ++lineNo;
      });
      return clipPos(this, Pos(lineNo, ch))
    },
    indexFromPos: function (coords) {
      coords = clipPos(this, coords);
      var index = coords.ch;
      if (coords.line < this.first || coords.ch < 0) { return 0 }
      var sepSize = this.lineSeparator().length;
      this.iter(this.first, coords.line, function (line) { // iter aborts when callback returns a truthy value
        index += line.text.length + sepSize;
      });
      return index
    },

    copy: function(copyHistory) {
      var doc = new Doc(getLines(this, this.first, this.first + this.size),
                        this.modeOption, this.first, this.lineSep, this.direction);
      doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;
      doc.sel = this.sel;
      doc.extend = false;
      if (copyHistory) {
        doc.history.undoDepth = this.history.undoDepth;
        doc.setHistory(this.getHistory());
      }
      return doc
    },

    linkedDoc: function(options) {
      if (!options) { options = {}; }
      var from = this.first, to = this.first + this.size;
      if (options.from != null && options.from > from) { from = options.from; }
      if (options.to != null && options.to < to) { to = options.to; }
      var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep, this.direction);
      if (options.sharedHist) { copy.history = this.history
      ; }(this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});
      copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];
      copySharedMarkers(copy, findSharedMarkers(this));
      return copy
    },
    unlinkDoc: function(other) {
      if (other instanceof CodeMirror) { other = other.doc; }
      if (this.linked) { for (var i = 0; i < this.linked.length; ++i) {
        var link = this.linked[i];
        if (link.doc != other) { continue }
        this.linked.splice(i, 1);
        other.unlinkDoc(this);
        detachSharedMarkers(findSharedMarkers(this));
        break
      } }
      // If the histories were shared, split them again
      if (other.history == this.history) {
        var splitIds = [other.id];
        linkedDocs(other, function (doc) { return splitIds.push(doc.id); }, true);
        other.history = new History(null);
        other.history.done = copyHistoryArray(this.history.done, splitIds);
        other.history.undone = copyHistoryArray(this.history.undone, splitIds);
      }
    },
    iterLinkedDocs: function(f) {linkedDocs(this, f);},

    getMode: function() {return this.mode},
    getEditor: function() {return this.cm},

    splitLines: function(str) {
      if (this.lineSep) { return str.split(this.lineSep) }
      return splitLinesAuto(str)
    },
    lineSeparator: function() { return this.lineSep || "\n" },

    setDirection: docMethodOp(function (dir) {
      if (dir != "rtl") { dir = "ltr"; }
      if (dir == this.direction) { return }
      this.direction = dir;
      this.iter(function (line) { return line.order = null; });
      if (this.cm) { directionChanged(this.cm); }
    })
  });

  // Public alias.
  Doc.prototype.eachLine = Doc.prototype.iter;

  // Kludge to work around strange IE behavior where it'll sometimes
  // re-fire a series of drag-related events right after the drop (#1551)
  var lastDrop = 0;

  function onDrop(e) {
    var cm = this;
    clearDragCursor(cm);
    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e))
      { return }
    e_preventDefault(e);
    if (ie) { lastDrop = +new Date; }
    var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;
    if (!pos || cm.isReadOnly()) { return }
    // Might be a file drop, in which case we simply extract the text
    // and insert it.
    if (files && files.length && window.FileReader && window.File) {
      var n = files.length, text = Array(n), read = 0;
      var markAsReadAndPasteIfAllFilesAreRead = function () {
        if (++read == n) {
          operation(cm, function () {
            pos = clipPos(cm.doc, pos);
            var change = {from: pos, to: pos,
                          text: cm.doc.splitLines(
                              text.filter(function (t) { return t != null; }).join(cm.doc.lineSeparator())),
                          origin: "paste"};
            makeChange(cm.doc, change);
            setSelectionReplaceHistory(cm.doc, simpleSelection(clipPos(cm.doc, pos), clipPos(cm.doc, changeEnd(change))));
          })();
        }
      };
      var readTextFromFile = function (file, i) {
        if (cm.options.allowDropFileTypes &&
            indexOf(cm.options.allowDropFileTypes, file.type) == -1) {
          markAsReadAndPasteIfAllFilesAreRead();
          return
        }
        var reader = new FileReader;
        reader.onerror = function () { return markAsReadAndPasteIfAllFilesAreRead(); };
        reader.onload = function () {
          var content = reader.result;
          if (/[\x00-\x08\x0e-\x1f]{2}/.test(content)) {
            markAsReadAndPasteIfAllFilesAreRead();
            return
          }
          text[i] = content;
          markAsReadAndPasteIfAllFilesAreRead();
        };
        reader.readAsText(file);
      };
      for (var i = 0; i < files.length; i++) { readTextFromFile(files[i], i); }
    } else { // Normal drop
      // Don't do a replace if the drop happened inside of the selected text.
      if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {
        cm.state.draggingText(e);
        // Ensure the editor is re-focused
        setTimeout(function () { return cm.display.input.focus(); }, 20);
        return
      }
      try {
        var text$1 = e.dataTransfer.getData("Text");
        if (text$1) {
          var selected;
          if (cm.state.draggingText && !cm.state.draggingText.copy)
            { selected = cm.listSelections(); }
          setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));
          if (selected) { for (var i$1 = 0; i$1 < selected.length; ++i$1)
            { replaceRange(cm.doc, "", selected[i$1].anchor, selected[i$1].head, "drag"); } }
          cm.replaceSelection(text$1, "around", "paste");
          cm.display.input.focus();
        }
      }
      catch(e$1){}
    }
  }

  function onDragStart(cm, e) {
    if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return }
    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) { return }

    e.dataTransfer.setData("Text", cm.getSelection());
    e.dataTransfer.effectAllowed = "copyMove";

    // Use dummy image instead of default browsers image.
    // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.
    if (e.dataTransfer.setDragImage && !safari) {
      var img = elt("img", null, null, "position: fixed; left: 0; top: 0;");
      img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
      if (presto) {
        img.width = img.height = 1;
        cm.display.wrapper.appendChild(img);
        // Force a relayout, or Opera won't use our image for some obscure reason
        img._top = img.offsetTop;
      }
      e.dataTransfer.setDragImage(img, 0, 0);
      if (presto) { img.parentNode.removeChild(img); }
    }
  }

  function onDragOver(cm, e) {
    var pos = posFromMouse(cm, e);
    if (!pos) { return }
    var frag = document.createDocumentFragment();
    drawSelectionCursor(cm, pos, frag);
    if (!cm.display.dragCursor) {
      cm.display.dragCursor = elt("div", null, "CodeMirror-cursors CodeMirror-dragcursors");
      cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv);
    }
    removeChildrenAndAdd(cm.display.dragCursor, frag);
  }

  function clearDragCursor(cm) {
    if (cm.display.dragCursor) {
      cm.display.lineSpace.removeChild(cm.display.dragCursor);
      cm.display.dragCursor = null;
    }
  }

  // These must be handled carefully, because naively registering a
  // handler for each editor will cause the editors to never be
  // garbage collected.

  function forEachCodeMirror(f) {
    if (!document.getElementsByClassName) { return }
    var byClass = document.getElementsByClassName("CodeMirror"), editors = [];
    for (var i = 0; i < byClass.length; i++) {
      var cm = byClass[i].CodeMirror;
      if (cm) { editors.push(cm); }
    }
    if (editors.length) { editors[0].operation(function () {
      for (var i = 0; i < editors.length; i++) { f(editors[i]); }
    }); }
  }

  var globalsRegistered = false;
  function ensureGlobalHandlers() {
    if (globalsRegistered) { return }
    registerGlobalHandlers();
    globalsRegistered = true;
  }
  function registerGlobalHandlers() {
    // When the window resizes, we need to refresh active editors.
    var resizeTimer;
    on(window, "resize", function () {
      if (resizeTimer == null) { resizeTimer = setTimeout(function () {
        resizeTimer = null;
        forEachCodeMirror(onResize);
      }, 100); }
    });
    // When the window loses focus, we want to show the editor as blurred
    on(window, "blur", function () { return forEachCodeMirror(onBlur); });
  }
  // Called when the window resizes
  function onResize(cm) {
    var d = cm.display;
    // Might be a text scaling operation, clear size caches.
    d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;
    d.scrollbarsClipped = false;
    cm.setSize();
  }

  var keyNames = {
    3: "Pause", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt",
    19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End",
    36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert",
    46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod",
    106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 145: "ScrollLock",
    173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\",
    221: "]", 222: "'", 224: "Mod", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete",
    63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert"
  };

  // Number keys
  for (var i = 0; i < 10; i++) { keyNames[i + 48] = keyNames[i + 96] = String(i); }
  // Alphabetic keys
  for (var i$1 = 65; i$1 <= 90; i$1++) { keyNames[i$1] = String.fromCharCode(i$1); }
  // Function keys
  for (var i$2 = 1; i$2 <= 12; i$2++) { keyNames[i$2 + 111] = keyNames[i$2 + 63235] = "F" + i$2; }

  var keyMap = {};

  keyMap.basic = {
    "Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown",
    "End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown",
    "Delete": "delCharAfter", "Backspace": "delCharBefore", "Shift-Backspace": "delCharBefore",
    "Tab": "defaultTab", "Shift-Tab": "indentAuto",
    "Enter": "newlineAndIndent", "Insert": "toggleOverwrite",
    "Esc": "singleSelection"
  };
  // Note that the save and find-related commands aren't defined by
  // default. User code or addons can define them. Unknown commands
  // are simply ignored.
  keyMap.pcDefault = {
    "Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo",
    "Ctrl-Home": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Up": "goLineUp", "Ctrl-Down": "goLineDown",
    "Ctrl-Left": "goGroupLeft", "Ctrl-Right": "goGroupRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd",
    "Ctrl-Backspace": "delGroupBefore", "Ctrl-Delete": "delGroupAfter", "Ctrl-S": "save", "Ctrl-F": "find",
    "Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll",
    "Ctrl-[": "indentLess", "Ctrl-]": "indentMore",
    "Ctrl-U": "undoSelection", "Shift-Ctrl-U": "redoSelection", "Alt-U": "redoSelection",
    "fallthrough": "basic"
  };
  // Very basic readline/emacs-style bindings, which are standard on Mac.
  keyMap.emacsy = {
    "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown",
    "Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd",
    "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore",
    "Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars",
    "Ctrl-O": "openLine"
  };
  keyMap.macDefault = {
    "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo",
    "Cmd-Home": "goDocStart", "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft",
    "Alt-Right": "goGroupRight", "Cmd-Left": "goLineLeft", "Cmd-Right": "goLineRight", "Alt-Backspace": "delGroupBefore",
    "Ctrl-Alt-Backspace": "delGroupAfter", "Alt-Delete": "delGroupAfter", "Cmd-S": "save", "Cmd-F": "find",
    "Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll",
    "Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delWrappedLineLeft", "Cmd-Delete": "delWrappedLineRight",
    "Cmd-U": "undoSelection", "Shift-Cmd-U": "redoSelection", "Ctrl-Up": "goDocStart", "Ctrl-Down": "goDocEnd",
    "fallthrough": ["basic", "emacsy"]
  };
  keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault;

  // KEYMAP DISPATCH

  function normalizeKeyName(name) {
    var parts = name.split(/-(?!$)/);
    name = parts[parts.length - 1];
    var alt, ctrl, shift, cmd;
    for (var i = 0; i < parts.length - 1; i++) {
      var mod = parts[i];
      if (/^(cmd|meta|m)$/i.test(mod)) { cmd = true; }
      else if (/^a(lt)?$/i.test(mod)) { alt = true; }
      else if (/^(c|ctrl|control)$/i.test(mod)) { ctrl = true; }
      else if (/^s(hift)?$/i.test(mod)) { shift = true; }
      else { throw new Error("Unrecognized modifier name: " + mod) }
    }
    if (alt) { name = "Alt-" + name; }
    if (ctrl) { name = "Ctrl-" + name; }
    if (cmd) { name = "Cmd-" + name; }
    if (shift) { name = "Shift-" + name; }
    return name
  }

  // This is a kludge to keep keymaps mostly working as raw objects
  // (backwards compatibility) while at the same time support features
  // like normalization and multi-stroke key bindings. It compiles a
  // new normalized keymap, and then updates the old object to reflect
  // this.
  function normalizeKeyMap(keymap) {
    var copy = {};
    for (var keyname in keymap) { if (keymap.hasOwnProperty(keyname)) {
      var value = keymap[keyname];
      if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) { continue }
      if (value == "...") { delete keymap[keyname]; continue }

      var keys = map(keyname.split(" "), normalizeKeyName);
      for (var i = 0; i < keys.length; i++) {
        var val = (void 0), name = (void 0);
        if (i == keys.length - 1) {
          name = keys.join(" ");
          val = value;
        } else {
          name = keys.slice(0, i + 1).join(" ");
          val = "...";
        }
        var prev = copy[name];
        if (!prev) { copy[name] = val; }
        else if (prev != val) { throw new Error("Inconsistent bindings for " + name) }
      }
      delete keymap[keyname];
    } }
    for (var prop in copy) { keymap[prop] = copy[prop]; }
    return keymap
  }

  function lookupKey(key, map, handle, context) {
    map = getKeyMap(map);
    var found = map.call ? map.call(key, context) : map[key];
    if (found === false) { return "nothing" }
    if (found === "...") { return "multi" }
    if (found != null && handle(found)) { return "handled" }

    if (map.fallthrough) {
      if (Object.prototype.toString.call(map.fallthrough) != "[object Array]")
        { return lookupKey(key, map.fallthrough, handle, context) }
      for (var i = 0; i < map.fallthrough.length; i++) {
        var result = lookupKey(key, map.fallthrough[i], handle, context);
        if (result) { return result }
      }
    }
  }

  // Modifier key presses don't count as 'real' key presses for the
  // purpose of keymap fallthrough.
  function isModifierKey(value) {
    var name = typeof value == "string" ? value : keyNames[value.keyCode];
    return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod"
  }

  function addModifierNames(name, event, noShift) {
    var base = name;
    if (event.altKey && base != "Alt") { name = "Alt-" + name; }
    if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") { name = "Ctrl-" + name; }
    if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Mod") { name = "Cmd-" + name; }
    if (!noShift && event.shiftKey && base != "Shift") { name = "Shift-" + name; }
    return name
  }

  // Look up the name of a key as indicated by an event object.
  function keyName(event, noShift) {
    if (presto && event.keyCode == 34 && event["char"]) { return false }
    var name = keyNames[event.keyCode];
    if (name == null || event.altGraphKey) { return false }
    // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause,
    // so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+)
    if (event.keyCode == 3 && event.code) { name = event.code; }
    return addModifierNames(name, event, noShift)
  }

  function getKeyMap(val) {
    return typeof val == "string" ? keyMap[val] : val
  }

  // Helper for deleting text near the selection(s), used to implement
  // backspace, delete, and similar functionality.
  function deleteNearSelection(cm, compute) {
    var ranges = cm.doc.sel.ranges, kill = [];
    // Build up a set of ranges to kill first, merging overlapping
    // ranges.
    for (var i = 0; i < ranges.length; i++) {
      var toKill = compute(ranges[i]);
      while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) {
        var replaced = kill.pop();
        if (cmp(replaced.from, toKill.from) < 0) {
          toKill.from = replaced.from;
          break
        }
      }
      kill.push(toKill);
    }
    // Next, remove those actual ranges.
    runInOp(cm, function () {
      for (var i = kill.length - 1; i >= 0; i--)
        { replaceRange(cm.doc, "", kill[i].from, kill[i].to, "+delete"); }
      ensureCursorVisible(cm);
    });
  }

  function moveCharLogically(line, ch, dir) {
    var target = skipExtendingChars(line.text, ch + dir, dir);
    return target < 0 || target > line.text.length ? null : target
  }

  function moveLogically(line, start, dir) {
    var ch = moveCharLogically(line, start.ch, dir);
    return ch == null ? null : new Pos(start.line, ch, dir < 0 ? "after" : "before")
  }

  function endOfLine(visually, cm, lineObj, lineNo, dir) {
    if (visually) {
      if (cm.doc.direction == "rtl") { dir = -dir; }
      var order = getOrder(lineObj, cm.doc.direction);
      if (order) {
        var part = dir < 0 ? lst(order) : order[0];
        var moveInStorageOrder = (dir < 0) == (part.level == 1);
        var sticky = moveInStorageOrder ? "after" : "before";
        var ch;
        // With a wrapped rtl chunk (possibly spanning multiple bidi parts),
        // it could be that the last bidi part is not on the last visual line,
        // since visual lines contain content order-consecutive chunks.
        // Thus, in rtl, we are looking for the first (content-order) character
        // in the rtl chunk that is on the last line (that is, the same line
        // as the last (content-order) character).
        if (part.level > 0 || cm.doc.direction == "rtl") {
          var prep = prepareMeasureForLine(cm, lineObj);
          ch = dir < 0 ? lineObj.text.length - 1 : 0;
          var targetTop = measureCharPrepared(cm, prep, ch).top;
          ch = findFirst(function (ch) { return measureCharPrepared(cm, prep, ch).top == targetTop; }, (dir < 0) == (part.level == 1) ? part.from : part.to - 1, ch);
          if (sticky == "before") { ch = moveCharLogically(lineObj, ch, 1); }
        } else { ch = dir < 0 ? part.to : part.from; }
        return new Pos(lineNo, ch, sticky)
      }
    }
    return new Pos(lineNo, dir < 0 ? lineObj.text.length : 0, dir < 0 ? "before" : "after")
  }

  function moveVisually(cm, line, start, dir) {
    var bidi = getOrder(line, cm.doc.direction);
    if (!bidi) { return moveLogically(line, start, dir) }
    if (start.ch >= line.text.length) {
      start.ch = line.text.length;
      start.sticky = "before";
    } else if (start.ch <= 0) {
      start.ch = 0;
      start.sticky = "after";
    }
    var partPos = getBidiPartAt(bidi, start.ch, start.sticky), part = bidi[partPos];
    if (cm.doc.direction == "ltr" && part.level % 2 == 0 && (dir > 0 ? part.to > start.ch : part.from < start.ch)) {
      // Case 1: We move within an ltr part in an ltr editor. Even with wrapped lines,
      // nothing interesting happens.
      return moveLogically(line, start, dir)
    }

    var mv = function (pos, dir) { return moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir); };
    var prep;
    var getWrappedLineExtent = function (ch) {
      if (!cm.options.lineWrapping) { return {begin: 0, end: line.text.length} }
      prep = prep || prepareMeasureForLine(cm, line);
      return wrappedLineExtentChar(cm, line, prep, ch)
    };
    var wrappedLineExtent = getWrappedLineExtent(start.sticky == "before" ? mv(start, -1) : start.ch);

    if (cm.doc.direction == "rtl" || part.level == 1) {
      var moveInStorageOrder = (part.level == 1) == (dir < 0);
      var ch = mv(start, moveInStorageOrder ? 1 : -1);
      if (ch != null && (!moveInStorageOrder ? ch >= part.from && ch >= wrappedLineExtent.begin : ch <= part.to && ch <= wrappedLineExtent.end)) {
        // Case 2: We move within an rtl part or in an rtl editor on the same visual line
        var sticky = moveInStorageOrder ? "before" : "after";
        return new Pos(start.line, ch, sticky)
      }
    }

    // Case 3: Could not move within this bidi part in this visual line, so leave
    // the current bidi part

    var searchInVisualLine = function (partPos, dir, wrappedLineExtent) {
      var getRes = function (ch, moveInStorageOrder) { return moveInStorageOrder
        ? new Pos(start.line, mv(ch, 1), "before")
        : new Pos(start.line, ch, "after"); };

      for (; partPos >= 0 && partPos < bidi.length; partPos += dir) {
        var part = bidi[partPos];
        var moveInStorageOrder = (dir > 0) == (part.level != 1);
        var ch = moveInStorageOrder ? wrappedLineExtent.begin : mv(wrappedLineExtent.end, -1);
        if (part.from <= ch && ch < part.to) { return getRes(ch, moveInStorageOrder) }
        ch = moveInStorageOrder ? part.from : mv(part.to, -1);
        if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) { return getRes(ch, moveInStorageOrder) }
      }
    };

    // Case 3a: Look for other bidi parts on the same visual line
    var res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent);
    if (res) { return res }

    // Case 3b: Look for other bidi parts on the next visual line
    var nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1);
    if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) {
      res = searchInVisualLine(dir > 0 ? 0 : bidi.length - 1, dir, getWrappedLineExtent(nextCh));
      if (res) { return res }
    }

    // Case 4: Nowhere to move
    return null
  }

  // Commands are parameter-less actions that can be performed on an
  // editor, mostly used for keybindings.
  var commands = {
    selectAll: selectAll,
    singleSelection: function (cm) { return cm.setSelection(cm.getCursor("anchor"), cm.getCursor("head"), sel_dontScroll); },
    killLine: function (cm) { return deleteNearSelection(cm, function (range) {
      if (range.empty()) {
        var len = getLine(cm.doc, range.head.line).text.length;
        if (range.head.ch == len && range.head.line < cm.lastLine())
          { return {from: range.head, to: Pos(range.head.line + 1, 0)} }
        else
          { return {from: range.head, to: Pos(range.head.line, len)} }
      } else {
        return {from: range.from(), to: range.to()}
      }
    }); },
    deleteLine: function (cm) { return deleteNearSelection(cm, function (range) { return ({
      from: Pos(range.from().line, 0),
      to: clipPos(cm.doc, Pos(range.to().line + 1, 0))
    }); }); },
    delLineLeft: function (cm) { return deleteNearSelection(cm, function (range) { return ({
      from: Pos(range.from().line, 0), to: range.from()
    }); }); },
    delWrappedLineLeft: function (cm) { return deleteNearSelection(cm, function (range) {
      var top = cm.charCoords(range.head, "div").top + 5;
      var leftPos = cm.coordsChar({left: 0, top: top}, "div");
      return {from: leftPos, to: range.from()}
    }); },
    delWrappedLineRight: function (cm) { return deleteNearSelection(cm, function (range) {
      var top = cm.charCoords(range.head, "div").top + 5;
      var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div");
      return {from: range.from(), to: rightPos }
    }); },
    undo: function (cm) { return cm.undo(); },
    redo: function (cm) { return cm.redo(); },
    undoSelection: function (cm) { return cm.undoSelection(); },
    redoSelection: function (cm) { return cm.redoSelection(); },
    goDocStart: function (cm) { return cm.extendSelection(Pos(cm.firstLine(), 0)); },
    goDocEnd: function (cm) { return cm.extendSelection(Pos(cm.lastLine())); },
    goLineStart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStart(cm, range.head.line); },
      {origin: "+move", bias: 1}
    ); },
    goLineStartSmart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStartSmart(cm, range.head); },
      {origin: "+move", bias: 1}
    ); },
    goLineEnd: function (cm) { return cm.extendSelectionsBy(function (range) { return lineEnd(cm, range.head.line); },
      {origin: "+move", bias: -1}
    ); },
    goLineRight: function (cm) { return cm.extendSelectionsBy(function (range) {
      var top = cm.cursorCoords(range.head, "div").top + 5;
      return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div")
    }, sel_move); },
    goLineLeft: function (cm) { return cm.extendSelectionsBy(function (range) {
      var top = cm.cursorCoords(range.head, "div").top + 5;
      return cm.coordsChar({left: 0, top: top}, "div")
    }, sel_move); },
    goLineLeftSmart: function (cm) { return cm.extendSelectionsBy(function (range) {
      var top = cm.cursorCoords(range.head, "div").top + 5;
      var pos = cm.coordsChar({left: 0, top: top}, "div");
      if (pos.ch < cm.getLine(pos.line).search(/\S/)) { return lineStartSmart(cm, range.head) }
      return pos
    }, sel_move); },
    goLineUp: function (cm) { return cm.moveV(-1, "line"); },
    goLineDown: function (cm) { return cm.moveV(1, "line"); },
    goPageUp: function (cm) { return cm.moveV(-1, "page"); },
    goPageDown: function (cm) { return cm.moveV(1, "page"); },
    goCharLeft: function (cm) { return cm.moveH(-1, "char"); },
    goCharRight: function (cm) { return cm.moveH(1, "char"); },
    goColumnLeft: function (cm) { return cm.moveH(-1, "column"); },
    goColumnRight: function (cm) { return cm.moveH(1, "column"); },
    goWordLeft: function (cm) { return cm.moveH(-1, "word"); },
    goGroupRight: function (cm) { return cm.moveH(1, "group"); },
    goGroupLeft: function (cm) { return cm.moveH(-1, "group"); },
    goWordRight: function (cm) { return cm.moveH(1, "word"); },
    delCharBefore: function (cm) { return cm.deleteH(-1, "codepoint"); },
    delCharAfter: function (cm) { return cm.deleteH(1, "char"); },
    delWordBefore: function (cm) { return cm.deleteH(-1, "word"); },
    delWordAfter: function (cm) { return cm.deleteH(1, "word"); },
    delGroupBefore: function (cm) { return cm.deleteH(-1, "group"); },
    delGroupAfter: function (cm) { return cm.deleteH(1, "group"); },
    indentAuto: function (cm) { return cm.indentSelection("smart"); },
    indentMore: function (cm) { return cm.indentSelection("add"); },
    indentLess: function (cm) { return cm.indentSelection("subtract"); },
    insertTab: function (cm) { return cm.replaceSelection("\t"); },
    insertSoftTab: function (cm) {
      var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize;
      for (var i = 0; i < ranges.length; i++) {
        var pos = ranges[i].from();
        var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);
        spaces.push(spaceStr(tabSize - col % tabSize));
      }
      cm.replaceSelections(spaces);
    },
    defaultTab: function (cm) {
      if (cm.somethingSelected()) { cm.indentSelection("add"); }
      else { cm.execCommand("insertTab"); }
    },
    // Swap the two chars left and right of each selection's head.
    // Move cursor behind the two swapped characters afterwards.
    //
    // Doesn't consider line feeds a character.
    // Doesn't scan more than one line above to find a character.
    // Doesn't do anything on an empty line.
    // Doesn't do anything with non-empty selections.
    transposeChars: function (cm) { return runInOp(cm, function () {
      var ranges = cm.listSelections(), newSel = [];
      for (var i = 0; i < ranges.length; i++) {
        if (!ranges[i].empty()) { continue }
        var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text;
        if (line) {
          if (cur.ch == line.length) { cur = new Pos(cur.line, cur.ch - 1); }
          if (cur.ch > 0) {
            cur = new Pos(cur.line, cur.ch + 1);
            cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),
                            Pos(cur.line, cur.ch - 2), cur, "+transpose");
          } else if (cur.line > cm.doc.first) {
            var prev = getLine(cm.doc, cur.line - 1).text;
            if (prev) {
              cur = new Pos(cur.line, 1);
              cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() +
                              prev.charAt(prev.length - 1),
                              Pos(cur.line - 1, prev.length - 1), cur, "+transpose");
            }
          }
        }
        newSel.push(new Range(cur, cur));
      }
      cm.setSelections(newSel);
    }); },
    newlineAndIndent: function (cm) { return runInOp(cm, function () {
      var sels = cm.listSelections();
      for (var i = sels.length - 1; i >= 0; i--)
        { cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, "+input"); }
      sels = cm.listSelections();
      for (var i$1 = 0; i$1 < sels.length; i$1++)
        { cm.indentLine(sels[i$1].from().line, null, true); }
      ensureCursorVisible(cm);
    }); },
    openLine: function (cm) { return cm.replaceSelection("\n", "start"); },
    toggleOverwrite: function (cm) { return cm.toggleOverwrite(); }
  };


  function lineStart(cm, lineN) {
    var line = getLine(cm.doc, lineN);
    var visual = visualLine(line);
    if (visual != line) { lineN = lineNo(visual); }
    return endOfLine(true, cm, visual, lineN, 1)
  }
  function lineEnd(cm, lineN) {
    var line = getLine(cm.doc, lineN);
    var visual = visualLineEnd(line);
    if (visual != line) { lineN = lineNo(visual); }
    return endOfLine(true, cm, line, lineN, -1)
  }
  function lineStartSmart(cm, pos) {
    var start = lineStart(cm, pos.line);
    var line = getLine(cm.doc, start.line);
    var order = getOrder(line, cm.doc.direction);
    if (!order || order[0].level == 0) {
      var firstNonWS = Math.max(start.ch, line.text.search(/\S/));
      var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch;
      return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky)
    }
    return start
  }

  // Run a handler that was bound to a key.
  function doHandleBinding(cm, bound, dropShift) {
    if (typeof bound == "string") {
      bound = commands[bound];
      if (!bound) { return false }
    }
    // Ensure previous input has been read, so that the handler sees a
    // consistent view of the document
    cm.display.input.ensurePolled();
    var prevShift = cm.display.shift, done = false;
    try {
      if (cm.isReadOnly()) { cm.state.suppressEdits = true; }
      if (dropShift) { cm.display.shift = false; }
      done = bound(cm) != Pass;
    } finally {
      cm.display.shift = prevShift;
      cm.state.suppressEdits = false;
    }
    return done
  }

  function lookupKeyForEditor(cm, name, handle) {
    for (var i = 0; i < cm.state.keyMaps.length; i++) {
      var result = lookupKey(name, cm.state.keyMaps[i], handle, cm);
      if (result) { return result }
    }
    return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm))
      || lookupKey(name, cm.options.keyMap, handle, cm)
  }

  // Note that, despite the name, this function is also used to check
  // for bound mouse clicks.

  var stopSeq = new Delayed;

  function dispatchKey(cm, name, e, handle) {
    var seq = cm.state.keySeq;
    if (seq) {
      if (isModifierKey(name)) { return "handled" }
      if (/\'$/.test(name))
        { cm.state.keySeq = null; }
      else
        { stopSeq.set(50, function () {
          if (cm.state.keySeq == seq) {
            cm.state.keySeq = null;
            cm.display.input.reset();
          }
        }); }
      if (dispatchKeyInner(cm, seq + " " + name, e, handle)) { return true }
    }
    return dispatchKeyInner(cm, name, e, handle)
  }

  function dispatchKeyInner(cm, name, e, handle) {
    var result = lookupKeyForEditor(cm, name, handle);

    if (result == "multi")
      { cm.state.keySeq = name; }
    if (result == "handled")
      { signalLater(cm, "keyHandled", cm, name, e); }

    if (result == "handled" || result == "multi") {
      e_preventDefault(e);
      restartBlink(cm);
    }

    return !!result
  }

  // Handle a key from the keydown event.
  function handleKeyBinding(cm, e) {
    var name = keyName(e, true);
    if (!name) { return false }

    if (e.shiftKey && !cm.state.keySeq) {
      // First try to resolve full name (including 'Shift-'). Failing
      // that, see if there is a cursor-motion command (starting with
      // 'go') bound to the keyname without 'Shift-'.
      return dispatchKey(cm, "Shift-" + name, e, function (b) { return doHandleBinding(cm, b, true); })
          || dispatchKey(cm, name, e, function (b) {
               if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion)
                 { return doHandleBinding(cm, b) }
             })
    } else {
      return dispatchKey(cm, name, e, function (b) { return doHandleBinding(cm, b); })
    }
  }

  // Handle a key from the keypress event
  function handleCharBinding(cm, e, ch) {
    return dispatchKey(cm, "'" + ch + "'", e, function (b) { return doHandleBinding(cm, b, true); })
  }

  var lastStoppedKey = null;
  function onKeyDown(e) {
    var cm = this;
    if (e.target && e.target != cm.display.input.getField()) { return }
    cm.curOp.focus = activeElt();
    if (signalDOMEvent(cm, e)) { return }
    // IE does strange things with escape.
    if (ie && ie_version < 11 && e.keyCode == 27) { e.returnValue = false; }
    var code = e.keyCode;
    cm.display.shift = code == 16 || e.shiftKey;
    var handled = handleKeyBinding(cm, e);
    if (presto) {
      lastStoppedKey = handled ? code : null;
      // Opera has no cut event... we try to at least catch the key combo
      if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))
        { cm.replaceSelection("", null, "cut"); }
    }
    if (gecko && !mac && !handled && code == 46 && e.shiftKey && !e.ctrlKey && document.execCommand)
      { document.execCommand("cut"); }

    // Turn mouse into crosshair when Alt is held on Mac.
    if (code == 18 && !/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className))
      { showCrossHair(cm); }
  }

  function showCrossHair(cm) {
    var lineDiv = cm.display.lineDiv;
    addClass(lineDiv, "CodeMirror-crosshair");

    function up(e) {
      if (e.keyCode == 18 || !e.altKey) {
        rmClass(lineDiv, "CodeMirror-crosshair");
        off(document, "keyup", up);
        off(document, "mouseover", up);
      }
    }
    on(document, "keyup", up);
    on(document, "mouseover", up);
  }

  function onKeyUp(e) {
    if (e.keyCode == 16) { this.doc.sel.shift = false; }
    signalDOMEvent(this, e);
  }

  function onKeyPress(e) {
    var cm = this;
    if (e.target && e.target != cm.display.input.getField()) { return }
    if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) { return }
    var keyCode = e.keyCode, charCode = e.charCode;
    if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return}
    if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) { return }
    var ch = String.fromCharCode(charCode == null ? keyCode : charCode);
    // Some browsers fire keypress events for backspace
    if (ch == "\x08") { return }
    if (handleCharBinding(cm, e, ch)) { return }
    cm.display.input.onKeyPress(e);
  }

  var DOUBLECLICK_DELAY = 400;

  var PastClick = function(time, pos, button) {
    this.time = time;
    this.pos = pos;
    this.button = button;
  };

  PastClick.prototype.compare = function (time, pos, button) {
    return this.time + DOUBLECLICK_DELAY > time &&
      cmp(pos, this.pos) == 0 && button == this.button
  };

  var lastClick, lastDoubleClick;
  function clickRepeat(pos, button) {
    var now = +new Date;
    if (lastDoubleClick && lastDoubleClick.compare(now, pos, button)) {
      lastClick = lastDoubleClick = null;
      return "triple"
    } else if (lastClick && lastClick.compare(now, pos, button)) {
      lastDoubleClick = new PastClick(now, pos, button);
      lastClick = null;
      return "double"
    } else {
      lastClick = new PastClick(now, pos, button);
      lastDoubleClick = null;
      return "single"
    }
  }

  // A mouse down can be a single click, double click, triple click,
  // start of selection drag, start of text drag, new cursor
  // (ctrl-click), rectangle drag (alt-drag), or xwin
  // middle-click-paste. Or it might be a click on something we should
  // not interfere with, such as a scrollbar or widget.
  function onMouseDown(e) {
    var cm = this, display = cm.display;
    if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) { return }
    display.input.ensurePolled();
    display.shift = e.shiftKey;

    if (eventInWidget(display, e)) {
      if (!webkit) {
        // Briefly turn off draggability, to allow widgets to do
        // normal dragging things.
        display.scroller.draggable = false;
        setTimeout(function () { return display.scroller.draggable = true; }, 100);
      }
      return
    }
    if (clickInGutter(cm, e)) { return }
    var pos = posFromMouse(cm, e), button = e_button(e), repeat = pos ? clickRepeat(pos, button) : "single";
    window.focus();

    // #3261: make sure, that we're not starting a second selection
    if (button == 1 && cm.state.selectingText)
      { cm.state.selectingText(e); }

    if (pos && handleMappedButton(cm, button, pos, repeat, e)) { return }

    if (button == 1) {
      if (pos) { leftButtonDown(cm, pos, repeat, e); }
      else if (e_target(e) == display.scroller) { e_preventDefault(e); }
    } else if (button == 2) {
      if (pos) { extendSelection(cm.doc, pos); }
      setTimeout(function () { return display.input.focus(); }, 20);
    } else if (button == 3) {
      if (captureRightClick) { cm.display.input.onContextMenu(e); }
      else { delayBlurEvent(cm); }
    }
  }

  function handleMappedButton(cm, button, pos, repeat, event) {
    var name = "Click";
    if (repeat == "double") { name = "Double" + name; }
    else if (repeat == "triple") { name = "Triple" + name; }
    name = (button == 1 ? "Left" : button == 2 ? "Middle" : "Right") + name;

    return dispatchKey(cm,  addModifierNames(name, event), event, function (bound) {
      if (typeof bound == "string") { bound = commands[bound]; }
      if (!bound) { return false }
      var done = false;
      try {
        if (cm.isReadOnly()) { cm.state.suppressEdits = true; }
        done = bound(cm, pos) != Pass;
      } finally {
        cm.state.suppressEdits = false;
      }
      return done
    })
  }

  function configureMouse(cm, repeat, event) {
    var option = cm.getOption("configureMouse");
    var value = option ? option(cm, repeat, event) : {};
    if (value.unit == null) {
      var rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey;
      value.unit = rect ? "rectangle" : repeat == "single" ? "char" : repeat == "double" ? "word" : "line";
    }
    if (value.extend == null || cm.doc.extend) { value.extend = cm.doc.extend || event.shiftKey; }
    if (value.addNew == null) { value.addNew = mac ? event.metaKey : event.ctrlKey; }
    if (value.moveOnDrag == null) { value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey); }
    return value
  }

  function leftButtonDown(cm, pos, repeat, event) {
    if (ie) { setTimeout(bind(ensureFocus, cm), 0); }
    else { cm.curOp.focus = activeElt(); }

    var behavior = configureMouse(cm, repeat, event);

    var sel = cm.doc.sel, contained;
    if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() &&
        repeat == "single" && (contained = sel.contains(pos)) > -1 &&
        (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) &&
        (cmp(contained.to(), pos) > 0 || pos.xRel < 0))
      { leftButtonStartDrag(cm, event, pos, behavior); }
    else
      { leftButtonSelect(cm, event, pos, behavior); }
  }

  // Start a text drag. When it ends, see if any dragging actually
  // happen, and treat as a click if it didn't.
  function leftButtonStartDrag(cm, event, pos, behavior) {
    var display = cm.display, moved = false;
    var dragEnd = operation(cm, function (e) {
      if (webkit) { display.scroller.draggable = false; }
      cm.state.draggingText = false;
      if (cm.state.delayingBlurEvent) {
        if (cm.hasFocus()) { cm.state.delayingBlurEvent = false; }
        else { delayBlurEvent(cm); }
      }
      off(display.wrapper.ownerDocument, "mouseup", dragEnd);
      off(display.wrapper.ownerDocument, "mousemove", mouseMove);
      off(display.scroller, "dragstart", dragStart);
      off(display.scroller, "drop", dragEnd);
      if (!moved) {
        e_preventDefault(e);
        if (!behavior.addNew)
          { extendSelection(cm.doc, pos, null, null, behavior.extend); }
        // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)
        if ((webkit && !safari) || ie && ie_version == 9)
          { setTimeout(function () {display.wrapper.ownerDocument.body.focus({preventScroll: true}); display.input.focus();}, 20); }
        else
          { display.input.focus(); }
      }
    });
    var mouseMove = function(e2) {
      moved = moved || Math.abs(event.clientX - e2.clientX) + Math.abs(event.clientY - e2.clientY) >= 10;
    };
    var dragStart = function () { return moved = true; };
    // Let the drag handler handle this.
    if (webkit) { display.scroller.draggable = true; }
    cm.state.draggingText = dragEnd;
    dragEnd.copy = !behavior.moveOnDrag;
    on(display.wrapper.ownerDocument, "mouseup", dragEnd);
    on(display.wrapper.ownerDocument, "mousemove", mouseMove);
    on(display.scroller, "dragstart", dragStart);
    on(display.scroller, "drop", dragEnd);

    cm.state.delayingBlurEvent = true;
    setTimeout(function () { return display.input.focus(); }, 20);
    // IE's approach to draggable
    if (display.scroller.dragDrop) { display.scroller.dragDrop(); }
  }

  function rangeForUnit(cm, pos, unit) {
    if (unit == "char") { return new Range(pos, pos) }
    if (unit == "word") { return cm.findWordAt(pos) }
    if (unit == "line") { return new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))) }
    var result = unit(cm, pos);
    return new Range(result.from, result.to)
  }

  // Normal selection, as opposed to text dragging.
  function leftButtonSelect(cm, event, start, behavior) {
    if (ie) { delayBlurEvent(cm); }
    var display = cm.display, doc = cm.doc;
    e_preventDefault(event);

    var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;
    if (behavior.addNew && !behavior.extend) {
      ourIndex = doc.sel.contains(start);
      if (ourIndex > -1)
        { ourRange = ranges[ourIndex]; }
      else
        { ourRange = new Range(start, start); }
    } else {
      ourRange = doc.sel.primary();
      ourIndex = doc.sel.primIndex;
    }

    if (behavior.unit == "rectangle") {
      if (!behavior.addNew) { ourRange = new Range(start, start); }
      start = posFromMouse(cm, event, true, true);
      ourIndex = -1;
    } else {
      var range = rangeForUnit(cm, start, behavior.unit);
      if (behavior.extend)
        { ourRange = extendRange(ourRange, range.anchor, range.head, behavior.extend); }
      else
        { ourRange = range; }
    }

    if (!behavior.addNew) {
      ourIndex = 0;
      setSelection(doc, new Selection([ourRange], 0), sel_mouse);
      startSel = doc.sel;
    } else if (ourIndex == -1) {
      ourIndex = ranges.length;
      setSelection(doc, normalizeSelection(cm, ranges.concat([ourRange]), ourIndex),
                   {scroll: false, origin: "*mouse"});
    } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == "char" && !behavior.extend) {
      setSelection(doc, normalizeSelection(cm, ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),
                   {scroll: false, origin: "*mouse"});
      startSel = doc.sel;
    } else {
      replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);
    }

    var lastPos = start;
    function extendTo(pos) {
      if (cmp(lastPos, pos) == 0) { return }
      lastPos = pos;

      if (behavior.unit == "rectangle") {
        var ranges = [], tabSize = cm.options.tabSize;
        var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);
        var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);
        var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);
        for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));
             line <= end; line++) {
          var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);
          if (left == right)
            { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); }
          else if (text.length > leftPos)
            { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); }
        }
        if (!ranges.length) { ranges.push(new Range(start, start)); }
        setSelection(doc, normalizeSelection(cm, startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),
                     {origin: "*mouse", scroll: false});
        cm.scrollIntoView(pos);
      } else {
        var oldRange = ourRange;
        var range = rangeForUnit(cm, pos, behavior.unit);
        var anchor = oldRange.anchor, head;
        if (cmp(range.anchor, anchor) > 0) {
          head = range.head;
          anchor = minPos(oldRange.from(), range.anchor);
        } else {
          head = range.anchor;
          anchor = maxPos(oldRange.to(), range.head);
        }
        var ranges$1 = startSel.ranges.slice(0);
        ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head));
        setSelection(doc, normalizeSelection(cm, ranges$1, ourIndex), sel_mouse);
      }
    }

    var editorSize = display.wrapper.getBoundingClientRect();
    // Used to ensure timeout re-tries don't fire when another extend
    // happened in the meantime (clearTimeout isn't reliable -- at
    // least on Chrome, the timeouts still happen even when cleared,
    // if the clear happens after their scheduled firing time).
    var counter = 0;

    function extend(e) {
      var curCount = ++counter;
      var cur = posFromMouse(cm, e, true, behavior.unit == "rectangle");
      if (!cur) { return }
      if (cmp(cur, lastPos) != 0) {
        cm.curOp.focus = activeElt();
        extendTo(cur);
        var visible = visibleLines(display, doc);
        if (cur.line >= visible.to || cur.line < visible.from)
          { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); }
      } else {
        var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;
        if (outside) { setTimeout(operation(cm, function () {
          if (counter != curCount) { return }
          display.scroller.scrollTop += outside;
          extend(e);
        }), 50); }
      }
    }

    function done(e) {
      cm.state.selectingText = false;
      counter = Infinity;
      // If e is null or undefined we interpret this as someone trying
      // to explicitly cancel the selection rather than the user
      // letting go of the mouse button.
      if (e) {
        e_preventDefault(e);
        display.input.focus();
      }
      off(display.wrapper.ownerDocument, "mousemove", move);
      off(display.wrapper.ownerDocument, "mouseup", up);
      doc.history.lastSelOrigin = null;
    }

    var move = operation(cm, function (e) {
      if (e.buttons === 0 || !e_button(e)) { done(e); }
      else { extend(e); }
    });
    var up = operation(cm, done);
    cm.state.selectingText = up;
    on(display.wrapper.ownerDocument, "mousemove", move);
    on(display.wrapper.ownerDocument, "mouseup", up);
  }

  // Used when mouse-selecting to adjust the anchor to the proper side
  // of a bidi jump depending on the visual position of the head.
  function bidiSimplify(cm, range) {
    var anchor = range.anchor;
    var head = range.head;
    var anchorLine = getLine(cm.doc, anchor.line);
    if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range }
    var order = getOrder(anchorLine);
    if (!order) { return range }
    var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];
    if (part.from != anchor.ch && part.to != anchor.ch) { return range }
    var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);
    if (boundary == 0 || boundary == order.length) { return range }

    // Compute the relative visual position of the head compared to the
    // anchor (<0 is to the left, >0 to the right)
    var leftSide;
    if (head.line != anchor.line) {
      leftSide = (head.line - anchor.line) * (cm.doc.direction == "ltr" ? 1 : -1) > 0;
    } else {
      var headIndex = getBidiPartAt(order, head.ch, head.sticky);
      var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);
      if (headIndex == boundary - 1 || headIndex == boundary)
        { leftSide = dir < 0; }
      else
        { leftSide = dir > 0; }
    }

    var usePart = order[boundary + (leftSide ? -1 : 0)];
    var from = leftSide == (usePart.level == 1);
    var ch = from ? usePart.from : usePart.to, sticky = from ? "after" : "before";
    return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head)
  }


  // Determines whether an event happened in the gutter, and fires the
  // handlers for the corresponding event.
  function gutterEvent(cm, e, type, prevent) {
    var mX, mY;
    if (e.touches) {
      mX = e.touches[0].clientX;
      mY = e.touches[0].clientY;
    } else {
      try { mX = e.clientX; mY = e.clientY; }
      catch(e$1) { return false }
    }
    if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) { return false }
    if (prevent) { e_preventDefault(e); }

    var display = cm.display;
    var lineBox = display.lineDiv.getBoundingClientRect();

    if (mY > lineBox.bottom || !hasHandler(cm, type)) { return e_defaultPrevented(e) }
    mY -= lineBox.top - display.viewOffset;

    for (var i = 0; i < cm.display.gutterSpecs.length; ++i) {
      var g = display.gutters.childNodes[i];
      if (g && g.getBoundingClientRect().right >= mX) {
        var line = lineAtHeight(cm.doc, mY);
        var gutter = cm.display.gutterSpecs[i];
        signal(cm, type, cm, line, gutter.className, e);
        return e_defaultPrevented(e)
      }
    }
  }

  function clickInGutter(cm, e) {
    return gutterEvent(cm, e, "gutterClick", true)
  }

  // CONTEXT MENU HANDLING

  // To make the context menu work, we need to briefly unhide the
  // textarea (making it as unobtrusive as possible) to let the
  // right-click take effect on it.
  function onContextMenu(cm, e) {
    if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }
    if (signalDOMEvent(cm, e, "contextmenu")) { return }
    if (!captureRightClick) { cm.display.input.onContextMenu(e); }
  }

  function contextMenuInGutter(cm, e) {
    if (!hasHandler(cm, "gutterContextMenu")) { return false }
    return gutterEvent(cm, e, "gutterContextMenu", false)
  }

  function themeChanged(cm) {
    cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") +
      cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-");
    clearCaches(cm);
  }

  var Init = {toString: function(){return "CodeMirror.Init"}};

  var defaults = {};
  var optionHandlers = {};

  function defineOptions(CodeMirror) {
    var optionHandlers = CodeMirror.optionHandlers;

    function option(name, deflt, handle, notOnInit) {
      CodeMirror.defaults[name] = deflt;
      if (handle) { optionHandlers[name] =
        notOnInit ? function (cm, val, old) {if (old != Init) { handle(cm, val, old); }} : handle; }
    }

    CodeMirror.defineOption = option;

    // Passed to option handlers when there is no old value.
    CodeMirror.Init = Init;

    // These two are, on init, called from the constructor because they
    // have to be initialized before the editor can start at all.
    option("value", "", function (cm, val) { return cm.setValue(val); }, true);
    option("mode", null, function (cm, val) {
      cm.doc.modeOption = val;
      loadMode(cm);
    }, true);

    option("indentUnit", 2, loadMode, true);
    option("indentWithTabs", false);
    option("smartIndent", true);
    option("tabSize", 4, function (cm) {
      resetModeState(cm);
      clearCaches(cm);
      regChange(cm);
    }, true);

    option("lineSeparator", null, function (cm, val) {
      cm.doc.lineSep = val;
      if (!val) { return }
      var newBreaks = [], lineNo = cm.doc.first;
      cm.doc.iter(function (line) {
        for (var pos = 0;;) {
          var found = line.text.indexOf(val, pos);
          if (found == -1) { break }
          pos = found + val.length;
          newBreaks.push(Pos(lineNo, found));
        }
        lineNo++;
      });
      for (var i = newBreaks.length - 1; i >= 0; i--)
        { replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); }
    });
    option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g, function (cm, val, old) {
      cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g");
      if (old != Init) { cm.refresh(); }
    });
    option("specialCharPlaceholder", defaultSpecialCharPlaceholder, function (cm) { return cm.refresh(); }, true);
    option("electricChars", true);
    option("inputStyle", mobile ? "contenteditable" : "textarea", function () {
      throw new Error("inputStyle can not (yet) be changed in a running editor") // FIXME
    }, true);
    option("spellcheck", false, function (cm, val) { return cm.getInputField().spellcheck = val; }, true);
    option("autocorrect", false, function (cm, val) { return cm.getInputField().autocorrect = val; }, true);
    option("autocapitalize", false, function (cm, val) { return cm.getInputField().autocapitalize = val; }, true);
    option("rtlMoveVisually", !windows);
    option("wholeLineUpdateBefore", true);

    option("theme", "default", function (cm) {
      themeChanged(cm);
      updateGutters(cm);
    }, true);
    option("keyMap", "default", function (cm, val, old) {
      var next = getKeyMap(val);
      var prev = old != Init && getKeyMap(old);
      if (prev && prev.detach) { prev.detach(cm, next); }
      if (next.attach) { next.attach(cm, prev || null); }
    });
    option("extraKeys", null);
    option("configureMouse", null);

    option("lineWrapping", false, wrappingChanged, true);
    option("gutters", [], function (cm, val) {
      cm.display.gutterSpecs = getGutters(val, cm.options.lineNumbers);
      updateGutters(cm);
    }, true);
    option("fixedGutter", true, function (cm, val) {
      cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0";
      cm.refresh();
    }, true);
    option("coverGutterNextToScrollbar", false, function (cm) { return updateScrollbars(cm); }, true);
    option("scrollbarStyle", "native", function (cm) {
      initScrollbars(cm);
      updateScrollbars(cm);
      cm.display.scrollbars.setScrollTop(cm.doc.scrollTop);
      cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft);
    }, true);
    option("lineNumbers", false, function (cm, val) {
      cm.display.gutterSpecs = getGutters(cm.options.gutters, val);
      updateGutters(cm);
    }, true);
    option("firstLineNumber", 1, updateGutters, true);
    option("lineNumberFormatter", function (integer) { return integer; }, updateGutters, true);
    option("showCursorWhenSelecting", false, updateSelection, true);

    option("resetSelectionOnContextMenu", true);
    option("lineWiseCopyCut", true);
    option("pasteLinesPerSelection", true);
    option("selectionsMayTouch", false);

    option("readOnly", false, function (cm, val) {
      if (val == "nocursor") {
        onBlur(cm);
        cm.display.input.blur();
      }
      cm.display.input.readOnlyChanged(val);
    });

    option("screenReaderLabel", null, function (cm, val) {
      val = (val === '') ? null : val;
      cm.display.input.screenReaderLabelChanged(val);
    });

    option("disableInput", false, function (cm, val) {if (!val) { cm.display.input.reset(); }}, true);
    option("dragDrop", true, dragDropChanged);
    option("allowDropFileTypes", null);

    option("cursorBlinkRate", 530);
    option("cursorScrollMargin", 0);
    option("cursorHeight", 1, updateSelection, true);
    option("singleCursorHeightPerLine", true, updateSelection, true);
    option("workTime", 100);
    option("workDelay", 100);
    option("flattenSpans", true, resetModeState, true);
    option("addModeClass", false, resetModeState, true);
    option("pollInterval", 100);
    option("undoDepth", 200, function (cm, val) { return cm.doc.history.undoDepth = val; });
    option("historyEventDelay", 1250);
    option("viewportMargin", 10, function (cm) { return cm.refresh(); }, true);
    option("maxHighlightLength", 10000, resetModeState, true);
    option("moveInputWithCursor", true, function (cm, val) {
      if (!val) { cm.display.input.resetPosition(); }
    });

    option("tabindex", null, function (cm, val) { return cm.display.input.getField().tabIndex = val || ""; });
    option("autofocus", null);
    option("direction", "ltr", function (cm, val) { return cm.doc.setDirection(val); }, true);
    option("phrases", null);
  }

  function dragDropChanged(cm, value, old) {
    var wasOn = old && old != Init;
    if (!value != !wasOn) {
      var funcs = cm.display.dragFunctions;
      var toggle = value ? on : off;
      toggle(cm.display.scroller, "dragstart", funcs.start);
      toggle(cm.display.scroller, "dragenter", funcs.enter);
      toggle(cm.display.scroller, "dragover", funcs.over);
      toggle(cm.display.scroller, "dragleave", funcs.leave);
      toggle(cm.display.scroller, "drop", funcs.drop);
    }
  }

  function wrappingChanged(cm) {
    if (cm.options.lineWrapping) {
      addClass(cm.display.wrapper, "CodeMirror-wrap");
      cm.display.sizer.style.minWidth = "";
      cm.display.sizerWidth = null;
    } else {
      rmClass(cm.display.wrapper, "CodeMirror-wrap");
      findMaxLine(cm);
    }
    estimateLineHeights(cm);
    regChange(cm);
    clearCaches(cm);
    setTimeout(function () { return updateScrollbars(cm); }, 100);
  }

  // A CodeMirror instance represents an editor. This is the object
  // that user code is usually dealing with.

  function CodeMirror(place, options) {
    var this$1 = this;

    if (!(this instanceof CodeMirror)) { return new CodeMirror(place, options) }

    this.options = options = options ? copyObj(options) : {};
    // Determine effective options based on given values and defaults.
    copyObj(defaults, options, false);

    var doc = options.value;
    if (typeof doc == "string") { doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction); }
    else if (options.mode) { doc.modeOption = options.mode; }
    this.doc = doc;

    var input = new CodeMirror.inputStyles[options.inputStyle](this);
    var display = this.display = new Display(place, doc, input, options);
    display.wrapper.CodeMirror = this;
    themeChanged(this);
    if (options.lineWrapping)
      { this.display.wrapper.className += " CodeMirror-wrap"; }
    initScrollbars(this);

    this.state = {
      keyMaps: [],  // stores maps added by addKeyMap
      overlays: [], // highlighting overlays, as added by addOverlay
      modeGen: 0,   // bumped when mode/overlay changes, used to invalidate highlighting info
      overwrite: false,
      delayingBlurEvent: false,
      focused: false,
      suppressEdits: false, // used to disable editing during key handlers when in readOnly mode
      pasteIncoming: -1, cutIncoming: -1, // help recognize paste/cut edits in input.poll
      selectingText: false,
      draggingText: false,
      highlight: new Delayed(), // stores highlight worker timeout
      keySeq: null,  // Unfinished key sequence
      specialChars: null
    };

    if (options.autofocus && !mobile) { display.input.focus(); }

    // Override magic textarea content restore that IE sometimes does
    // on our hidden textarea on reload
    if (ie && ie_version < 11) { setTimeout(function () { return this$1.display.input.reset(true); }, 20); }

    registerEventHandlers(this);
    ensureGlobalHandlers();

    startOperation(this);
    this.curOp.forceUpdate = true;
    attachDoc(this, doc);

    if ((options.autofocus && !mobile) || this.hasFocus())
      { setTimeout(function () {
        if (this$1.hasFocus() && !this$1.state.focused) { onFocus(this$1); }
      }, 20); }
    else
      { onBlur(this); }

    for (var opt in optionHandlers) { if (optionHandlers.hasOwnProperty(opt))
      { optionHandlers[opt](this, options[opt], Init); } }
    maybeUpdateLineNumberWidth(this);
    if (options.finishInit) { options.finishInit(this); }
    for (var i = 0; i < initHooks.length; ++i) { initHooks[i](this); }
    endOperation(this);
    // Suppress optimizelegibility in Webkit, since it breaks text
    // measuring on line wrapping boundaries.
    if (webkit && options.lineWrapping &&
        getComputedStyle(display.lineDiv).textRendering == "optimizelegibility")
      { display.lineDiv.style.textRendering = "auto"; }
  }

  // The default configuration options.
  CodeMirror.defaults = defaults;
  // Functions to run when options are changed.
  CodeMirror.optionHandlers = optionHandlers;

  // Attach the necessary event handlers when initializing the editor
  function registerEventHandlers(cm) {
    var d = cm.display;
    on(d.scroller, "mousedown", operation(cm, onMouseDown));
    // Older IE's will not fire a second mousedown for a double click
    if (ie && ie_version < 11)
      { on(d.scroller, "dblclick", operation(cm, function (e) {
        if (signalDOMEvent(cm, e)) { return }
        var pos = posFromMouse(cm, e);
        if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) { return }
        e_preventDefault(e);
        var word = cm.findWordAt(pos);
        extendSelection(cm.doc, word.anchor, word.head);
      })); }
    else
      { on(d.scroller, "dblclick", function (e) { return signalDOMEvent(cm, e) || e_preventDefault(e); }); }
    // Some browsers fire contextmenu *after* opening the menu, at
    // which point we can't mess with it anymore. Context menu is
    // handled in onMouseDown for these browsers.
    on(d.scroller, "contextmenu", function (e) { return onContextMenu(cm, e); });
    on(d.input.getField(), "contextmenu", function (e) {
      if (!d.scroller.contains(e.target)) { onContextMenu(cm, e); }
    });

    // Used to suppress mouse event handling when a touch happens
    var touchFinished, prevTouch = {end: 0};
    function finishTouch() {
      if (d.activeTouch) {
        touchFinished = setTimeout(function () { return d.activeTouch = null; }, 1000);
        prevTouch = d.activeTouch;
        prevTouch.end = +new Date;
      }
    }
    function isMouseLikeTouchEvent(e) {
      if (e.touches.length != 1) { return false }
      var touch = e.touches[0];
      return touch.radiusX <= 1 && touch.radiusY <= 1
    }
    function farAway(touch, other) {
      if (other.left == null) { return true }
      var dx = other.left - touch.left, dy = other.top - touch.top;
      return dx * dx + dy * dy > 20 * 20
    }
    on(d.scroller, "touchstart", function (e) {
      if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e) && !clickInGutter(cm, e)) {
        d.input.ensurePolled();
        clearTimeout(touchFinished);
        var now = +new Date;
        d.activeTouch = {start: now, moved: false,
                         prev: now - prevTouch.end <= 300 ? prevTouch : null};
        if (e.touches.length == 1) {
          d.activeTouch.left = e.touches[0].pageX;
          d.activeTouch.top = e.touches[0].pageY;
        }
      }
    });
    on(d.scroller, "touchmove", function () {
      if (d.activeTouch) { d.activeTouch.moved = true; }
    });
    on(d.scroller, "touchend", function (e) {
      var touch = d.activeTouch;
      if (touch && !eventInWidget(d, e) && touch.left != null &&
          !touch.moved && new Date - touch.start < 300) {
        var pos = cm.coordsChar(d.activeTouch, "page"), range;
        if (!touch.prev || farAway(touch, touch.prev)) // Single tap
          { range = new Range(pos, pos); }
        else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap
          { range = cm.findWordAt(pos); }
        else // Triple tap
          { range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))); }
        cm.setSelection(range.anchor, range.head);
        cm.focus();
        e_preventDefault(e);
      }
      finishTouch();
    });
    on(d.scroller, "touchcancel", finishTouch);

    // Sync scrolling between fake scrollbars and real scrollable
    // area, ensure viewport is updated when scrolling.
    on(d.scroller, "scroll", function () {
      if (d.scroller.clientHeight) {
        updateScrollTop(cm, d.scroller.scrollTop);
        setScrollLeft(cm, d.scroller.scrollLeft, true);
        signal(cm, "scroll", cm);
      }
    });

    // Listen to wheel events in order to try and update the viewport on time.
    on(d.scroller, "mousewheel", function (e) { return onScrollWheel(cm, e); });
    on(d.scroller, "DOMMouseScroll", function (e) { return onScrollWheel(cm, e); });

    // Prevent wrapper from ever scrolling
    on(d.wrapper, "scroll", function () { return d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });

    d.dragFunctions = {
      enter: function (e) {if (!signalDOMEvent(cm, e)) { e_stop(e); }},
      over: function (e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }},
      start: function (e) { return onDragStart(cm, e); },
      drop: operation(cm, onDrop),
      leave: function (e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm); }}
    };

    var inp = d.input.getField();
    on(inp, "keyup", function (e) { return onKeyUp.call(cm, e); });
    on(inp, "keydown", operation(cm, onKeyDown));
    on(inp, "keypress", operation(cm, onKeyPress));
    on(inp, "focus", function (e) { return onFocus(cm, e); });
    on(inp, "blur", function (e) { return onBlur(cm, e); });
  }

  var initHooks = [];
  CodeMirror.defineInitHook = function (f) { return initHooks.push(f); };

  // Indent the given line. The how parameter can be "smart",
  // "add"/null, "subtract", or "prev". When aggressive is false
  // (typically set to true for forced single-line indents), empty
  // lines are not indented, and places where the mode returns Pass
  // are left alone.
  function indentLine(cm, n, how, aggressive) {
    var doc = cm.doc, state;
    if (how == null) { how = "add"; }
    if (how == "smart") {
      // Fall back to "prev" when the mode doesn't have an indentation
      // method.
      if (!doc.mode.indent) { how = "prev"; }
      else { state = getContextBefore(cm, n).state; }
    }

    var tabSize = cm.options.tabSize;
    var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);
    if (line.stateAfter) { line.stateAfter = null; }
    var curSpaceString = line.text.match(/^\s*/)[0], indentation;
    if (!aggressive && !/\S/.test(line.text)) {
      indentation = 0;
      how = "not";
    } else if (how == "smart") {
      indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);
      if (indentation == Pass || indentation > 150) {
        if (!aggressive) { return }
        how = "prev";
      }
    }
    if (how == "prev") {
      if (n > doc.first) { indentation = countColumn(getLine(doc, n-1).text, null, tabSize); }
      else { indentation = 0; }
    } else if (how == "add") {
      indentation = curSpace + cm.options.indentUnit;
    } else if (how == "subtract") {
      indentation = curSpace - cm.options.indentUnit;
    } else if (typeof how == "number") {
      indentation = curSpace + how;
    }
    indentation = Math.max(0, indentation);

    var indentString = "", pos = 0;
    if (cm.options.indentWithTabs)
      { for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";} }
    if (pos < indentation) { indentString += spaceStr(indentation - pos); }

    if (indentString != curSpaceString) {
      replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input");
      line.stateAfter = null;
      return true
    } else {
      // Ensure that, if the cursor was in the whitespace at the start
      // of the line, it is moved to the end of that space.
      for (var i$1 = 0; i$1 < doc.sel.ranges.length; i$1++) {
        var range = doc.sel.ranges[i$1];
        if (range.head.line == n && range.head.ch < curSpaceString.length) {
          var pos$1 = Pos(n, curSpaceString.length);
          replaceOneSelection(doc, i$1, new Range(pos$1, pos$1));
          break
        }
      }
    }
  }

  // This will be set to a {lineWise: bool, text: [string]} object, so
  // that, when pasting, we know what kind of selections the copied
  // text was made out of.
  var lastCopied = null;

  function setLastCopied(newLastCopied) {
    lastCopied = newLastCopied;
  }

  function applyTextInput(cm, inserted, deleted, sel, origin) {
    var doc = cm.doc;
    cm.display.shift = false;
    if (!sel) { sel = doc.sel; }

    var recent = +new Date - 200;
    var paste = origin == "paste" || cm.state.pasteIncoming > recent;
    var textLines = splitLinesAuto(inserted), multiPaste = null;
    // When pasting N lines into N selections, insert one line per selection
    if (paste && sel.ranges.length > 1) {
      if (lastCopied && lastCopied.text.join("\n") == inserted) {
        if (sel.ranges.length % lastCopied.text.length == 0) {
          multiPaste = [];
          for (var i = 0; i < lastCopied.text.length; i++)
            { multiPaste.push(doc.splitLines(lastCopied.text[i])); }
        }
      } else if (textLines.length == sel.ranges.length && cm.options.pasteLinesPerSelection) {
        multiPaste = map(textLines, function (l) { return [l]; });
      }
    }

    var updateInput = cm.curOp.updateInput;
    // Normal behavior is to insert the new text into every selection
    for (var i$1 = sel.ranges.length - 1; i$1 >= 0; i$1--) {
      var range = sel.ranges[i$1];
      var from = range.from(), to = range.to();
      if (range.empty()) {
        if (deleted && deleted > 0) // Handle deletion
          { from = Pos(from.line, from.ch - deleted); }
        else if (cm.state.overwrite && !paste) // Handle overwrite
          { to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); }
        else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") == textLines.join("\n"))
          { from = to = Pos(from.line, 0); }
      }
      var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines,
                         origin: origin || (paste ? "paste" : cm.state.cutIncoming > recent ? "cut" : "+input")};
      makeChange(cm.doc, changeEvent);
      signalLater(cm, "inputRead", cm, changeEvent);
    }
    if (inserted && !paste)
      { triggerElectric(cm, inserted); }

    ensureCursorVisible(cm);
    if (cm.curOp.updateInput < 2) { cm.curOp.updateInput = updateInput; }
    cm.curOp.typing = true;
    cm.state.pasteIncoming = cm.state.cutIncoming = -1;
  }

  function handlePaste(e, cm) {
    var pasted = e.clipboardData && e.clipboardData.getData("Text");
    if (pasted) {
      e.preventDefault();
      if (!cm.isReadOnly() && !cm.options.disableInput)
        { runInOp(cm, function () { return applyTextInput(cm, pasted, 0, null, "paste"); }); }
      return true
    }
  }

  function triggerElectric(cm, inserted) {
    // When an 'electric' character is inserted, immediately trigger a reindent
    if (!cm.options.electricChars || !cm.options.smartIndent) { return }
    var sel = cm.doc.sel;

    for (var i = sel.ranges.length - 1; i >= 0; i--) {
      var range = sel.ranges[i];
      if (range.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range.head.line)) { continue }
      var mode = cm.getModeAt(range.head);
      var indented = false;
      if (mode.electricChars) {
        for (var j = 0; j < mode.electricChars.length; j++)
          { if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {
            indented = indentLine(cm, range.head.line, "smart");
            break
          } }
      } else if (mode.electricInput) {
        if (mode.electricInput.test(getLine(cm.doc, range.head.line).text.slice(0, range.head.ch)))
          { indented = indentLine(cm, range.head.line, "smart"); }
      }
      if (indented) { signalLater(cm, "electricInput", cm, range.head.line); }
    }
  }

  function copyableRanges(cm) {
    var text = [], ranges = [];
    for (var i = 0; i < cm.doc.sel.ranges.length; i++) {
      var line = cm.doc.sel.ranges[i].head.line;
      var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};
      ranges.push(lineRange);
      text.push(cm.getRange(lineRange.anchor, lineRange.head));
    }
    return {text: text, ranges: ranges}
  }

  function disableBrowserMagic(field, spellcheck, autocorrect, autocapitalize) {
    field.setAttribute("autocorrect", autocorrect ? "" : "off");
    field.setAttribute("autocapitalize", autocapitalize ? "" : "off");
    field.setAttribute("spellcheck", !!spellcheck);
  }

  function hiddenTextarea() {
    var te = elt("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none");
    var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
    // The textarea is kept positioned near the cursor to prevent the
    // fact that it'll be scrolled into view on input from scrolling
    // our fake cursor out of view. On webkit, when wrap=off, paste is
    // very slow. So make the area wide instead.
    if (webkit) { te.style.width = "1000px"; }
    else { te.setAttribute("wrap", "off"); }
    // If border: 0; -- iOS fails to open keyboard (issue #1287)
    if (ios) { te.style.border = "1px solid black"; }
    disableBrowserMagic(te);
    return div
  }

  // The publicly visible API. Note that methodOp(f) means
  // 'wrap f in an operation, performed on its `this` parameter'.

  // This is not the complete set of editor methods. Most of the
  // methods defined on the Doc type are also injected into
  // CodeMirror.prototype, for backwards compatibility and
  // convenience.

  function addEditorMethods(CodeMirror) {
    var optionHandlers = CodeMirror.optionHandlers;

    var helpers = CodeMirror.helpers = {};

    CodeMirror.prototype = {
      constructor: CodeMirror,
      focus: function(){window.focus(); this.display.input.focus();},

      setOption: function(option, value) {
        var options = this.options, old = options[option];
        if (options[option] == value && option != "mode") { return }
        options[option] = value;
        if (optionHandlers.hasOwnProperty(option))
          { operation(this, optionHandlers[option])(this, value, old); }
        signal(this, "optionChange", this, option);
      },

      getOption: function(option) {return this.options[option]},
      getDoc: function() {return this.doc},

      addKeyMap: function(map, bottom) {
        this.state.keyMaps[bottom ? "push" : "unshift"](getKeyMap(map));
      },
      removeKeyMap: function(map) {
        var maps = this.state.keyMaps;
        for (var i = 0; i < maps.length; ++i)
          { if (maps[i] == map || maps[i].name == map) {
            maps.splice(i, 1);
            return true
          } }
      },

      addOverlay: methodOp(function(spec, options) {
        var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);
        if (mode.startState) { throw new Error("Overlays may not be stateful.") }
        insertSorted(this.state.overlays,
                     {mode: mode, modeSpec: spec, opaque: options && options.opaque,
                      priority: (options && options.priority) || 0},
                     function (overlay) { return overlay.priority; });
        this.state.modeGen++;
        regChange(this);
      }),
      removeOverlay: methodOp(function(spec) {
        var overlays = this.state.overlays;
        for (var i = 0; i < overlays.length; ++i) {
          var cur = overlays[i].modeSpec;
          if (cur == spec || typeof spec == "string" && cur.name == spec) {
            overlays.splice(i, 1);
            this.state.modeGen++;
            regChange(this);
            return
          }
        }
      }),

      indentLine: methodOp(function(n, dir, aggressive) {
        if (typeof dir != "string" && typeof dir != "number") {
          if (dir == null) { dir = this.options.smartIndent ? "smart" : "prev"; }
          else { dir = dir ? "add" : "subtract"; }
        }
        if (isLine(this.doc, n)) { indentLine(this, n, dir, aggressive); }
      }),
      indentSelection: methodOp(function(how) {
        var ranges = this.doc.sel.ranges, end = -1;
        for (var i = 0; i < ranges.length; i++) {
          var range = ranges[i];
          if (!range.empty()) {
            var from = range.from(), to = range.to();
            var start = Math.max(end, from.line);
            end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1;
            for (var j = start; j < end; ++j)
              { indentLine(this, j, how); }
            var newRanges = this.doc.sel.ranges;
            if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0)
              { replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll); }
          } else if (range.head.line > end) {
            indentLine(this, range.head.line, how, true);
            end = range.head.line;
            if (i == this.doc.sel.primIndex) { ensureCursorVisible(this); }
          }
        }
      }),

      // Fetch the parser token for a given character. Useful for hacks
      // that want to inspect the mode state (say, for completion).
      getTokenAt: function(pos, precise) {
        return takeToken(this, pos, precise)
      },

      getLineTokens: function(line, precise) {
        return takeToken(this, Pos(line), precise, true)
      },

      getTokenTypeAt: function(pos) {
        pos = clipPos(this.doc, pos);
        var styles = getLineStyles(this, getLine(this.doc, pos.line));
        var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;
        var type;
        if (ch == 0) { type = styles[2]; }
        else { for (;;) {
          var mid = (before + after) >> 1;
          if ((mid ? styles[mid * 2 - 1] : 0) >= ch) { after = mid; }
          else if (styles[mid * 2 + 1] < ch) { before = mid + 1; }
          else { type = styles[mid * 2 + 2]; break }
        } }
        var cut = type ? type.indexOf("overlay ") : -1;
        return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1)
      },

      getModeAt: function(pos) {
        var mode = this.doc.mode;
        if (!mode.innerMode) { return mode }
        return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode
      },

      getHelper: function(pos, type) {
        return this.getHelpers(pos, type)[0]
      },

      getHelpers: function(pos, type) {
        var found = [];
        if (!helpers.hasOwnProperty(type)) { return found }
        var help = helpers[type], mode = this.getModeAt(pos);
        if (typeof mode[type] == "string") {
          if (help[mode[type]]) { found.push(help[mode[type]]); }
        } else if (mode[type]) {
          for (var i = 0; i < mode[type].length; i++) {
            var val = help[mode[type][i]];
            if (val) { found.push(val); }
          }
        } else if (mode.helperType && help[mode.helperType]) {
          found.push(help[mode.helperType]);
        } else if (help[mode.name]) {
          found.push(help[mode.name]);
        }
        for (var i$1 = 0; i$1 < help._global.length; i$1++) {
          var cur = help._global[i$1];
          if (cur.pred(mode, this) && indexOf(found, cur.val) == -1)
            { found.push(cur.val); }
        }
        return found
      },

      getStateAfter: function(line, precise) {
        var doc = this.doc;
        line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);
        return getContextBefore(this, line + 1, precise).state
      },

      cursorCoords: function(start, mode) {
        var pos, range = this.doc.sel.primary();
        if (start == null) { pos = range.head; }
        else if (typeof start == "object") { pos = clipPos(this.doc, start); }
        else { pos = start ? range.from() : range.to(); }
        return cursorCoords(this, pos, mode || "page")
      },

      charCoords: function(pos, mode) {
        return charCoords(this, clipPos(this.doc, pos), mode || "page")
      },

      coordsChar: function(coords, mode) {
        coords = fromCoordSystem(this, coords, mode || "page");
        return coordsChar(this, coords.left, coords.top)
      },

      lineAtHeight: function(height, mode) {
        height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top;
        return lineAtHeight(this.doc, height + this.display.viewOffset)
      },
      heightAtLine: function(line, mode, includeWidgets) {
        var end = false, lineObj;
        if (typeof line == "number") {
          var last = this.doc.first + this.doc.size - 1;
          if (line < this.doc.first) { line = this.doc.first; }
          else if (line > last) { line = last; end = true; }
          lineObj = getLine(this.doc, line);
        } else {
          lineObj = line;
        }
        return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || "page", includeWidgets || end).top +
          (end ? this.doc.height - heightAtLine(lineObj) : 0)
      },

      defaultTextHeight: function() { return textHeight(this.display) },
      defaultCharWidth: function() { return charWidth(this.display) },

      getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo}},

      addWidget: function(pos, node, scroll, vert, horiz) {
        var display = this.display;
        pos = cursorCoords(this, clipPos(this.doc, pos));
        var top = pos.bottom, left = pos.left;
        node.style.position = "absolute";
        node.setAttribute("cm-ignore-events", "true");
        this.display.input.setUneditable(node);
        display.sizer.appendChild(node);
        if (vert == "over") {
          top = pos.top;
        } else if (vert == "above" || vert == "near") {
          var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),
          hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);
          // Default to positioning above (if specified and possible); otherwise default to positioning below
          if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)
            { top = pos.top - node.offsetHeight; }
          else if (pos.bottom + node.offsetHeight <= vspace)
            { top = pos.bottom; }
          if (left + node.offsetWidth > hspace)
            { left = hspace - node.offsetWidth; }
        }
        node.style.top = top + "px";
        node.style.left = node.style.right = "";
        if (horiz == "right") {
          left = display.sizer.clientWidth - node.offsetWidth;
          node.style.right = "0px";
        } else {
          if (horiz == "left") { left = 0; }
          else if (horiz == "middle") { left = (display.sizer.clientWidth - node.offsetWidth) / 2; }
          node.style.left = left + "px";
        }
        if (scroll)
          { scrollIntoView(this, {left: left, top: top, right: left + node.offsetWidth, bottom: top + node.offsetHeight}); }
      },

      triggerOnKeyDown: methodOp(onKeyDown),
      triggerOnKeyPress: methodOp(onKeyPress),
      triggerOnKeyUp: onKeyUp,
      triggerOnMouseDown: methodOp(onMouseDown),

      execCommand: function(cmd) {
        if (commands.hasOwnProperty(cmd))
          { return commands[cmd].call(null, this) }
      },

      triggerElectric: methodOp(function(text) { triggerElectric(this, text); }),

      findPosH: function(from, amount, unit, visually) {
        var dir = 1;
        if (amount < 0) { dir = -1; amount = -amount; }
        var cur = clipPos(this.doc, from);
        for (var i = 0; i < amount; ++i) {
          cur = findPosH(this.doc, cur, dir, unit, visually);
          if (cur.hitSide) { break }
        }
        return cur
      },

      moveH: methodOp(function(dir, unit) {
        var this$1 = this;

        this.extendSelectionsBy(function (range) {
          if (this$1.display.shift || this$1.doc.extend || range.empty())
            { return findPosH(this$1.doc, range.head, dir, unit, this$1.options.rtlMoveVisually) }
          else
            { return dir < 0 ? range.from() : range.to() }
        }, sel_move);
      }),

      deleteH: methodOp(function(dir, unit) {
        var sel = this.doc.sel, doc = this.doc;
        if (sel.somethingSelected())
          { doc.replaceSelection("", null, "+delete"); }
        else
          { deleteNearSelection(this, function (range) {
            var other = findPosH(doc, range.head, dir, unit, false);
            return dir < 0 ? {from: other, to: range.head} : {from: range.head, to: other}
          }); }
      }),

      findPosV: function(from, amount, unit, goalColumn) {
        var dir = 1, x = goalColumn;
        if (amount < 0) { dir = -1; amount = -amount; }
        var cur = clipPos(this.doc, from);
        for (var i = 0; i < amount; ++i) {
          var coords = cursorCoords(this, cur, "div");
          if (x == null) { x = coords.left; }
          else { coords.left = x; }
          cur = findPosV(this, coords, dir, unit);
          if (cur.hitSide) { break }
        }
        return cur
      },

      moveV: methodOp(function(dir, unit) {
        var this$1 = this;

        var doc = this.doc, goals = [];
        var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected();
        doc.extendSelectionsBy(function (range) {
          if (collapse)
            { return dir < 0 ? range.from() : range.to() }
          var headPos = cursorCoords(this$1, range.head, "div");
          if (range.goalColumn != null) { headPos.left = range.goalColumn; }
          goals.push(headPos.left);
          var pos = findPosV(this$1, headPos, dir, unit);
          if (unit == "page" && range == doc.sel.primary())
            { addToScrollTop(this$1, charCoords(this$1, pos, "div").top - headPos.top); }
          return pos
        }, sel_move);
        if (goals.length) { for (var i = 0; i < doc.sel.ranges.length; i++)
          { doc.sel.ranges[i].goalColumn = goals[i]; } }
      }),

      // Find the word at the given position (as returned by coordsChar).
      findWordAt: function(pos) {
        var doc = this.doc, line = getLine(doc, pos.line).text;
        var start = pos.ch, end = pos.ch;
        if (line) {
          var helper = this.getHelper(pos, "wordChars");
          if ((pos.sticky == "before" || end == line.length) && start) { --start; } else { ++end; }
          var startChar = line.charAt(start);
          var check = isWordChar(startChar, helper)
            ? function (ch) { return isWordChar(ch, helper); }
            : /\s/.test(startChar) ? function (ch) { return /\s/.test(ch); }
            : function (ch) { return (!/\s/.test(ch) && !isWordChar(ch)); };
          while (start > 0 && check(line.charAt(start - 1))) { --start; }
          while (end < line.length && check(line.charAt(end))) { ++end; }
        }
        return new Range(Pos(pos.line, start), Pos(pos.line, end))
      },

      toggleOverwrite: function(value) {
        if (value != null && value == this.state.overwrite) { return }
        if (this.state.overwrite = !this.state.overwrite)
          { addClass(this.display.cursorDiv, "CodeMirror-overwrite"); }
        else
          { rmClass(this.display.cursorDiv, "CodeMirror-overwrite"); }

        signal(this, "overwriteToggle", this, this.state.overwrite);
      },
      hasFocus: function() { return this.display.input.getField() == activeElt() },
      isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) },

      scrollTo: methodOp(function (x, y) { scrollToCoords(this, x, y); }),
      getScrollInfo: function() {
        var scroller = this.display.scroller;
        return {left: scroller.scrollLeft, top: scroller.scrollTop,
                height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,
                width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,
                clientHeight: displayHeight(this), clientWidth: displayWidth(this)}
      },

      scrollIntoView: methodOp(function(range, margin) {
        if (range == null) {
          range = {from: this.doc.sel.primary().head, to: null};
          if (margin == null) { margin = this.options.cursorScrollMargin; }
        } else if (typeof range == "number") {
          range = {from: Pos(range, 0), to: null};
        } else if (range.from == null) {
          range = {from: range, to: null};
        }
        if (!range.to) { range.to = range.from; }
        range.margin = margin || 0;

        if (range.from.line != null) {
          scrollToRange(this, range);
        } else {
          scrollToCoordsRange(this, range.from, range.to, range.margin);
        }
      }),

      setSize: methodOp(function(width, height) {
        var this$1 = this;

        var interpret = function (val) { return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val; };
        if (width != null) { this.display.wrapper.style.width = interpret(width); }
        if (height != null) { this.display.wrapper.style.height = interpret(height); }
        if (this.options.lineWrapping) { clearLineMeasurementCache(this); }
        var lineNo = this.display.viewFrom;
        this.doc.iter(lineNo, this.display.viewTo, function (line) {
          if (line.widgets) { for (var i = 0; i < line.widgets.length; i++)
            { if (line.widgets[i].noHScroll) { regLineChange(this$1, lineNo, "widget"); break } } }
          ++lineNo;
        });
        this.curOp.forceUpdate = true;
        signal(this, "refresh", this);
      }),

      operation: function(f){return runInOp(this, f)},
      startOperation: function(){return startOperation(this)},
      endOperation: function(){return endOperation(this)},

      refresh: methodOp(function() {
        var oldHeight = this.display.cachedTextHeight;
        regChange(this);
        this.curOp.forceUpdate = true;
        clearCaches(this);
        scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop);
        updateGutterSpace(this.display);
        if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5 || this.options.lineWrapping)
          { estimateLineHeights(this); }
        signal(this, "refresh", this);
      }),

      swapDoc: methodOp(function(doc) {
        var old = this.doc;
        old.cm = null;
        // Cancel the current text selection if any (#5821)
        if (this.state.selectingText) { this.state.selectingText(); }
        attachDoc(this, doc);
        clearCaches(this);
        this.display.input.reset();
        scrollToCoords(this, doc.scrollLeft, doc.scrollTop);
        this.curOp.forceScroll = true;
        signalLater(this, "swapDoc", this, old);
        return old
      }),

      phrase: function(phraseText) {
        var phrases = this.options.phrases;
        return phrases && Object.prototype.hasOwnProperty.call(phrases, phraseText) ? phrases[phraseText] : phraseText
      },

      getInputField: function(){return this.display.input.getField()},
      getWrapperElement: function(){return this.display.wrapper},
      getScrollerElement: function(){return this.display.scroller},
      getGutterElement: function(){return this.display.gutters}
    };
    eventMixin(CodeMirror);

    CodeMirror.registerHelper = function(type, name, value) {
      if (!helpers.hasOwnProperty(type)) { helpers[type] = CodeMirror[type] = {_global: []}; }
      helpers[type][name] = value;
    };
    CodeMirror.registerGlobalHelper = function(type, name, predicate, value) {
      CodeMirror.registerHelper(type, name, value);
      helpers[type]._global.push({pred: predicate, val: value});
    };
  }

  // Used for horizontal relative motion. Dir is -1 or 1 (left or
  // right), unit can be "codepoint", "char", "column" (like char, but
  // doesn't cross line boundaries), "word" (across next word), or
  // "group" (to the start of next group of word or
  // non-word-non-whitespace chars). The visually param controls
  // whether, in right-to-left text, direction 1 means to move towards
  // the next index in the string, or towards the character to the right
  // of the current position. The resulting position will have a
  // hitSide=true property if it reached the end of the document.
  function findPosH(doc, pos, dir, unit, visually) {
    var oldPos = pos;
    var origDir = dir;
    var lineObj = getLine(doc, pos.line);
    var lineDir = visually && doc.direction == "rtl" ? -dir : dir;
    function findNextLine() {
      var l = pos.line + lineDir;
      if (l < doc.first || l >= doc.first + doc.size) { return false }
      pos = new Pos(l, pos.ch, pos.sticky);
      return lineObj = getLine(doc, l)
    }
    function moveOnce(boundToLine) {
      var next;
      if (unit == "codepoint") {
        var ch = lineObj.text.charCodeAt(pos.ch + (unit > 0 ? 0 : -1));
        if (isNaN(ch)) { next = null; }
        else { next = new Pos(pos.line, Math.max(0, Math.min(lineObj.text.length, pos.ch + dir * (ch >= 0xD800 && ch < 0xDC00 ? 2 : 1))),
                            -dir); }
      } else if (visually) {
        next = moveVisually(doc.cm, lineObj, pos, dir);
      } else {
        next = moveLogically(lineObj, pos, dir);
      }
      if (next == null) {
        if (!boundToLine && findNextLine())
          { pos = endOfLine(visually, doc.cm, lineObj, pos.line, lineDir); }
        else
          { return false }
      } else {
        pos = next;
      }
      return true
    }

    if (unit == "char" || unit == "codepoint") {
      moveOnce();
    } else if (unit == "column") {
      moveOnce(true);
    } else if (unit == "word" || unit == "group") {
      var sawType = null, group = unit == "group";
      var helper = doc.cm && doc.cm.getHelper(pos, "wordChars");
      for (var first = true;; first = false) {
        if (dir < 0 && !moveOnce(!first)) { break }
        var cur = lineObj.text.charAt(pos.ch) || "\n";
        var type = isWordChar(cur, helper) ? "w"
          : group && cur == "\n" ? "n"
          : !group || /\s/.test(cur) ? null
          : "p";
        if (group && !first && !type) { type = "s"; }
        if (sawType && sawType != type) {
          if (dir < 0) {dir = 1; moveOnce(); pos.sticky = "after";}
          break
        }

        if (type) { sawType = type; }
        if (dir > 0 && !moveOnce(!first)) { break }
      }
    }
    var result = skipAtomic(doc, pos, oldPos, origDir, true);
    if (equalCursorPos(oldPos, result)) { result.hitSide = true; }
    return result
  }

  // For relative vertical movement. Dir may be -1 or 1. Unit can be
  // "page" or "line". The resulting position will have a hitSide=true
  // property if it reached the end of the document.
  function findPosV(cm, pos, dir, unit) {
    var doc = cm.doc, x = pos.left, y;
    if (unit == "page") {
      var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);
      var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3);
      y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount;

    } else if (unit == "line") {
      y = dir > 0 ? pos.bottom + 3 : pos.top - 3;
    }
    var target;
    for (;;) {
      target = coordsChar(cm, x, y);
      if (!target.outside) { break }
      if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break }
      y += dir * 5;
    }
    return target
  }

  // CONTENTEDITABLE INPUT STYLE

  var ContentEditableInput = function(cm) {
    this.cm = cm;
    this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null;
    this.polling = new Delayed();
    this.composing = null;
    this.gracePeriod = false;
    this.readDOMTimeout = null;
  };

  ContentEditableInput.prototype.init = function (display) {
      var this$1 = this;

    var input = this, cm = input.cm;
    var div = input.div = display.lineDiv;
    disableBrowserMagic(div, cm.options.spellcheck, cm.options.autocorrect, cm.options.autocapitalize);

    function belongsToInput(e) {
      for (var t = e.target; t; t = t.parentNode) {
        if (t == div) { return true }
        if (/\bCodeMirror-(?:line)?widget\b/.test(t.className)) { break }
      }
      return false
    }

    on(div, "paste", function (e) {
      if (!belongsToInput(e) || signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }
      // IE doesn't fire input events, so we schedule a read for the pasted content in this way
      if (ie_version <= 11) { setTimeout(operation(cm, function () { return this$1.updateFromDOM(); }), 20); }
    });

    on(div, "compositionstart", function (e) {
      this$1.composing = {data: e.data, done: false};
    });
    on(div, "compositionupdate", function (e) {
      if (!this$1.composing) { this$1.composing = {data: e.data, done: false}; }
    });
    on(div, "compositionend", function (e) {
      if (this$1.composing) {
        if (e.data != this$1.composing.data) { this$1.readFromDOMSoon(); }
        this$1.composing.done = true;
      }
    });

    on(div, "touchstart", function () { return input.forceCompositionEnd(); });

    on(div, "input", function () {
      if (!this$1.composing) { this$1.readFromDOMSoon(); }
    });

    function onCopyCut(e) {
      if (!belongsToInput(e) || signalDOMEvent(cm, e)) { return }
      if (cm.somethingSelected()) {
        setLastCopied({lineWise: false, text: cm.getSelections()});
        if (e.type == "cut") { cm.replaceSelection("", null, "cut"); }
      } else if (!cm.options.lineWiseCopyCut) {
        return
      } else {
        var ranges = copyableRanges(cm);
        setLastCopied({lineWise: true, text: ranges.text});
        if (e.type == "cut") {
          cm.operation(function () {
            cm.setSelections(ranges.ranges, 0, sel_dontScroll);
            cm.replaceSelection("", null, "cut");
          });
        }
      }
      if (e.clipboardData) {
        e.clipboardData.clearData();
        var content = lastCopied.text.join("\n");
        // iOS exposes the clipboard API, but seems to discard content inserted into it
        e.clipboardData.setData("Text", content);
        if (e.clipboardData.getData("Text") == content) {
          e.preventDefault();
          return
        }
      }
      // Old-fashioned briefly-focus-a-textarea hack
      var kludge = hiddenTextarea(), te = kludge.firstChild;
      cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);
      te.value = lastCopied.text.join("\n");
      var hadFocus = document.activeElement;
      selectInput(te);
      setTimeout(function () {
        cm.display.lineSpace.removeChild(kludge);
        hadFocus.focus();
        if (hadFocus == div) { input.showPrimarySelection(); }
      }, 50);
    }
    on(div, "copy", onCopyCut);
    on(div, "cut", onCopyCut);
  };

  ContentEditableInput.prototype.screenReaderLabelChanged = function (label) {
    // Label for screenreaders, accessibility
    if(label) {
      this.div.setAttribute('aria-label', label);
    } else {
      this.div.removeAttribute('aria-label');
    }
  };

  ContentEditableInput.prototype.prepareSelection = function () {
    var result = prepareSelection(this.cm, false);
    result.focus = document.activeElement == this.div;
    return result
  };

  ContentEditableInput.prototype.showSelection = function (info, takeFocus) {
    if (!info || !this.cm.display.view.length) { return }
    if (info.focus || takeFocus) { this.showPrimarySelection(); }
    this.showMultipleSelections(info);
  };

  ContentEditableInput.prototype.getSelection = function () {
    return this.cm.display.wrapper.ownerDocument.getSelection()
  };

  ContentEditableInput.prototype.showPrimarySelection = function () {
    var sel = this.getSelection(), cm = this.cm, prim = cm.doc.sel.primary();
    var from = prim.from(), to = prim.to();

    if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) {
      sel.removeAllRanges();
      return
    }

    var curAnchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);
    var curFocus = domToPos(cm, sel.focusNode, sel.focusOffset);
    if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad &&
        cmp(minPos(curAnchor, curFocus), from) == 0 &&
        cmp(maxPos(curAnchor, curFocus), to) == 0)
      { return }

    var view = cm.display.view;
    var start = (from.line >= cm.display.viewFrom && posToDOM(cm, from)) ||
        {node: view[0].measure.map[2], offset: 0};
    var end = to.line < cm.display.viewTo && posToDOM(cm, to);
    if (!end) {
      var measure = view[view.length - 1].measure;
      var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map;
      end = {node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3]};
    }

    if (!start || !end) {
      sel.removeAllRanges();
      return
    }

    var old = sel.rangeCount && sel.getRangeAt(0), rng;
    try { rng = range(start.node, start.offset, end.offset, end.node); }
    catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible
    if (rng) {
      if (!gecko && cm.state.focused) {
        sel.collapse(start.node, start.offset);
        if (!rng.collapsed) {
          sel.removeAllRanges();
          sel.addRange(rng);
        }
      } else {
        sel.removeAllRanges();
        sel.addRange(rng);
      }
      if (old && sel.anchorNode == null) { sel.addRange(old); }
      else if (gecko) { this.startGracePeriod(); }
    }
    this.rememberSelection();
  };

  ContentEditableInput.prototype.startGracePeriod = function () {
      var this$1 = this;

    clearTimeout(this.gracePeriod);
    this.gracePeriod = setTimeout(function () {
      this$1.gracePeriod = false;
      if (this$1.selectionChanged())
        { this$1.cm.operation(function () { return this$1.cm.curOp.selectionChanged = true; }); }
    }, 20);
  };

  ContentEditableInput.prototype.showMultipleSelections = function (info) {
    removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors);
    removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection);
  };

  ContentEditableInput.prototype.rememberSelection = function () {
    var sel = this.getSelection();
    this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;
    this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;
  };

  ContentEditableInput.prototype.selectionInEditor = function () {
    var sel = this.getSelection();
    if (!sel.rangeCount) { return false }
    var node = sel.getRangeAt(0).commonAncestorContainer;
    return contains(this.div, node)
  };

  ContentEditableInput.prototype.focus = function () {
    if (this.cm.options.readOnly != "nocursor") {
      if (!this.selectionInEditor() || document.activeElement != this.div)
        { this.showSelection(this.prepareSelection(), true); }
      this.div.focus();
    }
  };
  ContentEditableInput.prototype.blur = function () { this.div.blur(); };
  ContentEditableInput.prototype.getField = function () { return this.div };

  ContentEditableInput.prototype.supportsTouch = function () { return true };

  ContentEditableInput.prototype.receivedFocus = function () {
    var input = this;
    if (this.selectionInEditor())
      { this.pollSelection(); }
    else
      { runInOp(this.cm, function () { return input.cm.curOp.selectionChanged = true; }); }

    function poll() {
      if (input.cm.state.focused) {
        input.pollSelection();
        input.polling.set(input.cm.options.pollInterval, poll);
      }
    }
    this.polling.set(this.cm.options.pollInterval, poll);
  };

  ContentEditableInput.prototype.selectionChanged = function () {
    var sel = this.getSelection();
    return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||
      sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset
  };

  ContentEditableInput.prototype.pollSelection = function () {
    if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return }
    var sel = this.getSelection(), cm = this.cm;
    // On Android Chrome (version 56, at least), backspacing into an
    // uneditable block element will put the cursor in that element,
    // and then, because it's not editable, hide the virtual keyboard.
    // Because Android doesn't allow us to actually detect backspace
    // presses in a sane way, this code checks for when that happens
    // and simulates a backspace press in this case.
    if (android && chrome && this.cm.display.gutterSpecs.length && isInGutter(sel.anchorNode)) {
      this.cm.triggerOnKeyDown({type: "keydown", keyCode: 8, preventDefault: Math.abs});
      this.blur();
      this.focus();
      return
    }
    if (this.composing) { return }
    this.rememberSelection();
    var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);
    var head = domToPos(cm, sel.focusNode, sel.focusOffset);
    if (anchor && head) { runInOp(cm, function () {
      setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll);
      if (anchor.bad || head.bad) { cm.curOp.selectionChanged = true; }
    }); }
  };

  ContentEditableInput.prototype.pollContent = function () {
    if (this.readDOMTimeout != null) {
      clearTimeout(this.readDOMTimeout);
      this.readDOMTimeout = null;
    }

    var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary();
    var from = sel.from(), to = sel.to();
    if (from.ch == 0 && from.line > cm.firstLine())
      { from = Pos(from.line - 1, getLine(cm.doc, from.line - 1).length); }
    if (to.ch == getLine(cm.doc, to.line).text.length && to.line < cm.lastLine())
      { to = Pos(to.line + 1, 0); }
    if (from.line < display.viewFrom || to.line > display.viewTo - 1) { return false }

    var fromIndex, fromLine, fromNode;
    if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {
      fromLine = lineNo(display.view[0].line);
      fromNode = display.view[0].node;
    } else {
      fromLine = lineNo(display.view[fromIndex].line);
      fromNode = display.view[fromIndex - 1].node.nextSibling;
    }
    var toIndex = findViewIndex(cm, to.line);
    var toLine, toNode;
    if (toIndex == display.view.length - 1) {
      toLine = display.viewTo - 1;
      toNode = display.lineDiv.lastChild;
    } else {
      toLine = lineNo(display.view[toIndex + 1].line) - 1;
      toNode = display.view[toIndex + 1].node.previousSibling;
    }

    if (!fromNode) { return false }
    var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));
    var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));
    while (newText.length > 1 && oldText.length > 1) {
      if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; }
      else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; }
      else { break }
    }

    var cutFront = 0, cutEnd = 0;
    var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length);
    while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront))
      { ++cutFront; }
    var newBot = lst(newText), oldBot = lst(oldText);
    var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0),
                             oldBot.length - (oldText.length == 1 ? cutFront : 0));
    while (cutEnd < maxCutEnd &&
           newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1))
      { ++cutEnd; }
    // Try to move start of change to start of selection if ambiguous
    if (newText.length == 1 && oldText.length == 1 && fromLine == from.line) {
      while (cutFront && cutFront > from.ch &&
             newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) {
        cutFront--;
        cutEnd++;
      }
    }

    newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd).replace(/^\u200b+/, "");
    newText[0] = newText[0].slice(cutFront).replace(/\u200b+$/, "");

    var chFrom = Pos(fromLine, cutFront);
    var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0);
    if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) {
      replaceRange(cm.doc, newText, chFrom, chTo, "+input");
      return true
    }
  };

  ContentEditableInput.prototype.ensurePolled = function () {
    this.forceCompositionEnd();
  };
  ContentEditableInput.prototype.reset = function () {
    this.forceCompositionEnd();
  };
  ContentEditableInput.prototype.forceCompositionEnd = function () {
    if (!this.composing) { return }
    clearTimeout(this.readDOMTimeout);
    this.composing = null;
    this.updateFromDOM();
    this.div.blur();
    this.div.focus();
  };
  ContentEditableInput.prototype.readFromDOMSoon = function () {
      var this$1 = this;

    if (this.readDOMTimeout != null) { return }
    this.readDOMTimeout = setTimeout(function () {
      this$1.readDOMTimeout = null;
      if (this$1.composing) {
        if (this$1.composing.done) { this$1.composing = null; }
        else { return }
      }
      this$1.updateFromDOM();
    }, 80);
  };

  ContentEditableInput.prototype.updateFromDOM = function () {
      var this$1 = this;

    if (this.cm.isReadOnly() || !this.pollContent())
      { runInOp(this.cm, function () { return regChange(this$1.cm); }); }
  };

  ContentEditableInput.prototype.setUneditable = function (node) {
    node.contentEditable = "false";
  };

  ContentEditableInput.prototype.onKeyPress = function (e) {
    if (e.charCode == 0 || this.composing) { return }
    e.preventDefault();
    if (!this.cm.isReadOnly())
      { operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); }
  };

  ContentEditableInput.prototype.readOnlyChanged = function (val) {
    this.div.contentEditable = String(val != "nocursor");
  };

  ContentEditableInput.prototype.onContextMenu = function () {};
  ContentEditableInput.prototype.resetPosition = function () {};

  ContentEditableInput.prototype.needsContentAttribute = true;

  function posToDOM(cm, pos) {
    var view = findViewForLine(cm, pos.line);
    if (!view || view.hidden) { return null }
    var line = getLine(cm.doc, pos.line);
    var info = mapFromLineView(view, line, pos.line);

    var order = getOrder(line, cm.doc.direction), side = "left";
    if (order) {
      var partPos = getBidiPartAt(order, pos.ch);
      side = partPos % 2 ? "right" : "left";
    }
    var result = nodeAndOffsetInLineMap(info.map, pos.ch, side);
    result.offset = result.collapse == "right" ? result.end : result.start;
    return result
  }

  function isInGutter(node) {
    for (var scan = node; scan; scan = scan.parentNode)
      { if (/CodeMirror-gutter-wrapper/.test(scan.className)) { return true } }
    return false
  }

  function badPos(pos, bad) { if (bad) { pos.bad = true; } return pos }

  function domTextBetween(cm, from, to, fromLine, toLine) {
    var text = "", closing = false, lineSep = cm.doc.lineSeparator(), extraLinebreak = false;
    function recognizeMarker(id) { return function (marker) { return marker.id == id; } }
    function close() {
      if (closing) {
        text += lineSep;
        if (extraLinebreak) { text += lineSep; }
        closing = extraLinebreak = false;
      }
    }
    function addText(str) {
      if (str) {
        close();
        text += str;
      }
    }
    function walk(node) {
      if (node.nodeType == 1) {
        var cmText = node.getAttribute("cm-text");
        if (cmText) {
          addText(cmText);
          return
        }
        var markerID = node.getAttribute("cm-marker"), range;
        if (markerID) {
          var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));
          if (found.length && (range = found[0].find(0)))
            { addText(getBetween(cm.doc, range.from, range.to).join(lineSep)); }
          return
        }
        if (node.getAttribute("contenteditable") == "false") { return }
        var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName);
        if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) { return }

        if (isBlock) { close(); }
        for (var i = 0; i < node.childNodes.length; i++)
          { walk(node.childNodes[i]); }

        if (/^(pre|p)$/i.test(node.nodeName)) { extraLinebreak = true; }
        if (isBlock) { closing = true; }
      } else if (node.nodeType == 3) {
        addText(node.nodeValue.replace(/\u200b/g, "").replace(/\u00a0/g, " "));
      }
    }
    for (;;) {
      walk(from);
      if (from == to) { break }
      from = from.nextSibling;
      extraLinebreak = false;
    }
    return text
  }

  function domToPos(cm, node, offset) {
    var lineNode;
    if (node == cm.display.lineDiv) {
      lineNode = cm.display.lineDiv.childNodes[offset];
      if (!lineNode) { return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true) }
      node = null; offset = 0;
    } else {
      for (lineNode = node;; lineNode = lineNode.parentNode) {
        if (!lineNode || lineNode == cm.display.lineDiv) { return null }
        if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) { break }
      }
    }
    for (var i = 0; i < cm.display.view.length; i++) {
      var lineView = cm.display.view[i];
      if (lineView.node == lineNode)
        { return locateNodeInLineView(lineView, node, offset) }
    }
  }

  function locateNodeInLineView(lineView, node, offset) {
    var wrapper = lineView.text.firstChild, bad = false;
    if (!node || !contains(wrapper, node)) { return badPos(Pos(lineNo(lineView.line), 0), true) }
    if (node == wrapper) {
      bad = true;
      node = wrapper.childNodes[offset];
      offset = 0;
      if (!node) {
        var line = lineView.rest ? lst(lineView.rest) : lineView.line;
        return badPos(Pos(lineNo(line), line.text.length), bad)
      }
    }

    var textNode = node.nodeType == 3 ? node : null, topNode = node;
    if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {
      textNode = node.firstChild;
      if (offset) { offset = textNode.nodeValue.length; }
    }
    while (topNode.parentNode != wrapper) { topNode = topNode.parentNode; }
    var measure = lineView.measure, maps = measure.maps;

    function find(textNode, topNode, offset) {
      for (var i = -1; i < (maps ? maps.length : 0); i++) {
        var map = i < 0 ? measure.map : maps[i];
        for (var j = 0; j < map.length; j += 3) {
          var curNode = map[j + 2];
          if (curNode == textNode || curNode == topNode) {
            var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]);
            var ch = map[j] + offset;
            if (offset < 0 || curNode != textNode) { ch = map[j + (offset ? 1 : 0)]; }
            return Pos(line, ch)
          }
        }
      }
    }
    var found = find(textNode, topNode, offset);
    if (found) { return badPos(found, bad) }

    // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems
    for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) {
      found = find(after, after.firstChild, 0);
      if (found)
        { return badPos(Pos(found.line, found.ch - dist), bad) }
      else
        { dist += after.textContent.length; }
    }
    for (var before = topNode.previousSibling, dist$1 = offset; before; before = before.previousSibling) {
      found = find(before, before.firstChild, -1);
      if (found)
        { return badPos(Pos(found.line, found.ch + dist$1), bad) }
      else
        { dist$1 += before.textContent.length; }
    }
  }

  // TEXTAREA INPUT STYLE

  var TextareaInput = function(cm) {
    this.cm = cm;
    // See input.poll and input.reset
    this.prevInput = "";

    // Flag that indicates whether we expect input to appear real soon
    // now (after some event like 'keypress' or 'input') and are
    // polling intensively.
    this.pollingFast = false;
    // Self-resetting timeout for the poller
    this.polling = new Delayed();
    // Used to work around IE issue with selection being forgotten when focus moves away from textarea
    this.hasSelection = false;
    this.composing = null;
  };

  TextareaInput.prototype.init = function (display) {
      var this$1 = this;

    var input = this, cm = this.cm;
    this.createField(display);
    var te = this.textarea;

    display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild);

    // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)
    if (ios) { te.style.width = "0px"; }

    on(te, "input", function () {
      if (ie && ie_version >= 9 && this$1.hasSelection) { this$1.hasSelection = null; }
      input.poll();
    });

    on(te, "paste", function (e) {
      if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }

      cm.state.pasteIncoming = +new Date;
      input.fastPoll();
    });

    function prepareCopyCut(e) {
      if (signalDOMEvent(cm, e)) { return }
      if (cm.somethingSelected()) {
        setLastCopied({lineWise: false, text: cm.getSelections()});
      } else if (!cm.options.lineWiseCopyCut) {
        return
      } else {
        var ranges = copyableRanges(cm);
        setLastCopied({lineWise: true, text: ranges.text});
        if (e.type == "cut") {
          cm.setSelections(ranges.ranges, null, sel_dontScroll);
        } else {
          input.prevInput = "";
          te.value = ranges.text.join("\n");
          selectInput(te);
        }
      }
      if (e.type == "cut") { cm.state.cutIncoming = +new Date; }
    }
    on(te, "cut", prepareCopyCut);
    on(te, "copy", prepareCopyCut);

    on(display.scroller, "paste", function (e) {
      if (eventInWidget(display, e) || signalDOMEvent(cm, e)) { return }
      if (!te.dispatchEvent) {
        cm.state.pasteIncoming = +new Date;
        input.focus();
        return
      }

      // Pass the `paste` event to the textarea so it's handled by its event listener.
      var event = new Event("paste");
      event.clipboardData = e.clipboardData;
      te.dispatchEvent(event);
    });

    // Prevent normal selection in the editor (we handle our own)
    on(display.lineSpace, "selectstart", function (e) {
      if (!eventInWidget(display, e)) { e_preventDefault(e); }
    });

    on(te, "compositionstart", function () {
      var start = cm.getCursor("from");
      if (input.composing) { input.composing.range.clear(); }
      input.composing = {
        start: start,
        range: cm.markText(start, cm.getCursor("to"), {className: "CodeMirror-composing"})
      };
    });
    on(te, "compositionend", function () {
      if (input.composing) {
        input.poll();
        input.composing.range.clear();
        input.composing = null;
      }
    });
  };

  TextareaInput.prototype.createField = function (_display) {
    // Wraps and hides input textarea
    this.wrapper = hiddenTextarea();
    // The semihidden textarea that is focused when the editor is
    // focused, and receives input.
    this.textarea = this.wrapper.firstChild;
  };

  TextareaInput.prototype.screenReaderLabelChanged = function (label) {
    // Label for screenreaders, accessibility
    if(label) {
      this.textarea.setAttribute('aria-label', label);
    } else {
      this.textarea.removeAttribute('aria-label');
    }
  };

  TextareaInput.prototype.prepareSelection = function () {
    // Redraw the selection and/or cursor
    var cm = this.cm, display = cm.display, doc = cm.doc;
    var result = prepareSelection(cm);

    // Move the hidden textarea near the cursor to prevent scrolling artifacts
    if (cm.options.moveInputWithCursor) {
      var headPos = cursorCoords(cm, doc.sel.primary().head, "div");
      var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();
      result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,
                                          headPos.top + lineOff.top - wrapOff.top));
      result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,
                                           headPos.left + lineOff.left - wrapOff.left));
    }

    return result
  };

  TextareaInput.prototype.showSelection = function (drawn) {
    var cm = this.cm, display = cm.display;
    removeChildrenAndAdd(display.cursorDiv, drawn.cursors);
    removeChildrenAndAdd(display.selectionDiv, drawn.selection);
    if (drawn.teTop != null) {
      this.wrapper.style.top = drawn.teTop + "px";
      this.wrapper.style.left = drawn.teLeft + "px";
    }
  };

  // Reset the input to correspond to the selection (or to be empty,
  // when not typing and nothing is selected)
  TextareaInput.prototype.reset = function (typing) {
    if (this.contextMenuPending || this.composing) { return }
    var cm = this.cm;
    if (cm.somethingSelected()) {
      this.prevInput = "";
      var content = cm.getSelection();
      this.textarea.value = content;
      if (cm.state.focused) { selectInput(this.textarea); }
      if (ie && ie_version >= 9) { this.hasSelection = content; }
    } else if (!typing) {
      this.prevInput = this.textarea.value = "";
      if (ie && ie_version >= 9) { this.hasSelection = null; }
    }
  };

  TextareaInput.prototype.getField = function () { return this.textarea };

  TextareaInput.prototype.supportsTouch = function () { return false };

  TextareaInput.prototype.focus = function () {
    if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt() != this.textarea)) {
      try { this.textarea.focus(); }
      catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM
    }
  };

  TextareaInput.prototype.blur = function () { this.textarea.blur(); };

  TextareaInput.prototype.resetPosition = function () {
    this.wrapper.style.top = this.wrapper.style.left = 0;
  };

  TextareaInput.prototype.receivedFocus = function () { this.slowPoll(); };

  // Poll for input changes, using the normal rate of polling. This
  // runs as long as the editor is focused.
  TextareaInput.prototype.slowPoll = function () {
      var this$1 = this;

    if (this.pollingFast) { return }
    this.polling.set(this.cm.options.pollInterval, function () {
      this$1.poll();
      if (this$1.cm.state.focused) { this$1.slowPoll(); }
    });
  };

  // When an event has just come in that is likely to add or change
  // something in the input textarea, we poll faster, to ensure that
  // the change appears on the screen quickly.
  TextareaInput.prototype.fastPoll = function () {
    var missed = false, input = this;
    input.pollingFast = true;
    function p() {
      var changed = input.poll();
      if (!changed && !missed) {missed = true; input.polling.set(60, p);}
      else {input.pollingFast = false; input.slowPoll();}
    }
    input.polling.set(20, p);
  };

  // Read input from the textarea, and update the document to match.
  // When something is selected, it is present in the textarea, and
  // selected (unless it is huge, in which case a placeholder is
  // used). When nothing is selected, the cursor sits after previously
  // seen text (can be empty), which is stored in prevInput (we must
  // not reset the textarea when typing, because that breaks IME).
  TextareaInput.prototype.poll = function () {
      var this$1 = this;

    var cm = this.cm, input = this.textarea, prevInput = this.prevInput;
    // Since this is called a *lot*, try to bail out as cheaply as
    // possible when it is clear that nothing happened. hasSelection
    // will be the case when there is a lot of text in the textarea,
    // in which case reading its value would be expensive.
    if (this.contextMenuPending || !cm.state.focused ||
        (hasSelection(input) && !prevInput && !this.composing) ||
        cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq)
      { return false }

    var text = input.value;
    // If nothing changed, bail.
    if (text == prevInput && !cm.somethingSelected()) { return false }
    // Work around nonsensical selection resetting in IE9/10, and
    // inexplicable appearance of private area unicode characters on
    // some key combos in Mac (#2689).
    if (ie && ie_version >= 9 && this.hasSelection === text ||
        mac && /[\uf700-\uf7ff]/.test(text)) {
      cm.display.input.reset();
      return false
    }

    if (cm.doc.sel == cm.display.selForContextMenu) {
      var first = text.charCodeAt(0);
      if (first == 0x200b && !prevInput) { prevInput = "\u200b"; }
      if (first == 0x21da) { this.reset(); return this.cm.execCommand("undo") }
    }
    // Find the part of the input that is actually new
    var same = 0, l = Math.min(prevInput.length, text.length);
    while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) { ++same; }

    runInOp(cm, function () {
      applyTextInput(cm, text.slice(same), prevInput.length - same,
                     null, this$1.composing ? "*compose" : null);

      // Don't leave long text in the textarea, since it makes further polling slow
      if (text.length > 1000 || text.indexOf("\n") > -1) { input.value = this$1.prevInput = ""; }
      else { this$1.prevInput = text; }

      if (this$1.composing) {
        this$1.composing.range.clear();
        this$1.composing.range = cm.markText(this$1.composing.start, cm.getCursor("to"),
                                           {className: "CodeMirror-composing"});
      }
    });
    return true
  };

  TextareaInput.prototype.ensurePolled = function () {
    if (this.pollingFast && this.poll()) { this.pollingFast = false; }
  };

  TextareaInput.prototype.onKeyPress = function () {
    if (ie && ie_version >= 9) { this.hasSelection = null; }
    this.fastPoll();
  };

  TextareaInput.prototype.onContextMenu = function (e) {
    var input = this, cm = input.cm, display = cm.display, te = input.textarea;
    if (input.contextMenuPending) { input.contextMenuPending(); }
    var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;
    if (!pos || presto) { return } // Opera is difficult.

    // Reset the current text selection only if the click is done outside of the selection
    // and 'resetSelectionOnContextMenu' option is true.
    var reset = cm.options.resetSelectionOnContextMenu;
    if (reset && cm.doc.sel.contains(pos) == -1)
      { operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll); }

    var oldCSS = te.style.cssText, oldWrapperCSS = input.wrapper.style.cssText;
    var wrapperBox = input.wrapper.offsetParent.getBoundingClientRect();
    input.wrapper.style.cssText = "position: static";
    te.style.cssText = "position: absolute; width: 30px; height: 30px;\n      top: " + (e.clientY - wrapperBox.top - 5) + "px; left: " + (e.clientX - wrapperBox.left - 5) + "px;\n      z-index: 1000; background: " + (ie ? "rgba(255, 255, 255, .05)" : "transparent") + ";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";
    var oldScrollY;
    if (webkit) { oldScrollY = window.scrollY; } // Work around Chrome issue (#2712)
    display.input.focus();
    if (webkit) { window.scrollTo(null, oldScrollY); }
    display.input.reset();
    // Adds "Select all" to context menu in FF
    if (!cm.somethingSelected()) { te.value = input.prevInput = " "; }
    input.contextMenuPending = rehide;
    display.selForContextMenu = cm.doc.sel;
    clearTimeout(display.detectingSelectAll);

    // Select-all will be greyed out if there's nothing to select, so
    // this adds a zero-width space so that we can later check whether
    // it got selected.
    function prepareSelectAllHack() {
      if (te.selectionStart != null) {
        var selected = cm.somethingSelected();
        var extval = "\u200b" + (selected ? te.value : "");
        te.value = "\u21da"; // Used to catch context-menu undo
        te.value = extval;
        input.prevInput = selected ? "" : "\u200b";
        te.selectionStart = 1; te.selectionEnd = extval.length;
        // Re-set this, in case some other handler touched the
        // selection in the meantime.
        display.selForContextMenu = cm.doc.sel;
      }
    }
    function rehide() {
      if (input.contextMenuPending != rehide) { return }
      input.contextMenuPending = false;
      input.wrapper.style.cssText = oldWrapperCSS;
      te.style.cssText = oldCSS;
      if (ie && ie_version < 9) { display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos); }

      // Try to detect the user choosing select-all
      if (te.selectionStart != null) {
        if (!ie || (ie && ie_version < 9)) { prepareSelectAllHack(); }
        var i = 0, poll = function () {
          if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 &&
              te.selectionEnd > 0 && input.prevInput == "\u200b") {
            operation(cm, selectAll)(cm);
          } else if (i++ < 10) {
            display.detectingSelectAll = setTimeout(poll, 500);
          } else {
            display.selForContextMenu = null;
            display.input.reset();
          }
        };
        display.detectingSelectAll = setTimeout(poll, 200);
      }
    }

    if (ie && ie_version >= 9) { prepareSelectAllHack(); }
    if (captureRightClick) {
      e_stop(e);
      var mouseup = function () {
        off(window, "mouseup", mouseup);
        setTimeout(rehide, 20);
      };
      on(window, "mouseup", mouseup);
    } else {
      setTimeout(rehide, 50);
    }
  };

  TextareaInput.prototype.readOnlyChanged = function (val) {
    if (!val) { this.reset(); }
    this.textarea.disabled = val == "nocursor";
    this.textarea.readOnly = !!val;
  };

  TextareaInput.prototype.setUneditable = function () {};

  TextareaInput.prototype.needsContentAttribute = false;

  function fromTextArea(textarea, options) {
    options = options ? copyObj(options) : {};
    options.value = textarea.value;
    if (!options.tabindex && textarea.tabIndex)
      { options.tabindex = textarea.tabIndex; }
    if (!options.placeholder && textarea.placeholder)
      { options.placeholder = textarea.placeholder; }
    // Set autofocus to true if this textarea is focused, or if it has
    // autofocus and no other element is focused.
    if (options.autofocus == null) {
      var hasFocus = activeElt();
      options.autofocus = hasFocus == textarea ||
        textarea.getAttribute("autofocus") != null && hasFocus == document.body;
    }

    function save() {textarea.value = cm.getValue();}

    var realSubmit;
    if (textarea.form) {
      on(textarea.form, "submit", save);
      // Deplorable hack to make the submit method do the right thing.
      if (!options.leaveSubmitMethodAlone) {
        var form = textarea.form;
        realSubmit = form.submit;
        try {
          var wrappedSubmit = form.submit = function () {
            save();
            form.submit = realSubmit;
            form.submit();
            form.submit = wrappedSubmit;
          };
        } catch(e) {}
      }
    }

    options.finishInit = function (cm) {
      cm.save = save;
      cm.getTextArea = function () { return textarea; };
      cm.toTextArea = function () {
        cm.toTextArea = isNaN; // Prevent this from being ran twice
        save();
        textarea.parentNode.removeChild(cm.getWrapperElement());
        textarea.style.display = "";
        if (textarea.form) {
          off(textarea.form, "submit", save);
          if (!options.leaveSubmitMethodAlone && typeof textarea.form.submit == "function")
            { textarea.form.submit = realSubmit; }
        }
      };
    };

    textarea.style.display = "none";
    var cm = CodeMirror(function (node) { return textarea.parentNode.insertBefore(node, textarea.nextSibling); },
      options);
    return cm
  }

  function addLegacyProps(CodeMirror) {
    CodeMirror.off = off;
    CodeMirror.on = on;
    CodeMirror.wheelEventPixels = wheelEventPixels;
    CodeMirror.Doc = Doc;
    CodeMirror.splitLines = splitLinesAuto;
    CodeMirror.countColumn = countColumn;
    CodeMirror.findColumn = findColumn;
    CodeMirror.isWordChar = isWordCharBasic;
    CodeMirror.Pass = Pass;
    CodeMirror.signal = signal;
    CodeMirror.Line = Line;
    CodeMirror.changeEnd = changeEnd;
    CodeMirror.scrollbarModel = scrollbarModel;
    CodeMirror.Pos = Pos;
    CodeMirror.cmpPos = cmp;
    CodeMirror.modes = modes;
    CodeMirror.mimeModes = mimeModes;
    CodeMirror.resolveMode = resolveMode;
    CodeMirror.getMode = getMode;
    CodeMirror.modeExtensions = modeExtensions;
    CodeMirror.extendMode = extendMode;
    CodeMirror.copyState = copyState;
    CodeMirror.startState = startState;
    CodeMirror.innerMode = innerMode;
    CodeMirror.commands = commands;
    CodeMirror.keyMap = keyMap;
    CodeMirror.keyName = keyName;
    CodeMirror.isModifierKey = isModifierKey;
    CodeMirror.lookupKey = lookupKey;
    CodeMirror.normalizeKeyMap = normalizeKeyMap;
    CodeMirror.StringStream = StringStream;
    CodeMirror.SharedTextMarker = SharedTextMarker;
    CodeMirror.TextMarker = TextMarker;
    CodeMirror.LineWidget = LineWidget;
    CodeMirror.e_preventDefault = e_preventDefault;
    CodeMirror.e_stopPropagation = e_stopPropagation;
    CodeMirror.e_stop = e_stop;
    CodeMirror.addClass = addClass;
    CodeMirror.contains = contains;
    CodeMirror.rmClass = rmClass;
    CodeMirror.keyNames = keyNames;
  }

  // EDITOR CONSTRUCTOR

  defineOptions(CodeMirror);

  addEditorMethods(CodeMirror);

  // Set up methods on CodeMirror's prototype to redirect to the editor's document.
  var dontDelegate = "iter insert remove copy getEditor constructor".split(" ");
  for (var prop in Doc.prototype) { if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)
    { CodeMirror.prototype[prop] = (function(method) {
      return function() {return method.apply(this.doc, arguments)}
    })(Doc.prototype[prop]); } }

  eventMixin(Doc);
  CodeMirror.inputStyles = {"textarea": TextareaInput, "contenteditable": ContentEditableInput};

  // Extra arguments are stored as the mode's dependencies, which is
  // used by (legacy) mechanisms like loadmode.js to automatically
  // load a mode. (Preferred mechanism is the require/define calls.)
  CodeMirror.defineMode = function(name/*, mode, …*/) {
    if (!CodeMirror.defaults.mode && name != "null") { CodeMirror.defaults.mode = name; }
    defineMode.apply(this, arguments);
  };

  CodeMirror.defineMIME = defineMIME;

  // Minimal default mode.
  CodeMirror.defineMode("null", function () { return ({token: function (stream) { return stream.skipToEnd(); }}); });
  CodeMirror.defineMIME("text/plain", "null");

  // EXTENSIONS

  CodeMirror.defineExtension = function (name, func) {
    CodeMirror.prototype[name] = func;
  };
  CodeMirror.defineDocExtension = function (name, func) {
    Doc.prototype[name] = func;
  };

  CodeMirror.fromTextArea = fromTextArea;

  addLegacyProps(CodeMirror);

  CodeMirror.version = "5.58.3";

  return CodeMirror;

})));


/***/ }),

/***/ "56ef":
/***/ (function(module, exports, __webpack_require__) {

var getBuiltIn = __webpack_require__("d066");
var getOwnPropertyNamesModule = __webpack_require__("241c");
var getOwnPropertySymbolsModule = __webpack_require__("7418");
var anObject = __webpack_require__("825a");

// all object keys, includes non-enumerable and symbols
module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  var keys = getOwnPropertyNamesModule.f(anObject(it));
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
};


/***/ }),

/***/ "576e":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "5899":
/***/ (function(module, exports) {

// a string of all valid unicode whitespaces
// eslint-disable-next-line max-len
module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';


/***/ }),

/***/ "58a8":
/***/ (function(module, exports, __webpack_require__) {

var requireObjectCoercible = __webpack_require__("1d80");
var whitespaces = __webpack_require__("5899");

var whitespace = '[' + whitespaces + ']';
var ltrim = RegExp('^' + whitespace + whitespace + '*');
var rtrim = RegExp(whitespace + whitespace + '*$');

// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
var createMethod = function (TYPE) {
  return function ($this) {
    var string = String(requireObjectCoercible($this));
    if (TYPE & 1) string = string.replace(ltrim, '');
    if (TYPE & 2) string = string.replace(rtrim, '');
    return string;
  };
};

module.exports = {
  // `String.prototype.{ trimLeft, trimStart }` methods
  // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart
  start: createMethod(1),
  // `String.prototype.{ trimRight, trimEnd }` methods
  // https://tc39.github.io/ecma262/#sec-string.prototype.trimend
  end: createMethod(2),
  // `String.prototype.trim` method
  // https://tc39.github.io/ecma262/#sec-string.prototype.trim
  trim: createMethod(3)
};


/***/ }),

/***/ "5924":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("d28b");

__webpack_require__("4de4");

__webpack_require__("caad");

__webpack_require__("c975");

__webpack_require__("e260");

__webpack_require__("a9e3");

__webpack_require__("d3b7");

__webpack_require__("ac1f");

__webpack_require__("2532");

__webpack_require__("3ca3");

__webpack_require__("466d");

__webpack_require__("5319");

__webpack_require__("1276");

__webpack_require__("ddb0");

var _typeof2 = __webpack_require__("7037");

exports.__esModule = true;
exports.isInContainer = exports.getScrollContainer = exports.isScroll = exports.getStyle = exports.once = exports.off = exports.on = undefined;

var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) {
  return _typeof2(obj);
} : function (obj) {
  return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
};
/* istanbul ignore next */


exports.hasClass = hasClass;
exports.addClass = addClass;
exports.removeClass = removeClass;
exports.setStyle = setStyle;

var _vue = __webpack_require__("8bbf");

var _vue2 = _interopRequireDefault(_vue);

function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    default: obj
  };
}

var isServer = _vue2.default.prototype.$isServer;
var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
var MOZ_HACK_REGEXP = /^moz([A-Z])/;
var ieVersion = isServer ? 0 : Number(document.documentMode);
/* istanbul ignore next */

var trim = function trim(string) {
  return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
};
/* istanbul ignore next */


var camelCase = function camelCase(name) {
  return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
    return offset ? letter.toUpperCase() : letter;
  }).replace(MOZ_HACK_REGEXP, 'Moz$1');
};
/* istanbul ignore next */


var on = exports.on = function () {
  if (!isServer && document.addEventListener) {
    return function (element, event, handler) {
      if (element && event && handler) {
        element.addEventListener(event, handler, false);
      }
    };
  } else {
    return function (element, event, handler) {
      if (element && event && handler) {
        element.attachEvent('on' + event, handler);
      }
    };
  }
}();
/* istanbul ignore next */


var off = exports.off = function () {
  if (!isServer && document.removeEventListener) {
    return function (element, event, handler) {
      if (element && event) {
        element.removeEventListener(event, handler, false);
      }
    };
  } else {
    return function (element, event, handler) {
      if (element && event) {
        element.detachEvent('on' + event, handler);
      }
    };
  }
}();
/* istanbul ignore next */


var once = exports.once = function once(el, event, fn) {
  var listener = function listener() {
    if (fn) {
      fn.apply(this, arguments);
    }

    off(el, event, listener);
  };

  on(el, event, listener);
};
/* istanbul ignore next */


function hasClass(el, cls) {
  if (!el || !cls) return false;
  if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');

  if (el.classList) {
    return el.classList.contains(cls);
  } else {
    return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
  }
}

;
/* istanbul ignore next */

function addClass(el, cls) {
  if (!el) return;
  var curClass = el.className;
  var classes = (cls || '').split(' ');

  for (var i = 0, j = classes.length; i < j; i++) {
    var clsName = classes[i];
    if (!clsName) continue;

    if (el.classList) {
      el.classList.add(clsName);
    } else if (!hasClass(el, clsName)) {
      curClass += ' ' + clsName;
    }
  }

  if (!el.classList) {
    el.className = curClass;
  }
}

;
/* istanbul ignore next */

function removeClass(el, cls) {
  if (!el || !cls) return;
  var classes = cls.split(' ');
  var curClass = ' ' + el.className + ' ';

  for (var i = 0, j = classes.length; i < j; i++) {
    var clsName = classes[i];
    if (!clsName) continue;

    if (el.classList) {
      el.classList.remove(clsName);
    } else if (hasClass(el, clsName)) {
      curClass = curClass.replace(' ' + clsName + ' ', ' ');
    }
  }

  if (!el.classList) {
    el.className = trim(curClass);
  }
}

;
/* istanbul ignore next */

var getStyle = exports.getStyle = ieVersion < 9 ? function (element, styleName) {
  if (isServer) return;
  if (!element || !styleName) return null;
  styleName = camelCase(styleName);

  if (styleName === 'float') {
    styleName = 'styleFloat';
  }

  try {
    switch (styleName) {
      case 'opacity':
        try {
          return element.filters.item('alpha').opacity / 100;
        } catch (e) {
          return 1.0;
        }

      default:
        return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
    }
  } catch (e) {
    return element.style[styleName];
  }
} : function (element, styleName) {
  if (isServer) return;
  if (!element || !styleName) return null;
  styleName = camelCase(styleName);

  if (styleName === 'float') {
    styleName = 'cssFloat';
  }

  try {
    var computed = document.defaultView.getComputedStyle(element, '');
    return element.style[styleName] || computed ? computed[styleName] : null;
  } catch (e) {
    return element.style[styleName];
  }
};
/* istanbul ignore next */

function setStyle(element, styleName, value) {
  if (!element || !styleName) return;

  if ((typeof styleName === 'undefined' ? 'undefined' : _typeof(styleName)) === 'object') {
    for (var prop in styleName) {
      if (styleName.hasOwnProperty(prop)) {
        setStyle(element, prop, styleName[prop]);
      }
    }
  } else {
    styleName = camelCase(styleName);

    if (styleName === 'opacity' && ieVersion < 9) {
      element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
    } else {
      element.style[styleName] = value;
    }
  }
}

;

var isScroll = exports.isScroll = function isScroll(el, vertical) {
  if (isServer) return;
  var determinedDirection = vertical !== null || vertical !== undefined;
  var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
  return overflow.match(/(scroll|auto)/);
};

var getScrollContainer = exports.getScrollContainer = function getScrollContainer(el, vertical) {
  if (isServer) return;
  var parent = el;

  while (parent) {
    if ([window, document, document.documentElement].includes(parent)) {
      return window;
    }

    if (isScroll(parent, vertical)) {
      return parent;
    }

    parent = parent.parentNode;
  }

  return parent;
};

var isInContainer = exports.isInContainer = function isInContainer(el, container) {
  if (isServer || !el || !container) return false;
  var elRect = el.getBoundingClientRect();
  var containerRect = void 0;

  if ([window, document, document.documentElement, null, undefined].includes(container)) {
    containerRect = {
      top: 0,
      right: window.innerWidth,
      bottom: window.innerHeight,
      left: 0
    };
  } else {
    containerRect = container.getBoundingClientRect();
  }

  return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
};

/***/ }),

/***/ "597f":
/***/ (function(module, exports) {

/* eslint-disable no-undefined,no-param-reassign,no-shadow */

/**
 * Throttle execution of a function. Especially useful for rate limiting
 * execution of handlers on events like resize and scroll.
 *
 * @param  {Number}    delay          A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
 * @param  {Boolean}   [noTrailing]   Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the
 *                                    throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time
 *                                    after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,
 *                                    the internal counter is reset)
 * @param  {Function}  callback       A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
 *                                    to `callback` when the throttled-function is executed.
 * @param  {Boolean}   [debounceMode] If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),
 *                                    schedule `callback` to execute after `delay` ms.
 *
 * @return {Function}  A new, throttled, function.
 */
module.exports = function ( delay, noTrailing, callback, debounceMode ) {

	// After wrapper has stopped being called, this timeout ensures that
	// `callback` is executed at the proper times in `throttle` and `end`
	// debounce modes.
	var timeoutID;

	// Keep track of the last time `callback` was executed.
	var lastExec = 0;

	// `noTrailing` defaults to falsy.
	if ( typeof noTrailing !== 'boolean' ) {
		debounceMode = callback;
		callback = noTrailing;
		noTrailing = undefined;
	}

	// The `wrapper` function encapsulates all of the throttling / debouncing
	// functionality and when executed will limit the rate at which `callback`
	// is executed.
	function wrapper () {

		var self = this;
		var elapsed = Number(new Date()) - lastExec;
		var args = arguments;

		// Execute `callback` and update the `lastExec` timestamp.
		function exec () {
			lastExec = Number(new Date());
			callback.apply(self, args);
		}

		// If `debounceMode` is true (at begin) this is used to clear the flag
		// to allow future `callback` executions.
		function clear () {
			timeoutID = undefined;
		}

		if ( debounceMode && !timeoutID ) {
			// Since `wrapper` is being called for the first time and
			// `debounceMode` is true (at begin), execute `callback`.
			exec();
		}

		// Clear any existing timeout.
		if ( timeoutID ) {
			clearTimeout(timeoutID);
		}

		if ( debounceMode === undefined && elapsed > delay ) {
			// In throttle mode, if `delay` time has been exceeded, execute
			// `callback`.
			exec();

		} else if ( noTrailing !== true ) {
			// In trailing throttle mode, since `delay` time has not been
			// exceeded, schedule `callback` to execute `delay` ms after most
			// recent execution.
			//
			// If `debounceMode` is true (at begin), schedule `clear` to execute
			// after `delay` ms.
			//
			// If `debounceMode` is false (at end), schedule `callback` to
			// execute after `delay` ms.
			timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
		}

	}

	// Return the wrapper function.
	return wrapper;

};


/***/ }),

/***/ "5a34":
/***/ (function(module, exports, __webpack_require__) {

var isRegExp = __webpack_require__("44e7");

module.exports = function (it) {
  if (isRegExp(it)) {
    throw TypeError("The method doesn't accept regular expressions");
  } return it;
};


/***/ }),

/***/ "5a43":
/***/ (function(module, exports) {

function _arrayLikeToArray(arr, len) {
  if (len == null || len > arr.length) len = arr.length;

  for (var i = 0, arr2 = new Array(len); i < len; i++) {
    arr2[i] = arr[i];
  }

  return arr2;
}

module.exports = _arrayLikeToArray;

/***/ }),

/***/ "5a94":
/***/ (function(module, exports, __webpack_require__) {

var shared = __webpack_require__("b367")('keys');
var uid = __webpack_require__("8b1a");
module.exports = function (key) {
  return shared[key] || (shared[key] = uid(key));
};


/***/ }),

/***/ "5bef":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"), __webpack_require__("f9d4"), __webpack_require__("7b00"), __webpack_require__("d69f"));
  else {}
})(function(CodeMirror) {
"use strict";

CodeMirror.defineMode("pug", function (config) {
  // token types
  var KEYWORD = 'keyword';
  var DOCTYPE = 'meta';
  var ID = 'builtin';
  var CLASS = 'qualifier';

  var ATTRS_NEST = {
    '{': '}',
    '(': ')',
    '[': ']'
  };

  var jsMode = CodeMirror.getMode(config, 'javascript');

  function State() {
    this.javaScriptLine = false;
    this.javaScriptLineExcludesColon = false;

    this.javaScriptArguments = false;
    this.javaScriptArgumentsDepth = 0;

    this.isInterpolating = false;
    this.interpolationNesting = 0;

    this.jsState = CodeMirror.startState(jsMode);

    this.restOfLine = '';

    this.isIncludeFiltered = false;
    this.isEach = false;

    this.lastTag = '';
    this.scriptType = '';

    // Attributes Mode
    this.isAttrs = false;
    this.attrsNest = [];
    this.inAttributeName = true;
    this.attributeIsType = false;
    this.attrValue = '';

    // Indented Mode
    this.indentOf = Infinity;
    this.indentToken = '';

    this.innerMode = null;
    this.innerState = null;

    this.innerModeForLine = false;
  }
  /**
   * Safely copy a state
   *
   * @return {State}
   */
  State.prototype.copy = function () {
    var res = new State();
    res.javaScriptLine = this.javaScriptLine;
    res.javaScriptLineExcludesColon = this.javaScriptLineExcludesColon;
    res.javaScriptArguments = this.javaScriptArguments;
    res.javaScriptArgumentsDepth = this.javaScriptArgumentsDepth;
    res.isInterpolating = this.isInterpolating;
    res.interpolationNesting = this.interpolationNesting;

    res.jsState = CodeMirror.copyState(jsMode, this.jsState);

    res.innerMode = this.innerMode;
    if (this.innerMode && this.innerState) {
      res.innerState = CodeMirror.copyState(this.innerMode, this.innerState);
    }

    res.restOfLine = this.restOfLine;

    res.isIncludeFiltered = this.isIncludeFiltered;
    res.isEach = this.isEach;
    res.lastTag = this.lastTag;
    res.scriptType = this.scriptType;
    res.isAttrs = this.isAttrs;
    res.attrsNest = this.attrsNest.slice();
    res.inAttributeName = this.inAttributeName;
    res.attributeIsType = this.attributeIsType;
    res.attrValue = this.attrValue;
    res.indentOf = this.indentOf;
    res.indentToken = this.indentToken;

    res.innerModeForLine = this.innerModeForLine;

    return res;
  };

  function javaScript(stream, state) {
    if (stream.sol()) {
      // if javaScriptLine was set at end of line, ignore it
      state.javaScriptLine = false;
      state.javaScriptLineExcludesColon = false;
    }
    if (state.javaScriptLine) {
      if (state.javaScriptLineExcludesColon && stream.peek() === ':') {
        state.javaScriptLine = false;
        state.javaScriptLineExcludesColon = false;
        return;
      }
      var tok = jsMode.token(stream, state.jsState);
      if (stream.eol()) state.javaScriptLine = false;
      return tok || true;
    }
  }
  function javaScriptArguments(stream, state) {
    if (state.javaScriptArguments) {
      if (state.javaScriptArgumentsDepth === 0 && stream.peek() !== '(') {
        state.javaScriptArguments = false;
        return;
      }
      if (stream.peek() === '(') {
        state.javaScriptArgumentsDepth++;
      } else if (stream.peek() === ')') {
        state.javaScriptArgumentsDepth--;
      }
      if (state.javaScriptArgumentsDepth === 0) {
        state.javaScriptArguments = false;
        return;
      }

      var tok = jsMode.token(stream, state.jsState);
      return tok || true;
    }
  }

  function yieldStatement(stream) {
    if (stream.match(/^yield\b/)) {
        return 'keyword';
    }
  }

  function doctype(stream) {
    if (stream.match(/^(?:doctype) *([^\n]+)?/)) {
        return DOCTYPE;
    }
  }

  function interpolation(stream, state) {
    if (stream.match('#{')) {
      state.isInterpolating = true;
      state.interpolationNesting = 0;
      return 'punctuation';
    }
  }

  function interpolationContinued(stream, state) {
    if (state.isInterpolating) {
      if (stream.peek() === '}') {
        state.interpolationNesting--;
        if (state.interpolationNesting < 0) {
          stream.next();
          state.isInterpolating = false;
          return 'punctuation';
        }
      } else if (stream.peek() === '{') {
        state.interpolationNesting++;
      }
      return jsMode.token(stream, state.jsState) || true;
    }
  }

  function caseStatement(stream, state) {
    if (stream.match(/^case\b/)) {
      state.javaScriptLine = true;
      return KEYWORD;
    }
  }

  function when(stream, state) {
    if (stream.match(/^when\b/)) {
      state.javaScriptLine = true;
      state.javaScriptLineExcludesColon = true;
      return KEYWORD;
    }
  }

  function defaultStatement(stream) {
    if (stream.match(/^default\b/)) {
      return KEYWORD;
    }
  }

  function extendsStatement(stream, state) {
    if (stream.match(/^extends?\b/)) {
      state.restOfLine = 'string';
      return KEYWORD;
    }
  }

  function append(stream, state) {
    if (stream.match(/^append\b/)) {
      state.restOfLine = 'variable';
      return KEYWORD;
    }
  }
  function prepend(stream, state) {
    if (stream.match(/^prepend\b/)) {
      state.restOfLine = 'variable';
      return KEYWORD;
    }
  }
  function block(stream, state) {
    if (stream.match(/^block\b *(?:(prepend|append)\b)?/)) {
      state.restOfLine = 'variable';
      return KEYWORD;
    }
  }

  function include(stream, state) {
    if (stream.match(/^include\b/)) {
      state.restOfLine = 'string';
      return KEYWORD;
    }
  }

  function includeFiltered(stream, state) {
    if (stream.match(/^include:([a-zA-Z0-9\-]+)/, false) && stream.match('include')) {
      state.isIncludeFiltered = true;
      return KEYWORD;
    }
  }

  function includeFilteredContinued(stream, state) {
    if (state.isIncludeFiltered) {
      var tok = filter(stream, state);
      state.isIncludeFiltered = false;
      state.restOfLine = 'string';
      return tok;
    }
  }

  function mixin(stream, state) {
    if (stream.match(/^mixin\b/)) {
      state.javaScriptLine = true;
      return KEYWORD;
    }
  }

  function call(stream, state) {
    if (stream.match(/^\+([-\w]+)/)) {
      if (!stream.match(/^\( *[-\w]+ *=/, false)) {
        state.javaScriptArguments = true;
        state.javaScriptArgumentsDepth = 0;
      }
      return 'variable';
    }
    if (stream.match(/^\+#{/, false)) {
      stream.next();
      state.mixinCallAfter = true;
      return interpolation(stream, state);
    }
  }
  function callArguments(stream, state) {
    if (state.mixinCallAfter) {
      state.mixinCallAfter = false;
      if (!stream.match(/^\( *[-\w]+ *=/, false)) {
        state.javaScriptArguments = true;
        state.javaScriptArgumentsDepth = 0;
      }
      return true;
    }
  }

  function conditional(stream, state) {
    if (stream.match(/^(if|unless|else if|else)\b/)) {
      state.javaScriptLine = true;
      return KEYWORD;
    }
  }

  function each(stream, state) {
    if (stream.match(/^(- *)?(each|for)\b/)) {
      state.isEach = true;
      return KEYWORD;
    }
  }
  function eachContinued(stream, state) {
    if (state.isEach) {
      if (stream.match(/^ in\b/)) {
        state.javaScriptLine = true;
        state.isEach = false;
        return KEYWORD;
      } else if (stream.sol() || stream.eol()) {
        state.isEach = false;
      } else if (stream.next()) {
        while (!stream.match(/^ in\b/, false) && stream.next());
        return 'variable';
      }
    }
  }

  function whileStatement(stream, state) {
    if (stream.match(/^while\b/)) {
      state.javaScriptLine = true;
      return KEYWORD;
    }
  }

  function tag(stream, state) {
    var captures;
    if (captures = stream.match(/^(\w(?:[-:\w]*\w)?)\/?/)) {
      state.lastTag = captures[1].toLowerCase();
      if (state.lastTag === 'script') {
        state.scriptType = 'application/javascript';
      }
      return 'tag';
    }
  }

  function filter(stream, state) {
    if (stream.match(/^:([\w\-]+)/)) {
      var innerMode;
      if (config && config.innerModes) {
        innerMode = config.innerModes(stream.current().substring(1));
      }
      if (!innerMode) {
        innerMode = stream.current().substring(1);
      }
      if (typeof innerMode === 'string') {
        innerMode = CodeMirror.getMode(config, innerMode);
      }
      setInnerMode(stream, state, innerMode);
      return 'atom';
    }
  }

  function code(stream, state) {
    if (stream.match(/^(!?=|-)/)) {
      state.javaScriptLine = true;
      return 'punctuation';
    }
  }

  function id(stream) {
    if (stream.match(/^#([\w-]+)/)) {
      return ID;
    }
  }

  function className(stream) {
    if (stream.match(/^\.([\w-]+)/)) {
      return CLASS;
    }
  }

  function attrs(stream, state) {
    if (stream.peek() == '(') {
      stream.next();
      state.isAttrs = true;
      state.attrsNest = [];
      state.inAttributeName = true;
      state.attrValue = '';
      state.attributeIsType = false;
      return 'punctuation';
    }
  }

  function attrsContinued(stream, state) {
    if (state.isAttrs) {
      if (ATTRS_NEST[stream.peek()]) {
        state.attrsNest.push(ATTRS_NEST[stream.peek()]);
      }
      if (state.attrsNest[state.attrsNest.length - 1] === stream.peek()) {
        state.attrsNest.pop();
      } else  if (stream.eat(')')) {
        state.isAttrs = false;
        return 'punctuation';
      }
      if (state.inAttributeName && stream.match(/^[^=,\)!]+/)) {
        if (stream.peek() === '=' || stream.peek() === '!') {
          state.inAttributeName = false;
          state.jsState = CodeMirror.startState(jsMode);
          if (state.lastTag === 'script' && stream.current().trim().toLowerCase() === 'type') {
            state.attributeIsType = true;
          } else {
            state.attributeIsType = false;
          }
        }
        return 'attribute';
      }

      var tok = jsMode.token(stream, state.jsState);
      if (state.attributeIsType && tok === 'string') {
        state.scriptType = stream.current().toString();
      }
      if (state.attrsNest.length === 0 && (tok === 'string' || tok === 'variable' || tok === 'keyword')) {
        try {
          Function('', 'var x ' + state.attrValue.replace(/,\s*$/, '').replace(/^!/, ''));
          state.inAttributeName = true;
          state.attrValue = '';
          stream.backUp(stream.current().length);
          return attrsContinued(stream, state);
        } catch (ex) {
          //not the end of an attribute
        }
      }
      state.attrValue += stream.current();
      return tok || true;
    }
  }

  function attributesBlock(stream, state) {
    if (stream.match(/^&attributes\b/)) {
      state.javaScriptArguments = true;
      state.javaScriptArgumentsDepth = 0;
      return 'keyword';
    }
  }

  function indent(stream) {
    if (stream.sol() && stream.eatSpace()) {
      return 'indent';
    }
  }

  function comment(stream, state) {
    if (stream.match(/^ *\/\/(-)?([^\n]*)/)) {
      state.indentOf = stream.indentation();
      state.indentToken = 'comment';
      return 'comment';
    }
  }

  function colon(stream) {
    if (stream.match(/^: */)) {
      return 'colon';
    }
  }

  function text(stream, state) {
    if (stream.match(/^(?:\| ?| )([^\n]+)/)) {
      return 'string';
    }
    if (stream.match(/^(<[^\n]*)/, false)) {
      // html string
      setInnerMode(stream, state, 'htmlmixed');
      state.innerModeForLine = true;
      return innerMode(stream, state, true);
    }
  }

  function dot(stream, state) {
    if (stream.eat('.')) {
      var innerMode = null;
      if (state.lastTag === 'script' && state.scriptType.toLowerCase().indexOf('javascript') != -1) {
        innerMode = state.scriptType.toLowerCase().replace(/"|'/g, '');
      } else if (state.lastTag === 'style') {
        innerMode = 'css';
      }
      setInnerMode(stream, state, innerMode);
      return 'dot';
    }
  }

  function fail(stream) {
    stream.next();
    return null;
  }


  function setInnerMode(stream, state, mode) {
    mode = CodeMirror.mimeModes[mode] || mode;
    mode = config.innerModes ? config.innerModes(mode) || mode : mode;
    mode = CodeMirror.mimeModes[mode] || mode;
    mode = CodeMirror.getMode(config, mode);
    state.indentOf = stream.indentation();

    if (mode && mode.name !== 'null') {
      state.innerMode = mode;
    } else {
      state.indentToken = 'string';
    }
  }
  function innerMode(stream, state, force) {
    if (stream.indentation() > state.indentOf || (state.innerModeForLine && !stream.sol()) || force) {
      if (state.innerMode) {
        if (!state.innerState) {
          state.innerState = state.innerMode.startState ? CodeMirror.startState(state.innerMode, stream.indentation()) : {};
        }
        return stream.hideFirstChars(state.indentOf + 2, function () {
          return state.innerMode.token(stream, state.innerState) || true;
        });
      } else {
        stream.skipToEnd();
        return state.indentToken;
      }
    } else if (stream.sol()) {
      state.indentOf = Infinity;
      state.indentToken = null;
      state.innerMode = null;
      state.innerState = null;
    }
  }
  function restOfLine(stream, state) {
    if (stream.sol()) {
      // if restOfLine was set at end of line, ignore it
      state.restOfLine = '';
    }
    if (state.restOfLine) {
      stream.skipToEnd();
      var tok = state.restOfLine;
      state.restOfLine = '';
      return tok;
    }
  }


  function startState() {
    return new State();
  }
  function copyState(state) {
    return state.copy();
  }
  /**
   * Get the next token in the stream
   *
   * @param {Stream} stream
   * @param {State} state
   */
  function nextToken(stream, state) {
    var tok = innerMode(stream, state)
      || restOfLine(stream, state)
      || interpolationContinued(stream, state)
      || includeFilteredContinued(stream, state)
      || eachContinued(stream, state)
      || attrsContinued(stream, state)
      || javaScript(stream, state)
      || javaScriptArguments(stream, state)
      || callArguments(stream, state)

      || yieldStatement(stream)
      || doctype(stream)
      || interpolation(stream, state)
      || caseStatement(stream, state)
      || when(stream, state)
      || defaultStatement(stream)
      || extendsStatement(stream, state)
      || append(stream, state)
      || prepend(stream, state)
      || block(stream, state)
      || include(stream, state)
      || includeFiltered(stream, state)
      || mixin(stream, state)
      || call(stream, state)
      || conditional(stream, state)
      || each(stream, state)
      || whileStatement(stream, state)
      || tag(stream, state)
      || filter(stream, state)
      || code(stream, state)
      || id(stream)
      || className(stream)
      || attrs(stream, state)
      || attributesBlock(stream, state)
      || indent(stream)
      || text(stream, state)
      || comment(stream, state)
      || colon(stream)
      || dot(stream, state)
      || fail(stream);

    return tok === true ? null : tok;
  }
  return {
    startState: startState,
    copyState: copyState,
    token: nextToken
  };
}, 'javascript', 'css', 'htmlmixed');

CodeMirror.defineMIME('text/x-pug', 'pug');
CodeMirror.defineMIME('text/x-jade', 'pug');

});


/***/ }),

/***/ "5c6c":
/***/ (function(module, exports) {

module.exports = function (bitmap, value) {
  return {
    enumerable: !(bitmap & 1),
    configurable: !(bitmap & 2),
    writable: !(bitmap & 4),
    value: value
  };
};


/***/ }),

/***/ "5c96":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("a4d3");__webpack_require__("e01a");__webpack_require__("d28b");__webpack_require__("944a");__webpack_require__("99af");__webpack_require__("a623");__webpack_require__("cb29");__webpack_require__("4de4");__webpack_require__("7db0");__webpack_require__("4160");__webpack_require__("caad");__webpack_require__("c975");__webpack_require__("e260");__webpack_require__("a15b");__webpack_require__("d81d");__webpack_require__("13d5");__webpack_require__("fb6a");__webpack_require__("45fc");__webpack_require__("a434");__webpack_require__("b0c0");__webpack_require__("0c47");__webpack_require__("23dc");__webpack_require__("a9e3");__webpack_require__("9129");__webpack_require__("c35a");__webpack_require__("b680");__webpack_require__("cca6");__webpack_require__("dca8");__webpack_require__("b64b");__webpack_require__("d3b7");__webpack_require__("07ac");__webpack_require__("e6cf");__webpack_require__("4d63");__webpack_require__("ac1f");__webpack_require__("25f0");__webpack_require__("2532");__webpack_require__("3ca3");__webpack_require__("466d");__webpack_require__("5319");__webpack_require__("1276");__webpack_require__("498a");__webpack_require__("c7cd");__webpack_require__("9911");__webpack_require__("c96a");__webpack_require__("159b");__webpack_require__("ddb0");__webpack_require__("2b3d");var _typeof2=__webpack_require__("7037");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&&_typeof2(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="/dist/";/******/ /******/ /******/ // Load entry module and return exports
/******/return __webpack_require__(__webpack_require__.s=45);/******/}(/************************************************************************/ /******/[/* 0 */ /***/function(module,exports){module.exports=__webpack_require__("d940");/***/},/* 1 */ /***/function(module,exports){module.exports=__webpack_require__("5924");/***/},/* 2 */ /***/function(module,exports){module.exports=__webpack_require__("8122");/***/},/* 3 */ /***/function(module,exports){module.exports=__webpack_require__("d010");/***/},/* 4 */ /***/function(module,exports){module.exports=__webpack_require__("6b7c");/***/},/* 5 */ /***/function(module,exports){module.exports=__webpack_require__("e974");/***/},/* 6 */ /***/function(module,exports){module.exports=__webpack_require__("8bbf");/***/},/* 7 */ /***/function(module,exports){module.exports=__webpack_require__("7f4d");/***/},/* 8 */ /***/function(module,exports){module.exports=__webpack_require__("f3ad");/***/},/* 9 */ /***/function(module,exports){module.exports=__webpack_require__("2bb5");/***/},/* 10 */ /***/function(module,exports){module.exports=__webpack_require__("417f");/***/},/* 11 */ /***/function(module,exports){module.exports=__webpack_require__("4897");/***/},/* 12 */ /***/function(module,exports){module.exports=__webpack_require__("eedf");/***/},/* 13 */ /***/function(module,exports){module.exports=__webpack_require__("4010");/***/},/* 14 */ /***/function(module,exports){module.exports=__webpack_require__("5128");/***/},/* 15 */ /***/function(module,exports){module.exports=__webpack_require__("0e15");/***/},/* 16 */ /***/function(module,exports){module.exports=__webpack_require__("dcdc");/***/},/* 17 */ /***/function(module,exports){module.exports=__webpack_require__("14e9");/***/},/* 18 */ /***/function(module,exports){module.exports=__webpack_require__("a742");/***/},/* 19 */ /***/function(module,exports){module.exports=__webpack_require__("d397");/***/},/* 20 */ /***/function(module,exports){module.exports=__webpack_require__("d7d1");/***/},/* 21 */ /***/function(module,exports){module.exports=__webpack_require__("5488");/***/},/* 22 */ /***/function(module,exports){module.exports=__webpack_require__("12f2");/***/},/* 23 */ /***/function(module,exports){module.exports=__webpack_require__("41f8");/***/},/* 24 */ /***/function(module,exports){module.exports=__webpack_require__("92fa");/***/},/* 25 */ /***/function(module,exports){module.exports=__webpack_require__("597f");/***/},/* 26 */ /***/function(module,exports){module.exports=__webpack_require__("299c");/***/},/* 27 */ /***/function(module,exports){module.exports=__webpack_require__("2a5e");/***/},/* 28 */ /***/function(module,exports){module.exports=__webpack_require__("e452");/***/},/* 29 */ /***/function(module,exports){module.exports=__webpack_require__("845f");/***/},/* 30 */ /***/function(module,exports){module.exports=__webpack_require__("8bbc");/***/},/* 31 */ /***/function(module,exports){module.exports=__webpack_require__("e62d");/***/},/* 32 */ /***/function(module,exports){module.exports=__webpack_require__("7fc1");/***/},/* 33 */ /***/function(module,exports){module.exports=__webpack_require__("c56a");/***/},/* 34 */ /***/function(module,exports){module.exports=__webpack_require__("c284");/***/},/* 35 */ /***/function(module,exports){module.exports=__webpack_require__("9619");/***/},/* 36 */ /***/function(module,exports){module.exports=__webpack_require__("4e4b");/***/},/* 37 */ /***/function(module,exports){module.exports=__webpack_require__("e772");/***/},/* 38 */ /***/function(module,exports){module.exports=__webpack_require__("c098");/***/},/* 39 */ /***/function(module,exports){module.exports=__webpack_require__("722f");/***/},/* 40 */ /***/function(module,exports){module.exports=__webpack_require__("4cb2");/***/},/* 41 */ /***/function(module,exports){module.exports=__webpack_require__("e450");/***/},/* 42 */ /***/function(module,exports){module.exports=__webpack_require__("4726");/***/},/* 43 */ /***/function(module,exports){module.exports=__webpack_require__("f494");/***/},/* 44 */ /***/function(module,exports){module.exports=__webpack_require__("6ac9");/***/},/* 45 */ /***/function(module,exports,__webpack_require__){module.exports=__webpack_require__(46);/***/},/* 46 */ /***/function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/pagination/src/pager.vue?vue&type=template&id=7274f267&
var pagervue_type_template_id_7274f267_render=function pagervue_type_template_id_7274f267_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("ul",{staticClass:"el-pager",on:{click:_vm.onPagerClick}},[_vm.pageCount>0?_c("li",{staticClass:"number",class:{active:_vm.currentPage===1,disabled:_vm.disabled}},[_vm._v("1")]):_vm._e(),_vm.showPrevMore?_c("li",{staticClass:"el-icon more btn-quickprev",class:[_vm.quickprevIconClass,{disabled:_vm.disabled}],on:{mouseenter:function mouseenter($event){_vm.onMouseenter("left");},mouseleave:function mouseleave($event){_vm.quickprevIconClass="el-icon-more";}}}):_vm._e(),_vm._l(_vm.pagers,function(pager){return _c("li",{key:pager,staticClass:"number",class:{active:_vm.currentPage===pager,disabled:_vm.disabled}},[_vm._v(_vm._s(pager))]);}),_vm.showNextMore?_c("li",{staticClass:"el-icon more btn-quicknext",class:[_vm.quicknextIconClass,{disabled:_vm.disabled}],on:{mouseenter:function mouseenter($event){_vm.onMouseenter("right");},mouseleave:function mouseleave($event){_vm.quicknextIconClass="el-icon-more";}}}):_vm._e(),_vm.pageCount>1?_c("li",{staticClass:"number",class:{active:_vm.currentPage===_vm.pageCount,disabled:_vm.disabled}},[_vm._v(_vm._s(_vm.pageCount))]):_vm._e()],2);};var staticRenderFns=[];pagervue_type_template_id_7274f267_render._withStripped=true;// CONCATENATED MODULE: ./packages/pagination/src/pager.vue?vue&type=template&id=7274f267&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/pagination/src/pager.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var pagervue_type_script_lang_js_={name:'ElPager',props:{currentPage:Number,pageCount:Number,pagerCount:Number,disabled:Boolean},watch:{showPrevMore:function showPrevMore(val){if(!val)this.quickprevIconClass='el-icon-more';},showNextMore:function showNextMore(val){if(!val)this.quicknextIconClass='el-icon-more';}},methods:{onPagerClick:function onPagerClick(event){var target=event.target;if(target.tagName==='UL'||this.disabled){return;}var newPage=Number(event.target.textContent);var pageCount=this.pageCount;var currentPage=this.currentPage;var pagerCountOffset=this.pagerCount-2;if(target.className.indexOf('more')!==-1){if(target.className.indexOf('quickprev')!==-1){newPage=currentPage-pagerCountOffset;}else if(target.className.indexOf('quicknext')!==-1){newPage=currentPage+pagerCountOffset;}}/* istanbul ignore if */if(!isNaN(newPage)){if(newPage<1){newPage=1;}if(newPage>pageCount){newPage=pageCount;}}if(newPage!==currentPage){this.$emit('change',newPage);}},onMouseenter:function onMouseenter(direction){if(this.disabled)return;if(direction==='left'){this.quickprevIconClass='el-icon-d-arrow-left';}else{this.quicknextIconClass='el-icon-d-arrow-right';}}},computed:{pagers:function pagers(){var pagerCount=this.pagerCount;var halfPagerCount=(pagerCount-1)/2;var currentPage=Number(this.currentPage);var pageCount=Number(this.pageCount);var showPrevMore=false;var showNextMore=false;if(pageCount>pagerCount){if(currentPage>pagerCount-halfPagerCount){showPrevMore=true;}if(currentPage<pageCount-halfPagerCount){showNextMore=true;}}var array=[];if(showPrevMore&&!showNextMore){var startPage=pageCount-(pagerCount-2);for(var i=startPage;i<pageCount;i++){array.push(i);}}else if(!showPrevMore&&showNextMore){for(var _i=2;_i<pagerCount;_i++){array.push(_i);}}else if(showPrevMore&&showNextMore){var offset=Math.floor(pagerCount/2)-1;for(var _i2=currentPage-offset;_i2<=currentPage+offset;_i2++){array.push(_i2);}}else{for(var _i3=2;_i3<pageCount;_i3++){array.push(_i3);}}this.showPrevMore=showPrevMore;this.showNextMore=showNextMore;return array;}},data:function data(){return{current:null,showPrevMore:false,showNextMore:false,quicknextIconClass:'el-icon-more',quickprevIconClass:'el-icon-more'};}};// CONCATENATED MODULE: ./packages/pagination/src/pager.vue?vue&type=script&lang=js&
/* harmony default export */var src_pagervue_type_script_lang_js_=pagervue_type_script_lang_js_;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
/* globals __VUE_SSR_CONTEXT__ */ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.
function normalizeComponent(scriptExports,render,staticRenderFns,functionalTemplate,injectStyles,scopeId,moduleIdentifier,/* server only */shadowMode/* vue-cli only */){// Vue.extend constructor export interop
var options=typeof scriptExports==='function'?scriptExports.options:scriptExports;// render functions
if(render){options.render=render;options.staticRenderFns=staticRenderFns;options._compiled=true;}// functional template
if(functionalTemplate){options.functional=true;}// scopedId
if(scopeId){options._scopeId='data-v-'+scopeId;}var hook;if(moduleIdentifier){// server build
hook=function hook(context){// 2.3 injection
context=context||// cached call
this.$vnode&&this.$vnode.ssrContext||// stateful
this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext;// functional
// 2.2 with runInNewContext: true
if(!context&&typeof __VUE_SSR_CONTEXT__!=='undefined'){context=__VUE_SSR_CONTEXT__;}// inject component styles
if(injectStyles){injectStyles.call(this,context);}// register component module identifier for async chunk inferrence
if(context&&context._registeredComponents){context._registeredComponents.add(moduleIdentifier);}};// used by ssr in case component is cached and beforeCreate
// never gets called
options._ssrRegister=hook;}else if(injectStyles){hook=shadowMode?function(){injectStyles.call(this,this.$root.$options.shadowRoot);}:injectStyles;}if(hook){if(options.functional){// for template-only hot-reload because in that case the render fn doesn't
// go through the normalizer
options._injectStyles=hook;// register for functioal component in vue file
var originalRender=options.render;options.render=function renderWithStyleInjection(h,context){hook.call(context);return originalRender(h,context);};}else{// inject component registration as beforeCreate hook
var existing=options.beforeCreate;options.beforeCreate=existing?[].concat(existing,hook):[hook];}}return{exports:scriptExports,options:options};}// CONCATENATED MODULE: ./packages/pagination/src/pager.vue
/* normalize component */var component=normalizeComponent(src_pagervue_type_script_lang_js_,pagervue_type_template_id_7274f267_render,staticRenderFns,false,null,null,null);/* hot reload */if(false){ var api; }component.options.__file="packages/pagination/src/pager.vue";/* harmony default export */var pager=component.exports;// EXTERNAL MODULE: external "element-ui/lib/select"
var select_=__webpack_require__(36);var select_default=/*#__PURE__*/__webpack_require__.n(select_);// EXTERNAL MODULE: external "element-ui/lib/option"
var option_=__webpack_require__(37);var option_default=/*#__PURE__*/__webpack_require__.n(option_);// EXTERNAL MODULE: external "element-ui/lib/input"
var input_=__webpack_require__(8);var input_default=/*#__PURE__*/__webpack_require__.n(input_);// EXTERNAL MODULE: external "element-ui/lib/mixins/locale"
var locale_=__webpack_require__(4);var locale_default=/*#__PURE__*/__webpack_require__.n(locale_);// EXTERNAL MODULE: external "element-ui/lib/utils/util"
var util_=__webpack_require__(2);// CONCATENATED MODULE: ./packages/pagination/src/pagination.js
/* harmony default export */var pagination={name:'ElPagination',props:{pageSize:{type:Number,default:10},small:Boolean,total:Number,pageCount:Number,pagerCount:{type:Number,validator:function validator(value){return(value|0)===value&&value>4&&value<22&&value%2===1;},default:7},currentPage:{type:Number,default:1},layout:{default:'prev, pager, next, jumper, ->, total'},pageSizes:{type:Array,default:function _default(){return[10,20,30,40,50,100];}},popperClass:String,prevText:String,nextText:String,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean},data:function data(){return{internalCurrentPage:1,internalPageSize:0,lastEmittedPage:-1,userChangePageSize:false};},render:function render(h){var layout=this.layout;if(!layout)return null;if(this.hideOnSinglePage&&(!this.internalPageCount||this.internalPageCount===1))return null;var template=h('div',{'class':['el-pagination',{'is-background':this.background,'el-pagination--small':this.small}]});var TEMPLATE_MAP={prev:h('prev'),jumper:h('jumper'),pager:h('pager',{attrs:{currentPage:this.internalCurrentPage,pageCount:this.internalPageCount,pagerCount:this.pagerCount,disabled:this.disabled},on:{'change':this.handleCurrentChange}}),next:h('next'),sizes:h('sizes',{attrs:{pageSizes:this.pageSizes}}),slot:h('slot',[this.$slots.default?this.$slots.default:'']),total:h('total')};var components=layout.split(',').map(function(item){return item.trim();});var rightWrapper=h('div',{'class':'el-pagination__rightwrapper'});var haveRightWrapper=false;template.children=template.children||[];rightWrapper.children=rightWrapper.children||[];components.forEach(function(compo){if(compo==='->'){haveRightWrapper=true;return;}if(!haveRightWrapper){template.children.push(TEMPLATE_MAP[compo]);}else{rightWrapper.children.push(TEMPLATE_MAP[compo]);}});if(haveRightWrapper){template.children.unshift(rightWrapper);}return template;},components:{Prev:{render:function render(h){return h('button',{attrs:{type:'button',disabled:this.$parent.disabled||this.$parent.internalCurrentPage<=1},'class':'btn-prev',on:{'click':this.$parent.prev}},[this.$parent.prevText?h('span',[this.$parent.prevText]):h('i',{'class':'el-icon el-icon-arrow-left'})]);}},Next:{render:function render(h){return h('button',{attrs:{type:'button',disabled:this.$parent.disabled||this.$parent.internalCurrentPage===this.$parent.internalPageCount||this.$parent.internalPageCount===0},'class':'btn-next',on:{'click':this.$parent.next}},[this.$parent.nextText?h('span',[this.$parent.nextText]):h('i',{'class':'el-icon el-icon-arrow-right'})]);}},Sizes:{mixins:[locale_default.a],props:{pageSizes:Array},watch:{pageSizes:{immediate:true,handler:function handler(newVal,oldVal){if(Object(util_["valueEquals"])(newVal,oldVal))return;if(Array.isArray(newVal)){this.$parent.internalPageSize=newVal.indexOf(this.$parent.pageSize)>-1?this.$parent.pageSize:this.pageSizes[0];}}}},render:function render(h){var _this=this;return h('span',{'class':'el-pagination__sizes'},[h('el-select',{attrs:{value:this.$parent.internalPageSize,popperClass:this.$parent.popperClass||'',size:'mini',disabled:this.$parent.disabled},on:{'input':this.handleChange}},[this.pageSizes.map(function(item){return h('el-option',{attrs:{value:item,label:item+_this.t('el.pagination.pagesize')}});})])]);},components:{ElSelect:select_default.a,ElOption:option_default.a},methods:{handleChange:function handleChange(val){if(val!==this.$parent.internalPageSize){this.$parent.internalPageSize=val=parseInt(val,10);this.$parent.userChangePageSize=true;this.$parent.$emit('update:pageSize',val);this.$parent.$emit('size-change',val);}}}},Jumper:{mixins:[locale_default.a],components:{ElInput:input_default.a},data:function data(){return{userInput:null};},watch:{'$parent.internalCurrentPage':function $parentInternalCurrentPage(){this.userInput=null;}},methods:{handleKeyup:function handleKeyup(_ref){var keyCode=_ref.keyCode,target=_ref.target;// Chrome, Safari, Firefox triggers change event on Enter
// Hack for IE: https://github.com/ElemeFE/element/issues/11710
// Drop this method when we no longer supports IE
if(keyCode===13){this.handleChange(target.value);}},handleInput:function handleInput(value){this.userInput=value;},handleChange:function handleChange(value){this.$parent.internalCurrentPage=this.$parent.getValidCurrentPage(value);this.$parent.emitChange();this.userInput=null;}},render:function render(h){return h('span',{'class':'el-pagination__jump'},[this.t('el.pagination.goto'),h('el-input',{'class':'el-pagination__editor is-in-pagination',attrs:{min:1,max:this.$parent.internalPageCount,value:this.userInput!==null?this.userInput:this.$parent.internalCurrentPage,type:'number',disabled:this.$parent.disabled},nativeOn:{'keyup':this.handleKeyup},on:{'input':this.handleInput,'change':this.handleChange}}),this.t('el.pagination.pageClassifier')]);}},Total:{mixins:[locale_default.a],render:function render(h){return typeof this.$parent.total==='number'?h('span',{'class':'el-pagination__total'},[this.t('el.pagination.total',{total:this.$parent.total})]):'';}},Pager:pager},methods:{handleCurrentChange:function handleCurrentChange(val){this.internalCurrentPage=this.getValidCurrentPage(val);this.userChangePageSize=true;this.emitChange();},prev:function prev(){if(this.disabled)return;var newVal=this.internalCurrentPage-1;this.internalCurrentPage=this.getValidCurrentPage(newVal);this.$emit('prev-click',this.internalCurrentPage);this.emitChange();},next:function next(){if(this.disabled)return;var newVal=this.internalCurrentPage+1;this.internalCurrentPage=this.getValidCurrentPage(newVal);this.$emit('next-click',this.internalCurrentPage);this.emitChange();},getValidCurrentPage:function getValidCurrentPage(value){value=parseInt(value,10);var havePageCount=typeof this.internalPageCount==='number';var resetValue=void 0;if(!havePageCount){if(isNaN(value)||value<1)resetValue=1;}else{if(value<1){resetValue=1;}else if(value>this.internalPageCount){resetValue=this.internalPageCount;}}if(resetValue===undefined&&isNaN(value)){resetValue=1;}else if(resetValue===0){resetValue=1;}return resetValue===undefined?value:resetValue;},emitChange:function emitChange(){var _this2=this;this.$nextTick(function(){if(_this2.internalCurrentPage!==_this2.lastEmittedPage||_this2.userChangePageSize){_this2.$emit('current-change',_this2.internalCurrentPage);_this2.lastEmittedPage=_this2.internalCurrentPage;_this2.userChangePageSize=false;}});}},computed:{internalPageCount:function internalPageCount(){if(typeof this.total==='number'){return Math.max(1,Math.ceil(this.total/this.internalPageSize));}else if(typeof this.pageCount==='number'){return Math.max(1,this.pageCount);}return null;}},watch:{currentPage:{immediate:true,handler:function handler(val){this.internalCurrentPage=this.getValidCurrentPage(val);}},pageSize:{immediate:true,handler:function handler(val){this.internalPageSize=isNaN(val)?10:val;}},internalCurrentPage:{immediate:true,handler:function handler(newVal){this.$emit('update:currentPage',newVal);this.lastEmittedPage=-1;}},internalPageCount:function internalPageCount(newVal){/* istanbul ignore if */var oldPage=this.internalCurrentPage;if(newVal>0&&oldPage===0){this.internalCurrentPage=1;}else if(oldPage>newVal){this.internalCurrentPage=newVal===0?1:newVal;this.userChangePageSize&&this.emitChange();}this.userChangePageSize=false;}}};// CONCATENATED MODULE: ./packages/pagination/index.js
/* istanbul ignore next */pagination.install=function(Vue){Vue.component(pagination.name,pagination);};/* harmony default export */var packages_pagination=pagination;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/dialog/src/component.vue?vue&type=template&id=60140e62&
var componentvue_type_template_id_60140e62_render=function componentvue_type_template_id_60140e62_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("transition",{attrs:{name:"dialog-fade"},on:{"after-enter":_vm.afterEnter,"after-leave":_vm.afterLeave}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.visible,expression:"visible"}],staticClass:"el-dialog__wrapper",on:{click:function click($event){if($event.target!==$event.currentTarget){return null;}return _vm.handleWrapperClick($event);}}},[_c("div",{key:_vm.key,ref:"dialog",class:["el-dialog",{"is-fullscreen":_vm.fullscreen,"el-dialog--center":_vm.center},_vm.customClass],style:_vm.style,attrs:{role:"dialog","aria-modal":"true","aria-label":_vm.title||"dialog"}},[_c("div",{staticClass:"el-dialog__header"},[_vm._t("title",[_c("span",{staticClass:"el-dialog__title"},[_vm._v(_vm._s(_vm.title))])]),_vm.showClose?_c("button",{staticClass:"el-dialog__headerbtn",attrs:{type:"button","aria-label":"Close"},on:{click:_vm.handleClose}},[_c("i",{staticClass:"el-dialog__close el-icon el-icon-close"})]):_vm._e()],2),_vm.rendered?_c("div",{staticClass:"el-dialog__body"},[_vm._t("default")],2):_vm._e(),_vm.$slots.footer?_c("div",{staticClass:"el-dialog__footer"},[_vm._t("footer")],2):_vm._e()])])]);};var componentvue_type_template_id_60140e62_staticRenderFns=[];componentvue_type_template_id_60140e62_render._withStripped=true;// CONCATENATED MODULE: ./packages/dialog/src/component.vue?vue&type=template&id=60140e62&
// EXTERNAL MODULE: external "element-ui/lib/utils/popup"
var popup_=__webpack_require__(14);var popup_default=/*#__PURE__*/__webpack_require__.n(popup_);// EXTERNAL MODULE: external "element-ui/lib/mixins/migrating"
var migrating_=__webpack_require__(9);var migrating_default=/*#__PURE__*/__webpack_require__.n(migrating_);// EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
var emitter_=__webpack_require__(3);var emitter_default=/*#__PURE__*/__webpack_require__.n(emitter_);// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dialog/src/component.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var componentvue_type_script_lang_js_={name:'ElDialog',mixins:[popup_default.a,emitter_default.a,migrating_default.a],props:{title:{type:String,default:''},modal:{type:Boolean,default:true},modalAppendToBody:{type:Boolean,default:true},appendToBody:{type:Boolean,default:false},lockScroll:{type:Boolean,default:true},closeOnClickModal:{type:Boolean,default:true},closeOnPressEscape:{type:Boolean,default:true},showClose:{type:Boolean,default:true},width:String,fullscreen:Boolean,customClass:{type:String,default:''},top:{type:String,default:'15vh'},beforeClose:Function,center:{type:Boolean,default:false},destroyOnClose:Boolean},data:function data(){return{closed:false,key:0};},watch:{visible:function visible(val){var _this=this;if(val){this.closed=false;this.$emit('open');this.$el.addEventListener('scroll',this.updatePopper);this.$nextTick(function(){_this.$refs.dialog.scrollTop=0;});if(this.appendToBody){document.body.appendChild(this.$el);}}else{this.$el.removeEventListener('scroll',this.updatePopper);if(!this.closed)this.$emit('close');if(this.destroyOnClose){this.$nextTick(function(){_this.key++;});}}}},computed:{style:function style(){var style={};if(!this.fullscreen){style.marginTop=this.top;if(this.width){style.width=this.width;}}return style;}},methods:{getMigratingConfig:function getMigratingConfig(){return{props:{'size':'size is removed.'}};},handleWrapperClick:function handleWrapperClick(){if(!this.closeOnClickModal)return;this.handleClose();},handleClose:function handleClose(){if(typeof this.beforeClose==='function'){this.beforeClose(this.hide);}else{this.hide();}},hide:function hide(cancel){if(cancel!==false){this.$emit('update:visible',false);this.$emit('close');this.closed=true;}},updatePopper:function updatePopper(){this.broadcast('ElSelectDropdown','updatePopper');this.broadcast('ElDropdownMenu','updatePopper');},afterEnter:function afterEnter(){this.$emit('opened');},afterLeave:function afterLeave(){this.$emit('closed');}},mounted:function mounted(){if(this.visible){this.rendered=true;this.open();if(this.appendToBody){document.body.appendChild(this.$el);}}},destroyed:function destroyed(){// if appendToBody is true, remove DOM node after destroy
if(this.appendToBody&&this.$el&&this.$el.parentNode){this.$el.parentNode.removeChild(this.$el);}}};// CONCATENATED MODULE: ./packages/dialog/src/component.vue?vue&type=script&lang=js&
/* harmony default export */var src_componentvue_type_script_lang_js_=componentvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/dialog/src/component.vue
/* normalize component */var component_component=normalizeComponent(src_componentvue_type_script_lang_js_,componentvue_type_template_id_60140e62_render,componentvue_type_template_id_60140e62_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var component_api; }component_component.options.__file="packages/dialog/src/component.vue";/* harmony default export */var src_component=component_component.exports;// CONCATENATED MODULE: ./packages/dialog/index.js
/* istanbul ignore next */src_component.install=function(Vue){Vue.component(src_component.name,src_component);};/* harmony default export */var dialog=src_component;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/autocomplete/src/autocomplete.vue?vue&type=template&id=152f2ee6&
var autocompletevue_type_template_id_152f2ee6_render=function autocompletevue_type_template_id_152f2ee6_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:_vm.close,expression:"close"}],staticClass:"el-autocomplete",attrs:{"aria-haspopup":"listbox",role:"combobox","aria-expanded":_vm.suggestionVisible,"aria-owns":_vm.id}},[_c("el-input",_vm._b({ref:"input",on:{input:_vm.handleInput,change:_vm.handleChange,focus:_vm.handleFocus,blur:_vm.handleBlur,clear:_vm.handleClear},nativeOn:{keydown:[function($event){if(!("button"in $event)&&_vm._k($event.keyCode,"up",38,$event.key,["Up","ArrowUp"])){return null;}$event.preventDefault();_vm.highlight(_vm.highlightedIndex-1);},function($event){if(!("button"in $event)&&_vm._k($event.keyCode,"down",40,$event.key,["Down","ArrowDown"])){return null;}$event.preventDefault();_vm.highlight(_vm.highlightedIndex+1);},function($event){if(!("button"in $event)&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){return null;}return _vm.handleKeyEnter($event);},function($event){if(!("button"in $event)&&_vm._k($event.keyCode,"tab",9,$event.key,"Tab")){return null;}return _vm.close($event);}]}},"el-input",[_vm.$props,_vm.$attrs],false),[_vm.$slots.prepend?_c("template",{slot:"prepend"},[_vm._t("prepend")],2):_vm._e(),_vm.$slots.append?_c("template",{slot:"append"},[_vm._t("append")],2):_vm._e(),_vm.$slots.prefix?_c("template",{slot:"prefix"},[_vm._t("prefix")],2):_vm._e(),_vm.$slots.suffix?_c("template",{slot:"suffix"},[_vm._t("suffix")],2):_vm._e()],2),_c("el-autocomplete-suggestions",{ref:"suggestions",class:[_vm.popperClass?_vm.popperClass:""],attrs:{"visible-arrow":"","popper-options":_vm.popperOptions,"append-to-body":_vm.popperAppendToBody,placement:_vm.placement,id:_vm.id}},_vm._l(_vm.suggestions,function(item,index){return _c("li",{key:index,class:{highlighted:_vm.highlightedIndex===index},attrs:{id:_vm.id+"-item-"+index,role:"option","aria-selected":_vm.highlightedIndex===index},on:{click:function click($event){_vm.select(item);}}},[_vm._t("default",[_vm._v("\n        "+_vm._s(item[_vm.valueKey])+"\n      ")],{item:item})],2);}),0)],1);};var autocompletevue_type_template_id_152f2ee6_staticRenderFns=[];autocompletevue_type_template_id_152f2ee6_render._withStripped=true;// CONCATENATED MODULE: ./packages/autocomplete/src/autocomplete.vue?vue&type=template&id=152f2ee6&
// EXTERNAL MODULE: external "throttle-debounce/debounce"
var debounce_=__webpack_require__(15);var debounce_default=/*#__PURE__*/__webpack_require__.n(debounce_);// EXTERNAL MODULE: external "element-ui/lib/utils/clickoutside"
var clickoutside_=__webpack_require__(10);var clickoutside_default=/*#__PURE__*/__webpack_require__.n(clickoutside_);// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/autocomplete/src/autocomplete-suggestions.vue?vue&type=template&id=cd10dcf0&
var autocomplete_suggestionsvue_type_template_id_cd10dcf0_render=function autocomplete_suggestionsvue_type_template_id_cd10dcf0_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("transition",{attrs:{name:"el-zoom-in-top"},on:{"after-leave":_vm.doDestroy}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.showPopper,expression:"showPopper"}],staticClass:"el-autocomplete-suggestion el-popper",class:{"is-loading":!_vm.parent.hideLoading&&_vm.parent.loading},style:{width:_vm.dropdownWidth},attrs:{role:"region"}},[_c("el-scrollbar",{attrs:{tag:"ul","wrap-class":"el-autocomplete-suggestion__wrap","view-class":"el-autocomplete-suggestion__list"}},[!_vm.parent.hideLoading&&_vm.parent.loading?_c("li",[_c("i",{staticClass:"el-icon-loading"})]):_vm._t("default")],2)],1)]);};var autocomplete_suggestionsvue_type_template_id_cd10dcf0_staticRenderFns=[];autocomplete_suggestionsvue_type_template_id_cd10dcf0_render._withStripped=true;// CONCATENATED MODULE: ./packages/autocomplete/src/autocomplete-suggestions.vue?vue&type=template&id=cd10dcf0&
// EXTERNAL MODULE: external "element-ui/lib/utils/vue-popper"
var vue_popper_=__webpack_require__(5);var vue_popper_default=/*#__PURE__*/__webpack_require__.n(vue_popper_);// EXTERNAL MODULE: external "element-ui/lib/scrollbar"
var scrollbar_=__webpack_require__(17);var scrollbar_default=/*#__PURE__*/__webpack_require__.n(scrollbar_);// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/autocomplete/src/autocomplete-suggestions.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var autocomplete_suggestionsvue_type_script_lang_js_={components:{ElScrollbar:scrollbar_default.a},mixins:[vue_popper_default.a,emitter_default.a],componentName:'ElAutocompleteSuggestions',data:function data(){return{parent:this.$parent,dropdownWidth:''};},props:{options:{default:function _default(){return{gpuAcceleration:false};}},id:String},methods:{select:function select(item){this.dispatch('ElAutocomplete','item-click',item);}},updated:function updated(){var _this=this;this.$nextTick(function(_){_this.popperJS&&_this.updatePopper();});},mounted:function mounted(){this.$parent.popperElm=this.popperElm=this.$el;this.referenceElm=this.$parent.$refs.input.$refs.input||this.$parent.$refs.input.$refs.textarea;this.referenceList=this.$el.querySelector('.el-autocomplete-suggestion__list');this.referenceList.setAttribute('role','listbox');this.referenceList.setAttribute('id',this.id);},created:function created(){var _this2=this;this.$on('visible',function(val,inputWidth){_this2.dropdownWidth=inputWidth+'px';_this2.showPopper=val;});}};// CONCATENATED MODULE: ./packages/autocomplete/src/autocomplete-suggestions.vue?vue&type=script&lang=js&
/* harmony default export */var src_autocomplete_suggestionsvue_type_script_lang_js_=autocomplete_suggestionsvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/autocomplete/src/autocomplete-suggestions.vue
/* normalize component */var autocomplete_suggestions_component=normalizeComponent(src_autocomplete_suggestionsvue_type_script_lang_js_,autocomplete_suggestionsvue_type_template_id_cd10dcf0_render,autocomplete_suggestionsvue_type_template_id_cd10dcf0_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var autocomplete_suggestions_api; }autocomplete_suggestions_component.options.__file="packages/autocomplete/src/autocomplete-suggestions.vue";/* harmony default export */var autocomplete_suggestions=autocomplete_suggestions_component.exports;// EXTERNAL MODULE: external "element-ui/lib/mixins/focus"
var focus_=__webpack_require__(22);var focus_default=/*#__PURE__*/__webpack_require__.n(focus_);// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/autocomplete/src/autocomplete.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var autocompletevue_type_script_lang_js_={name:'ElAutocomplete',mixins:[emitter_default.a,focus_default()('input'),migrating_default.a],inheritAttrs:false,componentName:'ElAutocomplete',components:{ElInput:input_default.a,ElAutocompleteSuggestions:autocomplete_suggestions},directives:{Clickoutside:clickoutside_default.a},props:{valueKey:{type:String,default:'value'},popperClass:String,popperOptions:Object,placeholder:String,clearable:{type:Boolean,default:false},disabled:Boolean,name:String,size:String,value:String,maxlength:Number,minlength:Number,autofocus:Boolean,fetchSuggestions:Function,triggerOnFocus:{type:Boolean,default:true},customItem:String,selectWhenUnmatched:{type:Boolean,default:false},prefixIcon:String,suffixIcon:String,label:String,debounce:{type:Number,default:300},placement:{type:String,default:'bottom-start'},hideLoading:Boolean,popperAppendToBody:{type:Boolean,default:true},highlightFirstItem:{type:Boolean,default:false}},data:function data(){return{activated:false,suggestions:[],loading:false,highlightedIndex:-1,suggestionDisabled:false};},computed:{suggestionVisible:function suggestionVisible(){var suggestions=this.suggestions;var isValidData=Array.isArray(suggestions)&&suggestions.length>0;return(isValidData||this.loading)&&this.activated;},id:function id(){return'el-autocomplete-'+Object(util_["generateId"])();}},watch:{suggestionVisible:function suggestionVisible(val){var $input=this.getInput();if($input){this.broadcast('ElAutocompleteSuggestions','visible',[val,$input.offsetWidth]);}}},methods:{getMigratingConfig:function getMigratingConfig(){return{props:{'custom-item':'custom-item is removed, use scoped slot instead.','props':'props is removed, use value-key instead.'}};},getData:function getData(queryString){var _this=this;if(this.suggestionDisabled){return;}this.loading=true;this.fetchSuggestions(queryString,function(suggestions){_this.loading=false;if(_this.suggestionDisabled){return;}if(Array.isArray(suggestions)){_this.suggestions=suggestions;_this.highlightedIndex=_this.highlightFirstItem?0:-1;}else{console.error('[Element Error][Autocomplete]autocomplete suggestions must be an array');}});},handleInput:function handleInput(value){this.$emit('input',value);this.suggestionDisabled=false;if(!this.triggerOnFocus&&!value){this.suggestionDisabled=true;this.suggestions=[];return;}this.debouncedGetData(value);},handleChange:function handleChange(value){this.$emit('change',value);},handleFocus:function handleFocus(event){this.activated=true;this.$emit('focus',event);if(this.triggerOnFocus){this.debouncedGetData(this.value);}},handleBlur:function handleBlur(event){this.$emit('blur',event);},handleClear:function handleClear(){this.activated=false;this.$emit('clear');},close:function close(e){this.activated=false;},handleKeyEnter:function handleKeyEnter(e){var _this2=this;if(this.suggestionVisible&&this.highlightedIndex>=0&&this.highlightedIndex<this.suggestions.length){e.preventDefault();this.select(this.suggestions[this.highlightedIndex]);}else if(this.selectWhenUnmatched){this.$emit('select',{value:this.value});this.$nextTick(function(_){_this2.suggestions=[];_this2.highlightedIndex=-1;});}},select:function select(item){var _this3=this;this.$emit('input',item[this.valueKey]);this.$emit('select',item);this.$nextTick(function(_){_this3.suggestions=[];_this3.highlightedIndex=-1;});},highlight:function highlight(index){if(!this.suggestionVisible||this.loading){return;}if(index<0){this.highlightedIndex=-1;return;}if(index>=this.suggestions.length){index=this.suggestions.length-1;}var suggestion=this.$refs.suggestions.$el.querySelector('.el-autocomplete-suggestion__wrap');var suggestionList=suggestion.querySelectorAll('.el-autocomplete-suggestion__list li');var highlightItem=suggestionList[index];var scrollTop=suggestion.scrollTop;var offsetTop=highlightItem.offsetTop;if(offsetTop+highlightItem.scrollHeight>scrollTop+suggestion.clientHeight){suggestion.scrollTop+=highlightItem.scrollHeight;}if(offsetTop<scrollTop){suggestion.scrollTop-=highlightItem.scrollHeight;}this.highlightedIndex=index;var $input=this.getInput();$input.setAttribute('aria-activedescendant',this.id+'-item-'+this.highlightedIndex);},getInput:function getInput(){return this.$refs.input.getInput();}},mounted:function mounted(){var _this4=this;this.debouncedGetData=debounce_default()(this.debounce,this.getData);this.$on('item-click',function(item){_this4.select(item);});var $input=this.getInput();$input.setAttribute('role','textbox');$input.setAttribute('aria-autocomplete','list');$input.setAttribute('aria-controls','id');$input.setAttribute('aria-activedescendant',this.id+'-item-'+this.highlightedIndex);},beforeDestroy:function beforeDestroy(){this.$refs.suggestions.$destroy();}};// CONCATENATED MODULE: ./packages/autocomplete/src/autocomplete.vue?vue&type=script&lang=js&
/* harmony default export */var src_autocompletevue_type_script_lang_js_=autocompletevue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/autocomplete/src/autocomplete.vue
/* normalize component */var autocomplete_component=normalizeComponent(src_autocompletevue_type_script_lang_js_,autocompletevue_type_template_id_152f2ee6_render,autocompletevue_type_template_id_152f2ee6_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var autocomplete_api; }autocomplete_component.options.__file="packages/autocomplete/src/autocomplete.vue";/* harmony default export */var autocomplete=autocomplete_component.exports;// CONCATENATED MODULE: ./packages/autocomplete/index.js
/* istanbul ignore next */autocomplete.install=function(Vue){Vue.component(autocomplete.name,autocomplete);};/* harmony default export */var packages_autocomplete=autocomplete;// EXTERNAL MODULE: external "element-ui/lib/button"
var button_=__webpack_require__(12);var button_default=/*#__PURE__*/__webpack_require__.n(button_);// EXTERNAL MODULE: external "element-ui/lib/button-group"
var button_group_=__webpack_require__(29);var button_group_default=/*#__PURE__*/__webpack_require__.n(button_group_);// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dropdown/src/dropdown.vue?vue&type=script&lang=js&
/* harmony default export */var dropdownvue_type_script_lang_js_={name:'ElDropdown',componentName:'ElDropdown',mixins:[emitter_default.a,migrating_default.a],directives:{Clickoutside:clickoutside_default.a},components:{ElButton:button_default.a,ElButtonGroup:button_group_default.a},provide:function provide(){return{dropdown:this};},props:{trigger:{type:String,default:'hover'},type:String,size:{type:String,default:''},splitButton:Boolean,hideOnClick:{type:Boolean,default:true},placement:{type:String,default:'bottom-end'},visibleArrow:{default:true},showTimeout:{type:Number,default:250},hideTimeout:{type:Number,default:150},tabindex:{type:Number,default:0}},data:function data(){return{timeout:null,visible:false,triggerElm:null,menuItems:null,menuItemsArray:null,dropdownElm:null,focusing:false,listId:'dropdown-menu-'+Object(util_["generateId"])()};},computed:{dropdownSize:function dropdownSize(){return this.size||(this.$ELEMENT||{}).size;}},mounted:function mounted(){this.$on('menu-item-click',this.handleMenuItemClick);},watch:{visible:function visible(val){this.broadcast('ElDropdownMenu','visible',val);this.$emit('visible-change',val);},focusing:function focusing(val){var selfDefine=this.$el.querySelector('.el-dropdown-selfdefine');if(selfDefine){// 自定义
if(val){selfDefine.className+=' focusing';}else{selfDefine.className=selfDefine.className.replace('focusing','');}}}},methods:{getMigratingConfig:function getMigratingConfig(){return{props:{'menu-align':'menu-align is renamed to placement.'}};},show:function show(){var _this=this;if(this.triggerElm.disabled)return;clearTimeout(this.timeout);this.timeout=setTimeout(function(){_this.visible=true;},this.trigger==='click'?0:this.showTimeout);},hide:function hide(){var _this2=this;if(this.triggerElm.disabled)return;this.removeTabindex();if(this.tabindex>=0){this.resetTabindex(this.triggerElm);}clearTimeout(this.timeout);this.timeout=setTimeout(function(){_this2.visible=false;},this.trigger==='click'?0:this.hideTimeout);},handleClick:function handleClick(){if(this.triggerElm.disabled)return;if(this.visible){this.hide();}else{this.show();}},handleTriggerKeyDown:function handleTriggerKeyDown(ev){var keyCode=ev.keyCode;if([38,40].indexOf(keyCode)>-1){// up/down
this.removeTabindex();this.resetTabindex(this.menuItems[0]);this.menuItems[0].focus();ev.preventDefault();ev.stopPropagation();}else if(keyCode===13){// space enter选中
this.handleClick();}else if([9,27].indexOf(keyCode)>-1){// tab || esc
this.hide();}},handleItemKeyDown:function handleItemKeyDown(ev){var keyCode=ev.keyCode;var target=ev.target;var currentIndex=this.menuItemsArray.indexOf(target);var max=this.menuItemsArray.length-1;var nextIndex=void 0;if([38,40].indexOf(keyCode)>-1){// up/down
if(keyCode===38){// up
nextIndex=currentIndex!==0?currentIndex-1:0;}else{// down
nextIndex=currentIndex<max?currentIndex+1:max;}this.removeTabindex();this.resetTabindex(this.menuItems[nextIndex]);this.menuItems[nextIndex].focus();ev.preventDefault();ev.stopPropagation();}else if(keyCode===13){// enter选中
this.triggerElmFocus();target.click();if(this.hideOnClick){// click关闭
this.visible=false;}}else if([9,27].indexOf(keyCode)>-1){// tab // esc
this.hide();this.triggerElmFocus();}},resetTabindex:function resetTabindex(ele){// 下次tab时组件聚焦元素
this.removeTabindex();ele.setAttribute('tabindex','0');// 下次期望的聚焦元素
},removeTabindex:function removeTabindex(){this.triggerElm.setAttribute('tabindex','-1');this.menuItemsArray.forEach(function(item){item.setAttribute('tabindex','-1');});},initAria:function initAria(){this.dropdownElm.setAttribute('id',this.listId);this.triggerElm.setAttribute('aria-haspopup','list');this.triggerElm.setAttribute('aria-controls',this.listId);if(!this.splitButton){// 自定义
this.triggerElm.setAttribute('role','button');this.triggerElm.setAttribute('tabindex',this.tabindex);this.triggerElm.setAttribute('class',(this.triggerElm.getAttribute('class')||'')+' el-dropdown-selfdefine');// 控制
}},initEvent:function initEvent(){var _this3=this;var trigger=this.trigger,show=this.show,hide=this.hide,handleClick=this.handleClick,splitButton=this.splitButton,handleTriggerKeyDown=this.handleTriggerKeyDown,handleItemKeyDown=this.handleItemKeyDown;this.triggerElm=splitButton?this.$refs.trigger.$el:this.$slots.default[0].elm;var dropdownElm=this.dropdownElm;this.triggerElm.addEventListener('keydown',handleTriggerKeyDown);// triggerElm keydown
dropdownElm.addEventListener('keydown',handleItemKeyDown,true);// item keydown
// 控制自定义元素的样式
if(!splitButton){this.triggerElm.addEventListener('focus',function(){_this3.focusing=true;});this.triggerElm.addEventListener('blur',function(){_this3.focusing=false;});this.triggerElm.addEventListener('click',function(){_this3.focusing=false;});}if(trigger==='hover'){this.triggerElm.addEventListener('mouseenter',show);this.triggerElm.addEventListener('mouseleave',hide);dropdownElm.addEventListener('mouseenter',show);dropdownElm.addEventListener('mouseleave',hide);}else if(trigger==='click'){this.triggerElm.addEventListener('click',handleClick);}},handleMenuItemClick:function handleMenuItemClick(command,instance){if(this.hideOnClick){this.visible=false;}this.$emit('command',command,instance);},triggerElmFocus:function triggerElmFocus(){this.triggerElm.focus&&this.triggerElm.focus();},initDomOperation:function initDomOperation(){this.dropdownElm=this.popperElm;this.menuItems=this.dropdownElm.querySelectorAll("[tabindex='-1']");this.menuItemsArray=[].slice.call(this.menuItems);this.initEvent();this.initAria();}},render:function render(h){var _this4=this;var hide=this.hide,splitButton=this.splitButton,type=this.type,dropdownSize=this.dropdownSize;var handleMainButtonClick=function handleMainButtonClick(event){_this4.$emit('click',event);hide();};var triggerElm=!splitButton?this.$slots.default:h('el-button-group',[h('el-button',{attrs:{type:type,size:dropdownSize},nativeOn:{'click':handleMainButtonClick}},[this.$slots.default]),h('el-button',{ref:'trigger',attrs:{type:type,size:dropdownSize},'class':'el-dropdown__caret-button'},[h('i',{'class':'el-dropdown__icon el-icon-arrow-down'})])]);return h('div',{'class':'el-dropdown',directives:[{name:'clickoutside',value:hide}]},[triggerElm,this.$slots.dropdown]);}};// CONCATENATED MODULE: ./packages/dropdown/src/dropdown.vue?vue&type=script&lang=js&
/* harmony default export */var src_dropdownvue_type_script_lang_js_=dropdownvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/dropdown/src/dropdown.vue
var dropdown_render,dropdown_staticRenderFns;/* normalize component */var dropdown_component=normalizeComponent(src_dropdownvue_type_script_lang_js_,dropdown_render,dropdown_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var dropdown_api; }dropdown_component.options.__file="packages/dropdown/src/dropdown.vue";/* harmony default export */var dropdown=dropdown_component.exports;// CONCATENATED MODULE: ./packages/dropdown/index.js
/* istanbul ignore next */dropdown.install=function(Vue){Vue.component(dropdown.name,dropdown);};/* harmony default export */var packages_dropdown=dropdown;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/dropdown/src/dropdown-menu.vue?vue&type=template&id=0da6b714&
var dropdown_menuvue_type_template_id_0da6b714_render=function dropdown_menuvue_type_template_id_0da6b714_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("transition",{attrs:{name:"el-zoom-in-top"},on:{"after-leave":_vm.doDestroy}},[_c("ul",{directives:[{name:"show",rawName:"v-show",value:_vm.showPopper,expression:"showPopper"}],staticClass:"el-dropdown-menu el-popper",class:[_vm.size&&"el-dropdown-menu--"+_vm.size]},[_vm._t("default")],2)]);};var dropdown_menuvue_type_template_id_0da6b714_staticRenderFns=[];dropdown_menuvue_type_template_id_0da6b714_render._withStripped=true;// CONCATENATED MODULE: ./packages/dropdown/src/dropdown-menu.vue?vue&type=template&id=0da6b714&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dropdown/src/dropdown-menu.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
/* harmony default export */var dropdown_menuvue_type_script_lang_js_={name:'ElDropdownMenu',componentName:'ElDropdownMenu',mixins:[vue_popper_default.a],props:{visibleArrow:{type:Boolean,default:true},arrowOffset:{type:Number,default:0}},data:function data(){return{size:this.dropdown.dropdownSize};},inject:['dropdown'],created:function created(){var _this=this;this.$on('updatePopper',function(){if(_this.showPopper)_this.updatePopper();});this.$on('visible',function(val){_this.showPopper=val;});},mounted:function mounted(){this.dropdown.popperElm=this.popperElm=this.$el;this.referenceElm=this.dropdown.$el;// compatible with 2.6 new v-slot syntax
// issue link https://github.com/ElemeFE/element/issues/14345
this.dropdown.initDomOperation();},watch:{'dropdown.placement':{immediate:true,handler:function handler(val){this.currentPlacement=val;}}}};// CONCATENATED MODULE: ./packages/dropdown/src/dropdown-menu.vue?vue&type=script&lang=js&
/* harmony default export */var src_dropdown_menuvue_type_script_lang_js_=dropdown_menuvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/dropdown/src/dropdown-menu.vue
/* normalize component */var dropdown_menu_component=normalizeComponent(src_dropdown_menuvue_type_script_lang_js_,dropdown_menuvue_type_template_id_0da6b714_render,dropdown_menuvue_type_template_id_0da6b714_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var dropdown_menu_api; }dropdown_menu_component.options.__file="packages/dropdown/src/dropdown-menu.vue";/* harmony default export */var dropdown_menu=dropdown_menu_component.exports;// CONCATENATED MODULE: ./packages/dropdown-menu/index.js
/* istanbul ignore next */dropdown_menu.install=function(Vue){Vue.component(dropdown_menu.name,dropdown_menu);};/* harmony default export */var packages_dropdown_menu=dropdown_menu;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/dropdown/src/dropdown-item.vue?vue&type=template&id=6359102a&
var dropdown_itemvue_type_template_id_6359102a_render=function dropdown_itemvue_type_template_id_6359102a_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("li",{staticClass:"el-dropdown-menu__item",class:{"is-disabled":_vm.disabled,"el-dropdown-menu__item--divided":_vm.divided},attrs:{"aria-disabled":_vm.disabled,tabindex:_vm.disabled?null:-1},on:{click:_vm.handleClick}},[_vm.icon?_c("i",{class:_vm.icon}):_vm._e(),_vm._t("default")],2);};var dropdown_itemvue_type_template_id_6359102a_staticRenderFns=[];dropdown_itemvue_type_template_id_6359102a_render._withStripped=true;// CONCATENATED MODULE: ./packages/dropdown/src/dropdown-item.vue?vue&type=template&id=6359102a&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dropdown/src/dropdown-item.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var dropdown_itemvue_type_script_lang_js_={name:'ElDropdownItem',mixins:[emitter_default.a],props:{command:{},disabled:Boolean,divided:Boolean,icon:String},methods:{handleClick:function handleClick(e){this.dispatch('ElDropdown','menu-item-click',[this.command,this]);}}};// CONCATENATED MODULE: ./packages/dropdown/src/dropdown-item.vue?vue&type=script&lang=js&
/* harmony default export */var src_dropdown_itemvue_type_script_lang_js_=dropdown_itemvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/dropdown/src/dropdown-item.vue
/* normalize component */var dropdown_item_component=normalizeComponent(src_dropdown_itemvue_type_script_lang_js_,dropdown_itemvue_type_template_id_6359102a_render,dropdown_itemvue_type_template_id_6359102a_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var dropdown_item_api; }dropdown_item_component.options.__file="packages/dropdown/src/dropdown-item.vue";/* harmony default export */var dropdown_item=dropdown_item_component.exports;// CONCATENATED MODULE: ./packages/dropdown-item/index.js
/* istanbul ignore next */dropdown_item.install=function(Vue){Vue.component(dropdown_item.name,dropdown_item);};/* harmony default export */var packages_dropdown_item=dropdown_item;// CONCATENATED MODULE: ./src/utils/aria-utils.js
var aria=aria||{};aria.Utils=aria.Utils||{};/**
 * @desc Set focus on descendant nodes until the first focusable element is
 *       found.
 * @param element
 *          DOM node for which to find the first focusable descendant.
 * @returns
 *  true if a focusable element is found and focus is set.
 */aria.Utils.focusFirstDescendant=function(element){for(var i=0;i<element.childNodes.length;i++){var child=element.childNodes[i];if(aria.Utils.attemptFocus(child)||aria.Utils.focusFirstDescendant(child)){return true;}}return false;};/**
 * @desc Find the last descendant node that is focusable.
 * @param element
 *          DOM node for which to find the last focusable descendant.
 * @returns
 *  true if a focusable element is found and focus is set.
 */aria.Utils.focusLastDescendant=function(element){for(var i=element.childNodes.length-1;i>=0;i--){var child=element.childNodes[i];if(aria.Utils.attemptFocus(child)||aria.Utils.focusLastDescendant(child)){return true;}}return false;};/**
 * @desc Set Attempt to set focus on the current node.
 * @param element
 *          The node to attempt to focus on.
 * @returns
 *  true if element is focused.
 */aria.Utils.attemptFocus=function(element){if(!aria.Utils.isFocusable(element)){return false;}aria.Utils.IgnoreUtilFocusChanges=true;try{element.focus();}catch(e){}aria.Utils.IgnoreUtilFocusChanges=false;return document.activeElement===element;};aria.Utils.isFocusable=function(element){if(element.tabIndex>0||element.tabIndex===0&&element.getAttribute('tabIndex')!==null){return true;}if(element.disabled){return false;}switch(element.nodeName){case'A':return!!element.href&&element.rel!=='ignore';case'INPUT':return element.type!=='hidden'&&element.type!=='file';case'BUTTON':case'SELECT':case'TEXTAREA':return true;default:return false;}};/**
 * 触发一个事件
 * mouseenter, mouseleave, mouseover, keyup, change, click 等
 * @param  {Element} elm
 * @param  {String} name
 * @param  {*} opts
 */aria.Utils.triggerEvent=function(elm,name){var eventName=void 0;if(/^mouse|click/.test(name)){eventName='MouseEvents';}else if(/^key/.test(name)){eventName='KeyboardEvent';}else{eventName='HTMLEvents';}var evt=document.createEvent(eventName);for(var _len=arguments.length,opts=Array(_len>2?_len-2:0),_key=2;_key<_len;_key++){opts[_key-2]=arguments[_key];}evt.initEvent.apply(evt,[name].concat(opts));elm.dispatchEvent?elm.dispatchEvent(evt):elm.fireEvent('on'+name,evt);return elm;};aria.Utils.keys={tab:9,enter:13,space:32,left:37,up:38,right:39,down:40,esc:27};/* harmony default export */var aria_utils=aria.Utils;// CONCATENATED MODULE: ./src/utils/menu/aria-submenu.js
var SubMenu=function SubMenu(parent,domNode){this.domNode=domNode;this.parent=parent;this.subMenuItems=[];this.subIndex=0;this.init();};SubMenu.prototype.init=function(){this.subMenuItems=this.domNode.querySelectorAll('li');this.addListeners();};SubMenu.prototype.gotoSubIndex=function(idx){if(idx===this.subMenuItems.length){idx=0;}else if(idx<0){idx=this.subMenuItems.length-1;}this.subMenuItems[idx].focus();this.subIndex=idx;};SubMenu.prototype.addListeners=function(){var _this=this;var keys=aria_utils.keys;var parentNode=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,function(el){el.addEventListener('keydown',function(event){var prevDef=false;switch(event.keyCode){case keys.down:_this.gotoSubIndex(_this.subIndex+1);prevDef=true;break;case keys.up:_this.gotoSubIndex(_this.subIndex-1);prevDef=true;break;case keys.tab:aria_utils.triggerEvent(parentNode,'mouseleave');break;case keys.enter:case keys.space:prevDef=true;event.currentTarget.click();break;}if(prevDef){event.preventDefault();event.stopPropagation();}return false;});});};/* harmony default export */var aria_submenu=SubMenu;// CONCATENATED MODULE: ./src/utils/menu/aria-menuitem.js
var MenuItem=function MenuItem(domNode){this.domNode=domNode;this.submenu=null;this.init();};MenuItem.prototype.init=function(){this.domNode.setAttribute('tabindex','0');var menuChild=this.domNode.querySelector('.el-menu');if(menuChild){this.submenu=new aria_submenu(this,menuChild);}this.addListeners();};MenuItem.prototype.addListeners=function(){var _this=this;var keys=aria_utils.keys;this.domNode.addEventListener('keydown',function(event){var prevDef=false;switch(event.keyCode){case keys.down:aria_utils.triggerEvent(event.currentTarget,'mouseenter');_this.submenu&&_this.submenu.gotoSubIndex(0);prevDef=true;break;case keys.up:aria_utils.triggerEvent(event.currentTarget,'mouseenter');_this.submenu&&_this.submenu.gotoSubIndex(_this.submenu.subMenuItems.length-1);prevDef=true;break;case keys.tab:aria_utils.triggerEvent(event.currentTarget,'mouseleave');break;case keys.enter:case keys.space:prevDef=true;event.currentTarget.click();break;}if(prevDef){event.preventDefault();}});};/* harmony default export */var aria_menuitem=MenuItem;// CONCATENATED MODULE: ./src/utils/menu/aria-menubar.js
var Menu=function Menu(domNode){this.domNode=domNode;this.init();};Menu.prototype.init=function(){var menuChildren=this.domNode.childNodes;[].filter.call(menuChildren,function(child){return child.nodeType===1;}).forEach(function(child){new aria_menuitem(child);// eslint-disable-line
});};/* harmony default export */var aria_menubar=Menu;// EXTERNAL MODULE: external "element-ui/lib/utils/dom"
var dom_=__webpack_require__(1);// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/menu.vue?vue&type=script&lang=js&
/* harmony default export */var menuvue_type_script_lang_js_={name:'ElMenu',render:function render(h){var component=h('ul',{attrs:{role:'menubar'},key:+this.collapse,style:{backgroundColor:this.backgroundColor||''},'class':{'el-menu--horizontal':this.mode==='horizontal','el-menu--collapse':this.collapse,"el-menu":true}},[this.$slots.default]);if(this.collapseTransition){return h('el-menu-collapse-transition',[component]);}else{return component;}},componentName:'ElMenu',mixins:[emitter_default.a,migrating_default.a],provide:function provide(){return{rootMenu:this};},components:{'el-menu-collapse-transition':{functional:true,render:function render(createElement,context){var data={props:{mode:'out-in'},on:{beforeEnter:function beforeEnter(el){el.style.opacity=0.2;},enter:function enter(el){Object(dom_["addClass"])(el,'el-opacity-transition');el.style.opacity=1;},afterEnter:function afterEnter(el){Object(dom_["removeClass"])(el,'el-opacity-transition');el.style.opacity='';},beforeLeave:function beforeLeave(el){if(!el.dataset)el.dataset={};if(Object(dom_["hasClass"])(el,'el-menu--collapse')){Object(dom_["removeClass"])(el,'el-menu--collapse');el.dataset.oldOverflow=el.style.overflow;el.dataset.scrollWidth=el.clientWidth;Object(dom_["addClass"])(el,'el-menu--collapse');}else{Object(dom_["addClass"])(el,'el-menu--collapse');el.dataset.oldOverflow=el.style.overflow;el.dataset.scrollWidth=el.clientWidth;Object(dom_["removeClass"])(el,'el-menu--collapse');}el.style.width=el.scrollWidth+'px';el.style.overflow='hidden';},leave:function leave(el){Object(dom_["addClass"])(el,'horizontal-collapse-transition');el.style.width=el.dataset.scrollWidth+'px';}}};return createElement('transition',data,context.children);}}},props:{mode:{type:String,default:'vertical'},defaultActive:{type:String,default:''},defaultOpeneds:Array,uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,default:'hover'},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,collapseTransition:{type:Boolean,default:true}},data:function data(){return{activeIndex:this.defaultActive,openedMenus:this.defaultOpeneds&&!this.collapse?this.defaultOpeneds.slice(0):[],items:{},submenus:{}};},computed:{hoverBackground:function hoverBackground(){return this.backgroundColor?this.mixColor(this.backgroundColor,0.2):'';},isMenuPopup:function isMenuPopup(){return this.mode==='horizontal'||this.mode==='vertical'&&this.collapse;}},watch:{defaultActive:function defaultActive(value){if(!this.items[value]){this.activeIndex=null;}this.updateActiveIndex(value);},defaultOpeneds:function defaultOpeneds(value){if(!this.collapse){this.openedMenus=value;}},collapse:function collapse(value){if(value)this.openedMenus=[];this.broadcast('ElSubmenu','toggle-collapse',value);}},methods:{updateActiveIndex:function updateActiveIndex(val){var item=this.items[val]||this.items[this.activeIndex]||this.items[this.defaultActive];if(item){this.activeIndex=item.index;this.initOpenedMenu();}else{this.activeIndex=null;}},getMigratingConfig:function getMigratingConfig(){return{props:{'theme':'theme is removed.'}};},getColorChannels:function getColorChannels(color){color=color.replace('#','');if(/^[0-9a-fA-F]{3}$/.test(color)){color=color.split('');for(var i=2;i>=0;i--){color.splice(i,0,color[i]);}color=color.join('');}if(/^[0-9a-fA-F]{6}$/.test(color)){return{red:parseInt(color.slice(0,2),16),green:parseInt(color.slice(2,4),16),blue:parseInt(color.slice(4,6),16)};}else{return{red:255,green:255,blue:255};}},mixColor:function mixColor(color,percent){var _getColorChannels=this.getColorChannels(color),red=_getColorChannels.red,green=_getColorChannels.green,blue=_getColorChannels.blue;if(percent>0){// shade given color
red*=1-percent;green*=1-percent;blue*=1-percent;}else{// tint given color
red+=(255-red)*percent;green+=(255-green)*percent;blue+=(255-blue)*percent;}return'rgb('+Math.round(red)+', '+Math.round(green)+', '+Math.round(blue)+')';},addItem:function addItem(item){this.$set(this.items,item.index,item);},removeItem:function removeItem(item){delete this.items[item.index];},addSubmenu:function addSubmenu(item){this.$set(this.submenus,item.index,item);},removeSubmenu:function removeSubmenu(item){delete this.submenus[item.index];},openMenu:function openMenu(index,indexPath){var openedMenus=this.openedMenus;if(openedMenus.indexOf(index)!==-1)return;// 将不在该菜单路径下的其余菜单收起
// collapse all menu that are not under current menu item
if(this.uniqueOpened){this.openedMenus=openedMenus.filter(function(index){return indexPath.indexOf(index)!==-1;});}this.openedMenus.push(index);},closeMenu:function closeMenu(index){var i=this.openedMenus.indexOf(index);if(i!==-1){this.openedMenus.splice(i,1);}},handleSubmenuClick:function handleSubmenuClick(submenu){var index=submenu.index,indexPath=submenu.indexPath;var isOpened=this.openedMenus.indexOf(index)!==-1;if(isOpened){this.closeMenu(index);this.$emit('close',index,indexPath);}else{this.openMenu(index,indexPath);this.$emit('open',index,indexPath);}},handleItemClick:function handleItemClick(item){var _this=this;var index=item.index,indexPath=item.indexPath;var oldActiveIndex=this.activeIndex;var hasIndex=item.index!==null;if(hasIndex){this.activeIndex=item.index;}this.$emit('select',index,indexPath,item);if(this.mode==='horizontal'||this.collapse){this.openedMenus=[];}if(this.router&&hasIndex){this.routeToItem(item,function(error){_this.activeIndex=oldActiveIndex;if(error){// vue-router 3.1.0+ push/replace cause NavigationDuplicated error 
// https://github.com/ElemeFE/element/issues/17044
if(error.name==='NavigationDuplicated')return;console.error(error);}});}},// 初始化展开菜单
// initialize opened menu
initOpenedMenu:function initOpenedMenu(){var _this2=this;var index=this.activeIndex;var activeItem=this.items[index];if(!activeItem||this.mode==='horizontal'||this.collapse)return;var indexPath=activeItem.indexPath;// 展开该菜单项的路径上所有子菜单
// expand all submenus of the menu item
indexPath.forEach(function(index){var submenu=_this2.submenus[index];submenu&&_this2.openMenu(index,submenu.indexPath);});},routeToItem:function routeToItem(item,onError){var route=item.route||item.index;try{this.$router.push(route,function(){},onError);}catch(e){console.error(e);}},open:function open(index){var _this3=this;var indexPath=this.submenus[index.toString()].indexPath;indexPath.forEach(function(i){return _this3.openMenu(i,indexPath);});},close:function close(index){this.closeMenu(index);}},mounted:function mounted(){this.initOpenedMenu();this.$on('item-click',this.handleItemClick);this.$on('submenu-click',this.handleSubmenuClick);if(this.mode==='horizontal'){new aria_menubar(this.$el);// eslint-disable-line
}this.$watch('items',this.updateActiveIndex);}};// CONCATENATED MODULE: ./packages/menu/src/menu.vue?vue&type=script&lang=js&
/* harmony default export */var src_menuvue_type_script_lang_js_=menuvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/menu/src/menu.vue
var menu_render,menu_staticRenderFns;/* normalize component */var menu_component=normalizeComponent(src_menuvue_type_script_lang_js_,menu_render,menu_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var menu_api; }menu_component.options.__file="packages/menu/src/menu.vue";/* harmony default export */var src_menu=menu_component.exports;// CONCATENATED MODULE: ./packages/menu/index.js
/* istanbul ignore next */src_menu.install=function(Vue){Vue.component(src_menu.name,src_menu);};/* harmony default export */var packages_menu=src_menu;// EXTERNAL MODULE: external "element-ui/lib/transitions/collapse-transition"
var collapse_transition_=__webpack_require__(21);var collapse_transition_default=/*#__PURE__*/__webpack_require__.n(collapse_transition_);// CONCATENATED MODULE: ./packages/menu/src/menu-mixin.js
/* harmony default export */var menu_mixin={inject:['rootMenu'],computed:{indexPath:function indexPath(){var path=[this.index];var parent=this.$parent;while(parent.$options.componentName!=='ElMenu'){if(parent.index){path.unshift(parent.index);}parent=parent.$parent;}return path;},parentMenu:function parentMenu(){var parent=this.$parent;while(parent&&['ElMenu','ElSubmenu'].indexOf(parent.$options.componentName)===-1){parent=parent.$parent;}return parent;},paddingStyle:function paddingStyle(){if(this.rootMenu.mode!=='vertical')return{};var padding=20;var parent=this.$parent;if(this.rootMenu.collapse){padding=20;}else{while(parent&&parent.$options.componentName!=='ElMenu'){if(parent.$options.componentName==='ElSubmenu'){padding+=20;}parent=parent.$parent;}}return{paddingLeft:padding+'px'};}}};// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/submenu.vue?vue&type=script&lang=js&
var poperMixins={props:{transformOrigin:{type:[Boolean,String],default:false},offset:vue_popper_default.a.props.offset,boundariesPadding:vue_popper_default.a.props.boundariesPadding,popperOptions:vue_popper_default.a.props.popperOptions},data:vue_popper_default.a.data,methods:vue_popper_default.a.methods,beforeDestroy:vue_popper_default.a.beforeDestroy,deactivated:vue_popper_default.a.deactivated};/* harmony default export */var submenuvue_type_script_lang_js_={name:'ElSubmenu',componentName:'ElSubmenu',mixins:[menu_mixin,emitter_default.a,poperMixins],components:{ElCollapseTransition:collapse_transition_default.a},props:{index:{type:String,required:true},showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},popperClass:String,disabled:Boolean,popperAppendToBody:{type:Boolean,default:undefined}},data:function data(){return{popperJS:null,timeout:null,items:{},submenus:{},mouseInChild:false};},watch:{opened:function opened(val){var _this=this;if(this.isMenuPopup){this.$nextTick(function(_){_this.updatePopper();});}}},computed:{// popper option
appendToBody:function appendToBody(){return this.popperAppendToBody===undefined?this.isFirstLevel:this.popperAppendToBody;},menuTransitionName:function menuTransitionName(){return this.rootMenu.collapse?'el-zoom-in-left':'el-zoom-in-top';},opened:function opened(){return this.rootMenu.openedMenus.indexOf(this.index)>-1;},active:function active(){var isActive=false;var submenus=this.submenus;var items=this.items;Object.keys(items).forEach(function(index){if(items[index].active){isActive=true;}});Object.keys(submenus).forEach(function(index){if(submenus[index].active){isActive=true;}});return isActive;},hoverBackground:function hoverBackground(){return this.rootMenu.hoverBackground;},backgroundColor:function backgroundColor(){return this.rootMenu.backgroundColor||'';},activeTextColor:function activeTextColor(){return this.rootMenu.activeTextColor||'';},textColor:function textColor(){return this.rootMenu.textColor||'';},mode:function mode(){return this.rootMenu.mode;},isMenuPopup:function isMenuPopup(){return this.rootMenu.isMenuPopup;},titleStyle:function titleStyle(){if(this.mode!=='horizontal'){return{color:this.textColor};}return{borderBottomColor:this.active?this.rootMenu.activeTextColor?this.activeTextColor:'':'transparent',color:this.active?this.activeTextColor:this.textColor};},isFirstLevel:function isFirstLevel(){var isFirstLevel=true;var parent=this.$parent;while(parent&&parent!==this.rootMenu){if(['ElSubmenu','ElMenuItemGroup'].indexOf(parent.$options.componentName)>-1){isFirstLevel=false;break;}else{parent=parent.$parent;}}return isFirstLevel;}},methods:{handleCollapseToggle:function handleCollapseToggle(value){if(value){this.initPopper();}else{this.doDestroy();}},addItem:function addItem(item){this.$set(this.items,item.index,item);},removeItem:function removeItem(item){delete this.items[item.index];},addSubmenu:function addSubmenu(item){this.$set(this.submenus,item.index,item);},removeSubmenu:function removeSubmenu(item){delete this.submenus[item.index];},handleClick:function handleClick(){var rootMenu=this.rootMenu,disabled=this.disabled;if(rootMenu.menuTrigger==='hover'&&rootMenu.mode==='horizontal'||rootMenu.collapse&&rootMenu.mode==='vertical'||disabled){return;}this.dispatch('ElMenu','submenu-click',this);},handleMouseenter:function handleMouseenter(event){var _this2=this;var showTimeout=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.showTimeout;if(!('ActiveXObject'in window)&&event.type==='focus'&&!event.relatedTarget){return;}var rootMenu=this.rootMenu,disabled=this.disabled;if(rootMenu.menuTrigger==='click'&&rootMenu.mode==='horizontal'||!rootMenu.collapse&&rootMenu.mode==='vertical'||disabled){return;}this.dispatch('ElSubmenu','mouse-enter-child');clearTimeout(this.timeout);this.timeout=setTimeout(function(){_this2.rootMenu.openMenu(_this2.index,_this2.indexPath);},showTimeout);if(this.appendToBody){this.$parent.$el.dispatchEvent(new MouseEvent('mouseenter'));}},handleMouseleave:function handleMouseleave(){var _this3=this;var deepDispatch=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;var rootMenu=this.rootMenu;if(rootMenu.menuTrigger==='click'&&rootMenu.mode==='horizontal'||!rootMenu.collapse&&rootMenu.mode==='vertical'){return;}this.dispatch('ElSubmenu','mouse-leave-child');clearTimeout(this.timeout);this.timeout=setTimeout(function(){!_this3.mouseInChild&&_this3.rootMenu.closeMenu(_this3.index);},this.hideTimeout);if(this.appendToBody&&deepDispatch){if(this.$parent.$options.name==='ElSubmenu'){this.$parent.handleMouseleave(true);}}},handleTitleMouseenter:function handleTitleMouseenter(){if(this.mode==='horizontal'&&!this.rootMenu.backgroundColor)return;var title=this.$refs['submenu-title'];title&&(title.style.backgroundColor=this.rootMenu.hoverBackground);},handleTitleMouseleave:function handleTitleMouseleave(){if(this.mode==='horizontal'&&!this.rootMenu.backgroundColor)return;var title=this.$refs['submenu-title'];title&&(title.style.backgroundColor=this.rootMenu.backgroundColor||'');},updatePlacement:function updatePlacement(){this.currentPlacement=this.mode==='horizontal'&&this.isFirstLevel?'bottom-start':'right-start';},initPopper:function initPopper(){this.referenceElm=this.$el;this.popperElm=this.$refs.menu;this.updatePlacement();}},created:function created(){var _this4=this;this.$on('toggle-collapse',this.handleCollapseToggle);this.$on('mouse-enter-child',function(){_this4.mouseInChild=true;clearTimeout(_this4.timeout);});this.$on('mouse-leave-child',function(){_this4.mouseInChild=false;clearTimeout(_this4.timeout);});},mounted:function mounted(){this.parentMenu.addSubmenu(this);this.rootMenu.addSubmenu(this);this.initPopper();},beforeDestroy:function beforeDestroy(){this.parentMenu.removeSubmenu(this);this.rootMenu.removeSubmenu(this);},render:function render(h){var _this5=this;var active=this.active,opened=this.opened,paddingStyle=this.paddingStyle,titleStyle=this.titleStyle,backgroundColor=this.backgroundColor,rootMenu=this.rootMenu,currentPlacement=this.currentPlacement,menuTransitionName=this.menuTransitionName,mode=this.mode,disabled=this.disabled,popperClass=this.popperClass,$slots=this.$slots,isFirstLevel=this.isFirstLevel;var popupMenu=h('transition',{attrs:{name:menuTransitionName}},[h('div',{ref:'menu',directives:[{name:'show',value:opened}],'class':['el-menu--'+mode,popperClass],on:{'mouseenter':function mouseenter($event){return _this5.handleMouseenter($event,100);},'mouseleave':function mouseleave(){return _this5.handleMouseleave(true);},'focus':function focus($event){return _this5.handleMouseenter($event,100);}}},[h('ul',{attrs:{role:'menu'},'class':['el-menu el-menu--popup','el-menu--popup-'+currentPlacement],style:{backgroundColor:rootMenu.backgroundColor||''}},[$slots.default])])]);var inlineMenu=h('el-collapse-transition',[h('ul',{attrs:{role:'menu'},'class':'el-menu el-menu--inline',directives:[{name:'show',value:opened}],style:{backgroundColor:rootMenu.backgroundColor||''}},[$slots.default])]);var submenuTitleIcon=rootMenu.mode==='horizontal'&&isFirstLevel||rootMenu.mode==='vertical'&&!rootMenu.collapse?'el-icon-arrow-down':'el-icon-arrow-right';return h('li',{'class':{'el-submenu':true,'is-active':active,'is-opened':opened,'is-disabled':disabled},attrs:{role:'menuitem','aria-haspopup':'true','aria-expanded':opened},on:{'mouseenter':this.handleMouseenter,'mouseleave':function mouseleave(){return _this5.handleMouseleave(false);},'focus':this.handleMouseenter}},[h('div',{'class':'el-submenu__title',ref:'submenu-title',on:{'click':this.handleClick,'mouseenter':this.handleTitleMouseenter,'mouseleave':this.handleTitleMouseleave},style:[paddingStyle,titleStyle,{backgroundColor:backgroundColor}]},[$slots.title,h('i',{'class':['el-submenu__icon-arrow',submenuTitleIcon]})]),this.isMenuPopup?popupMenu:inlineMenu]);}};// CONCATENATED MODULE: ./packages/menu/src/submenu.vue?vue&type=script&lang=js&
/* harmony default export */var src_submenuvue_type_script_lang_js_=submenuvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/menu/src/submenu.vue
var submenu_render,submenu_staticRenderFns;/* normalize component */var submenu_component=normalizeComponent(src_submenuvue_type_script_lang_js_,submenu_render,submenu_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var submenu_api; }submenu_component.options.__file="packages/menu/src/submenu.vue";/* harmony default export */var submenu=submenu_component.exports;// CONCATENATED MODULE: ./packages/submenu/index.js
/* istanbul ignore next */submenu.install=function(Vue){Vue.component(submenu.name,submenu);};/* harmony default export */var packages_submenu=submenu;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/menu-item.vue?vue&type=template&id=2a5dbfea&
var menu_itemvue_type_template_id_2a5dbfea_render=function menu_itemvue_type_template_id_2a5dbfea_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("li",{staticClass:"el-menu-item",class:{"is-active":_vm.active,"is-disabled":_vm.disabled},style:[_vm.paddingStyle,_vm.itemStyle,{backgroundColor:_vm.backgroundColor}],attrs:{role:"menuitem",tabindex:"-1"},on:{click:_vm.handleClick,mouseenter:_vm.onMouseEnter,focus:_vm.onMouseEnter,blur:_vm.onMouseLeave,mouseleave:_vm.onMouseLeave}},[_vm.parentMenu.$options.componentName==="ElMenu"&&_vm.rootMenu.collapse&&_vm.$slots.title?_c("el-tooltip",{attrs:{effect:"dark",placement:"right"}},[_c("div",{attrs:{slot:"content"},slot:"content"},[_vm._t("title")],2),_c("div",{staticStyle:{position:"absolute",left:"0",top:"0",height:"100%",width:"100%",display:"inline-block","box-sizing":"border-box",padding:"0 20px"}},[_vm._t("default")],2)]):[_vm._t("default"),_vm._t("title")]],2);};var menu_itemvue_type_template_id_2a5dbfea_staticRenderFns=[];menu_itemvue_type_template_id_2a5dbfea_render._withStripped=true;// CONCATENATED MODULE: ./packages/menu/src/menu-item.vue?vue&type=template&id=2a5dbfea&
// EXTERNAL MODULE: external "element-ui/lib/tooltip"
var tooltip_=__webpack_require__(26);var tooltip_default=/*#__PURE__*/__webpack_require__.n(tooltip_);// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/menu-item.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var menu_itemvue_type_script_lang_js_={name:'ElMenuItem',componentName:'ElMenuItem',mixins:[menu_mixin,emitter_default.a],components:{ElTooltip:tooltip_default.a},props:{index:{default:null,validator:function validator(val){return typeof val==='string'||val===null;}},route:[String,Object],disabled:Boolean},computed:{active:function active(){return this.index===this.rootMenu.activeIndex;},hoverBackground:function hoverBackground(){return this.rootMenu.hoverBackground;},backgroundColor:function backgroundColor(){return this.rootMenu.backgroundColor||'';},activeTextColor:function activeTextColor(){return this.rootMenu.activeTextColor||'';},textColor:function textColor(){return this.rootMenu.textColor||'';},mode:function mode(){return this.rootMenu.mode;},itemStyle:function itemStyle(){var style={color:this.active?this.activeTextColor:this.textColor};if(this.mode==='horizontal'&&!this.isNested){style.borderBottomColor=this.active?this.rootMenu.activeTextColor?this.activeTextColor:'':'transparent';}return style;},isNested:function isNested(){return this.parentMenu!==this.rootMenu;}},methods:{onMouseEnter:function onMouseEnter(){if(this.mode==='horizontal'&&!this.rootMenu.backgroundColor)return;this.$el.style.backgroundColor=this.hoverBackground;},onMouseLeave:function onMouseLeave(){if(this.mode==='horizontal'&&!this.rootMenu.backgroundColor)return;this.$el.style.backgroundColor=this.backgroundColor;},handleClick:function handleClick(){if(!this.disabled){this.dispatch('ElMenu','item-click',this);this.$emit('click',this);}}},mounted:function mounted(){this.parentMenu.addItem(this);this.rootMenu.addItem(this);},beforeDestroy:function beforeDestroy(){this.parentMenu.removeItem(this);this.rootMenu.removeItem(this);}};// CONCATENATED MODULE: ./packages/menu/src/menu-item.vue?vue&type=script&lang=js&
/* harmony default export */var src_menu_itemvue_type_script_lang_js_=menu_itemvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/menu/src/menu-item.vue
/* normalize component */var menu_item_component=normalizeComponent(src_menu_itemvue_type_script_lang_js_,menu_itemvue_type_template_id_2a5dbfea_render,menu_itemvue_type_template_id_2a5dbfea_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var menu_item_api; }menu_item_component.options.__file="packages/menu/src/menu-item.vue";/* harmony default export */var menu_item=menu_item_component.exports;// CONCATENATED MODULE: ./packages/menu-item/index.js
/* istanbul ignore next */menu_item.install=function(Vue){Vue.component(menu_item.name,menu_item);};/* harmony default export */var packages_menu_item=menu_item;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/menu-item-group.vue?vue&type=template&id=543b7bdc&
var menu_item_groupvue_type_template_id_543b7bdc_render=function menu_item_groupvue_type_template_id_543b7bdc_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("li",{staticClass:"el-menu-item-group"},[_c("div",{staticClass:"el-menu-item-group__title",style:{paddingLeft:_vm.levelPadding+"px"}},[!_vm.$slots.title?[_vm._v(_vm._s(_vm.title))]:_vm._t("title")],2),_c("ul",[_vm._t("default")],2)]);};var menu_item_groupvue_type_template_id_543b7bdc_staticRenderFns=[];menu_item_groupvue_type_template_id_543b7bdc_render._withStripped=true;// CONCATENATED MODULE: ./packages/menu/src/menu-item-group.vue?vue&type=template&id=543b7bdc&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/menu-item-group.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var menu_item_groupvue_type_script_lang_js_={name:'ElMenuItemGroup',componentName:'ElMenuItemGroup',inject:['rootMenu'],props:{title:{type:String}},data:function data(){return{paddingLeft:20};},computed:{levelPadding:function levelPadding(){var padding=20;var parent=this.$parent;if(this.rootMenu.collapse)return 20;while(parent&&parent.$options.componentName!=='ElMenu'){if(parent.$options.componentName==='ElSubmenu'){padding+=20;}parent=parent.$parent;}return padding;}}};// CONCATENATED MODULE: ./packages/menu/src/menu-item-group.vue?vue&type=script&lang=js&
/* harmony default export */var src_menu_item_groupvue_type_script_lang_js_=menu_item_groupvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/menu/src/menu-item-group.vue
/* normalize component */var menu_item_group_component=normalizeComponent(src_menu_item_groupvue_type_script_lang_js_,menu_item_groupvue_type_template_id_543b7bdc_render,menu_item_groupvue_type_template_id_543b7bdc_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var menu_item_group_api; }menu_item_group_component.options.__file="packages/menu/src/menu-item-group.vue";/* harmony default export */var menu_item_group=menu_item_group_component.exports;// CONCATENATED MODULE: ./packages/menu-item-group/index.js
/* istanbul ignore next */menu_item_group.install=function(Vue){Vue.component(menu_item_group.name,menu_item_group);};/* harmony default export */var packages_menu_item_group=menu_item_group;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=template&id=343dd774&
var inputvue_type_template_id_343dd774_render=function inputvue_type_template_id_343dd774_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{class:[_vm.type==="textarea"?"el-textarea":"el-input",_vm.inputSize?"el-input--"+_vm.inputSize:"",{"is-disabled":_vm.inputDisabled,"is-exceed":_vm.inputExceed,"el-input-group":_vm.$slots.prepend||_vm.$slots.append,"el-input-group--append":_vm.$slots.append,"el-input-group--prepend":_vm.$slots.prepend,"el-input--prefix":_vm.$slots.prefix||_vm.prefixIcon,"el-input--suffix":_vm.$slots.suffix||_vm.suffixIcon||_vm.clearable||_vm.showPassword}],on:{mouseenter:function mouseenter($event){_vm.hovering=true;},mouseleave:function mouseleave($event){_vm.hovering=false;}}},[_vm.type!=="textarea"?[_vm.$slots.prepend?_c("div",{staticClass:"el-input-group__prepend"},[_vm._t("prepend")],2):_vm._e(),_vm.type!=="textarea"?_c("input",_vm._b({ref:"input",staticClass:"el-input__inner",attrs:{tabindex:_vm.tabindex,type:_vm.showPassword?_vm.passwordVisible?"text":"password":_vm.type,disabled:_vm.inputDisabled,readonly:_vm.readonly,autocomplete:_vm.autoComplete||_vm.autocomplete,"aria-label":_vm.label},on:{compositionstart:_vm.handleCompositionStart,compositionupdate:_vm.handleCompositionUpdate,compositionend:_vm.handleCompositionEnd,input:_vm.handleInput,focus:_vm.handleFocus,blur:_vm.handleBlur,change:_vm.handleChange}},"input",_vm.$attrs,false)):_vm._e(),_vm.$slots.prefix||_vm.prefixIcon?_c("span",{staticClass:"el-input__prefix"},[_vm._t("prefix"),_vm.prefixIcon?_c("i",{staticClass:"el-input__icon",class:_vm.prefixIcon}):_vm._e()],2):_vm._e(),_vm.getSuffixVisible()?_c("span",{staticClass:"el-input__suffix"},[_c("span",{staticClass:"el-input__suffix-inner"},[!_vm.showClear||!_vm.showPwdVisible||!_vm.isWordLimitVisible?[_vm._t("suffix"),_vm.suffixIcon?_c("i",{staticClass:"el-input__icon",class:_vm.suffixIcon}):_vm._e()]:_vm._e(),_vm.showClear?_c("i",{staticClass:"el-input__icon el-icon-circle-close el-input__clear",on:{mousedown:function mousedown($event){$event.preventDefault();},click:_vm.clear}}):_vm._e(),_vm.showPwdVisible?_c("i",{staticClass:"el-input__icon el-icon-view el-input__clear",on:{click:_vm.handlePasswordVisible}}):_vm._e(),_vm.isWordLimitVisible?_c("span",{staticClass:"el-input__count"},[_c("span",{staticClass:"el-input__count-inner"},[_vm._v("\n            "+_vm._s(_vm.textLength)+"/"+_vm._s(_vm.upperLimit)+"\n          ")])]):_vm._e()],2),_vm.validateState?_c("i",{staticClass:"el-input__icon",class:["el-input__validateIcon",_vm.validateIcon]}):_vm._e()]):_vm._e(),_vm.$slots.append?_c("div",{staticClass:"el-input-group__append"},[_vm._t("append")],2):_vm._e()]:_c("textarea",_vm._b({ref:"textarea",staticClass:"el-textarea__inner",style:_vm.textareaStyle,attrs:{tabindex:_vm.tabindex,disabled:_vm.inputDisabled,readonly:_vm.readonly,autocomplete:_vm.autoComplete||_vm.autocomplete,"aria-label":_vm.label},on:{compositionstart:_vm.handleCompositionStart,compositionupdate:_vm.handleCompositionUpdate,compositionend:_vm.handleCompositionEnd,input:_vm.handleInput,focus:_vm.handleFocus,blur:_vm.handleBlur,change:_vm.handleChange}},"textarea",_vm.$attrs,false)),_vm.isWordLimitVisible&&_vm.type==="textarea"?_c("span",{staticClass:"el-input__count"},[_vm._v(_vm._s(_vm.textLength)+"/"+_vm._s(_vm.upperLimit))]):_vm._e()],2);};var inputvue_type_template_id_343dd774_staticRenderFns=[];inputvue_type_template_id_343dd774_render._withStripped=true;// CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=template&id=343dd774&
// CONCATENATED MODULE: ./packages/input/src/calcTextareaHeight.js
var hiddenTextarea=void 0;var HIDDEN_STYLE='\n  height:0 !important;\n  visibility:hidden !important;\n  overflow:hidden !important;\n  position:absolute !important;\n  z-index:-1000 !important;\n  top:0 !important;\n  right:0 !important\n';var CONTEXT_STYLE=['letter-spacing','line-height','padding-top','padding-bottom','font-family','font-weight','font-size','text-rendering','text-transform','width','text-indent','padding-left','padding-right','border-width','box-sizing'];function calculateNodeStyling(targetElement){var style=window.getComputedStyle(targetElement);var boxSizing=style.getPropertyValue('box-sizing');var paddingSize=parseFloat(style.getPropertyValue('padding-bottom'))+parseFloat(style.getPropertyValue('padding-top'));var borderSize=parseFloat(style.getPropertyValue('border-bottom-width'))+parseFloat(style.getPropertyValue('border-top-width'));var contextStyle=CONTEXT_STYLE.map(function(name){return name+':'+style.getPropertyValue(name);}).join(';');return{contextStyle:contextStyle,paddingSize:paddingSize,borderSize:borderSize,boxSizing:boxSizing};}function calcTextareaHeight(targetElement){var minRows=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;var maxRows=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;if(!hiddenTextarea){hiddenTextarea=document.createElement('textarea');document.body.appendChild(hiddenTextarea);}var _calculateNodeStyling=calculateNodeStyling(targetElement),paddingSize=_calculateNodeStyling.paddingSize,borderSize=_calculateNodeStyling.borderSize,boxSizing=_calculateNodeStyling.boxSizing,contextStyle=_calculateNodeStyling.contextStyle;hiddenTextarea.setAttribute('style',contextStyle+';'+HIDDEN_STYLE);hiddenTextarea.value=targetElement.value||targetElement.placeholder||'';var height=hiddenTextarea.scrollHeight;var result={};if(boxSizing==='border-box'){height=height+borderSize;}else if(boxSizing==='content-box'){height=height-paddingSize;}hiddenTextarea.value='';var singleRowHeight=hiddenTextarea.scrollHeight-paddingSize;if(minRows!==null){var minHeight=singleRowHeight*minRows;if(boxSizing==='border-box'){minHeight=minHeight+paddingSize+borderSize;}height=Math.max(minHeight,height);result.minHeight=minHeight+'px';}if(maxRows!==null){var maxHeight=singleRowHeight*maxRows;if(boxSizing==='border-box'){maxHeight=maxHeight+paddingSize+borderSize;}height=Math.min(maxHeight,height);}result.height=height+'px';hiddenTextarea.parentNode&&hiddenTextarea.parentNode.removeChild(hiddenTextarea);hiddenTextarea=null;return result;};// EXTERNAL MODULE: external "element-ui/lib/utils/merge"
var merge_=__webpack_require__(7);var merge_default=/*#__PURE__*/__webpack_require__.n(merge_);// EXTERNAL MODULE: external "element-ui/lib/utils/shared"
var shared_=__webpack_require__(19);// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var inputvue_type_script_lang_js_={name:'ElInput',componentName:'ElInput',mixins:[emitter_default.a,migrating_default.a],inheritAttrs:false,inject:{elForm:{default:''},elFormItem:{default:''}},data:function data(){return{textareaCalcStyle:{},hovering:false,focused:false,isComposing:false,passwordVisible:false};},props:{value:[String,Number],size:String,resize:String,form:String,disabled:Boolean,readonly:Boolean,type:{type:String,default:'text'},autosize:{type:[Boolean,Object],default:false},autocomplete:{type:String,default:'off'},/** @Deprecated in next major version */autoComplete:{type:String,validator:function validator(val){ false&&false;return true;}},validateEvent:{type:Boolean,default:true},suffixIcon:String,prefixIcon:String,label:String,clearable:{type:Boolean,default:false},showPassword:{type:Boolean,default:false},showWordLimit:{type:Boolean,default:false},tabindex:String},computed:{_elFormItemSize:function _elFormItemSize(){return(this.elFormItem||{}).elFormItemSize;},validateState:function validateState(){return this.elFormItem?this.elFormItem.validateState:'';},needStatusIcon:function needStatusIcon(){return this.elForm?this.elForm.statusIcon:false;},validateIcon:function validateIcon(){return{validating:'el-icon-loading',success:'el-icon-circle-check',error:'el-icon-circle-close'}[this.validateState];},textareaStyle:function textareaStyle(){return merge_default()({},this.textareaCalcStyle,{resize:this.resize});},inputSize:function inputSize(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size;},inputDisabled:function inputDisabled(){return this.disabled||(this.elForm||{}).disabled;},nativeInputValue:function nativeInputValue(){return this.value===null||this.value===undefined?'':String(this.value);},showClear:function showClear(){return this.clearable&&!this.inputDisabled&&!this.readonly&&this.nativeInputValue&&(this.focused||this.hovering);},showPwdVisible:function showPwdVisible(){return this.showPassword&&!this.inputDisabled&&!this.readonly&&(!!this.nativeInputValue||this.focused);},isWordLimitVisible:function isWordLimitVisible(){return this.showWordLimit&&this.$attrs.maxlength&&(this.type==='text'||this.type==='textarea')&&!this.inputDisabled&&!this.readonly&&!this.showPassword;},upperLimit:function upperLimit(){return this.$attrs.maxlength;},textLength:function textLength(){if(typeof this.value==='number'){return String(this.value).length;}return(this.value||'').length;},inputExceed:function inputExceed(){// show exceed style if length of initial value greater then maxlength
return this.isWordLimitVisible&&this.textLength>this.upperLimit;}},watch:{value:function value(val){this.$nextTick(this.resizeTextarea);if(this.validateEvent){this.dispatch('ElFormItem','el.form.change',[val]);}},// native input value is set explicitly
// do not use v-model / :value in template
// see: https://github.com/ElemeFE/element/issues/14521
nativeInputValue:function nativeInputValue(){this.setNativeInputValue();},// when change between <input> and <textarea>,
// update DOM dependent value and styles
// https://github.com/ElemeFE/element/issues/14857
type:function type(){var _this=this;this.$nextTick(function(){_this.setNativeInputValue();_this.resizeTextarea();_this.updateIconOffset();});}},methods:{focus:function focus(){this.getInput().focus();},blur:function blur(){this.getInput().blur();},getMigratingConfig:function getMigratingConfig(){return{props:{'icon':'icon is removed, use suffix-icon / prefix-icon instead.','on-icon-click':'on-icon-click is removed.'},events:{'click':'click is removed.'}};},handleBlur:function handleBlur(event){this.focused=false;this.$emit('blur',event);if(this.validateEvent){this.dispatch('ElFormItem','el.form.blur',[this.value]);}},select:function select(){this.getInput().select();},resizeTextarea:function resizeTextarea(){if(this.$isServer)return;var autosize=this.autosize,type=this.type;if(type!=='textarea')return;if(!autosize){this.textareaCalcStyle={minHeight:calcTextareaHeight(this.$refs.textarea).minHeight};return;}var minRows=autosize.minRows;var maxRows=autosize.maxRows;this.textareaCalcStyle=calcTextareaHeight(this.$refs.textarea,minRows,maxRows);},setNativeInputValue:function setNativeInputValue(){var input=this.getInput();if(!input)return;if(input.value===this.nativeInputValue)return;input.value=this.nativeInputValue;},handleFocus:function handleFocus(event){this.focused=true;this.$emit('focus',event);},handleCompositionStart:function handleCompositionStart(){this.isComposing=true;},handleCompositionUpdate:function handleCompositionUpdate(event){var text=event.target.value;var lastCharacter=text[text.length-1]||'';this.isComposing=!Object(shared_["isKorean"])(lastCharacter);},handleCompositionEnd:function handleCompositionEnd(event){if(this.isComposing){this.isComposing=false;this.handleInput(event);}},handleInput:function handleInput(event){// should not emit input during composition
// see: https://github.com/ElemeFE/element/issues/10516
if(this.isComposing)return;// hack for https://github.com/ElemeFE/element/issues/8548
// should remove the following line when we don't support IE
if(event.target.value===this.nativeInputValue)return;this.$emit('input',event.target.value);// ensure native input value is controlled
// see: https://github.com/ElemeFE/element/issues/12850
this.$nextTick(this.setNativeInputValue);},handleChange:function handleChange(event){this.$emit('change',event.target.value);},calcIconOffset:function calcIconOffset(place){var elList=[].slice.call(this.$el.querySelectorAll('.el-input__'+place)||[]);if(!elList.length)return;var el=null;for(var i=0;i<elList.length;i++){if(elList[i].parentNode===this.$el){el=elList[i];break;}}if(!el)return;var pendantMap={suffix:'append',prefix:'prepend'};var pendant=pendantMap[place];if(this.$slots[pendant]){el.style.transform='translateX('+(place==='suffix'?'-':'')+this.$el.querySelector('.el-input-group__'+pendant).offsetWidth+'px)';}else{el.removeAttribute('style');}},updateIconOffset:function updateIconOffset(){this.calcIconOffset('prefix');this.calcIconOffset('suffix');},clear:function clear(){this.$emit('input','');this.$emit('change','');this.$emit('clear');},handlePasswordVisible:function handlePasswordVisible(){this.passwordVisible=!this.passwordVisible;this.focus();},getInput:function getInput(){return this.$refs.input||this.$refs.textarea;},getSuffixVisible:function getSuffixVisible(){return this.$slots.suffix||this.suffixIcon||this.showClear||this.showPassword||this.isWordLimitVisible||this.validateState&&this.needStatusIcon;}},created:function created(){this.$on('inputSelect',this.select);},mounted:function mounted(){this.setNativeInputValue();this.resizeTextarea();this.updateIconOffset();},updated:function updated(){this.$nextTick(this.updateIconOffset);}};// CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=script&lang=js&
/* harmony default export */var src_inputvue_type_script_lang_js_=inputvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/input/src/input.vue
/* normalize component */var input_component=normalizeComponent(src_inputvue_type_script_lang_js_,inputvue_type_template_id_343dd774_render,inputvue_type_template_id_343dd774_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var input_api; }input_component.options.__file="packages/input/src/input.vue";/* harmony default export */var src_input=input_component.exports;// CONCATENATED MODULE: ./packages/input/index.js
/* istanbul ignore next */src_input.install=function(Vue){Vue.component(src_input.name,src_input);};/* harmony default export */var packages_input=src_input;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/input-number/src/input-number.vue?vue&type=template&id=42f8cf66&
var input_numbervue_type_template_id_42f8cf66_render=function input_numbervue_type_template_id_42f8cf66_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{class:["el-input-number",_vm.inputNumberSize?"el-input-number--"+_vm.inputNumberSize:"",{"is-disabled":_vm.inputNumberDisabled},{"is-without-controls":!_vm.controls},{"is-controls-right":_vm.controlsAtRight}],on:{dragstart:function dragstart($event){$event.preventDefault();}}},[_vm.controls?_c("span",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:_vm.decrease,expression:"decrease"}],staticClass:"el-input-number__decrease",class:{"is-disabled":_vm.minDisabled},attrs:{role:"button"},on:{keydown:function keydown($event){if(!("button"in $event)&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){return null;}return _vm.decrease($event);}}},[_c("i",{class:"el-icon-"+(_vm.controlsAtRight?"arrow-down":"minus")})]):_vm._e(),_vm.controls?_c("span",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:_vm.increase,expression:"increase"}],staticClass:"el-input-number__increase",class:{"is-disabled":_vm.maxDisabled},attrs:{role:"button"},on:{keydown:function keydown($event){if(!("button"in $event)&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){return null;}return _vm.increase($event);}}},[_c("i",{class:"el-icon-"+(_vm.controlsAtRight?"arrow-up":"plus")})]):_vm._e(),_c("el-input",{ref:"input",attrs:{value:_vm.displayValue,placeholder:_vm.placeholder,disabled:_vm.inputNumberDisabled,size:_vm.inputNumberSize,max:_vm.max,min:_vm.min,name:_vm.name,label:_vm.label},on:{blur:_vm.handleBlur,focus:_vm.handleFocus,input:_vm.handleInput,change:_vm.handleInputChange},nativeOn:{keydown:[function($event){if(!("button"in $event)&&_vm._k($event.keyCode,"up",38,$event.key,["Up","ArrowUp"])){return null;}$event.preventDefault();return _vm.increase($event);},function($event){if(!("button"in $event)&&_vm._k($event.keyCode,"down",40,$event.key,["Down","ArrowDown"])){return null;}$event.preventDefault();return _vm.decrease($event);}]}})],1);};var input_numbervue_type_template_id_42f8cf66_staticRenderFns=[];input_numbervue_type_template_id_42f8cf66_render._withStripped=true;// CONCATENATED MODULE: ./packages/input-number/src/input-number.vue?vue&type=template&id=42f8cf66&
// CONCATENATED MODULE: ./src/directives/repeat-click.js
/* harmony default export */var repeat_click={bind:function bind(el,binding,vnode){var interval=null;var startTime=void 0;var handler=function handler(){return vnode.context[binding.expression].apply();};var clear=function clear(){if(Date.now()-startTime<100){handler();}clearInterval(interval);interval=null;};Object(dom_["on"])(el,'mousedown',function(e){if(e.button!==0)return;startTime=Date.now();Object(dom_["once"])(document,'mouseup',clear);clearInterval(interval);interval=setInterval(handler,100);});}};// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/input-number/src/input-number.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var input_numbervue_type_script_lang_js_={name:'ElInputNumber',mixins:[focus_default()('input')],inject:{elForm:{default:''},elFormItem:{default:''}},directives:{repeatClick:repeat_click},components:{ElInput:input_default.a},props:{step:{type:Number,default:1},stepStrictly:{type:Boolean,default:false},max:{type:Number,default:Infinity},min:{type:Number,default:-Infinity},value:{},disabled:Boolean,size:String,controls:{type:Boolean,default:true},controlsPosition:{type:String,default:''},name:String,label:String,placeholder:String,precision:{type:Number,validator:function validator(val){return val>=0&&val===parseInt(val,10);}}},data:function data(){return{currentValue:0,userInput:null};},watch:{value:{immediate:true,handler:function handler(value){var newVal=value===undefined?value:Number(value);if(newVal!==undefined){if(isNaN(newVal)){return;}if(this.stepStrictly){var stepPrecision=this.getPrecision(this.step);var precisionFactor=Math.pow(10,stepPrecision);newVal=Math.round(newVal/this.step)*precisionFactor*this.step/precisionFactor;}if(this.precision!==undefined){newVal=this.toPrecision(newVal,this.precision);}}if(newVal>=this.max)newVal=this.max;if(newVal<=this.min)newVal=this.min;this.currentValue=newVal;this.userInput=null;this.$emit('input',newVal);}}},computed:{minDisabled:function minDisabled(){return this._decrease(this.value,this.step)<this.min;},maxDisabled:function maxDisabled(){return this._increase(this.value,this.step)>this.max;},numPrecision:function numPrecision(){var value=this.value,step=this.step,getPrecision=this.getPrecision,precision=this.precision;var stepPrecision=getPrecision(step);if(precision!==undefined){if(stepPrecision>precision){console.warn('[Element Warn][InputNumber]precision should not be less than the decimal places of step');}return precision;}else{return Math.max(getPrecision(value),stepPrecision);}},controlsAtRight:function controlsAtRight(){return this.controls&&this.controlsPosition==='right';},_elFormItemSize:function _elFormItemSize(){return(this.elFormItem||{}).elFormItemSize;},inputNumberSize:function inputNumberSize(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size;},inputNumberDisabled:function inputNumberDisabled(){return this.disabled||!!(this.elForm||{}).disabled;},displayValue:function displayValue(){if(this.userInput!==null){return this.userInput;}var currentValue=this.currentValue;if(typeof currentValue==='number'){if(this.stepStrictly){var stepPrecision=this.getPrecision(this.step);var precisionFactor=Math.pow(10,stepPrecision);currentValue=Math.round(currentValue/this.step)*precisionFactor*this.step/precisionFactor;}if(this.precision!==undefined){currentValue=currentValue.toFixed(this.precision);}}return currentValue;}},methods:{toPrecision:function toPrecision(num,precision){if(precision===undefined)precision=this.numPrecision;return parseFloat(Math.round(num*Math.pow(10,precision))/Math.pow(10,precision));},getPrecision:function getPrecision(value){if(value===undefined)return 0;var valueString=value.toString();var dotPosition=valueString.indexOf('.');var precision=0;if(dotPosition!==-1){precision=valueString.length-dotPosition-1;}return precision;},_increase:function _increase(val,step){if(typeof val!=='number'&&val!==undefined)return this.currentValue;var precisionFactor=Math.pow(10,this.numPrecision);// Solve the accuracy problem of JS decimal calculation by converting the value to integer.
return this.toPrecision((precisionFactor*val+precisionFactor*step)/precisionFactor);},_decrease:function _decrease(val,step){if(typeof val!=='number'&&val!==undefined)return this.currentValue;var precisionFactor=Math.pow(10,this.numPrecision);return this.toPrecision((precisionFactor*val-precisionFactor*step)/precisionFactor);},increase:function increase(){if(this.inputNumberDisabled||this.maxDisabled)return;var value=this.value||0;var newVal=this._increase(value,this.step);this.setCurrentValue(newVal);},decrease:function decrease(){if(this.inputNumberDisabled||this.minDisabled)return;var value=this.value||0;var newVal=this._decrease(value,this.step);this.setCurrentValue(newVal);},handleBlur:function handleBlur(event){this.$emit('blur',event);},handleFocus:function handleFocus(event){this.$emit('focus',event);},setCurrentValue:function setCurrentValue(newVal){var oldVal=this.currentValue;if(typeof newVal==='number'&&this.precision!==undefined){newVal=this.toPrecision(newVal,this.precision);}if(newVal>=this.max)newVal=this.max;if(newVal<=this.min)newVal=this.min;if(oldVal===newVal)return;this.userInput=null;this.$emit('input',newVal);this.$emit('change',newVal,oldVal);this.currentValue=newVal;},handleInput:function handleInput(value){this.userInput=value;},handleInputChange:function handleInputChange(value){var newVal=value===''?undefined:Number(value);if(!isNaN(newVal)||value===''){this.setCurrentValue(newVal);}this.userInput=null;},select:function select(){this.$refs.input.select();}},mounted:function mounted(){var innerInput=this.$refs.input.$refs.input;innerInput.setAttribute('role','spinbutton');innerInput.setAttribute('aria-valuemax',this.max);innerInput.setAttribute('aria-valuemin',this.min);innerInput.setAttribute('aria-valuenow',this.currentValue);innerInput.setAttribute('aria-disabled',this.inputNumberDisabled);},updated:function updated(){if(!this.$refs||!this.$refs.input)return;var innerInput=this.$refs.input.$refs.input;innerInput.setAttribute('aria-valuenow',this.currentValue);}};// CONCATENATED MODULE: ./packages/input-number/src/input-number.vue?vue&type=script&lang=js&
/* harmony default export */var src_input_numbervue_type_script_lang_js_=input_numbervue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/input-number/src/input-number.vue
/* normalize component */var input_number_component=normalizeComponent(src_input_numbervue_type_script_lang_js_,input_numbervue_type_template_id_42f8cf66_render,input_numbervue_type_template_id_42f8cf66_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var input_number_api; }input_number_component.options.__file="packages/input-number/src/input-number.vue";/* harmony default export */var input_number=input_number_component.exports;// CONCATENATED MODULE: ./packages/input-number/index.js
/* istanbul ignore next */input_number.install=function(Vue){Vue.component(input_number.name,input_number);};/* harmony default export */var packages_input_number=input_number;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio.vue?vue&type=template&id=69cd6268&
var radiovue_type_template_id_69cd6268_render=function radiovue_type_template_id_69cd6268_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("label",{staticClass:"el-radio",class:[_vm.border&&_vm.radioSize?"el-radio--"+_vm.radioSize:"",{"is-disabled":_vm.isDisabled},{"is-focus":_vm.focus},{"is-bordered":_vm.border},{"is-checked":_vm.model===_vm.label}],attrs:{role:"radio","aria-checked":_vm.model===_vm.label,"aria-disabled":_vm.isDisabled,tabindex:_vm.tabIndex},on:{keydown:function keydown($event){if(!("button"in $event)&&_vm._k($event.keyCode,"space",32,$event.key,[" ","Spacebar"])){return null;}$event.stopPropagation();$event.preventDefault();_vm.model=_vm.isDisabled?_vm.model:_vm.label;}}},[_c("span",{staticClass:"el-radio__input",class:{"is-disabled":_vm.isDisabled,"is-checked":_vm.model===_vm.label}},[_c("span",{staticClass:"el-radio__inner"}),_c("input",{directives:[{name:"model",rawName:"v-model",value:_vm.model,expression:"model"}],ref:"radio",staticClass:"el-radio__original",attrs:{type:"radio","aria-hidden":"true",name:_vm.name,disabled:_vm.isDisabled,tabindex:"-1"},domProps:{value:_vm.label,checked:_vm._q(_vm.model,_vm.label)},on:{focus:function focus($event){_vm.focus=true;},blur:function blur($event){_vm.focus=false;},change:[function($event){_vm.model=_vm.label;},_vm.handleChange]}})]),_c("span",{staticClass:"el-radio__label",on:{keydown:function keydown($event){$event.stopPropagation();}}},[_vm._t("default"),!_vm.$slots.default?[_vm._v(_vm._s(_vm.label))]:_vm._e()],2)]);};var radiovue_type_template_id_69cd6268_staticRenderFns=[];radiovue_type_template_id_69cd6268_render._withStripped=true;// CONCATENATED MODULE: ./packages/radio/src/radio.vue?vue&type=template&id=69cd6268&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var radiovue_type_script_lang_js_={name:'ElRadio',mixins:[emitter_default.a],inject:{elForm:{default:''},elFormItem:{default:''}},componentName:'ElRadio',props:{value:{},label:{},disabled:Boolean,name:String,border:Boolean,size:String},data:function data(){return{focus:false};},computed:{isGroup:function isGroup(){var parent=this.$parent;while(parent){if(parent.$options.componentName!=='ElRadioGroup'){parent=parent.$parent;}else{this._radioGroup=parent;return true;}}return false;},model:{get:function get(){return this.isGroup?this._radioGroup.value:this.value;},set:function set(val){if(this.isGroup){this.dispatch('ElRadioGroup','input',[val]);}else{this.$emit('input',val);}this.$refs.radio&&(this.$refs.radio.checked=this.model===this.label);}},_elFormItemSize:function _elFormItemSize(){return(this.elFormItem||{}).elFormItemSize;},radioSize:function radioSize(){var temRadioSize=this.size||this._elFormItemSize||(this.$ELEMENT||{}).size;return this.isGroup?this._radioGroup.radioGroupSize||temRadioSize:temRadioSize;},isDisabled:function isDisabled(){return this.isGroup?this._radioGroup.disabled||this.disabled||(this.elForm||{}).disabled:this.disabled||(this.elForm||{}).disabled;},tabIndex:function tabIndex(){return this.isDisabled||this.isGroup&&this.model!==this.label?-1:0;}},methods:{handleChange:function handleChange(){var _this=this;this.$nextTick(function(){_this.$emit('change',_this.model);_this.isGroup&&_this.dispatch('ElRadioGroup','handleChange',_this.model);});}}};// CONCATENATED MODULE: ./packages/radio/src/radio.vue?vue&type=script&lang=js&
/* harmony default export */var src_radiovue_type_script_lang_js_=radiovue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/radio/src/radio.vue
/* normalize component */var radio_component=normalizeComponent(src_radiovue_type_script_lang_js_,radiovue_type_template_id_69cd6268_render,radiovue_type_template_id_69cd6268_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var radio_api; }radio_component.options.__file="packages/radio/src/radio.vue";/* harmony default export */var src_radio=radio_component.exports;// CONCATENATED MODULE: ./packages/radio/index.js
/* istanbul ignore next */src_radio.install=function(Vue){Vue.component(src_radio.name,src_radio);};/* harmony default export */var packages_radio=src_radio;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio-group.vue?vue&type=template&id=818a704c&
var radio_groupvue_type_template_id_818a704c_render=function radio_groupvue_type_template_id_818a704c_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c(_vm._elTag,{tag:"component",staticClass:"el-radio-group",attrs:{role:"radiogroup"},on:{keydown:_vm.handleKeydown}},[_vm._t("default")],2);};var radio_groupvue_type_template_id_818a704c_staticRenderFns=[];radio_groupvue_type_template_id_818a704c_render._withStripped=true;// CONCATENATED MODULE: ./packages/radio/src/radio-group.vue?vue&type=template&id=818a704c&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio-group.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
var keyCode=Object.freeze({LEFT:37,UP:38,RIGHT:39,DOWN:40});/* harmony default export */var radio_groupvue_type_script_lang_js_={name:'ElRadioGroup',componentName:'ElRadioGroup',inject:{elFormItem:{default:''}},mixins:[emitter_default.a],props:{value:{},size:String,fill:String,textColor:String,disabled:Boolean},computed:{_elFormItemSize:function _elFormItemSize(){return(this.elFormItem||{}).elFormItemSize;},_elTag:function _elTag(){return(this.$vnode.data||{}).tag||'div';},radioGroupSize:function radioGroupSize(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size;}},created:function created(){var _this=this;this.$on('handleChange',function(value){_this.$emit('change',value);});},mounted:function mounted(){// 当radioGroup没有默认选项时，第一个可以选中Tab导航
var radios=this.$el.querySelectorAll('[type=radio]');var firstLabel=this.$el.querySelectorAll('[role=radio]')[0];if(![].some.call(radios,function(radio){return radio.checked;})&&firstLabel){firstLabel.tabIndex=0;}},methods:{handleKeydown:function handleKeydown(e){// 左右上下按键 可以在radio组内切换不同选项
var target=e.target;var className=target.nodeName==='INPUT'?'[type=radio]':'[role=radio]';var radios=this.$el.querySelectorAll(className);var length=radios.length;var index=[].indexOf.call(radios,target);var roleRadios=this.$el.querySelectorAll('[role=radio]');switch(e.keyCode){case keyCode.LEFT:case keyCode.UP:e.stopPropagation();e.preventDefault();if(index===0){roleRadios[length-1].click();roleRadios[length-1].focus();}else{roleRadios[index-1].click();roleRadios[index-1].focus();}break;case keyCode.RIGHT:case keyCode.DOWN:if(index===length-1){e.stopPropagation();e.preventDefault();roleRadios[0].click();roleRadios[0].focus();}else{roleRadios[index+1].click();roleRadios[index+1].focus();}break;default:break;}}},watch:{value:function value(_value){this.dispatch('ElFormItem','el.form.change',[this.value]);}}};// CONCATENATED MODULE: ./packages/radio/src/radio-group.vue?vue&type=script&lang=js&
/* harmony default export */var src_radio_groupvue_type_script_lang_js_=radio_groupvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/radio/src/radio-group.vue
/* normalize component */var radio_group_component=normalizeComponent(src_radio_groupvue_type_script_lang_js_,radio_groupvue_type_template_id_818a704c_render,radio_groupvue_type_template_id_818a704c_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var radio_group_api; }radio_group_component.options.__file="packages/radio/src/radio-group.vue";/* harmony default export */var radio_group=radio_group_component.exports;// CONCATENATED MODULE: ./packages/radio-group/index.js
/* istanbul ignore next */radio_group.install=function(Vue){Vue.component(radio_group.name,radio_group);};/* harmony default export */var packages_radio_group=radio_group;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio-button.vue?vue&type=template&id=18a77a32&
var radio_buttonvue_type_template_id_18a77a32_render=function radio_buttonvue_type_template_id_18a77a32_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("label",{staticClass:"el-radio-button",class:[_vm.size?"el-radio-button--"+_vm.size:"",{"is-active":_vm.value===_vm.label},{"is-disabled":_vm.isDisabled},{"is-focus":_vm.focus}],attrs:{role:"radio","aria-checked":_vm.value===_vm.label,"aria-disabled":_vm.isDisabled,tabindex:_vm.tabIndex},on:{keydown:function keydown($event){if(!("button"in $event)&&_vm._k($event.keyCode,"space",32,$event.key,[" ","Spacebar"])){return null;}$event.stopPropagation();$event.preventDefault();_vm.value=_vm.isDisabled?_vm.value:_vm.label;}}},[_c("input",{directives:[{name:"model",rawName:"v-model",value:_vm.value,expression:"value"}],staticClass:"el-radio-button__orig-radio",attrs:{type:"radio",name:_vm.name,disabled:_vm.isDisabled,tabindex:"-1"},domProps:{value:_vm.label,checked:_vm._q(_vm.value,_vm.label)},on:{change:[function($event){_vm.value=_vm.label;},_vm.handleChange],focus:function focus($event){_vm.focus=true;},blur:function blur($event){_vm.focus=false;}}}),_c("span",{staticClass:"el-radio-button__inner",style:_vm.value===_vm.label?_vm.activeStyle:null,on:{keydown:function keydown($event){$event.stopPropagation();}}},[_vm._t("default"),!_vm.$slots.default?[_vm._v(_vm._s(_vm.label))]:_vm._e()],2)]);};var radio_buttonvue_type_template_id_18a77a32_staticRenderFns=[];radio_buttonvue_type_template_id_18a77a32_render._withStripped=true;// CONCATENATED MODULE: ./packages/radio/src/radio-button.vue?vue&type=template&id=18a77a32&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio-button.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var radio_buttonvue_type_script_lang_js_={name:'ElRadioButton',mixins:[emitter_default.a],inject:{elForm:{default:''},elFormItem:{default:''}},props:{label:{},disabled:Boolean,name:String},data:function data(){return{focus:false};},computed:{value:{get:function get(){return this._radioGroup.value;},set:function set(value){this._radioGroup.$emit('input',value);}},_radioGroup:function _radioGroup(){var parent=this.$parent;while(parent){if(parent.$options.componentName!=='ElRadioGroup'){parent=parent.$parent;}else{return parent;}}return false;},activeStyle:function activeStyle(){return{backgroundColor:this._radioGroup.fill||'',borderColor:this._radioGroup.fill||'',boxShadow:this._radioGroup.fill?'-1px 0 0 0 '+this._radioGroup.fill:'',color:this._radioGroup.textColor||''};},_elFormItemSize:function _elFormItemSize(){return(this.elFormItem||{}).elFormItemSize;},size:function size(){return this._radioGroup.radioGroupSize||this._elFormItemSize||(this.$ELEMENT||{}).size;},isDisabled:function isDisabled(){return this.disabled||this._radioGroup.disabled||(this.elForm||{}).disabled;},tabIndex:function tabIndex(){return this.isDisabled||this._radioGroup&&this.value!==this.label?-1:0;}},methods:{handleChange:function handleChange(){var _this=this;this.$nextTick(function(){_this.dispatch('ElRadioGroup','handleChange',_this.value);});}}};// CONCATENATED MODULE: ./packages/radio/src/radio-button.vue?vue&type=script&lang=js&
/* harmony default export */var src_radio_buttonvue_type_script_lang_js_=radio_buttonvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/radio/src/radio-button.vue
/* normalize component */var radio_button_component=normalizeComponent(src_radio_buttonvue_type_script_lang_js_,radio_buttonvue_type_template_id_18a77a32_render,radio_buttonvue_type_template_id_18a77a32_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var radio_button_api; }radio_button_component.options.__file="packages/radio/src/radio-button.vue";/* harmony default export */var radio_button=radio_button_component.exports;// CONCATENATED MODULE: ./packages/radio-button/index.js
/* istanbul ignore next */radio_button.install=function(Vue){Vue.component(radio_button.name,radio_button);};/* harmony default export */var packages_radio_button=radio_button;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox.vue?vue&type=template&id=d0387074&
var checkboxvue_type_template_id_d0387074_render=function checkboxvue_type_template_id_d0387074_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("label",{staticClass:"el-checkbox",class:[_vm.border&&_vm.checkboxSize?"el-checkbox--"+_vm.checkboxSize:"",{"is-disabled":_vm.isDisabled},{"is-bordered":_vm.border},{"is-checked":_vm.isChecked}],attrs:{id:_vm.id}},[_c("span",{staticClass:"el-checkbox__input",class:{"is-disabled":_vm.isDisabled,"is-checked":_vm.isChecked,"is-indeterminate":_vm.indeterminate,"is-focus":_vm.focus},attrs:{tabindex:_vm.indeterminate?0:false,role:_vm.indeterminate?"checkbox":false,"aria-checked":_vm.indeterminate?"mixed":false}},[_c("span",{staticClass:"el-checkbox__inner"}),_vm.trueLabel||_vm.falseLabel?_c("input",{directives:[{name:"model",rawName:"v-model",value:_vm.model,expression:"model"}],staticClass:"el-checkbox__original",attrs:{type:"checkbox","aria-hidden":_vm.indeterminate?"true":"false",name:_vm.name,disabled:_vm.isDisabled,"true-value":_vm.trueLabel,"false-value":_vm.falseLabel},domProps:{checked:Array.isArray(_vm.model)?_vm._i(_vm.model,null)>-1:_vm._q(_vm.model,_vm.trueLabel)},on:{change:[function($event){var $$a=_vm.model,$$el=$event.target,$$c=$$el.checked?_vm.trueLabel:_vm.falseLabel;if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.model=$$a.concat([$$v]));}else{$$i>-1&&(_vm.model=$$a.slice(0,$$i).concat($$a.slice($$i+1)));}}else{_vm.model=$$c;}},_vm.handleChange],focus:function focus($event){_vm.focus=true;},blur:function blur($event){_vm.focus=false;}}}):_c("input",{directives:[{name:"model",rawName:"v-model",value:_vm.model,expression:"model"}],staticClass:"el-checkbox__original",attrs:{type:"checkbox","aria-hidden":_vm.indeterminate?"true":"false",disabled:_vm.isDisabled,name:_vm.name},domProps:{value:_vm.label,checked:Array.isArray(_vm.model)?_vm._i(_vm.model,_vm.label)>-1:_vm.model},on:{change:[function($event){var $$a=_vm.model,$$el=$event.target,$$c=$$el.checked?true:false;if(Array.isArray($$a)){var $$v=_vm.label,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.model=$$a.concat([$$v]));}else{$$i>-1&&(_vm.model=$$a.slice(0,$$i).concat($$a.slice($$i+1)));}}else{_vm.model=$$c;}},_vm.handleChange],focus:function focus($event){_vm.focus=true;},blur:function blur($event){_vm.focus=false;}}})]),_vm.$slots.default||_vm.label?_c("span",{staticClass:"el-checkbox__label"},[_vm._t("default"),!_vm.$slots.default?[_vm._v(_vm._s(_vm.label))]:_vm._e()],2):_vm._e()]);};var checkboxvue_type_template_id_d0387074_staticRenderFns=[];checkboxvue_type_template_id_d0387074_render._withStripped=true;// CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue?vue&type=template&id=d0387074&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var checkboxvue_type_script_lang_js_={name:'ElCheckbox',mixins:[emitter_default.a],inject:{elForm:{default:''},elFormItem:{default:''}},componentName:'ElCheckbox',data:function data(){return{selfModel:false,focus:false,isLimitExceeded:false};},computed:{model:{get:function get(){return this.isGroup?this.store:this.value!==undefined?this.value:this.selfModel;},set:function set(val){if(this.isGroup){this.isLimitExceeded=false;this._checkboxGroup.min!==undefined&&val.length<this._checkboxGroup.min&&(this.isLimitExceeded=true);this._checkboxGroup.max!==undefined&&val.length>this._checkboxGroup.max&&(this.isLimitExceeded=true);this.isLimitExceeded===false&&this.dispatch('ElCheckboxGroup','input',[val]);}else{this.$emit('input',val);this.selfModel=val;}}},isChecked:function isChecked(){if({}.toString.call(this.model)==='[object Boolean]'){return this.model;}else if(Array.isArray(this.model)){return this.model.indexOf(this.label)>-1;}else if(this.model!==null&&this.model!==undefined){return this.model===this.trueLabel;}},isGroup:function isGroup(){var parent=this.$parent;while(parent){if(parent.$options.componentName!=='ElCheckboxGroup'){parent=parent.$parent;}else{this._checkboxGroup=parent;return true;}}return false;},store:function store(){return this._checkboxGroup?this._checkboxGroup.value:this.value;},/* used to make the isDisabled judgment under max/min props */isLimitDisabled:function isLimitDisabled(){var _checkboxGroup=this._checkboxGroup,max=_checkboxGroup.max,min=_checkboxGroup.min;return!!(max||min)&&this.model.length>=max&&!this.isChecked||this.model.length<=min&&this.isChecked;},isDisabled:function isDisabled(){return this.isGroup?this._checkboxGroup.disabled||this.disabled||(this.elForm||{}).disabled||this.isLimitDisabled:this.disabled||(this.elForm||{}).disabled;},_elFormItemSize:function _elFormItemSize(){return(this.elFormItem||{}).elFormItemSize;},checkboxSize:function checkboxSize(){var temCheckboxSize=this.size||this._elFormItemSize||(this.$ELEMENT||{}).size;return this.isGroup?this._checkboxGroup.checkboxGroupSize||temCheckboxSize:temCheckboxSize;}},props:{value:{},label:{},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:String,trueLabel:[String,Number],falseLabel:[String,Number],id:String,/* 当indeterminate为真时，为controls提供相关连的checkbox的id，表明元素间的控制关系*/controls:String,/* 当indeterminate为真时，为controls提供相关连的checkbox的id，表明元素间的控制关系*/border:Boolean,size:String},methods:{addToStore:function addToStore(){if(Array.isArray(this.model)&&this.model.indexOf(this.label)===-1){this.model.push(this.label);}else{this.model=this.trueLabel||true;}},handleChange:function handleChange(ev){var _this=this;if(this.isLimitExceeded)return;var value=void 0;if(ev.target.checked){value=this.trueLabel===undefined?true:this.trueLabel;}else{value=this.falseLabel===undefined?false:this.falseLabel;}this.$emit('change',value,ev);this.$nextTick(function(){if(_this.isGroup){_this.dispatch('ElCheckboxGroup','change',[_this._checkboxGroup.value]);}});}},created:function created(){this.checked&&this.addToStore();},mounted:function mounted(){// 为indeterminate元素 添加aria-controls 属性
if(this.indeterminate){this.$el.setAttribute('aria-controls',this.controls);}},watch:{value:function value(_value){this.dispatch('ElFormItem','el.form.change',_value);}}};// CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue?vue&type=script&lang=js&
/* harmony default export */var src_checkboxvue_type_script_lang_js_=checkboxvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue
/* normalize component */var checkbox_component=normalizeComponent(src_checkboxvue_type_script_lang_js_,checkboxvue_type_template_id_d0387074_render,checkboxvue_type_template_id_d0387074_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var checkbox_api; }checkbox_component.options.__file="packages/checkbox/src/checkbox.vue";/* harmony default export */var src_checkbox=checkbox_component.exports;// CONCATENATED MODULE: ./packages/checkbox/index.js
/* istanbul ignore next */src_checkbox.install=function(Vue){Vue.component(src_checkbox.name,src_checkbox);};/* harmony default export */var packages_checkbox=src_checkbox;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox-button.vue?vue&type=template&id=478e906e&
var checkbox_buttonvue_type_template_id_478e906e_render=function checkbox_buttonvue_type_template_id_478e906e_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("label",{staticClass:"el-checkbox-button",class:[_vm.size?"el-checkbox-button--"+_vm.size:"",{"is-disabled":_vm.isDisabled},{"is-checked":_vm.isChecked},{"is-focus":_vm.focus}],attrs:{role:"checkbox","aria-checked":_vm.isChecked,"aria-disabled":_vm.isDisabled}},[_vm.trueLabel||_vm.falseLabel?_c("input",{directives:[{name:"model",rawName:"v-model",value:_vm.model,expression:"model"}],staticClass:"el-checkbox-button__original",attrs:{type:"checkbox",name:_vm.name,disabled:_vm.isDisabled,"true-value":_vm.trueLabel,"false-value":_vm.falseLabel},domProps:{checked:Array.isArray(_vm.model)?_vm._i(_vm.model,null)>-1:_vm._q(_vm.model,_vm.trueLabel)},on:{change:[function($event){var $$a=_vm.model,$$el=$event.target,$$c=$$el.checked?_vm.trueLabel:_vm.falseLabel;if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.model=$$a.concat([$$v]));}else{$$i>-1&&(_vm.model=$$a.slice(0,$$i).concat($$a.slice($$i+1)));}}else{_vm.model=$$c;}},_vm.handleChange],focus:function focus($event){_vm.focus=true;},blur:function blur($event){_vm.focus=false;}}}):_c("input",{directives:[{name:"model",rawName:"v-model",value:_vm.model,expression:"model"}],staticClass:"el-checkbox-button__original",attrs:{type:"checkbox",name:_vm.name,disabled:_vm.isDisabled},domProps:{value:_vm.label,checked:Array.isArray(_vm.model)?_vm._i(_vm.model,_vm.label)>-1:_vm.model},on:{change:[function($event){var $$a=_vm.model,$$el=$event.target,$$c=$$el.checked?true:false;if(Array.isArray($$a)){var $$v=_vm.label,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.model=$$a.concat([$$v]));}else{$$i>-1&&(_vm.model=$$a.slice(0,$$i).concat($$a.slice($$i+1)));}}else{_vm.model=$$c;}},_vm.handleChange],focus:function focus($event){_vm.focus=true;},blur:function blur($event){_vm.focus=false;}}}),_vm.$slots.default||_vm.label?_c("span",{staticClass:"el-checkbox-button__inner",style:_vm.isChecked?_vm.activeStyle:null},[_vm._t("default",[_vm._v(_vm._s(_vm.label))])],2):_vm._e()]);};var checkbox_buttonvue_type_template_id_478e906e_staticRenderFns=[];checkbox_buttonvue_type_template_id_478e906e_render._withStripped=true;// CONCATENATED MODULE: ./packages/checkbox/src/checkbox-button.vue?vue&type=template&id=478e906e&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox-button.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var checkbox_buttonvue_type_script_lang_js_={name:'ElCheckboxButton',mixins:[emitter_default.a],inject:{elForm:{default:''},elFormItem:{default:''}},data:function data(){return{selfModel:false,focus:false,isLimitExceeded:false};},props:{value:{},label:{},disabled:Boolean,checked:Boolean,name:String,trueLabel:[String,Number],falseLabel:[String,Number]},computed:{model:{get:function get(){return this._checkboxGroup?this.store:this.value!==undefined?this.value:this.selfModel;},set:function set(val){if(this._checkboxGroup){this.isLimitExceeded=false;this._checkboxGroup.min!==undefined&&val.length<this._checkboxGroup.min&&(this.isLimitExceeded=true);this._checkboxGroup.max!==undefined&&val.length>this._checkboxGroup.max&&(this.isLimitExceeded=true);this.isLimitExceeded===false&&this.dispatch('ElCheckboxGroup','input',[val]);}else if(this.value!==undefined){this.$emit('input',val);}else{this.selfModel=val;}}},isChecked:function isChecked(){if({}.toString.call(this.model)==='[object Boolean]'){return this.model;}else if(Array.isArray(this.model)){return this.model.indexOf(this.label)>-1;}else if(this.model!==null&&this.model!==undefined){return this.model===this.trueLabel;}},_checkboxGroup:function _checkboxGroup(){var parent=this.$parent;while(parent){if(parent.$options.componentName!=='ElCheckboxGroup'){parent=parent.$parent;}else{return parent;}}return false;},store:function store(){return this._checkboxGroup?this._checkboxGroup.value:this.value;},activeStyle:function activeStyle(){return{backgroundColor:this._checkboxGroup.fill||'',borderColor:this._checkboxGroup.fill||'',color:this._checkboxGroup.textColor||'','box-shadow':'-1px 0 0 0 '+this._checkboxGroup.fill};},_elFormItemSize:function _elFormItemSize(){return(this.elFormItem||{}).elFormItemSize;},size:function size(){return this._checkboxGroup.checkboxGroupSize||this._elFormItemSize||(this.$ELEMENT||{}).size;},/* used to make the isDisabled judgment under max/min props */isLimitDisabled:function isLimitDisabled(){var _checkboxGroup2=this._checkboxGroup,max=_checkboxGroup2.max,min=_checkboxGroup2.min;return!!(max||min)&&this.model.length>=max&&!this.isChecked||this.model.length<=min&&this.isChecked;},isDisabled:function isDisabled(){return this._checkboxGroup?this._checkboxGroup.disabled||this.disabled||(this.elForm||{}).disabled||this.isLimitDisabled:this.disabled||(this.elForm||{}).disabled;}},methods:{addToStore:function addToStore(){if(Array.isArray(this.model)&&this.model.indexOf(this.label)===-1){this.model.push(this.label);}else{this.model=this.trueLabel||true;}},handleChange:function handleChange(ev){var _this=this;if(this.isLimitExceeded)return;var value=void 0;if(ev.target.checked){value=this.trueLabel===undefined?true:this.trueLabel;}else{value=this.falseLabel===undefined?false:this.falseLabel;}this.$emit('change',value,ev);this.$nextTick(function(){if(_this._checkboxGroup){_this.dispatch('ElCheckboxGroup','change',[_this._checkboxGroup.value]);}});}},created:function created(){this.checked&&this.addToStore();}};// CONCATENATED MODULE: ./packages/checkbox/src/checkbox-button.vue?vue&type=script&lang=js&
/* harmony default export */var src_checkbox_buttonvue_type_script_lang_js_=checkbox_buttonvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/checkbox/src/checkbox-button.vue
/* normalize component */var checkbox_button_component=normalizeComponent(src_checkbox_buttonvue_type_script_lang_js_,checkbox_buttonvue_type_template_id_478e906e_render,checkbox_buttonvue_type_template_id_478e906e_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var checkbox_button_api; }checkbox_button_component.options.__file="packages/checkbox/src/checkbox-button.vue";/* harmony default export */var checkbox_button=checkbox_button_component.exports;// CONCATENATED MODULE: ./packages/checkbox-button/index.js
/* istanbul ignore next */checkbox_button.install=function(Vue){Vue.component(checkbox_button.name,checkbox_button);};/* harmony default export */var packages_checkbox_button=checkbox_button;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox-group.vue?vue&type=template&id=7289a290&
var checkbox_groupvue_type_template_id_7289a290_render=function checkbox_groupvue_type_template_id_7289a290_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-checkbox-group",attrs:{role:"group","aria-label":"checkbox-group"}},[_vm._t("default")],2);};var checkbox_groupvue_type_template_id_7289a290_staticRenderFns=[];checkbox_groupvue_type_template_id_7289a290_render._withStripped=true;// CONCATENATED MODULE: ./packages/checkbox/src/checkbox-group.vue?vue&type=template&id=7289a290&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox-group.vue?vue&type=script&lang=js&
/* harmony default export */var checkbox_groupvue_type_script_lang_js_={name:'ElCheckboxGroup',componentName:'ElCheckboxGroup',mixins:[emitter_default.a],inject:{elFormItem:{default:''}},props:{value:{},disabled:Boolean,min:Number,max:Number,size:String,fill:String,textColor:String},computed:{_elFormItemSize:function _elFormItemSize(){return(this.elFormItem||{}).elFormItemSize;},checkboxGroupSize:function checkboxGroupSize(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size;}},watch:{value:function value(_value){this.dispatch('ElFormItem','el.form.change',[_value]);}}};// CONCATENATED MODULE: ./packages/checkbox/src/checkbox-group.vue?vue&type=script&lang=js&
/* harmony default export */var src_checkbox_groupvue_type_script_lang_js_=checkbox_groupvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/checkbox/src/checkbox-group.vue
/* normalize component */var checkbox_group_component=normalizeComponent(src_checkbox_groupvue_type_script_lang_js_,checkbox_groupvue_type_template_id_7289a290_render,checkbox_groupvue_type_template_id_7289a290_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var checkbox_group_api; }checkbox_group_component.options.__file="packages/checkbox/src/checkbox-group.vue";/* harmony default export */var checkbox_group=checkbox_group_component.exports;// CONCATENATED MODULE: ./packages/checkbox-group/index.js
/* istanbul ignore next */checkbox_group.install=function(Vue){Vue.component(checkbox_group.name,checkbox_group);};/* harmony default export */var packages_checkbox_group=checkbox_group;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/switch/src/component.vue?vue&type=template&id=2dcd8fbb&
var componentvue_type_template_id_2dcd8fbb_render=function componentvue_type_template_id_2dcd8fbb_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-switch",class:{"is-disabled":_vm.switchDisabled,"is-checked":_vm.checked},attrs:{role:"switch","aria-checked":_vm.checked,"aria-disabled":_vm.switchDisabled},on:{click:function click($event){$event.preventDefault();return _vm.switchValue($event);}}},[_c("input",{ref:"input",staticClass:"el-switch__input",attrs:{type:"checkbox",id:_vm.id,name:_vm.name,"true-value":_vm.activeValue,"false-value":_vm.inactiveValue,disabled:_vm.switchDisabled},on:{change:_vm.handleChange,keydown:function keydown($event){if(!("button"in $event)&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){return null;}return _vm.switchValue($event);}}}),_vm.inactiveIconClass||_vm.inactiveText?_c("span",{class:["el-switch__label","el-switch__label--left",!_vm.checked?"is-active":""]},[_vm.inactiveIconClass?_c("i",{class:[_vm.inactiveIconClass]}):_vm._e(),!_vm.inactiveIconClass&&_vm.inactiveText?_c("span",{attrs:{"aria-hidden":_vm.checked}},[_vm._v(_vm._s(_vm.inactiveText))]):_vm._e()]):_vm._e(),_c("span",{ref:"core",staticClass:"el-switch__core",style:{width:_vm.coreWidth+"px"}}),_vm.activeIconClass||_vm.activeText?_c("span",{class:["el-switch__label","el-switch__label--right",_vm.checked?"is-active":""]},[_vm.activeIconClass?_c("i",{class:[_vm.activeIconClass]}):_vm._e(),!_vm.activeIconClass&&_vm.activeText?_c("span",{attrs:{"aria-hidden":!_vm.checked}},[_vm._v(_vm._s(_vm.activeText))]):_vm._e()]):_vm._e()]);};var componentvue_type_template_id_2dcd8fbb_staticRenderFns=[];componentvue_type_template_id_2dcd8fbb_render._withStripped=true;// CONCATENATED MODULE: ./packages/switch/src/component.vue?vue&type=template&id=2dcd8fbb&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/switch/src/component.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var switch_src_componentvue_type_script_lang_js_={name:'ElSwitch',mixins:[focus_default()('input'),migrating_default.a,emitter_default.a],inject:{elForm:{default:''}},props:{value:{type:[Boolean,String,Number],default:false},disabled:{type:Boolean,default:false},width:{type:Number,default:40},activeIconClass:{type:String,default:''},inactiveIconClass:{type:String,default:''},activeText:String,inactiveText:String,activeColor:{type:String,default:''},inactiveColor:{type:String,default:''},activeValue:{type:[Boolean,String,Number],default:true},inactiveValue:{type:[Boolean,String,Number],default:false},name:{type:String,default:''},validateEvent:{type:Boolean,default:true},id:String},data:function data(){return{coreWidth:this.width};},created:function created(){if(!~[this.activeValue,this.inactiveValue].indexOf(this.value)){this.$emit('input',this.inactiveValue);}},computed:{checked:function checked(){return this.value===this.activeValue;},switchDisabled:function switchDisabled(){return this.disabled||(this.elForm||{}).disabled;}},watch:{checked:function checked(){this.$refs.input.checked=this.checked;if(this.activeColor||this.inactiveColor){this.setBackgroundColor();}if(this.validateEvent){this.dispatch('ElFormItem','el.form.change',[this.value]);}}},methods:{handleChange:function handleChange(event){var _this=this;var val=this.checked?this.inactiveValue:this.activeValue;this.$emit('input',val);this.$emit('change',val);this.$nextTick(function(){// set input's checked property
// in case parent refuses to change component's value
_this.$refs.input.checked=_this.checked;});},setBackgroundColor:function setBackgroundColor(){var newColor=this.checked?this.activeColor:this.inactiveColor;this.$refs.core.style.borderColor=newColor;this.$refs.core.style.backgroundColor=newColor;},switchValue:function switchValue(){!this.switchDisabled&&this.handleChange();},getMigratingConfig:function getMigratingConfig(){return{props:{'on-color':'on-color is renamed to active-color.','off-color':'off-color is renamed to inactive-color.','on-text':'on-text is renamed to active-text.','off-text':'off-text is renamed to inactive-text.','on-value':'on-value is renamed to active-value.','off-value':'off-value is renamed to inactive-value.','on-icon-class':'on-icon-class is renamed to active-icon-class.','off-icon-class':'off-icon-class is renamed to inactive-icon-class.'}};}},mounted:function mounted(){/* istanbul ignore if */this.coreWidth=this.width||40;if(this.activeColor||this.inactiveColor){this.setBackgroundColor();}this.$refs.input.checked=this.checked;}};// CONCATENATED MODULE: ./packages/switch/src/component.vue?vue&type=script&lang=js&
/* harmony default export */var packages_switch_src_componentvue_type_script_lang_js_=switch_src_componentvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/switch/src/component.vue
/* normalize component */var src_component_component=normalizeComponent(packages_switch_src_componentvue_type_script_lang_js_,componentvue_type_template_id_2dcd8fbb_render,componentvue_type_template_id_2dcd8fbb_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var src_component_api; }src_component_component.options.__file="packages/switch/src/component.vue";/* harmony default export */var switch_src_component=src_component_component.exports;// CONCATENATED MODULE: ./packages/switch/index.js
/* istanbul ignore next */switch_src_component.install=function(Vue){Vue.component(switch_src_component.name,switch_src_component);};/* harmony default export */var packages_switch=switch_src_component;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select.vue?vue&type=template&id=0e4aade6&
var selectvue_type_template_id_0e4aade6_render=function selectvue_type_template_id_0e4aade6_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:_vm.handleClose,expression:"handleClose"}],staticClass:"el-select",class:[_vm.selectSize?"el-select--"+_vm.selectSize:""],on:{click:function click($event){$event.stopPropagation();return _vm.toggleMenu($event);}}},[_vm.multiple?_c("div",{ref:"tags",staticClass:"el-select__tags",style:{"max-width":_vm.inputWidth-32+"px",width:"100%"}},[_vm.collapseTags&&_vm.selected.length?_c("span",[_c("el-tag",{attrs:{closable:!_vm.selectDisabled,size:_vm.collapseTagSize,hit:_vm.selected[0].hitState,type:"info","disable-transitions":""},on:{close:function close($event){_vm.deleteTag($event,_vm.selected[0]);}}},[_c("span",{staticClass:"el-select__tags-text"},[_vm._v(_vm._s(_vm.selected[0].currentLabel))])]),_vm.selected.length>1?_c("el-tag",{attrs:{closable:false,size:_vm.collapseTagSize,type:"info","disable-transitions":""}},[_c("span",{staticClass:"el-select__tags-text"},[_vm._v("+ "+_vm._s(_vm.selected.length-1))])]):_vm._e()],1):_vm._e(),!_vm.collapseTags?_c("transition-group",{on:{"after-leave":_vm.resetInputHeight}},_vm._l(_vm.selected,function(item){return _c("el-tag",{key:_vm.getValueKey(item),attrs:{closable:!_vm.selectDisabled,size:_vm.collapseTagSize,hit:item.hitState,type:"info","disable-transitions":""},on:{close:function close($event){_vm.deleteTag($event,item);}}},[_c("span",{staticClass:"el-select__tags-text"},[_vm._v(_vm._s(item.currentLabel))])]);}),1):_vm._e(),_vm.filterable?_c("input",{directives:[{name:"model",rawName:"v-model",value:_vm.query,expression:"query"}],ref:"input",staticClass:"el-select__input",class:[_vm.selectSize?"is-"+_vm.selectSize:""],style:{"flex-grow":"1",width:_vm.inputLength/(_vm.inputWidth-32)+"%","max-width":_vm.inputWidth-42+"px"},attrs:{type:"text",disabled:_vm.selectDisabled,autocomplete:_vm.autoComplete||_vm.autocomplete},domProps:{value:_vm.query},on:{focus:_vm.handleFocus,blur:function blur($event){_vm.softFocus=false;},keyup:_vm.managePlaceholder,keydown:[_vm.resetInputState,function($event){if(!("button"in $event)&&_vm._k($event.keyCode,"down",40,$event.key,["Down","ArrowDown"])){return null;}$event.preventDefault();_vm.navigateOptions("next");},function($event){if(!("button"in $event)&&_vm._k($event.keyCode,"up",38,$event.key,["Up","ArrowUp"])){return null;}$event.preventDefault();_vm.navigateOptions("prev");},function($event){if(!("button"in $event)&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){return null;}$event.preventDefault();return _vm.selectOption($event);},function($event){if(!("button"in $event)&&_vm._k($event.keyCode,"esc",27,$event.key,["Esc","Escape"])){return null;}$event.stopPropagation();$event.preventDefault();_vm.visible=false;},function($event){if(!("button"in $event)&&_vm._k($event.keyCode,"delete",[8,46],$event.key,["Backspace","Delete","Del"])){return null;}return _vm.deletePrevTag($event);},function($event){if(!("button"in $event)&&_vm._k($event.keyCode,"tab",9,$event.key,"Tab")){return null;}_vm.visible=false;}],compositionstart:_vm.handleComposition,compositionupdate:_vm.handleComposition,compositionend:_vm.handleComposition,input:[function($event){if($event.target.composing){return;}_vm.query=$event.target.value;},_vm.debouncedQueryChange]}}):_vm._e()],1):_vm._e(),_c("el-input",{ref:"reference",class:{"is-focus":_vm.visible},attrs:{type:"text",placeholder:_vm.currentPlaceholder,name:_vm.name,id:_vm.id,autocomplete:_vm.autoComplete||_vm.autocomplete,size:_vm.selectSize,disabled:_vm.selectDisabled,readonly:_vm.readonly,"validate-event":false,tabindex:_vm.multiple&&_vm.filterable?"-1":null},on:{focus:_vm.handleFocus,blur:_vm.handleBlur},nativeOn:{keyup:function keyup($event){return _vm.debouncedOnInputChange($event);},keydown:[function($event){if(!("button"in $event)&&_vm._k($event.keyCode,"down",40,$event.key,["Down","ArrowDown"])){return null;}$event.stopPropagation();$event.preventDefault();_vm.navigateOptions("next");},function($event){if(!("button"in $event)&&_vm._k($event.keyCode,"up",38,$event.key,["Up","ArrowUp"])){return null;}$event.stopPropagation();$event.preventDefault();_vm.navigateOptions("prev");},function($event){if(!("button"in $event)&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){return null;}$event.preventDefault();return _vm.selectOption($event);},function($event){if(!("button"in $event)&&_vm._k($event.keyCode,"esc",27,$event.key,["Esc","Escape"])){return null;}$event.stopPropagation();$event.preventDefault();_vm.visible=false;},function($event){if(!("button"in $event)&&_vm._k($event.keyCode,"tab",9,$event.key,"Tab")){return null;}_vm.visible=false;}],paste:function paste($event){return _vm.debouncedOnInputChange($event);},mouseenter:function mouseenter($event){_vm.inputHovering=true;},mouseleave:function mouseleave($event){_vm.inputHovering=false;}},model:{value:_vm.selectedLabel,callback:function callback($$v){_vm.selectedLabel=$$v;},expression:"selectedLabel"}},[_vm.$slots.prefix?_c("template",{slot:"prefix"},[_vm._t("prefix")],2):_vm._e(),_c("template",{slot:"suffix"},[_c("i",{directives:[{name:"show",rawName:"v-show",value:!_vm.showClose,expression:"!showClose"}],class:["el-select__caret","el-input__icon","el-icon-"+_vm.iconClass]}),_vm.showClose?_c("i",{staticClass:"el-select__caret el-input__icon el-icon-circle-close",on:{click:_vm.handleClearClick}}):_vm._e()])],2),_c("transition",{attrs:{name:"el-zoom-in-top"},on:{"before-enter":_vm.handleMenuEnter,"after-leave":_vm.doDestroy}},[_c("el-select-menu",{directives:[{name:"show",rawName:"v-show",value:_vm.visible&&_vm.emptyText!==false,expression:"visible && emptyText !== false"}],ref:"popper",attrs:{"append-to-body":_vm.popperAppendToBody}},[_c("el-scrollbar",{directives:[{name:"show",rawName:"v-show",value:_vm.options.length>0&&!_vm.loading,expression:"options.length > 0 && !loading"}],ref:"scrollbar",class:{"is-empty":!_vm.allowCreate&&_vm.query&&_vm.filteredOptionsCount===0},attrs:{tag:"ul","wrap-class":"el-select-dropdown__wrap","view-class":"el-select-dropdown__list"}},[_vm.showNewOption?_c("el-option",{attrs:{value:_vm.query,created:""}}):_vm._e(),_vm._t("default")],2),_vm.emptyText&&(!_vm.allowCreate||_vm.loading||_vm.allowCreate&&_vm.options.length===0)?[_vm.$slots.empty?_vm._t("empty"):_c("p",{staticClass:"el-select-dropdown__empty"},[_vm._v("\n          "+_vm._s(_vm.emptyText)+"\n        ")])]:_vm._e()],2)],1)],1);};var selectvue_type_template_id_0e4aade6_staticRenderFns=[];selectvue_type_template_id_0e4aade6_render._withStripped=true;// CONCATENATED MODULE: ./packages/select/src/select.vue?vue&type=template&id=0e4aade6&
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select-dropdown.vue?vue&type=template&id=06828748&
var select_dropdownvue_type_template_id_06828748_render=function select_dropdownvue_type_template_id_06828748_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-select-dropdown el-popper",class:[{"is-multiple":_vm.$parent.multiple},_vm.popperClass],style:{minWidth:_vm.minWidth}},[_vm._t("default")],2);};var select_dropdownvue_type_template_id_06828748_staticRenderFns=[];select_dropdownvue_type_template_id_06828748_render._withStripped=true;// CONCATENATED MODULE: ./packages/select/src/select-dropdown.vue?vue&type=template&id=06828748&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select-dropdown.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
/* harmony default export */var select_dropdownvue_type_script_lang_js_={name:'ElSelectDropdown',componentName:'ElSelectDropdown',mixins:[vue_popper_default.a],props:{placement:{default:'bottom-start'},boundariesPadding:{default:0},popperOptions:{default:function _default(){return{gpuAcceleration:false};}},visibleArrow:{default:true},appendToBody:{type:Boolean,default:true}},data:function data(){return{minWidth:''};},computed:{popperClass:function popperClass(){return this.$parent.popperClass;}},watch:{'$parent.inputWidth':function $parentInputWidth(){this.minWidth=this.$parent.$el.getBoundingClientRect().width+'px';}},mounted:function mounted(){var _this=this;this.referenceElm=this.$parent.$refs.reference.$el;this.$parent.popperElm=this.popperElm=this.$el;this.$on('updatePopper',function(){if(_this.$parent.visible)_this.updatePopper();});this.$on('destroyPopper',this.destroyPopper);}};// CONCATENATED MODULE: ./packages/select/src/select-dropdown.vue?vue&type=script&lang=js&
/* harmony default export */var src_select_dropdownvue_type_script_lang_js_=select_dropdownvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/select/src/select-dropdown.vue
/* normalize component */var select_dropdown_component=normalizeComponent(src_select_dropdownvue_type_script_lang_js_,select_dropdownvue_type_template_id_06828748_render,select_dropdownvue_type_template_id_06828748_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var select_dropdown_api; }select_dropdown_component.options.__file="packages/select/src/select-dropdown.vue";/* harmony default export */var select_dropdown=select_dropdown_component.exports;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option.vue?vue&type=template&id=7a44c642&
var optionvue_type_template_id_7a44c642_render=function optionvue_type_template_id_7a44c642_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("li",{directives:[{name:"show",rawName:"v-show",value:_vm.visible,expression:"visible"}],staticClass:"el-select-dropdown__item",class:{selected:_vm.itemSelected,"is-disabled":_vm.disabled||_vm.groupDisabled||_vm.limitReached,hover:_vm.hover},on:{mouseenter:_vm.hoverItem,click:function click($event){$event.stopPropagation();return _vm.selectOptionClick($event);}}},[_vm._t("default",[_c("span",[_vm._v(_vm._s(_vm.currentLabel))])])],2);};var optionvue_type_template_id_7a44c642_staticRenderFns=[];optionvue_type_template_id_7a44c642_render._withStripped=true;// CONCATENATED MODULE: ./packages/select/src/option.vue?vue&type=template&id=7a44c642&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option.vue?vue&type=script&lang=js&
var _typeof=typeof Symbol==="function"&&_typeof2(Symbol.iterator)==="symbol"?function(obj){return _typeof2(obj);}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":_typeof2(obj);};//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var optionvue_type_script_lang_js_={mixins:[emitter_default.a],name:'ElOption',componentName:'ElOption',inject:['select'],props:{value:{required:true},label:[String,Number],created:Boolean,disabled:{type:Boolean,default:false}},data:function data(){return{index:-1,groupDisabled:false,visible:true,hitState:false,hover:false};},computed:{isObject:function isObject(){return Object.prototype.toString.call(this.value).toLowerCase()==='[object object]';},currentLabel:function currentLabel(){return this.label||(this.isObject?'':this.value);},currentValue:function currentValue(){return this.value||this.label||'';},itemSelected:function itemSelected(){if(!this.select.multiple){return this.isEqual(this.value,this.select.value);}else{return this.contains(this.select.value,this.value);}},limitReached:function limitReached(){if(this.select.multiple){return!this.itemSelected&&(this.select.value||[]).length>=this.select.multipleLimit&&this.select.multipleLimit>0;}else{return false;}}},watch:{currentLabel:function currentLabel(){if(!this.created&&!this.select.remote)this.dispatch('ElSelect','setSelected');},value:function value(val,oldVal){var _select=this.select,remote=_select.remote,valueKey=_select.valueKey;if(!this.created&&!remote){if(valueKey&&(typeof val==='undefined'?'undefined':_typeof(val))==='object'&&(typeof oldVal==='undefined'?'undefined':_typeof(oldVal))==='object'&&val[valueKey]===oldVal[valueKey]){return;}this.dispatch('ElSelect','setSelected');}}},methods:{isEqual:function isEqual(a,b){if(!this.isObject){return a===b;}else{var valueKey=this.select.valueKey;return Object(util_["getValueByPath"])(a,valueKey)===Object(util_["getValueByPath"])(b,valueKey);}},contains:function contains(){var arr=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];var target=arguments[1];if(!this.isObject){return arr&&arr.indexOf(target)>-1;}else{var valueKey=this.select.valueKey;return arr&&arr.some(function(item){return Object(util_["getValueByPath"])(item,valueKey)===Object(util_["getValueByPath"])(target,valueKey);});}},handleGroupDisabled:function handleGroupDisabled(val){this.groupDisabled=val;},hoverItem:function hoverItem(){if(!this.disabled&&!this.groupDisabled){this.select.hoverIndex=this.select.options.indexOf(this);}},selectOptionClick:function selectOptionClick(){if(this.disabled!==true&&this.groupDisabled!==true){this.dispatch('ElSelect','handleOptionClick',[this,true]);}},queryChange:function queryChange(query){this.visible=new RegExp(Object(util_["escapeRegexpString"])(query),'i').test(this.currentLabel)||this.created;if(!this.visible){this.select.filteredOptionsCount--;}}},created:function created(){this.select.options.push(this);this.select.cachedOptions.push(this);this.select.optionsCount++;this.select.filteredOptionsCount++;this.$on('queryChange',this.queryChange);this.$on('handleGroupDisabled',this.handleGroupDisabled);},beforeDestroy:function beforeDestroy(){var _select2=this.select,selected=_select2.selected,multiple=_select2.multiple;var selectedOptions=multiple?selected:[selected];var index=this.select.cachedOptions.indexOf(this);var selectedIndex=selectedOptions.indexOf(this);// if option is not selected, remove it from cache
if(index>-1&&selectedIndex<0){this.select.cachedOptions.splice(index,1);}this.select.onOptionDestroy(this.select.options.indexOf(this));}};// CONCATENATED MODULE: ./packages/select/src/option.vue?vue&type=script&lang=js&
/* harmony default export */var src_optionvue_type_script_lang_js_=optionvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/select/src/option.vue
/* normalize component */var option_component=normalizeComponent(src_optionvue_type_script_lang_js_,optionvue_type_template_id_7a44c642_render,optionvue_type_template_id_7a44c642_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var option_api; }option_component.options.__file="packages/select/src/option.vue";/* harmony default export */var src_option=option_component.exports;// EXTERNAL MODULE: external "element-ui/lib/tag"
var tag_=__webpack_require__(30);var tag_default=/*#__PURE__*/__webpack_require__.n(tag_);// EXTERNAL MODULE: external "element-ui/lib/utils/resize-event"
var resize_event_=__webpack_require__(13);// EXTERNAL MODULE: external "element-ui/lib/locale"
var lib_locale_=__webpack_require__(11);var lib_locale_default=/*#__PURE__*/__webpack_require__.n(lib_locale_);// EXTERNAL MODULE: external "element-ui/lib/utils/scroll-into-view"
var scroll_into_view_=__webpack_require__(27);var scroll_into_view_default=/*#__PURE__*/__webpack_require__.n(scroll_into_view_);// CONCATENATED MODULE: ./packages/select/src/navigation-mixin.js
/* harmony default export */var navigation_mixin={data:function data(){return{hoverOption:-1};},computed:{optionsAllDisabled:function optionsAllDisabled(){return this.options.filter(function(option){return option.visible;}).every(function(option){return option.disabled;});}},watch:{hoverIndex:function hoverIndex(val){var _this=this;if(typeof val==='number'&&val>-1){this.hoverOption=this.options[val]||{};}this.options.forEach(function(option){option.hover=_this.hoverOption===option;});}},methods:{navigateOptions:function navigateOptions(direction){var _this2=this;if(!this.visible){this.visible=true;return;}if(this.options.length===0||this.filteredOptionsCount===0)return;if(!this.optionsAllDisabled){if(direction==='next'){this.hoverIndex++;if(this.hoverIndex===this.options.length){this.hoverIndex=0;}}else if(direction==='prev'){this.hoverIndex--;if(this.hoverIndex<0){this.hoverIndex=this.options.length-1;}}var option=this.options[this.hoverIndex];if(option.disabled===true||option.groupDisabled===true||!option.visible){this.navigateOptions(direction);}this.$nextTick(function(){return _this2.scrollToOption(_this2.hoverOption);});}}}};// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var selectvue_type_script_lang_js_={mixins:[emitter_default.a,locale_default.a,focus_default()('reference'),navigation_mixin],name:'ElSelect',componentName:'ElSelect',inject:{elForm:{default:''},elFormItem:{default:''}},provide:function provide(){return{'select':this};},computed:{_elFormItemSize:function _elFormItemSize(){return(this.elFormItem||{}).elFormItemSize;},readonly:function readonly(){return!this.filterable||this.multiple||!Object(util_["isIE"])()&&!Object(util_["isEdge"])()&&!this.visible;},showClose:function showClose(){var hasValue=this.multiple?Array.isArray(this.value)&&this.value.length>0:this.value!==undefined&&this.value!==null&&this.value!=='';var criteria=this.clearable&&!this.selectDisabled&&this.inputHovering&&hasValue;return criteria;},iconClass:function iconClass(){return this.remote&&this.filterable?'':this.visible?'arrow-up is-reverse':'arrow-up';},debounce:function debounce(){return this.remote?300:0;},emptyText:function emptyText(){if(this.loading){return this.loadingText||this.t('el.select.loading');}else{if(this.remote&&this.query===''&&this.options.length===0)return false;if(this.filterable&&this.query&&this.options.length>0&&this.filteredOptionsCount===0){return this.noMatchText||this.t('el.select.noMatch');}if(this.options.length===0){return this.noDataText||this.t('el.select.noData');}}return null;},showNewOption:function showNewOption(){var _this=this;var hasExistingOption=this.options.filter(function(option){return!option.created;}).some(function(option){return option.currentLabel===_this.query;});return this.filterable&&this.allowCreate&&this.query!==''&&!hasExistingOption;},selectSize:function selectSize(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size;},selectDisabled:function selectDisabled(){return this.disabled||(this.elForm||{}).disabled;},collapseTagSize:function collapseTagSize(){return['small','mini'].indexOf(this.selectSize)>-1?'mini':'small';}},components:{ElInput:input_default.a,ElSelectMenu:select_dropdown,ElOption:src_option,ElTag:tag_default.a,ElScrollbar:scrollbar_default.a},directives:{Clickoutside:clickoutside_default.a},props:{name:String,id:String,value:{required:true},autocomplete:{type:String,default:'off'},/** @Deprecated in next major version */autoComplete:{type:String,validator:function validator(val){ false&&false;return true;}},automaticDropdown:Boolean,size:String,disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:String,remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String,default:function _default(){return Object(lib_locale_["t"])('el.select.placeholder');}},defaultFirstOption:Boolean,reserveKeyword:Boolean,valueKey:{type:String,default:'value'},collapseTags:Boolean,popperAppendToBody:{type:Boolean,default:true}},data:function data(){return{options:[],cachedOptions:[],createdLabel:null,createdSelected:false,selected:this.multiple?[]:{},inputLength:20,inputWidth:0,initialInputHeight:0,cachedPlaceHolder:'',optionsCount:0,filteredOptionsCount:0,visible:false,softFocus:false,selectedLabel:'',hoverIndex:-1,query:'',previousQuery:null,inputHovering:false,currentPlaceholder:'',menuVisibleOnFocus:false,isOnComposition:false,isSilentBlur:false};},watch:{selectDisabled:function selectDisabled(){var _this2=this;this.$nextTick(function(){_this2.resetInputHeight();});},placeholder:function placeholder(val){this.cachedPlaceHolder=this.currentPlaceholder=val;},value:function value(val,oldVal){if(this.multiple){this.resetInputHeight();if(val&&val.length>0||this.$refs.input&&this.query!==''){this.currentPlaceholder='';}else{this.currentPlaceholder=this.cachedPlaceHolder;}if(this.filterable&&!this.reserveKeyword){this.query='';this.handleQueryChange(this.query);}}this.setSelected();if(this.filterable&&!this.multiple){this.inputLength=20;}if(!Object(util_["valueEquals"])(val,oldVal)){this.dispatch('ElFormItem','el.form.change',val);}},visible:function visible(val){var _this3=this;if(!val){this.broadcast('ElSelectDropdown','destroyPopper');if(this.$refs.input){this.$refs.input.blur();}this.query='';this.previousQuery=null;this.selectedLabel='';this.inputLength=20;this.menuVisibleOnFocus=false;this.resetHoverIndex();this.$nextTick(function(){if(_this3.$refs.input&&_this3.$refs.input.value===''&&_this3.selected.length===0){_this3.currentPlaceholder=_this3.cachedPlaceHolder;}});if(!this.multiple){if(this.selected){if(this.filterable&&this.allowCreate&&this.createdSelected&&this.createdLabel){this.selectedLabel=this.createdLabel;}else{this.selectedLabel=this.selected.currentLabel;}if(this.filterable)this.query=this.selectedLabel;}if(this.filterable){this.currentPlaceholder=this.cachedPlaceHolder;}}}else{this.broadcast('ElSelectDropdown','updatePopper');if(this.filterable){this.query=this.remote?'':this.selectedLabel;this.handleQueryChange(this.query);if(this.multiple){this.$refs.input.focus();}else{if(!this.remote){this.broadcast('ElOption','queryChange','');this.broadcast('ElOptionGroup','queryChange');}if(this.selectedLabel){this.currentPlaceholder=this.selectedLabel;this.selectedLabel='';}}}}this.$emit('visible-change',val);},options:function options(){var _this4=this;if(this.$isServer)return;this.$nextTick(function(){_this4.broadcast('ElSelectDropdown','updatePopper');});if(this.multiple){this.resetInputHeight();}var inputs=this.$el.querySelectorAll('input');if([].indexOf.call(inputs,document.activeElement)===-1){this.setSelected();}if(this.defaultFirstOption&&(this.filterable||this.remote)&&this.filteredOptionsCount){this.checkDefaultFirstOption();}}},methods:{handleComposition:function handleComposition(event){var _this5=this;var text=event.target.value;if(event.type==='compositionend'){this.isOnComposition=false;this.$nextTick(function(_){return _this5.handleQueryChange(text);});}else{var lastCharacter=text[text.length-1]||'';this.isOnComposition=!Object(shared_["isKorean"])(lastCharacter);}},handleQueryChange:function handleQueryChange(val){var _this6=this;if(this.previousQuery===val||this.isOnComposition)return;if(this.previousQuery===null&&(typeof this.filterMethod==='function'||typeof this.remoteMethod==='function')){this.previousQuery=val;return;}this.previousQuery=val;this.$nextTick(function(){if(_this6.visible)_this6.broadcast('ElSelectDropdown','updatePopper');});this.hoverIndex=-1;if(this.multiple&&this.filterable){this.$nextTick(function(){var length=_this6.$refs.input.value.length*15+20;_this6.inputLength=_this6.collapseTags?Math.min(50,length):length;_this6.managePlaceholder();_this6.resetInputHeight();});}if(this.remote&&typeof this.remoteMethod==='function'){this.hoverIndex=-1;this.remoteMethod(val);}else if(typeof this.filterMethod==='function'){this.filterMethod(val);this.broadcast('ElOptionGroup','queryChange');}else{this.filteredOptionsCount=this.optionsCount;this.broadcast('ElOption','queryChange',val);this.broadcast('ElOptionGroup','queryChange');}if(this.defaultFirstOption&&(this.filterable||this.remote)&&this.filteredOptionsCount){this.checkDefaultFirstOption();}},scrollToOption:function scrollToOption(option){var target=Array.isArray(option)&&option[0]?option[0].$el:option.$el;if(this.$refs.popper&&target){var menu=this.$refs.popper.$el.querySelector('.el-select-dropdown__wrap');scroll_into_view_default()(menu,target);}this.$refs.scrollbar&&this.$refs.scrollbar.handleScroll();},handleMenuEnter:function handleMenuEnter(){var _this7=this;this.$nextTick(function(){return _this7.scrollToOption(_this7.selected);});},emitChange:function emitChange(val){if(!Object(util_["valueEquals"])(this.value,val)){this.$emit('change',val);}},getOption:function getOption(value){var option=void 0;var isObject=Object.prototype.toString.call(value).toLowerCase()==='[object object]';var isNull=Object.prototype.toString.call(value).toLowerCase()==='[object null]';var isUndefined=Object.prototype.toString.call(value).toLowerCase()==='[object undefined]';for(var i=this.cachedOptions.length-1;i>=0;i--){var cachedOption=this.cachedOptions[i];var isEqual=isObject?Object(util_["getValueByPath"])(cachedOption.value,this.valueKey)===Object(util_["getValueByPath"])(value,this.valueKey):cachedOption.value===value;if(isEqual){option=cachedOption;break;}}if(option)return option;var label=!isObject&&!isNull&&!isUndefined?value:'';var newOption={value:value,currentLabel:label};if(this.multiple){newOption.hitState=false;}return newOption;},setSelected:function setSelected(){var _this8=this;if(!this.multiple){var option=this.getOption(this.value);if(option.created){this.createdLabel=option.currentLabel;this.createdSelected=true;}else{this.createdSelected=false;}this.selectedLabel=option.currentLabel;this.selected=option;if(this.filterable)this.query=this.selectedLabel;return;}var result=[];if(Array.isArray(this.value)){this.value.forEach(function(value){result.push(_this8.getOption(value));});}this.selected=result;this.$nextTick(function(){_this8.resetInputHeight();});},handleFocus:function handleFocus(event){if(!this.softFocus){if(this.automaticDropdown||this.filterable){this.visible=true;if(this.filterable){this.menuVisibleOnFocus=true;}}this.$emit('focus',event);}else{this.softFocus=false;}},blur:function blur(){this.visible=false;this.$refs.reference.blur();},handleBlur:function handleBlur(event){var _this9=this;setTimeout(function(){if(_this9.isSilentBlur){_this9.isSilentBlur=false;}else{_this9.$emit('blur',event);}},50);this.softFocus=false;},handleClearClick:function handleClearClick(event){this.deleteSelected(event);},doDestroy:function doDestroy(){this.$refs.popper&&this.$refs.popper.doDestroy();},handleClose:function handleClose(){this.visible=false;},toggleLastOptionHitState:function toggleLastOptionHitState(hit){if(!Array.isArray(this.selected))return;var option=this.selected[this.selected.length-1];if(!option)return;if(hit===true||hit===false){option.hitState=hit;return hit;}option.hitState=!option.hitState;return option.hitState;},deletePrevTag:function deletePrevTag(e){if(e.target.value.length<=0&&!this.toggleLastOptionHitState()){var value=this.value.slice();value.pop();this.$emit('input',value);this.emitChange(value);}},managePlaceholder:function managePlaceholder(){if(this.currentPlaceholder!==''){this.currentPlaceholder=this.$refs.input.value?'':this.cachedPlaceHolder;}},resetInputState:function resetInputState(e){if(e.keyCode!==8)this.toggleLastOptionHitState(false);this.inputLength=this.$refs.input.value.length*15+20;this.resetInputHeight();},resetInputHeight:function resetInputHeight(){var _this10=this;if(this.collapseTags&&!this.filterable)return;this.$nextTick(function(){if(!_this10.$refs.reference)return;var inputChildNodes=_this10.$refs.reference.$el.childNodes;var input=[].filter.call(inputChildNodes,function(item){return item.tagName==='INPUT';})[0];var tags=_this10.$refs.tags;var sizeInMap=_this10.initialInputHeight||40;input.style.height=_this10.selected.length===0?sizeInMap+'px':Math.max(tags?tags.clientHeight+(tags.clientHeight>sizeInMap?6:0):0,sizeInMap)+'px';if(_this10.visible&&_this10.emptyText!==false){_this10.broadcast('ElSelectDropdown','updatePopper');}});},resetHoverIndex:function resetHoverIndex(){var _this11=this;setTimeout(function(){if(!_this11.multiple){_this11.hoverIndex=_this11.options.indexOf(_this11.selected);}else{if(_this11.selected.length>0){_this11.hoverIndex=Math.min.apply(null,_this11.selected.map(function(item){return _this11.options.indexOf(item);}));}else{_this11.hoverIndex=-1;}}},300);},handleOptionSelect:function handleOptionSelect(option,byClick){var _this12=this;if(this.multiple){var value=(this.value||[]).slice();var optionIndex=this.getValueIndex(value,option.value);if(optionIndex>-1){value.splice(optionIndex,1);}else if(this.multipleLimit<=0||value.length<this.multipleLimit){value.push(option.value);}this.$emit('input',value);this.emitChange(value);if(option.created){this.query='';this.handleQueryChange('');this.inputLength=20;}if(this.filterable)this.$refs.input.focus();}else{this.$emit('input',option.value);this.emitChange(option.value);this.visible=false;}this.isSilentBlur=byClick;this.setSoftFocus();if(this.visible)return;this.$nextTick(function(){_this12.scrollToOption(option);});},setSoftFocus:function setSoftFocus(){this.softFocus=true;var input=this.$refs.input||this.$refs.reference;if(input){input.focus();}},getValueIndex:function getValueIndex(){var arr=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];var value=arguments[1];var isObject=Object.prototype.toString.call(value).toLowerCase()==='[object object]';if(!isObject){return arr.indexOf(value);}else{var valueKey=this.valueKey;var index=-1;arr.some(function(item,i){if(Object(util_["getValueByPath"])(item,valueKey)===Object(util_["getValueByPath"])(value,valueKey)){index=i;return true;}return false;});return index;}},toggleMenu:function toggleMenu(){if(!this.selectDisabled){if(this.menuVisibleOnFocus){this.menuVisibleOnFocus=false;}else{this.visible=!this.visible;}if(this.visible){(this.$refs.input||this.$refs.reference).focus();}}},selectOption:function selectOption(){if(!this.visible){this.toggleMenu();}else{if(this.options[this.hoverIndex]){this.handleOptionSelect(this.options[this.hoverIndex]);}}},deleteSelected:function deleteSelected(event){event.stopPropagation();var value=this.multiple?[]:'';this.$emit('input',value);this.emitChange(value);this.visible=false;this.$emit('clear');},deleteTag:function deleteTag(event,tag){var index=this.selected.indexOf(tag);if(index>-1&&!this.selectDisabled){var value=this.value.slice();value.splice(index,1);this.$emit('input',value);this.emitChange(value);this.$emit('remove-tag',tag.value);}event.stopPropagation();},onInputChange:function onInputChange(){if(this.filterable&&this.query!==this.selectedLabel){this.query=this.selectedLabel;this.handleQueryChange(this.query);}},onOptionDestroy:function onOptionDestroy(index){if(index>-1){this.optionsCount--;this.filteredOptionsCount--;this.options.splice(index,1);}},resetInputWidth:function resetInputWidth(){this.inputWidth=this.$refs.reference.$el.getBoundingClientRect().width;},handleResize:function handleResize(){this.resetInputWidth();if(this.multiple)this.resetInputHeight();},checkDefaultFirstOption:function checkDefaultFirstOption(){this.hoverIndex=-1;// highlight the created option
var hasCreated=false;for(var i=this.options.length-1;i>=0;i--){if(this.options[i].created){hasCreated=true;this.hoverIndex=i;break;}}if(hasCreated)return;for(var _i=0;_i!==this.options.length;++_i){var option=this.options[_i];if(this.query){// highlight first options that passes the filter
if(!option.disabled&&!option.groupDisabled&&option.visible){this.hoverIndex=_i;break;}}else{// highlight currently selected option
if(option.itemSelected){this.hoverIndex=_i;break;}}}},getValueKey:function getValueKey(item){if(Object.prototype.toString.call(item.value).toLowerCase()!=='[object object]'){return item.value;}else{return Object(util_["getValueByPath"])(item.value,this.valueKey);}}},created:function created(){var _this13=this;this.cachedPlaceHolder=this.currentPlaceholder=this.placeholder;if(this.multiple&&!Array.isArray(this.value)){this.$emit('input',[]);}if(!this.multiple&&Array.isArray(this.value)){this.$emit('input','');}this.debouncedOnInputChange=debounce_default()(this.debounce,function(){_this13.onInputChange();});this.debouncedQueryChange=debounce_default()(this.debounce,function(e){_this13.handleQueryChange(e.target.value);});this.$on('handleOptionClick',this.handleOptionSelect);this.$on('setSelected',this.setSelected);},mounted:function mounted(){var _this14=this;if(this.multiple&&Array.isArray(this.value)&&this.value.length>0){this.currentPlaceholder='';}Object(resize_event_["addResizeListener"])(this.$el,this.handleResize);var reference=this.$refs.reference;if(reference&&reference.$el){var sizeMap={medium:36,small:32,mini:28};var input=reference.$el.querySelector('input');this.initialInputHeight=input.getBoundingClientRect().height||sizeMap[this.selectSize];}if(this.remote&&this.multiple){this.resetInputHeight();}this.$nextTick(function(){if(reference&&reference.$el){_this14.inputWidth=reference.$el.getBoundingClientRect().width;}});this.setSelected();},beforeDestroy:function beforeDestroy(){if(this.$el&&this.handleResize)Object(resize_event_["removeResizeListener"])(this.$el,this.handleResize);}};// CONCATENATED MODULE: ./packages/select/src/select.vue?vue&type=script&lang=js&
/* harmony default export */var src_selectvue_type_script_lang_js_=selectvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/select/src/select.vue
/* normalize component */var select_component=normalizeComponent(src_selectvue_type_script_lang_js_,selectvue_type_template_id_0e4aade6_render,selectvue_type_template_id_0e4aade6_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var select_api; }select_component.options.__file="packages/select/src/select.vue";/* harmony default export */var src_select=select_component.exports;// CONCATENATED MODULE: ./packages/select/index.js
/* istanbul ignore next */src_select.install=function(Vue){Vue.component(src_select.name,src_select);};/* harmony default export */var packages_select=src_select;// CONCATENATED MODULE: ./packages/option/index.js
/* istanbul ignore next */src_option.install=function(Vue){Vue.component(src_option.name,src_option);};/* harmony default export */var packages_option=src_option;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option-group.vue?vue&type=template&id=6685e5de&
var option_groupvue_type_template_id_6685e5de_render=function option_groupvue_type_template_id_6685e5de_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("ul",{directives:[{name:"show",rawName:"v-show",value:_vm.visible,expression:"visible"}],staticClass:"el-select-group__wrap"},[_c("li",{staticClass:"el-select-group__title"},[_vm._v(_vm._s(_vm.label))]),_c("li",[_c("ul",{staticClass:"el-select-group"},[_vm._t("default")],2)])]);};var option_groupvue_type_template_id_6685e5de_staticRenderFns=[];option_groupvue_type_template_id_6685e5de_render._withStripped=true;// CONCATENATED MODULE: ./packages/select/src/option-group.vue?vue&type=template&id=6685e5de&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option-group.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var option_groupvue_type_script_lang_js_={mixins:[emitter_default.a],name:'ElOptionGroup',componentName:'ElOptionGroup',props:{label:String,disabled:{type:Boolean,default:false}},data:function data(){return{visible:true};},watch:{disabled:function disabled(val){this.broadcast('ElOption','handleGroupDisabled',val);}},methods:{queryChange:function queryChange(){this.visible=this.$children&&Array.isArray(this.$children)&&this.$children.some(function(option){return option.visible===true;});}},created:function created(){this.$on('queryChange',this.queryChange);},mounted:function mounted(){if(this.disabled){this.broadcast('ElOption','handleGroupDisabled',this.disabled);}}};// CONCATENATED MODULE: ./packages/select/src/option-group.vue?vue&type=script&lang=js&
/* harmony default export */var src_option_groupvue_type_script_lang_js_=option_groupvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/select/src/option-group.vue
/* normalize component */var option_group_component=normalizeComponent(src_option_groupvue_type_script_lang_js_,option_groupvue_type_template_id_6685e5de_render,option_groupvue_type_template_id_6685e5de_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var option_group_api; }option_group_component.options.__file="packages/select/src/option-group.vue";/* harmony default export */var option_group=option_group_component.exports;// CONCATENATED MODULE: ./packages/option-group/index.js
/* istanbul ignore next */option_group.install=function(Vue){Vue.component(option_group.name,option_group);};/* harmony default export */var packages_option_group=option_group;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button.vue?vue&type=template&id=ca859fb4&
var buttonvue_type_template_id_ca859fb4_render=function buttonvue_type_template_id_ca859fb4_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("button",{staticClass:"el-button",class:[_vm.type?"el-button--"+_vm.type:"",_vm.buttonSize?"el-button--"+_vm.buttonSize:"",{"is-disabled":_vm.buttonDisabled,"is-loading":_vm.loading,"is-plain":_vm.plain,"is-round":_vm.round,"is-circle":_vm.circle}],attrs:{disabled:_vm.buttonDisabled||_vm.loading,autofocus:_vm.autofocus,type:_vm.nativeType},on:{click:_vm.handleClick}},[_vm.loading?_c("i",{staticClass:"el-icon-loading"}):_vm._e(),_vm.icon&&!_vm.loading?_c("i",{class:_vm.icon}):_vm._e(),_vm.$slots.default?_c("span",[_vm._t("default")],2):_vm._e()]);};var buttonvue_type_template_id_ca859fb4_staticRenderFns=[];buttonvue_type_template_id_ca859fb4_render._withStripped=true;// CONCATENATED MODULE: ./packages/button/src/button.vue?vue&type=template&id=ca859fb4&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var buttonvue_type_script_lang_js_={name:'ElButton',inject:{elForm:{default:''},elFormItem:{default:''}},props:{type:{type:String,default:'default'},size:String,icon:{type:String,default:''},nativeType:{type:String,default:'button'},loading:Boolean,disabled:Boolean,plain:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean},computed:{_elFormItemSize:function _elFormItemSize(){return(this.elFormItem||{}).elFormItemSize;},buttonSize:function buttonSize(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size;},buttonDisabled:function buttonDisabled(){return this.disabled||(this.elForm||{}).disabled;}},methods:{handleClick:function handleClick(evt){this.$emit('click',evt);}}};// CONCATENATED MODULE: ./packages/button/src/button.vue?vue&type=script&lang=js&
/* harmony default export */var src_buttonvue_type_script_lang_js_=buttonvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/button/src/button.vue
/* normalize component */var button_component=normalizeComponent(src_buttonvue_type_script_lang_js_,buttonvue_type_template_id_ca859fb4_render,buttonvue_type_template_id_ca859fb4_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var button_api; }button_component.options.__file="packages/button/src/button.vue";/* harmony default export */var src_button=button_component.exports;// CONCATENATED MODULE: ./packages/button/index.js
/* istanbul ignore next */src_button.install=function(Vue){Vue.component(src_button.name,src_button);};/* harmony default export */var packages_button=src_button;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button-group.vue?vue&type=template&id=3d8661d0&
var button_groupvue_type_template_id_3d8661d0_render=function button_groupvue_type_template_id_3d8661d0_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-button-group"},[_vm._t("default")],2);};var button_groupvue_type_template_id_3d8661d0_staticRenderFns=[];button_groupvue_type_template_id_3d8661d0_render._withStripped=true;// CONCATENATED MODULE: ./packages/button/src/button-group.vue?vue&type=template&id=3d8661d0&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button-group.vue?vue&type=script&lang=js&
//
//
//
//
//
/* harmony default export */var button_groupvue_type_script_lang_js_={name:'ElButtonGroup'};// CONCATENATED MODULE: ./packages/button/src/button-group.vue?vue&type=script&lang=js&
/* harmony default export */var src_button_groupvue_type_script_lang_js_=button_groupvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/button/src/button-group.vue
/* normalize component */var button_group_component=normalizeComponent(src_button_groupvue_type_script_lang_js_,button_groupvue_type_template_id_3d8661d0_render,button_groupvue_type_template_id_3d8661d0_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var button_group_api; }button_group_component.options.__file="packages/button/src/button-group.vue";/* harmony default export */var button_group=button_group_component.exports;// CONCATENATED MODULE: ./packages/button-group/index.js
/* istanbul ignore next */button_group.install=function(Vue){Vue.component(button_group.name,button_group);};/* harmony default export */var packages_button_group=button_group;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/table/src/table.vue?vue&type=template&id=493fe34e&
var tablevue_type_template_id_493fe34e_render=function tablevue_type_template_id_493fe34e_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-table",class:[{"el-table--fit":_vm.fit,"el-table--striped":_vm.stripe,"el-table--border":_vm.border||_vm.isGroup,"el-table--hidden":_vm.isHidden,"el-table--group":_vm.isGroup,"el-table--fluid-height":_vm.maxHeight,"el-table--scrollable-x":_vm.layout.scrollX,"el-table--scrollable-y":_vm.layout.scrollY,"el-table--enable-row-hover":!_vm.store.states.isComplex,"el-table--enable-row-transition":(_vm.store.states.data||[]).length!==0&&(_vm.store.states.data||[]).length<100},_vm.tableSize?"el-table--"+_vm.tableSize:""],on:{mouseleave:function mouseleave($event){_vm.handleMouseLeave($event);}}},[_c("div",{ref:"hiddenColumns",staticClass:"hidden-columns"},[_vm._t("default")],2),_vm.showHeader?_c("div",{directives:[{name:"mousewheel",rawName:"v-mousewheel",value:_vm.handleHeaderFooterMousewheel,expression:"handleHeaderFooterMousewheel"}],ref:"headerWrapper",staticClass:"el-table__header-wrapper"},[_c("table-header",{ref:"tableHeader",style:{width:_vm.layout.bodyWidth?_vm.layout.bodyWidth+"px":""},attrs:{store:_vm.store,border:_vm.border,"default-sort":_vm.defaultSort}})],1):_vm._e(),_c("div",{ref:"bodyWrapper",staticClass:"el-table__body-wrapper",class:[_vm.layout.scrollX?"is-scrolling-"+_vm.scrollPosition:"is-scrolling-none"],style:[_vm.bodyHeight]},[_c("table-body",{style:{width:_vm.bodyWidth},attrs:{context:_vm.context,store:_vm.store,stripe:_vm.stripe,"row-class-name":_vm.rowClassName,"row-style":_vm.rowStyle,highlight:_vm.highlightCurrentRow}}),!_vm.data||_vm.data.length===0?_c("div",{ref:"emptyBlock",staticClass:"el-table__empty-block",style:_vm.emptyBlockStyle},[_c("span",{staticClass:"el-table__empty-text"},[_vm._t("empty",[_vm._v(_vm._s(_vm.emptyText||_vm.t("el.table.emptyText")))])],2)]):_vm._e(),_vm.$slots.append?_c("div",{ref:"appendWrapper",staticClass:"el-table__append-wrapper"},[_vm._t("append")],2):_vm._e()],1),_vm.showSummary?_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.data&&_vm.data.length>0,expression:"data && data.length > 0"},{name:"mousewheel",rawName:"v-mousewheel",value:_vm.handleHeaderFooterMousewheel,expression:"handleHeaderFooterMousewheel"}],ref:"footerWrapper",staticClass:"el-table__footer-wrapper"},[_c("table-footer",{style:{width:_vm.layout.bodyWidth?_vm.layout.bodyWidth+"px":""},attrs:{store:_vm.store,border:_vm.border,"sum-text":_vm.sumText||_vm.t("el.table.sumText"),"summary-method":_vm.summaryMethod,"default-sort":_vm.defaultSort}})],1):_vm._e(),_vm.fixedColumns.length>0?_c("div",{directives:[{name:"mousewheel",rawName:"v-mousewheel",value:_vm.handleFixedMousewheel,expression:"handleFixedMousewheel"}],ref:"fixedWrapper",staticClass:"el-table__fixed",style:[{width:_vm.layout.fixedWidth?_vm.layout.fixedWidth+"px":""},_vm.fixedHeight]},[_vm.showHeader?_c("div",{ref:"fixedHeaderWrapper",staticClass:"el-table__fixed-header-wrapper"},[_c("table-header",{ref:"fixedTableHeader",style:{width:_vm.bodyWidth},attrs:{fixed:"left",border:_vm.border,store:_vm.store}})],1):_vm._e(),_c("div",{ref:"fixedBodyWrapper",staticClass:"el-table__fixed-body-wrapper",style:[{top:_vm.layout.headerHeight+"px"},_vm.fixedBodyHeight]},[_c("table-body",{style:{width:_vm.bodyWidth},attrs:{fixed:"left",store:_vm.store,stripe:_vm.stripe,highlight:_vm.highlightCurrentRow,"row-class-name":_vm.rowClassName,"row-style":_vm.rowStyle}}),_vm.$slots.append?_c("div",{staticClass:"el-table__append-gutter",style:{height:_vm.layout.appendHeight+"px"}}):_vm._e()],1),_vm.showSummary?_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.data&&_vm.data.length>0,expression:"data && data.length > 0"}],ref:"fixedFooterWrapper",staticClass:"el-table__fixed-footer-wrapper"},[_c("table-footer",{style:{width:_vm.bodyWidth},attrs:{fixed:"left",border:_vm.border,"sum-text":_vm.sumText||_vm.t("el.table.sumText"),"summary-method":_vm.summaryMethod,store:_vm.store}})],1):_vm._e()]):_vm._e(),_vm.rightFixedColumns.length>0?_c("div",{directives:[{name:"mousewheel",rawName:"v-mousewheel",value:_vm.handleFixedMousewheel,expression:"handleFixedMousewheel"}],ref:"rightFixedWrapper",staticClass:"el-table__fixed-right",style:[{width:_vm.layout.rightFixedWidth?_vm.layout.rightFixedWidth+"px":"",right:_vm.layout.scrollY?(_vm.border?_vm.layout.gutterWidth:_vm.layout.gutterWidth||0)+"px":""},_vm.fixedHeight]},[_vm.showHeader?_c("div",{ref:"rightFixedHeaderWrapper",staticClass:"el-table__fixed-header-wrapper"},[_c("table-header",{ref:"rightFixedTableHeader",style:{width:_vm.bodyWidth},attrs:{fixed:"right",border:_vm.border,store:_vm.store}})],1):_vm._e(),_c("div",{ref:"rightFixedBodyWrapper",staticClass:"el-table__fixed-body-wrapper",style:[{top:_vm.layout.headerHeight+"px"},_vm.fixedBodyHeight]},[_c("table-body",{style:{width:_vm.bodyWidth},attrs:{fixed:"right",store:_vm.store,stripe:_vm.stripe,"row-class-name":_vm.rowClassName,"row-style":_vm.rowStyle,highlight:_vm.highlightCurrentRow}}),_vm.$slots.append?_c("div",{staticClass:"el-table__append-gutter",style:{height:_vm.layout.appendHeight+"px"}}):_vm._e()],1),_vm.showSummary?_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.data&&_vm.data.length>0,expression:"data && data.length > 0"}],ref:"rightFixedFooterWrapper",staticClass:"el-table__fixed-footer-wrapper"},[_c("table-footer",{style:{width:_vm.bodyWidth},attrs:{fixed:"right",border:_vm.border,"sum-text":_vm.sumText||_vm.t("el.table.sumText"),"summary-method":_vm.summaryMethod,store:_vm.store}})],1):_vm._e()]):_vm._e(),_vm.rightFixedColumns.length>0?_c("div",{ref:"rightFixedPatch",staticClass:"el-table__fixed-right-patch",style:{width:_vm.layout.scrollY?_vm.layout.gutterWidth+"px":"0",height:_vm.layout.headerHeight+"px"}}):_vm._e(),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.resizeProxyVisible,expression:"resizeProxyVisible"}],ref:"resizeProxy",staticClass:"el-table__column-resize-proxy"})]);};var tablevue_type_template_id_493fe34e_staticRenderFns=[];tablevue_type_template_id_493fe34e_render._withStripped=true;// CONCATENATED MODULE: ./packages/table/src/table.vue?vue&type=template&id=493fe34e&
// EXTERNAL MODULE: external "element-ui/lib/checkbox"
var checkbox_=__webpack_require__(16);var checkbox_default=/*#__PURE__*/__webpack_require__.n(checkbox_);// EXTERNAL MODULE: external "throttle-debounce"
var external_throttle_debounce_=__webpack_require__(35);// EXTERNAL MODULE: external "normalize-wheel"
var external_normalize_wheel_=__webpack_require__(38);var external_normalize_wheel_default=/*#__PURE__*/__webpack_require__.n(external_normalize_wheel_);// CONCATENATED MODULE: ./src/directives/mousewheel.js
var isFirefox=typeof navigator!=='undefined'&&navigator.userAgent.toLowerCase().indexOf('firefox')>-1;var mousewheel_mousewheel=function mousewheel(element,callback){if(element&&element.addEventListener){element.addEventListener(isFirefox?'DOMMouseScroll':'mousewheel',function(event){var normalized=external_normalize_wheel_default()(event);callback&&callback.apply(this,[event,normalized]);});}};/* harmony default export */var directives_mousewheel={bind:function bind(el,binding){mousewheel_mousewheel(el,binding.value);}};// EXTERNAL MODULE: external "vue"
var external_vue_=__webpack_require__(6);var external_vue_default=/*#__PURE__*/__webpack_require__.n(external_vue_);// CONCATENATED MODULE: ./packages/table/src/util.js
var util_typeof=typeof Symbol==="function"&&_typeof2(Symbol.iterator)==="symbol"?function(obj){return _typeof2(obj);}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":_typeof2(obj);};var getCell=function getCell(event){var cell=event.target;while(cell&&cell.tagName.toUpperCase()!=='HTML'){if(cell.tagName.toUpperCase()==='TD'){return cell;}cell=cell.parentNode;}return null;};var util_isObject=function isObject(obj){return obj!==null&&(typeof obj==='undefined'?'undefined':util_typeof(obj))==='object';};var util_orderBy=function orderBy(array,sortKey,reverse,sortMethod,sortBy){if(!sortKey&&!sortMethod&&(!sortBy||Array.isArray(sortBy)&&!sortBy.length)){return array;}if(typeof reverse==='string'){reverse=reverse==='descending'?-1:1;}else{reverse=reverse&&reverse<0?-1:1;}var getKey=sortMethod?null:function(value,index){if(sortBy){if(!Array.isArray(sortBy)){sortBy=[sortBy];}return sortBy.map(function(by){if(typeof by==='string'){return Object(util_["getValueByPath"])(value,by);}else{return by(value,index,array);}});}if(sortKey!=='$key'){if(util_isObject(value)&&'$value'in value)value=value.$value;}return[util_isObject(value)?Object(util_["getValueByPath"])(value,sortKey):value];};var compare=function compare(a,b){if(sortMethod){return sortMethod(a.value,b.value);}for(var i=0,len=a.key.length;i<len;i++){if(a.key[i]<b.key[i]){return-1;}if(a.key[i]>b.key[i]){return 1;}}return 0;};return array.map(function(value,index){return{value:value,index:index,key:getKey?getKey(value,index):null};}).sort(function(a,b){var order=compare(a,b);if(!order){// make stable https://en.wikipedia.org/wiki/Sorting_algorithm#Stability
order=a.index-b.index;}return order*reverse;}).map(function(item){return item.value;});};var getColumnById=function getColumnById(table,columnId){var column=null;table.columns.forEach(function(item){if(item.id===columnId){column=item;}});return column;};var getColumnByKey=function getColumnByKey(table,columnKey){var column=null;for(var i=0;i<table.columns.length;i++){var item=table.columns[i];if(item.columnKey===columnKey){column=item;break;}}return column;};var getColumnByCell=function getColumnByCell(table,cell){var matches=(cell.className||'').match(/el-table_[^\s]+/gm);if(matches){return getColumnById(table,matches[0]);}return null;};var getRowIdentity=function getRowIdentity(row,rowKey){if(!row)throw new Error('row is required when get row identity');if(typeof rowKey==='string'){if(rowKey.indexOf('.')<0){return row[rowKey];}var key=rowKey.split('.');var current=row;for(var i=0;i<key.length;i++){current=current[key[i]];}return current;}else if(typeof rowKey==='function'){return rowKey.call(null,row);}};var getKeysMap=function getKeysMap(array,rowKey){var arrayMap={};(array||[]).forEach(function(row,index){arrayMap[getRowIdentity(row,rowKey)]={row:row,index:index};});return arrayMap;};function hasOwn(obj,key){return Object.prototype.hasOwnProperty.call(obj,key);}function mergeOptions(defaults,config){var options={};var key=void 0;for(key in defaults){options[key]=defaults[key];}for(key in config){if(hasOwn(config,key)){var value=config[key];if(typeof value!=='undefined'){options[key]=value;}}}return options;}function parseWidth(width){if(width!==undefined){width=parseInt(width,10);if(isNaN(width)){width=null;}}return width;}function parseMinWidth(minWidth){if(typeof minWidth!=='undefined'){minWidth=parseWidth(minWidth);if(isNaN(minWidth)){minWidth=80;}}return minWidth;};function parseHeight(height){if(typeof height==='number'){return height;}if(typeof height==='string'){if(/^\d+(?:px)?$/.test(height)){return parseInt(height,10);}else{return height;}}return null;}// https://github.com/reduxjs/redux/blob/master/src/compose.js
function compose(){for(var _len=arguments.length,funcs=Array(_len),_key=0;_key<_len;_key++){funcs[_key]=arguments[_key];}if(funcs.length===0){return function(arg){return arg;};}if(funcs.length===1){return funcs[0];}return funcs.reduce(function(a,b){return function(){return a(b.apply(undefined,arguments));};});}function toggleRowStatus(statusArr,row,newVal){var changed=false;var index=statusArr.indexOf(row);var included=index!==-1;var addRow=function addRow(){statusArr.push(row);changed=true;};var removeRow=function removeRow(){statusArr.splice(index,1);changed=true;};if(typeof newVal==='boolean'){if(newVal&&!included){addRow();}else if(!newVal&&included){removeRow();}}else{if(included){removeRow();}else{addRow();}}return changed;}function walkTreeNode(root,cb){var childrenKey=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'children';var lazyKey=arguments.length>3&&arguments[3]!==undefined?arguments[3]:'hasChildren';var isNil=function isNil(array){return!(Array.isArray(array)&&array.length);};function _walker(parent,children,level){cb(parent,children,level);children.forEach(function(item){if(item[lazyKey]){cb(item,null,level+1);return;}var children=item[childrenKey];if(!isNil(children)){_walker(item,children,level+1);}});}root.forEach(function(item){if(item[lazyKey]){cb(item,null,0);return;}var children=item[childrenKey];if(!isNil(children)){_walker(item,children,0);}});}// CONCATENATED MODULE: ./packages/table/src/store/expand.js
/* harmony default export */var expand={data:function data(){return{states:{defaultExpandAll:false,expandRows:[]}};},methods:{updateExpandRows:function updateExpandRows(){var _states=this.states,_states$data=_states.data,data=_states$data===undefined?[]:_states$data,rowKey=_states.rowKey,defaultExpandAll=_states.defaultExpandAll,expandRows=_states.expandRows;if(defaultExpandAll){this.states.expandRows=data.slice();}else if(rowKey){// TODO：这里的代码可以优化
var expandRowsMap=getKeysMap(expandRows,rowKey);this.states.expandRows=data.reduce(function(prev,row){var rowId=getRowIdentity(row,rowKey);var rowInfo=expandRowsMap[rowId];if(rowInfo){prev.push(row);}return prev;},[]);}else{this.states.expandRows=[];}},toggleRowExpansion:function toggleRowExpansion(row,expanded){var changed=toggleRowStatus(this.states.expandRows,row,expanded);if(changed){this.table.$emit('expand-change',row,this.states.expandRows.slice());this.scheduleLayout();}},setExpandRowKeys:function setExpandRowKeys(rowKeys){this.assertRowKey();// TODO：这里的代码可以优化
var _states2=this.states,data=_states2.data,rowKey=_states2.rowKey;var keysMap=getKeysMap(data,rowKey);this.states.expandRows=rowKeys.reduce(function(prev,cur){var info=keysMap[cur];if(info){prev.push(info.row);}return prev;},[]);},isRowExpanded:function isRowExpanded(row){var _states3=this.states,_states3$expandRows=_states3.expandRows,expandRows=_states3$expandRows===undefined?[]:_states3$expandRows,rowKey=_states3.rowKey;if(rowKey){var expandMap=getKeysMap(expandRows,rowKey);return!!expandMap[getRowIdentity(row,rowKey)];}return expandRows.indexOf(row)!==-1;}}};// CONCATENATED MODULE: ./packages/table/src/store/current.js
/* harmony default export */var current={data:function data(){return{states:{// 不可响应的，设置 currentRowKey 时，data 不一定存在，也许无法算出正确的 currentRow
// 把该值缓存一下，当用户点击修改 currentRow 时，把该值重置为 null
_currentRowKey:null,currentRow:null}};},methods:{setCurrentRowKey:function setCurrentRowKey(key){this.assertRowKey();this.states._currentRowKey=key;this.setCurrentRowByKey(key);},restoreCurrentRowKey:function restoreCurrentRowKey(){this.states._currentRowKey=null;},setCurrentRowByKey:function setCurrentRowByKey(key){var states=this.states;var _states$data=states.data,data=_states$data===undefined?[]:_states$data,rowKey=states.rowKey;var currentRow=null;if(rowKey){currentRow=Object(util_["arrayFind"])(data,function(item){return getRowIdentity(item,rowKey)===key;});}states.currentRow=currentRow;},updateCurrentRow:function updateCurrentRow(currentRow){var states=this.states,table=this.table;var oldCurrentRow=states.currentRow;if(currentRow&&currentRow!==oldCurrentRow){states.currentRow=currentRow;table.$emit('current-change',currentRow,oldCurrentRow);return;}if(!currentRow&&oldCurrentRow){states.currentRow=null;table.$emit('current-change',null,oldCurrentRow);}},updateCurrentRowData:function updateCurrentRowData(){var states=this.states,table=this.table;var rowKey=states.rowKey,_currentRowKey=states._currentRowKey;// data 为 null 时，解构时的默认值会被忽略
var data=states.data||[];var oldCurrentRow=states.currentRow;// 当 currentRow 不在 data 中时尝试更新数据
if(data.indexOf(oldCurrentRow)===-1&&oldCurrentRow){if(rowKey){var currentRowKey=getRowIdentity(oldCurrentRow,rowKey);this.setCurrentRowByKey(currentRowKey);}else{states.currentRow=null;}if(states.currentRow===null){table.$emit('current-change',null,oldCurrentRow);}}else if(_currentRowKey){// 把初始时下设置的 rowKey 转化成 rowData
this.setCurrentRowByKey(_currentRowKey);this.restoreCurrentRowKey();}}}};// CONCATENATED MODULE: ./packages/table/src/store/tree.js
var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};/* harmony default export */var tree={data:function data(){return{states:{// defaultExpandAll 存在于 expand.js 中，这里不重复添加
// 在展开行中，expandRowKeys 会被转化成 expandRows，expandRowKeys 这个属性只是记录了 TreeTable 行的展开
// TODO: 拆分为独立的 TreeTable，统一用法
expandRowKeys:[],treeData:{},indent:16,lazy:false,lazyTreeNodeMap:{},lazyColumnIdentifier:'hasChildren',childrenColumnName:'children'}};},computed:{// 嵌入型的数据，watch 无法是检测到变化 https://github.com/ElemeFE/element/issues/14998
// TODO: 使用 computed 解决该问题，是否会造成性能问题？
// @return { id: { level, children } }
normalizedData:function normalizedData(){if(!this.states.rowKey)return{};var data=this.states.data||[];return this.normalize(data);},// @return { id: { children } }
// 针对懒加载的情形，不处理嵌套数据
normalizedLazyNode:function normalizedLazyNode(){var _states=this.states,rowKey=_states.rowKey,lazyTreeNodeMap=_states.lazyTreeNodeMap,lazyColumnIdentifier=_states.lazyColumnIdentifier;var keys=Object.keys(lazyTreeNodeMap);var res={};if(!keys.length)return res;keys.forEach(function(key){if(lazyTreeNodeMap[key].length){var item={children:[]};lazyTreeNodeMap[key].forEach(function(row){var currentRowKey=getRowIdentity(row,rowKey);item.children.push(currentRowKey);if(row[lazyColumnIdentifier]&&!res[currentRowKey]){res[currentRowKey]={children:[]};}});res[key]=item;}});return res;}},watch:{normalizedData:'updateTreeData',normalizedLazyNode:'updateTreeData'},methods:{normalize:function normalize(data){var _states2=this.states,childrenColumnName=_states2.childrenColumnName,lazyColumnIdentifier=_states2.lazyColumnIdentifier,rowKey=_states2.rowKey,lazy=_states2.lazy;var res={};walkTreeNode(data,function(parent,children,level){var parentId=getRowIdentity(parent,rowKey);if(Array.isArray(children)){res[parentId]={children:children.map(function(row){return getRowIdentity(row,rowKey);}),level:level};}else if(lazy){// 当 children 不存在且 lazy 为 true，该节点即为懒加载的节点
res[parentId]={children:[],lazy:true,level:level};}},childrenColumnName,lazyColumnIdentifier);return res;},updateTreeData:function updateTreeData(){var nested=this.normalizedData;var normalizedLazyNode=this.normalizedLazyNode;var keys=Object.keys(nested);var newTreeData={};if(keys.length){var _states3=this.states,oldTreeData=_states3.treeData,defaultExpandAll=_states3.defaultExpandAll,expandRowKeys=_states3.expandRowKeys,lazy=_states3.lazy;var rootLazyRowKeys=[];var getExpanded=function getExpanded(oldValue,key){var included=defaultExpandAll||expandRowKeys&&expandRowKeys.indexOf(key)!==-1;return!!(oldValue&&oldValue.expanded||included);};// 合并 expanded 与 display，确保数据刷新后，状态不变
keys.forEach(function(key){var oldValue=oldTreeData[key];var newValue=_extends({},nested[key]);newValue.expanded=getExpanded(oldValue,key);if(newValue.lazy){var _ref=oldValue||{},_ref$loaded=_ref.loaded,loaded=_ref$loaded===undefined?false:_ref$loaded,_ref$loading=_ref.loading,loading=_ref$loading===undefined?false:_ref$loading;newValue.loaded=!!loaded;newValue.loading=!!loading;rootLazyRowKeys.push(key);}newTreeData[key]=newValue;});// 根据懒加载数据更新 treeData
var lazyKeys=Object.keys(normalizedLazyNode);if(lazy&&lazyKeys.length&&rootLazyRowKeys.length){lazyKeys.forEach(function(key){var oldValue=oldTreeData[key];var lazyNodeChildren=normalizedLazyNode[key].children;if(rootLazyRowKeys.indexOf(key)!==-1){// 懒加载的 root 节点，更新一下原有的数据，原来的 children 一定是空数组
if(newTreeData[key].children.length!==0){throw new Error('[ElTable]children must be an empty array.');}newTreeData[key].children=lazyNodeChildren;}else{var _ref2=oldValue||{},_ref2$loaded=_ref2.loaded,loaded=_ref2$loaded===undefined?false:_ref2$loaded,_ref2$loading=_ref2.loading,loading=_ref2$loading===undefined?false:_ref2$loading;newTreeData[key]={lazy:true,loaded:!!loaded,loading:!!loading,expanded:getExpanded(oldValue,key),children:lazyNodeChildren,level:''};}});}}this.states.treeData=newTreeData;this.updateTableScrollY();},updateTreeExpandKeys:function updateTreeExpandKeys(value){this.states.expandRowKeys=value;this.updateTreeData();},toggleTreeExpansion:function toggleTreeExpansion(row,expanded){this.assertRowKey();var _states4=this.states,rowKey=_states4.rowKey,treeData=_states4.treeData;var id=getRowIdentity(row,rowKey);var data=id&&treeData[id];if(id&&data&&'expanded'in data){var oldExpanded=data.expanded;expanded=typeof expanded==='undefined'?!data.expanded:expanded;treeData[id].expanded=expanded;if(oldExpanded!==expanded){this.table.$emit('expand-change',row,expanded);}this.updateTableScrollY();}},loadOrToggle:function loadOrToggle(row){this.assertRowKey();var _states5=this.states,lazy=_states5.lazy,treeData=_states5.treeData,rowKey=_states5.rowKey;var id=getRowIdentity(row,rowKey);var data=treeData[id];if(lazy&&data&&'loaded'in data&&!data.loaded){this.loadData(row,id,data);}else{this.toggleTreeExpansion(row);}},loadData:function loadData(row,key,treeNode){var _this=this;var load=this.table.load;var _states6=this.states,lazyTreeNodeMap=_states6.lazyTreeNodeMap,treeData=_states6.treeData;if(load&&!treeData[key].loaded){treeData[key].loading=true;load(row,treeNode,function(data){if(!Array.isArray(data)){throw new Error('[ElTable] data must be an array');}treeData[key].loading=false;treeData[key].loaded=true;treeData[key].expanded=true;if(data.length){_this.$set(lazyTreeNodeMap,key,data);}_this.table.$emit('expand-change',row,true);});}}}};// CONCATENATED MODULE: ./packages/table/src/store/watcher.js
var watcher_sortData=function sortData(data,states){var sortingColumn=states.sortingColumn;if(!sortingColumn||typeof sortingColumn.sortable==='string'){return data;}return util_orderBy(data,states.sortProp,states.sortOrder,sortingColumn.sortMethod,sortingColumn.sortBy);};var doFlattenColumns=function doFlattenColumns(columns){var result=[];columns.forEach(function(column){if(column.children){result.push.apply(result,doFlattenColumns(column.children));}else{result.push(column);}});return result;};/* harmony default export */var watcher=external_vue_default.a.extend({data:function data(){return{states:{// 3.0 版本后要求必须设置该属性
rowKey:null,// 渲染的数据来源，是对 table 中的 data 过滤排序后的结果
data:[],// 是否包含固定列
isComplex:false,// 列
_columns:[],// 不可响应的
originColumns:[],columns:[],fixedColumns:[],rightFixedColumns:[],leafColumns:[],fixedLeafColumns:[],rightFixedLeafColumns:[],leafColumnsLength:0,fixedLeafColumnsLength:0,rightFixedLeafColumnsLength:0,// 选择
isAllSelected:false,selection:[],reserveSelection:false,selectOnIndeterminate:false,selectable:null,// 过滤
filters:{},// 不可响应的
filteredData:null,// 排序
sortingColumn:null,sortProp:null,sortOrder:null,hoverRow:null}};},mixins:[expand,current,tree],methods:{// 检查 rowKey 是否存在
assertRowKey:function assertRowKey(){var rowKey=this.states.rowKey;if(!rowKey)throw new Error('[ElTable] prop row-key is required');},// 更新列
updateColumns:function updateColumns(){var states=this.states;var _columns=states._columns||[];states.fixedColumns=_columns.filter(function(column){return column.fixed===true||column.fixed==='left';});states.rightFixedColumns=_columns.filter(function(column){return column.fixed==='right';});if(states.fixedColumns.length>0&&_columns[0]&&_columns[0].type==='selection'&&!_columns[0].fixed){_columns[0].fixed=true;states.fixedColumns.unshift(_columns[0]);}var notFixedColumns=_columns.filter(function(column){return!column.fixed;});states.originColumns=[].concat(states.fixedColumns).concat(notFixedColumns).concat(states.rightFixedColumns);var leafColumns=doFlattenColumns(notFixedColumns);var fixedLeafColumns=doFlattenColumns(states.fixedColumns);var rightFixedLeafColumns=doFlattenColumns(states.rightFixedColumns);states.leafColumnsLength=leafColumns.length;states.fixedLeafColumnsLength=fixedLeafColumns.length;states.rightFixedLeafColumnsLength=rightFixedLeafColumns.length;states.columns=[].concat(fixedLeafColumns).concat(leafColumns).concat(rightFixedLeafColumns);states.isComplex=states.fixedColumns.length>0||states.rightFixedColumns.length>0;},// 更新 DOM
scheduleLayout:function scheduleLayout(needUpdateColumns){if(needUpdateColumns){this.updateColumns();}this.table.debouncedUpdateLayout();},// 选择
isSelected:function isSelected(row){var _states$selection=this.states.selection,selection=_states$selection===undefined?[]:_states$selection;return selection.indexOf(row)>-1;},clearSelection:function clearSelection(){var states=this.states;states.isAllSelected=false;var oldSelection=states.selection;if(oldSelection.length){states.selection=[];this.table.$emit('selection-change',[]);}},cleanSelection:function cleanSelection(){var states=this.states;var data=states.data,rowKey=states.rowKey,selection=states.selection;var deleted=void 0;if(rowKey){deleted=[];var selectedMap=getKeysMap(selection,rowKey);var dataMap=getKeysMap(data,rowKey);for(var key in selectedMap){if(selectedMap.hasOwnProperty(key)&&!dataMap[key]){deleted.push(selectedMap[key].row);}}}else{deleted=selection.filter(function(item){return data.indexOf(item)===-1;});}if(deleted.length){var newSelection=selection.filter(function(item){return deleted.indexOf(item)===-1;});states.selection=newSelection;this.table.$emit('selection-change',newSelection.slice());}},toggleRowSelection:function toggleRowSelection(row,selected){var emitChange=arguments.length>2&&arguments[2]!==undefined?arguments[2]:true;var changed=toggleRowStatus(this.states.selection,row,selected);if(changed){var newSelection=(this.states.selection||[]).slice();// 调用 API 修改选中值，不触发 select 事件
if(emitChange){this.table.$emit('select',newSelection,row);}this.table.$emit('selection-change',newSelection);}},_toggleAllSelection:function _toggleAllSelection(){var states=this.states;var _states$data=states.data,data=_states$data===undefined?[]:_states$data,selection=states.selection;// when only some rows are selected (but not all), select or deselect all of them
// depending on the value of selectOnIndeterminate
var value=states.selectOnIndeterminate?!states.isAllSelected:!(states.isAllSelected||selection.length);states.isAllSelected=value;var selectionChanged=false;data.forEach(function(row,index){if(states.selectable){if(states.selectable.call(null,row,index)&&toggleRowStatus(selection,row,value)){selectionChanged=true;}}else{if(toggleRowStatus(selection,row,value)){selectionChanged=true;}}});if(selectionChanged){this.table.$emit('selection-change',selection?selection.slice():[]);}this.table.$emit('select-all',selection);},updateSelectionByRowKey:function updateSelectionByRowKey(){var states=this.states;var selection=states.selection,rowKey=states.rowKey,data=states.data;var selectedMap=getKeysMap(selection,rowKey);data.forEach(function(row){var rowId=getRowIdentity(row,rowKey);var rowInfo=selectedMap[rowId];if(rowInfo){selection[rowInfo.index]=row;}});},updateAllSelected:function updateAllSelected(){var states=this.states;var selection=states.selection,rowKey=states.rowKey,selectable=states.selectable;// data 为 null 时，解构时的默认值会被忽略
var data=states.data||[];if(data.length===0){states.isAllSelected=false;return;}var selectedMap=void 0;if(rowKey){selectedMap=getKeysMap(selection,rowKey);}var isSelected=function isSelected(row){if(selectedMap){return!!selectedMap[getRowIdentity(row,rowKey)];}else{return selection.indexOf(row)!==-1;}};var isAllSelected=true;var selectedCount=0;for(var i=0,j=data.length;i<j;i++){var item=data[i];var isRowSelectable=selectable&&selectable.call(null,item,i);if(!isSelected(item)){if(!selectable||isRowSelectable){isAllSelected=false;break;}}else{selectedCount++;}}if(selectedCount===0)isAllSelected=false;states.isAllSelected=isAllSelected;},// 过滤与排序
updateFilters:function updateFilters(columns,values){if(!Array.isArray(columns)){columns=[columns];}var states=this.states;var filters={};columns.forEach(function(col){states.filters[col.id]=values;filters[col.columnKey||col.id]=values;});return filters;},updateSort:function updateSort(column,prop,order){if(this.states.sortingColumn&&this.states.sortingColumn!==column){this.states.sortingColumn.order=null;}this.states.sortingColumn=column;this.states.sortProp=prop;this.states.sortOrder=order;},execFilter:function execFilter(){var _this=this;var states=this.states;var _data=states._data,filters=states.filters;var data=_data;Object.keys(filters).forEach(function(columnId){var values=states.filters[columnId];if(!values||values.length===0)return;var column=getColumnById(_this.states,columnId);if(column&&column.filterMethod){data=data.filter(function(row){return values.some(function(value){return column.filterMethod.call(null,value,row,column);});});}});states.filteredData=data;},execSort:function execSort(){var states=this.states;states.data=watcher_sortData(states.filteredData,states);},// 根据 filters 与 sort 去过滤 data
execQuery:function execQuery(ignore){if(!(ignore&&ignore.filter)){this.execFilter();}this.execSort();},clearFilter:function clearFilter(columnKeys){var states=this.states;var _table$$refs=this.table.$refs,tableHeader=_table$$refs.tableHeader,fixedTableHeader=_table$$refs.fixedTableHeader,rightFixedTableHeader=_table$$refs.rightFixedTableHeader;var panels={};if(tableHeader)panels=merge_default()(panels,tableHeader.filterPanels);if(fixedTableHeader)panels=merge_default()(panels,fixedTableHeader.filterPanels);if(rightFixedTableHeader)panels=merge_default()(panels,rightFixedTableHeader.filterPanels);var keys=Object.keys(panels);if(!keys.length)return;if(typeof columnKeys==='string'){columnKeys=[columnKeys];}if(Array.isArray(columnKeys)){var columns=columnKeys.map(function(key){return getColumnByKey(states,key);});keys.forEach(function(key){var column=columns.find(function(col){return col.id===key;});if(column){// TODO: 优化这里的代码
panels[key].filteredValue=[];}});this.commit('filterChange',{column:columns,values:[],silent:true,multi:true});}else{keys.forEach(function(key){// TODO: 优化这里的代码
panels[key].filteredValue=[];});states.filters={};this.commit('filterChange',{column:{},values:[],silent:true});}},clearSort:function clearSort(){var states=this.states;if(!states.sortingColumn)return;this.updateSort(null,null,null);this.commit('changeSortCondition',{silent:true});},// 适配层，expand-row-keys 在 Expand 与 TreeTable 中都有使用
setExpandRowKeysAdapter:function setExpandRowKeysAdapter(val){// 这里会触发额外的计算，但为了兼容性，暂时这么做
this.setExpandRowKeys(val);this.updateTreeExpandKeys(val);},// 展开行与 TreeTable 都要使用
toggleRowExpansionAdapter:function toggleRowExpansionAdapter(row,expanded){var hasExpandColumn=this.states.columns.some(function(_ref){var type=_ref.type;return type==='expand';});if(hasExpandColumn){this.toggleRowExpansion(row,expanded);}else{this.toggleTreeExpansion(row,expanded);}}}});// CONCATENATED MODULE: ./packages/table/src/store/index.js
watcher.prototype.mutations={setData:function setData(states,data){var dataInstanceChanged=states._data!==data;states._data=data;this.execQuery();// 数据变化，更新部分数据。
// 没有使用 computed，而是手动更新部分数据 https://github.com/vuejs/vue/issues/6660#issuecomment-331417140
this.updateCurrentRowData();this.updateExpandRows();if(states.reserveSelection){this.assertRowKey();this.updateSelectionByRowKey();}else{if(dataInstanceChanged){this.clearSelection();}else{this.cleanSelection();}}this.updateAllSelected();this.updateTableScrollY();},insertColumn:function insertColumn(states,column,index,parent){var array=states._columns;if(parent){array=parent.children;if(!array)array=parent.children=[];}if(typeof index!=='undefined'){array.splice(index,0,column);}else{array.push(column);}if(column.type==='selection'){states.selectable=column.selectable;states.reserveSelection=column.reserveSelection;}if(this.table.$ready){this.updateColumns();// hack for dynamics insert column
this.scheduleLayout();}},removeColumn:function removeColumn(states,column,parent){var array=states._columns;if(parent){array=parent.children;if(!array)array=parent.children=[];}if(array){array.splice(array.indexOf(column),1);}if(this.table.$ready){this.updateColumns();// hack for dynamics remove column
this.scheduleLayout();}},sort:function sort(states,options){var prop=options.prop,order=options.order,init=options.init;if(prop){var column=Object(util_["arrayFind"])(states.columns,function(column){return column.property===prop;});if(column){column.order=order;this.updateSort(column,prop,order);this.commit('changeSortCondition',{init:init});}}},changeSortCondition:function changeSortCondition(states,options){// 修复 pr https://github.com/ElemeFE/element/pull/15012 导致的 bug
var column=states.sortingColumn,prop=states.sortProp,order=states.sortOrder;if(order===null){states.sortingColumn=null;states.sortProp=null;}var ingore={filter:true};this.execQuery(ingore);if(!options||!(options.silent||options.init)){this.table.$emit('sort-change',{column:column,prop:prop,order:order});}this.updateTableScrollY();},filterChange:function filterChange(states,options){var column=options.column,values=options.values,silent=options.silent;var newFilters=this.updateFilters(column,values);this.execQuery();if(!silent){this.table.$emit('filter-change',newFilters);}this.updateTableScrollY();},toggleAllSelection:function toggleAllSelection(){this.toggleAllSelection();},rowSelectedChanged:function rowSelectedChanged(states,row){this.toggleRowSelection(row);this.updateAllSelected();},setHoverRow:function setHoverRow(states,row){states.hoverRow=row;},setCurrentRow:function setCurrentRow(states,row){this.updateCurrentRow(row);}};watcher.prototype.commit=function(name){var mutations=this.mutations;if(mutations[name]){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key];}mutations[name].apply(this,[this.states].concat(args));}else{throw new Error('Action not found: '+name);}};watcher.prototype.updateTableScrollY=function(){external_vue_default.a.nextTick(this.table.updateScrollY);};/* harmony default export */var src_store=watcher;// CONCATENATED MODULE: ./packages/table/src/store/helper.js
function createStore(table){var initialState=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!table){throw new Error('Table is required.');}var store=new src_store();store.table=table;// fix https://github.com/ElemeFE/element/issues/14075
// related pr https://github.com/ElemeFE/element/pull/14146
store.toggleAllSelection=debounce_default()(10,store._toggleAllSelection);Object.keys(initialState).forEach(function(key){store.states[key]=initialState[key];});return store;}function mapStates(mapper){var res={};Object.keys(mapper).forEach(function(key){var value=mapper[key];var fn=void 0;if(typeof value==='string'){fn=function fn(){return this.store.states[value];};}else if(typeof value==='function'){fn=function fn(){return value.call(this,this.store.states);};}else{console.error('invalid value type');}if(fn){res[key]=fn;}});return res;};// EXTERNAL MODULE: external "element-ui/lib/utils/scrollbar-width"
var scrollbar_width_=__webpack_require__(31);var scrollbar_width_default=/*#__PURE__*/__webpack_require__.n(scrollbar_width_);// CONCATENATED MODULE: ./packages/table/src/table-layout.js
function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}var table_layout_TableLayout=function(){function TableLayout(options){_classCallCheck(this,TableLayout);this.observers=[];this.table=null;this.store=null;this.columns=null;this.fit=true;this.showHeader=true;this.height=null;this.scrollX=false;this.scrollY=false;this.bodyWidth=null;this.fixedWidth=null;this.rightFixedWidth=null;this.tableHeight=null;this.headerHeight=44;// Table Header Height
this.appendHeight=0;// Append Slot Height
this.footerHeight=44;// Table Footer Height
this.viewportHeight=null;// Table Height - Scroll Bar Height
this.bodyHeight=null;// Table Height - Table Header Height
this.fixedBodyHeight=null;// Table Height - Table Header Height - Scroll Bar Height
this.gutterWidth=scrollbar_width_default()();for(var name in options){if(options.hasOwnProperty(name)){this[name]=options[name];}}if(!this.table){throw new Error('table is required for Table Layout');}if(!this.store){throw new Error('store is required for Table Layout');}}TableLayout.prototype.updateScrollY=function updateScrollY(){var height=this.height;if(height===null)return false;var bodyWrapper=this.table.bodyWrapper;if(this.table.$el&&bodyWrapper){var body=bodyWrapper.querySelector('.el-table__body');var prevScrollY=this.scrollY;var scrollY=body.offsetHeight>this.bodyHeight;this.scrollY=scrollY;return prevScrollY!==scrollY;}return false;};TableLayout.prototype.setHeight=function setHeight(value){var _this=this;var prop=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'height';if(external_vue_default.a.prototype.$isServer)return;var el=this.table.$el;value=parseHeight(value);this.height=value;if(!el&&(value||value===0))return external_vue_default.a.nextTick(function(){return _this.setHeight(value,prop);});if(typeof value==='number'){el.style[prop]=value+'px';this.updateElsHeight();}else if(typeof value==='string'){el.style[prop]=value;this.updateElsHeight();}};TableLayout.prototype.setMaxHeight=function setMaxHeight(value){this.setHeight(value,'max-height');};TableLayout.prototype.getFlattenColumns=function getFlattenColumns(){var flattenColumns=[];var columns=this.table.columns;columns.forEach(function(column){if(column.isColumnGroup){flattenColumns.push.apply(flattenColumns,column.columns);}else{flattenColumns.push(column);}});return flattenColumns;};TableLayout.prototype.updateElsHeight=function updateElsHeight(){var _this2=this;if(!this.table.$ready)return external_vue_default.a.nextTick(function(){return _this2.updateElsHeight();});var _table$$refs=this.table.$refs,headerWrapper=_table$$refs.headerWrapper,appendWrapper=_table$$refs.appendWrapper,footerWrapper=_table$$refs.footerWrapper;this.appendHeight=appendWrapper?appendWrapper.offsetHeight:0;if(this.showHeader&&!headerWrapper)return;// fix issue (https://github.com/ElemeFE/element/pull/16956)
var headerTrElm=headerWrapper?headerWrapper.querySelector('.el-table__header tr'):null;var noneHeader=this.headerDisplayNone(headerTrElm);var headerHeight=this.headerHeight=!this.showHeader?0:headerWrapper.offsetHeight;if(this.showHeader&&!noneHeader&&headerWrapper.offsetWidth>0&&(this.table.columns||[]).length>0&&headerHeight<2){return external_vue_default.a.nextTick(function(){return _this2.updateElsHeight();});}var tableHeight=this.tableHeight=this.table.$el.clientHeight;var footerHeight=this.footerHeight=footerWrapper?footerWrapper.offsetHeight:0;if(this.height!==null){this.bodyHeight=tableHeight-headerHeight-footerHeight+(footerWrapper?1:0);}this.fixedBodyHeight=this.scrollX?this.bodyHeight-this.gutterWidth:this.bodyHeight;var noData=!(this.store.states.data&&this.store.states.data.length);this.viewportHeight=this.scrollX?tableHeight-(noData?0:this.gutterWidth):tableHeight;this.updateScrollY();this.notifyObservers('scrollable');};TableLayout.prototype.headerDisplayNone=function headerDisplayNone(elm){if(!elm)return true;var headerChild=elm;while(headerChild.tagName!=='DIV'){if(getComputedStyle(headerChild).display==='none'){return true;}headerChild=headerChild.parentElement;}return false;};TableLayout.prototype.updateColumnsWidth=function updateColumnsWidth(){if(external_vue_default.a.prototype.$isServer)return;var fit=this.fit;var bodyWidth=this.table.$el.clientWidth;var bodyMinWidth=0;var flattenColumns=this.getFlattenColumns();var flexColumns=flattenColumns.filter(function(column){return typeof column.width!=='number';});flattenColumns.forEach(function(column){// Clean those columns whose width changed from flex to unflex
if(typeof column.width==='number'&&column.realWidth)column.realWidth=null;});if(flexColumns.length>0&&fit){flattenColumns.forEach(function(column){bodyMinWidth+=column.width||column.minWidth||80;});var scrollYWidth=this.scrollY?this.gutterWidth:0;if(bodyMinWidth<=bodyWidth-scrollYWidth){// DON'T HAVE SCROLL BAR
this.scrollX=false;var totalFlexWidth=bodyWidth-scrollYWidth-bodyMinWidth;if(flexColumns.length===1){flexColumns[0].realWidth=(flexColumns[0].minWidth||80)+totalFlexWidth;}else{var allColumnsWidth=flexColumns.reduce(function(prev,column){return prev+(column.minWidth||80);},0);var flexWidthPerPixel=totalFlexWidth/allColumnsWidth;var noneFirstWidth=0;flexColumns.forEach(function(column,index){if(index===0)return;var flexWidth=Math.floor((column.minWidth||80)*flexWidthPerPixel);noneFirstWidth+=flexWidth;column.realWidth=(column.minWidth||80)+flexWidth;});flexColumns[0].realWidth=(flexColumns[0].minWidth||80)+totalFlexWidth-noneFirstWidth;}}else{// HAVE HORIZONTAL SCROLL BAR
this.scrollX=true;flexColumns.forEach(function(column){column.realWidth=column.minWidth;});}this.bodyWidth=Math.max(bodyMinWidth,bodyWidth);this.table.resizeState.width=this.bodyWidth;}else{flattenColumns.forEach(function(column){if(!column.width&&!column.minWidth){column.realWidth=80;}else{column.realWidth=column.width||column.minWidth;}bodyMinWidth+=column.realWidth;});this.scrollX=bodyMinWidth>bodyWidth;this.bodyWidth=bodyMinWidth;}var fixedColumns=this.store.states.fixedColumns;if(fixedColumns.length>0){var fixedWidth=0;fixedColumns.forEach(function(column){fixedWidth+=column.realWidth||column.width;});this.fixedWidth=fixedWidth;}var rightFixedColumns=this.store.states.rightFixedColumns;if(rightFixedColumns.length>0){var rightFixedWidth=0;rightFixedColumns.forEach(function(column){rightFixedWidth+=column.realWidth||column.width;});this.rightFixedWidth=rightFixedWidth;}this.notifyObservers('columns');};TableLayout.prototype.addObserver=function addObserver(observer){this.observers.push(observer);};TableLayout.prototype.removeObserver=function removeObserver(observer){var index=this.observers.indexOf(observer);if(index!==-1){this.observers.splice(index,1);}};TableLayout.prototype.notifyObservers=function notifyObservers(event){var _this3=this;var observers=this.observers;observers.forEach(function(observer){switch(event){case'columns':observer.onColumnsChange(_this3);break;case'scrollable':observer.onScrollableChange(_this3);break;default:throw new Error('Table Layout don\'t have event '+event+'.');}});};return TableLayout;}();/* harmony default export */var table_layout=table_layout_TableLayout;// CONCATENATED MODULE: ./packages/table/src/layout-observer.js
/* harmony default export */var layout_observer={created:function created(){this.tableLayout.addObserver(this);},destroyed:function destroyed(){this.tableLayout.removeObserver(this);},computed:{tableLayout:function tableLayout(){var layout=this.layout;if(!layout&&this.table){layout=this.table.layout;}if(!layout){throw new Error('Can not find table layout.');}return layout;}},mounted:function mounted(){this.onColumnsChange(this.tableLayout);this.onScrollableChange(this.tableLayout);},updated:function updated(){if(this.__updated__)return;this.onColumnsChange(this.tableLayout);this.onScrollableChange(this.tableLayout);this.__updated__=true;},methods:{onColumnsChange:function onColumnsChange(layout){var cols=this.$el.querySelectorAll('colgroup > col');if(!cols.length)return;var flattenColumns=layout.getFlattenColumns();var columnsMap={};flattenColumns.forEach(function(column){columnsMap[column.id]=column;});for(var i=0,j=cols.length;i<j;i++){var col=cols[i];var name=col.getAttribute('name');var column=columnsMap[name];if(column){col.setAttribute('width',column.realWidth||column.width);}}},onScrollableChange:function onScrollableChange(layout){var cols=this.$el.querySelectorAll('colgroup > col[name=gutter]');for(var i=0,j=cols.length;i<j;i++){var col=cols[i];col.setAttribute('width',layout.scrollY?layout.gutterWidth:'0');}var ths=this.$el.querySelectorAll('th.gutter');for(var _i=0,_j=ths.length;_i<_j;_i++){var th=ths[_i];th.style.width=layout.scrollY?layout.gutterWidth+'px':'0';th.style.display=layout.scrollY?'':'none';}}}};// CONCATENATED MODULE: ./packages/table/src/table-body.js
var table_body_typeof=typeof Symbol==="function"&&_typeof2(Symbol.iterator)==="symbol"?function(obj){return _typeof2(obj);}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":_typeof2(obj);};var table_body_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};/* harmony default export */var table_body={name:'ElTableBody',mixins:[layout_observer],components:{ElCheckbox:checkbox_default.a,ElTooltip:tooltip_default.a},props:{store:{required:true},stripe:Boolean,context:{},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:String,highlight:Boolean},render:function render(h){var _this=this;var data=this.data||[];return h('table',{'class':'el-table__body',attrs:{cellspacing:'0',cellpadding:'0',border:'0'}},[h('colgroup',[this.columns.map(function(column){return h('col',{attrs:{name:column.id},key:column.id});})]),h('tbody',[data.reduce(function(acc,row){return acc.concat(_this.wrappedRowRender(row,acc.length));},[]),h('el-tooltip',{attrs:{effect:this.table.tooltipEffect,placement:'top',content:this.tooltipContent},ref:'tooltip'})])]);},computed:table_body_extends({table:function table(){return this.$parent;}},mapStates({data:'data',columns:'columns',treeIndent:'indent',leftFixedLeafCount:'fixedLeafColumnsLength',rightFixedLeafCount:'rightFixedLeafColumnsLength',columnsCount:function columnsCount(states){return states.columns.length;},leftFixedCount:function leftFixedCount(states){return states.fixedColumns.length;},rightFixedCount:function rightFixedCount(states){return states.rightFixedColumns.length;},hasExpandColumn:function hasExpandColumn(states){return states.columns.some(function(_ref){var type=_ref.type;return type==='expand';});}}),{firstDefaultColumnIndex:function firstDefaultColumnIndex(){return Object(util_["arrayFindIndex"])(this.columns,function(_ref2){var type=_ref2.type;return type==='default';});}}),watch:{// don't trigger getter of currentRow in getCellClass. see https://jsfiddle.net/oe2b4hqt/
// update DOM manually. see https://github.com/ElemeFE/element/pull/13954/files#diff-9b450c00d0a9dec0ffad5a3176972e40
'store.states.hoverRow':function storeStatesHoverRow(newVal,oldVal){var _this2=this;if(!this.store.states.isComplex||this.$isServer)return;var raf=window.requestAnimationFrame;if(!raf){raf=function raf(fn){return setTimeout(fn,16);};}raf(function(){var rows=_this2.$el.querySelectorAll('.el-table__row');var oldRow=rows[oldVal];var newRow=rows[newVal];if(oldRow){Object(dom_["removeClass"])(oldRow,'hover-row');}if(newRow){Object(dom_["addClass"])(newRow,'hover-row');}});}},data:function data(){return{tooltipContent:''};},created:function created(){this.activateTooltip=debounce_default()(50,function(tooltip){return tooltip.handleShowPopper();});},methods:{getKeyOfRow:function getKeyOfRow(row,index){var rowKey=this.table.rowKey;if(rowKey){return getRowIdentity(row,rowKey);}return index;},isColumnHidden:function isColumnHidden(index){if(this.fixed===true||this.fixed==='left'){return index>=this.leftFixedLeafCount;}else if(this.fixed==='right'){return index<this.columnsCount-this.rightFixedLeafCount;}else{return index<this.leftFixedLeafCount||index>=this.columnsCount-this.rightFixedLeafCount;}},getSpan:function getSpan(row,column,rowIndex,columnIndex){var rowspan=1;var colspan=1;var fn=this.table.spanMethod;if(typeof fn==='function'){var result=fn({row:row,column:column,rowIndex:rowIndex,columnIndex:columnIndex});if(Array.isArray(result)){rowspan=result[0];colspan=result[1];}else if((typeof result==='undefined'?'undefined':table_body_typeof(result))==='object'){rowspan=result.rowspan;colspan=result.colspan;}}return{rowspan:rowspan,colspan:colspan};},getRowStyle:function getRowStyle(row,rowIndex){var rowStyle=this.table.rowStyle;if(typeof rowStyle==='function'){return rowStyle.call(null,{row:row,rowIndex:rowIndex});}return rowStyle||null;},getRowClass:function getRowClass(row,rowIndex){var classes=['el-table__row'];if(this.table.highlightCurrentRow&&row===this.store.states.currentRow){classes.push('current-row');}if(this.stripe&&rowIndex%2===1){classes.push('el-table__row--striped');}var rowClassName=this.table.rowClassName;if(typeof rowClassName==='string'){classes.push(rowClassName);}else if(typeof rowClassName==='function'){classes.push(rowClassName.call(null,{row:row,rowIndex:rowIndex}));}if(this.store.states.expandRows.indexOf(row)>-1){classes.push('expanded');}return classes;},getCellStyle:function getCellStyle(rowIndex,columnIndex,row,column){var cellStyle=this.table.cellStyle;if(typeof cellStyle==='function'){return cellStyle.call(null,{rowIndex:rowIndex,columnIndex:columnIndex,row:row,column:column});}return cellStyle;},getCellClass:function getCellClass(rowIndex,columnIndex,row,column){var classes=[column.id,column.align,column.className];if(this.isColumnHidden(columnIndex)){classes.push('is-hidden');}var cellClassName=this.table.cellClassName;if(typeof cellClassName==='string'){classes.push(cellClassName);}else if(typeof cellClassName==='function'){classes.push(cellClassName.call(null,{rowIndex:rowIndex,columnIndex:columnIndex,row:row,column:column}));}return classes.join(' ');},getColspanRealWidth:function getColspanRealWidth(columns,colspan,index){if(colspan<1){return columns[index].realWidth;}var widthArr=columns.map(function(_ref3){var realWidth=_ref3.realWidth;return realWidth;}).slice(index,index+colspan);return widthArr.reduce(function(acc,width){return acc+width;},-1);},handleCellMouseEnter:function handleCellMouseEnter(event,row){var table=this.table;var cell=getCell(event);if(cell){var column=getColumnByCell(table,cell);var hoverState=table.hoverState={cell:cell,column:column,row:row};table.$emit('cell-mouse-enter',hoverState.row,hoverState.column,hoverState.cell,event);}// 判断是否text-overflow, 如果是就显示tooltip
var cellChild=event.target.querySelector('.cell');if(!(Object(dom_["hasClass"])(cellChild,'el-tooltip')&&cellChild.childNodes.length)){return;}// use range width instead of scrollWidth to determine whether the text is overflowing
// to address a potential FireFox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1074543#c3
var range=document.createRange();range.setStart(cellChild,0);range.setEnd(cellChild,cellChild.childNodes.length);var rangeWidth=range.getBoundingClientRect().width;var padding=(parseInt(Object(dom_["getStyle"])(cellChild,'paddingLeft'),10)||0)+(parseInt(Object(dom_["getStyle"])(cellChild,'paddingRight'),10)||0);if((rangeWidth+padding>cellChild.offsetWidth||cellChild.scrollWidth>cellChild.offsetWidth)&&this.$refs.tooltip){var tooltip=this.$refs.tooltip;// TODO 会引起整个 Table 的重新渲染，需要优化
this.tooltipContent=cell.innerText||cell.textContent;tooltip.referenceElm=cell;tooltip.$refs.popper&&(tooltip.$refs.popper.style.display='none');tooltip.doDestroy();tooltip.setExpectedState(true);this.activateTooltip(tooltip);}},handleCellMouseLeave:function handleCellMouseLeave(event){var tooltip=this.$refs.tooltip;if(tooltip){tooltip.setExpectedState(false);tooltip.handleClosePopper();}var cell=getCell(event);if(!cell)return;var oldHoverState=this.table.hoverState||{};this.table.$emit('cell-mouse-leave',oldHoverState.row,oldHoverState.column,oldHoverState.cell,event);},handleMouseEnter:debounce_default()(30,function(index){this.store.commit('setHoverRow',index);}),handleMouseLeave:debounce_default()(30,function(){this.store.commit('setHoverRow',null);}),handleContextMenu:function handleContextMenu(event,row){this.handleEvent(event,row,'contextmenu');},handleDoubleClick:function handleDoubleClick(event,row){this.handleEvent(event,row,'dblclick');},handleClick:function handleClick(event,row){this.store.commit('setCurrentRow',row);this.handleEvent(event,row,'click');},handleEvent:function handleEvent(event,row,name){var table=this.table;var cell=getCell(event);var column=void 0;if(cell){column=getColumnByCell(table,cell);if(column){table.$emit('cell-'+name,row,column,cell,event);}}table.$emit('row-'+name,row,column,event);},rowRender:function rowRender(row,$index,treeRowData){var _this3=this;var h=this.$createElement;var treeIndent=this.treeIndent,columns=this.columns,firstDefaultColumnIndex=this.firstDefaultColumnIndex;var columnsHidden=columns.map(function(column,index){return _this3.isColumnHidden(index);});var rowClasses=this.getRowClass(row,$index);var display=true;if(treeRowData){rowClasses.push('el-table__row--level-'+treeRowData.level);display=treeRowData.display;}// 指令 v-show 会覆盖 row-style 中 display
// 使用 :style 代替 v-show https://github.com/ElemeFE/element/issues/16995
var displayStyle=display?null:{display:'none'};return h('tr',{style:[displayStyle,this.getRowStyle(row,$index)],'class':rowClasses,key:this.getKeyOfRow(row,$index),on:{'dblclick':function dblclick($event){return _this3.handleDoubleClick($event,row);},'click':function click($event){return _this3.handleClick($event,row);},'contextmenu':function contextmenu($event){return _this3.handleContextMenu($event,row);},'mouseenter':function mouseenter(_){return _this3.handleMouseEnter($index);},'mouseleave':this.handleMouseLeave}},[columns.map(function(column,cellIndex){var _getSpan=_this3.getSpan(row,column,$index,cellIndex),rowspan=_getSpan.rowspan,colspan=_getSpan.colspan;if(!rowspan||!colspan){return null;}var columnData=table_body_extends({},column);columnData.realWidth=_this3.getColspanRealWidth(columns,colspan,cellIndex);var data={store:_this3.store,_self:_this3.context||_this3.table.$vnode.context,column:columnData,row:row,$index:$index};if(cellIndex===firstDefaultColumnIndex&&treeRowData){data.treeNode={indent:treeRowData.level*treeIndent,level:treeRowData.level};if(typeof treeRowData.expanded==='boolean'){data.treeNode.expanded=treeRowData.expanded;// 表明是懒加载
if('loading'in treeRowData){data.treeNode.loading=treeRowData.loading;}if('noLazyChildren'in treeRowData){data.treeNode.noLazyChildren=treeRowData.noLazyChildren;}}}return h('td',{style:_this3.getCellStyle($index,cellIndex,row,column),'class':_this3.getCellClass($index,cellIndex,row,column),attrs:{rowspan:rowspan,colspan:colspan},on:{'mouseenter':function mouseenter($event){return _this3.handleCellMouseEnter($event,row);},'mouseleave':_this3.handleCellMouseLeave}},[column.renderCell.call(_this3._renderProxy,_this3.$createElement,data,columnsHidden[cellIndex])]);})]);},wrappedRowRender:function wrappedRowRender(row,$index){var _this4=this;var h=this.$createElement;var store=this.store;var isRowExpanded=store.isRowExpanded,assertRowKey=store.assertRowKey;var _store$states=store.states,treeData=_store$states.treeData,lazyTreeNodeMap=_store$states.lazyTreeNodeMap,childrenColumnName=_store$states.childrenColumnName,rowKey=_store$states.rowKey;if(this.hasExpandColumn&&isRowExpanded(row)){var renderExpanded=this.table.renderExpanded;var tr=this.rowRender(row,$index);if(!renderExpanded){console.error('[Element Error]renderExpanded is required.');return tr;}// 使用二维数组，避免修改 $index
return[[tr,h('tr',{key:'expanded-row__'+tr.key},[h('td',{attrs:{colspan:this.columnsCount},'class':'el-table__expanded-cell'},[renderExpanded(this.$createElement,{row:row,$index:$index,store:this.store})])])]];}else if(Object.keys(treeData).length){assertRowKey();// TreeTable 时，rowKey 必须由用户设定，不使用 getKeyOfRow 计算
// 在调用 rowRender 函数时，仍然会计算 rowKey，不太好的操作
var key=getRowIdentity(row,rowKey);var cur=treeData[key];var treeRowData=null;if(cur){treeRowData={expanded:cur.expanded,level:cur.level,display:true};if(typeof cur.lazy==='boolean'){if(typeof cur.loaded==='boolean'&&cur.loaded){treeRowData.noLazyChildren=!(cur.children&&cur.children.length);}treeRowData.loading=cur.loading;}}var tmp=[this.rowRender(row,$index,treeRowData)];// 渲染嵌套数据
if(cur){// currentRow 记录的是 index，所以还需主动增加 TreeTable 的 index
var i=0;var traverse=function traverse(children,parent){if(!(children&&children.length&&parent))return;children.forEach(function(node){// 父节点的 display 状态影响子节点的显示状态
var innerTreeRowData={display:parent.display&&parent.expanded,level:parent.level+1};var childKey=getRowIdentity(node,rowKey);if(childKey===undefined||childKey===null){throw new Error('for nested data item, row-key is required.');}cur=table_body_extends({},treeData[childKey]);// 对于当前节点，分成有无子节点两种情况。
// 如果包含子节点的，设置 expanded 属性。
// 对于它子节点的 display 属性由它本身的 expanded 与 display 共同决定。
if(cur){innerTreeRowData.expanded=cur.expanded;// 懒加载的某些节点，level 未知
cur.level=cur.level||innerTreeRowData.level;cur.display=!!(cur.expanded&&innerTreeRowData.display);if(typeof cur.lazy==='boolean'){if(typeof cur.loaded==='boolean'&&cur.loaded){innerTreeRowData.noLazyChildren=!(cur.children&&cur.children.length);}innerTreeRowData.loading=cur.loading;}}i++;tmp.push(_this4.rowRender(node,$index+i,innerTreeRowData));if(cur){var _nodes=lazyTreeNodeMap[childKey]||node[childrenColumnName];traverse(_nodes,cur);}});};// 对于 root 节点，display 一定为 true
cur.display=true;var nodes=lazyTreeNodeMap[key]||row[childrenColumnName];traverse(nodes,cur);}return tmp;}else{return this.rowRender(row,$index);}}}};// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/table/src/filter-panel.vue?vue&type=template&id=7f2c919f&
var filter_panelvue_type_template_id_7f2c919f_render=function filter_panelvue_type_template_id_7f2c919f_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("transition",{attrs:{name:"el-zoom-in-top"}},[_vm.multiple?_c("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:_vm.handleOutsideClick,expression:"handleOutsideClick"},{name:"show",rawName:"v-show",value:_vm.showPopper,expression:"showPopper"}],staticClass:"el-table-filter"},[_c("div",{staticClass:"el-table-filter__content"},[_c("el-scrollbar",{attrs:{"wrap-class":"el-table-filter__wrap"}},[_c("el-checkbox-group",{staticClass:"el-table-filter__checkbox-group",model:{value:_vm.filteredValue,callback:function callback($$v){_vm.filteredValue=$$v;},expression:"filteredValue"}},_vm._l(_vm.filters,function(filter){return _c("el-checkbox",{key:filter.value,attrs:{label:filter.value}},[_vm._v(_vm._s(filter.text))]);}),1)],1)],1),_c("div",{staticClass:"el-table-filter__bottom"},[_c("button",{class:{"is-disabled":_vm.filteredValue.length===0},attrs:{disabled:_vm.filteredValue.length===0},on:{click:_vm.handleConfirm}},[_vm._v(_vm._s(_vm.t("el.table.confirmFilter")))]),_c("button",{on:{click:_vm.handleReset}},[_vm._v(_vm._s(_vm.t("el.table.resetFilter")))])])]):_c("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:_vm.handleOutsideClick,expression:"handleOutsideClick"},{name:"show",rawName:"v-show",value:_vm.showPopper,expression:"showPopper"}],staticClass:"el-table-filter"},[_c("ul",{staticClass:"el-table-filter__list"},[_c("li",{staticClass:"el-table-filter__list-item",class:{"is-active":_vm.filterValue===undefined||_vm.filterValue===null},on:{click:function click($event){_vm.handleSelect(null);}}},[_vm._v(_vm._s(_vm.t("el.table.clearFilter")))]),_vm._l(_vm.filters,function(filter){return _c("li",{key:filter.value,staticClass:"el-table-filter__list-item",class:{"is-active":_vm.isActive(filter)},attrs:{label:filter.value},on:{click:function click($event){_vm.handleSelect(filter.value);}}},[_vm._v(_vm._s(filter.text))]);})],2)])]);};var filter_panelvue_type_template_id_7f2c919f_staticRenderFns=[];filter_panelvue_type_template_id_7f2c919f_render._withStripped=true;// CONCATENATED MODULE: ./packages/table/src/filter-panel.vue?vue&type=template&id=7f2c919f&
// CONCATENATED MODULE: ./packages/table/src/dropdown.js
var dropdowns=[];!external_vue_default.a.prototype.$isServer&&document.addEventListener('click',function(event){dropdowns.forEach(function(dropdown){var target=event.target;if(!dropdown||!dropdown.$el)return;if(target===dropdown.$el||dropdown.$el.contains(target)){return;}dropdown.handleOutsideClick&&dropdown.handleOutsideClick(event);});});/* harmony default export */var src_dropdown={open:function open(instance){if(instance){dropdowns.push(instance);}},close:function close(instance){var index=dropdowns.indexOf(instance);if(index!==-1){dropdowns.splice(instance,1);}}};// EXTERNAL MODULE: external "element-ui/lib/checkbox-group"
var checkbox_group_=__webpack_require__(32);var checkbox_group_default=/*#__PURE__*/__webpack_require__.n(checkbox_group_);// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/table/src/filter-panel.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var filter_panelvue_type_script_lang_js_={name:'ElTableFilterPanel',mixins:[vue_popper_default.a,locale_default.a],directives:{Clickoutside:clickoutside_default.a},components:{ElCheckbox:checkbox_default.a,ElCheckboxGroup:checkbox_group_default.a,ElScrollbar:scrollbar_default.a},props:{placement:{type:String,default:'bottom-end'}},methods:{isActive:function isActive(filter){return filter.value===this.filterValue;},handleOutsideClick:function handleOutsideClick(){var _this=this;setTimeout(function(){_this.showPopper=false;},16);},handleConfirm:function handleConfirm(){this.confirmFilter(this.filteredValue);this.handleOutsideClick();},handleReset:function handleReset(){this.filteredValue=[];this.confirmFilter(this.filteredValue);this.handleOutsideClick();},handleSelect:function handleSelect(filterValue){this.filterValue=filterValue;if(typeof filterValue!=='undefined'&&filterValue!==null){this.confirmFilter(this.filteredValue);}else{this.confirmFilter([]);}this.handleOutsideClick();},confirmFilter:function confirmFilter(filteredValue){this.table.store.commit('filterChange',{column:this.column,values:filteredValue});this.table.store.updateAllSelected();}},data:function data(){return{table:null,cell:null,column:null};},computed:{filters:function filters(){return this.column&&this.column.filters;},filterValue:{get:function get(){return(this.column.filteredValue||[])[0];},set:function set(value){if(this.filteredValue){if(typeof value!=='undefined'&&value!==null){this.filteredValue.splice(0,1,value);}else{this.filteredValue.splice(0,1);}}}},filteredValue:{get:function get(){if(this.column){return this.column.filteredValue||[];}return[];},set:function set(value){if(this.column){this.column.filteredValue=value;}}},multiple:function multiple(){if(this.column){return this.column.filterMultiple;}return true;}},mounted:function mounted(){var _this2=this;this.popperElm=this.$el;this.referenceElm=this.cell;this.table.bodyWrapper.addEventListener('scroll',function(){_this2.updatePopper();});this.$watch('showPopper',function(value){if(_this2.column)_this2.column.filterOpened=value;if(value){src_dropdown.open(_this2);}else{src_dropdown.close(_this2);}});},watch:{showPopper:function showPopper(val){if(val===true&&parseInt(this.popperJS._popper.style.zIndex,10)<popup_["PopupManager"].zIndex){this.popperJS._popper.style.zIndex=popup_["PopupManager"].nextZIndex();}}}};// CONCATENATED MODULE: ./packages/table/src/filter-panel.vue?vue&type=script&lang=js&
/* harmony default export */var src_filter_panelvue_type_script_lang_js_=filter_panelvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/table/src/filter-panel.vue
/* normalize component */var filter_panel_component=normalizeComponent(src_filter_panelvue_type_script_lang_js_,filter_panelvue_type_template_id_7f2c919f_render,filter_panelvue_type_template_id_7f2c919f_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var filter_panel_api; }filter_panel_component.options.__file="packages/table/src/filter-panel.vue";/* harmony default export */var filter_panel=filter_panel_component.exports;// CONCATENATED MODULE: ./packages/table/src/table-header.js
var table_header_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};var getAllColumns=function getAllColumns(columns){var result=[];columns.forEach(function(column){if(column.children){result.push(column);result.push.apply(result,getAllColumns(column.children));}else{result.push(column);}});return result;};var convertToRows=function convertToRows(originColumns){var maxLevel=1;var traverse=function traverse(column,parent){if(parent){column.level=parent.level+1;if(maxLevel<column.level){maxLevel=column.level;}}if(column.children){var colSpan=0;column.children.forEach(function(subColumn){traverse(subColumn,column);colSpan+=subColumn.colSpan;});column.colSpan=colSpan;}else{column.colSpan=1;}};originColumns.forEach(function(column){column.level=1;traverse(column);});var rows=[];for(var i=0;i<maxLevel;i++){rows.push([]);}var allColumns=getAllColumns(originColumns);allColumns.forEach(function(column){if(!column.children){column.rowSpan=maxLevel-column.level+1;}else{column.rowSpan=1;}rows[column.level-1].push(column);});return rows;};/* harmony default export */var table_header={name:'ElTableHeader',mixins:[layout_observer],render:function render(h){var _this=this;var originColumns=this.store.states.originColumns;var columnRows=convertToRows(originColumns,this.columns);// 是否拥有多级表头
var isGroup=columnRows.length>1;if(isGroup)this.$parent.isGroup=true;return h('table',{'class':'el-table__header',attrs:{cellspacing:'0',cellpadding:'0',border:'0'}},[h('colgroup',[this.columns.map(function(column){return h('col',{attrs:{name:column.id},key:column.id});}),this.hasGutter?h('col',{attrs:{name:'gutter'}}):'']),h('thead',{'class':[{'is-group':isGroup,'has-gutter':this.hasGutter}]},[this._l(columnRows,function(columns,rowIndex){return h('tr',{style:_this.getHeaderRowStyle(rowIndex),'class':_this.getHeaderRowClass(rowIndex)},[columns.map(function(column,cellIndex){return h('th',{attrs:{colspan:column.colSpan,rowspan:column.rowSpan},on:{'mousemove':function mousemove($event){return _this.handleMouseMove($event,column);},'mouseout':_this.handleMouseOut,'mousedown':function mousedown($event){return _this.handleMouseDown($event,column);},'click':function click($event){return _this.handleHeaderClick($event,column);},'contextmenu':function contextmenu($event){return _this.handleHeaderContextMenu($event,column);}},style:_this.getHeaderCellStyle(rowIndex,cellIndex,columns,column),'class':_this.getHeaderCellClass(rowIndex,cellIndex,columns,column),key:column.id},[h('div',{'class':['cell',column.filteredValue&&column.filteredValue.length>0?'highlight':'',column.labelClassName]},[column.renderHeader?column.renderHeader.call(_this._renderProxy,h,{column:column,$index:cellIndex,store:_this.store,_self:_this.$parent.$vnode.context}):column.label,column.sortable?h('span',{'class':'caret-wrapper',on:{'click':function click($event){return _this.handleSortClick($event,column);}}},[h('i',{'class':'sort-caret ascending',on:{'click':function click($event){return _this.handleSortClick($event,column,'ascending');}}}),h('i',{'class':'sort-caret descending',on:{'click':function click($event){return _this.handleSortClick($event,column,'descending');}}})]):'',column.filterable?h('span',{'class':'el-table__column-filter-trigger',on:{'click':function click($event){return _this.handleFilterClick($event,column);}}},[h('i',{'class':['el-icon-arrow-down',column.filterOpened?'el-icon-arrow-up':'']})]):''])]);}),_this.hasGutter?h('th',{'class':'gutter'}):'']);})])]);},props:{fixed:String,store:{required:true},border:Boolean,defaultSort:{type:Object,default:function _default(){return{prop:'',order:''};}}},components:{ElCheckbox:checkbox_default.a},computed:table_header_extends({table:function table(){return this.$parent;},hasGutter:function hasGutter(){return!this.fixed&&this.tableLayout.gutterWidth;}},mapStates({columns:'columns',isAllSelected:'isAllSelected',leftFixedLeafCount:'fixedLeafColumnsLength',rightFixedLeafCount:'rightFixedLeafColumnsLength',columnsCount:function columnsCount(states){return states.columns.length;},leftFixedCount:function leftFixedCount(states){return states.fixedColumns.length;},rightFixedCount:function rightFixedCount(states){return states.rightFixedColumns.length;}})),created:function created(){this.filterPanels={};},mounted:function mounted(){var _this2=this;// nextTick 是有必要的 https://github.com/ElemeFE/element/pull/11311
this.$nextTick(function(){var _defaultSort=_this2.defaultSort,prop=_defaultSort.prop,order=_defaultSort.order;var init=true;_this2.store.commit('sort',{prop:prop,order:order,init:init});});},beforeDestroy:function beforeDestroy(){var panels=this.filterPanels;for(var prop in panels){if(panels.hasOwnProperty(prop)&&panels[prop]){panels[prop].$destroy(true);}}},methods:{isCellHidden:function isCellHidden(index,columns){var start=0;for(var i=0;i<index;i++){start+=columns[i].colSpan;}var after=start+columns[index].colSpan-1;if(this.fixed===true||this.fixed==='left'){return after>=this.leftFixedLeafCount;}else if(this.fixed==='right'){return start<this.columnsCount-this.rightFixedLeafCount;}else{return after<this.leftFixedLeafCount||start>=this.columnsCount-this.rightFixedLeafCount;}},getHeaderRowStyle:function getHeaderRowStyle(rowIndex){var headerRowStyle=this.table.headerRowStyle;if(typeof headerRowStyle==='function'){return headerRowStyle.call(null,{rowIndex:rowIndex});}return headerRowStyle;},getHeaderRowClass:function getHeaderRowClass(rowIndex){var classes=[];var headerRowClassName=this.table.headerRowClassName;if(typeof headerRowClassName==='string'){classes.push(headerRowClassName);}else if(typeof headerRowClassName==='function'){classes.push(headerRowClassName.call(null,{rowIndex:rowIndex}));}return classes.join(' ');},getHeaderCellStyle:function getHeaderCellStyle(rowIndex,columnIndex,row,column){var headerCellStyle=this.table.headerCellStyle;if(typeof headerCellStyle==='function'){return headerCellStyle.call(null,{rowIndex:rowIndex,columnIndex:columnIndex,row:row,column:column});}return headerCellStyle;},getHeaderCellClass:function getHeaderCellClass(rowIndex,columnIndex,row,column){var classes=[column.id,column.order,column.headerAlign,column.className,column.labelClassName];if(rowIndex===0&&this.isCellHidden(columnIndex,row)){classes.push('is-hidden');}if(!column.children){classes.push('is-leaf');}if(column.sortable){classes.push('is-sortable');}var headerCellClassName=this.table.headerCellClassName;if(typeof headerCellClassName==='string'){classes.push(headerCellClassName);}else if(typeof headerCellClassName==='function'){classes.push(headerCellClassName.call(null,{rowIndex:rowIndex,columnIndex:columnIndex,row:row,column:column}));}return classes.join(' ');},toggleAllSelection:function toggleAllSelection(event){event.stopPropagation();this.store.commit('toggleAllSelection');},handleFilterClick:function handleFilterClick(event,column){event.stopPropagation();var target=event.target;var cell=target.tagName==='TH'?target:target.parentNode;if(Object(dom_["hasClass"])(cell,'noclick'))return;cell=cell.querySelector('.el-table__column-filter-trigger')||cell;var table=this.$parent;var filterPanel=this.filterPanels[column.id];if(filterPanel&&column.filterOpened){filterPanel.showPopper=false;return;}if(!filterPanel){filterPanel=new external_vue_default.a(filter_panel);this.filterPanels[column.id]=filterPanel;if(column.filterPlacement){filterPanel.placement=column.filterPlacement;}filterPanel.table=table;filterPanel.cell=cell;filterPanel.column=column;!this.$isServer&&filterPanel.$mount(document.createElement('div'));}setTimeout(function(){filterPanel.showPopper=true;},16);},handleHeaderClick:function handleHeaderClick(event,column){if(!column.filters&&column.sortable){this.handleSortClick(event,column);}else if(column.filterable&&!column.sortable){this.handleFilterClick(event,column);}this.$parent.$emit('header-click',column,event);},handleHeaderContextMenu:function handleHeaderContextMenu(event,column){this.$parent.$emit('header-contextmenu',column,event);},handleMouseDown:function handleMouseDown(event,column){var _this3=this;if(this.$isServer)return;if(column.children&&column.children.length>0)return;/* istanbul ignore if */if(this.draggingColumn&&this.border){this.dragging=true;this.$parent.resizeProxyVisible=true;var table=this.$parent;var tableEl=table.$el;var tableLeft=tableEl.getBoundingClientRect().left;var columnEl=this.$el.querySelector('th.'+column.id);var columnRect=columnEl.getBoundingClientRect();var minLeft=columnRect.left-tableLeft+30;Object(dom_["addClass"])(columnEl,'noclick');this.dragState={startMouseLeft:event.clientX,startLeft:columnRect.right-tableLeft,startColumnLeft:columnRect.left-tableLeft,tableLeft:tableLeft};var resizeProxy=table.$refs.resizeProxy;resizeProxy.style.left=this.dragState.startLeft+'px';document.onselectstart=function(){return false;};document.ondragstart=function(){return false;};var handleMouseMove=function handleMouseMove(event){var deltaLeft=event.clientX-_this3.dragState.startMouseLeft;var proxyLeft=_this3.dragState.startLeft+deltaLeft;resizeProxy.style.left=Math.max(minLeft,proxyLeft)+'px';};var handleMouseUp=function handleMouseUp(){if(_this3.dragging){var _dragState=_this3.dragState,startColumnLeft=_dragState.startColumnLeft,startLeft=_dragState.startLeft;var finalLeft=parseInt(resizeProxy.style.left,10);var columnWidth=finalLeft-startColumnLeft;column.width=column.realWidth=columnWidth;table.$emit('header-dragend',column.width,startLeft-startColumnLeft,column,event);_this3.store.scheduleLayout();document.body.style.cursor='';_this3.dragging=false;_this3.draggingColumn=null;_this3.dragState={};table.resizeProxyVisible=false;}document.removeEventListener('mousemove',handleMouseMove);document.removeEventListener('mouseup',handleMouseUp);document.onselectstart=null;document.ondragstart=null;setTimeout(function(){Object(dom_["removeClass"])(columnEl,'noclick');},0);};document.addEventListener('mousemove',handleMouseMove);document.addEventListener('mouseup',handleMouseUp);}},handleMouseMove:function handleMouseMove(event,column){if(column.children&&column.children.length>0)return;var target=event.target;while(target&&target.tagName!=='TH'){target=target.parentNode;}if(!column||!column.resizable)return;if(!this.dragging&&this.border){var rect=target.getBoundingClientRect();var bodyStyle=document.body.style;if(rect.width>12&&rect.right-event.pageX<8){bodyStyle.cursor='col-resize';if(Object(dom_["hasClass"])(target,'is-sortable')){target.style.cursor='col-resize';}this.draggingColumn=column;}else if(!this.dragging){bodyStyle.cursor='';if(Object(dom_["hasClass"])(target,'is-sortable')){target.style.cursor='pointer';}this.draggingColumn=null;}}},handleMouseOut:function handleMouseOut(){if(this.$isServer)return;document.body.style.cursor='';},toggleOrder:function toggleOrder(_ref){var order=_ref.order,sortOrders=_ref.sortOrders;if(order==='')return sortOrders[0];var index=sortOrders.indexOf(order||null);return sortOrders[index>sortOrders.length-2?0:index+1];},handleSortClick:function handleSortClick(event,column,givenOrder){event.stopPropagation();var order=column.order===givenOrder?null:givenOrder||this.toggleOrder(column);var target=event.target;while(target&&target.tagName!=='TH'){target=target.parentNode;}if(target&&target.tagName==='TH'){if(Object(dom_["hasClass"])(target,'noclick')){Object(dom_["removeClass"])(target,'noclick');return;}}if(!column.sortable)return;var states=this.store.states;var sortProp=states.sortProp;var sortOrder=void 0;var sortingColumn=states.sortingColumn;if(sortingColumn!==column||sortingColumn===column&&sortingColumn.order===null){if(sortingColumn){sortingColumn.order=null;}states.sortingColumn=column;sortProp=column.property;}if(!order){sortOrder=column.order=null;}else{sortOrder=column.order=order;}states.sortProp=sortProp;states.sortOrder=sortOrder;this.store.commit('changeSortCondition');}},data:function data(){return{draggingColumn:null,dragging:false,dragState:{}};}};// CONCATENATED MODULE: ./packages/table/src/table-footer.js
var table_footer_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};/* harmony default export */var table_footer={name:'ElTableFooter',mixins:[layout_observer],render:function render(h){var _this=this;var sums=[];if(this.summaryMethod){sums=this.summaryMethod({columns:this.columns,data:this.store.states.data});}else{this.columns.forEach(function(column,index){if(index===0){sums[index]=_this.sumText;return;}var values=_this.store.states.data.map(function(item){return Number(item[column.property]);});var precisions=[];var notNumber=true;values.forEach(function(value){if(!isNaN(value)){notNumber=false;var decimal=(''+value).split('.')[1];precisions.push(decimal?decimal.length:0);}});var precision=Math.max.apply(null,precisions);if(!notNumber){sums[index]=values.reduce(function(prev,curr){var value=Number(curr);if(!isNaN(value)){return parseFloat((prev+curr).toFixed(Math.min(precision,20)));}else{return prev;}},0);}else{sums[index]='';}});}return h('table',{'class':'el-table__footer',attrs:{cellspacing:'0',cellpadding:'0',border:'0'}},[h('colgroup',[this.columns.map(function(column){return h('col',{attrs:{name:column.id},key:column.id});}),this.hasGutter?h('col',{attrs:{name:'gutter'}}):'']),h('tbody',{'class':[{'has-gutter':this.hasGutter}]},[h('tr',[this.columns.map(function(column,cellIndex){return h('td',{key:cellIndex,attrs:{colspan:column.colSpan,rowspan:column.rowSpan},'class':_this.getRowClasses(column,cellIndex)},[h('div',{'class':['cell',column.labelClassName]},[sums[cellIndex]])]);}),this.hasGutter?h('th',{'class':'gutter'}):''])])]);},props:{fixed:String,store:{required:true},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:function _default(){return{prop:'',order:''};}}},computed:table_footer_extends({table:function table(){return this.$parent;},hasGutter:function hasGutter(){return!this.fixed&&this.tableLayout.gutterWidth;}},mapStates({columns:'columns',isAllSelected:'isAllSelected',leftFixedLeafCount:'fixedLeafColumnsLength',rightFixedLeafCount:'rightFixedLeafColumnsLength',columnsCount:function columnsCount(states){return states.columns.length;},leftFixedCount:function leftFixedCount(states){return states.fixedColumns.length;},rightFixedCount:function rightFixedCount(states){return states.rightFixedColumns.length;}})),methods:{isCellHidden:function isCellHidden(index,columns,column){if(this.fixed===true||this.fixed==='left'){return index>=this.leftFixedLeafCount;}else if(this.fixed==='right'){var before=0;for(var i=0;i<index;i++){before+=columns[i].colSpan;}return before<this.columnsCount-this.rightFixedLeafCount;}else if(!this.fixed&&column.fixed){// hide cell when footer instance is not fixed and column is fixed
return true;}else{return index<this.leftFixedCount||index>=this.columnsCount-this.rightFixedCount;}},getRowClasses:function getRowClasses(column,cellIndex){var classes=[column.id,column.align,column.labelClassName];if(column.className){classes.push(column.className);}if(this.isCellHidden(cellIndex,this.columns,column)){classes.push('is-hidden');}if(!column.children){classes.push('is-leaf');}return classes;}}};// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/table/src/table.vue?vue&type=script&lang=js&
var tablevue_type_script_lang_js_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var tableIdSeed=1;/* harmony default export */var tablevue_type_script_lang_js_={name:'ElTable',mixins:[locale_default.a,migrating_default.a],directives:{Mousewheel:directives_mousewheel},props:{data:{type:Array,default:function _default(){return[];}},size:String,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:true},stripe:Boolean,border:Boolean,rowKey:[String,Function],context:{},showHeader:{type:Boolean,default:true},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,defaultSort:Object,tooltipEffect:String,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:true},indent:{type:Number,default:16},treeProps:{type:Object,default:function _default(){return{hasChildren:'hasChildren',children:'children'};}},lazy:Boolean,load:Function},components:{TableHeader:table_header,TableFooter:table_footer,TableBody:table_body,ElCheckbox:checkbox_default.a},methods:{getMigratingConfig:function getMigratingConfig(){return{events:{expand:'expand is renamed to expand-change'}};},setCurrentRow:function setCurrentRow(row){this.store.commit('setCurrentRow',row);},toggleRowSelection:function toggleRowSelection(row,selected){this.store.toggleRowSelection(row,selected,false);this.store.updateAllSelected();},toggleRowExpansion:function toggleRowExpansion(row,expanded){this.store.toggleRowExpansionAdapter(row,expanded);},clearSelection:function clearSelection(){this.store.clearSelection();},clearFilter:function clearFilter(columnKeys){this.store.clearFilter(columnKeys);},clearSort:function clearSort(){this.store.clearSort();},handleMouseLeave:function handleMouseLeave(){this.store.commit('setHoverRow',null);if(this.hoverState)this.hoverState=null;},updateScrollY:function updateScrollY(){var changed=this.layout.updateScrollY();if(changed){this.layout.notifyObservers('scrollable');this.layout.updateColumnsWidth();}},handleFixedMousewheel:function handleFixedMousewheel(event,data){var bodyWrapper=this.bodyWrapper;if(Math.abs(data.spinY)>0){var currentScrollTop=bodyWrapper.scrollTop;if(data.pixelY<0&&currentScrollTop!==0){event.preventDefault();}if(data.pixelY>0&&bodyWrapper.scrollHeight-bodyWrapper.clientHeight>currentScrollTop){event.preventDefault();}bodyWrapper.scrollTop+=Math.ceil(data.pixelY/5);}else{bodyWrapper.scrollLeft+=Math.ceil(data.pixelX/5);}},handleHeaderFooterMousewheel:function handleHeaderFooterMousewheel(event,data){var pixelX=data.pixelX,pixelY=data.pixelY;if(Math.abs(pixelX)>=Math.abs(pixelY)){this.bodyWrapper.scrollLeft+=data.pixelX/5;}},// TODO 使用 CSS transform
syncPostion:Object(external_throttle_debounce_["throttle"])(20,function(){var _bodyWrapper=this.bodyWrapper,scrollLeft=_bodyWrapper.scrollLeft,scrollTop=_bodyWrapper.scrollTop,offsetWidth=_bodyWrapper.offsetWidth,scrollWidth=_bodyWrapper.scrollWidth;var _$refs=this.$refs,headerWrapper=_$refs.headerWrapper,footerWrapper=_$refs.footerWrapper,fixedBodyWrapper=_$refs.fixedBodyWrapper,rightFixedBodyWrapper=_$refs.rightFixedBodyWrapper;if(headerWrapper)headerWrapper.scrollLeft=scrollLeft;if(footerWrapper)footerWrapper.scrollLeft=scrollLeft;if(fixedBodyWrapper)fixedBodyWrapper.scrollTop=scrollTop;if(rightFixedBodyWrapper)rightFixedBodyWrapper.scrollTop=scrollTop;var maxScrollLeftPosition=scrollWidth-offsetWidth-1;if(scrollLeft>=maxScrollLeftPosition){this.scrollPosition='right';}else if(scrollLeft===0){this.scrollPosition='left';}else{this.scrollPosition='middle';}}),bindEvents:function bindEvents(){this.bodyWrapper.addEventListener('scroll',this.syncPostion,{passive:true});if(this.fit){Object(resize_event_["addResizeListener"])(this.$el,this.resizeListener);}},unbindEvents:function unbindEvents(){this.bodyWrapper.removeEventListener('scroll',this.syncPostion,{passive:true});if(this.fit){Object(resize_event_["removeResizeListener"])(this.$el,this.resizeListener);}},resizeListener:function resizeListener(){if(!this.$ready)return;var shouldUpdateLayout=false;var el=this.$el;var _resizeState=this.resizeState,oldWidth=_resizeState.width,oldHeight=_resizeState.height;var width=el.offsetWidth;if(oldWidth!==width){shouldUpdateLayout=true;}var height=el.offsetHeight;if((this.height||this.shouldUpdateHeight)&&oldHeight!==height){shouldUpdateLayout=true;}if(shouldUpdateLayout){this.resizeState.width=width;this.resizeState.height=height;this.doLayout();}},doLayout:function doLayout(){if(this.shouldUpdateHeight){this.layout.updateElsHeight();}this.layout.updateColumnsWidth();},sort:function sort(prop,order){this.store.commit('sort',{prop:prop,order:order});},toggleAllSelection:function toggleAllSelection(){this.store.commit('toggleAllSelection');}},computed:tablevue_type_script_lang_js_extends({tableSize:function tableSize(){return this.size||(this.$ELEMENT||{}).size;},bodyWrapper:function bodyWrapper(){return this.$refs.bodyWrapper;},shouldUpdateHeight:function shouldUpdateHeight(){return this.height||this.maxHeight||this.fixedColumns.length>0||this.rightFixedColumns.length>0;},bodyWidth:function bodyWidth(){var _layout=this.layout,bodyWidth=_layout.bodyWidth,scrollY=_layout.scrollY,gutterWidth=_layout.gutterWidth;return bodyWidth?bodyWidth-(scrollY?gutterWidth:0)+'px':'';},bodyHeight:function bodyHeight(){var _layout2=this.layout,_layout2$headerHeight=_layout2.headerHeight,headerHeight=_layout2$headerHeight===undefined?0:_layout2$headerHeight,bodyHeight=_layout2.bodyHeight,_layout2$footerHeight=_layout2.footerHeight,footerHeight=_layout2$footerHeight===undefined?0:_layout2$footerHeight;if(this.height){return{height:bodyHeight?bodyHeight+'px':''};}else if(this.maxHeight){var maxHeight=parseHeight(this.maxHeight);if(typeof maxHeight==='number'){return{'max-height':maxHeight-footerHeight-(this.showHeader?headerHeight:0)+'px'};}}return{};},fixedBodyHeight:function fixedBodyHeight(){if(this.height){return{height:this.layout.fixedBodyHeight?this.layout.fixedBodyHeight+'px':''};}else if(this.maxHeight){var maxHeight=parseHeight(this.maxHeight);if(typeof maxHeight==='number'){maxHeight=this.layout.scrollX?maxHeight-this.layout.gutterWidth:maxHeight;if(this.showHeader){maxHeight-=this.layout.headerHeight;}maxHeight-=this.layout.footerHeight;return{'max-height':maxHeight+'px'};}}return{};},fixedHeight:function fixedHeight(){if(this.maxHeight){if(this.showSummary){return{bottom:0};}return{bottom:this.layout.scrollX&&this.data.length?this.layout.gutterWidth+'px':''};}else{if(this.showSummary){return{height:this.layout.tableHeight?this.layout.tableHeight+'px':''};}return{height:this.layout.viewportHeight?this.layout.viewportHeight+'px':''};}},emptyBlockStyle:function emptyBlockStyle(){if(this.data&&this.data.length)return null;var height='100%';if(this.layout.appendHeight){height='calc(100% - '+this.layout.appendHeight+'px)';}return{width:this.bodyWidth,height:height};}},mapStates({selection:'selection',columns:'columns',tableData:'data',fixedColumns:'fixedColumns',rightFixedColumns:'rightFixedColumns'})),watch:{height:{immediate:true,handler:function handler(value){this.layout.setHeight(value);}},maxHeight:{immediate:true,handler:function handler(value){this.layout.setMaxHeight(value);}},currentRowKey:{immediate:true,handler:function handler(value){if(!this.rowKey)return;this.store.setCurrentRowKey(value);}},data:{immediate:true,handler:function handler(value){this.store.commit('setData',value);}},expandRowKeys:{immediate:true,handler:function handler(newVal){if(newVal){this.store.setExpandRowKeysAdapter(newVal);}}}},created:function created(){var _this=this;this.tableId='el-table_'+tableIdSeed++;this.debouncedUpdateLayout=Object(external_throttle_debounce_["debounce"])(50,function(){return _this.doLayout();});},mounted:function mounted(){var _this2=this;this.bindEvents();this.store.updateColumns();this.doLayout();this.resizeState={width:this.$el.offsetWidth,height:this.$el.offsetHeight};// init filters
this.store.states.columns.forEach(function(column){if(column.filteredValue&&column.filteredValue.length){_this2.store.commit('filterChange',{column:column,values:column.filteredValue,silent:true});}});this.$ready=true;},destroyed:function destroyed(){this.unbindEvents();},data:function data(){var _treeProps=this.treeProps,_treeProps$hasChildre=_treeProps.hasChildren,hasChildren=_treeProps$hasChildre===undefined?'hasChildren':_treeProps$hasChildre,_treeProps$children=_treeProps.children,children=_treeProps$children===undefined?'children':_treeProps$children;this.store=createStore(this,{rowKey:this.rowKey,defaultExpandAll:this.defaultExpandAll,selectOnIndeterminate:this.selectOnIndeterminate,// TreeTable 的相关配置
indent:this.indent,lazy:this.lazy,lazyColumnIdentifier:hasChildren,childrenColumnName:children});var layout=new table_layout({store:this.store,table:this,fit:this.fit,showHeader:this.showHeader});return{layout:layout,isHidden:false,renderExpanded:null,resizeProxyVisible:false,resizeState:{width:null,height:null},// 是否拥有多级表头
isGroup:false,scrollPosition:'left'};}};// CONCATENATED MODULE: ./packages/table/src/table.vue?vue&type=script&lang=js&
/* harmony default export */var src_tablevue_type_script_lang_js_=tablevue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/table/src/table.vue
/* normalize component */var table_component=normalizeComponent(src_tablevue_type_script_lang_js_,tablevue_type_template_id_493fe34e_render,tablevue_type_template_id_493fe34e_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var table_api; }table_component.options.__file="packages/table/src/table.vue";/* harmony default export */var src_table=table_component.exports;// CONCATENATED MODULE: ./packages/table/index.js
/* istanbul ignore next */src_table.install=function(Vue){Vue.component(src_table.name,src_table);};/* harmony default export */var packages_table=src_table;// CONCATENATED MODULE: ./packages/table/src/config.js
var cellStarts={default:{order:''},selection:{width:48,minWidth:48,realWidth:48,order:'',className:'el-table-column--selection'},expand:{width:48,minWidth:48,realWidth:48,order:''},index:{width:48,minWidth:48,realWidth:48,order:''}};// 这些选项不应该被覆盖
var cellForced={selection:{renderHeader:function renderHeader(h,_ref){var store=_ref.store;return h('el-checkbox',{attrs:{disabled:store.states.data&&store.states.data.length===0,indeterminate:store.states.selection.length>0&&!this.isAllSelected,value:this.isAllSelected},nativeOn:{'click':this.toggleAllSelection}});},renderCell:function renderCell(h,_ref2){var row=_ref2.row,column=_ref2.column,store=_ref2.store,$index=_ref2.$index;return h('el-checkbox',{nativeOn:{'click':function click(event){return event.stopPropagation();}},attrs:{value:store.isSelected(row),disabled:column.selectable?!column.selectable.call(null,row,$index):false},on:{'input':function input(){store.commit('rowSelectedChanged',row);}}});},sortable:false,resizable:false},index:{renderHeader:function renderHeader(h,_ref3){var column=_ref3.column;return column.label||'#';},renderCell:function renderCell(h,_ref4){var $index=_ref4.$index,column=_ref4.column;var i=$index+1;var index=column.index;if(typeof index==='number'){i=$index+index;}else if(typeof index==='function'){i=index($index);}return h('div',[i]);},sortable:false},expand:{renderHeader:function renderHeader(h,_ref5){var column=_ref5.column;return column.label||'';},renderCell:function renderCell(h,_ref6){var row=_ref6.row,store=_ref6.store;var classes=['el-table__expand-icon'];if(store.states.expandRows.indexOf(row)>-1){classes.push('el-table__expand-icon--expanded');}var callback=function callback(e){e.stopPropagation();store.toggleRowExpansion(row);};return h('div',{'class':classes,on:{'click':callback}},[h('i',{'class':'el-icon el-icon-arrow-right'})]);},sortable:false,resizable:false,className:'el-table__expand-column'}};function defaultRenderCell(h,_ref7){var row=_ref7.row,column=_ref7.column,$index=_ref7.$index;var property=column.property;var value=property&&Object(util_["getPropByPath"])(row,property).v;if(column&&column.formatter){return column.formatter(row,column,value,$index);}return value;}function treeCellPrefix(h,_ref8){var row=_ref8.row,treeNode=_ref8.treeNode,store=_ref8.store;if(!treeNode)return null;var ele=[];var callback=function callback(e){e.stopPropagation();store.loadOrToggle(row);};if(treeNode.indent){ele.push(h('span',{'class':'el-table__indent',style:{'padding-left':treeNode.indent+'px'}}));}if(typeof treeNode.expanded==='boolean'&&!treeNode.noLazyChildren){var expandClasses=['el-table__expand-icon',treeNode.expanded?'el-table__expand-icon--expanded':''];var iconClasses=['el-icon-arrow-right'];if(treeNode.loading){iconClasses=['el-icon-loading'];}ele.push(h('div',{'class':expandClasses,on:{'click':callback}},[h('i',{'class':iconClasses})]));}else{ele.push(h('span',{'class':'el-table__placeholder'}));}return ele;}// CONCATENATED MODULE: ./packages/table/src/table-column.js
var table_column_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};var columnIdSeed=1;/* harmony default export */var table_column={name:'ElTableColumn',props:{type:{type:String,default:'default'},label:String,className:String,labelClassName:String,property:String,prop:String,width:{},minWidth:{},renderHeader:Function,sortable:{type:[Boolean,String],default:false},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:true},columnKey:String,align:String,headerAlign:String,showTooltipWhenOverflow:Boolean,showOverflowTooltip:Boolean,fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:true},index:[Number,Function],sortOrders:{type:Array,default:function _default(){return['ascending','descending',null];},validator:function validator(val){return val.every(function(order){return['ascending','descending',null].indexOf(order)>-1;});}}},data:function data(){return{isSubColumn:false,columns:[]};},computed:{owner:function owner(){var parent=this.$parent;while(parent&&!parent.tableId){parent=parent.$parent;}return parent;},columnOrTableParent:function columnOrTableParent(){var parent=this.$parent;while(parent&&!parent.tableId&&!parent.columnId){parent=parent.$parent;}return parent;},realWidth:function realWidth(){return parseWidth(this.width);},realMinWidth:function realMinWidth(){return parseMinWidth(this.minWidth);},realAlign:function realAlign(){return this.align?'is-'+this.align:null;},realHeaderAlign:function realHeaderAlign(){return this.headerAlign?'is-'+this.headerAlign:this.realAlign;}},methods:{getPropsData:function getPropsData(){var _this=this;for(var _len=arguments.length,props=Array(_len),_key=0;_key<_len;_key++){props[_key]=arguments[_key];}return props.reduce(function(prev,cur){if(Array.isArray(cur)){cur.forEach(function(key){prev[key]=_this[key];});}return prev;},{});},getColumnElIndex:function getColumnElIndex(children,child){return[].indexOf.call(children,child);},setColumnWidth:function setColumnWidth(column){if(this.realWidth){column.width=this.realWidth;}if(this.realMinWidth){column.minWidth=this.realMinWidth;}if(!column.minWidth){column.minWidth=80;}column.realWidth=column.width===undefined?column.minWidth:column.width;return column;},setColumnForcedProps:function setColumnForcedProps(column){// 对于特定类型的 column，某些属性不允许设置
var type=column.type;var source=cellForced[type]||{};Object.keys(source).forEach(function(prop){var value=source[prop];if(value!==undefined){column[prop]=prop==='className'?column[prop]+' '+value:value;}});return column;},setColumnRenders:function setColumnRenders(column){var _this2=this;var h=this.$createElement;// renderHeader 属性不推荐使用。
if(this.renderHeader){console.warn('[Element Warn][TableColumn]Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header.');}else if(column.type!=='selection'){column.renderHeader=function(h,scope){var renderHeader=_this2.$scopedSlots.header;return renderHeader?renderHeader(scope):column.label;};}var originRenderCell=column.renderCell;// TODO: 这里的实现调整
if(column.type==='expand'){// 对于展开行，renderCell 不允许配置的。在上一步中已经设置过，这里需要简单封装一下。
column.renderCell=function(h,data){return h('div',{'class':'cell'},[originRenderCell(h,data)]);};this.owner.renderExpanded=function(h,data){return _this2.$scopedSlots.default?_this2.$scopedSlots.default(data):_this2.$slots.default;};}else{originRenderCell=originRenderCell||defaultRenderCell;// 对 renderCell 进行包装
column.renderCell=function(h,data){var children=null;if(_this2.$scopedSlots.default){children=_this2.$scopedSlots.default(data);}else{children=originRenderCell(h,data);}var prefix=treeCellPrefix(h,data);var props={class:'cell',style:{}};if(column.showOverflowTooltip){props.class+=' el-tooltip';props.style={width:(data.column.realWidth||data.column.width)-1+'px'};}return h('div',props,[prefix,children]);};}return column;},registerNormalWatchers:function registerNormalWatchers(){var _this3=this;var props=['label','property','filters','filterMultiple','sortable','index','formatter','className','labelClassName','showOverflowTooltip'];// 一些属性具有别名
var aliases={prop:'property',realAlign:'align',realHeaderAlign:'headerAlign',realWidth:'width'};var allAliases=props.reduce(function(prev,cur){prev[cur]=cur;return prev;},aliases);Object.keys(allAliases).forEach(function(key){var columnKey=aliases[key];_this3.$watch(key,function(newVal){_this3.columnConfig[columnKey]=newVal;});});},registerComplexWatchers:function registerComplexWatchers(){var _this4=this;var props=['fixed'];var aliases={realWidth:'width',realMinWidth:'minWidth'};var allAliases=props.reduce(function(prev,cur){prev[cur]=cur;return prev;},aliases);Object.keys(allAliases).forEach(function(key){var columnKey=aliases[key];_this4.$watch(key,function(newVal){_this4.columnConfig[columnKey]=newVal;var updateColumns=columnKey==='fixed';_this4.owner.store.scheduleLayout(updateColumns);});});}},components:{ElCheckbox:checkbox_default.a},beforeCreate:function beforeCreate(){this.row={};this.column={};this.$index=0;this.columnId='';},created:function created(){var parent=this.columnOrTableParent;this.isSubColumn=this.owner!==parent;this.columnId=(parent.tableId||parent.columnId)+'_column_'+columnIdSeed++;var type=this.type||'default';var sortable=this.sortable===''?true:this.sortable;var defaults=table_column_extends({},cellStarts[type],{id:this.columnId,type:type,property:this.prop||this.property,align:this.realAlign,headerAlign:this.realHeaderAlign,showOverflowTooltip:this.showOverflowTooltip||this.showTooltipWhenOverflow,// filter 相关属性
filterable:this.filters||this.filterMethod,filteredValue:[],filterPlacement:'',isColumnGroup:false,filterOpened:false,// sort 相关属性
sortable:sortable,// index 列
index:this.index});var basicProps=['columnKey','label','className','labelClassName','type','renderHeader','formatter','fixed','resizable'];var sortProps=['sortMethod','sortBy','sortOrders'];var selectProps=['selectable','reserveSelection'];var filterProps=['filterMethod','filters','filterMultiple','filterOpened','filteredValue','filterPlacement'];var column=this.getPropsData(basicProps,sortProps,selectProps,filterProps);column=mergeOptions(defaults,column);// 注意 compose 中函数执行的顺序是从右到左
var chains=compose(this.setColumnRenders,this.setColumnWidth,this.setColumnForcedProps);column=chains(column);this.columnConfig=column;// 注册 watcher
this.registerNormalWatchers();this.registerComplexWatchers();},mounted:function mounted(){var owner=this.owner;var parent=this.columnOrTableParent;var children=this.isSubColumn?parent.$el.children:parent.$refs.hiddenColumns.children;var columnIndex=this.getColumnElIndex(children,this.$el);owner.store.commit('insertColumn',this.columnConfig,columnIndex,this.isSubColumn?parent.columnConfig:null);},destroyed:function destroyed(){if(!this.$parent)return;var parent=this.$parent;this.owner.store.commit('removeColumn',this.columnConfig,this.isSubColumn?parent.columnConfig:null);},render:function render(h){// slots 也要渲染，需要计算合并表头
return h('div',this.$slots.default);}};// CONCATENATED MODULE: ./packages/table-column/index.js
/* istanbul ignore next */table_column.install=function(Vue){Vue.component(table_column.name,table_column);};/* harmony default export */var packages_table_column=table_column;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/picker.vue?vue&type=template&id=79ae069f&
var pickervue_type_template_id_79ae069f_render=function pickervue_type_template_id_79ae069f_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return!_vm.ranged?_c("el-input",_vm._b({directives:[{name:"clickoutside",rawName:"v-clickoutside",value:_vm.handleClose,expression:"handleClose"}],ref:"reference",staticClass:"el-date-editor",class:"el-date-editor--"+_vm.type,attrs:{readonly:!_vm.editable||_vm.readonly||_vm.type==="dates"||_vm.type==="week",disabled:_vm.pickerDisabled,size:_vm.pickerSize,name:_vm.name,placeholder:_vm.placeholder,value:_vm.displayValue,validateEvent:false},on:{focus:_vm.handleFocus,input:function input(value){return _vm.userInput=value;},change:_vm.handleChange},nativeOn:{keydown:function keydown($event){return _vm.handleKeydown($event);},mouseenter:function mouseenter($event){return _vm.handleMouseEnter($event);},mouseleave:function mouseleave($event){_vm.showClose=false;}}},"el-input",_vm.firstInputId,false),[_c("i",{staticClass:"el-input__icon",class:_vm.triggerClass,attrs:{slot:"prefix"},on:{click:_vm.handleFocus},slot:"prefix"}),_vm.haveTrigger?_c("i",{staticClass:"el-input__icon",class:[_vm.showClose?""+_vm.clearIcon:""],attrs:{slot:"suffix"},on:{click:_vm.handleClickIcon},slot:"suffix"}):_vm._e()]):_c("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:_vm.handleClose,expression:"handleClose"}],ref:"reference",staticClass:"el-date-editor el-range-editor el-input__inner",class:["el-date-editor--"+_vm.type,_vm.pickerSize?"el-range-editor--"+_vm.pickerSize:"",_vm.pickerDisabled?"is-disabled":"",_vm.pickerVisible?"is-active":""],on:{click:_vm.handleRangeClick,mouseenter:_vm.handleMouseEnter,mouseleave:function mouseleave($event){_vm.showClose=false;},keydown:_vm.handleKeydown}},[_c("i",{class:["el-input__icon","el-range__icon",_vm.triggerClass]}),_c("input",_vm._b({staticClass:"el-range-input",attrs:{autocomplete:"off",placeholder:_vm.startPlaceholder,disabled:_vm.pickerDisabled,readonly:!_vm.editable||_vm.readonly,name:_vm.name&&_vm.name[0]},domProps:{value:_vm.displayValue&&_vm.displayValue[0]},on:{input:_vm.handleStartInput,change:_vm.handleStartChange,focus:_vm.handleFocus}},"input",_vm.firstInputId,false)),_vm._t("range-separator",[_c("span",{staticClass:"el-range-separator"},[_vm._v(_vm._s(_vm.rangeSeparator))])]),_c("input",_vm._b({staticClass:"el-range-input",attrs:{autocomplete:"off",placeholder:_vm.endPlaceholder,disabled:_vm.pickerDisabled,readonly:!_vm.editable||_vm.readonly,name:_vm.name&&_vm.name[1]},domProps:{value:_vm.displayValue&&_vm.displayValue[1]},on:{input:_vm.handleEndInput,change:_vm.handleEndChange,focus:_vm.handleFocus}},"input",_vm.secondInputId,false)),_vm.haveTrigger?_c("i",{staticClass:"el-input__icon el-range__close-icon",class:[_vm.showClose?""+_vm.clearIcon:""],on:{click:_vm.handleClickIcon}}):_vm._e()],2);};var pickervue_type_template_id_79ae069f_staticRenderFns=[];pickervue_type_template_id_79ae069f_render._withStripped=true;// CONCATENATED MODULE: ./packages/date-picker/src/picker.vue?vue&type=template&id=79ae069f&
// EXTERNAL MODULE: external "element-ui/lib/utils/date-util"
var date_util_=__webpack_require__(0);// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/picker.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var NewPopper={props:{appendToBody:vue_popper_default.a.props.appendToBody,offset:vue_popper_default.a.props.offset,boundariesPadding:vue_popper_default.a.props.boundariesPadding,arrowOffset:vue_popper_default.a.props.arrowOffset},methods:vue_popper_default.a.methods,data:function data(){return merge_default()({visibleArrow:true},vue_popper_default.a.data);},beforeDestroy:vue_popper_default.a.beforeDestroy};var DEFAULT_FORMATS={date:'yyyy-MM-dd',month:'yyyy-MM',datetime:'yyyy-MM-dd HH:mm:ss',time:'HH:mm:ss',week:'yyyywWW',timerange:'HH:mm:ss',daterange:'yyyy-MM-dd',monthrange:'yyyy-MM',datetimerange:'yyyy-MM-dd HH:mm:ss',year:'yyyy'};var HAVE_TRIGGER_TYPES=['date','datetime','time','time-select','week','month','year','daterange','monthrange','timerange','datetimerange','dates'];var pickervue_type_script_lang_js_DATE_FORMATTER=function DATE_FORMATTER(value,format){if(format==='timestamp')return value.getTime();return Object(date_util_["formatDate"])(value,format);};var pickervue_type_script_lang_js_DATE_PARSER=function DATE_PARSER(text,format){if(format==='timestamp')return new Date(Number(text));return Object(date_util_["parseDate"])(text,format);};var RANGE_FORMATTER=function RANGE_FORMATTER(value,format){if(Array.isArray(value)&&value.length===2){var start=value[0];var end=value[1];if(start&&end){return[pickervue_type_script_lang_js_DATE_FORMATTER(start,format),pickervue_type_script_lang_js_DATE_FORMATTER(end,format)];}}return'';};var RANGE_PARSER=function RANGE_PARSER(array,format,separator){if(!Array.isArray(array)){array=array.split(separator);}if(array.length===2){var range1=array[0];var range2=array[1];return[pickervue_type_script_lang_js_DATE_PARSER(range1,format),pickervue_type_script_lang_js_DATE_PARSER(range2,format)];}return[];};var TYPE_VALUE_RESOLVER_MAP={default:{formatter:function formatter(value){if(!value)return'';return''+value;},parser:function parser(text){if(text===undefined||text==='')return null;return text;}},week:{formatter:function formatter(value,format){var week=Object(date_util_["getWeekNumber"])(value);var month=value.getMonth();var trueDate=new Date(value);if(week===1&&month===11){trueDate.setHours(0,0,0,0);trueDate.setDate(trueDate.getDate()+3-(trueDate.getDay()+6)%7);}var date=Object(date_util_["formatDate"])(trueDate,format);date=/WW/.test(date)?date.replace(/WW/,week<10?'0'+week:week):date.replace(/W/,week);return date;},parser:function parser(text,format){// parse as if a normal date
return TYPE_VALUE_RESOLVER_MAP.date.parser(text,format);}},date:{formatter:pickervue_type_script_lang_js_DATE_FORMATTER,parser:pickervue_type_script_lang_js_DATE_PARSER},datetime:{formatter:pickervue_type_script_lang_js_DATE_FORMATTER,parser:pickervue_type_script_lang_js_DATE_PARSER},daterange:{formatter:RANGE_FORMATTER,parser:RANGE_PARSER},monthrange:{formatter:RANGE_FORMATTER,parser:RANGE_PARSER},datetimerange:{formatter:RANGE_FORMATTER,parser:RANGE_PARSER},timerange:{formatter:RANGE_FORMATTER,parser:RANGE_PARSER},time:{formatter:pickervue_type_script_lang_js_DATE_FORMATTER,parser:pickervue_type_script_lang_js_DATE_PARSER},month:{formatter:pickervue_type_script_lang_js_DATE_FORMATTER,parser:pickervue_type_script_lang_js_DATE_PARSER},year:{formatter:pickervue_type_script_lang_js_DATE_FORMATTER,parser:pickervue_type_script_lang_js_DATE_PARSER},number:{formatter:function formatter(value){if(!value)return'';return''+value;},parser:function parser(text){var result=Number(text);if(!isNaN(text)){return result;}else{return null;}}},dates:{formatter:function formatter(value,format){return value.map(function(date){return pickervue_type_script_lang_js_DATE_FORMATTER(date,format);});},parser:function parser(value,format){return(typeof value==='string'?value.split(', '):value).map(function(date){return date instanceof Date?date:pickervue_type_script_lang_js_DATE_PARSER(date,format);});}}};var PLACEMENT_MAP={left:'bottom-start',center:'bottom',right:'bottom-end'};var parseAsFormatAndType=function parseAsFormatAndType(value,customFormat,type){var rangeSeparator=arguments.length>3&&arguments[3]!==undefined?arguments[3]:'-';if(!value)return null;var parser=(TYPE_VALUE_RESOLVER_MAP[type]||TYPE_VALUE_RESOLVER_MAP['default']).parser;var format=customFormat||DEFAULT_FORMATS[type];return parser(value,format,rangeSeparator);};var formatAsFormatAndType=function formatAsFormatAndType(value,customFormat,type){if(!value)return null;var formatter=(TYPE_VALUE_RESOLVER_MAP[type]||TYPE_VALUE_RESOLVER_MAP['default']).formatter;var format=customFormat||DEFAULT_FORMATS[type];return formatter(value,format);};/*
 * Considers:
 *   1. Date object
 *   2. date string
 *   3. array of 1 or 2
 */var valueEquals=function valueEquals(a,b){// considers Date object and string
var dateEquals=function dateEquals(a,b){var aIsDate=a instanceof Date;var bIsDate=b instanceof Date;if(aIsDate&&bIsDate){return a.getTime()===b.getTime();}if(!aIsDate&&!bIsDate){return a===b;}return false;};var aIsArray=a instanceof Array;var bIsArray=b instanceof Array;if(aIsArray&&bIsArray){if(a.length!==b.length){return false;}return a.every(function(item,index){return dateEquals(item,b[index]);});}if(!aIsArray&&!bIsArray){return dateEquals(a,b);}return false;};var isString=function isString(val){return typeof val==='string'||val instanceof String;};var pickervue_type_script_lang_js_validator=function validator(val){// either: String, Array of String, null / undefined
return val===null||val===undefined||isString(val)||Array.isArray(val)&&val.length===2&&val.every(isString);};/* harmony default export */var pickervue_type_script_lang_js_={mixins:[emitter_default.a,NewPopper],inject:{elForm:{default:''},elFormItem:{default:''}},props:{size:String,format:String,valueFormat:String,readonly:Boolean,placeholder:String,startPlaceholder:String,endPlaceholder:String,prefixIcon:String,clearIcon:{type:String,default:'el-icon-circle-close'},name:{default:'',validator:pickervue_type_script_lang_js_validator},disabled:Boolean,clearable:{type:Boolean,default:true},id:{default:'',validator:pickervue_type_script_lang_js_validator},popperClass:String,editable:{type:Boolean,default:true},align:{type:String,default:'left'},value:{},defaultValue:{},defaultTime:{},rangeSeparator:{default:'-'},pickerOptions:{},unlinkPanels:Boolean,validateEvent:{type:Boolean,default:true}},components:{ElInput:input_default.a},directives:{Clickoutside:clickoutside_default.a},data:function data(){return{pickerVisible:false,showClose:false,userInput:null,valueOnOpen:null,// value when picker opens, used to determine whether to emit change
unwatchPickerOptions:null};},watch:{pickerVisible:function pickerVisible(val){if(this.readonly||this.pickerDisabled)return;if(val){this.showPicker();this.valueOnOpen=Array.isArray(this.value)?[].concat(this.value):this.value;}else{this.hidePicker();this.emitChange(this.value);this.userInput=null;if(this.validateEvent){this.dispatch('ElFormItem','el.form.blur');}this.$emit('blur',this);this.blur();}},parsedValue:{immediate:true,handler:function handler(val){if(this.picker){this.picker.value=val;}}},defaultValue:function defaultValue(val){// NOTE: should eventually move to jsx style picker + panel ?
if(this.picker){this.picker.defaultValue=val;}},value:function value(val,oldVal){if(!valueEquals(val,oldVal)&&!this.pickerVisible&&this.validateEvent){this.dispatch('ElFormItem','el.form.change',val);}}},computed:{ranged:function ranged(){return this.type.indexOf('range')>-1;},reference:function reference(){var reference=this.$refs.reference;return reference.$el||reference;},refInput:function refInput(){if(this.reference){return[].slice.call(this.reference.querySelectorAll('input'));}return[];},valueIsEmpty:function valueIsEmpty(){var val=this.value;if(Array.isArray(val)){for(var i=0,len=val.length;i<len;i++){if(val[i]){return false;}}}else{if(val){return false;}}return true;},triggerClass:function triggerClass(){return this.prefixIcon||(this.type.indexOf('time')!==-1?'el-icon-time':'el-icon-date');},selectionMode:function selectionMode(){if(this.type==='week'){return'week';}else if(this.type==='month'){return'month';}else if(this.type==='year'){return'year';}else if(this.type==='dates'){return'dates';}return'day';},haveTrigger:function haveTrigger(){if(typeof this.showTrigger!=='undefined'){return this.showTrigger;}return HAVE_TRIGGER_TYPES.indexOf(this.type)!==-1;},displayValue:function displayValue(){var formattedValue=formatAsFormatAndType(this.parsedValue,this.format,this.type,this.rangeSeparator);if(Array.isArray(this.userInput)){return[this.userInput[0]||formattedValue&&formattedValue[0]||'',this.userInput[1]||formattedValue&&formattedValue[1]||''];}else if(this.userInput!==null){return this.userInput;}else if(formattedValue){return this.type==='dates'?formattedValue.join(', '):formattedValue;}else{return'';}},parsedValue:function parsedValue(){if(!this.value)return this.value;// component value is not set
if(this.type==='time-select')return this.value;// time-select does not require parsing, this might change in next major version
var valueIsDateObject=Object(date_util_["isDateObject"])(this.value)||Array.isArray(this.value)&&this.value.every(date_util_["isDateObject"]);if(valueIsDateObject){return this.value;}if(this.valueFormat){return parseAsFormatAndType(this.value,this.valueFormat,this.type,this.rangeSeparator)||this.value;}// NOTE: deal with common but incorrect usage, should remove in next major version
// user might provide string / timestamp without value-format, coerce them into date (or array of date)
return Array.isArray(this.value)?this.value.map(function(val){return new Date(val);}):new Date(this.value);},_elFormItemSize:function _elFormItemSize(){return(this.elFormItem||{}).elFormItemSize;},pickerSize:function pickerSize(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size;},pickerDisabled:function pickerDisabled(){return this.disabled||(this.elForm||{}).disabled;},firstInputId:function firstInputId(){var obj={};var id=void 0;if(this.ranged){id=this.id&&this.id[0];}else{id=this.id;}if(id)obj.id=id;return obj;},secondInputId:function secondInputId(){var obj={};var id=void 0;if(this.ranged){id=this.id&&this.id[1];}if(id)obj.id=id;return obj;}},created:function created(){// vue-popper
this.popperOptions={boundariesPadding:0,gpuAcceleration:false};this.placement=PLACEMENT_MAP[this.align]||PLACEMENT_MAP.left;this.$on('fieldReset',this.handleFieldReset);},methods:{focus:function focus(){if(!this.ranged){this.$refs.reference.focus();}else{this.handleFocus();}},blur:function blur(){this.refInput.forEach(function(input){return input.blur();});},// {parse, formatTo} Value deals maps component value with internal Date
parseValue:function parseValue(value){var isParsed=Object(date_util_["isDateObject"])(value)||Array.isArray(value)&&value.every(date_util_["isDateObject"]);if(this.valueFormat&&!isParsed){return parseAsFormatAndType(value,this.valueFormat,this.type,this.rangeSeparator)||value;}else{return value;}},formatToValue:function formatToValue(date){var isFormattable=Object(date_util_["isDateObject"])(date)||Array.isArray(date)&&date.every(date_util_["isDateObject"]);if(this.valueFormat&&isFormattable){return formatAsFormatAndType(date,this.valueFormat,this.type,this.rangeSeparator);}else{return date;}},// {parse, formatTo} String deals with user input
parseString:function parseString(value){var type=Array.isArray(value)?this.type:this.type.replace('range','');return parseAsFormatAndType(value,this.format,type);},formatToString:function formatToString(value){var type=Array.isArray(value)?this.type:this.type.replace('range','');return formatAsFormatAndType(value,this.format,type);},handleMouseEnter:function handleMouseEnter(){if(this.readonly||this.pickerDisabled)return;if(!this.valueIsEmpty&&this.clearable){this.showClose=true;}},handleChange:function handleChange(){if(this.userInput){var value=this.parseString(this.displayValue);if(value){this.picker.value=value;if(this.isValidValue(value)){this.emitInput(value);this.userInput=null;}}}if(this.userInput===''){this.emitInput(null);this.emitChange(null);this.userInput=null;}},handleStartInput:function handleStartInput(event){if(this.userInput){this.userInput=[event.target.value,this.userInput[1]];}else{this.userInput=[event.target.value,null];}},handleEndInput:function handleEndInput(event){if(this.userInput){this.userInput=[this.userInput[0],event.target.value];}else{this.userInput=[null,event.target.value];}},handleStartChange:function handleStartChange(event){var value=this.parseString(this.userInput&&this.userInput[0]);if(value){this.userInput=[this.formatToString(value),this.displayValue[1]];var newValue=[value,this.picker.value&&this.picker.value[1]];this.picker.value=newValue;if(this.isValidValue(newValue)){this.emitInput(newValue);this.userInput=null;}}},handleEndChange:function handleEndChange(event){var value=this.parseString(this.userInput&&this.userInput[1]);if(value){this.userInput=[this.displayValue[0],this.formatToString(value)];var newValue=[this.picker.value&&this.picker.value[0],value];this.picker.value=newValue;if(this.isValidValue(newValue)){this.emitInput(newValue);this.userInput=null;}}},handleClickIcon:function handleClickIcon(event){if(this.readonly||this.pickerDisabled)return;if(this.showClose){this.valueOnOpen=this.value;event.stopPropagation();this.emitInput(null);this.emitChange(null);this.showClose=false;if(this.picker&&typeof this.picker.handleClear==='function'){this.picker.handleClear();}}else{this.pickerVisible=!this.pickerVisible;}},handleClose:function handleClose(){if(!this.pickerVisible)return;this.pickerVisible=false;if(this.type==='dates'){// restore to former value
var oldValue=parseAsFormatAndType(this.valueOnOpen,this.valueFormat,this.type,this.rangeSeparator)||this.valueOnOpen;this.emitInput(oldValue);}},handleFieldReset:function handleFieldReset(initialValue){this.userInput=initialValue===''?null:initialValue;},handleFocus:function handleFocus(){var type=this.type;if(HAVE_TRIGGER_TYPES.indexOf(type)!==-1&&!this.pickerVisible){this.pickerVisible=true;}this.$emit('focus',this);},handleKeydown:function handleKeydown(event){var _this=this;var keyCode=event.keyCode;// ESC
if(keyCode===27){this.pickerVisible=false;event.stopPropagation();return;}// Tab
if(keyCode===9){if(!this.ranged){this.handleChange();this.pickerVisible=this.picker.visible=false;this.blur();event.stopPropagation();}else{// user may change focus between two input
setTimeout(function(){if(_this.refInput.indexOf(document.activeElement)===-1){_this.pickerVisible=false;_this.blur();event.stopPropagation();}},0);}return;}// Enter
if(keyCode===13){if(this.userInput===''||this.isValidValue(this.parseString(this.displayValue))){this.handleChange();this.pickerVisible=this.picker.visible=false;this.blur();}event.stopPropagation();return;}// if user is typing, do not let picker handle key input
if(this.userInput){event.stopPropagation();return;}// delegate other keys to panel
if(this.picker&&this.picker.handleKeydown){this.picker.handleKeydown(event);}},handleRangeClick:function handleRangeClick(){var type=this.type;if(HAVE_TRIGGER_TYPES.indexOf(type)!==-1&&!this.pickerVisible){this.pickerVisible=true;}this.$emit('focus',this);},hidePicker:function hidePicker(){if(this.picker){this.picker.resetView&&this.picker.resetView();this.pickerVisible=this.picker.visible=false;this.destroyPopper();}},showPicker:function showPicker(){var _this2=this;if(this.$isServer)return;if(!this.picker){this.mountPicker();}this.pickerVisible=this.picker.visible=true;this.updatePopper();this.picker.value=this.parsedValue;this.picker.resetView&&this.picker.resetView();this.$nextTick(function(){_this2.picker.adjustSpinners&&_this2.picker.adjustSpinners();});},mountPicker:function mountPicker(){var _this3=this;this.picker=new external_vue_default.a(this.panel).$mount();this.picker.defaultValue=this.defaultValue;this.picker.defaultTime=this.defaultTime;this.picker.popperClass=this.popperClass;this.popperElm=this.picker.$el;this.picker.width=this.reference.getBoundingClientRect().width;this.picker.showTime=this.type==='datetime'||this.type==='datetimerange';this.picker.selectionMode=this.selectionMode;this.picker.unlinkPanels=this.unlinkPanels;this.picker.arrowControl=this.arrowControl||this.timeArrowControl||false;this.$watch('format',function(format){_this3.picker.format=format;});var updateOptions=function updateOptions(){var options=_this3.pickerOptions;if(options&&options.selectableRange){var ranges=options.selectableRange;var parser=TYPE_VALUE_RESOLVER_MAP.datetimerange.parser;var format=DEFAULT_FORMATS.timerange;ranges=Array.isArray(ranges)?ranges:[ranges];_this3.picker.selectableRange=ranges.map(function(range){return parser(range,format,_this3.rangeSeparator);});}for(var option in options){if(options.hasOwnProperty(option)&&// 忽略 time-picker 的该配置项
option!=='selectableRange'){_this3.picker[option]=options[option];}}// main format must prevail over undocumented pickerOptions.format
if(_this3.format){_this3.picker.format=_this3.format;}};updateOptions();this.unwatchPickerOptions=this.$watch('pickerOptions',function(){return updateOptions();},{deep:true});this.$el.appendChild(this.picker.$el);this.picker.resetView&&this.picker.resetView();this.picker.$on('dodestroy',this.doDestroy);this.picker.$on('pick',function(){var date=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'';var visible=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;_this3.userInput=null;_this3.pickerVisible=_this3.picker.visible=visible;_this3.emitInput(date);_this3.picker.resetView&&_this3.picker.resetView();});this.picker.$on('select-range',function(start,end,pos){if(_this3.refInput.length===0)return;if(!pos||pos==='min'){_this3.refInput[0].setSelectionRange(start,end);_this3.refInput[0].focus();}else if(pos==='max'){_this3.refInput[1].setSelectionRange(start,end);_this3.refInput[1].focus();}});},unmountPicker:function unmountPicker(){if(this.picker){this.picker.$destroy();this.picker.$off();if(typeof this.unwatchPickerOptions==='function'){this.unwatchPickerOptions();}this.picker.$el.parentNode.removeChild(this.picker.$el);}},emitChange:function emitChange(val){// determine user real change only
if(!valueEquals(val,this.valueOnOpen)){this.$emit('change',val);this.valueOnOpen=val;if(this.validateEvent){this.dispatch('ElFormItem','el.form.change',val);}}},emitInput:function emitInput(val){var formatted=this.formatToValue(val);if(!valueEquals(this.value,formatted)){this.$emit('input',formatted);}},isValidValue:function isValidValue(value){if(!this.picker){this.mountPicker();}if(this.picker.isValidValue){return value&&this.picker.isValidValue(value);}else{return true;}}}};// CONCATENATED MODULE: ./packages/date-picker/src/picker.vue?vue&type=script&lang=js&
/* harmony default export */var src_pickervue_type_script_lang_js_=pickervue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/date-picker/src/picker.vue
/* normalize component */var picker_component=normalizeComponent(src_pickervue_type_script_lang_js_,pickervue_type_template_id_79ae069f_render,pickervue_type_template_id_79ae069f_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var picker_api; }picker_component.options.__file="packages/date-picker/src/picker.vue";/* harmony default export */var picker=picker_component.exports;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/date.vue?vue&type=template&id=2440d4ea&
var datevue_type_template_id_2440d4ea_render=function datevue_type_template_id_2440d4ea_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("transition",{attrs:{name:"el-zoom-in-top"},on:{"after-enter":_vm.handleEnter,"after-leave":_vm.handleLeave}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.visible,expression:"visible"}],staticClass:"el-picker-panel el-date-picker el-popper",class:[{"has-sidebar":_vm.$slots.sidebar||_vm.shortcuts,"has-time":_vm.showTime},_vm.popperClass]},[_c("div",{staticClass:"el-picker-panel__body-wrapper"},[_vm._t("sidebar"),_vm.shortcuts?_c("div",{staticClass:"el-picker-panel__sidebar"},_vm._l(_vm.shortcuts,function(shortcut,key){return _c("button",{key:key,staticClass:"el-picker-panel__shortcut",attrs:{type:"button"},on:{click:function click($event){_vm.handleShortcutClick(shortcut);}}},[_vm._v(_vm._s(shortcut.text))]);}),0):_vm._e(),_c("div",{staticClass:"el-picker-panel__body"},[_vm.showTime?_c("div",{staticClass:"el-date-picker__time-header"},[_c("span",{staticClass:"el-date-picker__editor-wrap"},[_c("el-input",{attrs:{placeholder:_vm.t("el.datepicker.selectDate"),value:_vm.visibleDate,size:"small"},on:{input:function input(val){return _vm.userInputDate=val;},change:_vm.handleVisibleDateChange}})],1),_c("span",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:_vm.handleTimePickClose,expression:"handleTimePickClose"}],staticClass:"el-date-picker__editor-wrap"},[_c("el-input",{ref:"input",attrs:{placeholder:_vm.t("el.datepicker.selectTime"),value:_vm.visibleTime,size:"small"},on:{focus:function focus($event){_vm.timePickerVisible=true;},input:function input(val){return _vm.userInputTime=val;},change:_vm.handleVisibleTimeChange}}),_c("time-picker",{ref:"timepicker",attrs:{"time-arrow-control":_vm.arrowControl,visible:_vm.timePickerVisible},on:{pick:_vm.handleTimePick,mounted:_vm.proxyTimePickerDataProperties}})],1)]):_vm._e(),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.currentView!=="time",expression:"currentView !== 'time'"}],staticClass:"el-date-picker__header",class:{"el-date-picker__header--bordered":_vm.currentView==="year"||_vm.currentView==="month"}},[_c("button",{staticClass:"el-picker-panel__icon-btn el-date-picker__prev-btn el-icon-d-arrow-left",attrs:{type:"button","aria-label":_vm.t("el.datepicker.prevYear")},on:{click:_vm.prevYear}}),_c("button",{directives:[{name:"show",rawName:"v-show",value:_vm.currentView==="date",expression:"currentView === 'date'"}],staticClass:"el-picker-panel__icon-btn el-date-picker__prev-btn el-icon-arrow-left",attrs:{type:"button","aria-label":_vm.t("el.datepicker.prevMonth")},on:{click:_vm.prevMonth}}),_c("span",{staticClass:"el-date-picker__header-label",attrs:{role:"button"},on:{click:_vm.showYearPicker}},[_vm._v(_vm._s(_vm.yearLabel))]),_c("span",{directives:[{name:"show",rawName:"v-show",value:_vm.currentView==="date",expression:"currentView === 'date'"}],staticClass:"el-date-picker__header-label",class:{active:_vm.currentView==="month"},attrs:{role:"button"},on:{click:_vm.showMonthPicker}},[_vm._v(_vm._s(_vm.t("el.datepicker.month"+(_vm.month+1))))]),_c("button",{staticClass:"el-picker-panel__icon-btn el-date-picker__next-btn el-icon-d-arrow-right",attrs:{type:"button","aria-label":_vm.t("el.datepicker.nextYear")},on:{click:_vm.nextYear}}),_c("button",{directives:[{name:"show",rawName:"v-show",value:_vm.currentView==="date",expression:"currentView === 'date'"}],staticClass:"el-picker-panel__icon-btn el-date-picker__next-btn el-icon-arrow-right",attrs:{type:"button","aria-label":_vm.t("el.datepicker.nextMonth")},on:{click:_vm.nextMonth}})]),_c("div",{staticClass:"el-picker-panel__content"},[_c("date-table",{directives:[{name:"show",rawName:"v-show",value:_vm.currentView==="date",expression:"currentView === 'date'"}],attrs:{"selection-mode":_vm.selectionMode,"first-day-of-week":_vm.firstDayOfWeek,value:_vm.value,"default-value":_vm.defaultValue?new Date(_vm.defaultValue):null,date:_vm.date,"cell-class-name":_vm.cellClassName,"disabled-date":_vm.disabledDate},on:{pick:_vm.handleDatePick}}),_c("year-table",{directives:[{name:"show",rawName:"v-show",value:_vm.currentView==="year",expression:"currentView === 'year'"}],attrs:{value:_vm.value,"default-value":_vm.defaultValue?new Date(_vm.defaultValue):null,date:_vm.date,"disabled-date":_vm.disabledDate},on:{pick:_vm.handleYearPick}}),_c("month-table",{directives:[{name:"show",rawName:"v-show",value:_vm.currentView==="month",expression:"currentView === 'month'"}],attrs:{value:_vm.value,"default-value":_vm.defaultValue?new Date(_vm.defaultValue):null,date:_vm.date,"disabled-date":_vm.disabledDate},on:{pick:_vm.handleMonthPick}})],1)])],2),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.footerVisible&&_vm.currentView==="date",expression:"footerVisible && currentView === 'date'"}],staticClass:"el-picker-panel__footer"},[_c("el-button",{directives:[{name:"show",rawName:"v-show",value:_vm.selectionMode!=="dates",expression:"selectionMode !== 'dates'"}],staticClass:"el-picker-panel__link-btn",attrs:{size:"mini",type:"text"},on:{click:_vm.changeToNow}},[_vm._v("\n        "+_vm._s(_vm.t("el.datepicker.now"))+"\n      ")]),_c("el-button",{staticClass:"el-picker-panel__link-btn",attrs:{plain:"",size:"mini"},on:{click:_vm.confirm}},[_vm._v("\n        "+_vm._s(_vm.t("el.datepicker.confirm"))+"\n      ")])],1)])]);};var datevue_type_template_id_2440d4ea_staticRenderFns=[];datevue_type_template_id_2440d4ea_render._withStripped=true;// CONCATENATED MODULE: ./packages/date-picker/src/panel/date.vue?vue&type=template&id=2440d4ea&
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/time.vue?vue&type=template&id=3d939089&
var timevue_type_template_id_3d939089_render=function timevue_type_template_id_3d939089_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("transition",{attrs:{name:"el-zoom-in-top"},on:{"after-leave":function afterLeave($event){_vm.$emit("dodestroy");}}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.visible,expression:"visible"}],staticClass:"el-time-panel el-popper",class:_vm.popperClass},[_c("div",{staticClass:"el-time-panel__content",class:{"has-seconds":_vm.showSeconds}},[_c("time-spinner",{ref:"spinner",attrs:{"arrow-control":_vm.useArrow,"show-seconds":_vm.showSeconds,"am-pm-mode":_vm.amPmMode,date:_vm.date},on:{change:_vm.handleChange,"select-range":_vm.setSelectionRange}})],1),_c("div",{staticClass:"el-time-panel__footer"},[_c("button",{staticClass:"el-time-panel__btn cancel",attrs:{type:"button"},on:{click:_vm.handleCancel}},[_vm._v(_vm._s(_vm.t("el.datepicker.cancel")))]),_c("button",{staticClass:"el-time-panel__btn",class:{confirm:!_vm.disabled},attrs:{type:"button"},on:{click:function click($event){_vm.handleConfirm();}}},[_vm._v(_vm._s(_vm.t("el.datepicker.confirm")))])])])]);};var timevue_type_template_id_3d939089_staticRenderFns=[];timevue_type_template_id_3d939089_render._withStripped=true;// CONCATENATED MODULE: ./packages/date-picker/src/panel/time.vue?vue&type=template&id=3d939089&
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/basic/time-spinner.vue?vue&type=template&id=1facadeb&
var time_spinnervue_type_template_id_1facadeb_render=function time_spinnervue_type_template_id_1facadeb_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-time-spinner",class:{"has-seconds":_vm.showSeconds}},[!_vm.arrowControl?[_c("el-scrollbar",{ref:"hours",staticClass:"el-time-spinner__wrapper",attrs:{"wrap-style":"max-height: inherit;","view-class":"el-time-spinner__list",noresize:"",tag:"ul"},nativeOn:{mouseenter:function mouseenter($event){_vm.emitSelectRange("hours");},mousemove:function mousemove($event){_vm.adjustCurrentSpinner("hours");}}},_vm._l(_vm.hoursList,function(disabled,hour){return _c("li",{key:hour,staticClass:"el-time-spinner__item",class:{active:hour===_vm.hours,disabled:disabled},on:{click:function click($event){_vm.handleClick("hours",{value:hour,disabled:disabled});}}},[_vm._v(_vm._s(("0"+(_vm.amPmMode?hour%12||12:hour)).slice(-2))+_vm._s(_vm.amPm(hour)))]);}),0),_c("el-scrollbar",{ref:"minutes",staticClass:"el-time-spinner__wrapper",attrs:{"wrap-style":"max-height: inherit;","view-class":"el-time-spinner__list",noresize:"",tag:"ul"},nativeOn:{mouseenter:function mouseenter($event){_vm.emitSelectRange("minutes");},mousemove:function mousemove($event){_vm.adjustCurrentSpinner("minutes");}}},_vm._l(_vm.minutesList,function(enabled,key){return _c("li",{key:key,staticClass:"el-time-spinner__item",class:{active:key===_vm.minutes,disabled:!enabled},on:{click:function click($event){_vm.handleClick("minutes",{value:key,disabled:false});}}},[_vm._v(_vm._s(("0"+key).slice(-2)))]);}),0),_c("el-scrollbar",{directives:[{name:"show",rawName:"v-show",value:_vm.showSeconds,expression:"showSeconds"}],ref:"seconds",staticClass:"el-time-spinner__wrapper",attrs:{"wrap-style":"max-height: inherit;","view-class":"el-time-spinner__list",noresize:"",tag:"ul"},nativeOn:{mouseenter:function mouseenter($event){_vm.emitSelectRange("seconds");},mousemove:function mousemove($event){_vm.adjustCurrentSpinner("seconds");}}},_vm._l(60,function(second,key){return _c("li",{key:key,staticClass:"el-time-spinner__item",class:{active:key===_vm.seconds},on:{click:function click($event){_vm.handleClick("seconds",{value:key,disabled:false});}}},[_vm._v(_vm._s(("0"+key).slice(-2)))]);}),0)]:_vm._e(),_vm.arrowControl?[_c("div",{staticClass:"el-time-spinner__wrapper is-arrow",on:{mouseenter:function mouseenter($event){_vm.emitSelectRange("hours");}}},[_c("i",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:_vm.decrease,expression:"decrease"}],staticClass:"el-time-spinner__arrow el-icon-arrow-up"}),_c("i",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:_vm.increase,expression:"increase"}],staticClass:"el-time-spinner__arrow el-icon-arrow-down"}),_c("ul",{ref:"hours",staticClass:"el-time-spinner__list"},_vm._l(_vm.arrowHourList,function(hour,key){return _c("li",{key:key,staticClass:"el-time-spinner__item",class:{active:hour===_vm.hours,disabled:_vm.hoursList[hour]}},[_vm._v(_vm._s(hour===undefined?"":("0"+(_vm.amPmMode?hour%12||12:hour)).slice(-2)+_vm.amPm(hour)))]);}),0)]),_c("div",{staticClass:"el-time-spinner__wrapper is-arrow",on:{mouseenter:function mouseenter($event){_vm.emitSelectRange("minutes");}}},[_c("i",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:_vm.decrease,expression:"decrease"}],staticClass:"el-time-spinner__arrow el-icon-arrow-up"}),_c("i",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:_vm.increase,expression:"increase"}],staticClass:"el-time-spinner__arrow el-icon-arrow-down"}),_c("ul",{ref:"minutes",staticClass:"el-time-spinner__list"},_vm._l(_vm.arrowMinuteList,function(minute,key){return _c("li",{key:key,staticClass:"el-time-spinner__item",class:{active:minute===_vm.minutes}},[_vm._v("\n          "+_vm._s(minute===undefined?"":("0"+minute).slice(-2))+"\n        ")]);}),0)]),_vm.showSeconds?_c("div",{staticClass:"el-time-spinner__wrapper is-arrow",on:{mouseenter:function mouseenter($event){_vm.emitSelectRange("seconds");}}},[_c("i",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:_vm.decrease,expression:"decrease"}],staticClass:"el-time-spinner__arrow el-icon-arrow-up"}),_c("i",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:_vm.increase,expression:"increase"}],staticClass:"el-time-spinner__arrow el-icon-arrow-down"}),_c("ul",{ref:"seconds",staticClass:"el-time-spinner__list"},_vm._l(_vm.arrowSecondList,function(second,key){return _c("li",{key:key,staticClass:"el-time-spinner__item",class:{active:second===_vm.seconds}},[_vm._v("\n          "+_vm._s(second===undefined?"":("0"+second).slice(-2))+"\n        ")]);}),0)]):_vm._e()]:_vm._e()],2);};var time_spinnervue_type_template_id_1facadeb_staticRenderFns=[];time_spinnervue_type_template_id_1facadeb_render._withStripped=true;// CONCATENATED MODULE: ./packages/date-picker/src/basic/time-spinner.vue?vue&type=template&id=1facadeb&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/basic/time-spinner.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var time_spinnervue_type_script_lang_js_={components:{ElScrollbar:scrollbar_default.a},directives:{repeatClick:repeat_click},props:{date:{},defaultValue:{},// reserved for future use
showSeconds:{type:Boolean,default:true},arrowControl:Boolean,amPmMode:{type:String,default:''// 'a': am/pm; 'A': AM/PM
}},computed:{hours:function hours(){return this.date.getHours();},minutes:function minutes(){return this.date.getMinutes();},seconds:function seconds(){return this.date.getSeconds();},hoursList:function hoursList(){return Object(date_util_["getRangeHours"])(this.selectableRange);},minutesList:function minutesList(){return Object(date_util_["getRangeMinutes"])(this.selectableRange,this.hours);},arrowHourList:function arrowHourList(){var hours=this.hours;return[hours>0?hours-1:undefined,hours,hours<23?hours+1:undefined];},arrowMinuteList:function arrowMinuteList(){var minutes=this.minutes;return[minutes>0?minutes-1:undefined,minutes,minutes<59?minutes+1:undefined];},arrowSecondList:function arrowSecondList(){var seconds=this.seconds;return[seconds>0?seconds-1:undefined,seconds,seconds<59?seconds+1:undefined];}},data:function data(){return{selectableRange:[],currentScrollbar:null};},mounted:function mounted(){var _this=this;this.$nextTick(function(){!_this.arrowControl&&_this.bindScrollEvent();});},methods:{increase:function increase(){this.scrollDown(1);},decrease:function decrease(){this.scrollDown(-1);},modifyDateField:function modifyDateField(type,value){switch(type){case'hours':this.$emit('change',Object(date_util_["modifyTime"])(this.date,value,this.minutes,this.seconds));break;case'minutes':this.$emit('change',Object(date_util_["modifyTime"])(this.date,this.hours,value,this.seconds));break;case'seconds':this.$emit('change',Object(date_util_["modifyTime"])(this.date,this.hours,this.minutes,value));break;}},handleClick:function handleClick(type,_ref){var value=_ref.value,disabled=_ref.disabled;if(!disabled){this.modifyDateField(type,value);this.emitSelectRange(type);this.adjustSpinner(type,value);}},emitSelectRange:function emitSelectRange(type){if(type==='hours'){this.$emit('select-range',0,2);}else if(type==='minutes'){this.$emit('select-range',3,5);}else if(type==='seconds'){this.$emit('select-range',6,8);}this.currentScrollbar=type;},bindScrollEvent:function bindScrollEvent(){var _this2=this;var bindFuntion=function bindFuntion(type){_this2.$refs[type].wrap.onscroll=function(e){// TODO: scroll is emitted when set scrollTop programatically
// should find better solutions in the future!
_this2.handleScroll(type,e);};};bindFuntion('hours');bindFuntion('minutes');bindFuntion('seconds');},handleScroll:function handleScroll(type){var value=Math.min(Math.round((this.$refs[type].wrap.scrollTop-(this.scrollBarHeight(type)*0.5-10)/this.typeItemHeight(type)+3)/this.typeItemHeight(type)),type==='hours'?23:59);this.modifyDateField(type,value);},// NOTE: used by datetime / date-range panel
//       renamed from adjustScrollTop
//       should try to refactory it
adjustSpinners:function adjustSpinners(){this.adjustSpinner('hours',this.hours);this.adjustSpinner('minutes',this.minutes);this.adjustSpinner('seconds',this.seconds);},adjustCurrentSpinner:function adjustCurrentSpinner(type){this.adjustSpinner(type,this[type]);},adjustSpinner:function adjustSpinner(type,value){if(this.arrowControl)return;var el=this.$refs[type].wrap;if(el){el.scrollTop=Math.max(0,value*this.typeItemHeight(type));}},scrollDown:function scrollDown(step){var _this3=this;if(!this.currentScrollbar){this.emitSelectRange('hours');}var label=this.currentScrollbar;var hoursList=this.hoursList;var now=this[label];if(this.currentScrollbar==='hours'){var total=Math.abs(step);step=step>0?1:-1;var length=hoursList.length;while(length--&&total){now=(now+step+hoursList.length)%hoursList.length;if(hoursList[now]){continue;}total--;}if(hoursList[now])return;}else{now=(now+step+60)%60;}this.modifyDateField(label,now);this.adjustSpinner(label,now);this.$nextTick(function(){return _this3.emitSelectRange(_this3.currentScrollbar);});},amPm:function amPm(hour){var shouldShowAmPm=this.amPmMode.toLowerCase()==='a';if(!shouldShowAmPm)return'';var isCapital=this.amPmMode==='A';var content=hour<12?' am':' pm';if(isCapital)content=content.toUpperCase();return content;},typeItemHeight:function typeItemHeight(type){return this.$refs[type].$el.querySelector('li').offsetHeight;},scrollBarHeight:function scrollBarHeight(type){return this.$refs[type].$el.offsetHeight;}}};// CONCATENATED MODULE: ./packages/date-picker/src/basic/time-spinner.vue?vue&type=script&lang=js&
/* harmony default export */var basic_time_spinnervue_type_script_lang_js_=time_spinnervue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/date-picker/src/basic/time-spinner.vue
/* normalize component */var time_spinner_component=normalizeComponent(basic_time_spinnervue_type_script_lang_js_,time_spinnervue_type_template_id_1facadeb_render,time_spinnervue_type_template_id_1facadeb_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var time_spinner_api; }time_spinner_component.options.__file="packages/date-picker/src/basic/time-spinner.vue";/* harmony default export */var time_spinner=time_spinner_component.exports;// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/time.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var timevue_type_script_lang_js_={mixins:[locale_default.a],components:{TimeSpinner:time_spinner},props:{visible:Boolean,timeArrowControl:Boolean},watch:{visible:function visible(val){var _this=this;if(val){this.oldValue=this.value;this.$nextTick(function(){return _this.$refs.spinner.emitSelectRange('hours');});}else{this.needInitAdjust=true;}},value:function value(newVal){var _this2=this;var date=void 0;if(newVal instanceof Date){date=Object(date_util_["limitTimeRange"])(newVal,this.selectableRange,this.format);}else if(!newVal){date=this.defaultValue?new Date(this.defaultValue):new Date();}this.date=date;if(this.visible&&this.needInitAdjust){this.$nextTick(function(_){return _this2.adjustSpinners();});this.needInitAdjust=false;}},selectableRange:function selectableRange(val){this.$refs.spinner.selectableRange=val;},defaultValue:function defaultValue(val){if(!Object(date_util_["isDate"])(this.value)){this.date=val?new Date(val):new Date();}}},data:function data(){return{popperClass:'',format:'HH:mm:ss',value:'',defaultValue:null,date:new Date(),oldValue:new Date(),selectableRange:[],selectionRange:[0,2],disabled:false,arrowControl:false,needInitAdjust:true};},computed:{showSeconds:function showSeconds(){return(this.format||'').indexOf('ss')!==-1;},useArrow:function useArrow(){return this.arrowControl||this.timeArrowControl||false;},amPmMode:function amPmMode(){if((this.format||'').indexOf('A')!==-1)return'A';if((this.format||'').indexOf('a')!==-1)return'a';return'';}},methods:{handleCancel:function handleCancel(){this.$emit('pick',this.oldValue,false);},handleChange:function handleChange(date){// this.visible avoids edge cases, when use scrolls during panel closing animation
if(this.visible){this.date=Object(date_util_["clearMilliseconds"])(date);// if date is out of range, do not emit
if(this.isValidValue(this.date)){this.$emit('pick',this.date,true);}}},setSelectionRange:function setSelectionRange(start,end){this.$emit('select-range',start,end);this.selectionRange=[start,end];},handleConfirm:function handleConfirm(){var visible=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;var first=arguments[1];if(first)return;var date=Object(date_util_["clearMilliseconds"])(Object(date_util_["limitTimeRange"])(this.date,this.selectableRange,this.format));this.$emit('pick',date,visible,first);},handleKeydown:function handleKeydown(event){var keyCode=event.keyCode;var mapping={38:-1,40:1,37:-1,39:1};// Left or Right
if(keyCode===37||keyCode===39){var step=mapping[keyCode];this.changeSelectionRange(step);event.preventDefault();return;}// Up or Down
if(keyCode===38||keyCode===40){var _step=mapping[keyCode];this.$refs.spinner.scrollDown(_step);event.preventDefault();return;}},isValidValue:function isValidValue(date){return Object(date_util_["timeWithinRange"])(date,this.selectableRange,this.format);},adjustSpinners:function adjustSpinners(){return this.$refs.spinner.adjustSpinners();},changeSelectionRange:function changeSelectionRange(step){var list=[0,3].concat(this.showSeconds?[6]:[]);var mapping=['hours','minutes'].concat(this.showSeconds?['seconds']:[]);var index=list.indexOf(this.selectionRange[0]);var next=(index+step+list.length)%list.length;this.$refs.spinner.emitSelectRange(mapping[next]);}},mounted:function mounted(){var _this3=this;this.$nextTick(function(){return _this3.handleConfirm(true,true);});this.$emit('mounted');}};// CONCATENATED MODULE: ./packages/date-picker/src/panel/time.vue?vue&type=script&lang=js&
/* harmony default export */var panel_timevue_type_script_lang_js_=timevue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/date-picker/src/panel/time.vue
/* normalize component */var time_component=normalizeComponent(panel_timevue_type_script_lang_js_,timevue_type_template_id_3d939089_render,timevue_type_template_id_3d939089_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var time_api; }time_component.options.__file="packages/date-picker/src/panel/time.vue";/* harmony default export */var panel_time=time_component.exports;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/basic/year-table.vue?vue&type=template&id=c86ab5e0&
var year_tablevue_type_template_id_c86ab5e0_render=function year_tablevue_type_template_id_c86ab5e0_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("table",{staticClass:"el-year-table",on:{click:_vm.handleYearTableClick}},[_c("tbody",[_c("tr",[_c("td",{staticClass:"available",class:_vm.getCellStyle(_vm.startYear+0)},[_c("a",{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear))])]),_c("td",{staticClass:"available",class:_vm.getCellStyle(_vm.startYear+1)},[_c("a",{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear+1))])]),_c("td",{staticClass:"available",class:_vm.getCellStyle(_vm.startYear+2)},[_c("a",{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear+2))])]),_c("td",{staticClass:"available",class:_vm.getCellStyle(_vm.startYear+3)},[_c("a",{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear+3))])])]),_c("tr",[_c("td",{staticClass:"available",class:_vm.getCellStyle(_vm.startYear+4)},[_c("a",{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear+4))])]),_c("td",{staticClass:"available",class:_vm.getCellStyle(_vm.startYear+5)},[_c("a",{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear+5))])]),_c("td",{staticClass:"available",class:_vm.getCellStyle(_vm.startYear+6)},[_c("a",{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear+6))])]),_c("td",{staticClass:"available",class:_vm.getCellStyle(_vm.startYear+7)},[_c("a",{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear+7))])])]),_c("tr",[_c("td",{staticClass:"available",class:_vm.getCellStyle(_vm.startYear+8)},[_c("a",{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear+8))])]),_c("td",{staticClass:"available",class:_vm.getCellStyle(_vm.startYear+9)},[_c("a",{staticClass:"cell"},[_vm._v(_vm._s(_vm.startYear+9))])]),_c("td"),_c("td")])])]);};var year_tablevue_type_template_id_c86ab5e0_staticRenderFns=[];year_tablevue_type_template_id_c86ab5e0_render._withStripped=true;// CONCATENATED MODULE: ./packages/date-picker/src/basic/year-table.vue?vue&type=template&id=c86ab5e0&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/basic/year-table.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var year_tablevue_type_script_lang_js_datesInYear=function datesInYear(year){var numOfDays=Object(date_util_["getDayCountOfYear"])(year);var firstDay=new Date(year,0,1);return Object(date_util_["range"])(numOfDays).map(function(n){return Object(date_util_["nextDate"])(firstDay,n);});};/* harmony default export */var year_tablevue_type_script_lang_js_={props:{disabledDate:{},value:{},defaultValue:{validator:function validator(val){// null or valid Date Object
return val===null||val instanceof Date&&Object(date_util_["isDate"])(val);}},date:{}},computed:{startYear:function startYear(){return Math.floor(this.date.getFullYear()/10)*10;}},methods:{getCellStyle:function getCellStyle(year){var style={};var today=new Date();style.disabled=typeof this.disabledDate==='function'?year_tablevue_type_script_lang_js_datesInYear(year).every(this.disabledDate):false;style.current=Object(util_["arrayFindIndex"])(Object(util_["coerceTruthyValueToArray"])(this.value),function(date){return date.getFullYear()===year;})>=0;style.today=today.getFullYear()===year;style.default=this.defaultValue&&this.defaultValue.getFullYear()===year;return style;},handleYearTableClick:function handleYearTableClick(event){var target=event.target;if(target.tagName==='A'){if(Object(dom_["hasClass"])(target.parentNode,'disabled'))return;var year=target.textContent||target.innerText;this.$emit('pick',Number(year));}}}};// CONCATENATED MODULE: ./packages/date-picker/src/basic/year-table.vue?vue&type=script&lang=js&
/* harmony default export */var basic_year_tablevue_type_script_lang_js_=year_tablevue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/date-picker/src/basic/year-table.vue
/* normalize component */var year_table_component=normalizeComponent(basic_year_tablevue_type_script_lang_js_,year_tablevue_type_template_id_c86ab5e0_render,year_tablevue_type_template_id_c86ab5e0_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var year_table_api; }year_table_component.options.__file="packages/date-picker/src/basic/year-table.vue";/* harmony default export */var year_table=year_table_component.exports;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/basic/month-table.vue?vue&type=template&id=654d4f42&
var month_tablevue_type_template_id_654d4f42_render=function month_tablevue_type_template_id_654d4f42_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("table",{staticClass:"el-month-table",on:{click:_vm.handleMonthTableClick,mousemove:_vm.handleMouseMove}},[_c("tbody",_vm._l(_vm.rows,function(row,key){return _c("tr",{key:key},_vm._l(row,function(cell,key){return _c("td",{key:key,class:_vm.getCellStyle(cell)},[_c("div",[_c("a",{staticClass:"cell"},[_vm._v(_vm._s(_vm.t("el.datepicker.months."+_vm.months[cell.text])))])])]);}),0);}),0)]);};var month_tablevue_type_template_id_654d4f42_staticRenderFns=[];month_tablevue_type_template_id_654d4f42_render._withStripped=true;// CONCATENATED MODULE: ./packages/date-picker/src/basic/month-table.vue?vue&type=template&id=654d4f42&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/basic/month-table.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var month_tablevue_type_script_lang_js_datesInMonth=function datesInMonth(year,month){var numOfDays=Object(date_util_["getDayCountOfMonth"])(year,month);var firstDay=new Date(year,month,1);return Object(date_util_["range"])(numOfDays).map(function(n){return Object(date_util_["nextDate"])(firstDay,n);});};var clearDate=function clearDate(date){return new Date(date.getFullYear(),date.getMonth());};var getMonthTimestamp=function getMonthTimestamp(time){if(typeof time==='number'||typeof time==='string'){return clearDate(new Date(time)).getTime();}else if(time instanceof Date){return clearDate(time).getTime();}else{return NaN;}};/* harmony default export */var month_tablevue_type_script_lang_js_={props:{disabledDate:{},value:{},selectionMode:{default:'month'},minDate:{},maxDate:{},defaultValue:{validator:function validator(val){// null or valid Date Object
return val===null||Object(date_util_["isDate"])(val)||Array.isArray(val)&&val.every(date_util_["isDate"]);}},date:{},rangeState:{default:function _default(){return{endDate:null,selecting:false};}}},mixins:[locale_default.a],watch:{'rangeState.endDate':function rangeStateEndDate(newVal){this.markRange(this.minDate,newVal);},minDate:function minDate(newVal,oldVal){if(getMonthTimestamp(newVal)!==getMonthTimestamp(oldVal)){this.markRange(this.minDate,this.maxDate);}},maxDate:function maxDate(newVal,oldVal){if(getMonthTimestamp(newVal)!==getMonthTimestamp(oldVal)){this.markRange(this.minDate,this.maxDate);}}},data:function data(){return{months:['jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec'],tableRows:[[],[],[]],lastRow:null,lastColumn:null};},methods:{cellMatchesDate:function cellMatchesDate(cell,date){var value=new Date(date);return this.date.getFullYear()===value.getFullYear()&&Number(cell.text)===value.getMonth();},getCellStyle:function getCellStyle(cell){var _this=this;var style={};var year=this.date.getFullYear();var today=new Date();var month=cell.text;var defaultValue=this.defaultValue?Array.isArray(this.defaultValue)?this.defaultValue:[this.defaultValue]:[];style.disabled=typeof this.disabledDate==='function'?month_tablevue_type_script_lang_js_datesInMonth(year,month).every(this.disabledDate):false;style.current=Object(util_["arrayFindIndex"])(Object(util_["coerceTruthyValueToArray"])(this.value),function(date){return date.getFullYear()===year&&date.getMonth()===month;})>=0;style.today=today.getFullYear()===year&&today.getMonth()===month;style.default=defaultValue.some(function(date){return _this.cellMatchesDate(cell,date);});if(cell.inRange){style['in-range']=true;if(cell.start){style['start-date']=true;}if(cell.end){style['end-date']=true;}}return style;},getMonthOfCell:function getMonthOfCell(month){var year=this.date.getFullYear();return new Date(year,month,1);},markRange:function markRange(minDate,maxDate){minDate=getMonthTimestamp(minDate);maxDate=getMonthTimestamp(maxDate)||minDate;var _ref=[Math.min(minDate,maxDate),Math.max(minDate,maxDate)];minDate=_ref[0];maxDate=_ref[1];var rows=this.rows;for(var i=0,k=rows.length;i<k;i++){var row=rows[i];for(var j=0,l=row.length;j<l;j++){var cell=row[j];var index=i*4+j;var time=new Date(this.date.getFullYear(),index).getTime();cell.inRange=minDate&&time>=minDate&&time<=maxDate;cell.start=minDate&&time===minDate;cell.end=maxDate&&time===maxDate;}}},handleMouseMove:function handleMouseMove(event){if(!this.rangeState.selecting)return;var target=event.target;if(target.tagName==='A'){target=target.parentNode.parentNode;}if(target.tagName==='DIV'){target=target.parentNode;}if(target.tagName!=='TD')return;var row=target.parentNode.rowIndex;var column=target.cellIndex;// can not select disabled date
if(this.rows[row][column].disabled)return;// only update rangeState when mouse moves to a new cell
// this avoids frequent Date object creation and improves performance
if(row!==this.lastRow||column!==this.lastColumn){this.lastRow=row;this.lastColumn=column;this.$emit('changerange',{minDate:this.minDate,maxDate:this.maxDate,rangeState:{selecting:true,endDate:this.getMonthOfCell(row*4+column)}});}},handleMonthTableClick:function handleMonthTableClick(event){var target=event.target;if(target.tagName==='A'){target=target.parentNode.parentNode;}if(target.tagName==='DIV'){target=target.parentNode;}if(target.tagName!=='TD')return;if(Object(dom_["hasClass"])(target,'disabled'))return;var column=target.cellIndex;var row=target.parentNode.rowIndex;var month=row*4+column;var newDate=this.getMonthOfCell(month);if(this.selectionMode==='range'){if(!this.rangeState.selecting){this.$emit('pick',{minDate:newDate,maxDate:null});this.rangeState.selecting=true;}else{if(newDate>=this.minDate){this.$emit('pick',{minDate:this.minDate,maxDate:newDate});}else{this.$emit('pick',{minDate:newDate,maxDate:this.minDate});}this.rangeState.selecting=false;}}else{this.$emit('pick',month);}}},computed:{rows:function rows(){var _this2=this;// TODO: refactory rows / getCellClasses
var rows=this.tableRows;var disabledDate=this.disabledDate;var selectedDate=[];var now=getMonthTimestamp(new Date());for(var i=0;i<3;i++){var row=rows[i];var _loop=function _loop(j){var cell=row[j];if(!cell){cell={row:i,column:j,type:'normal',inRange:false,start:false,end:false};}cell.type='normal';var index=i*4+j;var time=new Date(_this2.date.getFullYear(),index).getTime();cell.inRange=time>=getMonthTimestamp(_this2.minDate)&&time<=getMonthTimestamp(_this2.maxDate);cell.start=_this2.minDate&&time===getMonthTimestamp(_this2.minDate);cell.end=_this2.maxDate&&time===getMonthTimestamp(_this2.maxDate);var isToday=time===now;if(isToday){cell.type='today';}cell.text=index;var cellDate=new Date(time);cell.disabled=typeof disabledDate==='function'&&disabledDate(cellDate);cell.selected=Object(util_["arrayFind"])(selectedDate,function(date){return date.getTime()===cellDate.getTime();});_this2.$set(row,j,cell);};for(var j=0;j<4;j++){_loop(j);}}return rows;}}};// CONCATENATED MODULE: ./packages/date-picker/src/basic/month-table.vue?vue&type=script&lang=js&
/* harmony default export */var basic_month_tablevue_type_script_lang_js_=month_tablevue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/date-picker/src/basic/month-table.vue
/* normalize component */var month_table_component=normalizeComponent(basic_month_tablevue_type_script_lang_js_,month_tablevue_type_template_id_654d4f42_render,month_tablevue_type_template_id_654d4f42_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var month_table_api; }month_table_component.options.__file="packages/date-picker/src/basic/month-table.vue";/* harmony default export */var month_table=month_table_component.exports;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/basic/date-table.vue?vue&type=template&id=5d1f3341&
var date_tablevue_type_template_id_5d1f3341_render=function date_tablevue_type_template_id_5d1f3341_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("table",{staticClass:"el-date-table",class:{"is-week-mode":_vm.selectionMode==="week"},attrs:{cellspacing:"0",cellpadding:"0"},on:{click:_vm.handleClick,mousemove:_vm.handleMouseMove}},[_c("tbody",[_c("tr",[_vm.showWeekNumber?_c("th",[_vm._v(_vm._s(_vm.t("el.datepicker.week")))]):_vm._e(),_vm._l(_vm.WEEKS,function(week,key){return _c("th",{key:key},[_vm._v(_vm._s(_vm.t("el.datepicker.weeks."+week)))]);})],2),_vm._l(_vm.rows,function(row,key){return _c("tr",{key:key,staticClass:"el-date-table__row",class:{current:_vm.isWeekActive(row[1])}},_vm._l(row,function(cell,key){return _c("td",{key:key,class:_vm.getCellClasses(cell)},[_c("div",[_c("span",[_vm._v("\n          "+_vm._s(cell.text)+"\n        ")])])]);}),0);})],2)]);};var date_tablevue_type_template_id_5d1f3341_staticRenderFns=[];date_tablevue_type_template_id_5d1f3341_render._withStripped=true;// CONCATENATED MODULE: ./packages/date-picker/src/basic/date-table.vue?vue&type=template&id=5d1f3341&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/basic/date-table.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var _WEEKS=['sun','mon','tue','wed','thu','fri','sat'];var date_tablevue_type_script_lang_js_getDateTimestamp=function getDateTimestamp(time){if(typeof time==='number'||typeof time==='string'){return Object(date_util_["clearTime"])(new Date(time)).getTime();}else if(time instanceof Date){return Object(date_util_["clearTime"])(time).getTime();}else{return NaN;}};// remove the first element that satisfies `pred` from arr
// return a new array if modification occurs
// return the original array otherwise
var date_tablevue_type_script_lang_js_removeFromArray=function removeFromArray(arr,pred){var idx=typeof pred==='function'?Object(util_["arrayFindIndex"])(arr,pred):arr.indexOf(pred);return idx>=0?[].concat(arr.slice(0,idx),arr.slice(idx+1)):arr;};/* harmony default export */var date_tablevue_type_script_lang_js_={mixins:[locale_default.a],props:{firstDayOfWeek:{default:7,type:Number,validator:function validator(val){return val>=1&&val<=7;}},value:{},defaultValue:{validator:function validator(val){// either: null, valid Date object, Array of valid Date objects
return val===null||Object(date_util_["isDate"])(val)||Array.isArray(val)&&val.every(date_util_["isDate"]);}},date:{},selectionMode:{default:'day'},showWeekNumber:{type:Boolean,default:false},disabledDate:{},cellClassName:{},minDate:{},maxDate:{},rangeState:{default:function _default(){return{endDate:null,selecting:false};}}},computed:{offsetDay:function offsetDay(){var week=this.firstDayOfWeek;// 周日为界限，左右偏移的天数，3217654 例如周一就是 -1，目的是调整前两行日期的位置
return week>3?7-week:-week;},WEEKS:function WEEKS(){var week=this.firstDayOfWeek;return _WEEKS.concat(_WEEKS).slice(week,week+7);},year:function year(){return this.date.getFullYear();},month:function month(){return this.date.getMonth();},startDate:function startDate(){return Object(date_util_["getStartDateOfMonth"])(this.year,this.month);},rows:function rows(){var _this=this;// TODO: refactory rows / getCellClasses
var date=new Date(this.year,this.month,1);var day=Object(date_util_["getFirstDayOfMonth"])(date);// day of first day
var dateCountOfMonth=Object(date_util_["getDayCountOfMonth"])(date.getFullYear(),date.getMonth());var dateCountOfLastMonth=Object(date_util_["getDayCountOfMonth"])(date.getFullYear(),date.getMonth()===0?11:date.getMonth()-1);day=day===0?7:day;var offset=this.offsetDay;var rows=this.tableRows;var count=1;var startDate=this.startDate;var disabledDate=this.disabledDate;var cellClassName=this.cellClassName;var selectedDate=this.selectionMode==='dates'?Object(util_["coerceTruthyValueToArray"])(this.value):[];var now=date_tablevue_type_script_lang_js_getDateTimestamp(new Date());for(var i=0;i<6;i++){var row=rows[i];if(this.showWeekNumber){if(!row[0]){row[0]={type:'week',text:Object(date_util_["getWeekNumber"])(Object(date_util_["nextDate"])(startDate,i*7+1))};}}var _loop=function _loop(j){var cell=row[_this.showWeekNumber?j+1:j];if(!cell){cell={row:i,column:j,type:'normal',inRange:false,start:false,end:false};}cell.type='normal';var index=i*7+j;var time=Object(date_util_["nextDate"])(startDate,index-offset).getTime();cell.inRange=time>=date_tablevue_type_script_lang_js_getDateTimestamp(_this.minDate)&&time<=date_tablevue_type_script_lang_js_getDateTimestamp(_this.maxDate);cell.start=_this.minDate&&time===date_tablevue_type_script_lang_js_getDateTimestamp(_this.minDate);cell.end=_this.maxDate&&time===date_tablevue_type_script_lang_js_getDateTimestamp(_this.maxDate);var isToday=time===now;if(isToday){cell.type='today';}if(i>=0&&i<=1){var numberOfDaysFromPreviousMonth=day+offset<0?7+day+offset:day+offset;if(j+i*7>=numberOfDaysFromPreviousMonth){cell.text=count++;}else{cell.text=dateCountOfLastMonth-(numberOfDaysFromPreviousMonth-j%7)+1+i*7;cell.type='prev-month';}}else{if(count<=dateCountOfMonth){cell.text=count++;}else{cell.text=count++-dateCountOfMonth;cell.type='next-month';}}var cellDate=new Date(time);cell.disabled=typeof disabledDate==='function'&&disabledDate(cellDate);cell.selected=Object(util_["arrayFind"])(selectedDate,function(date){return date.getTime()===cellDate.getTime();});cell.customClass=typeof cellClassName==='function'&&cellClassName(cellDate);_this.$set(row,_this.showWeekNumber?j+1:j,cell);};for(var j=0;j<7;j++){_loop(j);}if(this.selectionMode==='week'){var start=this.showWeekNumber?1:0;var end=this.showWeekNumber?7:6;var isWeekActive=this.isWeekActive(row[start+1]);row[start].inRange=isWeekActive;row[start].start=isWeekActive;row[end].inRange=isWeekActive;row[end].end=isWeekActive;}}return rows;}},watch:{'rangeState.endDate':function rangeStateEndDate(newVal){this.markRange(this.minDate,newVal);},minDate:function minDate(newVal,oldVal){if(date_tablevue_type_script_lang_js_getDateTimestamp(newVal)!==date_tablevue_type_script_lang_js_getDateTimestamp(oldVal)){this.markRange(this.minDate,this.maxDate);}},maxDate:function maxDate(newVal,oldVal){if(date_tablevue_type_script_lang_js_getDateTimestamp(newVal)!==date_tablevue_type_script_lang_js_getDateTimestamp(oldVal)){this.markRange(this.minDate,this.maxDate);}}},data:function data(){return{tableRows:[[],[],[],[],[],[]],lastRow:null,lastColumn:null};},methods:{cellMatchesDate:function cellMatchesDate(cell,date){var value=new Date(date);return this.year===value.getFullYear()&&this.month===value.getMonth()&&Number(cell.text)===value.getDate();},getCellClasses:function getCellClasses(cell){var _this2=this;var selectionMode=this.selectionMode;var defaultValue=this.defaultValue?Array.isArray(this.defaultValue)?this.defaultValue:[this.defaultValue]:[];var classes=[];if((cell.type==='normal'||cell.type==='today')&&!cell.disabled){classes.push('available');if(cell.type==='today'){classes.push('today');}}else{classes.push(cell.type);}if(cell.type==='normal'&&defaultValue.some(function(date){return _this2.cellMatchesDate(cell,date);})){classes.push('default');}if(selectionMode==='day'&&(cell.type==='normal'||cell.type==='today')&&this.cellMatchesDate(cell,this.value)){classes.push('current');}if(cell.inRange&&(cell.type==='normal'||cell.type==='today'||this.selectionMode==='week')){classes.push('in-range');if(cell.start){classes.push('start-date');}if(cell.end){classes.push('end-date');}}if(cell.disabled){classes.push('disabled');}if(cell.selected){classes.push('selected');}if(cell.customClass){classes.push(cell.customClass);}return classes.join(' ');},getDateOfCell:function getDateOfCell(row,column){var offsetFromStart=row*7+(column-(this.showWeekNumber?1:0))-this.offsetDay;return Object(date_util_["nextDate"])(this.startDate,offsetFromStart);},isWeekActive:function isWeekActive(cell){if(this.selectionMode!=='week')return false;var newDate=new Date(this.year,this.month,1);var year=newDate.getFullYear();var month=newDate.getMonth();if(cell.type==='prev-month'){newDate.setMonth(month===0?11:month-1);newDate.setFullYear(month===0?year-1:year);}if(cell.type==='next-month'){newDate.setMonth(month===11?0:month+1);newDate.setFullYear(month===11?year+1:year);}newDate.setDate(parseInt(cell.text,10));if(Object(date_util_["isDate"])(this.value)){var dayOffset=(this.value.getDay()-this.firstDayOfWeek+7)%7-1;var weekDate=Object(date_util_["prevDate"])(this.value,dayOffset);return weekDate.getTime()===newDate.getTime();}return false;},markRange:function markRange(minDate,maxDate){minDate=date_tablevue_type_script_lang_js_getDateTimestamp(minDate);maxDate=date_tablevue_type_script_lang_js_getDateTimestamp(maxDate)||minDate;var _ref=[Math.min(minDate,maxDate),Math.max(minDate,maxDate)];minDate=_ref[0];maxDate=_ref[1];var startDate=this.startDate;var rows=this.rows;for(var i=0,k=rows.length;i<k;i++){var row=rows[i];for(var j=0,l=row.length;j<l;j++){if(this.showWeekNumber&&j===0)continue;var _cell=row[j];var index=i*7+j+(this.showWeekNumber?-1:0);var time=Object(date_util_["nextDate"])(startDate,index-this.offsetDay).getTime();_cell.inRange=minDate&&time>=minDate&&time<=maxDate;_cell.start=minDate&&time===minDate;_cell.end=maxDate&&time===maxDate;}}},handleMouseMove:function handleMouseMove(event){if(!this.rangeState.selecting)return;var target=event.target;if(target.tagName==='SPAN'){target=target.parentNode.parentNode;}if(target.tagName==='DIV'){target=target.parentNode;}if(target.tagName!=='TD')return;var row=target.parentNode.rowIndex-1;var column=target.cellIndex;// can not select disabled date
if(this.rows[row][column].disabled)return;// only update rangeState when mouse moves to a new cell
// this avoids frequent Date object creation and improves performance
if(row!==this.lastRow||column!==this.lastColumn){this.lastRow=row;this.lastColumn=column;this.$emit('changerange',{minDate:this.minDate,maxDate:this.maxDate,rangeState:{selecting:true,endDate:this.getDateOfCell(row,column)}});}},handleClick:function handleClick(event){var target=event.target;if(target.tagName==='SPAN'){target=target.parentNode.parentNode;}if(target.tagName==='DIV'){target=target.parentNode;}if(target.tagName!=='TD')return;var row=target.parentNode.rowIndex-1;var column=this.selectionMode==='week'?1:target.cellIndex;var cell=this.rows[row][column];if(cell.disabled||cell.type==='week')return;var newDate=this.getDateOfCell(row,column);if(this.selectionMode==='range'){if(!this.rangeState.selecting){this.$emit('pick',{minDate:newDate,maxDate:null});this.rangeState.selecting=true;}else{if(newDate>=this.minDate){this.$emit('pick',{minDate:this.minDate,maxDate:newDate});}else{this.$emit('pick',{minDate:newDate,maxDate:this.minDate});}this.rangeState.selecting=false;}}else if(this.selectionMode==='day'){this.$emit('pick',newDate);}else if(this.selectionMode==='week'){var weekNumber=Object(date_util_["getWeekNumber"])(newDate);var value=newDate.getFullYear()+'w'+weekNumber;this.$emit('pick',{year:newDate.getFullYear(),week:weekNumber,value:value,date:newDate});}else if(this.selectionMode==='dates'){var _value=this.value||[];var newValue=cell.selected?date_tablevue_type_script_lang_js_removeFromArray(_value,function(date){return date.getTime()===newDate.getTime();}):[].concat(_value,[newDate]);this.$emit('pick',newValue);}}}};// CONCATENATED MODULE: ./packages/date-picker/src/basic/date-table.vue?vue&type=script&lang=js&
/* harmony default export */var basic_date_tablevue_type_script_lang_js_=date_tablevue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/date-picker/src/basic/date-table.vue
/* normalize component */var date_table_component=normalizeComponent(basic_date_tablevue_type_script_lang_js_,date_tablevue_type_template_id_5d1f3341_render,date_tablevue_type_template_id_5d1f3341_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var date_table_api; }date_table_component.options.__file="packages/date-picker/src/basic/date-table.vue";/* harmony default export */var date_table=date_table_component.exports;// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/date.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var datevue_type_script_lang_js_={mixins:[locale_default.a],directives:{Clickoutside:clickoutside_default.a},watch:{showTime:function showTime(val){var _this=this;/* istanbul ignore if */if(!val)return;this.$nextTick(function(_){var inputElm=_this.$refs.input.$el;if(inputElm){_this.pickerWidth=inputElm.getBoundingClientRect().width+10;}});},value:function value(val){if(this.selectionMode==='dates'&&this.value)return;if(Object(date_util_["isDate"])(val)){this.date=new Date(val);}else{this.date=this.getDefaultValue();}},defaultValue:function defaultValue(val){if(!Object(date_util_["isDate"])(this.value)){this.date=val?new Date(val):new Date();}},timePickerVisible:function timePickerVisible(val){var _this2=this;if(val)this.$nextTick(function(){return _this2.$refs.timepicker.adjustSpinners();});},selectionMode:function selectionMode(newVal){if(newVal==='month'){/* istanbul ignore next */if(this.currentView!=='year'||this.currentView!=='month'){this.currentView='month';}}else if(newVal==='dates'){this.currentView='date';}}},methods:{proxyTimePickerDataProperties:function proxyTimePickerDataProperties(){var _this3=this;var format=function format(timeFormat){_this3.$refs.timepicker.format=timeFormat;};var value=function value(_value){_this3.$refs.timepicker.value=_value;};var date=function date(_date){_this3.$refs.timepicker.date=_date;};var selectableRange=function selectableRange(_selectableRange){_this3.$refs.timepicker.selectableRange=_selectableRange;};this.$watch('value',value);this.$watch('date',date);this.$watch('selectableRange',selectableRange);format(this.timeFormat);value(this.value);date(this.date);selectableRange(this.selectableRange);},handleClear:function handleClear(){this.date=this.getDefaultValue();this.$emit('pick',null);},emit:function emit(value){var _this4=this;for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key];}if(!value){this.$emit.apply(this,['pick',value].concat(args));}else if(Array.isArray(value)){var dates=value.map(function(date){return _this4.showTime?Object(date_util_["clearMilliseconds"])(date):Object(date_util_["clearTime"])(date);});this.$emit.apply(this,['pick',dates].concat(args));}else{this.$emit.apply(this,['pick',this.showTime?Object(date_util_["clearMilliseconds"])(value):Object(date_util_["clearTime"])(value)].concat(args));}this.userInputDate=null;this.userInputTime=null;},// resetDate() {
//   this.date = new Date(this.date);
// },
showMonthPicker:function showMonthPicker(){this.currentView='month';},showYearPicker:function showYearPicker(){this.currentView='year';},// XXX: 没用到
// handleLabelClick() {
//   if (this.currentView === 'date') {
//     this.showMonthPicker();
//   } else if (this.currentView === 'month') {
//     this.showYearPicker();
//   }
// },
prevMonth:function prevMonth(){this.date=Object(date_util_["prevMonth"])(this.date);},nextMonth:function nextMonth(){this.date=Object(date_util_["nextMonth"])(this.date);},prevYear:function prevYear(){if(this.currentView==='year'){this.date=Object(date_util_["prevYear"])(this.date,10);}else{this.date=Object(date_util_["prevYear"])(this.date);}},nextYear:function nextYear(){if(this.currentView==='year'){this.date=Object(date_util_["nextYear"])(this.date,10);}else{this.date=Object(date_util_["nextYear"])(this.date);}},handleShortcutClick:function handleShortcutClick(shortcut){if(shortcut.onClick){shortcut.onClick(this);}},handleTimePick:function handleTimePick(value,visible,first){if(Object(date_util_["isDate"])(value)){var newDate=this.value?Object(date_util_["modifyTime"])(this.value,value.getHours(),value.getMinutes(),value.getSeconds()):Object(date_util_["modifyWithTimeString"])(this.getDefaultValue(),this.defaultTime);this.date=newDate;this.emit(this.date,true);}else{this.emit(value,true);}if(!first){this.timePickerVisible=visible;}},handleTimePickClose:function handleTimePickClose(){this.timePickerVisible=false;},handleMonthPick:function handleMonthPick(month){if(this.selectionMode==='month'){this.date=Object(date_util_["modifyDate"])(this.date,this.year,month,1);this.emit(this.date);}else{this.date=Object(date_util_["changeYearMonthAndClampDate"])(this.date,this.year,month);// TODO: should emit intermediate value ??
// this.emit(this.date);
this.currentView='date';}},handleDatePick:function handleDatePick(value){if(this.selectionMode==='day'){var newDate=this.value?Object(date_util_["modifyDate"])(this.value,value.getFullYear(),value.getMonth(),value.getDate()):Object(date_util_["modifyWithTimeString"])(value,this.defaultTime);// change default time while out of selectableRange
if(!this.checkDateWithinRange(newDate)){newDate=Object(date_util_["modifyDate"])(this.selectableRange[0][0],value.getFullYear(),value.getMonth(),value.getDate());}this.date=newDate;this.emit(this.date,this.showTime);}else if(this.selectionMode==='week'){this.emit(value.date);}else if(this.selectionMode==='dates'){this.emit(value,true);// set false to keep panel open
}},handleYearPick:function handleYearPick(year){if(this.selectionMode==='year'){this.date=Object(date_util_["modifyDate"])(this.date,year,0,1);this.emit(this.date);}else{this.date=Object(date_util_["changeYearMonthAndClampDate"])(this.date,year,this.month);// TODO: should emit intermediate value ??
// this.emit(this.date, true);
this.currentView='month';}},changeToNow:function changeToNow(){// NOTE: not a permanent solution
//       consider disable "now" button in the future
if((!this.disabledDate||!this.disabledDate(new Date()))&&this.checkDateWithinRange(new Date())){this.date=new Date();this.emit(this.date);}},confirm:function confirm(){if(this.selectionMode==='dates'){this.emit(this.value);}else{// value were emitted in handle{Date,Time}Pick, nothing to update here
// deal with the scenario where: user opens the picker, then confirm without doing anything
var value=this.value?this.value:Object(date_util_["modifyWithTimeString"])(this.getDefaultValue(),this.defaultTime);this.date=new Date(value);// refresh date
this.emit(value);}},resetView:function resetView(){if(this.selectionMode==='month'){this.currentView='month';}else if(this.selectionMode==='year'){this.currentView='year';}else{this.currentView='date';}},handleEnter:function handleEnter(){document.body.addEventListener('keydown',this.handleKeydown);},handleLeave:function handleLeave(){this.$emit('dodestroy');document.body.removeEventListener('keydown',this.handleKeydown);},handleKeydown:function handleKeydown(event){var keyCode=event.keyCode;var list=[38,40,37,39];if(this.visible&&!this.timePickerVisible){if(list.indexOf(keyCode)!==-1){this.handleKeyControl(keyCode);event.stopPropagation();event.preventDefault();}if(keyCode===13&&this.userInputDate===null&&this.userInputTime===null){// Enter
this.emit(this.date,false);}}},handleKeyControl:function handleKeyControl(keyCode){var mapping={'year':{38:-4,40:4,37:-1,39:1,offset:function offset(date,step){return date.setFullYear(date.getFullYear()+step);}},'month':{38:-4,40:4,37:-1,39:1,offset:function offset(date,step){return date.setMonth(date.getMonth()+step);}},'week':{38:-1,40:1,37:-1,39:1,offset:function offset(date,step){return date.setDate(date.getDate()+step*7);}},'day':{38:-7,40:7,37:-1,39:1,offset:function offset(date,step){return date.setDate(date.getDate()+step);}}};var mode=this.selectionMode;var year=3.1536e10;var now=this.date.getTime();var newDate=new Date(this.date.getTime());while(Math.abs(now-newDate.getTime())<=year){var map=mapping[mode];map.offset(newDate,map[keyCode]);if(typeof this.disabledDate==='function'&&this.disabledDate(newDate)){continue;}this.date=newDate;this.$emit('pick',newDate,true);break;}},handleVisibleTimeChange:function handleVisibleTimeChange(value){var time=Object(date_util_["parseDate"])(value,this.timeFormat);if(time&&this.checkDateWithinRange(time)){this.date=Object(date_util_["modifyDate"])(time,this.year,this.month,this.monthDate);this.userInputTime=null;this.$refs.timepicker.value=this.date;this.timePickerVisible=false;this.emit(this.date,true);}},handleVisibleDateChange:function handleVisibleDateChange(value){var date=Object(date_util_["parseDate"])(value,this.dateFormat);if(date){if(typeof this.disabledDate==='function'&&this.disabledDate(date)){return;}this.date=Object(date_util_["modifyTime"])(date,this.date.getHours(),this.date.getMinutes(),this.date.getSeconds());this.userInputDate=null;this.resetView();this.emit(this.date,true);}},isValidValue:function isValidValue(value){return value&&!isNaN(value)&&(typeof this.disabledDate==='function'?!this.disabledDate(value):true)&&this.checkDateWithinRange(value);},getDefaultValue:function getDefaultValue(){// if default-value is set, return it
// otherwise, return now (the moment this method gets called)
return this.defaultValue?new Date(this.defaultValue):new Date();},checkDateWithinRange:function checkDateWithinRange(date){return this.selectableRange.length>0?Object(date_util_["timeWithinRange"])(date,this.selectableRange,this.format||'HH:mm:ss'):true;}},components:{TimePicker:panel_time,YearTable:year_table,MonthTable:month_table,DateTable:date_table,ElInput:input_default.a,ElButton:button_default.a},data:function data(){return{popperClass:'',date:new Date(),value:'',defaultValue:null,// use getDefaultValue() for time computation
defaultTime:null,showTime:false,selectionMode:'day',shortcuts:'',visible:false,currentView:'date',disabledDate:'',cellClassName:'',selectableRange:[],firstDayOfWeek:7,showWeekNumber:false,timePickerVisible:false,format:'',arrowControl:false,userInputDate:null,userInputTime:null};},computed:{year:function year(){return this.date.getFullYear();},month:function month(){return this.date.getMonth();},week:function week(){return Object(date_util_["getWeekNumber"])(this.date);},monthDate:function monthDate(){return this.date.getDate();},footerVisible:function footerVisible(){return this.showTime||this.selectionMode==='dates';},visibleTime:function visibleTime(){if(this.userInputTime!==null){return this.userInputTime;}else{return Object(date_util_["formatDate"])(this.value||this.defaultValue,this.timeFormat);}},visibleDate:function visibleDate(){if(this.userInputDate!==null){return this.userInputDate;}else{return Object(date_util_["formatDate"])(this.value||this.defaultValue,this.dateFormat);}},yearLabel:function yearLabel(){var yearTranslation=this.t('el.datepicker.year');if(this.currentView==='year'){var startYear=Math.floor(this.year/10)*10;if(yearTranslation){return startYear+' '+yearTranslation+' - '+(startYear+9)+' '+yearTranslation;}return startYear+' - '+(startYear+9);}return this.year+' '+yearTranslation;},timeFormat:function timeFormat(){if(this.format){return Object(date_util_["extractTimeFormat"])(this.format);}else{return'HH:mm:ss';}},dateFormat:function dateFormat(){if(this.format){return Object(date_util_["extractDateFormat"])(this.format);}else{return'yyyy-MM-dd';}}}};// CONCATENATED MODULE: ./packages/date-picker/src/panel/date.vue?vue&type=script&lang=js&
/* harmony default export */var panel_datevue_type_script_lang_js_=datevue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/date-picker/src/panel/date.vue
/* normalize component */var date_component=normalizeComponent(panel_datevue_type_script_lang_js_,datevue_type_template_id_2440d4ea_render,datevue_type_template_id_2440d4ea_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var date_api; }date_component.options.__file="packages/date-picker/src/panel/date.vue";/* harmony default export */var panel_date=date_component.exports;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/date-range.vue?vue&type=template&id=2652849a&
var date_rangevue_type_template_id_2652849a_render=function date_rangevue_type_template_id_2652849a_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("transition",{attrs:{name:"el-zoom-in-top"},on:{"after-leave":function afterLeave($event){_vm.$emit("dodestroy");}}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.visible,expression:"visible"}],staticClass:"el-picker-panel el-date-range-picker el-popper",class:[{"has-sidebar":_vm.$slots.sidebar||_vm.shortcuts,"has-time":_vm.showTime},_vm.popperClass]},[_c("div",{staticClass:"el-picker-panel__body-wrapper"},[_vm._t("sidebar"),_vm.shortcuts?_c("div",{staticClass:"el-picker-panel__sidebar"},_vm._l(_vm.shortcuts,function(shortcut,key){return _c("button",{key:key,staticClass:"el-picker-panel__shortcut",attrs:{type:"button"},on:{click:function click($event){_vm.handleShortcutClick(shortcut);}}},[_vm._v(_vm._s(shortcut.text))]);}),0):_vm._e(),_c("div",{staticClass:"el-picker-panel__body"},[_vm.showTime?_c("div",{staticClass:"el-date-range-picker__time-header"},[_c("span",{staticClass:"el-date-range-picker__editors-wrap"},[_c("span",{staticClass:"el-date-range-picker__time-picker-wrap"},[_c("el-input",{ref:"minInput",staticClass:"el-date-range-picker__editor",attrs:{size:"small",disabled:_vm.rangeState.selecting,placeholder:_vm.t("el.datepicker.startDate"),value:_vm.minVisibleDate},on:{input:function input(val){return _vm.handleDateInput(val,"min");},change:function change(val){return _vm.handleDateChange(val,"min");}}})],1),_c("span",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:_vm.handleMinTimeClose,expression:"handleMinTimeClose"}],staticClass:"el-date-range-picker__time-picker-wrap"},[_c("el-input",{staticClass:"el-date-range-picker__editor",attrs:{size:"small",disabled:_vm.rangeState.selecting,placeholder:_vm.t("el.datepicker.startTime"),value:_vm.minVisibleTime},on:{focus:function focus($event){_vm.minTimePickerVisible=true;},input:function input(val){return _vm.handleTimeInput(val,"min");},change:function change(val){return _vm.handleTimeChange(val,"min");}}}),_c("time-picker",{ref:"minTimePicker",attrs:{"time-arrow-control":_vm.arrowControl,visible:_vm.minTimePickerVisible},on:{pick:_vm.handleMinTimePick,mounted:function mounted($event){_vm.$refs.minTimePicker.format=_vm.timeFormat;}}})],1)]),_c("span",{staticClass:"el-icon-arrow-right"}),_c("span",{staticClass:"el-date-range-picker__editors-wrap is-right"},[_c("span",{staticClass:"el-date-range-picker__time-picker-wrap"},[_c("el-input",{staticClass:"el-date-range-picker__editor",attrs:{size:"small",disabled:_vm.rangeState.selecting,placeholder:_vm.t("el.datepicker.endDate"),value:_vm.maxVisibleDate,readonly:!_vm.minDate},on:{input:function input(val){return _vm.handleDateInput(val,"max");},change:function change(val){return _vm.handleDateChange(val,"max");}}})],1),_c("span",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:_vm.handleMaxTimeClose,expression:"handleMaxTimeClose"}],staticClass:"el-date-range-picker__time-picker-wrap"},[_c("el-input",{staticClass:"el-date-range-picker__editor",attrs:{size:"small",disabled:_vm.rangeState.selecting,placeholder:_vm.t("el.datepicker.endTime"),value:_vm.maxVisibleTime,readonly:!_vm.minDate},on:{focus:function focus($event){_vm.minDate&&(_vm.maxTimePickerVisible=true);},input:function input(val){return _vm.handleTimeInput(val,"max");},change:function change(val){return _vm.handleTimeChange(val,"max");}}}),_c("time-picker",{ref:"maxTimePicker",attrs:{"time-arrow-control":_vm.arrowControl,visible:_vm.maxTimePickerVisible},on:{pick:_vm.handleMaxTimePick,mounted:function mounted($event){_vm.$refs.maxTimePicker.format=_vm.timeFormat;}}})],1)])]):_vm._e(),_c("div",{staticClass:"el-picker-panel__content el-date-range-picker__content is-left"},[_c("div",{staticClass:"el-date-range-picker__header"},[_c("button",{staticClass:"el-picker-panel__icon-btn el-icon-d-arrow-left",attrs:{type:"button"},on:{click:_vm.leftPrevYear}}),_c("button",{staticClass:"el-picker-panel__icon-btn el-icon-arrow-left",attrs:{type:"button"},on:{click:_vm.leftPrevMonth}}),_vm.unlinkPanels?_c("button",{staticClass:"el-picker-panel__icon-btn el-icon-d-arrow-right",class:{"is-disabled":!_vm.enableYearArrow},attrs:{type:"button",disabled:!_vm.enableYearArrow},on:{click:_vm.leftNextYear}}):_vm._e(),_vm.unlinkPanels?_c("button",{staticClass:"el-picker-panel__icon-btn el-icon-arrow-right",class:{"is-disabled":!_vm.enableMonthArrow},attrs:{type:"button",disabled:!_vm.enableMonthArrow},on:{click:_vm.leftNextMonth}}):_vm._e(),_c("div",[_vm._v(_vm._s(_vm.leftLabel))])]),_c("date-table",{attrs:{"selection-mode":"range",date:_vm.leftDate,"default-value":_vm.defaultValue,"min-date":_vm.minDate,"max-date":_vm.maxDate,"range-state":_vm.rangeState,"disabled-date":_vm.disabledDate,"cell-class-name":_vm.cellClassName,"first-day-of-week":_vm.firstDayOfWeek},on:{changerange:_vm.handleChangeRange,pick:_vm.handleRangePick}})],1),_c("div",{staticClass:"el-picker-panel__content el-date-range-picker__content is-right"},[_c("div",{staticClass:"el-date-range-picker__header"},[_vm.unlinkPanels?_c("button",{staticClass:"el-picker-panel__icon-btn el-icon-d-arrow-left",class:{"is-disabled":!_vm.enableYearArrow},attrs:{type:"button",disabled:!_vm.enableYearArrow},on:{click:_vm.rightPrevYear}}):_vm._e(),_vm.unlinkPanels?_c("button",{staticClass:"el-picker-panel__icon-btn el-icon-arrow-left",class:{"is-disabled":!_vm.enableMonthArrow},attrs:{type:"button",disabled:!_vm.enableMonthArrow},on:{click:_vm.rightPrevMonth}}):_vm._e(),_c("button",{staticClass:"el-picker-panel__icon-btn el-icon-d-arrow-right",attrs:{type:"button"},on:{click:_vm.rightNextYear}}),_c("button",{staticClass:"el-picker-panel__icon-btn el-icon-arrow-right",attrs:{type:"button"},on:{click:_vm.rightNextMonth}}),_c("div",[_vm._v(_vm._s(_vm.rightLabel))])]),_c("date-table",{attrs:{"selection-mode":"range",date:_vm.rightDate,"default-value":_vm.defaultValue,"min-date":_vm.minDate,"max-date":_vm.maxDate,"range-state":_vm.rangeState,"disabled-date":_vm.disabledDate,"cell-class-name":_vm.cellClassName,"first-day-of-week":_vm.firstDayOfWeek},on:{changerange:_vm.handleChangeRange,pick:_vm.handleRangePick}})],1)])],2),_vm.showTime?_c("div",{staticClass:"el-picker-panel__footer"},[_c("el-button",{staticClass:"el-picker-panel__link-btn",attrs:{size:"mini",type:"text"},on:{click:_vm.handleClear}},[_vm._v("\n        "+_vm._s(_vm.t("el.datepicker.clear"))+"\n      ")]),_c("el-button",{staticClass:"el-picker-panel__link-btn",attrs:{plain:"",size:"mini",disabled:_vm.btnDisabled},on:{click:function click($event){_vm.handleConfirm(false);}}},[_vm._v("\n        "+_vm._s(_vm.t("el.datepicker.confirm"))+"\n      ")])],1):_vm._e()])]);};var date_rangevue_type_template_id_2652849a_staticRenderFns=[];date_rangevue_type_template_id_2652849a_render._withStripped=true;// CONCATENATED MODULE: ./packages/date-picker/src/panel/date-range.vue?vue&type=template&id=2652849a&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/date-range.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var date_rangevue_type_script_lang_js_calcDefaultValue=function calcDefaultValue(defaultValue){if(Array.isArray(defaultValue)){return[new Date(defaultValue[0]),new Date(defaultValue[1])];}else if(defaultValue){return[new Date(defaultValue),Object(date_util_["nextDate"])(new Date(defaultValue),1)];}else{return[new Date(),Object(date_util_["nextDate"])(new Date(),1)];}};/* harmony default export */var date_rangevue_type_script_lang_js_={mixins:[locale_default.a],directives:{Clickoutside:clickoutside_default.a},computed:{btnDisabled:function btnDisabled(){return!(this.minDate&&this.maxDate&&!this.selecting&&this.isValidValue([this.minDate,this.maxDate]));},leftLabel:function leftLabel(){return this.leftDate.getFullYear()+' '+this.t('el.datepicker.year')+' '+this.t('el.datepicker.month'+(this.leftDate.getMonth()+1));},rightLabel:function rightLabel(){return this.rightDate.getFullYear()+' '+this.t('el.datepicker.year')+' '+this.t('el.datepicker.month'+(this.rightDate.getMonth()+1));},leftYear:function leftYear(){return this.leftDate.getFullYear();},leftMonth:function leftMonth(){return this.leftDate.getMonth();},leftMonthDate:function leftMonthDate(){return this.leftDate.getDate();},rightYear:function rightYear(){return this.rightDate.getFullYear();},rightMonth:function rightMonth(){return this.rightDate.getMonth();},rightMonthDate:function rightMonthDate(){return this.rightDate.getDate();},minVisibleDate:function minVisibleDate(){if(this.dateUserInput.min!==null)return this.dateUserInput.min;if(this.minDate)return Object(date_util_["formatDate"])(this.minDate,this.dateFormat);return'';},maxVisibleDate:function maxVisibleDate(){if(this.dateUserInput.max!==null)return this.dateUserInput.max;if(this.maxDate||this.minDate)return Object(date_util_["formatDate"])(this.maxDate||this.minDate,this.dateFormat);return'';},minVisibleTime:function minVisibleTime(){if(this.timeUserInput.min!==null)return this.timeUserInput.min;if(this.minDate)return Object(date_util_["formatDate"])(this.minDate,this.timeFormat);return'';},maxVisibleTime:function maxVisibleTime(){if(this.timeUserInput.max!==null)return this.timeUserInput.max;if(this.maxDate||this.minDate)return Object(date_util_["formatDate"])(this.maxDate||this.minDate,this.timeFormat);return'';},timeFormat:function timeFormat(){if(this.format){return Object(date_util_["extractTimeFormat"])(this.format);}else{return'HH:mm:ss';}},dateFormat:function dateFormat(){if(this.format){return Object(date_util_["extractDateFormat"])(this.format);}else{return'yyyy-MM-dd';}},enableMonthArrow:function enableMonthArrow(){var nextMonth=(this.leftMonth+1)%12;var yearOffset=this.leftMonth+1>=12?1:0;return this.unlinkPanels&&new Date(this.leftYear+yearOffset,nextMonth)<new Date(this.rightYear,this.rightMonth);},enableYearArrow:function enableYearArrow(){return this.unlinkPanels&&this.rightYear*12+this.rightMonth-(this.leftYear*12+this.leftMonth+1)>=12;}},data:function data(){return{popperClass:'',value:[],defaultValue:null,defaultTime:null,minDate:'',maxDate:'',leftDate:new Date(),rightDate:Object(date_util_["nextMonth"])(new Date()),rangeState:{endDate:null,selecting:false,row:null,column:null},showTime:false,shortcuts:'',visible:'',disabledDate:'',cellClassName:'',firstDayOfWeek:7,minTimePickerVisible:false,maxTimePickerVisible:false,format:'',arrowControl:false,unlinkPanels:false,dateUserInput:{min:null,max:null},timeUserInput:{min:null,max:null}};},watch:{minDate:function minDate(val){var _this=this;this.dateUserInput.min=null;this.timeUserInput.min=null;this.$nextTick(function(){if(_this.$refs.maxTimePicker&&_this.maxDate&&_this.maxDate<_this.minDate){var format='HH:mm:ss';_this.$refs.maxTimePicker.selectableRange=[[Object(date_util_["parseDate"])(Object(date_util_["formatDate"])(_this.minDate,format),format),Object(date_util_["parseDate"])('23:59:59',format)]];}});if(val&&this.$refs.minTimePicker){this.$refs.minTimePicker.date=val;this.$refs.minTimePicker.value=val;}},maxDate:function maxDate(val){this.dateUserInput.max=null;this.timeUserInput.max=null;if(val&&this.$refs.maxTimePicker){this.$refs.maxTimePicker.date=val;this.$refs.maxTimePicker.value=val;}},minTimePickerVisible:function minTimePickerVisible(val){var _this2=this;if(val){this.$nextTick(function(){_this2.$refs.minTimePicker.date=_this2.minDate;_this2.$refs.minTimePicker.value=_this2.minDate;_this2.$refs.minTimePicker.adjustSpinners();});}},maxTimePickerVisible:function maxTimePickerVisible(val){var _this3=this;if(val){this.$nextTick(function(){_this3.$refs.maxTimePicker.date=_this3.maxDate;_this3.$refs.maxTimePicker.value=_this3.maxDate;_this3.$refs.maxTimePicker.adjustSpinners();});}},value:function value(newVal){if(!newVal){this.minDate=null;this.maxDate=null;}else if(Array.isArray(newVal)){this.minDate=Object(date_util_["isDate"])(newVal[0])?new Date(newVal[0]):null;this.maxDate=Object(date_util_["isDate"])(newVal[1])?new Date(newVal[1]):null;if(this.minDate){this.leftDate=this.minDate;if(this.unlinkPanels&&this.maxDate){var minDateYear=this.minDate.getFullYear();var minDateMonth=this.minDate.getMonth();var maxDateYear=this.maxDate.getFullYear();var maxDateMonth=this.maxDate.getMonth();this.rightDate=minDateYear===maxDateYear&&minDateMonth===maxDateMonth?Object(date_util_["nextMonth"])(this.maxDate):this.maxDate;}else{this.rightDate=Object(date_util_["nextMonth"])(this.leftDate);}}else{this.leftDate=date_rangevue_type_script_lang_js_calcDefaultValue(this.defaultValue)[0];this.rightDate=Object(date_util_["nextMonth"])(this.leftDate);}}},defaultValue:function defaultValue(val){if(!Array.isArray(this.value)){var _calcDefaultValue=date_rangevue_type_script_lang_js_calcDefaultValue(val),left=_calcDefaultValue[0],right=_calcDefaultValue[1];this.leftDate=left;this.rightDate=val&&val[1]&&this.unlinkPanels?right:Object(date_util_["nextMonth"])(this.leftDate);}}},methods:{handleClear:function handleClear(){this.minDate=null;this.maxDate=null;this.leftDate=date_rangevue_type_script_lang_js_calcDefaultValue(this.defaultValue)[0];this.rightDate=Object(date_util_["nextMonth"])(this.leftDate);this.$emit('pick',null);},handleChangeRange:function handleChangeRange(val){this.minDate=val.minDate;this.maxDate=val.maxDate;this.rangeState=val.rangeState;},handleDateInput:function handleDateInput(value,type){this.dateUserInput[type]=value;if(value.length!==this.dateFormat.length)return;var parsedValue=Object(date_util_["parseDate"])(value,this.dateFormat);if(parsedValue){if(typeof this.disabledDate==='function'&&this.disabledDate(new Date(parsedValue))){return;}if(type==='min'){this.minDate=Object(date_util_["modifyDate"])(this.minDate||new Date(),parsedValue.getFullYear(),parsedValue.getMonth(),parsedValue.getDate());this.leftDate=new Date(parsedValue);if(!this.unlinkPanels){this.rightDate=Object(date_util_["nextMonth"])(this.leftDate);}}else{this.maxDate=Object(date_util_["modifyDate"])(this.maxDate||new Date(),parsedValue.getFullYear(),parsedValue.getMonth(),parsedValue.getDate());this.rightDate=new Date(parsedValue);if(!this.unlinkPanels){this.leftDate=Object(date_util_["prevMonth"])(parsedValue);}}}},handleDateChange:function handleDateChange(value,type){var parsedValue=Object(date_util_["parseDate"])(value,this.dateFormat);if(parsedValue){if(type==='min'){this.minDate=Object(date_util_["modifyDate"])(this.minDate,parsedValue.getFullYear(),parsedValue.getMonth(),parsedValue.getDate());if(this.minDate>this.maxDate){this.maxDate=this.minDate;}}else{this.maxDate=Object(date_util_["modifyDate"])(this.maxDate,parsedValue.getFullYear(),parsedValue.getMonth(),parsedValue.getDate());if(this.maxDate<this.minDate){this.minDate=this.maxDate;}}}},handleTimeInput:function handleTimeInput(value,type){var _this4=this;this.timeUserInput[type]=value;if(value.length!==this.timeFormat.length)return;var parsedValue=Object(date_util_["parseDate"])(value,this.timeFormat);if(parsedValue){if(type==='min'){this.minDate=Object(date_util_["modifyTime"])(this.minDate,parsedValue.getHours(),parsedValue.getMinutes(),parsedValue.getSeconds());this.$nextTick(function(_){return _this4.$refs.minTimePicker.adjustSpinners();});}else{this.maxDate=Object(date_util_["modifyTime"])(this.maxDate,parsedValue.getHours(),parsedValue.getMinutes(),parsedValue.getSeconds());this.$nextTick(function(_){return _this4.$refs.maxTimePicker.adjustSpinners();});}}},handleTimeChange:function handleTimeChange(value,type){var parsedValue=Object(date_util_["parseDate"])(value,this.timeFormat);if(parsedValue){if(type==='min'){this.minDate=Object(date_util_["modifyTime"])(this.minDate,parsedValue.getHours(),parsedValue.getMinutes(),parsedValue.getSeconds());if(this.minDate>this.maxDate){this.maxDate=this.minDate;}this.$refs.minTimePicker.value=this.minDate;this.minTimePickerVisible=false;}else{this.maxDate=Object(date_util_["modifyTime"])(this.maxDate,parsedValue.getHours(),parsedValue.getMinutes(),parsedValue.getSeconds());if(this.maxDate<this.minDate){this.minDate=this.maxDate;}this.$refs.maxTimePicker.value=this.minDate;this.maxTimePickerVisible=false;}}},handleRangePick:function handleRangePick(val){var _this5=this;var close=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var defaultTime=this.defaultTime||[];var minDate=Object(date_util_["modifyWithTimeString"])(val.minDate,defaultTime[0]);var maxDate=Object(date_util_["modifyWithTimeString"])(val.maxDate,defaultTime[1]);if(this.maxDate===maxDate&&this.minDate===minDate){return;}this.onPick&&this.onPick(val);this.maxDate=maxDate;this.minDate=minDate;// workaround for https://github.com/ElemeFE/element/issues/7539, should remove this block when we don't have to care about Chromium 55 - 57
setTimeout(function(){_this5.maxDate=maxDate;_this5.minDate=minDate;},10);if(!close||this.showTime)return;this.handleConfirm();},handleShortcutClick:function handleShortcutClick(shortcut){if(shortcut.onClick){shortcut.onClick(this);}},handleMinTimePick:function handleMinTimePick(value,visible,first){this.minDate=this.minDate||new Date();if(value){this.minDate=Object(date_util_["modifyTime"])(this.minDate,value.getHours(),value.getMinutes(),value.getSeconds());}if(!first){this.minTimePickerVisible=visible;}if(!this.maxDate||this.maxDate&&this.maxDate.getTime()<this.minDate.getTime()){this.maxDate=new Date(this.minDate);}},handleMinTimeClose:function handleMinTimeClose(){this.minTimePickerVisible=false;},handleMaxTimePick:function handleMaxTimePick(value,visible,first){if(this.maxDate&&value){this.maxDate=Object(date_util_["modifyTime"])(this.maxDate,value.getHours(),value.getMinutes(),value.getSeconds());}if(!first){this.maxTimePickerVisible=visible;}if(this.maxDate&&this.minDate&&this.minDate.getTime()>this.maxDate.getTime()){this.minDate=new Date(this.maxDate);}},handleMaxTimeClose:function handleMaxTimeClose(){this.maxTimePickerVisible=false;},// leftPrev*, rightNext* need to take care of `unlinkPanels`
leftPrevYear:function leftPrevYear(){this.leftDate=Object(date_util_["prevYear"])(this.leftDate);if(!this.unlinkPanels){this.rightDate=Object(date_util_["nextMonth"])(this.leftDate);}},leftPrevMonth:function leftPrevMonth(){this.leftDate=Object(date_util_["prevMonth"])(this.leftDate);if(!this.unlinkPanels){this.rightDate=Object(date_util_["nextMonth"])(this.leftDate);}},rightNextYear:function rightNextYear(){if(!this.unlinkPanels){this.leftDate=Object(date_util_["nextYear"])(this.leftDate);this.rightDate=Object(date_util_["nextMonth"])(this.leftDate);}else{this.rightDate=Object(date_util_["nextYear"])(this.rightDate);}},rightNextMonth:function rightNextMonth(){if(!this.unlinkPanels){this.leftDate=Object(date_util_["nextMonth"])(this.leftDate);this.rightDate=Object(date_util_["nextMonth"])(this.leftDate);}else{this.rightDate=Object(date_util_["nextMonth"])(this.rightDate);}},// leftNext*, rightPrev* are called when `unlinkPanels` is true
leftNextYear:function leftNextYear(){this.leftDate=Object(date_util_["nextYear"])(this.leftDate);},leftNextMonth:function leftNextMonth(){this.leftDate=Object(date_util_["nextMonth"])(this.leftDate);},rightPrevYear:function rightPrevYear(){this.rightDate=Object(date_util_["prevYear"])(this.rightDate);},rightPrevMonth:function rightPrevMonth(){this.rightDate=Object(date_util_["prevMonth"])(this.rightDate);},handleConfirm:function handleConfirm(){var visible=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;if(this.isValidValue([this.minDate,this.maxDate])){this.$emit('pick',[this.minDate,this.maxDate],visible);}},isValidValue:function isValidValue(value){return Array.isArray(value)&&value&&value[0]&&value[1]&&Object(date_util_["isDate"])(value[0])&&Object(date_util_["isDate"])(value[1])&&value[0].getTime()<=value[1].getTime()&&(typeof this.disabledDate==='function'?!this.disabledDate(value[0])&&!this.disabledDate(value[1]):true);},resetView:function resetView(){// NOTE: this is a hack to reset {min, max}Date on picker open.
// TODO: correct way of doing so is to refactor {min, max}Date to be dependent on value and internal selection state
//       an alternative would be resetView whenever picker becomes visible, should also investigate date-panel's resetView
if(this.minDate&&this.maxDate==null)this.rangeState.selecting=false;this.minDate=this.value&&Object(date_util_["isDate"])(this.value[0])?new Date(this.value[0]):null;this.maxDate=this.value&&Object(date_util_["isDate"])(this.value[0])?new Date(this.value[1]):null;}},components:{TimePicker:panel_time,DateTable:date_table,ElInput:input_default.a,ElButton:button_default.a}};// CONCATENATED MODULE: ./packages/date-picker/src/panel/date-range.vue?vue&type=script&lang=js&
/* harmony default export */var panel_date_rangevue_type_script_lang_js_=date_rangevue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/date-picker/src/panel/date-range.vue
/* normalize component */var date_range_component=normalizeComponent(panel_date_rangevue_type_script_lang_js_,date_rangevue_type_template_id_2652849a_render,date_rangevue_type_template_id_2652849a_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var date_range_api; }date_range_component.options.__file="packages/date-picker/src/panel/date-range.vue";/* harmony default export */var date_range=date_range_component.exports;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/month-range.vue?vue&type=template&id=f2645fb8&
var month_rangevue_type_template_id_f2645fb8_render=function month_rangevue_type_template_id_f2645fb8_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("transition",{attrs:{name:"el-zoom-in-top"},on:{"after-leave":function afterLeave($event){_vm.$emit("dodestroy");}}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.visible,expression:"visible"}],staticClass:"el-picker-panel el-date-range-picker el-popper",class:[{"has-sidebar":_vm.$slots.sidebar||_vm.shortcuts},_vm.popperClass]},[_c("div",{staticClass:"el-picker-panel__body-wrapper"},[_vm._t("sidebar"),_vm.shortcuts?_c("div",{staticClass:"el-picker-panel__sidebar"},_vm._l(_vm.shortcuts,function(shortcut,key){return _c("button",{key:key,staticClass:"el-picker-panel__shortcut",attrs:{type:"button"},on:{click:function click($event){_vm.handleShortcutClick(shortcut);}}},[_vm._v(_vm._s(shortcut.text))]);}),0):_vm._e(),_c("div",{staticClass:"el-picker-panel__body"},[_c("div",{staticClass:"el-picker-panel__content el-date-range-picker__content is-left"},[_c("div",{staticClass:"el-date-range-picker__header"},[_c("button",{staticClass:"el-picker-panel__icon-btn el-icon-d-arrow-left",attrs:{type:"button"},on:{click:_vm.leftPrevYear}}),_vm.unlinkPanels?_c("button",{staticClass:"el-picker-panel__icon-btn el-icon-d-arrow-right",class:{"is-disabled":!_vm.enableYearArrow},attrs:{type:"button",disabled:!_vm.enableYearArrow},on:{click:_vm.leftNextYear}}):_vm._e(),_c("div",[_vm._v(_vm._s(_vm.leftLabel))])]),_c("month-table",{attrs:{"selection-mode":"range",date:_vm.leftDate,"default-value":_vm.defaultValue,"min-date":_vm.minDate,"max-date":_vm.maxDate,"range-state":_vm.rangeState,"disabled-date":_vm.disabledDate},on:{changerange:_vm.handleChangeRange,pick:_vm.handleRangePick}})],1),_c("div",{staticClass:"el-picker-panel__content el-date-range-picker__content is-right"},[_c("div",{staticClass:"el-date-range-picker__header"},[_vm.unlinkPanels?_c("button",{staticClass:"el-picker-panel__icon-btn el-icon-d-arrow-left",class:{"is-disabled":!_vm.enableYearArrow},attrs:{type:"button",disabled:!_vm.enableYearArrow},on:{click:_vm.rightPrevYear}}):_vm._e(),_c("button",{staticClass:"el-picker-panel__icon-btn el-icon-d-arrow-right",attrs:{type:"button"},on:{click:_vm.rightNextYear}}),_c("div",[_vm._v(_vm._s(_vm.rightLabel))])]),_c("month-table",{attrs:{"selection-mode":"range",date:_vm.rightDate,"default-value":_vm.defaultValue,"min-date":_vm.minDate,"max-date":_vm.maxDate,"range-state":_vm.rangeState,"disabled-date":_vm.disabledDate},on:{changerange:_vm.handleChangeRange,pick:_vm.handleRangePick}})],1)])],2)])]);};var month_rangevue_type_template_id_f2645fb8_staticRenderFns=[];month_rangevue_type_template_id_f2645fb8_render._withStripped=true;// CONCATENATED MODULE: ./packages/date-picker/src/panel/month-range.vue?vue&type=template&id=f2645fb8&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/month-range.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var month_rangevue_type_script_lang_js_calcDefaultValue=function calcDefaultValue(defaultValue){if(Array.isArray(defaultValue)){return[new Date(defaultValue[0]),new Date(defaultValue[1])];}else if(defaultValue){return[new Date(defaultValue),Object(date_util_["nextMonth"])(new Date(defaultValue))];}else{return[new Date(),Object(date_util_["nextMonth"])(new Date())];}};/* harmony default export */var month_rangevue_type_script_lang_js_={mixins:[locale_default.a],directives:{Clickoutside:clickoutside_default.a},computed:{btnDisabled:function btnDisabled(){return!(this.minDate&&this.maxDate&&!this.selecting&&this.isValidValue([this.minDate,this.maxDate]));},leftLabel:function leftLabel(){return this.leftDate.getFullYear()+' '+this.t('el.datepicker.year');},rightLabel:function rightLabel(){return this.rightDate.getFullYear()+' '+this.t('el.datepicker.year');},leftYear:function leftYear(){return this.leftDate.getFullYear();},rightYear:function rightYear(){return this.rightDate.getFullYear()===this.leftDate.getFullYear()?this.leftDate.getFullYear()+1:this.rightDate.getFullYear();},enableYearArrow:function enableYearArrow(){return this.unlinkPanels&&this.rightYear>this.leftYear+1;}},data:function data(){return{popperClass:'',value:[],defaultValue:null,defaultTime:null,minDate:'',maxDate:'',leftDate:new Date(),rightDate:Object(date_util_["nextYear"])(new Date()),rangeState:{endDate:null,selecting:false,row:null,column:null},shortcuts:'',visible:'',disabledDate:'',format:'',arrowControl:false,unlinkPanels:false};},watch:{value:function value(newVal){if(!newVal){this.minDate=null;this.maxDate=null;}else if(Array.isArray(newVal)){this.minDate=Object(date_util_["isDate"])(newVal[0])?new Date(newVal[0]):null;this.maxDate=Object(date_util_["isDate"])(newVal[1])?new Date(newVal[1]):null;if(this.minDate){this.leftDate=this.minDate;if(this.unlinkPanels&&this.maxDate){var minDateYear=this.minDate.getFullYear();var maxDateYear=this.maxDate.getFullYear();this.rightDate=minDateYear===maxDateYear?Object(date_util_["nextYear"])(this.maxDate):this.maxDate;}else{this.rightDate=Object(date_util_["nextYear"])(this.leftDate);}}else{this.leftDate=month_rangevue_type_script_lang_js_calcDefaultValue(this.defaultValue)[0];this.rightDate=Object(date_util_["nextYear"])(this.leftDate);}}},defaultValue:function defaultValue(val){if(!Array.isArray(this.value)){var _calcDefaultValue=month_rangevue_type_script_lang_js_calcDefaultValue(val),left=_calcDefaultValue[0],right=_calcDefaultValue[1];this.leftDate=left;this.rightDate=val&&val[1]&&left.getFullYear()!==right.getFullYear()&&this.unlinkPanels?right:Object(date_util_["nextYear"])(this.leftDate);}}},methods:{handleClear:function handleClear(){this.minDate=null;this.maxDate=null;this.leftDate=month_rangevue_type_script_lang_js_calcDefaultValue(this.defaultValue)[0];this.rightDate=Object(date_util_["nextYear"])(this.leftDate);this.$emit('pick',null);},handleChangeRange:function handleChangeRange(val){this.minDate=val.minDate;this.maxDate=val.maxDate;this.rangeState=val.rangeState;},handleRangePick:function handleRangePick(val){var _this=this;var close=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var defaultTime=this.defaultTime||[];var minDate=Object(date_util_["modifyWithTimeString"])(val.minDate,defaultTime[0]);var maxDate=Object(date_util_["modifyWithTimeString"])(val.maxDate,defaultTime[1]);if(this.maxDate===maxDate&&this.minDate===minDate){return;}this.onPick&&this.onPick(val);this.maxDate=maxDate;this.minDate=minDate;// workaround for https://github.com/ElemeFE/element/issues/7539, should remove this block when we don't have to care about Chromium 55 - 57
setTimeout(function(){_this.maxDate=maxDate;_this.minDate=minDate;},10);if(!close)return;this.handleConfirm();},handleShortcutClick:function handleShortcutClick(shortcut){if(shortcut.onClick){shortcut.onClick(this);}},// leftPrev*, rightNext* need to take care of `unlinkPanels`
leftPrevYear:function leftPrevYear(){this.leftDate=Object(date_util_["prevYear"])(this.leftDate);if(!this.unlinkPanels){this.rightDate=Object(date_util_["prevYear"])(this.rightDate);}},rightNextYear:function rightNextYear(){if(!this.unlinkPanels){this.leftDate=Object(date_util_["nextYear"])(this.leftDate);}this.rightDate=Object(date_util_["nextYear"])(this.rightDate);},// leftNext*, rightPrev* are called when `unlinkPanels` is true
leftNextYear:function leftNextYear(){this.leftDate=Object(date_util_["nextYear"])(this.leftDate);},rightPrevYear:function rightPrevYear(){this.rightDate=Object(date_util_["prevYear"])(this.rightDate);},handleConfirm:function handleConfirm(){var visible=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;if(this.isValidValue([this.minDate,this.maxDate])){this.$emit('pick',[this.minDate,this.maxDate],visible);}},isValidValue:function isValidValue(value){return Array.isArray(value)&&value&&value[0]&&value[1]&&Object(date_util_["isDate"])(value[0])&&Object(date_util_["isDate"])(value[1])&&value[0].getTime()<=value[1].getTime()&&(typeof this.disabledDate==='function'?!this.disabledDate(value[0])&&!this.disabledDate(value[1]):true);},resetView:function resetView(){// NOTE: this is a hack to reset {min, max}Date on picker open.
// TODO: correct way of doing so is to refactor {min, max}Date to be dependent on value and internal selection state
//       an alternative would be resetView whenever picker becomes visible, should also investigate date-panel's resetView
this.minDate=this.value&&Object(date_util_["isDate"])(this.value[0])?new Date(this.value[0]):null;this.maxDate=this.value&&Object(date_util_["isDate"])(this.value[0])?new Date(this.value[1]):null;}},components:{MonthTable:month_table,ElInput:input_default.a,ElButton:button_default.a}};// CONCATENATED MODULE: ./packages/date-picker/src/panel/month-range.vue?vue&type=script&lang=js&
/* harmony default export */var panel_month_rangevue_type_script_lang_js_=month_rangevue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/date-picker/src/panel/month-range.vue
/* normalize component */var month_range_component=normalizeComponent(panel_month_rangevue_type_script_lang_js_,month_rangevue_type_template_id_f2645fb8_render,month_rangevue_type_template_id_f2645fb8_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var month_range_api; }month_range_component.options.__file="packages/date-picker/src/panel/month-range.vue";/* harmony default export */var month_range=month_range_component.exports;// CONCATENATED MODULE: ./packages/date-picker/src/picker/date-picker.js
var date_picker_getPanel=function getPanel(type){if(type==='daterange'||type==='datetimerange'){return date_range;}else if(type==='monthrange'){return month_range;}return panel_date;};/* harmony default export */var date_picker={mixins:[picker],name:'ElDatePicker',props:{type:{type:String,default:'date'},timeArrowControl:Boolean},watch:{type:function type(_type){if(this.picker){this.unmountPicker();this.panel=date_picker_getPanel(_type);this.mountPicker();}else{this.panel=date_picker_getPanel(_type);}}},created:function created(){this.panel=date_picker_getPanel(this.type);}};// CONCATENATED MODULE: ./packages/date-picker/index.js
/* istanbul ignore next */date_picker.install=function install(Vue){Vue.component(date_picker.name,date_picker);};/* harmony default export */var packages_date_picker=date_picker;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/time-select.vue?vue&type=template&id=51ab9320&
var time_selectvue_type_template_id_51ab9320_render=function time_selectvue_type_template_id_51ab9320_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("transition",{attrs:{name:"el-zoom-in-top"},on:{"before-enter":_vm.handleMenuEnter,"after-leave":function afterLeave($event){_vm.$emit("dodestroy");}}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.visible,expression:"visible"}],ref:"popper",staticClass:"el-picker-panel time-select el-popper",class:_vm.popperClass,style:{width:_vm.width+"px"}},[_c("el-scrollbar",{attrs:{noresize:"","wrap-class":"el-picker-panel__content"}},_vm._l(_vm.items,function(item){return _c("div",{key:item.value,staticClass:"time-select-item",class:{selected:_vm.value===item.value,disabled:item.disabled,default:item.value===_vm.defaultValue},attrs:{disabled:item.disabled},on:{click:function click($event){_vm.handleClick(item);}}},[_vm._v(_vm._s(item.value))]);}),0)],1)]);};var time_selectvue_type_template_id_51ab9320_staticRenderFns=[];time_selectvue_type_template_id_51ab9320_render._withStripped=true;// CONCATENATED MODULE: ./packages/date-picker/src/panel/time-select.vue?vue&type=template&id=51ab9320&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/time-select.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var parseTime=function parseTime(time){var values=(time||'').split(':');if(values.length>=2){var hours=parseInt(values[0],10);var minutes=parseInt(values[1],10);return{hours:hours,minutes:minutes};}/* istanbul ignore next */return null;};var compareTime=function compareTime(time1,time2){var value1=parseTime(time1);var value2=parseTime(time2);var minutes1=value1.minutes+value1.hours*60;var minutes2=value2.minutes+value2.hours*60;if(minutes1===minutes2){return 0;}return minutes1>minutes2?1:-1;};var formatTime=function formatTime(time){return(time.hours<10?'0'+time.hours:time.hours)+':'+(time.minutes<10?'0'+time.minutes:time.minutes);};var nextTime=function nextTime(time,step){var timeValue=parseTime(time);var stepValue=parseTime(step);var next={hours:timeValue.hours,minutes:timeValue.minutes};next.minutes+=stepValue.minutes;next.hours+=stepValue.hours;next.hours+=Math.floor(next.minutes/60);next.minutes=next.minutes%60;return formatTime(next);};/* harmony default export */var time_selectvue_type_script_lang_js_={components:{ElScrollbar:scrollbar_default.a},watch:{value:function value(val){var _this=this;if(!val)return;this.$nextTick(function(){return _this.scrollToOption();});}},methods:{handleClick:function handleClick(item){if(!item.disabled){this.$emit('pick',item.value);}},handleClear:function handleClear(){this.$emit('pick',null);},scrollToOption:function scrollToOption(){var selector=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'.selected';var menu=this.$refs.popper.querySelector('.el-picker-panel__content');scroll_into_view_default()(menu,menu.querySelector(selector));},handleMenuEnter:function handleMenuEnter(){var _this2=this;var selected=this.items.map(function(item){return item.value;}).indexOf(this.value)!==-1;var hasDefault=this.items.map(function(item){return item.value;}).indexOf(this.defaultValue)!==-1;var option=selected&&'.selected'||hasDefault&&'.default'||'.time-select-item:not(.disabled)';this.$nextTick(function(){return _this2.scrollToOption(option);});},scrollDown:function scrollDown(step){var items=this.items;var length=items.length;var total=items.length;var index=items.map(function(item){return item.value;}).indexOf(this.value);while(total--){index=(index+step+length)%length;if(!items[index].disabled){this.$emit('pick',items[index].value,true);return;}}},isValidValue:function isValidValue(date){return this.items.filter(function(item){return!item.disabled;}).map(function(item){return item.value;}).indexOf(date)!==-1;},handleKeydown:function handleKeydown(event){var keyCode=event.keyCode;if(keyCode===38||keyCode===40){var mapping={40:1,38:-1};var offset=mapping[keyCode.toString()];this.scrollDown(offset);event.stopPropagation();return;}}},data:function data(){return{popperClass:'',start:'09:00',end:'18:00',step:'00:30',value:'',defaultValue:'',visible:false,minTime:'',maxTime:'',width:0};},computed:{items:function items(){var start=this.start;var end=this.end;var step=this.step;var result=[];if(start&&end&&step){var current=start;while(compareTime(current,end)<=0){result.push({value:current,disabled:compareTime(current,this.minTime||'-1:-1')<=0||compareTime(current,this.maxTime||'100:100')>=0});current=nextTime(current,step);}}return result;}}};// CONCATENATED MODULE: ./packages/date-picker/src/panel/time-select.vue?vue&type=script&lang=js&
/* harmony default export */var panel_time_selectvue_type_script_lang_js_=time_selectvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/date-picker/src/panel/time-select.vue
/* normalize component */var time_select_component=normalizeComponent(panel_time_selectvue_type_script_lang_js_,time_selectvue_type_template_id_51ab9320_render,time_selectvue_type_template_id_51ab9320_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var time_select_api; }time_select_component.options.__file="packages/date-picker/src/panel/time-select.vue";/* harmony default export */var time_select=time_select_component.exports;// CONCATENATED MODULE: ./packages/date-picker/src/picker/time-select.js
/* harmony default export */var picker_time_select={mixins:[picker],name:'ElTimeSelect',componentName:'ElTimeSelect',props:{type:{type:String,default:'time-select'}},beforeCreate:function beforeCreate(){this.panel=time_select;}};// CONCATENATED MODULE: ./packages/time-select/index.js
/* istanbul ignore next */picker_time_select.install=function(Vue){Vue.component(picker_time_select.name,picker_time_select);};/* harmony default export */var packages_time_select=picker_time_select;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/time-range.vue?vue&type=template&id=fb28660e&
var time_rangevue_type_template_id_fb28660e_render=function time_rangevue_type_template_id_fb28660e_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("transition",{attrs:{name:"el-zoom-in-top"},on:{"after-leave":function afterLeave($event){_vm.$emit("dodestroy");}}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.visible,expression:"visible"}],staticClass:"el-time-range-picker el-picker-panel el-popper",class:_vm.popperClass},[_c("div",{staticClass:"el-time-range-picker__content"},[_c("div",{staticClass:"el-time-range-picker__cell"},[_c("div",{staticClass:"el-time-range-picker__header"},[_vm._v(_vm._s(_vm.t("el.datepicker.startTime")))]),_c("div",{staticClass:"el-time-range-picker__body el-time-panel__content",class:{"has-seconds":_vm.showSeconds,"is-arrow":_vm.arrowControl}},[_c("time-spinner",{ref:"minSpinner",attrs:{"show-seconds":_vm.showSeconds,"am-pm-mode":_vm.amPmMode,"arrow-control":_vm.arrowControl,date:_vm.minDate},on:{change:_vm.handleMinChange,"select-range":_vm.setMinSelectionRange}})],1)]),_c("div",{staticClass:"el-time-range-picker__cell"},[_c("div",{staticClass:"el-time-range-picker__header"},[_vm._v(_vm._s(_vm.t("el.datepicker.endTime")))]),_c("div",{staticClass:"el-time-range-picker__body el-time-panel__content",class:{"has-seconds":_vm.showSeconds,"is-arrow":_vm.arrowControl}},[_c("time-spinner",{ref:"maxSpinner",attrs:{"show-seconds":_vm.showSeconds,"am-pm-mode":_vm.amPmMode,"arrow-control":_vm.arrowControl,date:_vm.maxDate},on:{change:_vm.handleMaxChange,"select-range":_vm.setMaxSelectionRange}})],1)])]),_c("div",{staticClass:"el-time-panel__footer"},[_c("button",{staticClass:"el-time-panel__btn cancel",attrs:{type:"button"},on:{click:function click($event){_vm.handleCancel();}}},[_vm._v(_vm._s(_vm.t("el.datepicker.cancel")))]),_c("button",{staticClass:"el-time-panel__btn confirm",attrs:{type:"button",disabled:_vm.btnDisabled},on:{click:function click($event){_vm.handleConfirm();}}},[_vm._v(_vm._s(_vm.t("el.datepicker.confirm")))])])])]);};var time_rangevue_type_template_id_fb28660e_staticRenderFns=[];time_rangevue_type_template_id_fb28660e_render._withStripped=true;// CONCATENATED MODULE: ./packages/date-picker/src/panel/time-range.vue?vue&type=template&id=fb28660e&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/panel/time-range.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var MIN_TIME=Object(date_util_["parseDate"])('00:00:00','HH:mm:ss');var MAX_TIME=Object(date_util_["parseDate"])('23:59:59','HH:mm:ss');var time_rangevue_type_script_lang_js_minTimeOfDay=function minTimeOfDay(date){return Object(date_util_["modifyDate"])(MIN_TIME,date.getFullYear(),date.getMonth(),date.getDate());};var time_rangevue_type_script_lang_js_maxTimeOfDay=function maxTimeOfDay(date){return Object(date_util_["modifyDate"])(MAX_TIME,date.getFullYear(),date.getMonth(),date.getDate());};// increase time by amount of milliseconds, but within the range of day
var advanceTime=function advanceTime(date,amount){return new Date(Math.min(date.getTime()+amount,time_rangevue_type_script_lang_js_maxTimeOfDay(date).getTime()));};/* harmony default export */var time_rangevue_type_script_lang_js_={mixins:[locale_default.a],components:{TimeSpinner:time_spinner},computed:{showSeconds:function showSeconds(){return(this.format||'').indexOf('ss')!==-1;},offset:function offset(){return this.showSeconds?11:8;},spinner:function spinner(){return this.selectionRange[0]<this.offset?this.$refs.minSpinner:this.$refs.maxSpinner;},btnDisabled:function btnDisabled(){return this.minDate.getTime()>this.maxDate.getTime();},amPmMode:function amPmMode(){if((this.format||'').indexOf('A')!==-1)return'A';if((this.format||'').indexOf('a')!==-1)return'a';return'';}},data:function data(){return{popperClass:'',minDate:new Date(),maxDate:new Date(),value:[],oldValue:[new Date(),new Date()],defaultValue:null,format:'HH:mm:ss',visible:false,selectionRange:[0,2],arrowControl:false};},watch:{value:function value(_value){if(Array.isArray(_value)){this.minDate=new Date(_value[0]);this.maxDate=new Date(_value[1]);}else{if(Array.isArray(this.defaultValue)){this.minDate=new Date(this.defaultValue[0]);this.maxDate=new Date(this.defaultValue[1]);}else if(this.defaultValue){this.minDate=new Date(this.defaultValue);this.maxDate=advanceTime(new Date(this.defaultValue),60*60*1000);}else{this.minDate=new Date();this.maxDate=advanceTime(new Date(),60*60*1000);}}},visible:function visible(val){var _this=this;if(val){this.oldValue=this.value;this.$nextTick(function(){return _this.$refs.minSpinner.emitSelectRange('hours');});}}},methods:{handleClear:function handleClear(){this.$emit('pick',null);},handleCancel:function handleCancel(){this.$emit('pick',this.oldValue);},handleMinChange:function handleMinChange(date){this.minDate=Object(date_util_["clearMilliseconds"])(date);this.handleChange();},handleMaxChange:function handleMaxChange(date){this.maxDate=Object(date_util_["clearMilliseconds"])(date);this.handleChange();},handleChange:function handleChange(){if(this.isValidValue([this.minDate,this.maxDate])){this.$refs.minSpinner.selectableRange=[[time_rangevue_type_script_lang_js_minTimeOfDay(this.minDate),this.maxDate]];this.$refs.maxSpinner.selectableRange=[[this.minDate,time_rangevue_type_script_lang_js_maxTimeOfDay(this.maxDate)]];this.$emit('pick',[this.minDate,this.maxDate],true);}},setMinSelectionRange:function setMinSelectionRange(start,end){this.$emit('select-range',start,end,'min');this.selectionRange=[start,end];},setMaxSelectionRange:function setMaxSelectionRange(start,end){this.$emit('select-range',start,end,'max');this.selectionRange=[start+this.offset,end+this.offset];},handleConfirm:function handleConfirm(){var visible=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;var minSelectableRange=this.$refs.minSpinner.selectableRange;var maxSelectableRange=this.$refs.maxSpinner.selectableRange;this.minDate=Object(date_util_["limitTimeRange"])(this.minDate,minSelectableRange,this.format);this.maxDate=Object(date_util_["limitTimeRange"])(this.maxDate,maxSelectableRange,this.format);this.$emit('pick',[this.minDate,this.maxDate],visible);},adjustSpinners:function adjustSpinners(){this.$refs.minSpinner.adjustSpinners();this.$refs.maxSpinner.adjustSpinners();},changeSelectionRange:function changeSelectionRange(step){var list=this.showSeconds?[0,3,6,11,14,17]:[0,3,8,11];var mapping=['hours','minutes'].concat(this.showSeconds?['seconds']:[]);var index=list.indexOf(this.selectionRange[0]);var next=(index+step+list.length)%list.length;var half=list.length/2;if(next<half){this.$refs.minSpinner.emitSelectRange(mapping[next]);}else{this.$refs.maxSpinner.emitSelectRange(mapping[next-half]);}},isValidValue:function isValidValue(date){return Array.isArray(date)&&Object(date_util_["timeWithinRange"])(this.minDate,this.$refs.minSpinner.selectableRange)&&Object(date_util_["timeWithinRange"])(this.maxDate,this.$refs.maxSpinner.selectableRange);},handleKeydown:function handleKeydown(event){var keyCode=event.keyCode;var mapping={38:-1,40:1,37:-1,39:1};// Left or Right
if(keyCode===37||keyCode===39){var step=mapping[keyCode];this.changeSelectionRange(step);event.preventDefault();return;}// Up or Down
if(keyCode===38||keyCode===40){var _step=mapping[keyCode];this.spinner.scrollDown(_step);event.preventDefault();return;}}}};// CONCATENATED MODULE: ./packages/date-picker/src/panel/time-range.vue?vue&type=script&lang=js&
/* harmony default export */var panel_time_rangevue_type_script_lang_js_=time_rangevue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/date-picker/src/panel/time-range.vue
/* normalize component */var time_range_component=normalizeComponent(panel_time_rangevue_type_script_lang_js_,time_rangevue_type_template_id_fb28660e_render,time_rangevue_type_template_id_fb28660e_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var time_range_api; }time_range_component.options.__file="packages/date-picker/src/panel/time-range.vue";/* harmony default export */var time_range=time_range_component.exports;// CONCATENATED MODULE: ./packages/date-picker/src/picker/time-picker.js
/* harmony default export */var time_picker={mixins:[picker],name:'ElTimePicker',props:{isRange:Boolean,arrowControl:Boolean},data:function data(){return{type:''};},watch:{isRange:function isRange(_isRange){if(this.picker){this.unmountPicker();this.type=_isRange?'timerange':'time';this.panel=_isRange?time_range:panel_time;this.mountPicker();}else{this.type=_isRange?'timerange':'time';this.panel=_isRange?time_range:panel_time;}}},created:function created(){this.type=this.isRange?'timerange':'time';this.panel=this.isRange?time_range:panel_time;}};// CONCATENATED MODULE: ./packages/time-picker/index.js
/* istanbul ignore next */time_picker.install=function(Vue){Vue.component(time_picker.name,time_picker);};/* harmony default export */var packages_time_picker=time_picker;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/popover/src/main.vue?vue&type=template&id=52060272&
var mainvue_type_template_id_52060272_render=function mainvue_type_template_id_52060272_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("span",[_c("transition",{attrs:{name:_vm.transition},on:{"after-enter":_vm.handleAfterEnter,"after-leave":_vm.handleAfterLeave}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:!_vm.disabled&&_vm.showPopper,expression:"!disabled && showPopper"}],ref:"popper",staticClass:"el-popover el-popper",class:[_vm.popperClass,_vm.content&&"el-popover--plain"],style:{width:_vm.width+"px"},attrs:{role:"tooltip",id:_vm.tooltipId,"aria-hidden":_vm.disabled||!_vm.showPopper?"true":"false"}},[_vm.title?_c("div",{staticClass:"el-popover__title",domProps:{textContent:_vm._s(_vm.title)}}):_vm._e(),_vm._t("default",[_vm._v(_vm._s(_vm.content))])],2)]),_vm._t("reference")],2);};var mainvue_type_template_id_52060272_staticRenderFns=[];mainvue_type_template_id_52060272_render._withStripped=true;// CONCATENATED MODULE: ./packages/popover/src/main.vue?vue&type=template&id=52060272&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/popover/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var mainvue_type_script_lang_js_={name:'ElPopover',mixins:[vue_popper_default.a],props:{trigger:{type:String,default:'click',validator:function validator(value){return['click','focus','hover','manual'].indexOf(value)>-1;}},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:200},title:String,disabled:Boolean,content:String,reference:{},popperClass:String,width:{},visibleArrow:{default:true},arrowOffset:{type:Number,default:0},transition:{type:String,default:'fade-in-linear'},tabindex:{type:Number,default:0}},computed:{tooltipId:function tooltipId(){return'el-popover-'+Object(util_["generateId"])();}},watch:{showPopper:function showPopper(val){if(this.disabled){return;}val?this.$emit('show'):this.$emit('hide');}},mounted:function mounted(){var _this=this;var reference=this.referenceElm=this.reference||this.$refs.reference;var popper=this.popper||this.$refs.popper;if(!reference&&this.$slots.reference&&this.$slots.reference[0]){reference=this.referenceElm=this.$slots.reference[0].elm;}// 可访问性
if(reference){Object(dom_["addClass"])(reference,'el-popover__reference');reference.setAttribute('aria-describedby',this.tooltipId);reference.setAttribute('tabindex',this.tabindex);// tab序列
popper.setAttribute('tabindex',0);if(this.trigger!=='click'){Object(dom_["on"])(reference,'focusin',function(){_this.handleFocus();var instance=reference.__vue__;if(instance&&typeof instance.focus==='function'){instance.focus();}});Object(dom_["on"])(popper,'focusin',this.handleFocus);Object(dom_["on"])(reference,'focusout',this.handleBlur);Object(dom_["on"])(popper,'focusout',this.handleBlur);}Object(dom_["on"])(reference,'keydown',this.handleKeydown);Object(dom_["on"])(reference,'click',this.handleClick);}if(this.trigger==='click'){Object(dom_["on"])(reference,'click',this.doToggle);Object(dom_["on"])(document,'click',this.handleDocumentClick);}else if(this.trigger==='hover'){Object(dom_["on"])(reference,'mouseenter',this.handleMouseEnter);Object(dom_["on"])(popper,'mouseenter',this.handleMouseEnter);Object(dom_["on"])(reference,'mouseleave',this.handleMouseLeave);Object(dom_["on"])(popper,'mouseleave',this.handleMouseLeave);}else if(this.trigger==='focus'){if(this.tabindex<0){console.warn('[Element Warn][Popover]a negative taindex means that the element cannot be focused by tab key');}if(reference.querySelector('input, textarea')){Object(dom_["on"])(reference,'focusin',this.doShow);Object(dom_["on"])(reference,'focusout',this.doClose);}else{Object(dom_["on"])(reference,'mousedown',this.doShow);Object(dom_["on"])(reference,'mouseup',this.doClose);}}},beforeDestroy:function beforeDestroy(){this.cleanup();},deactivated:function deactivated(){this.cleanup();},methods:{doToggle:function doToggle(){this.showPopper=!this.showPopper;},doShow:function doShow(){this.showPopper=true;},doClose:function doClose(){this.showPopper=false;},handleFocus:function handleFocus(){Object(dom_["addClass"])(this.referenceElm,'focusing');if(this.trigger==='click'||this.trigger==='focus')this.showPopper=true;},handleClick:function handleClick(){Object(dom_["removeClass"])(this.referenceElm,'focusing');},handleBlur:function handleBlur(){Object(dom_["removeClass"])(this.referenceElm,'focusing');if(this.trigger==='click'||this.trigger==='focus')this.showPopper=false;},handleMouseEnter:function handleMouseEnter(){var _this2=this;clearTimeout(this._timer);if(this.openDelay){this._timer=setTimeout(function(){_this2.showPopper=true;},this.openDelay);}else{this.showPopper=true;}},handleKeydown:function handleKeydown(ev){if(ev.keyCode===27&&this.trigger!=='manual'){// esc
this.doClose();}},handleMouseLeave:function handleMouseLeave(){var _this3=this;clearTimeout(this._timer);if(this.closeDelay){this._timer=setTimeout(function(){_this3.showPopper=false;},this.closeDelay);}else{this.showPopper=false;}},handleDocumentClick:function handleDocumentClick(e){var reference=this.reference||this.$refs.reference;var popper=this.popper||this.$refs.popper;if(!reference&&this.$slots.reference&&this.$slots.reference[0]){reference=this.referenceElm=this.$slots.reference[0].elm;}if(!this.$el||!reference||this.$el.contains(e.target)||reference.contains(e.target)||!popper||popper.contains(e.target))return;this.showPopper=false;},handleAfterEnter:function handleAfterEnter(){this.$emit('after-enter');},handleAfterLeave:function handleAfterLeave(){this.$emit('after-leave');this.doDestroy();},cleanup:function cleanup(){if(this.openDelay||this.closeDelay){clearTimeout(this._timer);}}},destroyed:function destroyed(){var reference=this.reference;Object(dom_["off"])(reference,'click',this.doToggle);Object(dom_["off"])(reference,'mouseup',this.doClose);Object(dom_["off"])(reference,'mousedown',this.doShow);Object(dom_["off"])(reference,'focusin',this.doShow);Object(dom_["off"])(reference,'focusout',this.doClose);Object(dom_["off"])(reference,'mousedown',this.doShow);Object(dom_["off"])(reference,'mouseup',this.doClose);Object(dom_["off"])(reference,'mouseleave',this.handleMouseLeave);Object(dom_["off"])(reference,'mouseenter',this.handleMouseEnter);Object(dom_["off"])(document,'click',this.handleDocumentClick);}};// CONCATENATED MODULE: ./packages/popover/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var src_mainvue_type_script_lang_js_=mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/popover/src/main.vue
/* normalize component */var main_component=normalizeComponent(src_mainvue_type_script_lang_js_,mainvue_type_template_id_52060272_render,mainvue_type_template_id_52060272_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var main_api; }main_component.options.__file="packages/popover/src/main.vue";/* harmony default export */var main=main_component.exports;// CONCATENATED MODULE: ./packages/popover/src/directive.js
var getReference=function getReference(el,binding,vnode){var _ref=binding.expression?binding.value:binding.arg;var popper=vnode.context.$refs[_ref];if(popper){if(Array.isArray(popper)){popper[0].$refs.reference=el;}else{popper.$refs.reference=el;}}};/* harmony default export */var directive={bind:function bind(el,binding,vnode){getReference(el,binding,vnode);},inserted:function inserted(el,binding,vnode){getReference(el,binding,vnode);}};// CONCATENATED MODULE: ./packages/popover/index.js
external_vue_default.a.directive('popover',directive);/* istanbul ignore next */main.install=function(Vue){Vue.directive('popover',directive);Vue.component(main.name,main);};main.directive=directive;/* harmony default export */var popover=main;// CONCATENATED MODULE: ./packages/tooltip/src/main.js
/* harmony default export */var src_main={name:'ElTooltip',mixins:[vue_popper_default.a],props:{openDelay:{type:Number,default:0},disabled:Boolean,manual:Boolean,effect:{type:String,default:'dark'},arrowOffset:{type:Number,default:0},popperClass:String,content:String,visibleArrow:{default:true},transition:{type:String,default:'el-fade-in-linear'},popperOptions:{default:function _default(){return{boundariesPadding:10,gpuAcceleration:false};}},enterable:{type:Boolean,default:true},hideAfter:{type:Number,default:0},tabindex:{type:Number,default:0}},data:function data(){return{tooltipId:'el-tooltip-'+Object(util_["generateId"])(),timeoutPending:null,focusing:false};},beforeCreate:function beforeCreate(){var _this=this;if(this.$isServer)return;this.popperVM=new external_vue_default.a({data:{node:''},render:function render(h){return this.node;}}).$mount();this.debounceClose=debounce_default()(200,function(){return _this.handleClosePopper();});},render:function render(h){var _this2=this;if(this.popperVM){this.popperVM.node=h('transition',{attrs:{name:this.transition},on:{'afterLeave':this.doDestroy}},[h('div',{on:{'mouseleave':function mouseleave(){_this2.setExpectedState(false);_this2.debounceClose();},'mouseenter':function mouseenter(){_this2.setExpectedState(true);}},ref:'popper',attrs:{role:'tooltip',id:this.tooltipId,'aria-hidden':this.disabled||!this.showPopper?'true':'false'},directives:[{name:'show',value:!this.disabled&&this.showPopper}],'class':['el-tooltip__popper','is-'+this.effect,this.popperClass]},[this.$slots.content||this.content])]);}var firstElement=this.getFirstElement();if(!firstElement)return null;var data=firstElement.data=firstElement.data||{};data.staticClass=this.addTooltipClass(data.staticClass);return firstElement;},mounted:function mounted(){var _this3=this;this.referenceElm=this.$el;if(this.$el.nodeType===1){this.$el.setAttribute('aria-describedby',this.tooltipId);this.$el.setAttribute('tabindex',this.tabindex);Object(dom_["on"])(this.referenceElm,'mouseenter',this.show);Object(dom_["on"])(this.referenceElm,'mouseleave',this.hide);Object(dom_["on"])(this.referenceElm,'focus',function(){if(!_this3.$slots.default||!_this3.$slots.default.length){_this3.handleFocus();return;}var instance=_this3.$slots.default[0].componentInstance;if(instance&&instance.focus){instance.focus();}else{_this3.handleFocus();}});Object(dom_["on"])(this.referenceElm,'blur',this.handleBlur);Object(dom_["on"])(this.referenceElm,'click',this.removeFocusing);}// fix issue https://github.com/ElemeFE/element/issues/14424
if(this.value&&this.popperVM){this.popperVM.$nextTick(function(){if(_this3.value){_this3.updatePopper();}});}},watch:{focusing:function focusing(val){if(val){Object(dom_["addClass"])(this.referenceElm,'focusing');}else{Object(dom_["removeClass"])(this.referenceElm,'focusing');}}},methods:{show:function show(){this.setExpectedState(true);this.handleShowPopper();},hide:function hide(){this.setExpectedState(false);this.debounceClose();},handleFocus:function handleFocus(){this.focusing=true;this.show();},handleBlur:function handleBlur(){this.focusing=false;this.hide();},removeFocusing:function removeFocusing(){this.focusing=false;},addTooltipClass:function addTooltipClass(prev){if(!prev){return'el-tooltip';}else{return'el-tooltip '+prev.replace('el-tooltip','');}},handleShowPopper:function handleShowPopper(){var _this4=this;if(!this.expectedState||this.manual)return;clearTimeout(this.timeout);this.timeout=setTimeout(function(){_this4.showPopper=true;},this.openDelay);if(this.hideAfter>0){this.timeoutPending=setTimeout(function(){_this4.showPopper=false;},this.hideAfter);}},handleClosePopper:function handleClosePopper(){if(this.enterable&&this.expectedState||this.manual)return;clearTimeout(this.timeout);if(this.timeoutPending){clearTimeout(this.timeoutPending);}this.showPopper=false;if(this.disabled){this.doDestroy();}},setExpectedState:function setExpectedState(expectedState){if(expectedState===false){clearTimeout(this.timeoutPending);}this.expectedState=expectedState;},getFirstElement:function getFirstElement(){var slots=this.$slots.default;if(!Array.isArray(slots))return null;var element=null;for(var index=0;index<slots.length;index++){if(slots[index]&&slots[index].tag){element=slots[index];};}return element;}},beforeDestroy:function beforeDestroy(){this.popperVM&&this.popperVM.$destroy();},destroyed:function destroyed(){var reference=this.referenceElm;if(reference.nodeType===1){Object(dom_["off"])(reference,'mouseenter',this.show);Object(dom_["off"])(reference,'mouseleave',this.hide);Object(dom_["off"])(reference,'focus',this.handleFocus);Object(dom_["off"])(reference,'blur',this.handleBlur);Object(dom_["off"])(reference,'click',this.removeFocusing);}}};// CONCATENATED MODULE: ./packages/tooltip/index.js
/* istanbul ignore next */src_main.install=function(Vue){Vue.component(src_main.name,src_main);};/* harmony default export */var packages_tooltip=src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/message-box/src/main.vue?vue&type=template&id=6b29b012&
var mainvue_type_template_id_6b29b012_render=function mainvue_type_template_id_6b29b012_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("transition",{attrs:{name:"msgbox-fade"}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.visible,expression:"visible"}],staticClass:"el-message-box__wrapper",attrs:{tabindex:"-1",role:"dialog","aria-modal":"true","aria-label":_vm.title||"dialog"},on:{click:function click($event){if($event.target!==$event.currentTarget){return null;}return _vm.handleWrapperClick($event);}}},[_c("div",{staticClass:"el-message-box",class:[_vm.customClass,_vm.center&&"el-message-box--center"]},[_vm.title!==null?_c("div",{staticClass:"el-message-box__header"},[_c("div",{staticClass:"el-message-box__title"},[_vm.icon&&_vm.center?_c("div",{class:["el-message-box__status",_vm.icon]}):_vm._e(),_c("span",[_vm._v(_vm._s(_vm.title))])]),_vm.showClose?_c("button",{staticClass:"el-message-box__headerbtn",attrs:{type:"button","aria-label":"Close"},on:{click:function click($event){_vm.handleAction(_vm.distinguishCancelAndClose?"close":"cancel");},keydown:function keydown($event){if(!("button"in $event)&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){return null;}_vm.handleAction(_vm.distinguishCancelAndClose?"close":"cancel");}}},[_c("i",{staticClass:"el-message-box__close el-icon-close"})]):_vm._e()]):_vm._e(),_c("div",{staticClass:"el-message-box__content"},[_c("div",{staticClass:"el-message-box__container"},[_vm.icon&&!_vm.center&&_vm.message!==""?_c("div",{class:["el-message-box__status",_vm.icon]}):_vm._e(),_vm.message!==""?_c("div",{staticClass:"el-message-box__message"},[_vm._t("default",[!_vm.dangerouslyUseHTMLString?_c("p",[_vm._v(_vm._s(_vm.message))]):_c("p",{domProps:{innerHTML:_vm._s(_vm.message)}})])],2):_vm._e()]),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.showInput,expression:"showInput"}],staticClass:"el-message-box__input"},[_c("el-input",{ref:"input",attrs:{type:_vm.inputType,placeholder:_vm.inputPlaceholder},nativeOn:{keydown:function keydown($event){if(!("button"in $event)&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){return null;}return _vm.handleInputEnter($event);}},model:{value:_vm.inputValue,callback:function callback($$v){_vm.inputValue=$$v;},expression:"inputValue"}}),_c("div",{staticClass:"el-message-box__errormsg",style:{visibility:!!_vm.editorErrorMessage?"visible":"hidden"}},[_vm._v(_vm._s(_vm.editorErrorMessage))])],1)]),_c("div",{staticClass:"el-message-box__btns"},[_vm.showCancelButton?_c("el-button",{class:[_vm.cancelButtonClasses],attrs:{loading:_vm.cancelButtonLoading,round:_vm.roundButton,size:"small"},on:{keydown:function keydown($event){if(!("button"in $event)&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){return null;}_vm.handleAction("cancel");}},nativeOn:{click:function click($event){_vm.handleAction("cancel");}}},[_vm._v("\n          "+_vm._s(_vm.cancelButtonText||_vm.t("el.messagebox.cancel"))+"\n        ")]):_vm._e(),_c("el-button",{directives:[{name:"show",rawName:"v-show",value:_vm.showConfirmButton,expression:"showConfirmButton"}],ref:"confirm",class:[_vm.confirmButtonClasses],attrs:{loading:_vm.confirmButtonLoading,round:_vm.roundButton,size:"small"},on:{keydown:function keydown($event){if(!("button"in $event)&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){return null;}_vm.handleAction("confirm");}},nativeOn:{click:function click($event){_vm.handleAction("confirm");}}},[_vm._v("\n          "+_vm._s(_vm.confirmButtonText||_vm.t("el.messagebox.confirm"))+"\n        ")])],1)])])]);};var mainvue_type_template_id_6b29b012_staticRenderFns=[];mainvue_type_template_id_6b29b012_render._withStripped=true;// CONCATENATED MODULE: ./packages/message-box/src/main.vue?vue&type=template&id=6b29b012&
// EXTERNAL MODULE: external "element-ui/lib/utils/aria-dialog"
var aria_dialog_=__webpack_require__(39);var aria_dialog_default=/*#__PURE__*/__webpack_require__.n(aria_dialog_);// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/message-box/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var messageBox=void 0;var typeMap={success:'success',info:'info',warning:'warning',error:'error'};/* harmony default export */var message_box_src_mainvue_type_script_lang_js_={mixins:[popup_default.a,locale_default.a],props:{modal:{default:true},lockScroll:{default:true},showClose:{type:Boolean,default:true},closeOnClickModal:{default:true},closeOnPressEscape:{default:true},closeOnHashChange:{default:true},center:{default:false,type:Boolean},roundButton:{default:false,type:Boolean}},components:{ElInput:input_default.a,ElButton:button_default.a},computed:{icon:function icon(){var type=this.type,iconClass=this.iconClass;return iconClass||(type&&typeMap[type]?'el-icon-'+typeMap[type]:'');},confirmButtonClasses:function confirmButtonClasses(){return'el-button--primary '+this.confirmButtonClass;},cancelButtonClasses:function cancelButtonClasses(){return''+this.cancelButtonClass;}},methods:{getSafeClose:function getSafeClose(){var _this=this;var currentId=this.uid;return function(){_this.$nextTick(function(){if(currentId===_this.uid)_this.doClose();});};},doClose:function doClose(){var _this2=this;if(!this.visible)return;this.visible=false;this._closing=true;this.onClose&&this.onClose();messageBox.closeDialog();// 解绑
if(this.lockScroll){setTimeout(this.restoreBodyStyle,200);}this.opened=false;this.doAfterClose();setTimeout(function(){if(_this2.action)_this2.callback(_this2.action,_this2);});},handleWrapperClick:function handleWrapperClick(){if(this.closeOnClickModal){this.handleAction(this.distinguishCancelAndClose?'close':'cancel');}},handleInputEnter:function handleInputEnter(){if(this.inputType!=='textarea'){return this.handleAction('confirm');}},handleAction:function handleAction(action){if(this.$type==='prompt'&&action==='confirm'&&!this.validate()){return;}this.action=action;if(typeof this.beforeClose==='function'){this.close=this.getSafeClose();this.beforeClose(action,this,this.close);}else{this.doClose();}},validate:function validate(){if(this.$type==='prompt'){var inputPattern=this.inputPattern;if(inputPattern&&!inputPattern.test(this.inputValue||'')){this.editorErrorMessage=this.inputErrorMessage||Object(lib_locale_["t"])('el.messagebox.error');Object(dom_["addClass"])(this.getInputElement(),'invalid');return false;}var inputValidator=this.inputValidator;if(typeof inputValidator==='function'){var validateResult=inputValidator(this.inputValue);if(validateResult===false){this.editorErrorMessage=this.inputErrorMessage||Object(lib_locale_["t"])('el.messagebox.error');Object(dom_["addClass"])(this.getInputElement(),'invalid');return false;}if(typeof validateResult==='string'){this.editorErrorMessage=validateResult;Object(dom_["addClass"])(this.getInputElement(),'invalid');return false;}}}this.editorErrorMessage='';Object(dom_["removeClass"])(this.getInputElement(),'invalid');return true;},getFirstFocus:function getFirstFocus(){var btn=this.$el.querySelector('.el-message-box__btns .el-button');var title=this.$el.querySelector('.el-message-box__btns .el-message-box__title');return btn||title;},getInputElement:function getInputElement(){var inputRefs=this.$refs.input.$refs;return inputRefs.input||inputRefs.textarea;},handleClose:function handleClose(){this.handleAction('close');}},watch:{inputValue:{immediate:true,handler:function handler(val){var _this3=this;this.$nextTick(function(_){if(_this3.$type==='prompt'&&val!==null){_this3.validate();}});}},visible:function visible(val){var _this4=this;if(val){this.uid++;if(this.$type==='alert'||this.$type==='confirm'){this.$nextTick(function(){_this4.$refs.confirm.$el.focus();});}this.focusAfterClosed=document.activeElement;messageBox=new aria_dialog_default.a(this.$el,this.focusAfterClosed,this.getFirstFocus());}// prompt
if(this.$type!=='prompt')return;if(val){setTimeout(function(){if(_this4.$refs.input&&_this4.$refs.input.$el){_this4.getInputElement().focus();}},500);}else{this.editorErrorMessage='';Object(dom_["removeClass"])(this.getInputElement(),'invalid');}}},mounted:function mounted(){var _this5=this;this.$nextTick(function(){if(_this5.closeOnHashChange){window.addEventListener('hashchange',_this5.close);}});},beforeDestroy:function beforeDestroy(){if(this.closeOnHashChange){window.removeEventListener('hashchange',this.close);}setTimeout(function(){messageBox.closeDialog();});},data:function data(){return{uid:1,title:undefined,message:'',type:'',iconClass:'',customClass:'',showInput:false,inputValue:null,inputPlaceholder:'',inputType:'text',inputPattern:null,inputValidator:null,inputErrorMessage:'',showConfirmButton:true,showCancelButton:false,action:'',confirmButtonText:'',cancelButtonText:'',confirmButtonLoading:false,cancelButtonLoading:false,confirmButtonClass:'',confirmButtonDisabled:false,cancelButtonClass:'',editorErrorMessage:null,callback:null,dangerouslyUseHTMLString:false,focusAfterClosed:null,isOnComposition:false,distinguishCancelAndClose:false};}};// CONCATENATED MODULE: ./packages/message-box/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_message_box_src_mainvue_type_script_lang_js_=message_box_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/message-box/src/main.vue
/* normalize component */var src_main_component=normalizeComponent(packages_message_box_src_mainvue_type_script_lang_js_,mainvue_type_template_id_6b29b012_render,mainvue_type_template_id_6b29b012_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var src_main_api; }src_main_component.options.__file="packages/message-box/src/main.vue";/* harmony default export */var message_box_src_main=src_main_component.exports;// EXTERNAL MODULE: external "element-ui/lib/utils/vdom"
var vdom_=__webpack_require__(23);// CONCATENATED MODULE: ./packages/message-box/src/main.js
var main_typeof=typeof Symbol==="function"&&_typeof2(Symbol.iterator)==="symbol"?function(obj){return _typeof2(obj);}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":_typeof2(obj);};var main_defaults={title:null,message:'',type:'',iconClass:'',showInput:false,showClose:true,modalFade:true,lockScroll:true,closeOnClickModal:true,closeOnPressEscape:true,closeOnHashChange:true,inputValue:null,inputPlaceholder:'',inputType:'text',inputPattern:null,inputValidator:null,inputErrorMessage:'',showConfirmButton:true,showCancelButton:false,confirmButtonPosition:'right',confirmButtonHighlight:false,cancelButtonHighlight:false,confirmButtonText:'',cancelButtonText:'',confirmButtonClass:'',cancelButtonClass:'',customClass:'',beforeClose:null,dangerouslyUseHTMLString:false,center:false,roundButton:false,distinguishCancelAndClose:false};var MessageBoxConstructor=external_vue_default.a.extend(message_box_src_main);var currentMsg=void 0,main_instance=void 0;var msgQueue=[];var defaultCallback=function defaultCallback(action){if(currentMsg){var callback=currentMsg.callback;if(typeof callback==='function'){if(main_instance.showInput){callback(main_instance.inputValue,action);}else{callback(action);}}if(currentMsg.resolve){if(action==='confirm'){if(main_instance.showInput){currentMsg.resolve({value:main_instance.inputValue,action:action});}else{currentMsg.resolve(action);}}else if(currentMsg.reject&&(action==='cancel'||action==='close')){currentMsg.reject(action);}}}};var initInstance=function initInstance(){main_instance=new MessageBoxConstructor({el:document.createElement('div')});main_instance.callback=defaultCallback;};var main_showNextMsg=function showNextMsg(){if(!main_instance){initInstance();}main_instance.action='';if(!main_instance.visible||main_instance.closeTimer){if(msgQueue.length>0){currentMsg=msgQueue.shift();var options=currentMsg.options;for(var prop in options){if(options.hasOwnProperty(prop)){main_instance[prop]=options[prop];}}if(options.callback===undefined){main_instance.callback=defaultCallback;}var oldCb=main_instance.callback;main_instance.callback=function(action,instance){oldCb(action,instance);showNextMsg();};if(Object(vdom_["isVNode"])(main_instance.message)){main_instance.$slots.default=[main_instance.message];main_instance.message=null;}else{delete main_instance.$slots.default;}['modal','showClose','closeOnClickModal','closeOnPressEscape','closeOnHashChange'].forEach(function(prop){if(main_instance[prop]===undefined){main_instance[prop]=true;}});document.body.appendChild(main_instance.$el);external_vue_default.a.nextTick(function(){main_instance.visible=true;});}}};var main_MessageBox=function MessageBox(options,callback){if(external_vue_default.a.prototype.$isServer)return;if(typeof options==='string'||Object(vdom_["isVNode"])(options)){options={message:options};if(typeof arguments[1]==='string'){options.title=arguments[1];}}else if(options.callback&&!callback){callback=options.callback;}if(typeof Promise!=='undefined'){return new Promise(function(resolve,reject){// eslint-disable-line
msgQueue.push({options:merge_default()({},main_defaults,MessageBox.defaults,options),callback:callback,resolve:resolve,reject:reject});main_showNextMsg();});}else{msgQueue.push({options:merge_default()({},main_defaults,MessageBox.defaults,options),callback:callback});main_showNextMsg();}};main_MessageBox.setDefaults=function(defaults){main_MessageBox.defaults=defaults;};main_MessageBox.alert=function(message,title,options){if((typeof title==='undefined'?'undefined':main_typeof(title))==='object'){options=title;title='';}else if(title===undefined){title='';}return main_MessageBox(merge_default()({title:title,message:message,$type:'alert',closeOnPressEscape:false,closeOnClickModal:false},options));};main_MessageBox.confirm=function(message,title,options){if((typeof title==='undefined'?'undefined':main_typeof(title))==='object'){options=title;title='';}else if(title===undefined){title='';}return main_MessageBox(merge_default()({title:title,message:message,$type:'confirm',showCancelButton:true},options));};main_MessageBox.prompt=function(message,title,options){if((typeof title==='undefined'?'undefined':main_typeof(title))==='object'){options=title;title='';}else if(title===undefined){title='';}return main_MessageBox(merge_default()({title:title,message:message,showCancelButton:true,showInput:true,$type:'prompt'},options));};main_MessageBox.close=function(){main_instance.doClose();main_instance.visible=false;msgQueue=[];currentMsg=null;};/* harmony default export */var packages_message_box_src_main=main_MessageBox;// CONCATENATED MODULE: ./packages/message-box/index.js
/* harmony default export */var message_box=packages_message_box_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/breadcrumb/src/breadcrumb.vue?vue&type=template&id=4b464c06&
var breadcrumbvue_type_template_id_4b464c06_render=function breadcrumbvue_type_template_id_4b464c06_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-breadcrumb",attrs:{"aria-label":"Breadcrumb",role:"navigation"}},[_vm._t("default")],2);};var breadcrumbvue_type_template_id_4b464c06_staticRenderFns=[];breadcrumbvue_type_template_id_4b464c06_render._withStripped=true;// CONCATENATED MODULE: ./packages/breadcrumb/src/breadcrumb.vue?vue&type=template&id=4b464c06&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/breadcrumb/src/breadcrumb.vue?vue&type=script&lang=js&
//
//
//
//
//
/* harmony default export */var breadcrumbvue_type_script_lang_js_={name:'ElBreadcrumb',props:{separator:{type:String,default:'/'},separatorClass:{type:String,default:''}},provide:function provide(){return{elBreadcrumb:this};},mounted:function mounted(){var items=this.$el.querySelectorAll('.el-breadcrumb__item');if(items.length){items[items.length-1].setAttribute('aria-current','page');}}};// CONCATENATED MODULE: ./packages/breadcrumb/src/breadcrumb.vue?vue&type=script&lang=js&
/* harmony default export */var src_breadcrumbvue_type_script_lang_js_=breadcrumbvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/breadcrumb/src/breadcrumb.vue
/* normalize component */var breadcrumb_component=normalizeComponent(src_breadcrumbvue_type_script_lang_js_,breadcrumbvue_type_template_id_4b464c06_render,breadcrumbvue_type_template_id_4b464c06_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var breadcrumb_api; }breadcrumb_component.options.__file="packages/breadcrumb/src/breadcrumb.vue";/* harmony default export */var breadcrumb=breadcrumb_component.exports;// CONCATENATED MODULE: ./packages/breadcrumb/index.js
/* istanbul ignore next */breadcrumb.install=function(Vue){Vue.component(breadcrumb.name,breadcrumb);};/* harmony default export */var packages_breadcrumb=breadcrumb;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/breadcrumb/src/breadcrumb-item.vue?vue&type=template&id=fcf9eaac&
var breadcrumb_itemvue_type_template_id_fcf9eaac_render=function breadcrumb_itemvue_type_template_id_fcf9eaac_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("span",{staticClass:"el-breadcrumb__item"},[_c("span",{ref:"link",class:["el-breadcrumb__inner",_vm.to?"is-link":""],attrs:{role:"link"}},[_vm._t("default")],2),_vm.separatorClass?_c("i",{staticClass:"el-breadcrumb__separator",class:_vm.separatorClass}):_c("span",{staticClass:"el-breadcrumb__separator",attrs:{role:"presentation"}},[_vm._v(_vm._s(_vm.separator))])]);};var breadcrumb_itemvue_type_template_id_fcf9eaac_staticRenderFns=[];breadcrumb_itemvue_type_template_id_fcf9eaac_render._withStripped=true;// CONCATENATED MODULE: ./packages/breadcrumb/src/breadcrumb-item.vue?vue&type=template&id=fcf9eaac&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/breadcrumb/src/breadcrumb-item.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var breadcrumb_itemvue_type_script_lang_js_={name:'ElBreadcrumbItem',props:{to:{},replace:Boolean},data:function data(){return{separator:'',separatorClass:''};},inject:['elBreadcrumb'],mounted:function mounted(){var _this=this;this.separator=this.elBreadcrumb.separator;this.separatorClass=this.elBreadcrumb.separatorClass;var link=this.$refs.link;link.setAttribute('role','link');link.addEventListener('click',function(_){var to=_this.to,$router=_this.$router;if(!to||!$router)return;_this.replace?$router.replace(to):$router.push(to);});}};// CONCATENATED MODULE: ./packages/breadcrumb/src/breadcrumb-item.vue?vue&type=script&lang=js&
/* harmony default export */var src_breadcrumb_itemvue_type_script_lang_js_=breadcrumb_itemvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/breadcrumb/src/breadcrumb-item.vue
/* normalize component */var breadcrumb_item_component=normalizeComponent(src_breadcrumb_itemvue_type_script_lang_js_,breadcrumb_itemvue_type_template_id_fcf9eaac_render,breadcrumb_itemvue_type_template_id_fcf9eaac_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var breadcrumb_item_api; }breadcrumb_item_component.options.__file="packages/breadcrumb/src/breadcrumb-item.vue";/* harmony default export */var breadcrumb_item=breadcrumb_item_component.exports;// CONCATENATED MODULE: ./packages/breadcrumb-item/index.js
/* istanbul ignore next */breadcrumb_item.install=function(Vue){Vue.component(breadcrumb_item.name,breadcrumb_item);};/* harmony default export */var packages_breadcrumb_item=breadcrumb_item;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/form.vue?vue&type=template&id=a1b5ff34&
var formvue_type_template_id_a1b5ff34_render=function formvue_type_template_id_a1b5ff34_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("form",{staticClass:"el-form",class:[_vm.labelPosition?"el-form--label-"+_vm.labelPosition:"",{"el-form--inline":_vm.inline}]},[_vm._t("default")],2);};var formvue_type_template_id_a1b5ff34_staticRenderFns=[];formvue_type_template_id_a1b5ff34_render._withStripped=true;// CONCATENATED MODULE: ./packages/form/src/form.vue?vue&type=template&id=a1b5ff34&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/form.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
/* harmony default export */var formvue_type_script_lang_js_={name:'ElForm',componentName:'ElForm',provide:function provide(){return{elForm:this};},props:{model:Object,rules:Object,labelPosition:String,labelWidth:String,labelSuffix:{type:String,default:''},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:true},size:String,disabled:Boolean,validateOnRuleChange:{type:Boolean,default:true},hideRequiredAsterisk:{type:Boolean,default:false}},watch:{rules:function rules(){// remove then add event listeners on form-item after form rules change
this.fields.forEach(function(field){field.removeValidateEvents();field.addValidateEvents();});if(this.validateOnRuleChange){this.validate(function(){});}}},computed:{autoLabelWidth:function autoLabelWidth(){if(!this.potentialLabelWidthArr.length)return 0;var max=Math.max.apply(Math,this.potentialLabelWidthArr);return max?max+'px':'';}},data:function data(){return{fields:[],potentialLabelWidthArr:[]// use this array to calculate auto width
};},created:function created(){var _this=this;this.$on('el.form.addField',function(field){if(field){_this.fields.push(field);}});/* istanbul ignore next */this.$on('el.form.removeField',function(field){if(field.prop){_this.fields.splice(_this.fields.indexOf(field),1);}});},methods:{resetFields:function resetFields(){if(!this.model){console.warn('[Element Warn][Form]model is required for resetFields to work.');return;}this.fields.forEach(function(field){field.resetField();});},clearValidate:function clearValidate(){var props=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];var fields=props.length?typeof props==='string'?this.fields.filter(function(field){return props===field.prop;}):this.fields.filter(function(field){return props.indexOf(field.prop)>-1;}):this.fields;fields.forEach(function(field){field.clearValidate();});},validate:function validate(callback){var _this2=this;if(!this.model){console.warn('[Element Warn][Form]model is required for validate to work!');return;}var promise=void 0;// if no callback, return promise
if(typeof callback!=='function'&&window.Promise){promise=new window.Promise(function(resolve,reject){callback=function callback(valid){valid?resolve(valid):reject(valid);};});}var valid=true;var count=0;// 如果需要验证的fields为空，调用验证时立刻返回callback
if(this.fields.length===0&&callback){callback(true);}var invalidFields={};this.fields.forEach(function(field){field.validate('',function(message,field){if(message){valid=false;}invalidFields=merge_default()({},invalidFields,field);if(typeof callback==='function'&&++count===_this2.fields.length){callback(valid,invalidFields);}});});if(promise){return promise;}},validateField:function validateField(props,cb){props=[].concat(props);var fields=this.fields.filter(function(field){return props.indexOf(field.prop)!==-1;});if(!fields.length){console.warn('[Element Warn]please pass correct props!');return;}fields.forEach(function(field){field.validate('',cb);});},getLabelWidthIndex:function getLabelWidthIndex(width){var index=this.potentialLabelWidthArr.indexOf(width);// it's impossible
if(index===-1){throw new Error('[ElementForm]unpected width ',width);}return index;},registerLabelWidth:function registerLabelWidth(val,oldVal){if(val&&oldVal){var index=this.getLabelWidthIndex(oldVal);this.potentialLabelWidthArr.splice(index,1,val);}else if(val){this.potentialLabelWidthArr.push(val);}},deregisterLabelWidth:function deregisterLabelWidth(val){var index=this.getLabelWidthIndex(val);this.potentialLabelWidthArr.splice(index,1);}}};// CONCATENATED MODULE: ./packages/form/src/form.vue?vue&type=script&lang=js&
/* harmony default export */var src_formvue_type_script_lang_js_=formvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/form/src/form.vue
/* normalize component */var form_component=normalizeComponent(src_formvue_type_script_lang_js_,formvue_type_template_id_a1b5ff34_render,formvue_type_template_id_a1b5ff34_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var form_api; }form_component.options.__file="packages/form/src/form.vue";/* harmony default export */var src_form=form_component.exports;// CONCATENATED MODULE: ./packages/form/index.js
/* istanbul ignore next */src_form.install=function(Vue){Vue.component(src_form.name,src_form);};/* harmony default export */var packages_form=src_form;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/form-item.vue?vue&type=template&id=b6f3db6c&
var form_itemvue_type_template_id_b6f3db6c_render=function form_itemvue_type_template_id_b6f3db6c_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-form-item",class:[{"el-form-item--feedback":_vm.elForm&&_vm.elForm.statusIcon,"is-error":_vm.validateState==="error","is-validating":_vm.validateState==="validating","is-success":_vm.validateState==="success","is-required":_vm.isRequired||_vm.required,"is-no-asterisk":_vm.elForm&&_vm.elForm.hideRequiredAsterisk},_vm.sizeClass?"el-form-item--"+_vm.sizeClass:""]},[_c("label-wrap",{attrs:{"is-auto-width":_vm.labelStyle&&_vm.labelStyle.width==="auto","update-all":_vm.form.labelWidth==="auto"}},[_vm.label||_vm.$slots.label?_c("label",{staticClass:"el-form-item__label",style:_vm.labelStyle,attrs:{for:_vm.labelFor}},[_vm._t("label",[_vm._v(_vm._s(_vm.label+_vm.form.labelSuffix))])],2):_vm._e()]),_c("div",{staticClass:"el-form-item__content",style:_vm.contentStyle},[_vm._t("default"),_c("transition",{attrs:{name:"el-zoom-in-top"}},[_vm.validateState==="error"&&_vm.showMessage&&_vm.form.showMessage?_vm._t("error",[_c("div",{staticClass:"el-form-item__error",class:{"el-form-item__error--inline":typeof _vm.inlineMessage==="boolean"?_vm.inlineMessage:_vm.elForm&&_vm.elForm.inlineMessage||false}},[_vm._v("\n          "+_vm._s(_vm.validateMessage)+"\n        ")])],{error:_vm.validateMessage}):_vm._e()],2)],2)],1);};var form_itemvue_type_template_id_b6f3db6c_staticRenderFns=[];form_itemvue_type_template_id_b6f3db6c_render._withStripped=true;// CONCATENATED MODULE: ./packages/form/src/form-item.vue?vue&type=template&id=b6f3db6c&
// EXTERNAL MODULE: external "async-validator"
var external_async_validator_=__webpack_require__(40);var external_async_validator_default=/*#__PURE__*/__webpack_require__.n(external_async_validator_);// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/label-wrap.vue?vue&type=script&lang=js&
/* harmony default export */var label_wrapvue_type_script_lang_js_={props:{isAutoWidth:Boolean,updateAll:Boolean},inject:['elForm','elFormItem'],render:function render(){var h=arguments[0];var slots=this.$slots.default;if(!slots)return null;if(this.isAutoWidth){var autoLabelWidth=this.elForm.autoLabelWidth;var style={};if(autoLabelWidth&&autoLabelWidth!=='auto'){var marginLeft=parseInt(autoLabelWidth,10)-this.computedWidth;if(marginLeft){style.marginLeft=marginLeft+'px';}}return h('div',{'class':'el-form-item__label-wrap',style:style},[slots]);}else{return slots[0];}},methods:{getLabelWidth:function getLabelWidth(){if(this.$el&&this.$el.firstElementChild){var computedWidth=window.getComputedStyle(this.$el.firstElementChild).width;return Math.ceil(parseFloat(computedWidth));}else{return 0;}},updateLabelWidth:function updateLabelWidth(){var action=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'update';if(this.$slots.default&&this.isAutoWidth&&this.$el.firstElementChild){if(action==='update'){this.computedWidth=this.getLabelWidth();}else if(action==='remove'){this.elForm.deregisterLabelWidth(this.computedWidth);}}}},watch:{computedWidth:function computedWidth(val,oldVal){if(this.updateAll){this.elForm.registerLabelWidth(val,oldVal);this.elFormItem.updateComputedLabelWidth(val);}}},data:function data(){return{computedWidth:0};},mounted:function mounted(){this.updateLabelWidth('update');},updated:function updated(){this.updateLabelWidth('update');},beforeDestroy:function beforeDestroy(){this.updateLabelWidth('remove');}};// CONCATENATED MODULE: ./packages/form/src/label-wrap.vue?vue&type=script&lang=js&
/* harmony default export */var src_label_wrapvue_type_script_lang_js_=label_wrapvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/form/src/label-wrap.vue
var label_wrap_render,label_wrap_staticRenderFns;/* normalize component */var label_wrap_component=normalizeComponent(src_label_wrapvue_type_script_lang_js_,label_wrap_render,label_wrap_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var label_wrap_api; }label_wrap_component.options.__file="packages/form/src/label-wrap.vue";/* harmony default export */var label_wrap=label_wrap_component.exports;// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/form-item.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var form_itemvue_type_script_lang_js_={name:'ElFormItem',componentName:'ElFormItem',mixins:[emitter_default.a],provide:function provide(){return{elFormItem:this};},inject:['elForm'],props:{label:String,labelWidth:String,prop:String,required:{type:Boolean,default:undefined},rules:[Object,Array],error:String,validateStatus:String,for:String,inlineMessage:{type:[String,Boolean],default:''},showMessage:{type:Boolean,default:true},size:String},components:{// use this component to calculate auto width
LabelWrap:label_wrap},watch:{error:{immediate:true,handler:function handler(value){this.validateMessage=value;this.validateState=value?'error':'';}},validateStatus:function validateStatus(value){this.validateState=value;}},computed:{labelFor:function labelFor(){return this.for||this.prop;},labelStyle:function labelStyle(){var ret={};if(this.form.labelPosition==='top')return ret;var labelWidth=this.labelWidth||this.form.labelWidth;if(labelWidth){ret.width=labelWidth;}return ret;},contentStyle:function contentStyle(){var ret={};var label=this.label;if(this.form.labelPosition==='top'||this.form.inline)return ret;if(!label&&!this.labelWidth&&this.isNested)return ret;var labelWidth=this.labelWidth||this.form.labelWidth;if(labelWidth==='auto'){if(this.labelWidth==='auto'){ret.marginLeft=this.computedLabelWidth;}else if(this.form.labelWidth==='auto'){ret.marginLeft=this.elForm.autoLabelWidth;}}else{ret.marginLeft=labelWidth;}return ret;},form:function form(){var parent=this.$parent;var parentName=parent.$options.componentName;while(parentName!=='ElForm'){if(parentName==='ElFormItem'){this.isNested=true;}parent=parent.$parent;parentName=parent.$options.componentName;}return parent;},fieldValue:function fieldValue(){var model=this.form.model;if(!model||!this.prop){return;}var path=this.prop;if(path.indexOf(':')!==-1){path=path.replace(/:/,'.');}return Object(util_["getPropByPath"])(model,path,true).v;},isRequired:function isRequired(){var rules=this.getRules();var isRequired=false;if(rules&&rules.length){rules.every(function(rule){if(rule.required){isRequired=true;return false;}return true;});}return isRequired;},_formSize:function _formSize(){return this.elForm.size;},elFormItemSize:function elFormItemSize(){return this.size||this._formSize;},sizeClass:function sizeClass(){return this.elFormItemSize||(this.$ELEMENT||{}).size;}},data:function data(){return{validateState:'',validateMessage:'',validateDisabled:false,validator:{},isNested:false,computedLabelWidth:''};},methods:{validate:function validate(trigger){var _this=this;var callback=arguments.length>1&&arguments[1]!==undefined?arguments[1]:util_["noop"];this.validateDisabled=false;var rules=this.getFilteredRule(trigger);if((!rules||rules.length===0)&&this.required===undefined){callback();return true;}this.validateState='validating';var descriptor={};if(rules&&rules.length>0){rules.forEach(function(rule){delete rule.trigger;});}descriptor[this.prop]=rules;var validator=new external_async_validator_default.a(descriptor);var model={};model[this.prop]=this.fieldValue;validator.validate(model,{firstFields:true},function(errors,invalidFields){_this.validateState=!errors?'success':'error';_this.validateMessage=errors?errors[0].message:'';callback(_this.validateMessage,invalidFields);_this.elForm&&_this.elForm.$emit('validate',_this.prop,!errors,_this.validateMessage||null);});},clearValidate:function clearValidate(){this.validateState='';this.validateMessage='';this.validateDisabled=false;},resetField:function resetField(){var _this2=this;this.validateState='';this.validateMessage='';var model=this.form.model;var value=this.fieldValue;var path=this.prop;if(path.indexOf(':')!==-1){path=path.replace(/:/,'.');}var prop=Object(util_["getPropByPath"])(model,path,true);this.validateDisabled=true;if(Array.isArray(value)){prop.o[prop.k]=[].concat(this.initialValue);}else{prop.o[prop.k]=this.initialValue;}// reset validateDisabled after onFieldChange triggered
this.$nextTick(function(){_this2.validateDisabled=false;});this.broadcast('ElTimeSelect','fieldReset',this.initialValue);},getRules:function getRules(){var formRules=this.form.rules;var selfRules=this.rules;var requiredRule=this.required!==undefined?{required:!!this.required}:[];var prop=Object(util_["getPropByPath"])(formRules,this.prop||'');formRules=formRules?prop.o[this.prop||'']||prop.v:[];return[].concat(selfRules||formRules||[]).concat(requiredRule);},getFilteredRule:function getFilteredRule(trigger){var rules=this.getRules();return rules.filter(function(rule){if(!rule.trigger||trigger==='')return true;if(Array.isArray(rule.trigger)){return rule.trigger.indexOf(trigger)>-1;}else{return rule.trigger===trigger;}}).map(function(rule){return merge_default()({},rule);});},onFieldBlur:function onFieldBlur(){this.validate('blur');},onFieldChange:function onFieldChange(){if(this.validateDisabled){this.validateDisabled=false;return;}this.validate('change');},updateComputedLabelWidth:function updateComputedLabelWidth(width){this.computedLabelWidth=width?width+'px':'';},addValidateEvents:function addValidateEvents(){var rules=this.getRules();if(rules.length||this.required!==undefined){this.$on('el.form.blur',this.onFieldBlur);this.$on('el.form.change',this.onFieldChange);}},removeValidateEvents:function removeValidateEvents(){this.$off();}},mounted:function mounted(){if(this.prop){this.dispatch('ElForm','el.form.addField',[this]);var initialValue=this.fieldValue;if(Array.isArray(initialValue)){initialValue=[].concat(initialValue);}Object.defineProperty(this,'initialValue',{value:initialValue});this.addValidateEvents();}},beforeDestroy:function beforeDestroy(){this.dispatch('ElForm','el.form.removeField',[this]);}};// CONCATENATED MODULE: ./packages/form/src/form-item.vue?vue&type=script&lang=js&
/* harmony default export */var src_form_itemvue_type_script_lang_js_=form_itemvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/form/src/form-item.vue
/* normalize component */var form_item_component=normalizeComponent(src_form_itemvue_type_script_lang_js_,form_itemvue_type_template_id_b6f3db6c_render,form_itemvue_type_template_id_b6f3db6c_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var form_item_api; }form_item_component.options.__file="packages/form/src/form-item.vue";/* harmony default export */var form_item=form_item_component.exports;// CONCATENATED MODULE: ./packages/form-item/index.js
/* istanbul ignore next */form_item.install=function(Vue){Vue.component(form_item.name,form_item);};/* harmony default export */var packages_form_item=form_item;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tabs/src/tab-bar.vue?vue&type=template&id=2031f33a&
var tab_barvue_type_template_id_2031f33a_render=function tab_barvue_type_template_id_2031f33a_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-tabs__active-bar",class:"is-"+_vm.rootTabs.tabPosition,style:_vm.barStyle});};var tab_barvue_type_template_id_2031f33a_staticRenderFns=[];tab_barvue_type_template_id_2031f33a_render._withStripped=true;// CONCATENATED MODULE: ./packages/tabs/src/tab-bar.vue?vue&type=template&id=2031f33a&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tabs/src/tab-bar.vue?vue&type=script&lang=js&
//
//
//
/* harmony default export */var tab_barvue_type_script_lang_js_={name:'TabBar',props:{tabs:Array},inject:['rootTabs'],computed:{barStyle:{get:function get(){var _this=this;var style={};var offset=0;var tabSize=0;var sizeName=['top','bottom'].indexOf(this.rootTabs.tabPosition)!==-1?'width':'height';var sizeDir=sizeName==='width'?'x':'y';var firstUpperCase=function firstUpperCase(str){return str.toLowerCase().replace(/( |^)[a-z]/g,function(L){return L.toUpperCase();});};this.tabs.every(function(tab,index){var $el=Object(util_["arrayFind"])(_this.$parent.$refs.tabs||[],function(t){return t.id.replace('tab-','')===tab.paneName;});if(!$el){return false;}if(!tab.active){offset+=$el['client'+firstUpperCase(sizeName)];return true;}else{tabSize=$el['client'+firstUpperCase(sizeName)];var tabStyles=window.getComputedStyle($el);if(sizeName==='width'&&_this.tabs.length>1){tabSize-=parseFloat(tabStyles.paddingLeft)+parseFloat(tabStyles.paddingRight);}if(sizeName==='width'){offset+=parseFloat(tabStyles.paddingLeft);}return false;}});var transform='translate'+firstUpperCase(sizeDir)+'('+offset+'px)';style[sizeName]=tabSize+'px';style.transform=transform;style.msTransform=transform;style.webkitTransform=transform;return style;}}}};// CONCATENATED MODULE: ./packages/tabs/src/tab-bar.vue?vue&type=script&lang=js&
/* harmony default export */var src_tab_barvue_type_script_lang_js_=tab_barvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/tabs/src/tab-bar.vue
/* normalize component */var tab_bar_component=normalizeComponent(src_tab_barvue_type_script_lang_js_,tab_barvue_type_template_id_2031f33a_render,tab_barvue_type_template_id_2031f33a_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var tab_bar_api; }tab_bar_component.options.__file="packages/tabs/src/tab-bar.vue";/* harmony default export */var tab_bar=tab_bar_component.exports;// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tabs/src/tab-nav.vue?vue&type=script&lang=js&
function noop(){}var tab_navvue_type_script_lang_js_firstUpperCase=function firstUpperCase(str){return str.toLowerCase().replace(/( |^)[a-z]/g,function(L){return L.toUpperCase();});};/* harmony default export */var tab_navvue_type_script_lang_js_={name:'TabNav',components:{TabBar:tab_bar},inject:['rootTabs'],props:{panes:Array,currentName:String,editable:Boolean,onTabClick:{type:Function,default:noop},onTabRemove:{type:Function,default:noop},type:String,stretch:Boolean},data:function data(){return{scrollable:false,navOffset:0,isFocus:false,focusable:true};},computed:{navStyle:function navStyle(){var dir=['top','bottom'].indexOf(this.rootTabs.tabPosition)!==-1?'X':'Y';return{transform:'translate'+dir+'(-'+this.navOffset+'px)'};},sizeName:function sizeName(){return['top','bottom'].indexOf(this.rootTabs.tabPosition)!==-1?'width':'height';}},methods:{scrollPrev:function scrollPrev(){var containerSize=this.$refs.navScroll['offset'+tab_navvue_type_script_lang_js_firstUpperCase(this.sizeName)];var currentOffset=this.navOffset;if(!currentOffset)return;var newOffset=currentOffset>containerSize?currentOffset-containerSize:0;this.navOffset=newOffset;},scrollNext:function scrollNext(){var navSize=this.$refs.nav['offset'+tab_navvue_type_script_lang_js_firstUpperCase(this.sizeName)];var containerSize=this.$refs.navScroll['offset'+tab_navvue_type_script_lang_js_firstUpperCase(this.sizeName)];var currentOffset=this.navOffset;if(navSize-currentOffset<=containerSize)return;var newOffset=navSize-currentOffset>containerSize*2?currentOffset+containerSize:navSize-containerSize;this.navOffset=newOffset;},scrollToActiveTab:function scrollToActiveTab(){if(!this.scrollable)return;var nav=this.$refs.nav;var activeTab=this.$el.querySelector('.is-active');if(!activeTab)return;var navScroll=this.$refs.navScroll;var isHorizontal=['top','bottom'].indexOf(this.rootTabs.tabPosition)!==-1;var activeTabBounding=activeTab.getBoundingClientRect();var navScrollBounding=navScroll.getBoundingClientRect();var maxOffset=isHorizontal?nav.offsetWidth-navScrollBounding.width:nav.offsetHeight-navScrollBounding.height;var currentOffset=this.navOffset;var newOffset=currentOffset;if(isHorizontal){if(activeTabBounding.left<navScrollBounding.left){newOffset=currentOffset-(navScrollBounding.left-activeTabBounding.left);}if(activeTabBounding.right>navScrollBounding.right){newOffset=currentOffset+activeTabBounding.right-navScrollBounding.right;}}else{if(activeTabBounding.top<navScrollBounding.top){newOffset=currentOffset-(navScrollBounding.top-activeTabBounding.top);}if(activeTabBounding.bottom>navScrollBounding.bottom){newOffset=currentOffset+(activeTabBounding.bottom-navScrollBounding.bottom);}}newOffset=Math.max(newOffset,0);this.navOffset=Math.min(newOffset,maxOffset);},update:function update(){if(!this.$refs.nav)return;var sizeName=this.sizeName;var navSize=this.$refs.nav['offset'+tab_navvue_type_script_lang_js_firstUpperCase(sizeName)];var containerSize=this.$refs.navScroll['offset'+tab_navvue_type_script_lang_js_firstUpperCase(sizeName)];var currentOffset=this.navOffset;if(containerSize<navSize){var _currentOffset=this.navOffset;this.scrollable=this.scrollable||{};this.scrollable.prev=_currentOffset;this.scrollable.next=_currentOffset+containerSize<navSize;if(navSize-_currentOffset<containerSize){this.navOffset=navSize-containerSize;}}else{this.scrollable=false;if(currentOffset>0){this.navOffset=0;}}},changeTab:function changeTab(e){var keyCode=e.keyCode;var nextIndex=void 0;var currentIndex=void 0,tabList=void 0;if([37,38,39,40].indexOf(keyCode)!==-1){// 左右上下键更换tab
tabList=e.currentTarget.querySelectorAll('[role=tab]');currentIndex=Array.prototype.indexOf.call(tabList,e.target);}else{return;}if(keyCode===37||keyCode===38){// left
if(currentIndex===0){// first
nextIndex=tabList.length-1;}else{nextIndex=currentIndex-1;}}else{// right
if(currentIndex<tabList.length-1){// not last
nextIndex=currentIndex+1;}else{nextIndex=0;}}tabList[nextIndex].focus();// 改变焦点元素
tabList[nextIndex].click();// 选中下一个tab
this.setFocus();},setFocus:function setFocus(){if(this.focusable){this.isFocus=true;}},removeFocus:function removeFocus(){this.isFocus=false;},visibilityChangeHandler:function visibilityChangeHandler(){var _this=this;var visibility=document.visibilityState;if(visibility==='hidden'){this.focusable=false;}else if(visibility==='visible'){setTimeout(function(){_this.focusable=true;},50);}},windowBlurHandler:function windowBlurHandler(){this.focusable=false;},windowFocusHandler:function windowFocusHandler(){var _this2=this;setTimeout(function(){_this2.focusable=true;},50);}},updated:function updated(){this.update();},render:function render(h){var _this3=this;var type=this.type,panes=this.panes,editable=this.editable,stretch=this.stretch,onTabClick=this.onTabClick,onTabRemove=this.onTabRemove,navStyle=this.navStyle,scrollable=this.scrollable,scrollNext=this.scrollNext,scrollPrev=this.scrollPrev,changeTab=this.changeTab,setFocus=this.setFocus,removeFocus=this.removeFocus;var scrollBtn=scrollable?[h('span',{'class':['el-tabs__nav-prev',scrollable.prev?'':'is-disabled'],on:{'click':scrollPrev}},[h('i',{'class':'el-icon-arrow-left'})]),h('span',{'class':['el-tabs__nav-next',scrollable.next?'':'is-disabled'],on:{'click':scrollNext}},[h('i',{'class':'el-icon-arrow-right'})])]:null;var tabs=this._l(panes,function(pane,index){var _ref;var tabName=pane.name||pane.index||index;var closable=pane.isClosable||editable;pane.index=''+index;var btnClose=closable?h('span',{'class':'el-icon-close',on:{'click':function click(ev){onTabRemove(pane,ev);}}}):null;var tabLabelContent=pane.$slots.label||pane.label;var tabindex=pane.active?0:-1;return h('div',{'class':(_ref={'el-tabs__item':true},_ref['is-'+_this3.rootTabs.tabPosition]=true,_ref['is-active']=pane.active,_ref['is-disabled']=pane.disabled,_ref['is-closable']=closable,_ref['is-focus']=_this3.isFocus,_ref),attrs:{id:'tab-'+tabName,'aria-controls':'pane-'+tabName,role:'tab','aria-selected':pane.active,tabindex:tabindex},key:'tab-'+tabName,ref:'tabs',refInFor:true,on:{'focus':function focus(){setFocus();},'blur':function blur(){removeFocus();},'click':function click(ev){removeFocus();onTabClick(pane,tabName,ev);},'keydown':function keydown(ev){if(closable&&(ev.keyCode===46||ev.keyCode===8)){onTabRemove(pane,ev);}}}},[tabLabelContent,btnClose]);});return h('div',{'class':['el-tabs__nav-wrap',scrollable?'is-scrollable':'','is-'+this.rootTabs.tabPosition]},[scrollBtn,h('div',{'class':['el-tabs__nav-scroll'],ref:'navScroll'},[h('div',{'class':['el-tabs__nav','is-'+this.rootTabs.tabPosition,stretch&&['top','bottom'].indexOf(this.rootTabs.tabPosition)!==-1?'is-stretch':''],ref:'nav',style:navStyle,attrs:{role:'tablist'},on:{'keydown':changeTab}},[!type?h('tab-bar',{attrs:{tabs:panes}}):null,tabs])])]);},mounted:function mounted(){var _this4=this;Object(resize_event_["addResizeListener"])(this.$el,this.update);document.addEventListener('visibilitychange',this.visibilityChangeHandler);window.addEventListener('blur',this.windowBlurHandler);window.addEventListener('focus',this.windowFocusHandler);setTimeout(function(){_this4.scrollToActiveTab();},0);},beforeDestroy:function beforeDestroy(){if(this.$el&&this.update)Object(resize_event_["removeResizeListener"])(this.$el,this.update);document.removeEventListener('visibilitychange',this.visibilityChangeHandler);window.removeEventListener('blur',this.windowBlurHandler);window.removeEventListener('focus',this.windowFocusHandler);}};// CONCATENATED MODULE: ./packages/tabs/src/tab-nav.vue?vue&type=script&lang=js&
/* harmony default export */var src_tab_navvue_type_script_lang_js_=tab_navvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/tabs/src/tab-nav.vue
var tab_nav_render,tab_nav_staticRenderFns;/* normalize component */var tab_nav_component=normalizeComponent(src_tab_navvue_type_script_lang_js_,tab_nav_render,tab_nav_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var tab_nav_api; }tab_nav_component.options.__file="packages/tabs/src/tab-nav.vue";/* harmony default export */var tab_nav=tab_nav_component.exports;// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tabs/src/tabs.vue?vue&type=script&lang=js&
/* harmony default export */var tabsvue_type_script_lang_js_={name:'ElTabs',components:{TabNav:tab_nav},props:{type:String,activeName:String,closable:Boolean,addable:Boolean,value:{},editable:Boolean,tabPosition:{type:String,default:'top'},beforeLeave:Function,stretch:Boolean},provide:function provide(){return{rootTabs:this};},data:function data(){return{currentName:this.value||this.activeName,panes:[]};},watch:{activeName:function activeName(value){this.setCurrentName(value);},value:function value(_value){this.setCurrentName(_value);},currentName:function currentName(value){var _this=this;if(this.$refs.nav){this.$nextTick(function(){_this.$refs.nav.$nextTick(function(_){_this.$refs.nav.scrollToActiveTab();});});}}},methods:{calcPaneInstances:function calcPaneInstances(){var _this2=this;var isForceUpdate=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;if(this.$slots.default){var paneSlots=this.$slots.default.filter(function(vnode){return vnode.tag&&vnode.componentOptions&&vnode.componentOptions.Ctor.options.name==='ElTabPane';});// update indeed
var panes=paneSlots.map(function(_ref){var componentInstance=_ref.componentInstance;return componentInstance;});var panesChanged=!(panes.length===this.panes.length&&panes.every(function(pane,index){return pane===_this2.panes[index];}));if(isForceUpdate||panesChanged){this.panes=panes;}}else if(this.panes.length!==0){this.panes=[];}},handleTabClick:function handleTabClick(tab,tabName,event){if(tab.disabled)return;this.setCurrentName(tabName);this.$emit('tab-click',tab,event);},handleTabRemove:function handleTabRemove(pane,ev){if(pane.disabled)return;ev.stopPropagation();this.$emit('edit',pane.name,'remove');this.$emit('tab-remove',pane.name);},handleTabAdd:function handleTabAdd(){this.$emit('edit',null,'add');this.$emit('tab-add');},setCurrentName:function setCurrentName(value){var _this3=this;var changeCurrentName=function changeCurrentName(){_this3.currentName=value;_this3.$emit('input',value);};if(this.currentName!==value&&this.beforeLeave){var before=this.beforeLeave(value,this.currentName);if(before&&before.then){before.then(function(){changeCurrentName();_this3.$refs.nav&&_this3.$refs.nav.removeFocus();},function(){// https://github.com/ElemeFE/element/pull/14816
// ignore promise rejection in `before-leave` hook
});}else if(before!==false){changeCurrentName();}}else{changeCurrentName();}}},render:function render(h){var _ref2;var type=this.type,handleTabClick=this.handleTabClick,handleTabRemove=this.handleTabRemove,handleTabAdd=this.handleTabAdd,currentName=this.currentName,panes=this.panes,editable=this.editable,addable=this.addable,tabPosition=this.tabPosition,stretch=this.stretch;var newButton=editable||addable?h('span',{'class':'el-tabs__new-tab',on:{'click':handleTabAdd,'keydown':function keydown(ev){if(ev.keyCode===13){handleTabAdd();}}},attrs:{tabindex:'0'}},[h('i',{'class':'el-icon-plus'})]):null;var navData={props:{currentName:currentName,onTabClick:handleTabClick,onTabRemove:handleTabRemove,editable:editable,type:type,panes:panes,stretch:stretch},ref:'nav'};var header=h('div',{'class':['el-tabs__header','is-'+tabPosition]},[newButton,h('tab-nav',navData)]);var panels=h('div',{'class':'el-tabs__content'},[this.$slots.default]);return h('div',{'class':(_ref2={'el-tabs':true,'el-tabs--card':type==='card'},_ref2['el-tabs--'+tabPosition]=true,_ref2['el-tabs--border-card']=type==='border-card',_ref2)},[tabPosition!=='bottom'?[header,panels]:[panels,header]]);},created:function created(){if(!this.currentName){this.setCurrentName('0');}this.$on('tab-nav-update',this.calcPaneInstances.bind(null,true));},mounted:function mounted(){this.calcPaneInstances();},updated:function updated(){this.calcPaneInstances();}};// CONCATENATED MODULE: ./packages/tabs/src/tabs.vue?vue&type=script&lang=js&
/* harmony default export */var src_tabsvue_type_script_lang_js_=tabsvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/tabs/src/tabs.vue
var tabs_render,tabs_staticRenderFns;/* normalize component */var tabs_component=normalizeComponent(src_tabsvue_type_script_lang_js_,tabs_render,tabs_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var tabs_api; }tabs_component.options.__file="packages/tabs/src/tabs.vue";/* harmony default export */var tabs=tabs_component.exports;// CONCATENATED MODULE: ./packages/tabs/index.js
/* istanbul ignore next */tabs.install=function(Vue){Vue.component(tabs.name,tabs);};/* harmony default export */var packages_tabs=tabs;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tabs/src/tab-pane.vue?vue&type=template&id=9145a070&
var tab_panevue_type_template_id_9145a070_render=function tab_panevue_type_template_id_9145a070_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return!_vm.lazy||_vm.loaded||_vm.active?_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.active,expression:"active"}],staticClass:"el-tab-pane",attrs:{role:"tabpanel","aria-hidden":!_vm.active,id:"pane-"+_vm.paneName,"aria-labelledby":"tab-"+_vm.paneName}},[_vm._t("default")],2):_vm._e();};var tab_panevue_type_template_id_9145a070_staticRenderFns=[];tab_panevue_type_template_id_9145a070_render._withStripped=true;// CONCATENATED MODULE: ./packages/tabs/src/tab-pane.vue?vue&type=template&id=9145a070&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tabs/src/tab-pane.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var tab_panevue_type_script_lang_js_={name:'ElTabPane',componentName:'ElTabPane',props:{label:String,labelContent:Function,name:String,closable:Boolean,disabled:Boolean,lazy:Boolean},data:function data(){return{index:null,loaded:false};},computed:{isClosable:function isClosable(){return this.closable||this.$parent.closable;},active:function active(){var active=this.$parent.currentName===(this.name||this.index);if(active){this.loaded=true;}return active;},paneName:function paneName(){return this.name||this.index;}},updated:function updated(){this.$parent.$emit('tab-nav-update');}};// CONCATENATED MODULE: ./packages/tabs/src/tab-pane.vue?vue&type=script&lang=js&
/* harmony default export */var src_tab_panevue_type_script_lang_js_=tab_panevue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/tabs/src/tab-pane.vue
/* normalize component */var tab_pane_component=normalizeComponent(src_tab_panevue_type_script_lang_js_,tab_panevue_type_template_id_9145a070_render,tab_panevue_type_template_id_9145a070_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var tab_pane_api; }tab_pane_component.options.__file="packages/tabs/src/tab-pane.vue";/* harmony default export */var tab_pane=tab_pane_component.exports;// CONCATENATED MODULE: ./packages/tab-pane/index.js
/* istanbul ignore next */tab_pane.install=function(Vue){Vue.component(tab_pane.name,tab_pane);};/* harmony default export */var packages_tab_pane=tab_pane;// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tag/src/tag.vue?vue&type=script&lang=js&
/* harmony default export */var tagvue_type_script_lang_js_={name:'ElTag',props:{text:String,closable:Boolean,type:String,hit:Boolean,disableTransitions:Boolean,color:String,size:String,effect:{type:String,default:'light',validator:function validator(val){return['dark','light','plain'].indexOf(val)!==-1;}}},methods:{handleClose:function handleClose(event){event.stopPropagation();this.$emit('close',event);},handleClick:function handleClick(event){this.$emit('click',event);}},computed:{tagSize:function tagSize(){return this.size||(this.$ELEMENT||{}).size;}},render:function render(h){var type=this.type,tagSize=this.tagSize,hit=this.hit,effect=this.effect;var classes=['el-tag',type?'el-tag--'+type:'',tagSize?'el-tag--'+tagSize:'',effect?'el-tag--'+effect:'',hit&&'is-hit'];var tagEl=h('span',{'class':classes,style:{backgroundColor:this.color},on:{'click':this.handleClick}},[this.$slots.default,this.closable&&h('i',{'class':'el-tag__close el-icon-close',on:{'click':this.handleClose}})]);return this.disableTransitions?tagEl:h('transition',{attrs:{name:'el-zoom-in-center'}},[tagEl]);}};// CONCATENATED MODULE: ./packages/tag/src/tag.vue?vue&type=script&lang=js&
/* harmony default export */var src_tagvue_type_script_lang_js_=tagvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/tag/src/tag.vue
var tag_render,tag_staticRenderFns;/* normalize component */var tag_component=normalizeComponent(src_tagvue_type_script_lang_js_,tag_render,tag_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var tag_api; }tag_component.options.__file="packages/tag/src/tag.vue";/* harmony default export */var tag=tag_component.exports;// CONCATENATED MODULE: ./packages/tag/index.js
/* istanbul ignore next */tag.install=function(Vue){Vue.component(tag.name,tag);};/* harmony default export */var packages_tag=tag;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/tree.vue?vue&type=template&id=547575a6&
var treevue_type_template_id_547575a6_render=function treevue_type_template_id_547575a6_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-tree",class:{"el-tree--highlight-current":_vm.highlightCurrent,"is-dragging":!!_vm.dragState.draggingNode,"is-drop-not-allow":!_vm.dragState.allowDrop,"is-drop-inner":_vm.dragState.dropType==="inner"},attrs:{role:"tree"}},[_vm._l(_vm.root.childNodes,function(child){return _c("el-tree-node",{key:_vm.getNodeKey(child),attrs:{node:child,props:_vm.props,"render-after-expand":_vm.renderAfterExpand,"show-checkbox":_vm.showCheckbox,"render-content":_vm.renderContent},on:{"node-expand":_vm.handleNodeExpand}});}),_vm.isEmpty?_c("div",{staticClass:"el-tree__empty-block"},[_c("span",{staticClass:"el-tree__empty-text"},[_vm._v(_vm._s(_vm.emptyText))])]):_vm._e(),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.dragState.showDropIndicator,expression:"dragState.showDropIndicator"}],ref:"dropIndicator",staticClass:"el-tree__drop-indicator"})],2);};var treevue_type_template_id_547575a6_staticRenderFns=[];treevue_type_template_id_547575a6_render._withStripped=true;// CONCATENATED MODULE: ./packages/tree/src/tree.vue?vue&type=template&id=547575a6&
// CONCATENATED MODULE: ./packages/tree/src/model/util.js
var NODE_KEY='$treeNodeId';var markNodeData=function markNodeData(node,data){if(!data||data[NODE_KEY])return;Object.defineProperty(data,NODE_KEY,{value:node.id,enumerable:false,configurable:false,writable:false});};var util_getNodeKey=function getNodeKey(key,data){if(!key)return data[NODE_KEY];return data[key];};var findNearestComponent=function findNearestComponent(element,componentName){var target=element;while(target&&target.tagName!=='BODY'){if(target.__vue__&&target.__vue__.$options.name===componentName){return target.__vue__;}target=target.parentNode;}return null;};// CONCATENATED MODULE: ./packages/tree/src/model/node.js
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function node_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}var getChildState=function getChildState(node){var all=true;var none=true;var allWithoutDisable=true;for(var i=0,j=node.length;i<j;i++){var n=node[i];if(n.checked!==true||n.indeterminate){all=false;if(!n.disabled){allWithoutDisable=false;}}if(n.checked!==false||n.indeterminate){none=false;}}return{all:all,none:none,allWithoutDisable:allWithoutDisable,half:!all&&!none};};var reInitChecked=function reInitChecked(node){if(node.childNodes.length===0)return;var _getChildState=getChildState(node.childNodes),all=_getChildState.all,none=_getChildState.none,half=_getChildState.half;if(all){node.checked=true;node.indeterminate=false;}else if(half){node.checked=false;node.indeterminate=true;}else if(none){node.checked=false;node.indeterminate=false;}var parent=node.parent;if(!parent||parent.level===0)return;if(!node.store.checkStrictly){reInitChecked(parent);}};var getPropertyFromData=function getPropertyFromData(node,prop){var props=node.store.props;var data=node.data||{};var config=props[prop];if(typeof config==='function'){return config(data,node);}else if(typeof config==='string'){return data[config];}else if(typeof config==='undefined'){var dataProp=data[prop];return dataProp===undefined?'':dataProp;}};var nodeIdSeed=0;var node_Node=function(){function Node(options){node_classCallCheck(this,Node);this.id=nodeIdSeed++;this.text=null;this.checked=false;this.indeterminate=false;this.data=null;this.expanded=false;this.parent=null;this.visible=true;this.isCurrent=false;for(var name in options){if(options.hasOwnProperty(name)){this[name]=options[name];}}// internal
this.level=0;this.loaded=false;this.childNodes=[];this.loading=false;if(this.parent){this.level=this.parent.level+1;}var store=this.store;if(!store){throw new Error('[Node]store is required!');}store.registerNode(this);var props=store.props;if(props&&typeof props.isLeaf!=='undefined'){var isLeaf=getPropertyFromData(this,'isLeaf');if(typeof isLeaf==='boolean'){this.isLeafByUser=isLeaf;}}if(store.lazy!==true&&this.data){this.setData(this.data);if(store.defaultExpandAll){this.expanded=true;}}else if(this.level>0&&store.lazy&&store.defaultExpandAll){this.expand();}if(!Array.isArray(this.data)){markNodeData(this,this.data);}if(!this.data)return;var defaultExpandedKeys=store.defaultExpandedKeys;var key=store.key;if(key&&defaultExpandedKeys&&defaultExpandedKeys.indexOf(this.key)!==-1){this.expand(null,store.autoExpandParent);}if(key&&store.currentNodeKey!==undefined&&this.key===store.currentNodeKey){store.currentNode=this;store.currentNode.isCurrent=true;}if(store.lazy){store._initDefaultCheckedNode(this);}this.updateLeafState();}Node.prototype.setData=function setData(data){if(!Array.isArray(data)){markNodeData(this,data);}this.data=data;this.childNodes=[];var children=void 0;if(this.level===0&&this.data instanceof Array){children=this.data;}else{children=getPropertyFromData(this,'children')||[];}for(var i=0,j=children.length;i<j;i++){this.insertChild({data:children[i]});}};Node.prototype.contains=function contains(target){var deep=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var walk=function walk(parent){var children=parent.childNodes||[];var result=false;for(var i=0,j=children.length;i<j;i++){var child=children[i];if(child===target||deep&&walk(child)){result=true;break;}}return result;};return walk(this);};Node.prototype.remove=function remove(){var parent=this.parent;if(parent){parent.removeChild(this);}};Node.prototype.insertChild=function insertChild(child,index,batch){if(!child)throw new Error('insertChild error: child is required.');if(!(child instanceof Node)){if(!batch){var children=this.getChildren(true);if(children.indexOf(child.data)===-1){if(typeof index==='undefined'||index<0){children.push(child.data);}else{children.splice(index,0,child.data);}}}merge_default()(child,{parent:this,store:this.store});child=new Node(child);}child.level=this.level+1;if(typeof index==='undefined'||index<0){this.childNodes.push(child);}else{this.childNodes.splice(index,0,child);}this.updateLeafState();};Node.prototype.insertBefore=function insertBefore(child,ref){var index=void 0;if(ref){index=this.childNodes.indexOf(ref);}this.insertChild(child,index);};Node.prototype.insertAfter=function insertAfter(child,ref){var index=void 0;if(ref){index=this.childNodes.indexOf(ref);if(index!==-1)index+=1;}this.insertChild(child,index);};Node.prototype.removeChild=function removeChild(child){var children=this.getChildren()||[];var dataIndex=children.indexOf(child.data);if(dataIndex>-1){children.splice(dataIndex,1);}var index=this.childNodes.indexOf(child);if(index>-1){this.store&&this.store.deregisterNode(child);child.parent=null;this.childNodes.splice(index,1);}this.updateLeafState();};Node.prototype.removeChildByData=function removeChildByData(data){var targetNode=null;for(var i=0;i<this.childNodes.length;i++){if(this.childNodes[i].data===data){targetNode=this.childNodes[i];break;}}if(targetNode){this.removeChild(targetNode);}};Node.prototype.expand=function expand(callback,expandParent){var _this=this;var done=function done(){if(expandParent){var parent=_this.parent;while(parent.level>0){parent.expanded=true;parent=parent.parent;}}_this.expanded=true;if(callback)callback();};if(this.shouldLoadData()){this.loadData(function(data){if(data instanceof Array){if(_this.checked){_this.setChecked(true,true);}else if(!_this.store.checkStrictly){reInitChecked(_this);}done();}});}else{done();}};Node.prototype.doCreateChildren=function doCreateChildren(array){var _this2=this;var defaultProps=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};array.forEach(function(item){_this2.insertChild(merge_default()({data:item},defaultProps),undefined,true);});};Node.prototype.collapse=function collapse(){this.expanded=false;};Node.prototype.shouldLoadData=function shouldLoadData(){return this.store.lazy===true&&this.store.load&&!this.loaded;};Node.prototype.updateLeafState=function updateLeafState(){if(this.store.lazy===true&&this.loaded!==true&&typeof this.isLeafByUser!=='undefined'){this.isLeaf=this.isLeafByUser;return;}var childNodes=this.childNodes;if(!this.store.lazy||this.store.lazy===true&&this.loaded===true){this.isLeaf=!childNodes||childNodes.length===0;return;}this.isLeaf=false;};Node.prototype.setChecked=function setChecked(value,deep,recursion,passValue){var _this3=this;this.indeterminate=value==='half';this.checked=value===true;if(this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){var _getChildState2=getChildState(this.childNodes),all=_getChildState2.all,allWithoutDisable=_getChildState2.allWithoutDisable;if(!this.isLeaf&&!all&&allWithoutDisable){this.checked=false;value=false;}var handleDescendants=function handleDescendants(){if(deep){var childNodes=_this3.childNodes;for(var i=0,j=childNodes.length;i<j;i++){var child=childNodes[i];passValue=passValue||value!==false;var isCheck=child.disabled?child.checked:passValue;child.setChecked(isCheck,deep,true,passValue);}var _getChildState3=getChildState(childNodes),half=_getChildState3.half,_all=_getChildState3.all;if(!_all){_this3.checked=_all;_this3.indeterminate=half;}}};if(this.shouldLoadData()){// Only work on lazy load data.
this.loadData(function(){handleDescendants();reInitChecked(_this3);},{checked:value!==false});return;}else{handleDescendants();}}var parent=this.parent;if(!parent||parent.level===0)return;if(!recursion){reInitChecked(parent);}};Node.prototype.getChildren=function getChildren(){var forceInit=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;// this is data
if(this.level===0)return this.data;var data=this.data;if(!data)return null;var props=this.store.props;var children='children';if(props){children=props.children||'children';}if(data[children]===undefined){data[children]=null;}if(forceInit&&!data[children]){data[children]=[];}return data[children];};Node.prototype.updateChildren=function updateChildren(){var _this4=this;var newData=this.getChildren()||[];var oldData=this.childNodes.map(function(node){return node.data;});var newDataMap={};var newNodes=[];newData.forEach(function(item,index){var key=item[NODE_KEY];var isNodeExists=!!key&&Object(util_["arrayFindIndex"])(oldData,function(data){return data[NODE_KEY]===key;})>=0;if(isNodeExists){newDataMap[key]={index:index,data:item};}else{newNodes.push({index:index,data:item});}});if(!this.store.lazy){oldData.forEach(function(item){if(!newDataMap[item[NODE_KEY]])_this4.removeChildByData(item);});}newNodes.forEach(function(_ref){var index=_ref.index,data=_ref.data;_this4.insertChild({data:data},index);});this.updateLeafState();};Node.prototype.loadData=function loadData(callback){var _this5=this;var defaultProps=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(this.store.lazy===true&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(defaultProps).length)){this.loading=true;var resolve=function resolve(children){_this5.loaded=true;_this5.loading=false;_this5.childNodes=[];_this5.doCreateChildren(children,defaultProps);_this5.updateLeafState();if(callback){callback.call(_this5,children);}};this.store.load(this,resolve);}else{if(callback){callback.call(this);}}};_createClass(Node,[{key:'label',get:function get(){return getPropertyFromData(this,'label');}},{key:'key',get:function get(){var nodeKey=this.store.key;if(this.data)return this.data[nodeKey];return null;}},{key:'disabled',get:function get(){return getPropertyFromData(this,'disabled');}},{key:'nextSibling',get:function get(){var parent=this.parent;if(parent){var index=parent.childNodes.indexOf(this);if(index>-1){return parent.childNodes[index+1];}}return null;}},{key:'previousSibling',get:function get(){var parent=this.parent;if(parent){var index=parent.childNodes.indexOf(this);if(index>-1){return index>0?parent.childNodes[index-1]:null;}}return null;}}]);return Node;}();/* harmony default export */var model_node=node_Node;// CONCATENATED MODULE: ./packages/tree/src/model/tree-store.js
var tree_store_typeof=typeof Symbol==="function"&&_typeof2(Symbol.iterator)==="symbol"?function(obj){return _typeof2(obj);}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":_typeof2(obj);};function tree_store_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}var tree_store_TreeStore=function(){function TreeStore(options){var _this=this;tree_store_classCallCheck(this,TreeStore);this.currentNode=null;this.currentNodeKey=null;for(var option in options){if(options.hasOwnProperty(option)){this[option]=options[option];}}this.nodesMap={};this.root=new model_node({data:this.data,store:this});if(this.lazy&&this.load){var loadFn=this.load;loadFn(this.root,function(data){_this.root.doCreateChildren(data);_this._initDefaultCheckedNodes();});}else{this._initDefaultCheckedNodes();}}TreeStore.prototype.filter=function filter(value){var filterNodeMethod=this.filterNodeMethod;var lazy=this.lazy;var traverse=function traverse(node){var childNodes=node.root?node.root.childNodes:node.childNodes;childNodes.forEach(function(child){child.visible=filterNodeMethod.call(child,value,child.data,child);traverse(child);});if(!node.visible&&childNodes.length){var allHidden=true;allHidden=!childNodes.some(function(child){return child.visible;});if(node.root){node.root.visible=allHidden===false;}else{node.visible=allHidden===false;}}if(!value)return;if(node.visible&&!node.isLeaf&&!lazy)node.expand();};traverse(this);};TreeStore.prototype.setData=function setData(newVal){var instanceChanged=newVal!==this.root.data;if(instanceChanged){this.root.setData(newVal);this._initDefaultCheckedNodes();}else{this.root.updateChildren();}};TreeStore.prototype.getNode=function getNode(data){if(data instanceof model_node)return data;var key=(typeof data==='undefined'?'undefined':tree_store_typeof(data))!=='object'?data:util_getNodeKey(this.key,data);return this.nodesMap[key]||null;};TreeStore.prototype.insertBefore=function insertBefore(data,refData){var refNode=this.getNode(refData);refNode.parent.insertBefore({data:data},refNode);};TreeStore.prototype.insertAfter=function insertAfter(data,refData){var refNode=this.getNode(refData);refNode.parent.insertAfter({data:data},refNode);};TreeStore.prototype.remove=function remove(data){var node=this.getNode(data);if(node&&node.parent){if(node===this.currentNode){this.currentNode=null;}node.parent.removeChild(node);}};TreeStore.prototype.append=function append(data,parentData){var parentNode=parentData?this.getNode(parentData):this.root;if(parentNode){parentNode.insertChild({data:data});}};TreeStore.prototype._initDefaultCheckedNodes=function _initDefaultCheckedNodes(){var _this2=this;var defaultCheckedKeys=this.defaultCheckedKeys||[];var nodesMap=this.nodesMap;defaultCheckedKeys.forEach(function(checkedKey){var node=nodesMap[checkedKey];if(node){node.setChecked(true,!_this2.checkStrictly);}});};TreeStore.prototype._initDefaultCheckedNode=function _initDefaultCheckedNode(node){var defaultCheckedKeys=this.defaultCheckedKeys||[];if(defaultCheckedKeys.indexOf(node.key)!==-1){node.setChecked(true,!this.checkStrictly);}};TreeStore.prototype.setDefaultCheckedKey=function setDefaultCheckedKey(newVal){if(newVal!==this.defaultCheckedKeys){this.defaultCheckedKeys=newVal;this._initDefaultCheckedNodes();}};TreeStore.prototype.registerNode=function registerNode(node){var key=this.key;if(!key||!node||!node.data)return;var nodeKey=node.key;if(nodeKey!==undefined)this.nodesMap[node.key]=node;};TreeStore.prototype.deregisterNode=function deregisterNode(node){var _this3=this;var key=this.key;if(!key||!node||!node.data)return;node.childNodes.forEach(function(child){_this3.deregisterNode(child);});delete this.nodesMap[node.key];};TreeStore.prototype.getCheckedNodes=function getCheckedNodes(){var leafOnly=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;var includeHalfChecked=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var checkedNodes=[];var traverse=function traverse(node){var childNodes=node.root?node.root.childNodes:node.childNodes;childNodes.forEach(function(child){if((child.checked||includeHalfChecked&&child.indeterminate)&&(!leafOnly||leafOnly&&child.isLeaf)){checkedNodes.push(child.data);}traverse(child);});};traverse(this);return checkedNodes;};TreeStore.prototype.getCheckedKeys=function getCheckedKeys(){var _this4=this;var leafOnly=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;return this.getCheckedNodes(leafOnly).map(function(data){return(data||{})[_this4.key];});};TreeStore.prototype.getHalfCheckedNodes=function getHalfCheckedNodes(){var nodes=[];var traverse=function traverse(node){var childNodes=node.root?node.root.childNodes:node.childNodes;childNodes.forEach(function(child){if(child.indeterminate){nodes.push(child.data);}traverse(child);});};traverse(this);return nodes;};TreeStore.prototype.getHalfCheckedKeys=function getHalfCheckedKeys(){var _this5=this;return this.getHalfCheckedNodes().map(function(data){return(data||{})[_this5.key];});};TreeStore.prototype._getAllNodes=function _getAllNodes(){var allNodes=[];var nodesMap=this.nodesMap;for(var nodeKey in nodesMap){if(nodesMap.hasOwnProperty(nodeKey)){allNodes.push(nodesMap[nodeKey]);}}return allNodes;};TreeStore.prototype.updateChildren=function updateChildren(key,data){var node=this.nodesMap[key];if(!node)return;var childNodes=node.childNodes;for(var i=childNodes.length-1;i>=0;i--){var child=childNodes[i];this.remove(child.data);}for(var _i=0,j=data.length;_i<j;_i++){var _child=data[_i];this.append(_child,node.data);}};TreeStore.prototype._setCheckedKeys=function _setCheckedKeys(key){var leafOnly=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var checkedKeys=arguments[2];var allNodes=this._getAllNodes().sort(function(a,b){return b.level-a.level;});var cache=Object.create(null);var keys=Object.keys(checkedKeys);allNodes.forEach(function(node){return node.setChecked(false,false);});for(var i=0,j=allNodes.length;i<j;i++){var node=allNodes[i];var nodeKey=node.data[key].toString();var checked=keys.indexOf(nodeKey)>-1;if(!checked){if(node.checked&&!cache[nodeKey]){node.setChecked(false,false);}continue;}var parent=node.parent;while(parent&&parent.level>0){cache[parent.data[key]]=true;parent=parent.parent;}if(node.isLeaf||this.checkStrictly){node.setChecked(true,false);continue;}node.setChecked(true,true);if(leafOnly){(function(){node.setChecked(false,false);var traverse=function traverse(node){var childNodes=node.childNodes;childNodes.forEach(function(child){if(!child.isLeaf){child.setChecked(false,false);}traverse(child);});};traverse(node);})();}}};TreeStore.prototype.setCheckedNodes=function setCheckedNodes(array){var leafOnly=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var key=this.key;var checkedKeys={};array.forEach(function(item){checkedKeys[(item||{})[key]]=true;});this._setCheckedKeys(key,leafOnly,checkedKeys);};TreeStore.prototype.setCheckedKeys=function setCheckedKeys(keys){var leafOnly=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;this.defaultCheckedKeys=keys;var key=this.key;var checkedKeys={};keys.forEach(function(key){checkedKeys[key]=true;});this._setCheckedKeys(key,leafOnly,checkedKeys);};TreeStore.prototype.setDefaultExpandedKeys=function setDefaultExpandedKeys(keys){var _this6=this;keys=keys||[];this.defaultExpandedKeys=keys;keys.forEach(function(key){var node=_this6.getNode(key);if(node)node.expand(null,_this6.autoExpandParent);});};TreeStore.prototype.setChecked=function setChecked(data,checked,deep){var node=this.getNode(data);if(node){node.setChecked(!!checked,deep);}};TreeStore.prototype.getCurrentNode=function getCurrentNode(){return this.currentNode;};TreeStore.prototype.setCurrentNode=function setCurrentNode(currentNode){var prevCurrentNode=this.currentNode;if(prevCurrentNode){prevCurrentNode.isCurrent=false;}this.currentNode=currentNode;this.currentNode.isCurrent=true;};TreeStore.prototype.setUserCurrentNode=function setUserCurrentNode(node){var key=node[this.key];var currNode=this.nodesMap[key];this.setCurrentNode(currNode);};TreeStore.prototype.setCurrentNodeKey=function setCurrentNodeKey(key){if(key===null||key===undefined){this.currentNode&&(this.currentNode.isCurrent=false);this.currentNode=null;return;}var node=this.getNode(key);if(node){this.setCurrentNode(node);}};return TreeStore;}();/* harmony default export */var tree_store=tree_store_TreeStore;;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/tree-node.vue?vue&type=template&id=3ba3ef0e&
var tree_nodevue_type_template_id_3ba3ef0e_render=function tree_nodevue_type_template_id_3ba3ef0e_render(){var this$1=this;var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.node.visible,expression:"node.visible"}],ref:"node",staticClass:"el-tree-node",class:{"is-expanded":_vm.expanded,"is-current":_vm.node.isCurrent,"is-hidden":!_vm.node.visible,"is-focusable":!_vm.node.disabled,"is-checked":!_vm.node.disabled&&_vm.node.checked},attrs:{role:"treeitem",tabindex:"-1","aria-expanded":_vm.expanded,"aria-disabled":_vm.node.disabled,"aria-checked":_vm.node.checked,draggable:_vm.tree.draggable},on:{click:function click($event){$event.stopPropagation();return _vm.handleClick($event);},contextmenu:function contextmenu($event){return this$1.handleContextMenu($event);},dragstart:function dragstart($event){$event.stopPropagation();return _vm.handleDragStart($event);},dragover:function dragover($event){$event.stopPropagation();return _vm.handleDragOver($event);},dragend:function dragend($event){$event.stopPropagation();return _vm.handleDragEnd($event);},drop:function drop($event){$event.stopPropagation();return _vm.handleDrop($event);}}},[_c("div",{staticClass:"el-tree-node__content",style:{"padding-left":(_vm.node.level-1)*_vm.tree.indent+"px"}},[_c("span",{class:[{"is-leaf":_vm.node.isLeaf,expanded:!_vm.node.isLeaf&&_vm.expanded},"el-tree-node__expand-icon",_vm.tree.iconClass?_vm.tree.iconClass:"el-icon-caret-right"],on:{click:function click($event){$event.stopPropagation();return _vm.handleExpandIconClick($event);}}}),_vm.showCheckbox?_c("el-checkbox",{attrs:{indeterminate:_vm.node.indeterminate,disabled:!!_vm.node.disabled},on:{change:_vm.handleCheckChange},nativeOn:{click:function click($event){$event.stopPropagation();}},model:{value:_vm.node.checked,callback:function callback($$v){_vm.$set(_vm.node,"checked",$$v);},expression:"node.checked"}}):_vm._e(),_vm.node.loading?_c("span",{staticClass:"el-tree-node__loading-icon el-icon-loading"}):_vm._e(),_c("node-content",{attrs:{node:_vm.node}})],1),_c("el-collapse-transition",[!_vm.renderAfterExpand||_vm.childNodeRendered?_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.expanded,expression:"expanded"}],staticClass:"el-tree-node__children",attrs:{role:"group","aria-expanded":_vm.expanded}},_vm._l(_vm.node.childNodes,function(child){return _c("el-tree-node",{key:_vm.getNodeKey(child),attrs:{"render-content":_vm.renderContent,"render-after-expand":_vm.renderAfterExpand,"show-checkbox":_vm.showCheckbox,node:child},on:{"node-expand":_vm.handleChildNodeExpand}});}),1):_vm._e()])],1);};var tree_nodevue_type_template_id_3ba3ef0e_staticRenderFns=[];tree_nodevue_type_template_id_3ba3ef0e_render._withStripped=true;// CONCATENATED MODULE: ./packages/tree/src/tree-node.vue?vue&type=template&id=3ba3ef0e&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/tree-node.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var tree_nodevue_type_script_lang_js_={name:'ElTreeNode',componentName:'ElTreeNode',mixins:[emitter_default.a],props:{node:{default:function _default(){return{};}},props:{},renderContent:Function,renderAfterExpand:{type:Boolean,default:true},showCheckbox:{type:Boolean,default:false}},components:{ElCollapseTransition:collapse_transition_default.a,ElCheckbox:checkbox_default.a,NodeContent:{props:{node:{required:true}},render:function render(h){var parent=this.$parent;var tree=parent.tree;var node=this.node;var data=node.data,store=node.store;return parent.renderContent?parent.renderContent.call(parent._renderProxy,h,{_self:tree.$vnode.context,node:node,data:data,store:store}):tree.$scopedSlots.default?tree.$scopedSlots.default({node:node,data:data}):h('span',{'class':'el-tree-node__label'},[node.label]);}}},data:function data(){return{tree:null,expanded:false,childNodeRendered:false,oldChecked:null,oldIndeterminate:null};},watch:{'node.indeterminate':function nodeIndeterminate(val){this.handleSelectChange(this.node.checked,val);},'node.checked':function nodeChecked(val){this.handleSelectChange(val,this.node.indeterminate);},'node.expanded':function nodeExpanded(val){var _this=this;this.$nextTick(function(){return _this.expanded=val;});if(val){this.childNodeRendered=true;}}},methods:{getNodeKey:function getNodeKey(node){return util_getNodeKey(this.tree.nodeKey,node.data);},handleSelectChange:function handleSelectChange(checked,indeterminate){if(this.oldChecked!==checked&&this.oldIndeterminate!==indeterminate){this.tree.$emit('check-change',this.node.data,checked,indeterminate);}this.oldChecked=checked;this.indeterminate=indeterminate;},handleClick:function handleClick(){var store=this.tree.store;store.setCurrentNode(this.node);this.tree.$emit('current-change',store.currentNode?store.currentNode.data:null,store.currentNode);this.tree.currentNode=this;if(this.tree.expandOnClickNode){this.handleExpandIconClick();}if(this.tree.checkOnClickNode&&!this.node.disabled){this.handleCheckChange(null,{target:{checked:!this.node.checked}});}this.tree.$emit('node-click',this.node.data,this.node,this);},handleContextMenu:function handleContextMenu(event){if(this.tree._events['node-contextmenu']&&this.tree._events['node-contextmenu'].length>0){event.stopPropagation();event.preventDefault();}this.tree.$emit('node-contextmenu',event,this.node.data,this.node,this);},handleExpandIconClick:function handleExpandIconClick(){if(this.node.isLeaf)return;if(this.expanded){this.tree.$emit('node-collapse',this.node.data,this.node,this);this.node.collapse();}else{this.node.expand();this.$emit('node-expand',this.node.data,this.node,this);}},handleCheckChange:function handleCheckChange(value,ev){var _this2=this;this.node.setChecked(ev.target.checked,!this.tree.checkStrictly);this.$nextTick(function(){var store=_this2.tree.store;_this2.tree.$emit('check',_this2.node.data,{checkedNodes:store.getCheckedNodes(),checkedKeys:store.getCheckedKeys(),halfCheckedNodes:store.getHalfCheckedNodes(),halfCheckedKeys:store.getHalfCheckedKeys()});});},handleChildNodeExpand:function handleChildNodeExpand(nodeData,node,instance){this.broadcast('ElTreeNode','tree-node-expand',node);this.tree.$emit('node-expand',nodeData,node,instance);},handleDragStart:function handleDragStart(event){if(!this.tree.draggable)return;this.tree.$emit('tree-node-drag-start',event,this);},handleDragOver:function handleDragOver(event){if(!this.tree.draggable)return;this.tree.$emit('tree-node-drag-over',event,this);event.preventDefault();},handleDrop:function handleDrop(event){event.preventDefault();},handleDragEnd:function handleDragEnd(event){if(!this.tree.draggable)return;this.tree.$emit('tree-node-drag-end',event,this);}},created:function created(){var _this3=this;var parent=this.$parent;if(parent.isTree){this.tree=parent;}else{this.tree=parent.tree;}var tree=this.tree;if(!tree){console.warn('Can not find node\'s tree.');}var props=tree.props||{};var childrenKey=props['children']||'children';this.$watch('node.data.'+childrenKey,function(){_this3.node.updateChildren();});if(this.node.expanded){this.expanded=true;this.childNodeRendered=true;}if(this.tree.accordion){this.$on('tree-node-expand',function(node){if(_this3.node!==node){_this3.node.collapse();}});}}};// CONCATENATED MODULE: ./packages/tree/src/tree-node.vue?vue&type=script&lang=js&
/* harmony default export */var src_tree_nodevue_type_script_lang_js_=tree_nodevue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/tree/src/tree-node.vue
/* normalize component */var tree_node_component=normalizeComponent(src_tree_nodevue_type_script_lang_js_,tree_nodevue_type_template_id_3ba3ef0e_render,tree_nodevue_type_template_id_3ba3ef0e_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var tree_node_api; }tree_node_component.options.__file="packages/tree/src/tree-node.vue";/* harmony default export */var tree_node=tree_node_component.exports;// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/tree.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var treevue_type_script_lang_js_={name:'ElTree',mixins:[emitter_default.a],components:{ElTreeNode:tree_node},data:function data(){return{store:null,root:null,currentNode:null,treeItems:null,checkboxItems:[],dragState:{showDropIndicator:false,draggingNode:null,dropNode:null,allowDrop:true}};},props:{data:{type:Array},emptyText:{type:String,default:function _default(){return Object(lib_locale_["t"])('el.tree.emptyText');}},renderAfterExpand:{type:Boolean,default:true},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:true},checkOnClickNode:Boolean,checkDescendants:{type:Boolean,default:false},autoExpandParent:{type:Boolean,default:true},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:Function,showCheckbox:{type:Boolean,default:false},draggable:{type:Boolean,default:false},allowDrag:Function,allowDrop:Function,props:{default:function _default(){return{children:'children',label:'label',disabled:'disabled'};}},lazy:{type:Boolean,default:false},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},iconClass:String},computed:{children:{set:function set(value){this.data=value;},get:function get(){return this.data;}},treeItemArray:function treeItemArray(){return Array.prototype.slice.call(this.treeItems);},isEmpty:function isEmpty(){var childNodes=this.root.childNodes;return!childNodes||childNodes.length===0||childNodes.every(function(_ref){var visible=_ref.visible;return!visible;});}},watch:{defaultCheckedKeys:function defaultCheckedKeys(newVal){this.store.setDefaultCheckedKey(newVal);},defaultExpandedKeys:function defaultExpandedKeys(newVal){this.store.defaultExpandedKeys=newVal;this.store.setDefaultExpandedKeys(newVal);},data:function data(newVal){this.store.setData(newVal);},checkboxItems:function checkboxItems(val){Array.prototype.forEach.call(val,function(checkbox){checkbox.setAttribute('tabindex',-1);});},checkStrictly:function checkStrictly(newVal){this.store.checkStrictly=newVal;}},methods:{filter:function filter(value){if(!this.filterNodeMethod)throw new Error('[Tree] filterNodeMethod is required when filter');this.store.filter(value);},getNodeKey:function getNodeKey(node){return util_getNodeKey(this.nodeKey,node.data);},getNodePath:function getNodePath(data){if(!this.nodeKey)throw new Error('[Tree] nodeKey is required in getNodePath');var node=this.store.getNode(data);if(!node)return[];var path=[node.data];var parent=node.parent;while(parent&&parent!==this.root){path.push(parent.data);parent=parent.parent;}return path.reverse();},getCheckedNodes:function getCheckedNodes(leafOnly,includeHalfChecked){return this.store.getCheckedNodes(leafOnly,includeHalfChecked);},getCheckedKeys:function getCheckedKeys(leafOnly){return this.store.getCheckedKeys(leafOnly);},getCurrentNode:function getCurrentNode(){var currentNode=this.store.getCurrentNode();return currentNode?currentNode.data:null;},getCurrentKey:function getCurrentKey(){if(!this.nodeKey)throw new Error('[Tree] nodeKey is required in getCurrentKey');var currentNode=this.getCurrentNode();return currentNode?currentNode[this.nodeKey]:null;},setCheckedNodes:function setCheckedNodes(nodes,leafOnly){if(!this.nodeKey)throw new Error('[Tree] nodeKey is required in setCheckedNodes');this.store.setCheckedNodes(nodes,leafOnly);},setCheckedKeys:function setCheckedKeys(keys,leafOnly){if(!this.nodeKey)throw new Error('[Tree] nodeKey is required in setCheckedKeys');this.store.setCheckedKeys(keys,leafOnly);},setChecked:function setChecked(data,checked,deep){this.store.setChecked(data,checked,deep);},getHalfCheckedNodes:function getHalfCheckedNodes(){return this.store.getHalfCheckedNodes();},getHalfCheckedKeys:function getHalfCheckedKeys(){return this.store.getHalfCheckedKeys();},setCurrentNode:function setCurrentNode(node){if(!this.nodeKey)throw new Error('[Tree] nodeKey is required in setCurrentNode');this.store.setUserCurrentNode(node);},setCurrentKey:function setCurrentKey(key){if(!this.nodeKey)throw new Error('[Tree] nodeKey is required in setCurrentKey');this.store.setCurrentNodeKey(key);},getNode:function getNode(data){return this.store.getNode(data);},remove:function remove(data){this.store.remove(data);},append:function append(data,parentNode){this.store.append(data,parentNode);},insertBefore:function insertBefore(data,refNode){this.store.insertBefore(data,refNode);},insertAfter:function insertAfter(data,refNode){this.store.insertAfter(data,refNode);},handleNodeExpand:function handleNodeExpand(nodeData,node,instance){this.broadcast('ElTreeNode','tree-node-expand',node);this.$emit('node-expand',nodeData,node,instance);},updateKeyChildren:function updateKeyChildren(key,data){if(!this.nodeKey)throw new Error('[Tree] nodeKey is required in updateKeyChild');this.store.updateChildren(key,data);},initTabIndex:function initTabIndex(){this.treeItems=this.$el.querySelectorAll('.is-focusable[role=treeitem]');this.checkboxItems=this.$el.querySelectorAll('input[type=checkbox]');var checkedItem=this.$el.querySelectorAll('.is-checked[role=treeitem]');if(checkedItem.length){checkedItem[0].setAttribute('tabindex',0);return;}this.treeItems[0]&&this.treeItems[0].setAttribute('tabindex',0);},handleKeydown:function handleKeydown(ev){var currentItem=ev.target;if(currentItem.className.indexOf('el-tree-node')===-1)return;var keyCode=ev.keyCode;this.treeItems=this.$el.querySelectorAll('.is-focusable[role=treeitem]');var currentIndex=this.treeItemArray.indexOf(currentItem);var nextIndex=void 0;if([38,40].indexOf(keyCode)>-1){// up、down
ev.preventDefault();if(keyCode===38){// up
nextIndex=currentIndex!==0?currentIndex-1:0;}else{nextIndex=currentIndex<this.treeItemArray.length-1?currentIndex+1:0;}this.treeItemArray[nextIndex].focus();// 选中
}if([37,39].indexOf(keyCode)>-1){// left、right 展开
ev.preventDefault();currentItem.click();// 选中
}var hasInput=currentItem.querySelector('[type="checkbox"]');if([13,32].indexOf(keyCode)>-1&&hasInput){// space enter选中checkbox
ev.preventDefault();hasInput.click();}}},created:function created(){var _this=this;this.isTree=true;this.store=new tree_store({key:this.nodeKey,data:this.data,lazy:this.lazy,props:this.props,load:this.load,currentNodeKey:this.currentNodeKey,checkStrictly:this.checkStrictly,checkDescendants:this.checkDescendants,defaultCheckedKeys:this.defaultCheckedKeys,defaultExpandedKeys:this.defaultExpandedKeys,autoExpandParent:this.autoExpandParent,defaultExpandAll:this.defaultExpandAll,filterNodeMethod:this.filterNodeMethod});this.root=this.store.root;var dragState=this.dragState;this.$on('tree-node-drag-start',function(event,treeNode){if(typeof _this.allowDrag==='function'&&!_this.allowDrag(treeNode.node)){event.preventDefault();return false;}event.dataTransfer.effectAllowed='move';// wrap in try catch to address IE's error when first param is 'text/plain'
try{// setData is required for draggable to work in FireFox
// the content has to be '' so dragging a node out of the tree won't open a new tab in FireFox
event.dataTransfer.setData('text/plain','');}catch(e){}dragState.draggingNode=treeNode;_this.$emit('node-drag-start',treeNode.node,event);});this.$on('tree-node-drag-over',function(event,treeNode){var dropNode=findNearestComponent(event.target,'ElTreeNode');var oldDropNode=dragState.dropNode;if(oldDropNode&&oldDropNode!==dropNode){Object(dom_["removeClass"])(oldDropNode.$el,'is-drop-inner');}var draggingNode=dragState.draggingNode;if(!draggingNode||!dropNode)return;var dropPrev=true;var dropInner=true;var dropNext=true;var userAllowDropInner=true;if(typeof _this.allowDrop==='function'){dropPrev=_this.allowDrop(draggingNode.node,dropNode.node,'prev');userAllowDropInner=dropInner=_this.allowDrop(draggingNode.node,dropNode.node,'inner');dropNext=_this.allowDrop(draggingNode.node,dropNode.node,'next');}event.dataTransfer.dropEffect=dropInner?'move':'none';if((dropPrev||dropInner||dropNext)&&oldDropNode!==dropNode){if(oldDropNode){_this.$emit('node-drag-leave',draggingNode.node,oldDropNode.node,event);}_this.$emit('node-drag-enter',draggingNode.node,dropNode.node,event);}if(dropPrev||dropInner||dropNext){dragState.dropNode=dropNode;}if(dropNode.node.nextSibling===draggingNode.node){dropNext=false;}if(dropNode.node.previousSibling===draggingNode.node){dropPrev=false;}if(dropNode.node.contains(draggingNode.node,false)){dropInner=false;}if(draggingNode.node===dropNode.node||draggingNode.node.contains(dropNode.node)){dropPrev=false;dropInner=false;dropNext=false;}var targetPosition=dropNode.$el.getBoundingClientRect();var treePosition=_this.$el.getBoundingClientRect();var dropType=void 0;var prevPercent=dropPrev?dropInner?0.25:dropNext?0.45:1:-1;var nextPercent=dropNext?dropInner?0.75:dropPrev?0.55:0:1;var indicatorTop=-9999;var distance=event.clientY-targetPosition.top;if(distance<targetPosition.height*prevPercent){dropType='before';}else if(distance>targetPosition.height*nextPercent){dropType='after';}else if(dropInner){dropType='inner';}else{dropType='none';}var iconPosition=dropNode.$el.querySelector('.el-tree-node__expand-icon').getBoundingClientRect();var dropIndicator=_this.$refs.dropIndicator;if(dropType==='before'){indicatorTop=iconPosition.top-treePosition.top;}else if(dropType==='after'){indicatorTop=iconPosition.bottom-treePosition.top;}dropIndicator.style.top=indicatorTop+'px';dropIndicator.style.left=iconPosition.right-treePosition.left+'px';if(dropType==='inner'){Object(dom_["addClass"])(dropNode.$el,'is-drop-inner');}else{Object(dom_["removeClass"])(dropNode.$el,'is-drop-inner');}dragState.showDropIndicator=dropType==='before'||dropType==='after';dragState.allowDrop=dragState.showDropIndicator||userAllowDropInner;dragState.dropType=dropType;_this.$emit('node-drag-over',draggingNode.node,dropNode.node,event);});this.$on('tree-node-drag-end',function(event){var draggingNode=dragState.draggingNode,dropType=dragState.dropType,dropNode=dragState.dropNode;event.preventDefault();event.dataTransfer.dropEffect='move';if(draggingNode&&dropNode){var draggingNodeCopy={data:draggingNode.node.data};if(dropType!=='none'){draggingNode.node.remove();}if(dropType==='before'){dropNode.node.parent.insertBefore(draggingNodeCopy,dropNode.node);}else if(dropType==='after'){dropNode.node.parent.insertAfter(draggingNodeCopy,dropNode.node);}else if(dropType==='inner'){dropNode.node.insertChild(draggingNodeCopy);}if(dropType!=='none'){_this.store.registerNode(draggingNodeCopy);}Object(dom_["removeClass"])(dropNode.$el,'is-drop-inner');_this.$emit('node-drag-end',draggingNode.node,dropNode.node,dropType,event);if(dropType!=='none'){_this.$emit('node-drop',draggingNode.node,dropNode.node,dropType,event);}}if(draggingNode&&!dropNode){_this.$emit('node-drag-end',draggingNode.node,null,dropType,event);}dragState.showDropIndicator=false;dragState.draggingNode=null;dragState.dropNode=null;dragState.allowDrop=true;});},mounted:function mounted(){this.initTabIndex();this.$el.addEventListener('keydown',this.handleKeydown);},updated:function updated(){this.treeItems=this.$el.querySelectorAll('[role=treeitem]');this.checkboxItems=this.$el.querySelectorAll('input[type=checkbox]');}};// CONCATENATED MODULE: ./packages/tree/src/tree.vue?vue&type=script&lang=js&
/* harmony default export */var src_treevue_type_script_lang_js_=treevue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/tree/src/tree.vue
/* normalize component */var tree_component=normalizeComponent(src_treevue_type_script_lang_js_,treevue_type_template_id_547575a6_render,treevue_type_template_id_547575a6_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var tree_api; }tree_component.options.__file="packages/tree/src/tree.vue";/* harmony default export */var src_tree=tree_component.exports;// CONCATENATED MODULE: ./packages/tree/index.js
/* istanbul ignore next */src_tree.install=function(Vue){Vue.component(src_tree.name,src_tree);};/* harmony default export */var packages_tree=src_tree;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/alert/src/main.vue?vue&type=template&id=6e53341b&
var mainvue_type_template_id_6e53341b_render=function mainvue_type_template_id_6e53341b_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("transition",{attrs:{name:"el-alert-fade"}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.visible,expression:"visible"}],staticClass:"el-alert",class:[_vm.typeClass,_vm.center?"is-center":"","is-"+_vm.effect],attrs:{role:"alert"}},[_vm.showIcon?_c("i",{staticClass:"el-alert__icon",class:[_vm.iconClass,_vm.isBigIcon]}):_vm._e(),_c("div",{staticClass:"el-alert__content"},[_vm.title||_vm.$slots.title?_c("span",{staticClass:"el-alert__title",class:[_vm.isBoldTitle]},[_vm._t("title",[_vm._v(_vm._s(_vm.title))])],2):_vm._e(),_vm.$slots.default&&!_vm.description?_c("p",{staticClass:"el-alert__description"},[_vm._t("default")],2):_vm._e(),_vm.description&&!_vm.$slots.default?_c("p",{staticClass:"el-alert__description"},[_vm._v(_vm._s(_vm.description))]):_vm._e(),_c("i",{directives:[{name:"show",rawName:"v-show",value:_vm.closable,expression:"closable"}],staticClass:"el-alert__closebtn",class:{"is-customed":_vm.closeText!=="","el-icon-close":_vm.closeText===""},on:{click:function click($event){_vm.close();}}},[_vm._v(_vm._s(_vm.closeText))])])])]);};var mainvue_type_template_id_6e53341b_staticRenderFns=[];mainvue_type_template_id_6e53341b_render._withStripped=true;// CONCATENATED MODULE: ./packages/alert/src/main.vue?vue&type=template&id=6e53341b&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/alert/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var TYPE_CLASSES_MAP={'success':'el-icon-success','warning':'el-icon-warning','error':'el-icon-error'};/* harmony default export */var alert_src_mainvue_type_script_lang_js_={name:'ElAlert',props:{title:{type:String,default:''},description:{type:String,default:''},type:{type:String,default:'info'},closable:{type:Boolean,default:true},closeText:{type:String,default:''},showIcon:Boolean,center:Boolean,effect:{type:String,default:'light',validator:function validator(value){return['light','dark'].indexOf(value)!==-1;}}},data:function data(){return{visible:true};},methods:{close:function close(){this.visible=false;this.$emit('close');}},computed:{typeClass:function typeClass(){return'el-alert--'+this.type;},iconClass:function iconClass(){return TYPE_CLASSES_MAP[this.type]||'el-icon-info';},isBigIcon:function isBigIcon(){return this.description||this.$slots.default?'is-big':'';},isBoldTitle:function isBoldTitle(){return this.description||this.$slots.default?'is-bold':'';}}};// CONCATENATED MODULE: ./packages/alert/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_alert_src_mainvue_type_script_lang_js_=alert_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/alert/src/main.vue
/* normalize component */var alert_src_main_component=normalizeComponent(packages_alert_src_mainvue_type_script_lang_js_,mainvue_type_template_id_6e53341b_render,mainvue_type_template_id_6e53341b_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var alert_src_main_api; }alert_src_main_component.options.__file="packages/alert/src/main.vue";/* harmony default export */var alert_src_main=alert_src_main_component.exports;// CONCATENATED MODULE: ./packages/alert/index.js
/* istanbul ignore next */alert_src_main.install=function(Vue){Vue.component(alert_src_main.name,alert_src_main);};/* harmony default export */var packages_alert=alert_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/notification/src/main.vue?vue&type=template&id=43dbc3d8&
var mainvue_type_template_id_43dbc3d8_render=function mainvue_type_template_id_43dbc3d8_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("transition",{attrs:{name:"el-notification-fade"}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.visible,expression:"visible"}],class:["el-notification",_vm.customClass,_vm.horizontalClass],style:_vm.positionStyle,attrs:{role:"alert"},on:{mouseenter:function mouseenter($event){_vm.clearTimer();},mouseleave:function mouseleave($event){_vm.startTimer();},click:_vm.click}},[_vm.type||_vm.iconClass?_c("i",{staticClass:"el-notification__icon",class:[_vm.typeClass,_vm.iconClass]}):_vm._e(),_c("div",{staticClass:"el-notification__group",class:{"is-with-icon":_vm.typeClass||_vm.iconClass}},[_c("h2",{staticClass:"el-notification__title",domProps:{textContent:_vm._s(_vm.title)}}),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.message,expression:"message"}],staticClass:"el-notification__content"},[_vm._t("default",[!_vm.dangerouslyUseHTMLString?_c("p",[_vm._v(_vm._s(_vm.message))]):_c("p",{domProps:{innerHTML:_vm._s(_vm.message)}})])],2),_vm.showClose?_c("div",{staticClass:"el-notification__closeBtn el-icon-close",on:{click:function click($event){$event.stopPropagation();return _vm.close($event);}}}):_vm._e()])])]);};var mainvue_type_template_id_43dbc3d8_staticRenderFns=[];mainvue_type_template_id_43dbc3d8_render._withStripped=true;// CONCATENATED MODULE: ./packages/notification/src/main.vue?vue&type=template&id=43dbc3d8&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/notification/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var mainvue_type_script_lang_js_typeMap={success:'success',info:'info',warning:'warning',error:'error'};/* harmony default export */var notification_src_mainvue_type_script_lang_js_={data:function data(){return{visible:false,title:'',message:'',duration:4500,type:'',showClose:true,customClass:'',iconClass:'',onClose:null,onClick:null,closed:false,verticalOffset:0,timer:null,dangerouslyUseHTMLString:false,position:'top-right'};},computed:{typeClass:function typeClass(){return this.type&&mainvue_type_script_lang_js_typeMap[this.type]?'el-icon-'+mainvue_type_script_lang_js_typeMap[this.type]:'';},horizontalClass:function horizontalClass(){return this.position.indexOf('right')>-1?'right':'left';},verticalProperty:function verticalProperty(){return /^top-/.test(this.position)?'top':'bottom';},positionStyle:function positionStyle(){var _ref;return _ref={},_ref[this.verticalProperty]=this.verticalOffset+'px',_ref;}},watch:{closed:function closed(newVal){if(newVal){this.visible=false;this.$el.addEventListener('transitionend',this.destroyElement);}}},methods:{destroyElement:function destroyElement(){this.$el.removeEventListener('transitionend',this.destroyElement);this.$destroy(true);this.$el.parentNode.removeChild(this.$el);},click:function click(){if(typeof this.onClick==='function'){this.onClick();}},close:function close(){this.closed=true;if(typeof this.onClose==='function'){this.onClose();}},clearTimer:function clearTimer(){clearTimeout(this.timer);},startTimer:function startTimer(){var _this=this;if(this.duration>0){this.timer=setTimeout(function(){if(!_this.closed){_this.close();}},this.duration);}},keydown:function keydown(e){if(e.keyCode===46||e.keyCode===8){this.clearTimer();// detele 取消倒计时
}else if(e.keyCode===27){// esc关闭消息
if(!this.closed){this.close();}}else{this.startTimer();// 恢复倒计时
}}},mounted:function mounted(){var _this2=this;if(this.duration>0){this.timer=setTimeout(function(){if(!_this2.closed){_this2.close();}},this.duration);}document.addEventListener('keydown',this.keydown);},beforeDestroy:function beforeDestroy(){document.removeEventListener('keydown',this.keydown);}};// CONCATENATED MODULE: ./packages/notification/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_notification_src_mainvue_type_script_lang_js_=notification_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/notification/src/main.vue
/* normalize component */var notification_src_main_component=normalizeComponent(packages_notification_src_mainvue_type_script_lang_js_,mainvue_type_template_id_43dbc3d8_render,mainvue_type_template_id_43dbc3d8_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var notification_src_main_api; }notification_src_main_component.options.__file="packages/notification/src/main.vue";/* harmony default export */var notification_src_main=notification_src_main_component.exports;// CONCATENATED MODULE: ./packages/notification/src/main.js
var NotificationConstructor=external_vue_default.a.extend(notification_src_main);var src_main_instance=void 0;var instances=[];var seed=1;var main_Notification=function Notification(options){if(external_vue_default.a.prototype.$isServer)return;options=merge_default()({},options);var userOnClose=options.onClose;var id='notification_'+seed++;var position=options.position||'top-right';options.onClose=function(){Notification.close(id,userOnClose);};src_main_instance=new NotificationConstructor({data:options});if(Object(vdom_["isVNode"])(options.message)){src_main_instance.$slots.default=[options.message];options.message='REPLACED_BY_VNODE';}src_main_instance.id=id;src_main_instance.$mount();document.body.appendChild(src_main_instance.$el);src_main_instance.visible=true;src_main_instance.dom=src_main_instance.$el;src_main_instance.dom.style.zIndex=popup_["PopupManager"].nextZIndex();var verticalOffset=options.offset||0;instances.filter(function(item){return item.position===position;}).forEach(function(item){verticalOffset+=item.$el.offsetHeight+16;});verticalOffset+=16;src_main_instance.verticalOffset=verticalOffset;instances.push(src_main_instance);return src_main_instance;};['success','warning','info','error'].forEach(function(type){main_Notification[type]=function(options){if(typeof options==='string'||Object(vdom_["isVNode"])(options)){options={message:options};}options.type=type;return main_Notification(options);};});main_Notification.close=function(id,userOnClose){var index=-1;var len=instances.length;var instance=instances.filter(function(instance,i){if(instance.id===id){index=i;return true;}return false;})[0];if(!instance)return;if(typeof userOnClose==='function'){userOnClose(instance);}instances.splice(index,1);if(len<=1)return;var position=instance.position;var removedHeight=instance.dom.offsetHeight;for(var i=index;i<len-1;i++){if(instances[i].position===position){instances[i].dom.style[instance.verticalProperty]=parseInt(instances[i].dom.style[instance.verticalProperty],10)-removedHeight-16+'px';}}};main_Notification.closeAll=function(){for(var i=instances.length-1;i>=0;i--){instances[i].close();}};/* harmony default export */var packages_notification_src_main=main_Notification;// CONCATENATED MODULE: ./packages/notification/index.js
/* harmony default export */var notification=packages_notification_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/slider/src/main.vue?vue&type=template&id=32708644&
var mainvue_type_template_id_32708644_render=function mainvue_type_template_id_32708644_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-slider",class:{"is-vertical":_vm.vertical,"el-slider--with-input":_vm.showInput},attrs:{role:"slider","aria-valuemin":_vm.min,"aria-valuemax":_vm.max,"aria-orientation":_vm.vertical?"vertical":"horizontal","aria-disabled":_vm.sliderDisabled}},[_vm.showInput&&!_vm.range?_c("el-input-number",{ref:"input",staticClass:"el-slider__input",attrs:{step:_vm.step,disabled:_vm.sliderDisabled,controls:_vm.showInputControls,min:_vm.min,max:_vm.max,debounce:_vm.debounce,size:_vm.inputSize},on:{change:_vm.emitChange},model:{value:_vm.firstValue,callback:function callback($$v){_vm.firstValue=$$v;},expression:"firstValue"}}):_vm._e(),_c("div",{ref:"slider",staticClass:"el-slider__runway",class:{"show-input":_vm.showInput,disabled:_vm.sliderDisabled},style:_vm.runwayStyle,on:{click:_vm.onSliderClick}},[_c("div",{staticClass:"el-slider__bar",style:_vm.barStyle}),_c("slider-button",{ref:"button1",attrs:{vertical:_vm.vertical,"tooltip-class":_vm.tooltipClass},model:{value:_vm.firstValue,callback:function callback($$v){_vm.firstValue=$$v;},expression:"firstValue"}}),_vm.range?_c("slider-button",{ref:"button2",attrs:{vertical:_vm.vertical,"tooltip-class":_vm.tooltipClass},model:{value:_vm.secondValue,callback:function callback($$v){_vm.secondValue=$$v;},expression:"secondValue"}}):_vm._e(),_vm._l(_vm.stops,function(item,key){return _vm.showStops?_c("div",{key:key,staticClass:"el-slider__stop",style:_vm.getStopStyle(item)}):_vm._e();}),_vm.markList.length>0?[_c("div",_vm._l(_vm.markList,function(item,key){return _c("div",{key:key,staticClass:"el-slider__stop el-slider__marks-stop",style:_vm.getStopStyle(item.position)});}),0),_c("div",{staticClass:"el-slider__marks"},_vm._l(_vm.markList,function(item,key){return _c("slider-marker",{key:key,style:_vm.getStopStyle(item.position),attrs:{mark:item.mark}});}),1)]:_vm._e()],2)],1);};var mainvue_type_template_id_32708644_staticRenderFns=[];mainvue_type_template_id_32708644_render._withStripped=true;// CONCATENATED MODULE: ./packages/slider/src/main.vue?vue&type=template&id=32708644&
// EXTERNAL MODULE: external "element-ui/lib/input-number"
var input_number_=__webpack_require__(41);var input_number_default=/*#__PURE__*/__webpack_require__.n(input_number_);// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/slider/src/button.vue?vue&type=template&id=e72d2ad2&
var buttonvue_type_template_id_e72d2ad2_render=function buttonvue_type_template_id_e72d2ad2_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{ref:"button",staticClass:"el-slider__button-wrapper",class:{hover:_vm.hovering,dragging:_vm.dragging},style:_vm.wrapperStyle,attrs:{tabindex:"0"},on:{mouseenter:_vm.handleMouseEnter,mouseleave:_vm.handleMouseLeave,mousedown:_vm.onButtonDown,touchstart:_vm.onButtonDown,focus:_vm.handleMouseEnter,blur:_vm.handleMouseLeave,keydown:[function($event){if(!("button"in $event)&&_vm._k($event.keyCode,"left",37,$event.key,["Left","ArrowLeft"])){return null;}if("button"in $event&&$event.button!==0){return null;}return _vm.onLeftKeyDown($event);},function($event){if(!("button"in $event)&&_vm._k($event.keyCode,"right",39,$event.key,["Right","ArrowRight"])){return null;}if("button"in $event&&$event.button!==2){return null;}return _vm.onRightKeyDown($event);},function($event){if(!("button"in $event)&&_vm._k($event.keyCode,"down",40,$event.key,["Down","ArrowDown"])){return null;}$event.preventDefault();return _vm.onLeftKeyDown($event);},function($event){if(!("button"in $event)&&_vm._k($event.keyCode,"up",38,$event.key,["Up","ArrowUp"])){return null;}$event.preventDefault();return _vm.onRightKeyDown($event);}]}},[_c("el-tooltip",{ref:"tooltip",attrs:{placement:"top","popper-class":_vm.tooltipClass,disabled:!_vm.showTooltip}},[_c("span",{attrs:{slot:"content"},slot:"content"},[_vm._v(_vm._s(_vm.formatValue))]),_c("div",{staticClass:"el-slider__button",class:{hover:_vm.hovering,dragging:_vm.dragging}})])],1);};var buttonvue_type_template_id_e72d2ad2_staticRenderFns=[];buttonvue_type_template_id_e72d2ad2_render._withStripped=true;// CONCATENATED MODULE: ./packages/slider/src/button.vue?vue&type=template&id=e72d2ad2&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/slider/src/button.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var slider_src_buttonvue_type_script_lang_js_={name:'ElSliderButton',components:{ElTooltip:tooltip_default.a},props:{value:{type:Number,default:0},vertical:{type:Boolean,default:false},tooltipClass:String},data:function data(){return{hovering:false,dragging:false,isClick:false,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:null,oldValue:this.value};},computed:{disabled:function disabled(){return this.$parent.sliderDisabled;},max:function max(){return this.$parent.max;},min:function min(){return this.$parent.min;},step:function step(){return this.$parent.step;},showTooltip:function showTooltip(){return this.$parent.showTooltip;},precision:function precision(){return this.$parent.precision;},currentPosition:function currentPosition(){return(this.value-this.min)/(this.max-this.min)*100+'%';},enableFormat:function enableFormat(){return this.$parent.formatTooltip instanceof Function;},formatValue:function formatValue(){return this.enableFormat&&this.$parent.formatTooltip(this.value)||this.value;},wrapperStyle:function wrapperStyle(){return this.vertical?{bottom:this.currentPosition}:{left:this.currentPosition};}},watch:{dragging:function dragging(val){this.$parent.dragging=val;}},methods:{displayTooltip:function displayTooltip(){this.$refs.tooltip&&(this.$refs.tooltip.showPopper=true);},hideTooltip:function hideTooltip(){this.$refs.tooltip&&(this.$refs.tooltip.showPopper=false);},handleMouseEnter:function handleMouseEnter(){this.hovering=true;this.displayTooltip();},handleMouseLeave:function handleMouseLeave(){this.hovering=false;this.hideTooltip();},onButtonDown:function onButtonDown(event){if(this.disabled)return;event.preventDefault();this.onDragStart(event);window.addEventListener('mousemove',this.onDragging);window.addEventListener('touchmove',this.onDragging);window.addEventListener('mouseup',this.onDragEnd);window.addEventListener('touchend',this.onDragEnd);window.addEventListener('contextmenu',this.onDragEnd);},onLeftKeyDown:function onLeftKeyDown(){if(this.disabled)return;this.newPosition=parseFloat(this.currentPosition)-this.step/(this.max-this.min)*100;this.setPosition(this.newPosition);this.$parent.emitChange();},onRightKeyDown:function onRightKeyDown(){if(this.disabled)return;this.newPosition=parseFloat(this.currentPosition)+this.step/(this.max-this.min)*100;this.setPosition(this.newPosition);this.$parent.emitChange();},onDragStart:function onDragStart(event){this.dragging=true;this.isClick=true;if(event.type==='touchstart'){event.clientY=event.touches[0].clientY;event.clientX=event.touches[0].clientX;}if(this.vertical){this.startY=event.clientY;}else{this.startX=event.clientX;}this.startPosition=parseFloat(this.currentPosition);this.newPosition=this.startPosition;},onDragging:function onDragging(event){if(this.dragging){this.isClick=false;this.displayTooltip();this.$parent.resetSize();var diff=0;if(event.type==='touchmove'){event.clientY=event.touches[0].clientY;event.clientX=event.touches[0].clientX;}if(this.vertical){this.currentY=event.clientY;diff=(this.startY-this.currentY)/this.$parent.sliderSize*100;}else{this.currentX=event.clientX;diff=(this.currentX-this.startX)/this.$parent.sliderSize*100;}this.newPosition=this.startPosition+diff;this.setPosition(this.newPosition);}},onDragEnd:function onDragEnd(){var _this=this;if(this.dragging){/*
         * 防止在 mouseup 后立即触发 click，导致滑块有几率产生一小段位移
         * 不使用 preventDefault 是因为 mouseup 和 click 没有注册在同一个 DOM 上
         */setTimeout(function(){_this.dragging=false;_this.hideTooltip();if(!_this.isClick){_this.setPosition(_this.newPosition);_this.$parent.emitChange();}},0);window.removeEventListener('mousemove',this.onDragging);window.removeEventListener('touchmove',this.onDragging);window.removeEventListener('mouseup',this.onDragEnd);window.removeEventListener('touchend',this.onDragEnd);window.removeEventListener('contextmenu',this.onDragEnd);}},setPosition:function setPosition(newPosition){var _this2=this;if(newPosition===null||isNaN(newPosition))return;if(newPosition<0){newPosition=0;}else if(newPosition>100){newPosition=100;}var lengthPerStep=100/((this.max-this.min)/this.step);var steps=Math.round(newPosition/lengthPerStep);var value=steps*lengthPerStep*(this.max-this.min)*0.01+this.min;value=parseFloat(value.toFixed(this.precision));this.$emit('input',value);this.$nextTick(function(){_this2.displayTooltip();_this2.$refs.tooltip&&_this2.$refs.tooltip.updatePopper();});if(!this.dragging&&this.value!==this.oldValue){this.oldValue=this.value;}}}};// CONCATENATED MODULE: ./packages/slider/src/button.vue?vue&type=script&lang=js&
/* harmony default export */var packages_slider_src_buttonvue_type_script_lang_js_=slider_src_buttonvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/slider/src/button.vue
/* normalize component */var src_button_component=normalizeComponent(packages_slider_src_buttonvue_type_script_lang_js_,buttonvue_type_template_id_e72d2ad2_render,buttonvue_type_template_id_e72d2ad2_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var src_button_api; }src_button_component.options.__file="packages/slider/src/button.vue";/* harmony default export */var slider_src_button=src_button_component.exports;// CONCATENATED MODULE: ./packages/slider/src/marker.js
/* harmony default export */var marker={name:'ElMarker',props:{mark:{type:[String,Object]}},render:function render(){var h=arguments[0];var label=typeof this.mark==='string'?this.mark:this.mark.label;return h('div',{'class':'el-slider__marks-text',style:this.mark.style||{}},[label]);}};// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/slider/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var slider_src_mainvue_type_script_lang_js_={name:'ElSlider',mixins:[emitter_default.a],inject:{elForm:{default:''}},props:{min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},value:{type:[Number,Array],default:0},showInput:{type:Boolean,default:false},showInputControls:{type:Boolean,default:true},inputSize:{type:String,default:'small'},showStops:{type:Boolean,default:false},showTooltip:{type:Boolean,default:true},formatTooltip:Function,disabled:{type:Boolean,default:false},range:{type:Boolean,default:false},vertical:{type:Boolean,default:false},height:{type:String},debounce:{type:Number,default:300},label:{type:String},tooltipClass:String,marks:Object},components:{ElInputNumber:input_number_default.a,SliderButton:slider_src_button,SliderMarker:marker},data:function data(){return{firstValue:null,secondValue:null,oldValue:null,dragging:false,sliderSize:1};},watch:{value:function value(val,oldVal){if(this.dragging||Array.isArray(val)&&Array.isArray(oldVal)&&val.every(function(item,index){return item===oldVal[index];})){return;}this.setValues();},dragging:function dragging(val){if(!val){this.setValues();}},firstValue:function firstValue(val){if(this.range){this.$emit('input',[this.minValue,this.maxValue]);}else{this.$emit('input',val);}},secondValue:function secondValue(){if(this.range){this.$emit('input',[this.minValue,this.maxValue]);}},min:function min(){this.setValues();},max:function max(){this.setValues();}},methods:{valueChanged:function valueChanged(){var _this=this;if(this.range){return![this.minValue,this.maxValue].every(function(item,index){return item===_this.oldValue[index];});}else{return this.value!==this.oldValue;}},setValues:function setValues(){if(this.min>this.max){console.error('[Element Error][Slider]min should not be greater than max.');return;}var val=this.value;if(this.range&&Array.isArray(val)){if(val[1]<this.min){this.$emit('input',[this.min,this.min]);}else if(val[0]>this.max){this.$emit('input',[this.max,this.max]);}else if(val[0]<this.min){this.$emit('input',[this.min,val[1]]);}else if(val[1]>this.max){this.$emit('input',[val[0],this.max]);}else{this.firstValue=val[0];this.secondValue=val[1];if(this.valueChanged()){this.dispatch('ElFormItem','el.form.change',[this.minValue,this.maxValue]);this.oldValue=val.slice();}}}else if(!this.range&&typeof val==='number'&&!isNaN(val)){if(val<this.min){this.$emit('input',this.min);}else if(val>this.max){this.$emit('input',this.max);}else{this.firstValue=val;if(this.valueChanged()){this.dispatch('ElFormItem','el.form.change',val);this.oldValue=val;}}}},setPosition:function setPosition(percent){var targetValue=this.min+percent*(this.max-this.min)/100;if(!this.range){this.$refs.button1.setPosition(percent);return;}var button=void 0;if(Math.abs(this.minValue-targetValue)<Math.abs(this.maxValue-targetValue)){button=this.firstValue<this.secondValue?'button1':'button2';}else{button=this.firstValue>this.secondValue?'button1':'button2';}this.$refs[button].setPosition(percent);},onSliderClick:function onSliderClick(event){if(this.sliderDisabled||this.dragging)return;this.resetSize();if(this.vertical){var sliderOffsetBottom=this.$refs.slider.getBoundingClientRect().bottom;this.setPosition((sliderOffsetBottom-event.clientY)/this.sliderSize*100);}else{var sliderOffsetLeft=this.$refs.slider.getBoundingClientRect().left;this.setPosition((event.clientX-sliderOffsetLeft)/this.sliderSize*100);}this.emitChange();},resetSize:function resetSize(){if(this.$refs.slider){this.sliderSize=this.$refs.slider['client'+(this.vertical?'Height':'Width')];}},emitChange:function emitChange(){var _this2=this;this.$nextTick(function(){_this2.$emit('change',_this2.range?[_this2.minValue,_this2.maxValue]:_this2.value);});},getStopStyle:function getStopStyle(position){return this.vertical?{'bottom':position+'%'}:{'left':position+'%'};}},computed:{stops:function stops(){var _this3=this;if(!this.showStops||this.min>this.max)return[];if(this.step===0){ false&&false;return[];}var stopCount=(this.max-this.min)/this.step;var stepWidth=100*this.step/(this.max-this.min);var result=[];for(var i=1;i<stopCount;i++){result.push(i*stepWidth);}if(this.range){return result.filter(function(step){return step<100*(_this3.minValue-_this3.min)/(_this3.max-_this3.min)||step>100*(_this3.maxValue-_this3.min)/(_this3.max-_this3.min);});}else{return result.filter(function(step){return step>100*(_this3.firstValue-_this3.min)/(_this3.max-_this3.min);});}},markList:function markList(){var _this4=this;if(!this.marks){return[];}var marksKeys=Object.keys(this.marks);return marksKeys.map(parseFloat).sort(function(a,b){return a-b;}).filter(function(point){return point<=_this4.max&&point>=_this4.min;}).map(function(point){return{point:point,position:(point-_this4.min)*100/(_this4.max-_this4.min),mark:_this4.marks[point]};});},minValue:function minValue(){return Math.min(this.firstValue,this.secondValue);},maxValue:function maxValue(){return Math.max(this.firstValue,this.secondValue);},barSize:function barSize(){return this.range?100*(this.maxValue-this.minValue)/(this.max-this.min)+'%':100*(this.firstValue-this.min)/(this.max-this.min)+'%';},barStart:function barStart(){return this.range?100*(this.minValue-this.min)/(this.max-this.min)+'%':'0%';},precision:function precision(){var precisions=[this.min,this.max,this.step].map(function(item){var decimal=(''+item).split('.')[1];return decimal?decimal.length:0;});return Math.max.apply(null,precisions);},runwayStyle:function runwayStyle(){return this.vertical?{height:this.height}:{};},barStyle:function barStyle(){return this.vertical?{height:this.barSize,bottom:this.barStart}:{width:this.barSize,left:this.barStart};},sliderDisabled:function sliderDisabled(){return this.disabled||(this.elForm||{}).disabled;}},mounted:function mounted(){var valuetext=void 0;if(this.range){if(Array.isArray(this.value)){this.firstValue=Math.max(this.min,this.value[0]);this.secondValue=Math.min(this.max,this.value[1]);}else{this.firstValue=this.min;this.secondValue=this.max;}this.oldValue=[this.firstValue,this.secondValue];valuetext=this.firstValue+'-'+this.secondValue;}else{if(typeof this.value!=='number'||isNaN(this.value)){this.firstValue=this.min;}else{this.firstValue=Math.min(this.max,Math.max(this.min,this.value));}this.oldValue=this.firstValue;valuetext=this.firstValue;}this.$el.setAttribute('aria-valuetext',valuetext);// label screen reader
this.$el.setAttribute('aria-label',this.label?this.label:'slider between '+this.min+' and '+this.max);this.resetSize();window.addEventListener('resize',this.resetSize);},beforeDestroy:function beforeDestroy(){window.removeEventListener('resize',this.resetSize);}};// CONCATENATED MODULE: ./packages/slider/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_slider_src_mainvue_type_script_lang_js_=slider_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/slider/src/main.vue
/* normalize component */var slider_src_main_component=normalizeComponent(packages_slider_src_mainvue_type_script_lang_js_,mainvue_type_template_id_32708644_render,mainvue_type_template_id_32708644_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var slider_src_main_api; }slider_src_main_component.options.__file="packages/slider/src/main.vue";/* harmony default export */var slider_src_main=slider_src_main_component.exports;// CONCATENATED MODULE: ./packages/slider/index.js
/* istanbul ignore next */slider_src_main.install=function(Vue){Vue.component(slider_src_main.name,slider_src_main);};/* harmony default export */var slider=slider_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/loading/src/loading.vue?vue&type=template&id=eee0a7ac&
var loadingvue_type_template_id_eee0a7ac_render=function loadingvue_type_template_id_eee0a7ac_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("transition",{attrs:{name:"el-loading-fade"},on:{"after-leave":_vm.handleAfterLeave}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.visible,expression:"visible"}],staticClass:"el-loading-mask",class:[_vm.customClass,{"is-fullscreen":_vm.fullscreen}],style:{backgroundColor:_vm.background||""}},[_c("div",{staticClass:"el-loading-spinner"},[!_vm.spinner?_c("svg",{staticClass:"circular",attrs:{viewBox:"25 25 50 50"}},[_c("circle",{staticClass:"path",attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})]):_c("i",{class:_vm.spinner}),_vm.text?_c("p",{staticClass:"el-loading-text"},[_vm._v(_vm._s(_vm.text))]):_vm._e()])])]);};var loadingvue_type_template_id_eee0a7ac_staticRenderFns=[];loadingvue_type_template_id_eee0a7ac_render._withStripped=true;// CONCATENATED MODULE: ./packages/loading/src/loading.vue?vue&type=template&id=eee0a7ac&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/loading/src/loading.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var loadingvue_type_script_lang_js_={data:function data(){return{text:null,spinner:null,background:null,fullscreen:true,visible:false,customClass:''};},methods:{handleAfterLeave:function handleAfterLeave(){this.$emit('after-leave');},setText:function setText(text){this.text=text;}}};// CONCATENATED MODULE: ./packages/loading/src/loading.vue?vue&type=script&lang=js&
/* harmony default export */var src_loadingvue_type_script_lang_js_=loadingvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/loading/src/loading.vue
/* normalize component */var loading_component=normalizeComponent(src_loadingvue_type_script_lang_js_,loadingvue_type_template_id_eee0a7ac_render,loadingvue_type_template_id_eee0a7ac_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var loading_api; }loading_component.options.__file="packages/loading/src/loading.vue";/* harmony default export */var loading=loading_component.exports;// EXTERNAL MODULE: external "element-ui/lib/utils/after-leave"
var after_leave_=__webpack_require__(33);var after_leave_default=/*#__PURE__*/__webpack_require__.n(after_leave_);// CONCATENATED MODULE: ./packages/loading/src/directive.js
var Mask=external_vue_default.a.extend(loading);var loadingDirective={};loadingDirective.install=function(Vue){if(Vue.prototype.$isServer)return;var toggleLoading=function toggleLoading(el,binding){if(binding.value){Vue.nextTick(function(){if(binding.modifiers.fullscreen){el.originalPosition=Object(dom_["getStyle"])(document.body,'position');el.originalOverflow=Object(dom_["getStyle"])(document.body,'overflow');el.maskStyle.zIndex=popup_["PopupManager"].nextZIndex();Object(dom_["addClass"])(el.mask,'is-fullscreen');insertDom(document.body,el,binding);}else{Object(dom_["removeClass"])(el.mask,'is-fullscreen');if(binding.modifiers.body){el.originalPosition=Object(dom_["getStyle"])(document.body,'position');['top','left'].forEach(function(property){var scroll=property==='top'?'scrollTop':'scrollLeft';el.maskStyle[property]=el.getBoundingClientRect()[property]+document.body[scroll]+document.documentElement[scroll]-parseInt(Object(dom_["getStyle"])(document.body,'margin-'+property),10)+'px';});['height','width'].forEach(function(property){el.maskStyle[property]=el.getBoundingClientRect()[property]+'px';});insertDom(document.body,el,binding);}else{el.originalPosition=Object(dom_["getStyle"])(el,'position');insertDom(el,el,binding);}}});}else{after_leave_default()(el.instance,function(_){if(!el.instance.hiding)return;el.domVisible=false;var target=binding.modifiers.fullscreen||binding.modifiers.body?document.body:el;Object(dom_["removeClass"])(target,'el-loading-parent--relative');Object(dom_["removeClass"])(target,'el-loading-parent--hidden');el.instance.hiding=false;},300,true);el.instance.visible=false;el.instance.hiding=true;}};var insertDom=function insertDom(parent,el,binding){if(!el.domVisible&&Object(dom_["getStyle"])(el,'display')!=='none'&&Object(dom_["getStyle"])(el,'visibility')!=='hidden'){Object.keys(el.maskStyle).forEach(function(property){el.mask.style[property]=el.maskStyle[property];});if(el.originalPosition!=='absolute'&&el.originalPosition!=='fixed'){Object(dom_["addClass"])(parent,'el-loading-parent--relative');}if(binding.modifiers.fullscreen&&binding.modifiers.lock){Object(dom_["addClass"])(parent,'el-loading-parent--hidden');}el.domVisible=true;parent.appendChild(el.mask);Vue.nextTick(function(){if(el.instance.hiding){el.instance.$emit('after-leave');}else{el.instance.visible=true;}});el.domInserted=true;}else if(el.domVisible&&el.instance.hiding===true){el.instance.visible=true;el.instance.hiding=false;}};Vue.directive('loading',{bind:function bind(el,binding,vnode){var textExr=el.getAttribute('element-loading-text');var spinnerExr=el.getAttribute('element-loading-spinner');var backgroundExr=el.getAttribute('element-loading-background');var customClassExr=el.getAttribute('element-loading-custom-class');var vm=vnode.context;var mask=new Mask({el:document.createElement('div'),data:{text:vm&&vm[textExr]||textExr,spinner:vm&&vm[spinnerExr]||spinnerExr,background:vm&&vm[backgroundExr]||backgroundExr,customClass:vm&&vm[customClassExr]||customClassExr,fullscreen:!!binding.modifiers.fullscreen}});el.instance=mask;el.mask=mask.$el;el.maskStyle={};binding.value&&toggleLoading(el,binding);},update:function update(el,binding){el.instance.setText(el.getAttribute('element-loading-text'));if(binding.oldValue!==binding.value){toggleLoading(el,binding);}},unbind:function unbind(el,binding){if(el.domInserted){el.mask&&el.mask.parentNode&&el.mask.parentNode.removeChild(el.mask);toggleLoading(el,{value:false,modifiers:binding.modifiers});}el.instance&&el.instance.$destroy();}});};/* harmony default export */var src_directive=loadingDirective;// CONCATENATED MODULE: ./packages/loading/src/index.js
var LoadingConstructor=external_vue_default.a.extend(loading);var src_defaults={text:null,fullscreen:true,body:false,lock:false,customClass:''};var fullscreenLoading=void 0;LoadingConstructor.prototype.originalPosition='';LoadingConstructor.prototype.originalOverflow='';LoadingConstructor.prototype.close=function(){var _this=this;if(this.fullscreen){fullscreenLoading=undefined;}after_leave_default()(this,function(_){var target=_this.fullscreen||_this.body?document.body:_this.target;Object(dom_["removeClass"])(target,'el-loading-parent--relative');Object(dom_["removeClass"])(target,'el-loading-parent--hidden');if(_this.$el&&_this.$el.parentNode){_this.$el.parentNode.removeChild(_this.$el);}_this.$destroy();},300);this.visible=false;};var src_addStyle=function addStyle(options,parent,instance){var maskStyle={};if(options.fullscreen){instance.originalPosition=Object(dom_["getStyle"])(document.body,'position');instance.originalOverflow=Object(dom_["getStyle"])(document.body,'overflow');maskStyle.zIndex=popup_["PopupManager"].nextZIndex();}else if(options.body){instance.originalPosition=Object(dom_["getStyle"])(document.body,'position');['top','left'].forEach(function(property){var scroll=property==='top'?'scrollTop':'scrollLeft';maskStyle[property]=options.target.getBoundingClientRect()[property]+document.body[scroll]+document.documentElement[scroll]+'px';});['height','width'].forEach(function(property){maskStyle[property]=options.target.getBoundingClientRect()[property]+'px';});}else{instance.originalPosition=Object(dom_["getStyle"])(parent,'position');}Object.keys(maskStyle).forEach(function(property){instance.$el.style[property]=maskStyle[property];});};var src_Loading=function Loading(){var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(external_vue_default.a.prototype.$isServer)return;options=merge_default()({},src_defaults,options);if(typeof options.target==='string'){options.target=document.querySelector(options.target);}options.target=options.target||document.body;if(options.target!==document.body){options.fullscreen=false;}else{options.body=true;}if(options.fullscreen&&fullscreenLoading){return fullscreenLoading;}var parent=options.body?document.body:options.target;var instance=new LoadingConstructor({el:document.createElement('div'),data:options});src_addStyle(options,parent,instance);if(instance.originalPosition!=='absolute'&&instance.originalPosition!=='fixed'){Object(dom_["addClass"])(parent,'el-loading-parent--relative');}if(options.fullscreen&&options.lock){Object(dom_["addClass"])(parent,'el-loading-parent--hidden');}parent.appendChild(instance.$el);external_vue_default.a.nextTick(function(){instance.visible=true;});if(options.fullscreen){fullscreenLoading=instance;}return instance;};/* harmony default export */var src=src_Loading;// CONCATENATED MODULE: ./packages/loading/index.js
/* harmony default export */var packages_loading={install:function install(Vue){Vue.use(src_directive);Vue.prototype.$loading=src;},directive:src_directive,service:src};// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/icon/src/icon.vue?vue&type=template&id=cb3fe7f4&
var iconvue_type_template_id_cb3fe7f4_render=function iconvue_type_template_id_cb3fe7f4_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("i",{class:"el-icon-"+_vm.name});};var iconvue_type_template_id_cb3fe7f4_staticRenderFns=[];iconvue_type_template_id_cb3fe7f4_render._withStripped=true;// CONCATENATED MODULE: ./packages/icon/src/icon.vue?vue&type=template&id=cb3fe7f4&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/icon/src/icon.vue?vue&type=script&lang=js&
//
//
//
//
/* harmony default export */var iconvue_type_script_lang_js_={name:'ElIcon',props:{name:String}};// CONCATENATED MODULE: ./packages/icon/src/icon.vue?vue&type=script&lang=js&
/* harmony default export */var src_iconvue_type_script_lang_js_=iconvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/icon/src/icon.vue
/* normalize component */var icon_component=normalizeComponent(src_iconvue_type_script_lang_js_,iconvue_type_template_id_cb3fe7f4_render,iconvue_type_template_id_cb3fe7f4_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var icon_api; }icon_component.options.__file="packages/icon/src/icon.vue";/* harmony default export */var icon=icon_component.exports;// CONCATENATED MODULE: ./packages/icon/index.js
/* istanbul ignore next */icon.install=function(Vue){Vue.component(icon.name,icon);};/* harmony default export */var packages_icon=icon;// CONCATENATED MODULE: ./packages/row/src/row.js
/* harmony default export */var src_row={name:'ElRow',componentName:'ElRow',props:{tag:{type:String,default:'div'},gutter:Number,type:String,justify:{type:String,default:'start'},align:{type:String,default:'top'}},computed:{style:function style(){var ret={};if(this.gutter){ret.marginLeft='-'+this.gutter/2+'px';ret.marginRight=ret.marginLeft;}return ret;}},render:function render(h){return h(this.tag,{class:['el-row',this.justify!=='start'?'is-justify-'+this.justify:'',this.align!=='top'?'is-align-'+this.align:'',{'el-row--flex':this.type==='flex'}],style:this.style},this.$slots.default);}};// CONCATENATED MODULE: ./packages/row/index.js
/* istanbul ignore next */src_row.install=function(Vue){Vue.component(src_row.name,src_row);};/* harmony default export */var packages_row=src_row;// CONCATENATED MODULE: ./packages/col/src/col.js
var col_typeof=typeof Symbol==="function"&&_typeof2(Symbol.iterator)==="symbol"?function(obj){return _typeof2(obj);}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":_typeof2(obj);};/* harmony default export */var col={name:'ElCol',props:{span:{type:Number,default:24},tag:{type:String,default:'div'},offset:Number,pull:Number,push:Number,xs:[Number,Object],sm:[Number,Object],md:[Number,Object],lg:[Number,Object],xl:[Number,Object]},computed:{gutter:function gutter(){var parent=this.$parent;while(parent&&parent.$options.componentName!=='ElRow'){parent=parent.$parent;}return parent?parent.gutter:0;}},render:function render(h){var _this=this;var classList=[];var style={};if(this.gutter){style.paddingLeft=this.gutter/2+'px';style.paddingRight=style.paddingLeft;}['span','offset','pull','push'].forEach(function(prop){if(_this[prop]||_this[prop]===0){classList.push(prop!=='span'?'el-col-'+prop+'-'+_this[prop]:'el-col-'+_this[prop]);}});['xs','sm','md','lg','xl'].forEach(function(size){if(typeof _this[size]==='number'){classList.push('el-col-'+size+'-'+_this[size]);}else if(col_typeof(_this[size])==='object'){var props=_this[size];Object.keys(props).forEach(function(prop){classList.push(prop!=='span'?'el-col-'+size+'-'+prop+'-'+props[prop]:'el-col-'+size+'-'+props[prop]);});}});return h(this.tag,{class:['el-col',classList],style:style},this.$slots.default);}};// CONCATENATED MODULE: ./packages/col/index.js
/* istanbul ignore next */col.install=function(Vue){Vue.component(col.name,col);};/* harmony default export */var packages_col=col;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/upload-list.vue?vue&type=template&id=173fedf5&
var upload_listvue_type_template_id_173fedf5_render=function upload_listvue_type_template_id_173fedf5_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("transition-group",{class:["el-upload-list","el-upload-list--"+_vm.listType,{"is-disabled":_vm.disabled}],attrs:{tag:"ul",name:"el-list"}},_vm._l(_vm.files,function(file){return _c("li",{key:file.uid,class:["el-upload-list__item","is-"+file.status,_vm.focusing?"focusing":""],attrs:{tabindex:"0"},on:{keydown:function keydown($event){if(!("button"in $event)&&_vm._k($event.keyCode,"delete",[8,46],$event.key,["Backspace","Delete","Del"])){return null;}!_vm.disabled&&_vm.$emit("remove",file);},focus:function focus($event){_vm.focusing=true;},blur:function blur($event){_vm.focusing=false;},click:function click($event){_vm.focusing=false;}}},[_vm._t("default",[file.status!=="uploading"&&["picture-card","picture"].indexOf(_vm.listType)>-1?_c("img",{staticClass:"el-upload-list__item-thumbnail",attrs:{src:file.url,alt:""}}):_vm._e(),_c("a",{staticClass:"el-upload-list__item-name",on:{click:function click($event){_vm.handleClick(file);}}},[_c("i",{staticClass:"el-icon-document"}),_vm._v(_vm._s(file.name)+"\n      ")]),_c("label",{staticClass:"el-upload-list__item-status-label"},[_c("i",{class:{"el-icon-upload-success":true,"el-icon-circle-check":_vm.listType==="text","el-icon-check":["picture-card","picture"].indexOf(_vm.listType)>-1}})]),!_vm.disabled?_c("i",{staticClass:"el-icon-close",on:{click:function click($event){_vm.$emit("remove",file);}}}):_vm._e(),!_vm.disabled?_c("i",{staticClass:"el-icon-close-tip"},[_vm._v(_vm._s(_vm.t("el.upload.deleteTip")))]):_vm._e(),file.status==="uploading"?_c("el-progress",{attrs:{type:_vm.listType==="picture-card"?"circle":"line","stroke-width":_vm.listType==="picture-card"?6:2,percentage:_vm.parsePercentage(file.percentage)}}):_vm._e(),_vm.listType==="picture-card"?_c("span",{staticClass:"el-upload-list__item-actions"},[_vm.handlePreview&&_vm.listType==="picture-card"?_c("span",{staticClass:"el-upload-list__item-preview",on:{click:function click($event){_vm.handlePreview(file);}}},[_c("i",{staticClass:"el-icon-zoom-in"})]):_vm._e(),!_vm.disabled?_c("span",{staticClass:"el-upload-list__item-delete",on:{click:function click($event){_vm.$emit("remove",file);}}},[_c("i",{staticClass:"el-icon-delete"})]):_vm._e()]):_vm._e()],{file:file})],2);}),0);};var upload_listvue_type_template_id_173fedf5_staticRenderFns=[];upload_listvue_type_template_id_173fedf5_render._withStripped=true;// CONCATENATED MODULE: ./packages/upload/src/upload-list.vue?vue&type=template&id=173fedf5&
// EXTERNAL MODULE: external "element-ui/lib/progress"
var progress_=__webpack_require__(34);var progress_default=/*#__PURE__*/__webpack_require__.n(progress_);// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/upload-list.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var upload_listvue_type_script_lang_js_={name:'ElUploadList',mixins:[locale_default.a],data:function data(){return{focusing:false};},components:{ElProgress:progress_default.a},props:{files:{type:Array,default:function _default(){return[];}},disabled:{type:Boolean,default:false},handlePreview:Function,listType:String},methods:{parsePercentage:function parsePercentage(val){return parseInt(val,10);},handleClick:function handleClick(file){this.handlePreview&&this.handlePreview(file);}}};// CONCATENATED MODULE: ./packages/upload/src/upload-list.vue?vue&type=script&lang=js&
/* harmony default export */var src_upload_listvue_type_script_lang_js_=upload_listvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/upload/src/upload-list.vue
/* normalize component */var upload_list_component=normalizeComponent(src_upload_listvue_type_script_lang_js_,upload_listvue_type_template_id_173fedf5_render,upload_listvue_type_template_id_173fedf5_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var upload_list_api; }upload_list_component.options.__file="packages/upload/src/upload-list.vue";/* harmony default export */var upload_list=upload_list_component.exports;// EXTERNAL MODULE: external "babel-helper-vue-jsx-merge-props"
var external_babel_helper_vue_jsx_merge_props_=__webpack_require__(24);var external_babel_helper_vue_jsx_merge_props_default=/*#__PURE__*/__webpack_require__.n(external_babel_helper_vue_jsx_merge_props_);// CONCATENATED MODULE: ./packages/upload/src/ajax.js
function getError(action,option,xhr){var msg=void 0;if(xhr.response){msg=''+(xhr.response.error||xhr.response);}else if(xhr.responseText){msg=''+xhr.responseText;}else{msg='fail to post '+action+' '+xhr.status;}var err=new Error(msg);err.status=xhr.status;err.method='post';err.url=action;return err;}function getBody(xhr){var text=xhr.responseText||xhr.response;if(!text){return text;}try{return JSON.parse(text);}catch(e){return text;}}function upload(option){if(typeof XMLHttpRequest==='undefined'){return;}var xhr=new XMLHttpRequest();var action=option.action;if(xhr.upload){xhr.upload.onprogress=function progress(e){if(e.total>0){e.percent=e.loaded/e.total*100;}option.onProgress(e);};}var formData=new FormData();if(option.data){Object.keys(option.data).forEach(function(key){formData.append(key,option.data[key]);});}formData.append(option.filename,option.file,option.file.name);xhr.onerror=function error(e){option.onError(e);};xhr.onload=function onload(){if(xhr.status<200||xhr.status>=300){return option.onError(getError(action,option,xhr));}option.onSuccess(getBody(xhr));};xhr.open('post',action,true);if(option.withCredentials&&'withCredentials'in xhr){xhr.withCredentials=true;}var headers=option.headers||{};for(var item in headers){if(headers.hasOwnProperty(item)&&headers[item]!==null){xhr.setRequestHeader(item,headers[item]);}}xhr.send(formData);return xhr;}// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/upload-dragger.vue?vue&type=template&id=7ebbf219&
var upload_draggervue_type_template_id_7ebbf219_render=function upload_draggervue_type_template_id_7ebbf219_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-upload-dragger",class:{"is-dragover":_vm.dragover},on:{drop:function drop($event){$event.preventDefault();return _vm.onDrop($event);},dragover:function dragover($event){$event.preventDefault();return _vm.onDragover($event);},dragleave:function dragleave($event){$event.preventDefault();_vm.dragover=false;}}},[_vm._t("default")],2);};var upload_draggervue_type_template_id_7ebbf219_staticRenderFns=[];upload_draggervue_type_template_id_7ebbf219_render._withStripped=true;// CONCATENATED MODULE: ./packages/upload/src/upload-dragger.vue?vue&type=template&id=7ebbf219&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/upload-dragger.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var upload_draggervue_type_script_lang_js_={name:'ElUploadDrag',props:{disabled:Boolean},inject:{uploader:{default:''}},data:function data(){return{dragover:false};},methods:{onDragover:function onDragover(){if(!this.disabled){this.dragover=true;}},onDrop:function onDrop(e){if(this.disabled||!this.uploader)return;var accept=this.uploader.accept;this.dragover=false;if(!accept){this.$emit('file',e.dataTransfer.files);return;}this.$emit('file',[].slice.call(e.dataTransfer.files).filter(function(file){var type=file.type,name=file.name;var extension=name.indexOf('.')>-1?'.'+name.split('.').pop():'';var baseType=type.replace(/\/.*$/,'');return accept.split(',').map(function(type){return type.trim();}).filter(function(type){return type;}).some(function(acceptedType){if(/\..+$/.test(acceptedType)){return extension===acceptedType;}if(/\/\*$/.test(acceptedType)){return baseType===acceptedType.replace(/\/\*$/,'');}if(/^[^\/]+\/[^\/]+$/.test(acceptedType)){return type===acceptedType;}return false;});}));}}};// CONCATENATED MODULE: ./packages/upload/src/upload-dragger.vue?vue&type=script&lang=js&
/* harmony default export */var src_upload_draggervue_type_script_lang_js_=upload_draggervue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/upload/src/upload-dragger.vue
/* normalize component */var upload_dragger_component=normalizeComponent(src_upload_draggervue_type_script_lang_js_,upload_draggervue_type_template_id_7ebbf219_render,upload_draggervue_type_template_id_7ebbf219_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var upload_dragger_api; }upload_dragger_component.options.__file="packages/upload/src/upload-dragger.vue";/* harmony default export */var upload_dragger=upload_dragger_component.exports;// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/upload.vue?vue&type=script&lang=js&
/* harmony default export */var uploadvue_type_script_lang_js_={inject:['uploader'],components:{UploadDragger:upload_dragger},props:{type:String,action:{type:String,required:true},name:{type:String,default:'file'},data:Object,headers:Object,withCredentials:Boolean,multiple:Boolean,accept:String,onStart:Function,onProgress:Function,onSuccess:Function,onError:Function,beforeUpload:Function,drag:Boolean,onPreview:{type:Function,default:function _default(){}},onRemove:{type:Function,default:function _default(){}},fileList:Array,autoUpload:Boolean,listType:String,httpRequest:{type:Function,default:upload},disabled:Boolean,limit:Number,onExceed:Function},data:function data(){return{mouseover:false,reqs:{}};},methods:{isImage:function isImage(str){return str.indexOf('image')!==-1;},handleChange:function handleChange(ev){var files=ev.target.files;if(!files)return;this.uploadFiles(files);},uploadFiles:function uploadFiles(files){var _this=this;if(this.limit&&this.fileList.length+files.length>this.limit){this.onExceed&&this.onExceed(files,this.fileList);return;}var postFiles=Array.prototype.slice.call(files);if(!this.multiple){postFiles=postFiles.slice(0,1);}if(postFiles.length===0){return;}postFiles.forEach(function(rawFile){_this.onStart(rawFile);if(_this.autoUpload)_this.upload(rawFile);});},upload:function upload(rawFile){var _this2=this;this.$refs.input.value=null;if(!this.beforeUpload){return this.post(rawFile);}var before=this.beforeUpload(rawFile);if(before&&before.then){before.then(function(processedFile){var fileType=Object.prototype.toString.call(processedFile);if(fileType==='[object File]'||fileType==='[object Blob]'){if(fileType==='[object Blob]'){processedFile=new File([processedFile],rawFile.name,{type:rawFile.type});}for(var p in rawFile){if(rawFile.hasOwnProperty(p)){processedFile[p]=rawFile[p];}}_this2.post(processedFile);}else{_this2.post(rawFile);}},function(){_this2.onRemove(null,rawFile);});}else if(before!==false){this.post(rawFile);}else{this.onRemove(null,rawFile);}},abort:function abort(file){var reqs=this.reqs;if(file){var uid=file;if(file.uid)uid=file.uid;if(reqs[uid]){reqs[uid].abort();}}else{Object.keys(reqs).forEach(function(uid){if(reqs[uid])reqs[uid].abort();delete reqs[uid];});}},post:function post(rawFile){var _this3=this;var uid=rawFile.uid;var options={headers:this.headers,withCredentials:this.withCredentials,file:rawFile,data:this.data,filename:this.name,action:this.action,onProgress:function onProgress(e){_this3.onProgress(e,rawFile);},onSuccess:function onSuccess(res){_this3.onSuccess(res,rawFile);delete _this3.reqs[uid];},onError:function onError(err){_this3.onError(err,rawFile);delete _this3.reqs[uid];}};var req=this.httpRequest(options);this.reqs[uid]=req;if(req&&req.then){req.then(options.onSuccess,options.onError);}},handleClick:function handleClick(){if(!this.disabled){this.$refs.input.value=null;this.$refs.input.click();}},handleKeydown:function handleKeydown(e){if(e.target!==e.currentTarget)return;if(e.keyCode===13||e.keyCode===32){this.handleClick();}}},render:function render(h){var handleClick=this.handleClick,drag=this.drag,name=this.name,handleChange=this.handleChange,multiple=this.multiple,accept=this.accept,listType=this.listType,uploadFiles=this.uploadFiles,disabled=this.disabled,handleKeydown=this.handleKeydown;var data={class:{'el-upload':true},on:{click:handleClick,keydown:handleKeydown}};data.class['el-upload--'+listType]=true;return h('div',external_babel_helper_vue_jsx_merge_props_default()([data,{attrs:{tabindex:'0'}}]),[drag?h('upload-dragger',{attrs:{disabled:disabled},on:{'file':uploadFiles}},[this.$slots.default]):this.$slots.default,h('input',{'class':'el-upload__input',attrs:{type:'file',name:name,multiple:multiple,accept:accept},ref:'input',on:{'change':handleChange}})]);}};// CONCATENATED MODULE: ./packages/upload/src/upload.vue?vue&type=script&lang=js&
/* harmony default export */var src_uploadvue_type_script_lang_js_=uploadvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/upload/src/upload.vue
var upload_render,upload_staticRenderFns;/* normalize component */var upload_component=normalizeComponent(src_uploadvue_type_script_lang_js_,upload_render,upload_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var upload_api; }upload_component.options.__file="packages/upload/src/upload.vue";/* harmony default export */var src_upload=upload_component.exports;// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/index.vue?vue&type=script&lang=js&
function srcvue_type_script_lang_js_noop(){}/* harmony default export */var srcvue_type_script_lang_js_={name:'ElUpload',mixins:[migrating_default.a],components:{ElProgress:progress_default.a,UploadList:upload_list,Upload:src_upload},provide:function provide(){return{uploader:this};},inject:{elForm:{default:''}},props:{action:{type:String,required:true},headers:{type:Object,default:function _default(){return{};}},data:Object,multiple:Boolean,name:{type:String,default:'file'},drag:Boolean,dragger:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:true},accept:String,type:{type:String,default:'select'},beforeUpload:Function,beforeRemove:Function,onRemove:{type:Function,default:srcvue_type_script_lang_js_noop},onChange:{type:Function,default:srcvue_type_script_lang_js_noop},onPreview:{type:Function},onSuccess:{type:Function,default:srcvue_type_script_lang_js_noop},onProgress:{type:Function,default:srcvue_type_script_lang_js_noop},onError:{type:Function,default:srcvue_type_script_lang_js_noop},fileList:{type:Array,default:function _default(){return[];}},autoUpload:{type:Boolean,default:true},listType:{type:String,default:'text'// text,picture,picture-card
},httpRequest:Function,disabled:Boolean,limit:Number,onExceed:{type:Function,default:srcvue_type_script_lang_js_noop}},data:function data(){return{uploadFiles:[],dragOver:false,draging:false,tempIndex:1};},computed:{uploadDisabled:function uploadDisabled(){return this.disabled||(this.elForm||{}).disabled;}},watch:{listType:function listType(type){if(type==='picture-card'||type==='picture'){this.uploadFiles=this.uploadFiles.map(function(file){if(!file.url&&file.raw){try{file.url=URL.createObjectURL(file.raw);}catch(err){console.error('[Element Error][Upload]',err);}}return file;});}},fileList:{immediate:true,handler:function handler(fileList){var _this=this;this.uploadFiles=fileList.map(function(item){item.uid=item.uid||Date.now()+_this.tempIndex++;item.status=item.status||'success';return item;});}}},methods:{handleStart:function handleStart(rawFile){rawFile.uid=Date.now()+this.tempIndex++;var file={status:'ready',name:rawFile.name,size:rawFile.size,percentage:0,uid:rawFile.uid,raw:rawFile};if(this.listType==='picture-card'||this.listType==='picture'){try{file.url=URL.createObjectURL(rawFile);}catch(err){console.error('[Element Error][Upload]',err);return;}}this.uploadFiles.push(file);this.onChange(file,this.uploadFiles);},handleProgress:function handleProgress(ev,rawFile){var file=this.getFile(rawFile);this.onProgress(ev,file,this.uploadFiles);file.status='uploading';file.percentage=ev.percent||0;},handleSuccess:function handleSuccess(res,rawFile){var file=this.getFile(rawFile);if(file){file.status='success';file.response=res;this.onSuccess(res,file,this.uploadFiles);this.onChange(file,this.uploadFiles);}},handleError:function handleError(err,rawFile){var file=this.getFile(rawFile);var fileList=this.uploadFiles;file.status='fail';fileList.splice(fileList.indexOf(file),1);this.onError(err,file,this.uploadFiles);this.onChange(file,this.uploadFiles);},handleRemove:function handleRemove(file,raw){var _this2=this;if(raw){file=this.getFile(raw);}var doRemove=function doRemove(){_this2.abort(file);var fileList=_this2.uploadFiles;fileList.splice(fileList.indexOf(file),1);_this2.onRemove(file,fileList);};if(!this.beforeRemove){doRemove();}else if(typeof this.beforeRemove==='function'){var before=this.beforeRemove(file,this.uploadFiles);if(before&&before.then){before.then(function(){doRemove();},srcvue_type_script_lang_js_noop);}else if(before!==false){doRemove();}}},getFile:function getFile(rawFile){var fileList=this.uploadFiles;var target=void 0;fileList.every(function(item){target=rawFile.uid===item.uid?item:null;return!target;});return target;},abort:function abort(file){this.$refs['upload-inner'].abort(file);},clearFiles:function clearFiles(){this.uploadFiles=[];},submit:function submit(){var _this3=this;this.uploadFiles.filter(function(file){return file.status==='ready';}).forEach(function(file){_this3.$refs['upload-inner'].upload(file.raw);});},getMigratingConfig:function getMigratingConfig(){return{props:{'default-file-list':'default-file-list is renamed to file-list.','show-upload-list':'show-upload-list is renamed to show-file-list.','thumbnail-mode':'thumbnail-mode has been deprecated, you can implement the same effect according to this case: http://element.eleme.io/#/zh-CN/component/upload#yong-hu-tou-xiang-shang-chuan'}};}},beforeDestroy:function beforeDestroy(){this.uploadFiles.forEach(function(file){if(file.url&&file.url.indexOf('blob:')===0){URL.revokeObjectURL(file.url);}});},render:function render(h){var _this4=this;var uploadList=void 0;if(this.showFileList){uploadList=h(upload_list,{attrs:{disabled:this.uploadDisabled,listType:this.listType,files:this.uploadFiles,handlePreview:this.onPreview},on:{'remove':this.handleRemove}},[function(props){if(_this4.$scopedSlots.file){return _this4.$scopedSlots.file({file:props.file});}}]);}var uploadData={props:{type:this.type,drag:this.drag,action:this.action,multiple:this.multiple,'before-upload':this.beforeUpload,'with-credentials':this.withCredentials,headers:this.headers,name:this.name,data:this.data,accept:this.accept,fileList:this.uploadFiles,autoUpload:this.autoUpload,listType:this.listType,disabled:this.uploadDisabled,limit:this.limit,'on-exceed':this.onExceed,'on-start':this.handleStart,'on-progress':this.handleProgress,'on-success':this.handleSuccess,'on-error':this.handleError,'on-preview':this.onPreview,'on-remove':this.handleRemove,'http-request':this.httpRequest},ref:'upload-inner'};var trigger=this.$slots.trigger||this.$slots.default;var uploadComponent=h('upload',uploadData,[trigger]);return h('div',[this.listType==='picture-card'?uploadList:'',this.$slots.trigger?[uploadComponent,this.$slots.default]:uploadComponent,this.$slots.tip,this.listType!=='picture-card'?uploadList:'']);}};// CONCATENATED MODULE: ./packages/upload/src/index.vue?vue&type=script&lang=js&
/* harmony default export */var upload_srcvue_type_script_lang_js_=srcvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/upload/src/index.vue
var src_render,src_staticRenderFns;/* normalize component */var upload_src_component=normalizeComponent(upload_srcvue_type_script_lang_js_,src_render,src_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var src_api; }upload_src_component.options.__file="packages/upload/src/index.vue";/* harmony default export */var upload_src=upload_src_component.exports;// CONCATENATED MODULE: ./packages/upload/index.js
/* istanbul ignore next */upload_src.install=function(Vue){Vue.component(upload_src.name,upload_src);};/* harmony default export */var packages_upload=upload_src;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/progress/src/progress.vue?vue&type=template&id=229ee406&
var progressvue_type_template_id_229ee406_render=function progressvue_type_template_id_229ee406_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-progress",class:["el-progress--"+_vm.type,_vm.status?"is-"+_vm.status:"",{"el-progress--without-text":!_vm.showText,"el-progress--text-inside":_vm.textInside}],attrs:{role:"progressbar","aria-valuenow":_vm.percentage,"aria-valuemin":"0","aria-valuemax":"100"}},[_vm.type==="line"?_c("div",{staticClass:"el-progress-bar"},[_c("div",{staticClass:"el-progress-bar__outer",style:{height:_vm.strokeWidth+"px"}},[_c("div",{staticClass:"el-progress-bar__inner",style:_vm.barStyle},[_vm.showText&&_vm.textInside?_c("div",{staticClass:"el-progress-bar__innerText"},[_vm._v(_vm._s(_vm.content))]):_vm._e()])])]):_c("div",{staticClass:"el-progress-circle",style:{height:_vm.width+"px",width:_vm.width+"px"}},[_c("svg",{attrs:{viewBox:"0 0 100 100"}},[_c("path",{staticClass:"el-progress-circle__track",style:_vm.trailPathStyle,attrs:{d:_vm.trackPath,stroke:"#e5e9f2","stroke-width":_vm.relativeStrokeWidth,fill:"none"}}),_c("path",{staticClass:"el-progress-circle__path",style:_vm.circlePathStyle,attrs:{d:_vm.trackPath,stroke:_vm.stroke,fill:"none","stroke-linecap":_vm.strokeLinecap,"stroke-width":_vm.percentage?_vm.relativeStrokeWidth:0}})])]),_vm.showText&&!_vm.textInside?_c("div",{staticClass:"el-progress__text",style:{fontSize:_vm.progressTextSize+"px"}},[!_vm.status?[_vm._v(_vm._s(_vm.content))]:_c("i",{class:_vm.iconClass})],2):_vm._e()]);};var progressvue_type_template_id_229ee406_staticRenderFns=[];progressvue_type_template_id_229ee406_render._withStripped=true;// CONCATENATED MODULE: ./packages/progress/src/progress.vue?vue&type=template&id=229ee406&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/progress/src/progress.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var progressvue_type_script_lang_js_={name:'ElProgress',props:{type:{type:String,default:'line',validator:function validator(val){return['line','circle','dashboard'].indexOf(val)>-1;}},percentage:{type:Number,default:0,required:true,validator:function validator(val){return val>=0&&val<=100;}},status:{type:String,validator:function validator(val){return['success','exception','warning'].indexOf(val)>-1;}},strokeWidth:{type:Number,default:6},strokeLinecap:{type:String,default:'round'},textInside:{type:Boolean,default:false},width:{type:Number,default:126},showText:{type:Boolean,default:true},color:{type:[String,Array,Function],default:''},format:Function},computed:{barStyle:function barStyle(){var style={};style.width=this.percentage+'%';style.backgroundColor=this.getCurrentColor(this.percentage);return style;},relativeStrokeWidth:function relativeStrokeWidth(){return(this.strokeWidth/this.width*100).toFixed(1);},radius:function radius(){if(this.type==='circle'||this.type==='dashboard'){return parseInt(50-parseFloat(this.relativeStrokeWidth)/2,10);}else{return 0;}},trackPath:function trackPath(){var radius=this.radius;var isDashboard=this.type==='dashboard';return'\n        M 50 50\n        m 0 '+(isDashboard?'':'-')+radius+'\n        a '+radius+' '+radius+' 0 1 1 0 '+(isDashboard?'-':'')+radius*2+'\n        a '+radius+' '+radius+' 0 1 1 0 '+(isDashboard?'':'-')+radius*2+'\n        ';},perimeter:function perimeter(){return 2*Math.PI*this.radius;},rate:function rate(){return this.type==='dashboard'?0.75:1;},strokeDashoffset:function strokeDashoffset(){var offset=-1*this.perimeter*(1-this.rate)/2;return offset+'px';},trailPathStyle:function trailPathStyle(){return{strokeDasharray:this.perimeter*this.rate+'px, '+this.perimeter+'px',strokeDashoffset:this.strokeDashoffset};},circlePathStyle:function circlePathStyle(){return{strokeDasharray:this.perimeter*this.rate*(this.percentage/100)+'px, '+this.perimeter+'px',strokeDashoffset:this.strokeDashoffset,transition:'stroke-dasharray 0.6s ease 0s, stroke 0.6s ease'};},stroke:function stroke(){var ret=void 0;if(this.color){ret=this.getCurrentColor(this.percentage);}else{switch(this.status){case'success':ret='#13ce66';break;case'exception':ret='#ff4949';break;case'warning':ret='#e6a23c';break;default:ret='#20a0ff';}}return ret;},iconClass:function iconClass(){if(this.status==='warning'){return'el-icon-warning';}if(this.type==='line'){return this.status==='success'?'el-icon-circle-check':'el-icon-circle-close';}else{return this.status==='success'?'el-icon-check':'el-icon-close';}},progressTextSize:function progressTextSize(){return this.type==='line'?12+this.strokeWidth*0.4:this.width*0.111111+2;},content:function content(){if(typeof this.format==='function'){return this.format(this.percentage)||'';}else{return this.percentage+'%';}}},methods:{getCurrentColor:function getCurrentColor(percentage){if(typeof this.color==='function'){return this.color(percentage);}else if(typeof this.color==='string'){return this.color;}else{return this.getLevelColor(percentage);}},getLevelColor:function getLevelColor(percentage){var colorArray=this.getColorArray().sort(function(a,b){return a.percentage-b.percentage;});for(var i=0;i<colorArray.length;i++){if(colorArray[i].percentage>percentage){return colorArray[i].color;}}return colorArray[colorArray.length-1].color;},getColorArray:function getColorArray(){var color=this.color;var span=100/color.length;return color.map(function(seriesColor,index){if(typeof seriesColor==='string'){return{color:seriesColor,progress:(index+1)*span};}return seriesColor;});}}};// CONCATENATED MODULE: ./packages/progress/src/progress.vue?vue&type=script&lang=js&
/* harmony default export */var src_progressvue_type_script_lang_js_=progressvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/progress/src/progress.vue
/* normalize component */var progress_component=normalizeComponent(src_progressvue_type_script_lang_js_,progressvue_type_template_id_229ee406_render,progressvue_type_template_id_229ee406_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var progress_api; }progress_component.options.__file="packages/progress/src/progress.vue";/* harmony default export */var progress=progress_component.exports;// CONCATENATED MODULE: ./packages/progress/index.js
/* istanbul ignore next */progress.install=function(Vue){Vue.component(progress.name,progress);};/* harmony default export */var packages_progress=progress;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/spinner/src/spinner.vue?vue&type=template&id=697b8538&
var spinnervue_type_template_id_697b8538_render=function spinnervue_type_template_id_697b8538_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("span",{staticClass:"el-spinner"},[_c("svg",{staticClass:"el-spinner-inner",style:{width:_vm.radius/2+"px",height:_vm.radius/2+"px"},attrs:{viewBox:"0 0 50 50"}},[_c("circle",{staticClass:"path",attrs:{cx:"25",cy:"25",r:"20",fill:"none",stroke:_vm.strokeColor,"stroke-width":_vm.strokeWidth}})])]);};var spinnervue_type_template_id_697b8538_staticRenderFns=[];spinnervue_type_template_id_697b8538_render._withStripped=true;// CONCATENATED MODULE: ./packages/spinner/src/spinner.vue?vue&type=template&id=697b8538&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/spinner/src/spinner.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
/* harmony default export */var spinnervue_type_script_lang_js_={name:'ElSpinner',props:{type:String,radius:{type:Number,default:100},strokeWidth:{type:Number,default:5},strokeColor:{type:String,default:'#efefef'}}};// CONCATENATED MODULE: ./packages/spinner/src/spinner.vue?vue&type=script&lang=js&
/* harmony default export */var src_spinnervue_type_script_lang_js_=spinnervue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/spinner/src/spinner.vue
/* normalize component */var spinner_component=normalizeComponent(src_spinnervue_type_script_lang_js_,spinnervue_type_template_id_697b8538_render,spinnervue_type_template_id_697b8538_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var spinner_api; }spinner_component.options.__file="packages/spinner/src/spinner.vue";/* harmony default export */var spinner=spinner_component.exports;// CONCATENATED MODULE: ./packages/spinner/index.js
/* istanbul ignore next */spinner.install=function(Vue){Vue.component(spinner.name,spinner);};/* harmony default export */var packages_spinner=spinner;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/message/src/main.vue?vue&type=template&id=455b9f60&
var mainvue_type_template_id_455b9f60_render=function mainvue_type_template_id_455b9f60_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("transition",{attrs:{name:"el-message-fade"},on:{"after-leave":_vm.handleAfterLeave}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.visible,expression:"visible"}],class:["el-message",_vm.type&&!_vm.iconClass?"el-message--"+_vm.type:"",_vm.center?"is-center":"",_vm.showClose?"is-closable":"",_vm.customClass],style:_vm.positionStyle,attrs:{role:"alert"},on:{mouseenter:_vm.clearTimer,mouseleave:_vm.startTimer}},[_vm.iconClass?_c("i",{class:_vm.iconClass}):_c("i",{class:_vm.typeClass}),_vm._t("default",[!_vm.dangerouslyUseHTMLString?_c("p",{staticClass:"el-message__content"},[_vm._v(_vm._s(_vm.message))]):_c("p",{staticClass:"el-message__content",domProps:{innerHTML:_vm._s(_vm.message)}})]),_vm.showClose?_c("i",{staticClass:"el-message__closeBtn el-icon-close",on:{click:_vm.close}}):_vm._e()],2)]);};var mainvue_type_template_id_455b9f60_staticRenderFns=[];mainvue_type_template_id_455b9f60_render._withStripped=true;// CONCATENATED MODULE: ./packages/message/src/main.vue?vue&type=template&id=455b9f60&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/message/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var src_mainvue_type_script_lang_js_typeMap={success:'success',info:'info',warning:'warning',error:'error'};/* harmony default export */var message_src_mainvue_type_script_lang_js_={data:function data(){return{visible:false,message:'',duration:3000,type:'info',iconClass:'',customClass:'',onClose:null,showClose:false,closed:false,verticalOffset:20,timer:null,dangerouslyUseHTMLString:false,center:false};},computed:{typeClass:function typeClass(){return this.type&&!this.iconClass?'el-message__icon el-icon-'+src_mainvue_type_script_lang_js_typeMap[this.type]:'';},positionStyle:function positionStyle(){return{'top':this.verticalOffset+'px'};}},watch:{closed:function closed(newVal){if(newVal){this.visible=false;}}},methods:{handleAfterLeave:function handleAfterLeave(){this.$destroy(true);this.$el.parentNode.removeChild(this.$el);},close:function close(){this.closed=true;if(typeof this.onClose==='function'){this.onClose(this);}},clearTimer:function clearTimer(){clearTimeout(this.timer);},startTimer:function startTimer(){var _this=this;if(this.duration>0){this.timer=setTimeout(function(){if(!_this.closed){_this.close();}},this.duration);}},keydown:function keydown(e){if(e.keyCode===27){// esc关闭消息
if(!this.closed){this.close();}}}},mounted:function mounted(){this.startTimer();document.addEventListener('keydown',this.keydown);},beforeDestroy:function beforeDestroy(){document.removeEventListener('keydown',this.keydown);}};// CONCATENATED MODULE: ./packages/message/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_message_src_mainvue_type_script_lang_js_=message_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/message/src/main.vue
/* normalize component */var message_src_main_component=normalizeComponent(packages_message_src_mainvue_type_script_lang_js_,mainvue_type_template_id_455b9f60_render,mainvue_type_template_id_455b9f60_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var message_src_main_api; }message_src_main_component.options.__file="packages/message/src/main.vue";/* harmony default export */var message_src_main=message_src_main_component.exports;// CONCATENATED MODULE: ./packages/message/src/main.js
var MessageConstructor=external_vue_default.a.extend(message_src_main);var message_src_main_instance=void 0;var main_instances=[];var main_seed=1;var main_Message=function Message(options){if(external_vue_default.a.prototype.$isServer)return;options=options||{};if(typeof options==='string'){options={message:options};}var userOnClose=options.onClose;var id='message_'+main_seed++;options.onClose=function(){Message.close(id,userOnClose);};message_src_main_instance=new MessageConstructor({data:options});message_src_main_instance.id=id;if(Object(vdom_["isVNode"])(message_src_main_instance.message)){message_src_main_instance.$slots.default=[message_src_main_instance.message];message_src_main_instance.message=null;}message_src_main_instance.$mount();document.body.appendChild(message_src_main_instance.$el);var verticalOffset=options.offset||20;main_instances.forEach(function(item){verticalOffset+=item.$el.offsetHeight+16;});message_src_main_instance.verticalOffset=verticalOffset;message_src_main_instance.visible=true;message_src_main_instance.$el.style.zIndex=popup_["PopupManager"].nextZIndex();main_instances.push(message_src_main_instance);return message_src_main_instance;};['success','warning','info','error'].forEach(function(type){main_Message[type]=function(options){if(typeof options==='string'){options={message:options};}options.type=type;return main_Message(options);};});main_Message.close=function(id,userOnClose){var len=main_instances.length;var index=-1;var removedHeight=void 0;for(var i=0;i<len;i++){if(id===main_instances[i].id){removedHeight=main_instances[i].$el.offsetHeight;index=i;if(typeof userOnClose==='function'){userOnClose(main_instances[i]);}main_instances.splice(i,1);break;}}if(len<=1||index===-1||index>main_instances.length-1)return;for(var _i=index;_i<len-1;_i++){var dom=main_instances[_i].$el;dom.style['top']=parseInt(dom.style['top'],10)-removedHeight-16+'px';}};main_Message.closeAll=function(){for(var i=main_instances.length-1;i>=0;i--){main_instances[i].close();}};/* harmony default export */var packages_message_src_main=main_Message;// CONCATENATED MODULE: ./packages/message/index.js
/* harmony default export */var packages_message=packages_message_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/badge/src/main.vue?vue&type=template&id=7ccb6598&
var mainvue_type_template_id_7ccb6598_render=function mainvue_type_template_id_7ccb6598_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-badge"},[_vm._t("default"),_c("transition",{attrs:{name:"el-zoom-in-center"}},[_c("sup",{directives:[{name:"show",rawName:"v-show",value:!_vm.hidden&&(_vm.content||_vm.content===0||_vm.isDot),expression:"!hidden && (content || content === 0 || isDot)"}],staticClass:"el-badge__content",class:["el-badge__content--"+_vm.type,{"is-fixed":_vm.$slots.default,"is-dot":_vm.isDot}],domProps:{textContent:_vm._s(_vm.content)}})])],2);};var mainvue_type_template_id_7ccb6598_staticRenderFns=[];mainvue_type_template_id_7ccb6598_render._withStripped=true;// CONCATENATED MODULE: ./packages/badge/src/main.vue?vue&type=template&id=7ccb6598&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/badge/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var badge_src_mainvue_type_script_lang_js_={name:'ElBadge',props:{value:[String,Number],max:Number,isDot:Boolean,hidden:Boolean,type:{type:String,validator:function validator(val){return['primary','success','warning','info','danger'].indexOf(val)>-1;}}},computed:{content:function content(){if(this.isDot)return;var value=this.value;var max=this.max;if(typeof value==='number'&&typeof max==='number'){return max<value?max+'+':value;}return value;}}};// CONCATENATED MODULE: ./packages/badge/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_badge_src_mainvue_type_script_lang_js_=badge_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/badge/src/main.vue
/* normalize component */var badge_src_main_component=normalizeComponent(packages_badge_src_mainvue_type_script_lang_js_,mainvue_type_template_id_7ccb6598_render,mainvue_type_template_id_7ccb6598_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var badge_src_main_api; }badge_src_main_component.options.__file="packages/badge/src/main.vue";/* harmony default export */var badge_src_main=badge_src_main_component.exports;// CONCATENATED MODULE: ./packages/badge/index.js
/* istanbul ignore next */badge_src_main.install=function(Vue){Vue.component(badge_src_main.name,badge_src_main);};/* harmony default export */var badge=badge_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/card/src/main.vue?vue&type=template&id=59a4a40f&
var mainvue_type_template_id_59a4a40f_render=function mainvue_type_template_id_59a4a40f_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-card",class:_vm.shadow?"is-"+_vm.shadow+"-shadow":"is-always-shadow"},[_vm.$slots.header||_vm.header?_c("div",{staticClass:"el-card__header"},[_vm._t("header",[_vm._v(_vm._s(_vm.header))])],2):_vm._e(),_c("div",{staticClass:"el-card__body",style:_vm.bodyStyle},[_vm._t("default")],2)]);};var mainvue_type_template_id_59a4a40f_staticRenderFns=[];mainvue_type_template_id_59a4a40f_render._withStripped=true;// CONCATENATED MODULE: ./packages/card/src/main.vue?vue&type=template&id=59a4a40f&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/card/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var card_src_mainvue_type_script_lang_js_={name:'ElCard',props:{header:{},bodyStyle:{},shadow:{type:String}}};// CONCATENATED MODULE: ./packages/card/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_card_src_mainvue_type_script_lang_js_=card_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/card/src/main.vue
/* normalize component */var card_src_main_component=normalizeComponent(packages_card_src_mainvue_type_script_lang_js_,mainvue_type_template_id_59a4a40f_render,mainvue_type_template_id_59a4a40f_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var card_src_main_api; }card_src_main_component.options.__file="packages/card/src/main.vue";/* harmony default export */var card_src_main=card_src_main_component.exports;// CONCATENATED MODULE: ./packages/card/index.js
/* istanbul ignore next */card_src_main.install=function(Vue){Vue.component(card_src_main.name,card_src_main);};/* harmony default export */var card=card_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/rate/src/main.vue?vue&type=template&id=ada57782&
var mainvue_type_template_id_ada57782_render=function mainvue_type_template_id_ada57782_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-rate",attrs:{role:"slider","aria-valuenow":_vm.currentValue,"aria-valuetext":_vm.text,"aria-valuemin":"0","aria-valuemax":_vm.max,tabindex:"0"},on:{keydown:_vm.handleKey}},[_vm._l(_vm.max,function(item,key){return _c("span",{key:key,staticClass:"el-rate__item",style:{cursor:_vm.rateDisabled?"auto":"pointer"},on:{mousemove:function mousemove($event){_vm.setCurrentValue(item,$event);},mouseleave:_vm.resetCurrentValue,click:function click($event){_vm.selectValue(item);}}},[_c("i",{staticClass:"el-rate__icon",class:[_vm.classes[item-1],{hover:_vm.hoverIndex===item}],style:_vm.getIconStyle(item)},[_vm.showDecimalIcon(item)?_c("i",{staticClass:"el-rate__decimal",class:_vm.decimalIconClass,style:_vm.decimalStyle}):_vm._e()])]);}),_vm.showText||_vm.showScore?_c("span",{staticClass:"el-rate__text",style:{color:_vm.textColor}},[_vm._v(_vm._s(_vm.text))]):_vm._e()],2);};var mainvue_type_template_id_ada57782_staticRenderFns=[];mainvue_type_template_id_ada57782_render._withStripped=true;// CONCATENATED MODULE: ./packages/rate/src/main.vue?vue&type=template&id=ada57782&
// EXTERNAL MODULE: external "element-ui/lib/utils/types"
var types_=__webpack_require__(18);// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/rate/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var rate_src_mainvue_type_script_lang_js_={name:'ElRate',mixins:[migrating_default.a],inject:{elForm:{default:''}},data:function data(){return{pointerAtLeftHalf:true,currentValue:this.value,hoverIndex:-1};},props:{value:{type:Number,default:0},lowThreshold:{type:Number,default:2},highThreshold:{type:Number,default:4},max:{type:Number,default:5},colors:{type:[Array,Object],default:function _default(){return['#F7BA2A','#F7BA2A','#F7BA2A'];}},voidColor:{type:String,default:'#C6D1DE'},disabledVoidColor:{type:String,default:'#EFF2F7'},iconClasses:{type:[Array,Object],default:function _default(){return['el-icon-star-on','el-icon-star-on','el-icon-star-on'];}},voidIconClass:{type:String,default:'el-icon-star-off'},disabledVoidIconClass:{type:String,default:'el-icon-star-on'},disabled:{type:Boolean,default:false},allowHalf:{type:Boolean,default:false},showText:{type:Boolean,default:false},showScore:{type:Boolean,default:false},textColor:{type:String,default:'#1f2d3d'},texts:{type:Array,default:function _default(){return['极差','失望','一般','满意','惊喜'];}},scoreTemplate:{type:String,default:'{value}'}},computed:{text:function text(){var result='';if(this.showScore){result=this.scoreTemplate.replace(/\{\s*value\s*\}/,this.rateDisabled?this.value:this.currentValue);}else if(this.showText){result=this.texts[Math.ceil(this.currentValue)-1];}return result;},decimalStyle:function decimalStyle(){var width='';if(this.rateDisabled){width=this.valueDecimal+'%';}else if(this.allowHalf){width='50%';}return{color:this.activeColor,width:width};},valueDecimal:function valueDecimal(){return this.value*100-Math.floor(this.value)*100;},classMap:function classMap(){var _ref;return Array.isArray(this.iconClasses)?(_ref={},_ref[this.lowThreshold]=this.iconClasses[0],_ref[this.highThreshold]={value:this.iconClasses[1],excluded:true},_ref[this.max]=this.iconClasses[2],_ref):this.iconClasses;},decimalIconClass:function decimalIconClass(){return this.getValueFromMap(this.value,this.classMap);},voidClass:function voidClass(){return this.rateDisabled?this.disabledVoidIconClass:this.voidIconClass;},activeClass:function activeClass(){return this.getValueFromMap(this.currentValue,this.classMap);},colorMap:function colorMap(){var _ref2;return Array.isArray(this.colors)?(_ref2={},_ref2[this.lowThreshold]=this.colors[0],_ref2[this.highThreshold]={value:this.colors[1],excluded:true},_ref2[this.max]=this.colors[2],_ref2):this.colors;},activeColor:function activeColor(){return this.getValueFromMap(this.currentValue,this.colorMap);},classes:function classes(){var result=[];var i=0;var threshold=this.currentValue;if(this.allowHalf&&this.currentValue!==Math.floor(this.currentValue)){threshold--;}for(;i<threshold;i++){result.push(this.activeClass);}for(;i<this.max;i++){result.push(this.voidClass);}return result;},rateDisabled:function rateDisabled(){return this.disabled||(this.elForm||{}).disabled;}},watch:{value:function value(val){this.currentValue=val;this.pointerAtLeftHalf=this.value!==Math.floor(this.value);}},methods:{getMigratingConfig:function getMigratingConfig(){return{props:{'text-template':'text-template is renamed to score-template.'}};},getValueFromMap:function getValueFromMap(value,map){var matchedKeys=Object.keys(map).filter(function(key){var val=map[key];var excluded=Object(types_["isObject"])(val)?val.excluded:false;return excluded?value<key:value<=key;}).sort(function(a,b){return a-b;});var matchedValue=map[matchedKeys[0]];return Object(types_["isObject"])(matchedValue)?matchedValue.value:matchedValue||'';},showDecimalIcon:function showDecimalIcon(item){var showWhenDisabled=this.rateDisabled&&this.valueDecimal>0&&item-1<this.value&&item>this.value;/* istanbul ignore next */var showWhenAllowHalf=this.allowHalf&&this.pointerAtLeftHalf&&item-0.5<=this.currentValue&&item>this.currentValue;return showWhenDisabled||showWhenAllowHalf;},getIconStyle:function getIconStyle(item){var voidColor=this.rateDisabled?this.disabledVoidColor:this.voidColor;return{color:item<=this.currentValue?this.activeColor:voidColor};},selectValue:function selectValue(value){if(this.rateDisabled){return;}if(this.allowHalf&&this.pointerAtLeftHalf){this.$emit('input',this.currentValue);this.$emit('change',this.currentValue);}else{this.$emit('input',value);this.$emit('change',value);}},handleKey:function handleKey(e){if(this.rateDisabled){return;}var currentValue=this.currentValue;var keyCode=e.keyCode;if(keyCode===38||keyCode===39){// left / down
if(this.allowHalf){currentValue+=0.5;}else{currentValue+=1;}e.stopPropagation();e.preventDefault();}else if(keyCode===37||keyCode===40){if(this.allowHalf){currentValue-=0.5;}else{currentValue-=1;}e.stopPropagation();e.preventDefault();}currentValue=currentValue<0?0:currentValue;currentValue=currentValue>this.max?this.max:currentValue;this.$emit('input',currentValue);this.$emit('change',currentValue);},setCurrentValue:function setCurrentValue(value,event){if(this.rateDisabled){return;}/* istanbul ignore if */if(this.allowHalf){var target=event.target;if(Object(dom_["hasClass"])(target,'el-rate__item')){target=target.querySelector('.el-rate__icon');}if(Object(dom_["hasClass"])(target,'el-rate__decimal')){target=target.parentNode;}this.pointerAtLeftHalf=event.offsetX*2<=target.clientWidth;this.currentValue=this.pointerAtLeftHalf?value-0.5:value;}else{this.currentValue=value;}this.hoverIndex=value;},resetCurrentValue:function resetCurrentValue(){if(this.rateDisabled){return;}if(this.allowHalf){this.pointerAtLeftHalf=this.value!==Math.floor(this.value);}this.currentValue=this.value;this.hoverIndex=-1;}},created:function created(){if(!this.value){this.$emit('input',0);}}};// CONCATENATED MODULE: ./packages/rate/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_rate_src_mainvue_type_script_lang_js_=rate_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/rate/src/main.vue
/* normalize component */var rate_src_main_component=normalizeComponent(packages_rate_src_mainvue_type_script_lang_js_,mainvue_type_template_id_ada57782_render,mainvue_type_template_id_ada57782_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var rate_src_main_api; }rate_src_main_component.options.__file="packages/rate/src/main.vue";/* harmony default export */var rate_src_main=rate_src_main_component.exports;// CONCATENATED MODULE: ./packages/rate/index.js
/* istanbul ignore next */rate_src_main.install=function(Vue){Vue.component(rate_src_main.name,rate_src_main);};/* harmony default export */var rate=rate_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/steps/src/steps.vue?vue&type=template&id=3c6b6dc0&
var stepsvue_type_template_id_3c6b6dc0_render=function stepsvue_type_template_id_3c6b6dc0_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-steps",class:[!_vm.simple&&"el-steps--"+_vm.direction,_vm.simple&&"el-steps--simple"]},[_vm._t("default")],2);};var stepsvue_type_template_id_3c6b6dc0_staticRenderFns=[];stepsvue_type_template_id_3c6b6dc0_render._withStripped=true;// CONCATENATED MODULE: ./packages/steps/src/steps.vue?vue&type=template&id=3c6b6dc0&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/steps/src/steps.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var stepsvue_type_script_lang_js_={name:'ElSteps',mixins:[migrating_default.a],props:{space:[Number,String],active:Number,direction:{type:String,default:'horizontal'},alignCenter:Boolean,simple:Boolean,finishStatus:{type:String,default:'finish'},processStatus:{type:String,default:'process'}},data:function data(){return{steps:[],stepOffset:0};},methods:{getMigratingConfig:function getMigratingConfig(){return{props:{'center':'center is removed.'}};}},watch:{active:function active(newVal,oldVal){this.$emit('change',newVal,oldVal);},steps:function steps(_steps){_steps.forEach(function(child,index){child.index=index;});}}};// CONCATENATED MODULE: ./packages/steps/src/steps.vue?vue&type=script&lang=js&
/* harmony default export */var src_stepsvue_type_script_lang_js_=stepsvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/steps/src/steps.vue
/* normalize component */var steps_component=normalizeComponent(src_stepsvue_type_script_lang_js_,stepsvue_type_template_id_3c6b6dc0_render,stepsvue_type_template_id_3c6b6dc0_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var steps_api; }steps_component.options.__file="packages/steps/src/steps.vue";/* harmony default export */var steps=steps_component.exports;// CONCATENATED MODULE: ./packages/steps/index.js
/* istanbul ignore next */steps.install=function(Vue){Vue.component(steps.name,steps);};/* harmony default export */var packages_steps=steps;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/steps/src/step.vue?vue&type=template&id=f414a87a&
var stepvue_type_template_id_f414a87a_render=function stepvue_type_template_id_f414a87a_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-step",class:[!_vm.isSimple&&"is-"+_vm.$parent.direction,_vm.isSimple&&"is-simple",_vm.isLast&&!_vm.space&&!_vm.isCenter&&"is-flex",_vm.isCenter&&!_vm.isVertical&&!_vm.isSimple&&"is-center"],style:_vm.style},[_c("div",{staticClass:"el-step__head",class:"is-"+_vm.currentStatus},[_c("div",{staticClass:"el-step__line",style:_vm.isLast?"":{marginRight:_vm.$parent.stepOffset+"px"}},[_c("i",{staticClass:"el-step__line-inner",style:_vm.lineStyle})]),_c("div",{staticClass:"el-step__icon",class:"is-"+(_vm.icon?"icon":"text")},[_vm.currentStatus!=="success"&&_vm.currentStatus!=="error"?_vm._t("icon",[_vm.icon?_c("i",{staticClass:"el-step__icon-inner",class:[_vm.icon]}):_vm._e(),!_vm.icon&&!_vm.isSimple?_c("div",{staticClass:"el-step__icon-inner"},[_vm._v(_vm._s(_vm.index+1))]):_vm._e()]):_c("i",{staticClass:"el-step__icon-inner is-status",class:["el-icon-"+(_vm.currentStatus==="success"?"check":"close")]})],2)]),_c("div",{staticClass:"el-step__main"},[_c("div",{ref:"title",staticClass:"el-step__title",class:["is-"+_vm.currentStatus]},[_vm._t("title",[_vm._v(_vm._s(_vm.title))])],2),_vm.isSimple?_c("div",{staticClass:"el-step__arrow"}):_c("div",{staticClass:"el-step__description",class:["is-"+_vm.currentStatus]},[_vm._t("description",[_vm._v(_vm._s(_vm.description))])],2)])]);};var stepvue_type_template_id_f414a87a_staticRenderFns=[];stepvue_type_template_id_f414a87a_render._withStripped=true;// CONCATENATED MODULE: ./packages/steps/src/step.vue?vue&type=template&id=f414a87a&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/steps/src/step.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var stepvue_type_script_lang_js_={name:'ElStep',props:{title:String,icon:String,description:String,status:String},data:function data(){return{index:-1,lineStyle:{},internalStatus:''};},beforeCreate:function beforeCreate(){this.$parent.steps.push(this);},beforeDestroy:function beforeDestroy(){var steps=this.$parent.steps;var index=steps.indexOf(this);if(index>=0){steps.splice(index,1);}},computed:{currentStatus:function currentStatus(){return this.status||this.internalStatus;},prevStatus:function prevStatus(){var prevStep=this.$parent.steps[this.index-1];return prevStep?prevStep.currentStatus:'wait';},isCenter:function isCenter(){return this.$parent.alignCenter;},isVertical:function isVertical(){return this.$parent.direction==='vertical';},isSimple:function isSimple(){return this.$parent.simple;},isLast:function isLast(){var parent=this.$parent;return parent.steps[parent.steps.length-1]===this;},stepsCount:function stepsCount(){return this.$parent.steps.length;},space:function space(){var isSimple=this.isSimple,space=this.$parent.space;return isSimple?'':space;},style:function style(){var style={};var parent=this.$parent;var len=parent.steps.length;var space=typeof this.space==='number'?this.space+'px':this.space?this.space:100/(len-(this.isCenter?0:1))+'%';style.flexBasis=space;if(this.isVertical)return style;if(this.isLast){style.maxWidth=100/this.stepsCount+'%';}else{style.marginRight=-this.$parent.stepOffset+'px';}return style;}},methods:{updateStatus:function updateStatus(val){var prevChild=this.$parent.$children[this.index-1];if(val>this.index){this.internalStatus=this.$parent.finishStatus;}else if(val===this.index&&this.prevStatus!=='error'){this.internalStatus=this.$parent.processStatus;}else{this.internalStatus='wait';}if(prevChild)prevChild.calcProgress(this.internalStatus);},calcProgress:function calcProgress(status){var step=100;var style={};style.transitionDelay=150*this.index+'ms';if(status===this.$parent.processStatus){step=this.currentStatus!=='error'?0:0;}else if(status==='wait'){step=0;style.transitionDelay=-150*this.index+'ms';}style.borderWidth=step&&!this.isSimple?'1px':0;this.$parent.direction==='vertical'?style.height=step+'%':style.width=step+'%';this.lineStyle=style;}},mounted:function mounted(){var _this=this;var unwatch=this.$watch('index',function(val){_this.$watch('$parent.active',_this.updateStatus,{immediate:true});_this.$watch('$parent.processStatus',function(){var activeIndex=_this.$parent.active;_this.updateStatus(activeIndex);},{immediate:true});unwatch();});}};// CONCATENATED MODULE: ./packages/steps/src/step.vue?vue&type=script&lang=js&
/* harmony default export */var src_stepvue_type_script_lang_js_=stepvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/steps/src/step.vue
/* normalize component */var step_component=normalizeComponent(src_stepvue_type_script_lang_js_,stepvue_type_template_id_f414a87a_render,stepvue_type_template_id_f414a87a_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var step_api; }step_component.options.__file="packages/steps/src/step.vue";/* harmony default export */var step=step_component.exports;// CONCATENATED MODULE: ./packages/step/index.js
/* istanbul ignore next */step.install=function(Vue){Vue.component(step.name,step);};/* harmony default export */var packages_step=step;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/carousel/src/main.vue?vue&type=template&id=5d5d1482&
var mainvue_type_template_id_5d5d1482_render=function mainvue_type_template_id_5d5d1482_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{class:_vm.carouselClasses,on:{mouseenter:function mouseenter($event){$event.stopPropagation();return _vm.handleMouseEnter($event);},mouseleave:function mouseleave($event){$event.stopPropagation();return _vm.handleMouseLeave($event);}}},[_c("div",{staticClass:"el-carousel__container",style:{height:_vm.height}},[_vm.arrowDisplay?_c("transition",{attrs:{name:"carousel-arrow-left"}},[_c("button",{directives:[{name:"show",rawName:"v-show",value:(_vm.arrow==="always"||_vm.hover)&&(_vm.loop||_vm.activeIndex>0),expression:"(arrow === 'always' || hover) && (loop || activeIndex > 0)"}],staticClass:"el-carousel__arrow el-carousel__arrow--left",attrs:{type:"button"},on:{mouseenter:function mouseenter($event){_vm.handleButtonEnter("left");},mouseleave:_vm.handleButtonLeave,click:function click($event){$event.stopPropagation();_vm.throttledArrowClick(_vm.activeIndex-1);}}},[_c("i",{staticClass:"el-icon-arrow-left"})])]):_vm._e(),_vm.arrowDisplay?_c("transition",{attrs:{name:"carousel-arrow-right"}},[_c("button",{directives:[{name:"show",rawName:"v-show",value:(_vm.arrow==="always"||_vm.hover)&&(_vm.loop||_vm.activeIndex<_vm.items.length-1),expression:"(arrow === 'always' || hover) && (loop || activeIndex < items.length - 1)"}],staticClass:"el-carousel__arrow el-carousel__arrow--right",attrs:{type:"button"},on:{mouseenter:function mouseenter($event){_vm.handleButtonEnter("right");},mouseleave:_vm.handleButtonLeave,click:function click($event){$event.stopPropagation();_vm.throttledArrowClick(_vm.activeIndex+1);}}},[_c("i",{staticClass:"el-icon-arrow-right"})])]):_vm._e(),_vm._t("default")],2),_vm.indicatorPosition!=="none"?_c("ul",{class:_vm.indicatorsClasses},_vm._l(_vm.items,function(item,index){return _c("li",{key:index,class:["el-carousel__indicator","el-carousel__indicator--"+_vm.direction,{"is-active":index===_vm.activeIndex}],on:{mouseenter:function mouseenter($event){_vm.throttledIndicatorHover(index);},click:function click($event){$event.stopPropagation();_vm.handleIndicatorClick(index);}}},[_c("button",{staticClass:"el-carousel__button"},[_vm.hasLabel?_c("span",[_vm._v(_vm._s(item.label))]):_vm._e()])]);}),0):_vm._e()]);};var mainvue_type_template_id_5d5d1482_staticRenderFns=[];mainvue_type_template_id_5d5d1482_render._withStripped=true;// CONCATENATED MODULE: ./packages/carousel/src/main.vue?vue&type=template&id=5d5d1482&
// EXTERNAL MODULE: external "throttle-debounce/throttle"
var throttle_=__webpack_require__(25);var throttle_default=/*#__PURE__*/__webpack_require__.n(throttle_);// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/carousel/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var carousel_src_mainvue_type_script_lang_js_={name:'ElCarousel',props:{initialIndex:{type:Number,default:0},height:String,trigger:{type:String,default:'hover'},autoplay:{type:Boolean,default:true},interval:{type:Number,default:3000},indicatorPosition:String,indicator:{type:Boolean,default:true},arrow:{type:String,default:'hover'},type:String,loop:{type:Boolean,default:true},direction:{type:String,default:'horizontal',validator:function validator(val){return['horizontal','vertical'].indexOf(val)!==-1;}}},data:function data(){return{items:[],activeIndex:-1,containerWidth:0,timer:null,hover:false};},computed:{arrowDisplay:function arrowDisplay(){return this.arrow!=='never'&&this.direction!=='vertical';},hasLabel:function hasLabel(){return this.items.some(function(item){return item.label.toString().length>0;});},carouselClasses:function carouselClasses(){var classes=['el-carousel','el-carousel--'+this.direction];if(this.type==='card'){classes.push('el-carousel--card');}return classes;},indicatorsClasses:function indicatorsClasses(){var classes=['el-carousel__indicators','el-carousel__indicators--'+this.direction];if(this.hasLabel){classes.push('el-carousel__indicators--labels');}if(this.indicatorPosition==='outside'||this.type==='card'){classes.push('el-carousel__indicators--outside');}return classes;}},watch:{items:function items(val){if(val.length>0)this.setActiveItem(this.initialIndex);},activeIndex:function activeIndex(val,oldVal){this.resetItemPosition(oldVal);if(oldVal>-1){this.$emit('change',val,oldVal);}},autoplay:function autoplay(val){val?this.startTimer():this.pauseTimer();},loop:function loop(){this.setActiveItem(this.activeIndex);}},methods:{handleMouseEnter:function handleMouseEnter(){this.hover=true;this.pauseTimer();},handleMouseLeave:function handleMouseLeave(){this.hover=false;this.startTimer();},itemInStage:function itemInStage(item,index){var length=this.items.length;if(index===length-1&&item.inStage&&this.items[0].active||item.inStage&&this.items[index+1]&&this.items[index+1].active){return'left';}else if(index===0&&item.inStage&&this.items[length-1].active||item.inStage&&this.items[index-1]&&this.items[index-1].active){return'right';}return false;},handleButtonEnter:function handleButtonEnter(arrow){var _this=this;if(this.direction==='vertical')return;this.items.forEach(function(item,index){if(arrow===_this.itemInStage(item,index)){item.hover=true;}});},handleButtonLeave:function handleButtonLeave(){if(this.direction==='vertical')return;this.items.forEach(function(item){item.hover=false;});},updateItems:function updateItems(){this.items=this.$children.filter(function(child){return child.$options.name==='ElCarouselItem';});},resetItemPosition:function resetItemPosition(oldIndex){var _this2=this;this.items.forEach(function(item,index){item.translateItem(index,_this2.activeIndex,oldIndex);});},playSlides:function playSlides(){if(this.activeIndex<this.items.length-1){this.activeIndex++;}else if(this.loop){this.activeIndex=0;}},pauseTimer:function pauseTimer(){if(this.timer){clearInterval(this.timer);this.timer=null;}},startTimer:function startTimer(){if(this.interval<=0||!this.autoplay||this.timer)return;this.timer=setInterval(this.playSlides,this.interval);},setActiveItem:function setActiveItem(index){if(typeof index==='string'){var filteredItems=this.items.filter(function(item){return item.name===index;});if(filteredItems.length>0){index=this.items.indexOf(filteredItems[0]);}}index=Number(index);if(isNaN(index)||index!==Math.floor(index)){console.warn('[Element Warn][Carousel]index must be an integer.');return;}var length=this.items.length;var oldIndex=this.activeIndex;if(index<0){this.activeIndex=this.loop?length-1:0;}else if(index>=length){this.activeIndex=this.loop?0:length-1;}else{this.activeIndex=index;}if(oldIndex===this.activeIndex){this.resetItemPosition(oldIndex);}},prev:function prev(){this.setActiveItem(this.activeIndex-1);},next:function next(){this.setActiveItem(this.activeIndex+1);},handleIndicatorClick:function handleIndicatorClick(index){this.activeIndex=index;},handleIndicatorHover:function handleIndicatorHover(index){if(this.trigger==='hover'&&index!==this.activeIndex){this.activeIndex=index;}}},created:function created(){var _this3=this;this.throttledArrowClick=throttle_default()(300,true,function(index){_this3.setActiveItem(index);});this.throttledIndicatorHover=throttle_default()(300,function(index){_this3.handleIndicatorHover(index);});},mounted:function mounted(){var _this4=this;this.updateItems();this.$nextTick(function(){Object(resize_event_["addResizeListener"])(_this4.$el,_this4.resetItemPosition);if(_this4.initialIndex<_this4.items.length&&_this4.initialIndex>=0){_this4.activeIndex=_this4.initialIndex;}_this4.startTimer();});},beforeDestroy:function beforeDestroy(){if(this.$el)Object(resize_event_["removeResizeListener"])(this.$el,this.resetItemPosition);this.pauseTimer();}};// CONCATENATED MODULE: ./packages/carousel/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_carousel_src_mainvue_type_script_lang_js_=carousel_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/carousel/src/main.vue
/* normalize component */var carousel_src_main_component=normalizeComponent(packages_carousel_src_mainvue_type_script_lang_js_,mainvue_type_template_id_5d5d1482_render,mainvue_type_template_id_5d5d1482_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var carousel_src_main_api; }carousel_src_main_component.options.__file="packages/carousel/src/main.vue";/* harmony default export */var carousel_src_main=carousel_src_main_component.exports;// CONCATENATED MODULE: ./packages/carousel/index.js
/* istanbul ignore next */carousel_src_main.install=function(Vue){Vue.component(carousel_src_main.name,carousel_src_main);};/* harmony default export */var carousel=carousel_src_main;// CONCATENATED MODULE: ./packages/scrollbar/src/util.js
var BAR_MAP={vertical:{offset:'offsetHeight',scroll:'scrollTop',scrollSize:'scrollHeight',size:'height',key:'vertical',axis:'Y',client:'clientY',direction:'top'},horizontal:{offset:'offsetWidth',scroll:'scrollLeft',scrollSize:'scrollWidth',size:'width',key:'horizontal',axis:'X',client:'clientX',direction:'left'}};function renderThumbStyle(_ref){var move=_ref.move,size=_ref.size,bar=_ref.bar;var style={};var translate='translate'+bar.axis+'('+move+'%)';style[bar.size]=size;style.transform=translate;style.msTransform=translate;style.webkitTransform=translate;return style;};// CONCATENATED MODULE: ./packages/scrollbar/src/bar.js
/* istanbul ignore next */ /* harmony default export */var src_bar={name:'Bar',props:{vertical:Boolean,size:String,move:Number},computed:{bar:function bar(){return BAR_MAP[this.vertical?'vertical':'horizontal'];},wrap:function wrap(){return this.$parent.wrap;}},render:function render(h){var size=this.size,move=this.move,bar=this.bar;return h('div',{'class':['el-scrollbar__bar','is-'+bar.key],on:{'mousedown':this.clickTrackHandler}},[h('div',{ref:'thumb','class':'el-scrollbar__thumb',on:{'mousedown':this.clickThumbHandler},style:renderThumbStyle({size:size,move:move,bar:bar})})]);},methods:{clickThumbHandler:function clickThumbHandler(e){// prevent click event of right button
if(e.ctrlKey||e.button===2){return;}this.startDrag(e);this[this.bar.axis]=e.currentTarget[this.bar.offset]-(e[this.bar.client]-e.currentTarget.getBoundingClientRect()[this.bar.direction]);},clickTrackHandler:function clickTrackHandler(e){var offset=Math.abs(e.target.getBoundingClientRect()[this.bar.direction]-e[this.bar.client]);var thumbHalf=this.$refs.thumb[this.bar.offset]/2;var thumbPositionPercentage=(offset-thumbHalf)*100/this.$el[this.bar.offset];this.wrap[this.bar.scroll]=thumbPositionPercentage*this.wrap[this.bar.scrollSize]/100;},startDrag:function startDrag(e){e.stopImmediatePropagation();this.cursorDown=true;Object(dom_["on"])(document,'mousemove',this.mouseMoveDocumentHandler);Object(dom_["on"])(document,'mouseup',this.mouseUpDocumentHandler);document.onselectstart=function(){return false;};},mouseMoveDocumentHandler:function mouseMoveDocumentHandler(e){if(this.cursorDown===false)return;var prevPage=this[this.bar.axis];if(!prevPage)return;var offset=(this.$el.getBoundingClientRect()[this.bar.direction]-e[this.bar.client])*-1;var thumbClickPosition=this.$refs.thumb[this.bar.offset]-prevPage;var thumbPositionPercentage=(offset-thumbClickPosition)*100/this.$el[this.bar.offset];this.wrap[this.bar.scroll]=thumbPositionPercentage*this.wrap[this.bar.scrollSize]/100;},mouseUpDocumentHandler:function mouseUpDocumentHandler(e){this.cursorDown=false;this[this.bar.axis]=0;Object(dom_["off"])(document,'mousemove',this.mouseMoveDocumentHandler);document.onselectstart=null;}},destroyed:function destroyed(){Object(dom_["off"])(document,'mouseup',this.mouseUpDocumentHandler);}};// CONCATENATED MODULE: ./packages/scrollbar/src/main.js
// reference https://github.com/noeldelgado/gemini-scrollbar/blob/master/index.js
/* istanbul ignore next */ /* harmony default export */var scrollbar_src_main={name:'ElScrollbar',components:{Bar:src_bar},props:{native:Boolean,wrapStyle:{},wrapClass:{},viewClass:{},viewStyle:{},noresize:Boolean,// 如果 container 尺寸不会发生变化，最好设置它可以优化性能
tag:{type:String,default:'div'}},data:function data(){return{sizeWidth:'0',sizeHeight:'0',moveX:0,moveY:0};},computed:{wrap:function wrap(){return this.$refs.wrap;}},render:function render(h){var gutter=scrollbar_width_default()();var style=this.wrapStyle;if(gutter){var gutterWith='-'+gutter+'px';var gutterStyle='margin-bottom: '+gutterWith+'; margin-right: '+gutterWith+';';if(Array.isArray(this.wrapStyle)){style=Object(util_["toObject"])(this.wrapStyle);style.marginRight=style.marginBottom=gutterWith;}else if(typeof this.wrapStyle==='string'){style+=gutterStyle;}else{style=gutterStyle;}}var view=h(this.tag,{class:['el-scrollbar__view',this.viewClass],style:this.viewStyle,ref:'resize'},this.$slots.default);var wrap=h('div',{ref:'wrap',style:style,on:{'scroll':this.handleScroll},'class':[this.wrapClass,'el-scrollbar__wrap',gutter?'':'el-scrollbar__wrap--hidden-default']},[[view]]);var nodes=void 0;if(!this.native){nodes=[wrap,h(src_bar,{attrs:{move:this.moveX,size:this.sizeWidth}}),h(src_bar,{attrs:{vertical:true,move:this.moveY,size:this.sizeHeight}})];}else{nodes=[h('div',{ref:'wrap','class':[this.wrapClass,'el-scrollbar__wrap'],style:style},[[view]])];}return h('div',{class:'el-scrollbar'},nodes);},methods:{handleScroll:function handleScroll(){var wrap=this.wrap;this.moveY=wrap.scrollTop*100/wrap.clientHeight;this.moveX=wrap.scrollLeft*100/wrap.clientWidth;},update:function update(){var heightPercentage=void 0,widthPercentage=void 0;var wrap=this.wrap;if(!wrap)return;heightPercentage=wrap.clientHeight*100/wrap.scrollHeight;widthPercentage=wrap.clientWidth*100/wrap.scrollWidth;this.sizeHeight=heightPercentage<100?heightPercentage+'%':'';this.sizeWidth=widthPercentage<100?widthPercentage+'%':'';}},mounted:function mounted(){if(this.native)return;this.$nextTick(this.update);!this.noresize&&Object(resize_event_["addResizeListener"])(this.$refs.resize,this.update);},beforeDestroy:function beforeDestroy(){if(this.native)return;!this.noresize&&Object(resize_event_["removeResizeListener"])(this.$refs.resize,this.update);}};// CONCATENATED MODULE: ./packages/scrollbar/index.js
/* istanbul ignore next */scrollbar_src_main.install=function(Vue){Vue.component(scrollbar_src_main.name,scrollbar_src_main);};/* harmony default export */var scrollbar=scrollbar_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/carousel/src/item.vue?vue&type=template&id=1801ae19&
var itemvue_type_template_id_1801ae19_render=function itemvue_type_template_id_1801ae19_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.ready,expression:"ready"}],staticClass:"el-carousel__item",class:{"is-active":_vm.active,"el-carousel__item--card":_vm.$parent.type==="card","is-in-stage":_vm.inStage,"is-hover":_vm.hover,"is-animating":_vm.animating},style:_vm.itemStyle,on:{click:_vm.handleItemClick}},[_vm.$parent.type==="card"?_c("div",{directives:[{name:"show",rawName:"v-show",value:!_vm.active,expression:"!active"}],staticClass:"el-carousel__mask"}):_vm._e(),_vm._t("default")],2);};var itemvue_type_template_id_1801ae19_staticRenderFns=[];itemvue_type_template_id_1801ae19_render._withStripped=true;// CONCATENATED MODULE: ./packages/carousel/src/item.vue?vue&type=template&id=1801ae19&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/carousel/src/item.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var CARD_SCALE=0.83;/* harmony default export */var itemvue_type_script_lang_js_={name:'ElCarouselItem',props:{name:String,label:{type:[String,Number],default:''}},data:function data(){return{hover:false,translate:0,scale:1,active:false,ready:false,inStage:false,animating:false};},methods:{processIndex:function processIndex(index,activeIndex,length){if(activeIndex===0&&index===length-1){return-1;}else if(activeIndex===length-1&&index===0){return length;}else if(index<activeIndex-1&&activeIndex-index>=length/2){return length+1;}else if(index>activeIndex+1&&index-activeIndex>=length/2){return-2;}return index;},calcCardTranslate:function calcCardTranslate(index,activeIndex){var parentWidth=this.$parent.$el.offsetWidth;if(this.inStage){return parentWidth*((2-CARD_SCALE)*(index-activeIndex)+1)/4;}else if(index<activeIndex){return-(1+CARD_SCALE)*parentWidth/4;}else{return(3+CARD_SCALE)*parentWidth/4;}},calcTranslate:function calcTranslate(index,activeIndex,isVertical){var distance=this.$parent.$el[isVertical?'offsetHeight':'offsetWidth'];return distance*(index-activeIndex);},translateItem:function translateItem(index,activeIndex,oldIndex){var parentType=this.$parent.type;var parentDirection=this.parentDirection;var length=this.$parent.items.length;if(parentType!=='card'&&oldIndex!==undefined){this.animating=index===activeIndex||index===oldIndex;}if(index!==activeIndex&&length>2&&this.$parent.loop){index=this.processIndex(index,activeIndex,length);}if(parentType==='card'){if(parentDirection==='vertical'){console.warn('[Element Warn][Carousel]vertical direction is not supported in card mode');}this.inStage=Math.round(Math.abs(index-activeIndex))<=1;this.active=index===activeIndex;this.translate=this.calcCardTranslate(index,activeIndex);this.scale=this.active?1:CARD_SCALE;}else{this.active=index===activeIndex;var isVertical=parentDirection==='vertical';this.translate=this.calcTranslate(index,activeIndex,isVertical);}this.ready=true;},handleItemClick:function handleItemClick(){var parent=this.$parent;if(parent&&parent.type==='card'){var index=parent.items.indexOf(this);parent.setActiveItem(index);}}},computed:{parentDirection:function parentDirection(){return this.$parent.direction;},itemStyle:function itemStyle(){var translateType=this.parentDirection==='vertical'?'translateY':'translateX';var value=translateType+'('+this.translate+'px) scale('+this.scale+')';var style={transform:value};return Object(util_["autoprefixer"])(style);}},created:function created(){this.$parent&&this.$parent.updateItems();},destroyed:function destroyed(){this.$parent&&this.$parent.updateItems();}};// CONCATENATED MODULE: ./packages/carousel/src/item.vue?vue&type=script&lang=js&
/* harmony default export */var src_itemvue_type_script_lang_js_=itemvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/carousel/src/item.vue
/* normalize component */var item_component=normalizeComponent(src_itemvue_type_script_lang_js_,itemvue_type_template_id_1801ae19_render,itemvue_type_template_id_1801ae19_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var item_api; }item_component.options.__file="packages/carousel/src/item.vue";/* harmony default export */var src_item=item_component.exports;// CONCATENATED MODULE: ./packages/carousel-item/index.js
/* istanbul ignore next */src_item.install=function(Vue){Vue.component(src_item.name,src_item);};/* harmony default export */var carousel_item=src_item;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/collapse/src/collapse.vue?vue&type=template&id=461d57f4&
var collapsevue_type_template_id_461d57f4_render=function collapsevue_type_template_id_461d57f4_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-collapse",attrs:{role:"tablist","aria-multiselectable":"true"}},[_vm._t("default")],2);};var collapsevue_type_template_id_461d57f4_staticRenderFns=[];collapsevue_type_template_id_461d57f4_render._withStripped=true;// CONCATENATED MODULE: ./packages/collapse/src/collapse.vue?vue&type=template&id=461d57f4&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/collapse/src/collapse.vue?vue&type=script&lang=js&
//
//
//
//
//
/* harmony default export */var collapsevue_type_script_lang_js_={name:'ElCollapse',componentName:'ElCollapse',props:{accordion:Boolean,value:{type:[Array,String,Number],default:function _default(){return[];}}},data:function data(){return{activeNames:[].concat(this.value)};},provide:function provide(){return{collapse:this};},watch:{value:function value(_value){this.activeNames=[].concat(_value);}},methods:{setActiveNames:function setActiveNames(activeNames){activeNames=[].concat(activeNames);var value=this.accordion?activeNames[0]:activeNames;this.activeNames=activeNames;this.$emit('input',value);this.$emit('change',value);},handleItemClick:function handleItemClick(item){if(this.accordion){this.setActiveNames((this.activeNames[0]||this.activeNames[0]===0)&&this.activeNames[0]===item.name?'':item.name);}else{var activeNames=this.activeNames.slice(0);var index=activeNames.indexOf(item.name);if(index>-1){activeNames.splice(index,1);}else{activeNames.push(item.name);}this.setActiveNames(activeNames);}}},created:function created(){this.$on('item-click',this.handleItemClick);}};// CONCATENATED MODULE: ./packages/collapse/src/collapse.vue?vue&type=script&lang=js&
/* harmony default export */var src_collapsevue_type_script_lang_js_=collapsevue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/collapse/src/collapse.vue
/* normalize component */var collapse_component=normalizeComponent(src_collapsevue_type_script_lang_js_,collapsevue_type_template_id_461d57f4_render,collapsevue_type_template_id_461d57f4_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var collapse_api; }collapse_component.options.__file="packages/collapse/src/collapse.vue";/* harmony default export */var collapse=collapse_component.exports;// CONCATENATED MODULE: ./packages/collapse/index.js
/* istanbul ignore next */collapse.install=function(Vue){Vue.component(collapse.name,collapse);};/* harmony default export */var packages_collapse=collapse;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/collapse/src/collapse-item.vue?vue&type=template&id=2d05faac&
var collapse_itemvue_type_template_id_2d05faac_render=function collapse_itemvue_type_template_id_2d05faac_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-collapse-item",class:{"is-active":_vm.isActive,"is-disabled":_vm.disabled}},[_c("div",{attrs:{role:"tab","aria-expanded":_vm.isActive,"aria-controls":"el-collapse-content-"+_vm.id,"aria-describedby":"el-collapse-content-"+_vm.id}},[_c("div",{staticClass:"el-collapse-item__header",class:{focusing:_vm.focusing,"is-active":_vm.isActive},attrs:{role:"button",id:"el-collapse-head-"+_vm.id,tabindex:_vm.disabled?undefined:0},on:{click:_vm.handleHeaderClick,keyup:function keyup($event){if(!("button"in $event)&&_vm._k($event.keyCode,"space",32,$event.key,[" ","Spacebar"])&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){return null;}$event.stopPropagation();return _vm.handleEnterClick($event);},focus:_vm.handleFocus,blur:function blur($event){_vm.focusing=false;}}},[_vm._t("title",[_vm._v(_vm._s(_vm.title))]),_c("i",{staticClass:"el-collapse-item__arrow el-icon-arrow-right",class:{"is-active":_vm.isActive}})],2)]),_c("el-collapse-transition",[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.isActive,expression:"isActive"}],staticClass:"el-collapse-item__wrap",attrs:{role:"tabpanel","aria-hidden":!_vm.isActive,"aria-labelledby":"el-collapse-head-"+_vm.id,id:"el-collapse-content-"+_vm.id}},[_c("div",{staticClass:"el-collapse-item__content"},[_vm._t("default")],2)])])],1);};var collapse_itemvue_type_template_id_2d05faac_staticRenderFns=[];collapse_itemvue_type_template_id_2d05faac_render._withStripped=true;// CONCATENATED MODULE: ./packages/collapse/src/collapse-item.vue?vue&type=template&id=2d05faac&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/collapse/src/collapse-item.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var collapse_itemvue_type_script_lang_js_={name:'ElCollapseItem',componentName:'ElCollapseItem',mixins:[emitter_default.a],components:{ElCollapseTransition:collapse_transition_default.a},data:function data(){return{contentWrapStyle:{height:'auto',display:'block'},contentHeight:0,focusing:false,isClick:false,id:Object(util_["generateId"])()};},inject:['collapse'],props:{title:String,name:{type:[String,Number],default:function _default(){return this._uid;}},disabled:Boolean},computed:{isActive:function isActive(){return this.collapse.activeNames.indexOf(this.name)>-1;}},methods:{handleFocus:function handleFocus(){var _this=this;setTimeout(function(){if(!_this.isClick){_this.focusing=true;}else{_this.isClick=false;}},50);},handleHeaderClick:function handleHeaderClick(){if(this.disabled)return;this.dispatch('ElCollapse','item-click',this);this.focusing=false;this.isClick=true;},handleEnterClick:function handleEnterClick(){this.dispatch('ElCollapse','item-click',this);}}};// CONCATENATED MODULE: ./packages/collapse/src/collapse-item.vue?vue&type=script&lang=js&
/* harmony default export */var src_collapse_itemvue_type_script_lang_js_=collapse_itemvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/collapse/src/collapse-item.vue
/* normalize component */var collapse_item_component=normalizeComponent(src_collapse_itemvue_type_script_lang_js_,collapse_itemvue_type_template_id_2d05faac_render,collapse_itemvue_type_template_id_2d05faac_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var collapse_item_api; }collapse_item_component.options.__file="packages/collapse/src/collapse-item.vue";/* harmony default export */var collapse_item=collapse_item_component.exports;// CONCATENATED MODULE: ./packages/collapse-item/index.js
/* istanbul ignore next */collapse_item.install=function(Vue){Vue.component(collapse_item.name,collapse_item);};/* harmony default export */var packages_collapse_item=collapse_item;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader/src/cascader.vue?vue&type=template&id=032537a6&
var cascadervue_type_template_id_032537a6_render=function cascadervue_type_template_id_032537a6_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:function value(){return _vm.toggleDropDownVisible(false);},expression:"() => toggleDropDownVisible(false)"}],ref:"reference",class:["el-cascader",_vm.realSize&&"el-cascader--"+_vm.realSize,{"is-disabled":_vm.isDisabled}],on:{mouseenter:function mouseenter($event){_vm.inputHover=true;},mouseleave:function mouseleave($event){_vm.inputHover=false;},click:function click(){return _vm.toggleDropDownVisible(_vm.readonly?undefined:true);},keydown:_vm.handleKeyDown}},[_c("el-input",{ref:"input",class:{"is-focus":_vm.dropDownVisible},attrs:{size:_vm.realSize,placeholder:_vm.placeholder,readonly:_vm.readonly,disabled:_vm.isDisabled,"validate-event":false},on:{focus:_vm.handleFocus,blur:_vm.handleBlur,input:_vm.handleInput},model:{value:_vm.multiple?_vm.presentText:_vm.inputValue,callback:function callback($$v){_vm.multiple?_vm.presentText:_vm.inputValue=$$v;},expression:"multiple ? presentText : inputValue"}},[_c("template",{slot:"suffix"},[_vm.clearBtnVisible?_c("i",{key:"clear",staticClass:"el-input__icon el-icon-circle-close",on:{click:function click($event){$event.stopPropagation();return _vm.handleClear($event);}}}):_c("i",{key:"arrow-down",class:["el-input__icon","el-icon-arrow-down",_vm.dropDownVisible&&"is-reverse"],on:{click:function click($event){$event.stopPropagation();_vm.toggleDropDownVisible();}}})])],2),_vm.multiple?_c("div",{staticClass:"el-cascader__tags"},[_vm._l(_vm.presentTags,function(tag,index){return _c("el-tag",{key:tag.key,attrs:{type:"info",size:_vm.tagSize,hit:tag.hitState,closable:tag.closable,"disable-transitions":""},on:{close:function close($event){_vm.deleteTag(index);}}},[_c("span",[_vm._v(_vm._s(tag.text))])]);}),_vm.filterable&&!_vm.isDisabled?_c("input",{directives:[{name:"model",rawName:"v-model.trim",value:_vm.inputValue,expression:"inputValue",modifiers:{trim:true}}],staticClass:"el-cascader__search-input",attrs:{type:"text",placeholder:_vm.presentTags.length?"":_vm.placeholder},domProps:{value:_vm.inputValue},on:{input:[function($event){if($event.target.composing){return;}_vm.inputValue=$event.target.value.trim();},function(e){return _vm.handleInput(_vm.inputValue,e);}],click:function click($event){$event.stopPropagation();_vm.toggleDropDownVisible(true);},keydown:function keydown($event){if(!("button"in $event)&&_vm._k($event.keyCode,"delete",[8,46],$event.key,["Backspace","Delete","Del"])){return null;}return _vm.handleDelete($event);},blur:function blur($event){_vm.$forceUpdate();}}}):_vm._e()],2):_vm._e(),_c("transition",{attrs:{name:"el-zoom-in-top"},on:{"after-leave":_vm.handleDropdownLeave}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.dropDownVisible,expression:"dropDownVisible"}],ref:"popper",class:["el-popper","el-cascader__dropdown",_vm.popperClass]},[_c("el-cascader-panel",{directives:[{name:"show",rawName:"v-show",value:!_vm.filtering,expression:"!filtering"}],ref:"panel",attrs:{options:_vm.options,props:_vm.config,border:false,"render-label":_vm.$scopedSlots.default},on:{"expand-change":_vm.handleExpandChange,close:function close($event){_vm.toggleDropDownVisible(false);}},model:{value:_vm.checkedValue,callback:function callback($$v){_vm.checkedValue=$$v;},expression:"checkedValue"}}),_vm.filterable?_c("el-scrollbar",{directives:[{name:"show",rawName:"v-show",value:_vm.filtering,expression:"filtering"}],ref:"suggestionPanel",staticClass:"el-cascader__suggestion-panel",attrs:{tag:"ul","view-class":"el-cascader__suggestion-list"},nativeOn:{keydown:function keydown($event){return _vm.handleSuggestionKeyDown($event);}}},[_vm.suggestions.length?_vm._l(_vm.suggestions,function(item,index){return _c("li",{key:item.uid,class:["el-cascader__suggestion-item",item.checked&&"is-checked"],attrs:{tabindex:-1},on:{click:function click($event){_vm.handleSuggestionClick(index);}}},[_c("span",[_vm._v(_vm._s(item.text))]),item.checked?_c("i",{staticClass:"el-icon-check"}):_vm._e()]);}):_vm._t("empty",[_c("li",{staticClass:"el-cascader__empty-text"},[_vm._v(_vm._s(_vm.t("el.cascader.noMatch")))])])],2):_vm._e()],1)])],1);};var cascadervue_type_template_id_032537a6_staticRenderFns=[];cascadervue_type_template_id_032537a6_render._withStripped=true;// CONCATENATED MODULE: ./packages/cascader/src/cascader.vue?vue&type=template&id=032537a6&
// EXTERNAL MODULE: external "element-ui/lib/cascader-panel"
var cascader_panel_=__webpack_require__(42);var cascader_panel_default=/*#__PURE__*/__webpack_require__.n(cascader_panel_);// EXTERNAL MODULE: external "element-ui/lib/utils/aria-utils"
var aria_utils_=__webpack_require__(28);var aria_utils_default=/*#__PURE__*/__webpack_require__.n(aria_utils_);// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader/src/cascader.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var KeyCode=aria_utils_default.a.keys;var MigratingProps={expandTrigger:{newProp:'expandTrigger',type:String},changeOnSelect:{newProp:'checkStrictly',type:Boolean},hoverThreshold:{newProp:'hoverThreshold',type:Number}};var PopperMixin={props:{placement:{type:String,default:'bottom-start'},appendToBody:vue_popper_default.a.props.appendToBody,visibleArrow:{type:Boolean,default:true},arrowOffset:vue_popper_default.a.props.arrowOffset,offset:vue_popper_default.a.props.offset,boundariesPadding:vue_popper_default.a.props.boundariesPadding,popperOptions:vue_popper_default.a.props.popperOptions},methods:vue_popper_default.a.methods,data:vue_popper_default.a.data,beforeDestroy:vue_popper_default.a.beforeDestroy};var InputSizeMap={medium:36,small:32,mini:28};/* harmony default export */var cascadervue_type_script_lang_js_={name:'ElCascader',directives:{Clickoutside:clickoutside_default.a},mixins:[PopperMixin,emitter_default.a,locale_default.a,migrating_default.a],inject:{elForm:{default:''},elFormItem:{default:''}},components:{ElInput:input_default.a,ElTag:tag_default.a,ElScrollbar:scrollbar_default.a,ElCascaderPanel:cascader_panel_default.a},props:{value:{},options:Array,props:Object,size:String,placeholder:{type:String,default:function _default(){return Object(lib_locale_["t"])('el.cascader.placeholder');}},disabled:Boolean,clearable:Boolean,filterable:Boolean,filterMethod:Function,separator:{type:String,default:' / '},showAllLevels:{type:Boolean,default:true},collapseTags:Boolean,debounce:{type:Number,default:300},beforeFilter:{type:Function,default:function _default(){return function(){};}},popperClass:String},data:function data(){return{dropDownVisible:false,checkedValue:this.value||null,inputHover:false,inputValue:null,presentText:null,presentTags:[],checkedNodes:[],filtering:false,suggestions:[],inputInitialHeight:0,pressDeleteCount:0};},computed:{realSize:function realSize(){var _elFormItemSize=(this.elFormItem||{}).elFormItemSize;return this.size||_elFormItemSize||(this.$ELEMENT||{}).size;},tagSize:function tagSize(){return['small','mini'].indexOf(this.realSize)>-1?'mini':'small';},isDisabled:function isDisabled(){return this.disabled||(this.elForm||{}).disabled;},config:function config(){var config=this.props||{};var $attrs=this.$attrs;Object.keys(MigratingProps).forEach(function(oldProp){var _MigratingProps$oldPr=MigratingProps[oldProp],newProp=_MigratingProps$oldPr.newProp,type=_MigratingProps$oldPr.type;var oldValue=$attrs[oldProp]||$attrs[Object(util_["kebabCase"])(oldProp)];if(Object(shared_["isDef"])(oldProp)&&!Object(shared_["isDef"])(config[newProp])){if(type===Boolean&&oldValue===''){oldValue=true;}config[newProp]=oldValue;}});return config;},multiple:function multiple(){return this.config.multiple;},leafOnly:function leafOnly(){return!this.config.checkStrictly;},readonly:function readonly(){return!this.filterable||this.multiple;},clearBtnVisible:function clearBtnVisible(){if(!this.clearable||this.isDisabled||this.filtering||!this.inputHover){return false;}return this.multiple?!!this.checkedNodes.filter(function(node){return!node.isDisabled;}).length:!!this.presentText;},panel:function panel(){return this.$refs.panel;}},watch:{disabled:function disabled(){this.computePresentContent();},value:function value(val){if(!Object(util_["isEqual"])(val,this.checkedValue)){this.checkedValue=val;this.computePresentContent();}},checkedValue:function checkedValue(val){var value=this.value,dropDownVisible=this.dropDownVisible;var _config=this.config,checkStrictly=_config.checkStrictly,multiple=_config.multiple;if(!Object(util_["isEqual"])(val,value)||Object(types_["isUndefined"])(value)){this.computePresentContent();// hide dropdown when single mode
if(!multiple&&!checkStrictly&&dropDownVisible){this.toggleDropDownVisible(false);}this.$emit('input',val);this.$emit('change',val);this.dispatch('ElFormItem','el.form.change',[val]);}},options:{handler:function handler(){this.$nextTick(this.computePresentContent);},deep:true},presentText:function presentText(val){this.inputValue=val;},presentTags:function presentTags(val,oldVal){if(this.multiple&&(val.length||oldVal.length)){this.$nextTick(this.updateStyle);}},filtering:function filtering(val){this.$nextTick(this.updatePopper);}},mounted:function mounted(){var _this=this;var input=this.$refs.input;if(input&&input.$el){this.inputInitialHeight=input.$el.offsetHeight||InputSizeMap[this.realSize]||40;}if(!Object(util_["isEmpty"])(this.value)){this.computePresentContent();}this.filterHandler=debounce_default()(this.debounce,function(){var inputValue=_this.inputValue;if(!inputValue){_this.filtering=false;return;}var before=_this.beforeFilter(inputValue);if(before&&before.then){before.then(_this.getSuggestions);}else if(before!==false){_this.getSuggestions();}else{_this.filtering=false;}});Object(resize_event_["addResizeListener"])(this.$el,this.updateStyle);},beforeDestroy:function beforeDestroy(){Object(resize_event_["removeResizeListener"])(this.$el,this.updateStyle);},methods:{getMigratingConfig:function getMigratingConfig(){return{props:{'expand-trigger':'expand-trigger is removed, use `props.expandTrigger` instead.','change-on-select':'change-on-select is removed, use `props.checkStrictly` instead.','hover-threshold':'hover-threshold is removed, use `props.hoverThreshold` instead'},events:{'active-item-change':'active-item-change is renamed to expand-change'}};},toggleDropDownVisible:function toggleDropDownVisible(visible){var _this2=this;if(this.isDisabled)return;var dropDownVisible=this.dropDownVisible;var input=this.$refs.input;visible=Object(shared_["isDef"])(visible)?visible:!dropDownVisible;if(visible!==dropDownVisible){this.dropDownVisible=visible;if(visible){this.$nextTick(function(){_this2.updatePopper();_this2.panel.scrollIntoView();});}input.$refs.input.setAttribute('aria-expanded',visible);this.$emit('visible-change',visible);}},handleDropdownLeave:function handleDropdownLeave(){this.filtering=false;this.inputValue=this.presentText;},handleKeyDown:function handleKeyDown(event){switch(event.keyCode){case KeyCode.enter:this.toggleDropDownVisible();break;case KeyCode.down:this.toggleDropDownVisible(true);this.focusFirstNode();event.preventDefault();break;case KeyCode.esc:case KeyCode.tab:this.toggleDropDownVisible(false);break;}},handleFocus:function handleFocus(e){this.$emit('focus',e);},handleBlur:function handleBlur(e){this.$emit('blur',e);},handleInput:function handleInput(val,event){!this.dropDownVisible&&this.toggleDropDownVisible(true);if(event&&event.isComposing)return;if(val){this.filterHandler();}else{this.filtering=false;}},handleClear:function handleClear(){this.presentText='';this.panel.clearCheckedNodes();},handleExpandChange:function handleExpandChange(value){this.$nextTick(this.updatePopper.bind(this));this.$emit('expand-change',value);this.$emit('active-item-change',value);// Deprecated
},focusFirstNode:function focusFirstNode(){var _this3=this;this.$nextTick(function(){var filtering=_this3.filtering;var _$refs=_this3.$refs,popper=_$refs.popper,suggestionPanel=_$refs.suggestionPanel;var firstNode=null;if(filtering&&suggestionPanel){firstNode=suggestionPanel.$el.querySelector('.el-cascader__suggestion-item');}else{var firstMenu=popper.querySelector('.el-cascader-menu');firstNode=firstMenu.querySelector('.el-cascader-node[tabindex="-1"]');}if(firstNode){firstNode.focus();!filtering&&firstNode.click();}});},computePresentContent:function computePresentContent(){var _this4=this;// nextTick is required, because checked nodes may not change right now
this.$nextTick(function(){if(_this4.config.multiple){_this4.computePresentTags();_this4.presentText=_this4.presentTags.length?' ':null;}else{_this4.computePresentText();}});},computePresentText:function computePresentText(){var checkedValue=this.checkedValue,config=this.config;if(!Object(util_["isEmpty"])(checkedValue)){var node=this.panel.getNodeByValue(checkedValue);if(node&&(config.checkStrictly||node.isLeaf)){this.presentText=node.getText(this.showAllLevels,this.separator);return;}}this.presentText=null;},computePresentTags:function computePresentTags(){var isDisabled=this.isDisabled,leafOnly=this.leafOnly,showAllLevels=this.showAllLevels,separator=this.separator,collapseTags=this.collapseTags;var checkedNodes=this.getCheckedNodes(leafOnly);var tags=[];var genTag=function genTag(node){return{node:node,key:node.uid,text:node.getText(showAllLevels,separator),hitState:false,closable:!isDisabled&&!node.isDisabled};};if(checkedNodes.length){var first=checkedNodes[0],rest=checkedNodes.slice(1);var restCount=rest.length;tags.push(genTag(first));if(restCount){if(collapseTags){tags.push({key:-1,text:'+ '+restCount,closable:false});}else{rest.forEach(function(node){return tags.push(genTag(node));});}}}this.checkedNodes=checkedNodes;this.presentTags=tags;},getSuggestions:function getSuggestions(){var _this5=this;var filterMethod=this.filterMethod;if(!Object(types_["isFunction"])(filterMethod)){filterMethod=function filterMethod(node,keyword){return node.text.includes(keyword);};}var suggestions=this.panel.getFlattedNodes(this.leafOnly).filter(function(node){if(node.isDisabled)return false;node.text=node.getText(_this5.showAllLevels,_this5.separator)||'';return filterMethod(node,_this5.inputValue);});if(this.multiple){this.presentTags.forEach(function(tag){tag.hitState=false;});}else{suggestions.forEach(function(node){node.checked=Object(util_["isEqual"])(_this5.checkedValue,node.getValueByOption());});}this.filtering=true;this.suggestions=suggestions;this.$nextTick(this.updatePopper);},handleSuggestionKeyDown:function handleSuggestionKeyDown(event){var keyCode=event.keyCode,target=event.target;switch(keyCode){case KeyCode.enter:target.click();break;case KeyCode.up:var prev=target.previousElementSibling;prev&&prev.focus();break;case KeyCode.down:var next=target.nextElementSibling;next&&next.focus();break;case KeyCode.esc:case KeyCode.tab:this.toggleDropDownVisible(false);break;}},handleDelete:function handleDelete(){var inputValue=this.inputValue,pressDeleteCount=this.pressDeleteCount,presentTags=this.presentTags;var lastIndex=presentTags.length-1;var lastTag=presentTags[lastIndex];this.pressDeleteCount=inputValue?0:pressDeleteCount+1;if(!lastTag)return;if(this.pressDeleteCount){if(lastTag.hitState){this.deleteTag(lastIndex);}else{lastTag.hitState=true;}}},handleSuggestionClick:function handleSuggestionClick(index){var multiple=this.multiple;var targetNode=this.suggestions[index];if(multiple){var checked=targetNode.checked;targetNode.doCheck(!checked);this.panel.calculateMultiCheckedValue();}else{this.checkedValue=targetNode.getValueByOption();this.toggleDropDownVisible(false);}},deleteTag:function deleteTag(index){var checkedValue=this.checkedValue;var val=checkedValue[index];this.checkedValue=checkedValue.filter(function(n,i){return i!==index;});this.$emit('remove-tag',val);},updateStyle:function updateStyle(){var $el=this.$el,inputInitialHeight=this.inputInitialHeight;if(this.$isServer||!$el)return;var suggestionPanel=this.$refs.suggestionPanel;var inputInner=$el.querySelector('.el-input__inner');if(!inputInner)return;var tags=$el.querySelector('.el-cascader__tags');var suggestionPanelEl=null;if(suggestionPanel&&(suggestionPanelEl=suggestionPanel.$el)){var suggestionList=suggestionPanelEl.querySelector('.el-cascader__suggestion-list');suggestionList.style.minWidth=inputInner.offsetWidth+'px';}if(tags){var offsetHeight=tags.offsetHeight;var height=Math.max(offsetHeight+6,inputInitialHeight)+'px';inputInner.style.height=height;this.updatePopper();}},/**
     * public methods
    */getCheckedNodes:function getCheckedNodes(leafOnly){return this.panel.getCheckedNodes(leafOnly);}}};// CONCATENATED MODULE: ./packages/cascader/src/cascader.vue?vue&type=script&lang=js&
/* harmony default export */var src_cascadervue_type_script_lang_js_=cascadervue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/cascader/src/cascader.vue
/* normalize component */var cascader_component=normalizeComponent(src_cascadervue_type_script_lang_js_,cascadervue_type_template_id_032537a6_render,cascadervue_type_template_id_032537a6_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var cascader_api; }cascader_component.options.__file="packages/cascader/src/cascader.vue";/* harmony default export */var cascader=cascader_component.exports;// CONCATENATED MODULE: ./packages/cascader/index.js
/* istanbul ignore next */cascader.install=function(Vue){Vue.component(cascader.name,cascader);};/* harmony default export */var packages_cascader=cascader;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/main.vue?vue&type=template&id=55c8ade7&
var mainvue_type_template_id_55c8ade7_render=function mainvue_type_template_id_55c8ade7_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:_vm.hide,expression:"hide"}],class:["el-color-picker",_vm.colorDisabled?"is-disabled":"",_vm.colorSize?"el-color-picker--"+_vm.colorSize:""]},[_vm.colorDisabled?_c("div",{staticClass:"el-color-picker__mask"}):_vm._e(),_c("div",{staticClass:"el-color-picker__trigger",on:{click:_vm.handleTrigger}},[_c("span",{staticClass:"el-color-picker__color",class:{"is-alpha":_vm.showAlpha}},[_c("span",{staticClass:"el-color-picker__color-inner",style:{backgroundColor:_vm.displayedColor}}),!_vm.value&&!_vm.showPanelColor?_c("span",{staticClass:"el-color-picker__empty el-icon-close"}):_vm._e()]),_c("span",{directives:[{name:"show",rawName:"v-show",value:_vm.value||_vm.showPanelColor,expression:"value || showPanelColor"}],staticClass:"el-color-picker__icon el-icon-arrow-down"})]),_c("picker-dropdown",{ref:"dropdown",class:["el-color-picker__panel",_vm.popperClass||""],attrs:{color:_vm.color,"show-alpha":_vm.showAlpha,predefine:_vm.predefine},on:{pick:_vm.confirmValue,clear:_vm.clearValue},model:{value:_vm.showPicker,callback:function callback($$v){_vm.showPicker=$$v;},expression:"showPicker"}})],1);};var mainvue_type_template_id_55c8ade7_staticRenderFns=[];mainvue_type_template_id_55c8ade7_render._withStripped=true;// CONCATENATED MODULE: ./packages/color-picker/src/main.vue?vue&type=template&id=55c8ade7&
// CONCATENATED MODULE: ./packages/color-picker/src/color.js
var color_typeof=typeof Symbol==="function"&&_typeof2(Symbol.iterator)==="symbol"?function(obj){return _typeof2(obj);}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":_typeof2(obj);};function color_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}var hsv2hsl=function hsv2hsl(hue,sat,val){return[hue,sat*val/((hue=(2-sat)*val)<1?hue:2-hue)||0,hue/2];};// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
// <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
var isOnePointZero=function isOnePointZero(n){return typeof n==='string'&&n.indexOf('.')!==-1&&parseFloat(n)===1;};var isPercentage=function isPercentage(n){return typeof n==='string'&&n.indexOf('%')!==-1;};// Take input from [0, n] and return it as [0, 1]
var bound01=function bound01(value,max){if(isOnePointZero(value))value='100%';var processPercent=isPercentage(value);value=Math.min(max,Math.max(0,parseFloat(value)));// Automatically convert percentage into number
if(processPercent){value=parseInt(value*max,10)/100;}// Handle floating point rounding errors
if(Math.abs(value-max)<0.000001){return 1;}// Convert into [0, 1] range if it isn't already
return value%max/parseFloat(max);};var INT_HEX_MAP={10:'A',11:'B',12:'C',13:'D',14:'E',15:'F'};var toHex=function toHex(_ref){var r=_ref.r,g=_ref.g,b=_ref.b;var hexOne=function hexOne(value){value=Math.min(Math.round(value),255);var high=Math.floor(value/16);var low=value%16;return''+(INT_HEX_MAP[high]||high)+(INT_HEX_MAP[low]||low);};if(isNaN(r)||isNaN(g)||isNaN(b))return'';return'#'+hexOne(r)+hexOne(g)+hexOne(b);};var HEX_INT_MAP={A:10,B:11,C:12,D:13,E:14,F:15};var parseHexChannel=function parseHexChannel(hex){if(hex.length===2){return(HEX_INT_MAP[hex[0].toUpperCase()]||+hex[0])*16+(HEX_INT_MAP[hex[1].toUpperCase()]||+hex[1]);}return HEX_INT_MAP[hex[1].toUpperCase()]||+hex[1];};var hsl2hsv=function hsl2hsv(hue,sat,light){sat=sat/100;light=light/100;var smin=sat;var lmin=Math.max(light,0.01);var sv=void 0;var v=void 0;light*=2;sat*=light<=1?light:2-light;smin*=lmin<=1?lmin:2-lmin;v=(light+sat)/2;sv=light===0?2*smin/(lmin+smin):2*sat/(light+sat);return{h:hue,s:sv*100,v:v*100};};// `rgbToHsv`
// Converts an RGB color value to HSV
// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
// *Returns:* { h, s, v } in [0,1]
var rgb2hsv=function rgb2hsv(r,g,b){r=bound01(r,255);g=bound01(g,255);b=bound01(b,255);var max=Math.max(r,g,b);var min=Math.min(r,g,b);var h=void 0,s=void 0;var v=max;var d=max-min;s=max===0?0:d/max;if(max===min){h=0;// achromatic
}else{switch(max){case r:h=(g-b)/d+(g<b?6:0);break;case g:h=(b-r)/d+2;break;case b:h=(r-g)/d+4;break;}h/=6;}return{h:h*360,s:s*100,v:v*100};};// `hsvToRgb`
// Converts an HSV color value to RGB.
// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
// *Returns:* { r, g, b } in the set [0, 255]
var hsv2rgb=function hsv2rgb(h,s,v){h=bound01(h,360)*6;s=bound01(s,100);v=bound01(v,100);var i=Math.floor(h);var f=h-i;var p=v*(1-s);var q=v*(1-f*s);var t=v*(1-(1-f)*s);var mod=i%6;var r=[v,q,p,p,t,v][mod];var g=[t,v,v,q,p,p][mod];var b=[p,p,t,v,v,q][mod];return{r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)};};var Color=function(){function Color(options){color_classCallCheck(this,Color);this._hue=0;this._saturation=100;this._value=100;this._alpha=100;this.enableAlpha=false;this.format='hex';this.value='';options=options||{};for(var option in options){if(options.hasOwnProperty(option)){this[option]=options[option];}}this.doOnChange();}Color.prototype.set=function set(prop,value){if(arguments.length===1&&(typeof prop==='undefined'?'undefined':color_typeof(prop))==='object'){for(var p in prop){if(prop.hasOwnProperty(p)){this.set(p,prop[p]);}}return;}this['_'+prop]=value;this.doOnChange();};Color.prototype.get=function get(prop){return this['_'+prop];};Color.prototype.toRgb=function toRgb(){return hsv2rgb(this._hue,this._saturation,this._value);};Color.prototype.fromString=function fromString(value){var _this=this;if(!value){this._hue=0;this._saturation=100;this._value=100;this.doOnChange();return;}var fromHSV=function fromHSV(h,s,v){_this._hue=Math.max(0,Math.min(360,h));_this._saturation=Math.max(0,Math.min(100,s));_this._value=Math.max(0,Math.min(100,v));_this.doOnChange();};if(value.indexOf('hsl')!==-1){var parts=value.replace(/hsla|hsl|\(|\)/gm,'').split(/\s|,/g).filter(function(val){return val!=='';}).map(function(val,index){return index>2?parseFloat(val):parseInt(val,10);});if(parts.length===4){this._alpha=Math.floor(parseFloat(parts[3])*100);}else if(parts.length===3){this._alpha=100;}if(parts.length>=3){var _hsl2hsv=hsl2hsv(parts[0],parts[1],parts[2]),h=_hsl2hsv.h,s=_hsl2hsv.s,v=_hsl2hsv.v;fromHSV(h,s,v);}}else if(value.indexOf('hsv')!==-1){var _parts=value.replace(/hsva|hsv|\(|\)/gm,'').split(/\s|,/g).filter(function(val){return val!=='';}).map(function(val,index){return index>2?parseFloat(val):parseInt(val,10);});if(_parts.length===4){this._alpha=Math.floor(parseFloat(_parts[3])*100);}else if(_parts.length===3){this._alpha=100;}if(_parts.length>=3){fromHSV(_parts[0],_parts[1],_parts[2]);}}else if(value.indexOf('rgb')!==-1){var _parts2=value.replace(/rgba|rgb|\(|\)/gm,'').split(/\s|,/g).filter(function(val){return val!=='';}).map(function(val,index){return index>2?parseFloat(val):parseInt(val,10);});if(_parts2.length===4){this._alpha=Math.floor(parseFloat(_parts2[3])*100);}else if(_parts2.length===3){this._alpha=100;}if(_parts2.length>=3){var _rgb2hsv=rgb2hsv(_parts2[0],_parts2[1],_parts2[2]),_h=_rgb2hsv.h,_s=_rgb2hsv.s,_v=_rgb2hsv.v;fromHSV(_h,_s,_v);}}else if(value.indexOf('#')!==-1){var hex=value.replace('#','').trim();if(!/^(?:[0-9a-fA-F]{3}){1,2}$/.test(hex))return;var r=void 0,g=void 0,b=void 0;if(hex.length===3){r=parseHexChannel(hex[0]+hex[0]);g=parseHexChannel(hex[1]+hex[1]);b=parseHexChannel(hex[2]+hex[2]);}else if(hex.length===6||hex.length===8){r=parseHexChannel(hex.substring(0,2));g=parseHexChannel(hex.substring(2,4));b=parseHexChannel(hex.substring(4,6));}if(hex.length===8){this._alpha=Math.floor(parseHexChannel(hex.substring(6))/255*100);}else if(hex.length===3||hex.length===6){this._alpha=100;}var _rgb2hsv2=rgb2hsv(r,g,b),_h2=_rgb2hsv2.h,_s2=_rgb2hsv2.s,_v2=_rgb2hsv2.v;fromHSV(_h2,_s2,_v2);}};Color.prototype.compare=function compare(color){return Math.abs(color._hue-this._hue)<2&&Math.abs(color._saturation-this._saturation)<1&&Math.abs(color._value-this._value)<1&&Math.abs(color._alpha-this._alpha)<1;};Color.prototype.doOnChange=function doOnChange(){var _hue=this._hue,_saturation=this._saturation,_value=this._value,_alpha=this._alpha,format=this.format;if(this.enableAlpha){switch(format){case'hsl':var hsl=hsv2hsl(_hue,_saturation/100,_value/100);this.value='hsla('+_hue+', '+Math.round(hsl[1]*100)+'%, '+Math.round(hsl[2]*100)+'%, '+_alpha/100+')';break;case'hsv':this.value='hsva('+_hue+', '+Math.round(_saturation)+'%, '+Math.round(_value)+'%, '+_alpha/100+')';break;default:var _hsv2rgb=hsv2rgb(_hue,_saturation,_value),r=_hsv2rgb.r,g=_hsv2rgb.g,b=_hsv2rgb.b;this.value='rgba('+r+', '+g+', '+b+', '+_alpha/100+')';}}else{switch(format){case'hsl':var _hsl=hsv2hsl(_hue,_saturation/100,_value/100);this.value='hsl('+_hue+', '+Math.round(_hsl[1]*100)+'%, '+Math.round(_hsl[2]*100)+'%)';break;case'hsv':this.value='hsv('+_hue+', '+Math.round(_saturation)+'%, '+Math.round(_value)+'%)';break;case'rgb':var _hsv2rgb2=hsv2rgb(_hue,_saturation,_value),_r=_hsv2rgb2.r,_g=_hsv2rgb2.g,_b=_hsv2rgb2.b;this.value='rgb('+_r+', '+_g+', '+_b+')';break;default:this.value=toHex(hsv2rgb(_hue,_saturation,_value));}}};return Color;}();/* harmony default export */var src_color=Color;;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/picker-dropdown.vue?vue&type=template&id=06601625&
var picker_dropdownvue_type_template_id_06601625_render=function picker_dropdownvue_type_template_id_06601625_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("transition",{attrs:{name:"el-zoom-in-top"},on:{"after-leave":_vm.doDestroy}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.showPopper,expression:"showPopper"}],staticClass:"el-color-dropdown"},[_c("div",{staticClass:"el-color-dropdown__main-wrapper"},[_c("hue-slider",{ref:"hue",staticStyle:{float:"right"},attrs:{color:_vm.color,vertical:""}}),_c("sv-panel",{ref:"sl",attrs:{color:_vm.color}})],1),_vm.showAlpha?_c("alpha-slider",{ref:"alpha",attrs:{color:_vm.color}}):_vm._e(),_vm.predefine?_c("predefine",{attrs:{color:_vm.color,colors:_vm.predefine}}):_vm._e(),_c("div",{staticClass:"el-color-dropdown__btns"},[_c("span",{staticClass:"el-color-dropdown__value"},[_c("el-input",{attrs:{"validate-event":false,size:"mini"},on:{blur:_vm.handleConfirm},nativeOn:{keyup:function keyup($event){if(!("button"in $event)&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){return null;}return _vm.handleConfirm($event);}},model:{value:_vm.customInput,callback:function callback($$v){_vm.customInput=$$v;},expression:"customInput"}})],1),_c("el-button",{staticClass:"el-color-dropdown__link-btn",attrs:{size:"mini",type:"text"},on:{click:function click($event){_vm.$emit("clear");}}},[_vm._v("\n        "+_vm._s(_vm.t("el.colorpicker.clear"))+"\n      ")]),_c("el-button",{staticClass:"el-color-dropdown__btn",attrs:{plain:"",size:"mini"},on:{click:_vm.confirmValue}},[_vm._v("\n        "+_vm._s(_vm.t("el.colorpicker.confirm"))+"\n      ")])],1)],1)]);};var picker_dropdownvue_type_template_id_06601625_staticRenderFns=[];picker_dropdownvue_type_template_id_06601625_render._withStripped=true;// CONCATENATED MODULE: ./packages/color-picker/src/components/picker-dropdown.vue?vue&type=template&id=06601625&
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/sv-panel.vue?vue&type=template&id=d8583596&
var sv_panelvue_type_template_id_d8583596_render=function sv_panelvue_type_template_id_d8583596_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-color-svpanel",style:{backgroundColor:_vm.background}},[_c("div",{staticClass:"el-color-svpanel__white"}),_c("div",{staticClass:"el-color-svpanel__black"}),_c("div",{staticClass:"el-color-svpanel__cursor",style:{top:_vm.cursorTop+"px",left:_vm.cursorLeft+"px"}},[_c("div")])]);};var sv_panelvue_type_template_id_d8583596_staticRenderFns=[];sv_panelvue_type_template_id_d8583596_render._withStripped=true;// CONCATENATED MODULE: ./packages/color-picker/src/components/sv-panel.vue?vue&type=template&id=d8583596&
// CONCATENATED MODULE: ./packages/color-picker/src/draggable.js
var isDragging=false;/* harmony default export */var draggable=function draggable(element,options){if(external_vue_default.a.prototype.$isServer)return;var moveFn=function moveFn(event){if(options.drag){options.drag(event);}};var upFn=function upFn(event){document.removeEventListener('mousemove',moveFn);document.removeEventListener('mouseup',upFn);document.onselectstart=null;document.ondragstart=null;isDragging=false;if(options.end){options.end(event);}};element.addEventListener('mousedown',function(event){if(isDragging)return;document.onselectstart=function(){return false;};document.ondragstart=function(){return false;};document.addEventListener('mousemove',moveFn);document.addEventListener('mouseup',upFn);isDragging=true;if(options.start){options.start(event);}});};// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/sv-panel.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var sv_panelvue_type_script_lang_js_={name:'el-sl-panel',props:{color:{required:true}},computed:{colorValue:function colorValue(){var hue=this.color.get('hue');var value=this.color.get('value');return{hue:hue,value:value};}},watch:{colorValue:function colorValue(){this.update();}},methods:{update:function update(){var saturation=this.color.get('saturation');var value=this.color.get('value');var el=this.$el;var width=el.clientWidth,height=el.clientHeight;this.cursorLeft=saturation*width/100;this.cursorTop=(100-value)*height/100;this.background='hsl('+this.color.get('hue')+', 100%, 50%)';},handleDrag:function handleDrag(event){var el=this.$el;var rect=el.getBoundingClientRect();var left=event.clientX-rect.left;var top=event.clientY-rect.top;left=Math.max(0,left);left=Math.min(left,rect.width);top=Math.max(0,top);top=Math.min(top,rect.height);this.cursorLeft=left;this.cursorTop=top;this.color.set({saturation:left/rect.width*100,value:100-top/rect.height*100});}},mounted:function mounted(){var _this=this;draggable(this.$el,{drag:function drag(event){_this.handleDrag(event);},end:function end(event){_this.handleDrag(event);}});this.update();},data:function data(){return{cursorTop:0,cursorLeft:0,background:'hsl(0, 100%, 50%)'};}};// CONCATENATED MODULE: ./packages/color-picker/src/components/sv-panel.vue?vue&type=script&lang=js&
/* harmony default export */var components_sv_panelvue_type_script_lang_js_=sv_panelvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/color-picker/src/components/sv-panel.vue
/* normalize component */var sv_panel_component=normalizeComponent(components_sv_panelvue_type_script_lang_js_,sv_panelvue_type_template_id_d8583596_render,sv_panelvue_type_template_id_d8583596_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var sv_panel_api; }sv_panel_component.options.__file="packages/color-picker/src/components/sv-panel.vue";/* harmony default export */var sv_panel=sv_panel_component.exports;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/hue-slider.vue?vue&type=template&id=5cdc43b1&
var hue_slidervue_type_template_id_5cdc43b1_render=function hue_slidervue_type_template_id_5cdc43b1_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-color-hue-slider",class:{"is-vertical":_vm.vertical}},[_c("div",{ref:"bar",staticClass:"el-color-hue-slider__bar",on:{click:_vm.handleClick}}),_c("div",{ref:"thumb",staticClass:"el-color-hue-slider__thumb",style:{left:_vm.thumbLeft+"px",top:_vm.thumbTop+"px"}})]);};var hue_slidervue_type_template_id_5cdc43b1_staticRenderFns=[];hue_slidervue_type_template_id_5cdc43b1_render._withStripped=true;// CONCATENATED MODULE: ./packages/color-picker/src/components/hue-slider.vue?vue&type=template&id=5cdc43b1&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/hue-slider.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var hue_slidervue_type_script_lang_js_={name:'el-color-hue-slider',props:{color:{required:true},vertical:Boolean},data:function data(){return{thumbLeft:0,thumbTop:0};},computed:{hueValue:function hueValue(){var hue=this.color.get('hue');return hue;}},watch:{hueValue:function hueValue(){this.update();}},methods:{handleClick:function handleClick(event){var thumb=this.$refs.thumb;var target=event.target;if(target!==thumb){this.handleDrag(event);}},handleDrag:function handleDrag(event){var rect=this.$el.getBoundingClientRect();var thumb=this.$refs.thumb;var hue=void 0;if(!this.vertical){var left=event.clientX-rect.left;left=Math.min(left,rect.width-thumb.offsetWidth/2);left=Math.max(thumb.offsetWidth/2,left);hue=Math.round((left-thumb.offsetWidth/2)/(rect.width-thumb.offsetWidth)*360);}else{var top=event.clientY-rect.top;top=Math.min(top,rect.height-thumb.offsetHeight/2);top=Math.max(thumb.offsetHeight/2,top);hue=Math.round((top-thumb.offsetHeight/2)/(rect.height-thumb.offsetHeight)*360);}this.color.set('hue',hue);},getThumbLeft:function getThumbLeft(){if(this.vertical)return 0;var el=this.$el;var hue=this.color.get('hue');if(!el)return 0;var thumb=this.$refs.thumb;return Math.round(hue*(el.offsetWidth-thumb.offsetWidth/2)/360);},getThumbTop:function getThumbTop(){if(!this.vertical)return 0;var el=this.$el;var hue=this.color.get('hue');if(!el)return 0;var thumb=this.$refs.thumb;return Math.round(hue*(el.offsetHeight-thumb.offsetHeight/2)/360);},update:function update(){this.thumbLeft=this.getThumbLeft();this.thumbTop=this.getThumbTop();}},mounted:function mounted(){var _this=this;var _$refs=this.$refs,bar=_$refs.bar,thumb=_$refs.thumb;var dragConfig={drag:function drag(event){_this.handleDrag(event);},end:function end(event){_this.handleDrag(event);}};draggable(bar,dragConfig);draggable(thumb,dragConfig);this.update();}};// CONCATENATED MODULE: ./packages/color-picker/src/components/hue-slider.vue?vue&type=script&lang=js&
/* harmony default export */var components_hue_slidervue_type_script_lang_js_=hue_slidervue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/color-picker/src/components/hue-slider.vue
/* normalize component */var hue_slider_component=normalizeComponent(components_hue_slidervue_type_script_lang_js_,hue_slidervue_type_template_id_5cdc43b1_render,hue_slidervue_type_template_id_5cdc43b1_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var hue_slider_api; }hue_slider_component.options.__file="packages/color-picker/src/components/hue-slider.vue";/* harmony default export */var hue_slider=hue_slider_component.exports;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/alpha-slider.vue?vue&type=template&id=068c66cb&
var alpha_slidervue_type_template_id_068c66cb_render=function alpha_slidervue_type_template_id_068c66cb_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-color-alpha-slider",class:{"is-vertical":_vm.vertical}},[_c("div",{ref:"bar",staticClass:"el-color-alpha-slider__bar",style:{background:_vm.background},on:{click:_vm.handleClick}}),_c("div",{ref:"thumb",staticClass:"el-color-alpha-slider__thumb",style:{left:_vm.thumbLeft+"px",top:_vm.thumbTop+"px"}})]);};var alpha_slidervue_type_template_id_068c66cb_staticRenderFns=[];alpha_slidervue_type_template_id_068c66cb_render._withStripped=true;// CONCATENATED MODULE: ./packages/color-picker/src/components/alpha-slider.vue?vue&type=template&id=068c66cb&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/alpha-slider.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var alpha_slidervue_type_script_lang_js_={name:'el-color-alpha-slider',props:{color:{required:true},vertical:Boolean},watch:{'color._alpha':function color_alpha(){this.update();},'color.value':function colorValue(){this.update();}},methods:{handleClick:function handleClick(event){var thumb=this.$refs.thumb;var target=event.target;if(target!==thumb){this.handleDrag(event);}},handleDrag:function handleDrag(event){var rect=this.$el.getBoundingClientRect();var thumb=this.$refs.thumb;if(!this.vertical){var left=event.clientX-rect.left;left=Math.max(thumb.offsetWidth/2,left);left=Math.min(left,rect.width-thumb.offsetWidth/2);this.color.set('alpha',Math.round((left-thumb.offsetWidth/2)/(rect.width-thumb.offsetWidth)*100));}else{var top=event.clientY-rect.top;top=Math.max(thumb.offsetHeight/2,top);top=Math.min(top,rect.height-thumb.offsetHeight/2);this.color.set('alpha',Math.round((top-thumb.offsetHeight/2)/(rect.height-thumb.offsetHeight)*100));}},getThumbLeft:function getThumbLeft(){if(this.vertical)return 0;var el=this.$el;var alpha=this.color._alpha;if(!el)return 0;var thumb=this.$refs.thumb;return Math.round(alpha*(el.offsetWidth-thumb.offsetWidth/2)/100);},getThumbTop:function getThumbTop(){if(!this.vertical)return 0;var el=this.$el;var alpha=this.color._alpha;if(!el)return 0;var thumb=this.$refs.thumb;return Math.round(alpha*(el.offsetHeight-thumb.offsetHeight/2)/100);},getBackground:function getBackground(){if(this.color&&this.color.value){var _color$toRgb=this.color.toRgb(),r=_color$toRgb.r,g=_color$toRgb.g,b=_color$toRgb.b;return'linear-gradient(to right, rgba('+r+', '+g+', '+b+', 0) 0%, rgba('+r+', '+g+', '+b+', 1) 100%)';}return null;},update:function update(){this.thumbLeft=this.getThumbLeft();this.thumbTop=this.getThumbTop();this.background=this.getBackground();}},data:function data(){return{thumbLeft:0,thumbTop:0,background:null};},mounted:function mounted(){var _this=this;var _$refs=this.$refs,bar=_$refs.bar,thumb=_$refs.thumb;var dragConfig={drag:function drag(event){_this.handleDrag(event);},end:function end(event){_this.handleDrag(event);}};draggable(bar,dragConfig);draggable(thumb,dragConfig);this.update();}};// CONCATENATED MODULE: ./packages/color-picker/src/components/alpha-slider.vue?vue&type=script&lang=js&
/* harmony default export */var components_alpha_slidervue_type_script_lang_js_=alpha_slidervue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/color-picker/src/components/alpha-slider.vue
/* normalize component */var alpha_slider_component=normalizeComponent(components_alpha_slidervue_type_script_lang_js_,alpha_slidervue_type_template_id_068c66cb_render,alpha_slidervue_type_template_id_068c66cb_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var alpha_slider_api; }alpha_slider_component.options.__file="packages/color-picker/src/components/alpha-slider.vue";/* harmony default export */var alpha_slider=alpha_slider_component.exports;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/predefine.vue?vue&type=template&id=06e03093&
var predefinevue_type_template_id_06e03093_render=function predefinevue_type_template_id_06e03093_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-color-predefine"},[_c("div",{staticClass:"el-color-predefine__colors"},_vm._l(_vm.rgbaColors,function(item,index){return _c("div",{key:_vm.colors[index],staticClass:"el-color-predefine__color-selector",class:{selected:item.selected,"is-alpha":item._alpha<100},on:{click:function click($event){_vm.handleSelect(index);}}},[_c("div",{style:{"background-color":item.value}})]);}),0)]);};var predefinevue_type_template_id_06e03093_staticRenderFns=[];predefinevue_type_template_id_06e03093_render._withStripped=true;// CONCATENATED MODULE: ./packages/color-picker/src/components/predefine.vue?vue&type=template&id=06e03093&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/predefine.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var predefinevue_type_script_lang_js_={props:{colors:{type:Array,required:true},color:{required:true}},data:function data(){return{rgbaColors:this.parseColors(this.colors,this.color)};},methods:{handleSelect:function handleSelect(index){this.color.fromString(this.colors[index]);},parseColors:function parseColors(colors,color){return colors.map(function(value){var c=new src_color();c.enableAlpha=true;c.format='rgba';c.fromString(value);c.selected=c.value===color.value;return c;});}},watch:{'$parent.currentColor':function $parentCurrentColor(val){var color=new src_color();color.fromString(val);this.rgbaColors.forEach(function(item){item.selected=color.compare(item);});},colors:function colors(newVal){this.rgbaColors=this.parseColors(newVal,this.color);},color:function color(newVal){this.rgbaColors=this.parseColors(this.colors,newVal);}}};// CONCATENATED MODULE: ./packages/color-picker/src/components/predefine.vue?vue&type=script&lang=js&
/* harmony default export */var components_predefinevue_type_script_lang_js_=predefinevue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/color-picker/src/components/predefine.vue
/* normalize component */var predefine_component=normalizeComponent(components_predefinevue_type_script_lang_js_,predefinevue_type_template_id_06e03093_render,predefinevue_type_template_id_06e03093_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var predefine_api; }predefine_component.options.__file="packages/color-picker/src/components/predefine.vue";/* harmony default export */var predefine=predefine_component.exports;// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/picker-dropdown.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var picker_dropdownvue_type_script_lang_js_={name:'el-color-picker-dropdown',mixins:[vue_popper_default.a,locale_default.a],components:{SvPanel:sv_panel,HueSlider:hue_slider,AlphaSlider:alpha_slider,ElInput:input_default.a,ElButton:button_default.a,Predefine:predefine},props:{color:{required:true},showAlpha:Boolean,predefine:Array},data:function data(){return{customInput:''};},computed:{currentColor:function currentColor(){var parent=this.$parent;return!parent.value&&!parent.showPanelColor?'':parent.color.value;}},methods:{confirmValue:function confirmValue(){this.$emit('pick');},handleConfirm:function handleConfirm(){this.color.fromString(this.customInput);}},mounted:function mounted(){this.$parent.popperElm=this.popperElm=this.$el;this.referenceElm=this.$parent.$el;},watch:{showPopper:function showPopper(val){var _this=this;if(val===true){this.$nextTick(function(){var _$refs=_this.$refs,sl=_$refs.sl,hue=_$refs.hue,alpha=_$refs.alpha;sl&&sl.update();hue&&hue.update();alpha&&alpha.update();});}},currentColor:{immediate:true,handler:function handler(val){this.customInput=val;}}}};// CONCATENATED MODULE: ./packages/color-picker/src/components/picker-dropdown.vue?vue&type=script&lang=js&
/* harmony default export */var components_picker_dropdownvue_type_script_lang_js_=picker_dropdownvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/color-picker/src/components/picker-dropdown.vue
/* normalize component */var picker_dropdown_component=normalizeComponent(components_picker_dropdownvue_type_script_lang_js_,picker_dropdownvue_type_template_id_06601625_render,picker_dropdownvue_type_template_id_06601625_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var picker_dropdown_api; }picker_dropdown_component.options.__file="packages/color-picker/src/components/picker-dropdown.vue";/* harmony default export */var picker_dropdown=picker_dropdown_component.exports;// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var color_picker_src_mainvue_type_script_lang_js_={name:'ElColorPicker',mixins:[emitter_default.a],props:{value:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:String,popperClass:String,predefine:Array},inject:{elForm:{default:''},elFormItem:{default:''}},directives:{Clickoutside:clickoutside_default.a},computed:{displayedColor:function displayedColor(){if(!this.value&&!this.showPanelColor){return'transparent';}return this.displayedRgb(this.color,this.showAlpha);},_elFormItemSize:function _elFormItemSize(){return(this.elFormItem||{}).elFormItemSize;},colorSize:function colorSize(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size;},colorDisabled:function colorDisabled(){return this.disabled||(this.elForm||{}).disabled;}},watch:{value:function value(val){if(!val){this.showPanelColor=false;}else if(val&&val!==this.color.value){this.color.fromString(val);}},color:{deep:true,handler:function handler(){this.showPanelColor=true;}},displayedColor:function displayedColor(val){if(!this.showPicker)return;var currentValueColor=new src_color({enableAlpha:this.showAlpha,format:this.colorFormat});currentValueColor.fromString(this.value);var currentValueColorRgb=this.displayedRgb(currentValueColor,this.showAlpha);if(val!==currentValueColorRgb){this.$emit('active-change',val);}}},methods:{handleTrigger:function handleTrigger(){if(this.colorDisabled)return;this.showPicker=!this.showPicker;},confirmValue:function confirmValue(){var value=this.color.value;this.$emit('input',value);this.$emit('change',value);this.dispatch('ElFormItem','el.form.change',value);this.showPicker=false;},clearValue:function clearValue(){this.$emit('input',null);this.$emit('change',null);if(this.value!==null){this.dispatch('ElFormItem','el.form.change',null);}this.showPanelColor=false;this.showPicker=false;this.resetColor();},hide:function hide(){this.showPicker=false;this.resetColor();},resetColor:function resetColor(){var _this=this;this.$nextTick(function(_){if(_this.value){_this.color.fromString(_this.value);}else{_this.showPanelColor=false;}});},displayedRgb:function displayedRgb(color,showAlpha){if(!(color instanceof src_color)){throw Error('color should be instance of Color Class');}var _color$toRgb=color.toRgb(),r=_color$toRgb.r,g=_color$toRgb.g,b=_color$toRgb.b;return showAlpha?'rgba('+r+', '+g+', '+b+', '+color.get('alpha')/100+')':'rgb('+r+', '+g+', '+b+')';}},mounted:function mounted(){var value=this.value;if(value){this.color.fromString(value);}this.popperElm=this.$refs.dropdown.$el;},data:function data(){var color=new src_color({enableAlpha:this.showAlpha,format:this.colorFormat});return{color:color,showPicker:false,showPanelColor:false};},components:{PickerDropdown:picker_dropdown}};// CONCATENATED MODULE: ./packages/color-picker/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_color_picker_src_mainvue_type_script_lang_js_=color_picker_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/color-picker/src/main.vue
/* normalize component */var color_picker_src_main_component=normalizeComponent(packages_color_picker_src_mainvue_type_script_lang_js_,mainvue_type_template_id_55c8ade7_render,mainvue_type_template_id_55c8ade7_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var color_picker_src_main_api; }color_picker_src_main_component.options.__file="packages/color-picker/src/main.vue";/* harmony default export */var color_picker_src_main=color_picker_src_main_component.exports;// CONCATENATED MODULE: ./packages/color-picker/index.js
/* istanbul ignore next */color_picker_src_main.install=function(Vue){Vue.component(color_picker_src_main.name,color_picker_src_main);};/* harmony default export */var color_picker=color_picker_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/transfer/src/main.vue?vue&type=template&id=5c654dd8&
var mainvue_type_template_id_5c654dd8_render=function mainvue_type_template_id_5c654dd8_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-transfer"},[_c("transfer-panel",_vm._b({ref:"leftPanel",attrs:{data:_vm.sourceData,title:_vm.titles[0]||_vm.t("el.transfer.titles.0"),"default-checked":_vm.leftDefaultChecked,placeholder:_vm.filterPlaceholder||_vm.t("el.transfer.filterPlaceholder")},on:{"checked-change":_vm.onSourceCheckedChange}},"transfer-panel",_vm.$props,false),[_vm._t("left-footer")],2),_c("div",{staticClass:"el-transfer__buttons"},[_c("el-button",{class:["el-transfer__button",_vm.hasButtonTexts?"is-with-texts":""],attrs:{type:"primary",disabled:_vm.rightChecked.length===0},nativeOn:{click:function click($event){return _vm.addToLeft($event);}}},[_c("i",{staticClass:"el-icon-arrow-left"}),_vm.buttonTexts[0]!==undefined?_c("span",[_vm._v(_vm._s(_vm.buttonTexts[0]))]):_vm._e()]),_c("el-button",{class:["el-transfer__button",_vm.hasButtonTexts?"is-with-texts":""],attrs:{type:"primary",disabled:_vm.leftChecked.length===0},nativeOn:{click:function click($event){return _vm.addToRight($event);}}},[_vm.buttonTexts[1]!==undefined?_c("span",[_vm._v(_vm._s(_vm.buttonTexts[1]))]):_vm._e(),_c("i",{staticClass:"el-icon-arrow-right"})])],1),_c("transfer-panel",_vm._b({ref:"rightPanel",attrs:{data:_vm.targetData,title:_vm.titles[1]||_vm.t("el.transfer.titles.1"),"default-checked":_vm.rightDefaultChecked,placeholder:_vm.filterPlaceholder||_vm.t("el.transfer.filterPlaceholder")},on:{"checked-change":_vm.onTargetCheckedChange}},"transfer-panel",_vm.$props,false),[_vm._t("right-footer")],2)],1);};var mainvue_type_template_id_5c654dd8_staticRenderFns=[];mainvue_type_template_id_5c654dd8_render._withStripped=true;// CONCATENATED MODULE: ./packages/transfer/src/main.vue?vue&type=template&id=5c654dd8&
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/transfer/src/transfer-panel.vue?vue&type=template&id=2ddab8bd&
var transfer_panelvue_type_template_id_2ddab8bd_render=function transfer_panelvue_type_template_id_2ddab8bd_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-transfer-panel"},[_c("p",{staticClass:"el-transfer-panel__header"},[_c("el-checkbox",{attrs:{indeterminate:_vm.isIndeterminate},on:{change:_vm.handleAllCheckedChange},model:{value:_vm.allChecked,callback:function callback($$v){_vm.allChecked=$$v;},expression:"allChecked"}},[_vm._v("\n      "+_vm._s(_vm.title)+"\n      "),_c("span",[_vm._v(_vm._s(_vm.checkedSummary))])])],1),_c("div",{class:["el-transfer-panel__body",_vm.hasFooter?"is-with-footer":""]},[_vm.filterable?_c("el-input",{staticClass:"el-transfer-panel__filter",attrs:{size:"small",placeholder:_vm.placeholder},nativeOn:{mouseenter:function mouseenter($event){_vm.inputHover=true;},mouseleave:function mouseleave($event){_vm.inputHover=false;}},model:{value:_vm.query,callback:function callback($$v){_vm.query=$$v;},expression:"query"}},[_c("i",{class:["el-input__icon","el-icon-"+_vm.inputIcon],attrs:{slot:"prefix"},on:{click:_vm.clearQuery},slot:"prefix"})]):_vm._e(),_c("el-checkbox-group",{directives:[{name:"show",rawName:"v-show",value:!_vm.hasNoMatch&&_vm.data.length>0,expression:"!hasNoMatch && data.length > 0"}],staticClass:"el-transfer-panel__list",class:{"is-filterable":_vm.filterable},model:{value:_vm.checked,callback:function callback($$v){_vm.checked=$$v;},expression:"checked"}},_vm._l(_vm.filteredData,function(item){return _c("el-checkbox",{key:item[_vm.keyProp],staticClass:"el-transfer-panel__item",attrs:{label:item[_vm.keyProp],disabled:item[_vm.disabledProp]}},[_c("option-content",{attrs:{option:item}})],1);}),1),_c("p",{directives:[{name:"show",rawName:"v-show",value:_vm.hasNoMatch,expression:"hasNoMatch"}],staticClass:"el-transfer-panel__empty"},[_vm._v(_vm._s(_vm.t("el.transfer.noMatch")))]),_c("p",{directives:[{name:"show",rawName:"v-show",value:_vm.data.length===0&&!_vm.hasNoMatch,expression:"data.length === 0 && !hasNoMatch"}],staticClass:"el-transfer-panel__empty"},[_vm._v(_vm._s(_vm.t("el.transfer.noData")))])],1),_vm.hasFooter?_c("p",{staticClass:"el-transfer-panel__footer"},[_vm._t("default")],2):_vm._e()]);};var transfer_panelvue_type_template_id_2ddab8bd_staticRenderFns=[];transfer_panelvue_type_template_id_2ddab8bd_render._withStripped=true;// CONCATENATED MODULE: ./packages/transfer/src/transfer-panel.vue?vue&type=template&id=2ddab8bd&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/transfer/src/transfer-panel.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var transfer_panelvue_type_script_lang_js_={mixins:[locale_default.a],name:'ElTransferPanel',componentName:'ElTransferPanel',components:{ElCheckboxGroup:checkbox_group_default.a,ElCheckbox:checkbox_default.a,ElInput:input_default.a,OptionContent:{props:{option:Object},render:function render(h){var getParent=function getParent(vm){if(vm.$options.componentName==='ElTransferPanel'){return vm;}else if(vm.$parent){return getParent(vm.$parent);}else{return vm;}};var panel=getParent(this);var transfer=panel.$parent||panel;return panel.renderContent?panel.renderContent(h,this.option):transfer.$scopedSlots.default?transfer.$scopedSlots.default({option:this.option}):h('span',[this.option[panel.labelProp]||this.option[panel.keyProp]]);}}},props:{data:{type:Array,default:function _default(){return[];}},renderContent:Function,placeholder:String,title:String,filterable:Boolean,format:Object,filterMethod:Function,defaultChecked:Array,props:Object},data:function data(){return{checked:[],allChecked:false,query:'',inputHover:false,checkChangeByUser:true};},watch:{checked:function checked(val,oldVal){this.updateAllChecked();if(this.checkChangeByUser){var movedKeys=val.concat(oldVal).filter(function(v){return val.indexOf(v)===-1||oldVal.indexOf(v)===-1;});this.$emit('checked-change',val,movedKeys);}else{this.$emit('checked-change',val);this.checkChangeByUser=true;}},data:function data(){var _this=this;var checked=[];var filteredDataKeys=this.filteredData.map(function(item){return item[_this.keyProp];});this.checked.forEach(function(item){if(filteredDataKeys.indexOf(item)>-1){checked.push(item);}});this.checkChangeByUser=false;this.checked=checked;},checkableData:function checkableData(){this.updateAllChecked();},defaultChecked:{immediate:true,handler:function handler(val,oldVal){var _this2=this;if(oldVal&&val.length===oldVal.length&&val.every(function(item){return oldVal.indexOf(item)>-1;}))return;var checked=[];var checkableDataKeys=this.checkableData.map(function(item){return item[_this2.keyProp];});val.forEach(function(item){if(checkableDataKeys.indexOf(item)>-1){checked.push(item);}});this.checkChangeByUser=false;this.checked=checked;}}},computed:{filteredData:function filteredData(){var _this3=this;return this.data.filter(function(item){if(typeof _this3.filterMethod==='function'){return _this3.filterMethod(_this3.query,item);}else{var label=item[_this3.labelProp]||item[_this3.keyProp].toString();return label.toLowerCase().indexOf(_this3.query.toLowerCase())>-1;}});},checkableData:function checkableData(){var _this4=this;return this.filteredData.filter(function(item){return!item[_this4.disabledProp];});},checkedSummary:function checkedSummary(){var checkedLength=this.checked.length;var dataLength=this.data.length;var _format=this.format,noChecked=_format.noChecked,hasChecked=_format.hasChecked;if(noChecked&&hasChecked){return checkedLength>0?hasChecked.replace(/\${checked}/g,checkedLength).replace(/\${total}/g,dataLength):noChecked.replace(/\${total}/g,dataLength);}else{return checkedLength+'/'+dataLength;}},isIndeterminate:function isIndeterminate(){var checkedLength=this.checked.length;return checkedLength>0&&checkedLength<this.checkableData.length;},hasNoMatch:function hasNoMatch(){return this.query.length>0&&this.filteredData.length===0;},inputIcon:function inputIcon(){return this.query.length>0&&this.inputHover?'circle-close':'search';},labelProp:function labelProp(){return this.props.label||'label';},keyProp:function keyProp(){return this.props.key||'key';},disabledProp:function disabledProp(){return this.props.disabled||'disabled';},hasFooter:function hasFooter(){return!!this.$slots.default;}},methods:{updateAllChecked:function updateAllChecked(){var _this5=this;var checkableDataKeys=this.checkableData.map(function(item){return item[_this5.keyProp];});this.allChecked=checkableDataKeys.length>0&&checkableDataKeys.every(function(item){return _this5.checked.indexOf(item)>-1;});},handleAllCheckedChange:function handleAllCheckedChange(value){var _this6=this;this.checked=value?this.checkableData.map(function(item){return item[_this6.keyProp];}):[];},clearQuery:function clearQuery(){if(this.inputIcon==='circle-close'){this.query='';}}}};// CONCATENATED MODULE: ./packages/transfer/src/transfer-panel.vue?vue&type=script&lang=js&
/* harmony default export */var src_transfer_panelvue_type_script_lang_js_=transfer_panelvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/transfer/src/transfer-panel.vue
/* normalize component */var transfer_panel_component=normalizeComponent(src_transfer_panelvue_type_script_lang_js_,transfer_panelvue_type_template_id_2ddab8bd_render,transfer_panelvue_type_template_id_2ddab8bd_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var transfer_panel_api; }transfer_panel_component.options.__file="packages/transfer/src/transfer-panel.vue";/* harmony default export */var transfer_panel=transfer_panel_component.exports;// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/transfer/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var transfer_src_mainvue_type_script_lang_js_={name:'ElTransfer',mixins:[emitter_default.a,locale_default.a,migrating_default.a],components:{TransferPanel:transfer_panel,ElButton:button_default.a},props:{data:{type:Array,default:function _default(){return[];}},titles:{type:Array,default:function _default(){return[];}},buttonTexts:{type:Array,default:function _default(){return[];}},filterPlaceholder:{type:String,default:''},filterMethod:Function,leftDefaultChecked:{type:Array,default:function _default(){return[];}},rightDefaultChecked:{type:Array,default:function _default(){return[];}},renderContent:Function,value:{type:Array,default:function _default(){return[];}},format:{type:Object,default:function _default(){return{};}},filterable:Boolean,props:{type:Object,default:function _default(){return{label:'label',key:'key',disabled:'disabled'};}},targetOrder:{type:String,default:'original'}},data:function data(){return{leftChecked:[],rightChecked:[]};},computed:{dataObj:function dataObj(){var key=this.props.key;return this.data.reduce(function(o,cur){return(o[cur[key]]=cur)&&o;},{});},sourceData:function sourceData(){var _this=this;return this.data.filter(function(item){return _this.value.indexOf(item[_this.props.key])===-1;});},targetData:function targetData(){var _this2=this;if(this.targetOrder==='original'){return this.data.filter(function(item){return _this2.value.indexOf(item[_this2.props.key])>-1;});}else{return this.value.reduce(function(arr,cur){var val=_this2.dataObj[cur];if(val){arr.push(val);}return arr;},[]);}},hasButtonTexts:function hasButtonTexts(){return this.buttonTexts.length===2;}},watch:{value:function value(val){this.dispatch('ElFormItem','el.form.change',val);}},methods:{getMigratingConfig:function getMigratingConfig(){return{props:{'footer-format':'footer-format is renamed to format.'}};},onSourceCheckedChange:function onSourceCheckedChange(val,movedKeys){this.leftChecked=val;if(movedKeys===undefined)return;this.$emit('left-check-change',val,movedKeys);},onTargetCheckedChange:function onTargetCheckedChange(val,movedKeys){this.rightChecked=val;if(movedKeys===undefined)return;this.$emit('right-check-change',val,movedKeys);},addToLeft:function addToLeft(){var currentValue=this.value.slice();this.rightChecked.forEach(function(item){var index=currentValue.indexOf(item);if(index>-1){currentValue.splice(index,1);}});this.$emit('input',currentValue);this.$emit('change',currentValue,'left',this.rightChecked);},addToRight:function addToRight(){var _this3=this;var currentValue=this.value.slice();var itemsToBeMoved=[];var key=this.props.key;this.data.forEach(function(item){var itemKey=item[key];if(_this3.leftChecked.indexOf(itemKey)>-1&&_this3.value.indexOf(itemKey)===-1){itemsToBeMoved.push(itemKey);}});currentValue=this.targetOrder==='unshift'?itemsToBeMoved.concat(currentValue):currentValue.concat(itemsToBeMoved);this.$emit('input',currentValue);this.$emit('change',currentValue,'right',this.leftChecked);},clearQuery:function clearQuery(which){if(which==='left'){this.$refs.leftPanel.query='';}else if(which==='right'){this.$refs.rightPanel.query='';}}}};// CONCATENATED MODULE: ./packages/transfer/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_transfer_src_mainvue_type_script_lang_js_=transfer_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/transfer/src/main.vue
/* normalize component */var transfer_src_main_component=normalizeComponent(packages_transfer_src_mainvue_type_script_lang_js_,mainvue_type_template_id_5c654dd8_render,mainvue_type_template_id_5c654dd8_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var transfer_src_main_api; }transfer_src_main_component.options.__file="packages/transfer/src/main.vue";/* harmony default export */var transfer_src_main=transfer_src_main_component.exports;// CONCATENATED MODULE: ./packages/transfer/index.js
/* istanbul ignore next */transfer_src_main.install=function(Vue){Vue.component(transfer_src_main.name,transfer_src_main);};/* harmony default export */var transfer=transfer_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/container/src/main.vue?vue&type=template&id=5bf181d4&
var mainvue_type_template_id_5bf181d4_render=function mainvue_type_template_id_5bf181d4_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("section",{staticClass:"el-container",class:{"is-vertical":_vm.isVertical}},[_vm._t("default")],2);};var mainvue_type_template_id_5bf181d4_staticRenderFns=[];mainvue_type_template_id_5bf181d4_render._withStripped=true;// CONCATENATED MODULE: ./packages/container/src/main.vue?vue&type=template&id=5bf181d4&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/container/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
/* harmony default export */var container_src_mainvue_type_script_lang_js_={name:'ElContainer',componentName:'ElContainer',props:{direction:String},computed:{isVertical:function isVertical(){if(this.direction==='vertical'){return true;}else if(this.direction==='horizontal'){return false;}return this.$slots&&this.$slots.default?this.$slots.default.some(function(vnode){var tag=vnode.componentOptions&&vnode.componentOptions.tag;return tag==='el-header'||tag==='el-footer';}):false;}}};// CONCATENATED MODULE: ./packages/container/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_container_src_mainvue_type_script_lang_js_=container_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/container/src/main.vue
/* normalize component */var container_src_main_component=normalizeComponent(packages_container_src_mainvue_type_script_lang_js_,mainvue_type_template_id_5bf181d4_render,mainvue_type_template_id_5bf181d4_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var container_src_main_api; }container_src_main_component.options.__file="packages/container/src/main.vue";/* harmony default export */var container_src_main=container_src_main_component.exports;// CONCATENATED MODULE: ./packages/container/index.js
/* istanbul ignore next */container_src_main.install=function(Vue){Vue.component(container_src_main.name,container_src_main);};/* harmony default export */var packages_container=container_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/header/src/main.vue?vue&type=template&id=2b296ab2&
var mainvue_type_template_id_2b296ab2_render=function mainvue_type_template_id_2b296ab2_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("header",{staticClass:"el-header",style:{height:_vm.height}},[_vm._t("default")],2);};var mainvue_type_template_id_2b296ab2_staticRenderFns=[];mainvue_type_template_id_2b296ab2_render._withStripped=true;// CONCATENATED MODULE: ./packages/header/src/main.vue?vue&type=template&id=2b296ab2&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/header/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
/* harmony default export */var header_src_mainvue_type_script_lang_js_={name:'ElHeader',componentName:'ElHeader',props:{height:{type:String,default:'60px'}}};// CONCATENATED MODULE: ./packages/header/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_header_src_mainvue_type_script_lang_js_=header_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/header/src/main.vue
/* normalize component */var header_src_main_component=normalizeComponent(packages_header_src_mainvue_type_script_lang_js_,mainvue_type_template_id_2b296ab2_render,mainvue_type_template_id_2b296ab2_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var header_src_main_api; }header_src_main_component.options.__file="packages/header/src/main.vue";/* harmony default export */var header_src_main=header_src_main_component.exports;// CONCATENATED MODULE: ./packages/header/index.js
/* istanbul ignore next */header_src_main.install=function(Vue){Vue.component(header_src_main.name,header_src_main);};/* harmony default export */var header=header_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/aside/src/main.vue?vue&type=template&id=03411dbf&
var mainvue_type_template_id_03411dbf_render=function mainvue_type_template_id_03411dbf_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("aside",{staticClass:"el-aside",style:{width:_vm.width}},[_vm._t("default")],2);};var mainvue_type_template_id_03411dbf_staticRenderFns=[];mainvue_type_template_id_03411dbf_render._withStripped=true;// CONCATENATED MODULE: ./packages/aside/src/main.vue?vue&type=template&id=03411dbf&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/aside/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
/* harmony default export */var aside_src_mainvue_type_script_lang_js_={name:'ElAside',componentName:'ElAside',props:{width:{type:String,default:'300px'}}};// CONCATENATED MODULE: ./packages/aside/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_aside_src_mainvue_type_script_lang_js_=aside_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/aside/src/main.vue
/* normalize component */var aside_src_main_component=normalizeComponent(packages_aside_src_mainvue_type_script_lang_js_,mainvue_type_template_id_03411dbf_render,mainvue_type_template_id_03411dbf_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var aside_src_main_api; }aside_src_main_component.options.__file="packages/aside/src/main.vue";/* harmony default export */var aside_src_main=aside_src_main_component.exports;// CONCATENATED MODULE: ./packages/aside/index.js
/* istanbul ignore next */aside_src_main.install=function(Vue){Vue.component(aside_src_main.name,aside_src_main);};/* harmony default export */var aside=aside_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/main.vue?vue&type=template&id=2a3a7406&
var mainvue_type_template_id_2a3a7406_render=function mainvue_type_template_id_2a3a7406_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("main",{staticClass:"el-main"},[_vm._t("default")],2);};var mainvue_type_template_id_2a3a7406_staticRenderFns=[];mainvue_type_template_id_2a3a7406_render._withStripped=true;// CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=2a3a7406&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
/* harmony default export */var main_src_mainvue_type_script_lang_js_={name:'ElMain',componentName:'ElMain'};// CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_main_src_mainvue_type_script_lang_js_=main_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/main/src/main.vue
/* normalize component */var main_src_main_component=normalizeComponent(packages_main_src_mainvue_type_script_lang_js_,mainvue_type_template_id_2a3a7406_render,mainvue_type_template_id_2a3a7406_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var main_src_main_api; }main_src_main_component.options.__file="packages/main/src/main.vue";/* harmony default export */var main_src_main=main_src_main_component.exports;// CONCATENATED MODULE: ./packages/main/index.js
/* istanbul ignore next */main_src_main.install=function(Vue){Vue.component(main_src_main.name,main_src_main);};/* harmony default export */var packages_main=main_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/footer/src/main.vue?vue&type=template&id=80210338&
var mainvue_type_template_id_80210338_render=function mainvue_type_template_id_80210338_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("footer",{staticClass:"el-footer",style:{height:_vm.height}},[_vm._t("default")],2);};var mainvue_type_template_id_80210338_staticRenderFns=[];mainvue_type_template_id_80210338_render._withStripped=true;// CONCATENATED MODULE: ./packages/footer/src/main.vue?vue&type=template&id=80210338&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/footer/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
/* harmony default export */var footer_src_mainvue_type_script_lang_js_={name:'ElFooter',componentName:'ElFooter',props:{height:{type:String,default:'60px'}}};// CONCATENATED MODULE: ./packages/footer/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_footer_src_mainvue_type_script_lang_js_=footer_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/footer/src/main.vue
/* normalize component */var footer_src_main_component=normalizeComponent(packages_footer_src_mainvue_type_script_lang_js_,mainvue_type_template_id_80210338_render,mainvue_type_template_id_80210338_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var footer_src_main_api; }footer_src_main_component.options.__file="packages/footer/src/main.vue";/* harmony default export */var footer_src_main=footer_src_main_component.exports;// CONCATENATED MODULE: ./packages/footer/index.js
/* istanbul ignore next */footer_src_main.install=function(Vue){Vue.component(footer_src_main.name,footer_src_main);};/* harmony default export */var footer=footer_src_main;// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/timeline/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var timeline_src_mainvue_type_script_lang_js_={name:'ElTimeline',props:{reverse:{type:Boolean,default:false}},provide:function provide(){return{timeline:this};},render:function render(){var h=arguments[0];var reverse=this.reverse;var classes={'el-timeline':true,'is-reverse':reverse};var slots=this.$slots.default||[];if(reverse){slots=slots.reverse();}return h('ul',{'class':classes},[slots]);}};// CONCATENATED MODULE: ./packages/timeline/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_timeline_src_mainvue_type_script_lang_js_=timeline_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/timeline/src/main.vue
var main_render,main_staticRenderFns;/* normalize component */var timeline_src_main_component=normalizeComponent(packages_timeline_src_mainvue_type_script_lang_js_,main_render,main_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var timeline_src_main_api; }timeline_src_main_component.options.__file="packages/timeline/src/main.vue";/* harmony default export */var timeline_src_main=timeline_src_main_component.exports;// CONCATENATED MODULE: ./packages/timeline/index.js
/* istanbul ignore next */timeline_src_main.install=function(Vue){Vue.component(timeline_src_main.name,timeline_src_main);};/* harmony default export */var timeline=timeline_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/timeline/src/item.vue?vue&type=template&id=61a69e50&
var itemvue_type_template_id_61a69e50_render=function itemvue_type_template_id_61a69e50_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("li",{staticClass:"el-timeline-item"},[_c("div",{staticClass:"el-timeline-item__tail"}),!_vm.$slots.dot?_c("div",{staticClass:"el-timeline-item__node",class:["el-timeline-item__node--"+(_vm.size||""),"el-timeline-item__node--"+(_vm.type||"")],style:{backgroundColor:_vm.color}},[_vm.icon?_c("i",{staticClass:"el-timeline-item__icon",class:_vm.icon}):_vm._e()]):_vm._e(),_vm.$slots.dot?_c("div",{staticClass:"el-timeline-item__dot"},[_vm._t("dot")],2):_vm._e(),_c("div",{staticClass:"el-timeline-item__wrapper"},[!_vm.hideTimestamp&&_vm.placement==="top"?_c("div",{staticClass:"el-timeline-item__timestamp is-top"},[_vm._v("\n      "+_vm._s(_vm.timestamp)+"\n    ")]):_vm._e(),_c("div",{staticClass:"el-timeline-item__content"},[_vm._t("default")],2),!_vm.hideTimestamp&&_vm.placement==="bottom"?_c("div",{staticClass:"el-timeline-item__timestamp is-bottom"},[_vm._v("\n      "+_vm._s(_vm.timestamp)+"\n    ")]):_vm._e()])]);};var itemvue_type_template_id_61a69e50_staticRenderFns=[];itemvue_type_template_id_61a69e50_render._withStripped=true;// CONCATENATED MODULE: ./packages/timeline/src/item.vue?vue&type=template&id=61a69e50&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/timeline/src/item.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var timeline_src_itemvue_type_script_lang_js_={name:'ElTimelineItem',inject:['timeline'],props:{timestamp:String,hideTimestamp:{type:Boolean,default:false},placement:{type:String,default:'bottom'},type:String,color:String,size:{type:String,default:'normal'},icon:String}};// CONCATENATED MODULE: ./packages/timeline/src/item.vue?vue&type=script&lang=js&
/* harmony default export */var packages_timeline_src_itemvue_type_script_lang_js_=timeline_src_itemvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/timeline/src/item.vue
/* normalize component */var src_item_component=normalizeComponent(packages_timeline_src_itemvue_type_script_lang_js_,itemvue_type_template_id_61a69e50_render,itemvue_type_template_id_61a69e50_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var src_item_api; }src_item_component.options.__file="packages/timeline/src/item.vue";/* harmony default export */var timeline_src_item=src_item_component.exports;// CONCATENATED MODULE: ./packages/timeline-item/index.js
/* istanbul ignore next */timeline_src_item.install=function(Vue){Vue.component(timeline_src_item.name,timeline_src_item);};/* harmony default export */var timeline_item=timeline_src_item;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/link/src/main.vue?vue&type=template&id=01cf3b65&
var mainvue_type_template_id_01cf3b65_render=function mainvue_type_template_id_01cf3b65_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("a",_vm._b({class:["el-link",_vm.type?"el-link--"+_vm.type:"",_vm.disabled&&"is-disabled",_vm.underline&&!_vm.disabled&&"is-underline"],attrs:{href:_vm.disabled?null:_vm.href},on:{click:_vm.handleClick}},"a",_vm.$attrs,false),[_vm.icon?_c("i",{class:_vm.icon}):_vm._e(),_vm.$slots.default?_c("span",{staticClass:"el-link--inner"},[_vm._t("default")],2):_vm._e(),_vm.$slots.icon?[_vm.$slots.icon?_vm._t("icon"):_vm._e()]:_vm._e()],2);};var mainvue_type_template_id_01cf3b65_staticRenderFns=[];mainvue_type_template_id_01cf3b65_render._withStripped=true;// CONCATENATED MODULE: ./packages/link/src/main.vue?vue&type=template&id=01cf3b65&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/link/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var link_src_mainvue_type_script_lang_js_={name:'ElLink',props:{type:{type:String,default:'default'},underline:{type:Boolean,default:true},disabled:Boolean,href:String,icon:String},methods:{handleClick:function handleClick(event){if(!this.disabled){if(!this.href){this.$emit('click',event);}}}}};// CONCATENATED MODULE: ./packages/link/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_link_src_mainvue_type_script_lang_js_=link_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/link/src/main.vue
/* normalize component */var link_src_main_component=normalizeComponent(packages_link_src_mainvue_type_script_lang_js_,mainvue_type_template_id_01cf3b65_render,mainvue_type_template_id_01cf3b65_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var link_src_main_api; }link_src_main_component.options.__file="packages/link/src/main.vue";/* harmony default export */var link_src_main=link_src_main_component.exports;// CONCATENATED MODULE: ./packages/link/index.js
/* istanbul ignore next */link_src_main.install=function(Vue){Vue.component(link_src_main.name,link_src_main);};/* harmony default export */var packages_link=link_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/divider/src/main.vue?vue&type=template&id=7fa02a7e&functional=true&
var mainvue_type_template_id_7fa02a7e_functional_true_render=function mainvue_type_template_id_7fa02a7e_functional_true_render(_h,_vm){var _c=_vm._c;return _c("div",_vm._g(_vm._b({class:[_vm.data.staticClass,"el-divider","el-divider--"+_vm.props.direction]},"div",_vm.data.attrs,false),_vm.listeners),[_vm.slots().default&&_vm.props.direction!=="vertical"?_c("div",{class:["el-divider__text","is-"+_vm.props.contentPosition]},[_vm._t("default")],2):_vm._e()]);};var mainvue_type_template_id_7fa02a7e_functional_true_staticRenderFns=[];mainvue_type_template_id_7fa02a7e_functional_true_render._withStripped=true;// CONCATENATED MODULE: ./packages/divider/src/main.vue?vue&type=template&id=7fa02a7e&functional=true&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/divider/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var divider_src_mainvue_type_script_lang_js_={name:'ElDivider',props:{direction:{type:String,default:'horizontal',validator:function validator(val){return['horizontal','vertical'].indexOf(val)!==-1;}},contentPosition:{type:String,default:'center',validator:function validator(val){return['left','center','right'].indexOf(val)!==-1;}}}};// CONCATENATED MODULE: ./packages/divider/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_divider_src_mainvue_type_script_lang_js_=divider_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/divider/src/main.vue
/* normalize component */var divider_src_main_component=normalizeComponent(packages_divider_src_mainvue_type_script_lang_js_,mainvue_type_template_id_7fa02a7e_functional_true_render,mainvue_type_template_id_7fa02a7e_functional_true_staticRenderFns,true,null,null,null);/* hot reload */if(false){ var divider_src_main_api; }divider_src_main_component.options.__file="packages/divider/src/main.vue";/* harmony default export */var divider_src_main=divider_src_main_component.exports;// CONCATENATED MODULE: ./packages/divider/index.js
/* istanbul ignore next */divider_src_main.install=function(Vue){Vue.component(divider_src_main.name,divider_src_main);};/* harmony default export */var divider=divider_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/image/src/main.vue?vue&type=template&id=44d84a7c&
var mainvue_type_template_id_44d84a7c_render=function mainvue_type_template_id_44d84a7c_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-image"},[_vm.loading?_vm._t("placeholder",[_c("div",{staticClass:"el-image__placeholder"})]):_vm.error?_vm._t("error",[_c("div",{staticClass:"el-image__error"},[_vm._v(_vm._s(_vm.t("el.image.error")))])]):_c("img",_vm._g(_vm._b({staticClass:"el-image__inner",class:{"el-image__inner--center":_vm.alignCenter,"el-image__preview":_vm.preview},style:_vm.imageStyle,attrs:{src:_vm.src},on:{click:_vm.clickHandler}},"img",_vm.$attrs,false),_vm.$listeners)),_vm.preview?[_vm.showViewer?_c("image-viewer",{attrs:{"z-index":_vm.zIndex,"initial-index":_vm.imageIndex,"on-close":_vm.closeViewer,"url-list":_vm.previewSrcList}}):_vm._e()]:_vm._e()],2);};var mainvue_type_template_id_44d84a7c_staticRenderFns=[];mainvue_type_template_id_44d84a7c_render._withStripped=true;// CONCATENATED MODULE: ./packages/image/src/main.vue?vue&type=template&id=44d84a7c&
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/image/src/image-viewer.vue?vue&type=template&id=5e73b307&
var image_viewervue_type_template_id_5e73b307_render=function image_viewervue_type_template_id_5e73b307_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("transition",{attrs:{name:"viewer-fade"}},[_c("div",{ref:"el-image-viewer__wrapper",staticClass:"el-image-viewer__wrapper",style:{"z-index":_vm.zIndex},attrs:{tabindex:"-1"}},[_c("div",{staticClass:"el-image-viewer__mask"}),_c("span",{staticClass:"el-image-viewer__btn el-image-viewer__close",on:{click:_vm.hide}},[_c("i",{staticClass:"el-icon-circle-close"})]),!_vm.isSingle?[_c("span",{staticClass:"el-image-viewer__btn el-image-viewer__prev",class:{"is-disabled":!_vm.infinite&&_vm.isFirst},on:{click:_vm.prev}},[_c("i",{staticClass:"el-icon-arrow-left"})]),_c("span",{staticClass:"el-image-viewer__btn el-image-viewer__next",class:{"is-disabled":!_vm.infinite&&_vm.isLast},on:{click:_vm.next}},[_c("i",{staticClass:"el-icon-arrow-right"})])]:_vm._e(),_c("div",{staticClass:"el-image-viewer__btn el-image-viewer__actions"},[_c("div",{staticClass:"el-image-viewer__actions__inner"},[_c("i",{staticClass:"el-icon-zoom-out",on:{click:function click($event){_vm.handleActions("zoomOut");}}}),_c("i",{staticClass:"el-icon-zoom-in",on:{click:function click($event){_vm.handleActions("zoomIn");}}}),_c("i",{staticClass:"el-image-viewer__actions__divider"}),_c("i",{class:_vm.mode.icon,on:{click:_vm.toggleMode}}),_c("i",{staticClass:"el-image-viewer__actions__divider"}),_c("i",{staticClass:"el-icon-refresh-left",on:{click:function click($event){_vm.handleActions("anticlocelise");}}}),_c("i",{staticClass:"el-icon-refresh-right",on:{click:function click($event){_vm.handleActions("clocelise");}}})])]),_c("div",{staticClass:"el-image-viewer__canvas"},_vm._l(_vm.urlList,function(url,i){return i===_vm.index?_c("img",{key:url,ref:"img",refInFor:true,staticClass:"el-image-viewer__img",style:_vm.imgStyle,attrs:{src:_vm.currentImg},on:{load:_vm.handleImgLoad,error:_vm.handleImgError,mousedown:_vm.handleMouseDown}}):_vm._e();}),0)],2)]);};var image_viewervue_type_template_id_5e73b307_staticRenderFns=[];image_viewervue_type_template_id_5e73b307_render._withStripped=true;// CONCATENATED MODULE: ./packages/image/src/image-viewer.vue?vue&type=template&id=5e73b307&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/image/src/image-viewer.vue?vue&type=script&lang=js&
var image_viewervue_type_script_lang_js_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var Mode={CONTAIN:{name:'contain',icon:'el-icon-full-screen'},ORIGINAL:{name:'original',icon:'el-icon-c-scale-to-original'}};var mousewheelEventName=Object(util_["isFirefox"])()?'DOMMouseScroll':'mousewheel';/* harmony default export */var image_viewervue_type_script_lang_js_={name:'elImageViewer',props:{urlList:{type:Array,default:function _default(){return[];}},zIndex:{type:Number,default:2000},onSwitch:{type:Function,default:function _default(){}},onClose:{type:Function,default:function _default(){}},initialIndex:{type:Number,default:0}},data:function data(){return{index:this.initialIndex,isShow:false,infinite:true,loading:false,mode:Mode.CONTAIN,transform:{scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:false}};},computed:{isSingle:function isSingle(){return this.urlList.length<=1;},isFirst:function isFirst(){return this.index===0;},isLast:function isLast(){return this.index===this.urlList.length-1;},currentImg:function currentImg(){return this.urlList[this.index];},imgStyle:function imgStyle(){var _transform=this.transform,scale=_transform.scale,deg=_transform.deg,offsetX=_transform.offsetX,offsetY=_transform.offsetY,enableTransition=_transform.enableTransition;var style={transform:'scale('+scale+') rotate('+deg+'deg)',transition:enableTransition?'transform .3s':'','margin-left':offsetX+'px','margin-top':offsetY+'px'};if(this.mode===Mode.CONTAIN){style.maxWidth=style.maxHeight='100%';}return style;}},watch:{index:{handler:function handler(val){this.reset();this.onSwitch(val);}},currentImg:function currentImg(val){var _this=this;this.$nextTick(function(_){var $img=_this.$refs.img[0];if(!$img.complete){_this.loading=true;}});}},methods:{hide:function hide(){this.deviceSupportUninstall();this.onClose();},deviceSupportInstall:function deviceSupportInstall(){var _this2=this;this._keyDownHandler=Object(util_["rafThrottle"])(function(e){var keyCode=e.keyCode;switch(keyCode){// ESC
case 27:_this2.hide();break;// SPACE
case 32:_this2.toggleMode();break;// LEFT_ARROW
case 37:_this2.prev();break;// UP_ARROW
case 38:_this2.handleActions('zoomIn');break;// RIGHT_ARROW
case 39:_this2.next();break;// DOWN_ARROW
case 40:_this2.handleActions('zoomOut');break;}});this._mouseWheelHandler=Object(util_["rafThrottle"])(function(e){var delta=e.wheelDelta?e.wheelDelta:-e.detail;if(delta>0){_this2.handleActions('zoomIn',{zoomRate:0.015,enableTransition:false});}else{_this2.handleActions('zoomOut',{zoomRate:0.015,enableTransition:false});}});Object(dom_["on"])(document,'keydown',this._keyDownHandler);Object(dom_["on"])(document,mousewheelEventName,this._mouseWheelHandler);},deviceSupportUninstall:function deviceSupportUninstall(){Object(dom_["off"])(document,'keydown',this._keyDownHandler);Object(dom_["off"])(document,mousewheelEventName,this._mouseWheelHandler);this._keyDownHandler=null;this._mouseWheelHandler=null;},handleImgLoad:function handleImgLoad(e){this.loading=false;},handleImgError:function handleImgError(e){this.loading=false;e.target.alt='加载失败';},handleMouseDown:function handleMouseDown(e){var _this3=this;if(this.loading||e.button!==0)return;var _transform2=this.transform,offsetX=_transform2.offsetX,offsetY=_transform2.offsetY;var startX=e.pageX;var startY=e.pageY;this._dragHandler=Object(util_["rafThrottle"])(function(ev){_this3.transform.offsetX=offsetX+ev.pageX-startX;_this3.transform.offsetY=offsetY+ev.pageY-startY;});Object(dom_["on"])(document,'mousemove',this._dragHandler);Object(dom_["on"])(document,'mouseup',function(ev){Object(dom_["off"])(document,'mousemove',_this3._dragHandler);});e.preventDefault();},reset:function reset(){this.transform={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:false};},toggleMode:function toggleMode(){if(this.loading)return;var modeNames=Object.keys(Mode);var modeValues=Object.values(Mode);var index=modeValues.indexOf(this.mode);var nextIndex=(index+1)%modeNames.length;this.mode=Mode[modeNames[nextIndex]];this.reset();},prev:function prev(){if(this.isFirst&&!this.infinite)return;var len=this.urlList.length;this.index=(this.index-1+len)%len;},next:function next(){if(this.isLast&&!this.infinite)return;var len=this.urlList.length;this.index=(this.index+1)%len;},handleActions:function handleActions(action){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(this.loading)return;var _zoomRate$rotateDeg$e=image_viewervue_type_script_lang_js_extends({zoomRate:0.2,rotateDeg:90,enableTransition:true},options),zoomRate=_zoomRate$rotateDeg$e.zoomRate,rotateDeg=_zoomRate$rotateDeg$e.rotateDeg,enableTransition=_zoomRate$rotateDeg$e.enableTransition;var transform=this.transform;switch(action){case'zoomOut':if(transform.scale>0.2){transform.scale=parseFloat((transform.scale-zoomRate).toFixed(3));}break;case'zoomIn':transform.scale=parseFloat((transform.scale+zoomRate).toFixed(3));break;case'clocelise':transform.deg+=rotateDeg;break;case'anticlocelise':transform.deg-=rotateDeg;break;}transform.enableTransition=enableTransition;}},mounted:function mounted(){this.deviceSupportInstall();// add tabindex then wrapper can be focusable via Javascript
// focus wrapper so arrow key can't cause inner scroll behavior underneath
this.$refs['el-image-viewer__wrapper'].focus();}};// CONCATENATED MODULE: ./packages/image/src/image-viewer.vue?vue&type=script&lang=js&
/* harmony default export */var src_image_viewervue_type_script_lang_js_=image_viewervue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/image/src/image-viewer.vue
/* normalize component */var image_viewer_component=normalizeComponent(src_image_viewervue_type_script_lang_js_,image_viewervue_type_template_id_5e73b307_render,image_viewervue_type_template_id_5e73b307_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var image_viewer_api; }image_viewer_component.options.__file="packages/image/src/image-viewer.vue";/* harmony default export */var image_viewer=image_viewer_component.exports;// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/image/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var isSupportObjectFit=function isSupportObjectFit(){return document.documentElement.style.objectFit!==undefined;};var ObjectFit={NONE:'none',CONTAIN:'contain',COVER:'cover',FILL:'fill',SCALE_DOWN:'scale-down'};var prevOverflow='';/* harmony default export */var image_src_mainvue_type_script_lang_js_={name:'ElImage',mixins:[locale_default.a],inheritAttrs:false,components:{ImageViewer:image_viewer},props:{src:String,fit:String,lazy:Boolean,scrollContainer:{},previewSrcList:{type:Array,default:function _default(){return[];}},zIndex:{type:Number,default:2000}},data:function data(){return{loading:true,error:false,show:!this.lazy,imageWidth:0,imageHeight:0,showViewer:false};},computed:{imageStyle:function imageStyle(){var fit=this.fit;if(!this.$isServer&&fit){return isSupportObjectFit()?{'object-fit':fit}:this.getImageStyle(fit);}return{};},alignCenter:function alignCenter(){return!this.$isServer&&!isSupportObjectFit()&&this.fit!==ObjectFit.FILL;},preview:function preview(){var previewSrcList=this.previewSrcList;return Array.isArray(previewSrcList)&&previewSrcList.length>0;},imageIndex:function imageIndex(){var previewIndex=0;var srcIndex=this.previewSrcList.indexOf(this.src);if(srcIndex>=0){previewIndex=srcIndex;}return previewIndex;}},watch:{src:function src(val){this.show&&this.loadImage();},show:function show(val){val&&this.loadImage();}},mounted:function mounted(){if(this.lazy){this.addLazyLoadListener();}else{this.loadImage();}},beforeDestroy:function beforeDestroy(){this.lazy&&this.removeLazyLoadListener();},methods:{loadImage:function loadImage(){var _this=this;if(this.$isServer)return;// reset status
this.loading=true;this.error=false;var img=new Image();img.onload=function(e){return _this.handleLoad(e,img);};img.onerror=this.handleError.bind(this);// bind html attrs
// so it can behave consistently
Object.keys(this.$attrs).forEach(function(key){var value=_this.$attrs[key];img.setAttribute(key,value);});img.src=this.src;},handleLoad:function handleLoad(e,img){this.imageWidth=img.width;this.imageHeight=img.height;this.loading=false;this.error=false;},handleError:function handleError(e){this.loading=false;this.error=true;this.$emit('error',e);},handleLazyLoad:function handleLazyLoad(){if(Object(dom_["isInContainer"])(this.$el,this._scrollContainer)){this.show=true;this.removeLazyLoadListener();}},addLazyLoadListener:function addLazyLoadListener(){if(this.$isServer)return;var scrollContainer=this.scrollContainer;var _scrollContainer=null;if(Object(types_["isHtmlElement"])(scrollContainer)){_scrollContainer=scrollContainer;}else if(Object(types_["isString"])(scrollContainer)){_scrollContainer=document.querySelector(scrollContainer);}else{_scrollContainer=Object(dom_["getScrollContainer"])(this.$el);}if(_scrollContainer){this._scrollContainer=_scrollContainer;this._lazyLoadHandler=throttle_default()(200,this.handleLazyLoad);Object(dom_["on"])(_scrollContainer,'scroll',this._lazyLoadHandler);this.handleLazyLoad();}},removeLazyLoadListener:function removeLazyLoadListener(){var _scrollContainer=this._scrollContainer,_lazyLoadHandler=this._lazyLoadHandler;if(this.$isServer||!_scrollContainer||!_lazyLoadHandler)return;Object(dom_["off"])(_scrollContainer,'scroll',_lazyLoadHandler);this._scrollContainer=null;this._lazyLoadHandler=null;},/**
     * simulate object-fit behavior to compatible with IE11 and other browsers which not support object-fit
     */getImageStyle:function getImageStyle(fit){var imageWidth=this.imageWidth,imageHeight=this.imageHeight;var _$el=this.$el,containerWidth=_$el.clientWidth,containerHeight=_$el.clientHeight;if(!imageWidth||!imageHeight||!containerWidth||!containerHeight)return{};var vertical=imageWidth/imageHeight<1;if(fit===ObjectFit.SCALE_DOWN){var isSmaller=imageWidth<containerWidth&&imageHeight<containerHeight;fit=isSmaller?ObjectFit.NONE:ObjectFit.CONTAIN;}switch(fit){case ObjectFit.NONE:return{width:'auto',height:'auto'};case ObjectFit.CONTAIN:return vertical?{width:'auto'}:{height:'auto'};case ObjectFit.COVER:return vertical?{height:'auto'}:{width:'auto'};default:return{};}},clickHandler:function clickHandler(){// don't show viewer when preview is false
if(!this.preview){return;}// prevent body scroll
prevOverflow=document.body.style.overflow;document.body.style.overflow='hidden';this.showViewer=true;},closeViewer:function closeViewer(){document.body.style.overflow=prevOverflow;this.showViewer=false;}}};// CONCATENATED MODULE: ./packages/image/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_image_src_mainvue_type_script_lang_js_=image_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/image/src/main.vue
/* normalize component */var image_src_main_component=normalizeComponent(packages_image_src_mainvue_type_script_lang_js_,mainvue_type_template_id_44d84a7c_render,mainvue_type_template_id_44d84a7c_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var image_src_main_api; }image_src_main_component.options.__file="packages/image/src/main.vue";/* harmony default export */var image_src_main=image_src_main_component.exports;// CONCATENATED MODULE: ./packages/image/index.js
/* istanbul ignore next */image_src_main.install=function(Vue){Vue.component(image_src_main.name,image_src_main);};/* harmony default export */var packages_image=image_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/calendar/src/main.vue?vue&type=template&id=6d9756be&
var mainvue_type_template_id_6d9756be_render=function mainvue_type_template_id_6d9756be_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-calendar"},[_c("div",{staticClass:"el-calendar__header"},[_c("div",{staticClass:"el-calendar__title"},[_vm._v("\n      "+_vm._s(_vm.i18nDate)+"\n    ")]),_vm.validatedRange.length===0?_c("div",{staticClass:"el-calendar__button-group"},[_c("el-button-group",[_c("el-button",{attrs:{type:"plain",size:"mini"},on:{click:function click($event){_vm.selectDate("prev-month");}}},[_vm._v("\n          "+_vm._s(_vm.t("el.datepicker.prevMonth"))+"\n        ")]),_c("el-button",{attrs:{type:"plain",size:"mini"},on:{click:function click($event){_vm.selectDate("today");}}},[_vm._v("\n          "+_vm._s(_vm.t("el.datepicker.today"))+"\n        ")]),_c("el-button",{attrs:{type:"plain",size:"mini"},on:{click:function click($event){_vm.selectDate("next-month");}}},[_vm._v("\n          "+_vm._s(_vm.t("el.datepicker.nextMonth"))+"\n        ")])],1)],1):_vm._e()]),_vm.validatedRange.length===0?_c("div",{key:"no-range",staticClass:"el-calendar__body"},[_c("date-table",{attrs:{date:_vm.date,"selected-day":_vm.realSelectedDay,"first-day-of-week":_vm.realFirstDayOfWeek},on:{pick:_vm.pickDay}})],1):_c("div",{key:"has-range",staticClass:"el-calendar__body"},_vm._l(_vm.validatedRange,function(range,index){return _c("date-table",{key:index,attrs:{date:range[0],"selected-day":_vm.realSelectedDay,range:range,"hide-header":index!==0,"first-day-of-week":_vm.realFirstDayOfWeek},on:{pick:_vm.pickDay}});}),1)]);};var mainvue_type_template_id_6d9756be_staticRenderFns=[];mainvue_type_template_id_6d9756be_render._withStripped=true;// CONCATENATED MODULE: ./packages/calendar/src/main.vue?vue&type=template&id=6d9756be&
// EXTERNAL MODULE: external "element-ui/lib/utils/date"
var date_=__webpack_require__(20);var date_default=/*#__PURE__*/__webpack_require__.n(date_);// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/calendar/src/date-table.vue?vue&type=script&lang=js&
/* harmony default export */var src_date_tablevue_type_script_lang_js_={props:{selectedDay:String,// formated date yyyy-MM-dd
range:{type:Array,validator:function validator(val){if(!(val&&val.length))return true;var start=val[0],end=val[1];return Object(date_util_["validateRangeInOneMonth"])(start,end);}},date:Date,hideHeader:Boolean,firstDayOfWeek:Number},inject:['elCalendar'],data:function data(){return{WEEK_DAYS:Object(date_util_["getI18nSettings"])().dayNames};},methods:{toNestedArr:function toNestedArr(days){return Object(date_util_["range"])(days.length/7).map(function(_,index){var start=index*7;return days.slice(start,start+7);});},getFormateDate:function getFormateDate(day,type){if(!day||['prev','current','next'].indexOf(type)===-1){throw new Error('invalid day or type');}var prefix=this.curMonthDatePrefix;if(type==='prev'){prefix=this.prevMonthDatePrefix;}else if(type==='next'){prefix=this.nextMonthDatePrefix;}day=('00'+day).slice(-2);return prefix+'-'+day;},getCellClass:function getCellClass(_ref){var text=_ref.text,type=_ref.type;var classes=[type];if(type==='current'){var date=this.getFormateDate(text,type);if(date===this.selectedDay){classes.push('is-selected');}if(date===this.formatedToday){classes.push('is-today');}}return classes;},pickDay:function pickDay(_ref2){var text=_ref2.text,type=_ref2.type;var date=this.getFormateDate(text,type);this.$emit('pick',date);},cellRenderProxy:function cellRenderProxy(_ref3){var text=_ref3.text,type=_ref3.type;var h=this.$createElement;var render=this.elCalendar.$scopedSlots.dateCell;if(!render)return h('span',[text]);var day=this.getFormateDate(text,type);var date=new Date(day);var data={isSelected:this.selectedDay===day,type:type+'-month',day:day};return render({date:date,data:data});}},computed:{prevMonthDatePrefix:function prevMonthDatePrefix(){var temp=new Date(this.date.getTime());temp.setDate(0);return date_default.a.format(temp,'yyyy-MM');},curMonthDatePrefix:function curMonthDatePrefix(){return date_default.a.format(this.date,'yyyy-MM');},nextMonthDatePrefix:function nextMonthDatePrefix(){var temp=new Date(this.date.getFullYear(),this.date.getMonth()+1,1);return date_default.a.format(temp,'yyyy-MM');},formatedToday:function formatedToday(){return this.elCalendar.formatedToday;},isInRange:function isInRange(){return this.range&&this.range.length;},rows:function rows(){var days=[];// if range exists, should render days in range.
if(this.isInRange){var _range=this.range,start=_range[0],end=_range[1];var currentMonthRange=Object(date_util_["range"])(end.getDate()-start.getDate()+1).map(function(_,index){return{text:start.getDate()+index,type:'current'};});var remaining=currentMonthRange.length%7;remaining=remaining===0?0:7-remaining;var nextMonthRange=Object(date_util_["range"])(remaining).map(function(_,index){return{text:index+1,type:'next'};});days=currentMonthRange.concat(nextMonthRange);}else{var date=this.date;var firstDay=Object(date_util_["getFirstDayOfMonth"])(date);firstDay=firstDay===0?7:firstDay;var firstDayOfWeek=typeof this.firstDayOfWeek==='number'?this.firstDayOfWeek:1;var prevMonthDays=Object(date_util_["getPrevMonthLastDays"])(date,firstDay-firstDayOfWeek).map(function(day){return{text:day,type:'prev'};});var currentMonthDays=Object(date_util_["getMonthDays"])(date).map(function(day){return{text:day,type:'current'};});days=[].concat(prevMonthDays,currentMonthDays);var nextMonthDays=Object(date_util_["range"])(42-days.length).map(function(_,index){return{text:index+1,type:'next'};});days=days.concat(nextMonthDays);}return this.toNestedArr(days);},weekDays:function weekDays(){var start=this.firstDayOfWeek;var WEEK_DAYS=this.WEEK_DAYS;if(typeof start!=='number'||start===0){return WEEK_DAYS.slice();}else{return WEEK_DAYS.slice(start).concat(WEEK_DAYS.slice(0,start));}}},render:function render(){var _this=this;var h=arguments[0];var thead=this.hideHeader?null:h('thead',[this.weekDays.map(function(day){return h('th',{key:day},[day]);})]);return h('table',{'class':{'el-calendar-table':true,'is-range':this.isInRange},attrs:{cellspacing:'0',cellpadding:'0'}},[thead,h('tbody',[this.rows.map(function(row,index){return h('tr',{'class':{'el-calendar-table__row':true,'el-calendar-table__row--hide-border':index===0&&_this.hideHeader},key:index},[row.map(function(cell,key){return h('td',{key:key,'class':_this.getCellClass(cell),on:{'click':_this.pickDay.bind(_this,cell)}},[h('div',{'class':'el-calendar-day'},[_this.cellRenderProxy(cell)])]);})]);})])]);}};// CONCATENATED MODULE: ./packages/calendar/src/date-table.vue?vue&type=script&lang=js&
/* harmony default export */var calendar_src_date_tablevue_type_script_lang_js_=src_date_tablevue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/calendar/src/date-table.vue
var date_table_render,date_table_staticRenderFns;/* normalize component */var src_date_table_component=normalizeComponent(calendar_src_date_tablevue_type_script_lang_js_,date_table_render,date_table_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var src_date_table_api; }src_date_table_component.options.__file="packages/calendar/src/date-table.vue";/* harmony default export */var src_date_table=src_date_table_component.exports;// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/calendar/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var validTypes=['prev-month','today','next-month'];var weekDays=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];var oneDay=86400000;/* harmony default export */var calendar_src_mainvue_type_script_lang_js_={name:'ElCalendar',mixins:[locale_default.a],components:{DateTable:src_date_table,ElButton:button_default.a,ElButtonGroup:button_group_default.a},props:{value:[Date,String,Number],range:{type:Array,validator:function validator(range){if(Array.isArray(range)){return range.length===2&&range.every(function(item){return typeof item==='string'||typeof item==='number'||item instanceof Date;});}else{return true;}}},firstDayOfWeek:{type:Number,default:1}},provide:function provide(){return{elCalendar:this};},methods:{pickDay:function pickDay(day){this.realSelectedDay=day;},selectDate:function selectDate(type){if(validTypes.indexOf(type)===-1){throw new Error('invalid type '+type);}var day='';if(type==='prev-month'){day=this.prevMonthDatePrefix+'-01';}else if(type==='next-month'){day=this.nextMonthDatePrefix+'-01';}else{day=this.formatedToday;}if(day===this.formatedDate)return;this.pickDay(day);},toDate:function toDate(val){if(!val){throw new Error('invalid val');}return val instanceof Date?val:new Date(val);},rangeValidator:function rangeValidator(date,isStart){var firstDayOfWeek=this.realFirstDayOfWeek;var expected=isStart?firstDayOfWeek:firstDayOfWeek===0?6:firstDayOfWeek-1;var message=(isStart?'start':'end')+' of range should be '+weekDays[expected]+'.';if(date.getDay()!==expected){console.warn('[ElementCalendar]',message,'Invalid range will be ignored.');return false;}return true;}},computed:{prevMonthDatePrefix:function prevMonthDatePrefix(){var temp=new Date(this.date.getTime());temp.setDate(0);return date_default.a.format(temp,'yyyy-MM');},curMonthDatePrefix:function curMonthDatePrefix(){return date_default.a.format(this.date,'yyyy-MM');},nextMonthDatePrefix:function nextMonthDatePrefix(){var temp=new Date(this.date.getFullYear(),this.date.getMonth()+1,1);return date_default.a.format(temp,'yyyy-MM');},formatedDate:function formatedDate(){return date_default.a.format(this.date,'yyyy-MM-dd');},i18nDate:function i18nDate(){var year=this.date.getFullYear();var month=this.date.getMonth()+1;return year+' '+this.t('el.datepicker.year')+' '+this.t('el.datepicker.month'+month);},formatedToday:function formatedToday(){return date_default.a.format(this.now,'yyyy-MM-dd');},realSelectedDay:{get:function get(){if(!this.value)return this.selectedDay;return this.formatedDate;},set:function set(val){this.selectedDay=val;var date=new Date(val);this.$emit('input',date);}},date:function date(){if(!this.value){if(this.realSelectedDay){var d=this.selectedDay.split('-');return new Date(d[0],d[1]-1,d[2]);}else if(this.validatedRange.length){return this.validatedRange[0][0];}return this.now;}else{return this.toDate(this.value);}},// if range is valid, we get a two-digit array
validatedRange:function validatedRange(){var _this=this;var range=this.range;if(!range)return[];range=range.reduce(function(prev,val,index){var date=_this.toDate(val);if(_this.rangeValidator(date,index===0)){prev=prev.concat(date);}return prev;},[]);if(range.length===2){var _range=range,start=_range[0],end=_range[1];if(start>end){console.warn('[ElementCalendar]end time should be greater than start time');return[];}// start time and end time in one month
if(Object(date_util_["validateRangeInOneMonth"])(start,end)){return[[start,end]];}var data=[];var startDay=new Date(start.getFullYear(),start.getMonth()+1,1);var lastDay=this.toDate(startDay.getTime()-oneDay);if(!Object(date_util_["validateRangeInOneMonth"])(startDay,end)){console.warn('[ElementCalendar]start time and end time interval must not exceed two months');return[];}// 第一个月的时间范围
data.push([start,lastDay]);// 下一月的时间范围，需要计算一下该月的第一个周起始日
var firstDayOfWeek=this.realFirstDayOfWeek;var nextMontFirstDay=startDay.getDay();var interval=0;if(nextMontFirstDay!==firstDayOfWeek){if(firstDayOfWeek===0){interval=7-nextMontFirstDay;}else{interval=firstDayOfWeek-nextMontFirstDay;interval=interval>0?interval:7+interval;}}startDay=this.toDate(startDay.getTime()+interval*oneDay);if(startDay.getDate()<end.getDate()){data.push([startDay,end]);}return data;}return[];},realFirstDayOfWeek:function realFirstDayOfWeek(){if(this.firstDayOfWeek<1||this.firstDayOfWeek>6){return 0;}return Math.floor(this.firstDayOfWeek);}},data:function data(){return{selectedDay:'',now:new Date()};}};// CONCATENATED MODULE: ./packages/calendar/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_calendar_src_mainvue_type_script_lang_js_=calendar_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/calendar/src/main.vue
/* normalize component */var calendar_src_main_component=normalizeComponent(packages_calendar_src_mainvue_type_script_lang_js_,mainvue_type_template_id_6d9756be_render,mainvue_type_template_id_6d9756be_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var calendar_src_main_api; }calendar_src_main_component.options.__file="packages/calendar/src/main.vue";/* harmony default export */var calendar_src_main=calendar_src_main_component.exports;// CONCATENATED MODULE: ./packages/calendar/index.js
/* istanbul ignore next */calendar_src_main.install=function(Vue){Vue.component(calendar_src_main.name,calendar_src_main);};/* harmony default export */var calendar=calendar_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/backtop/src/main.vue?vue&type=template&id=257dd4a9&
var mainvue_type_template_id_257dd4a9_render=function mainvue_type_template_id_257dd4a9_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("transition",{attrs:{name:"el-fade-in"}},[_vm.visible?_c("div",{staticClass:"el-backtop",style:{right:_vm.styleRight,bottom:_vm.styleBottom},on:{click:function click($event){$event.stopPropagation();return _vm.handleClick($event);}}},[_vm._t("default",[_c("el-icon",{attrs:{name:"caret-top"}})])],2):_vm._e()]);};var mainvue_type_template_id_257dd4a9_staticRenderFns=[];mainvue_type_template_id_257dd4a9_render._withStripped=true;// CONCATENATED MODULE: ./packages/backtop/src/main.vue?vue&type=template&id=257dd4a9&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/backtop/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var cubic=function cubic(value){return Math.pow(value,3);};var easeInOutCubic=function easeInOutCubic(value){return value<0.5?cubic(value*2)/2:1-cubic((1-value)*2)/2;};/* harmony default export */var backtop_src_mainvue_type_script_lang_js_={name:'ElBacktop',props:{visibilityHeight:{type:Number,default:200},target:[String],right:{type:Number,default:40},bottom:{type:Number,default:40}},data:function data(){return{el:null,container:null,visible:false};},computed:{styleBottom:function styleBottom(){return this.bottom+'px';},styleRight:function styleRight(){return this.right+'px';}},mounted:function mounted(){this.init();this.throttledScrollHandler=throttle_default()(300,this.onScroll);this.container.addEventListener('scroll',this.throttledScrollHandler);},methods:{init:function init(){this.container=document;this.el=document.documentElement;if(this.target){this.el=document.querySelector(this.target);if(!this.el){throw new Error('target is not existed: '+this.target);}this.container=this.el;}},onScroll:function onScroll(){var scrollTop=this.el.scrollTop;this.visible=scrollTop>=this.visibilityHeight;},handleClick:function handleClick(e){this.scrollToTop();this.$emit('click',e);},scrollToTop:function scrollToTop(){var el=this.el;var beginTime=Date.now();var beginValue=el.scrollTop;var rAF=window.requestAnimationFrame||function(func){return setTimeout(func,16);};var frameFunc=function frameFunc(){var progress=(Date.now()-beginTime)/500;if(progress<1){el.scrollTop=beginValue*(1-easeInOutCubic(progress));rAF(frameFunc);}else{el.scrollTop=0;}};rAF(frameFunc);}},beforeDestroy:function beforeDestroy(){this.container.removeEventListener('scroll',this.throttledScrollHandler);}};// CONCATENATED MODULE: ./packages/backtop/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_backtop_src_mainvue_type_script_lang_js_=backtop_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/backtop/src/main.vue
/* normalize component */var backtop_src_main_component=normalizeComponent(packages_backtop_src_mainvue_type_script_lang_js_,mainvue_type_template_id_257dd4a9_render,mainvue_type_template_id_257dd4a9_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var backtop_src_main_api; }backtop_src_main_component.options.__file="packages/backtop/src/main.vue";/* harmony default export */var backtop_src_main=backtop_src_main_component.exports;// CONCATENATED MODULE: ./packages/backtop/index.js
/* istanbul ignore next */backtop_src_main.install=function(Vue){Vue.component(backtop_src_main.name,backtop_src_main);};/* harmony default export */var backtop=backtop_src_main;// CONCATENATED MODULE: ./packages/infinite-scroll/src/main.js
var getStyleComputedProperty=function getStyleComputedProperty(element,property){if(element===window){element=document.documentElement;}if(element.nodeType!==1){return[];}// NOTE: 1 DOM access here
var css=window.getComputedStyle(element,null);return property?css[property]:css;};var entries=function entries(obj){return Object.keys(obj||{}).map(function(key){return[key,obj[key]];});};var getPositionSize=function getPositionSize(el,prop){return el===window||el===document?document.documentElement[prop]:el[prop];};var getOffsetHeight=function getOffsetHeight(el){return getPositionSize(el,'offsetHeight');};var getClientHeight=function getClientHeight(el){return getPositionSize(el,'clientHeight');};var scope='ElInfiniteScroll';var attributes={delay:{type:Number,default:200},distance:{type:Number,default:0},disabled:{type:Boolean,default:false},immediate:{type:Boolean,default:true}};var main_getScrollOptions=function getScrollOptions(el,vm){if(!Object(types_["isHtmlElement"])(el))return{};return entries(attributes).reduce(function(map,_ref){var key=_ref[0],option=_ref[1];var type=option.type,defaultValue=option.default;var value=el.getAttribute('infinite-scroll-'+key);value=Object(types_["isUndefined"])(vm[value])?value:vm[value];switch(type){case Number:value=Number(value);value=Number.isNaN(value)?defaultValue:value;break;case Boolean:value=Object(types_["isDefined"])(value)?value==='false'?false:Boolean(value):defaultValue;break;default:value=type(value);}map[key]=value;return map;},{});};var getElementTop=function getElementTop(el){return el.getBoundingClientRect().top;};var main_handleScroll=function handleScroll(cb){var _scope=this[scope],el=_scope.el,vm=_scope.vm,container=_scope.container,observer=_scope.observer;var _getScrollOptions=main_getScrollOptions(el,vm),distance=_getScrollOptions.distance,disabled=_getScrollOptions.disabled;if(disabled)return;var containerInfo=container.getBoundingClientRect();if(!containerInfo.width&&!containerInfo.height)return;var shouldTrigger=false;if(container===el){// be aware of difference between clientHeight & offsetHeight & window.getComputedStyle().height
var scrollBottom=container.scrollTop+getClientHeight(container);shouldTrigger=container.scrollHeight-scrollBottom<=distance;}else{var heightBelowTop=getOffsetHeight(el)+getElementTop(el)-getElementTop(container);var offsetHeight=getOffsetHeight(container);var borderBottom=Number.parseFloat(getStyleComputedProperty(container,'borderBottomWidth'));shouldTrigger=heightBelowTop-offsetHeight+borderBottom<=distance;}if(shouldTrigger&&Object(types_["isFunction"])(cb)){cb.call(vm);}else if(observer){observer.disconnect();this[scope].observer=null;}};/* harmony default export */var infinite_scroll_src_main={name:'InfiniteScroll',inserted:function inserted(el,binding,vnode){var cb=binding.value;var vm=vnode.context;// only include vertical scroll
var container=Object(dom_["getScrollContainer"])(el,true);var _getScrollOptions2=main_getScrollOptions(el,vm),delay=_getScrollOptions2.delay,immediate=_getScrollOptions2.immediate;var onScroll=debounce_default()(delay,main_handleScroll.bind(el,cb));el[scope]={el:el,vm:vm,container:container,onScroll:onScroll};if(container){container.addEventListener('scroll',onScroll);if(immediate){var observer=el[scope].observer=new MutationObserver(onScroll);observer.observe(container,{childList:true,subtree:true});onScroll();}}},unbind:function unbind(el){var _el$scope=el[scope],container=_el$scope.container,onScroll=_el$scope.onScroll;if(container){container.removeEventListener('scroll',onScroll);}}};// CONCATENATED MODULE: ./packages/infinite-scroll/index.js
/* istanbul ignore next */infinite_scroll_src_main.install=function(Vue){Vue.directive(infinite_scroll_src_main.name,infinite_scroll_src_main);};/* harmony default export */var infinite_scroll=infinite_scroll_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/page-header/src/main.vue?vue&type=template&id=5070954c&
var mainvue_type_template_id_5070954c_render=function mainvue_type_template_id_5070954c_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{staticClass:"el-page-header"},[_c("div",{staticClass:"el-page-header__left",on:{click:function click($event){_vm.$emit("back");}}},[_c("i",{staticClass:"el-icon-back"}),_c("div",{staticClass:"el-page-header__title"},[_vm._t("title",[_vm._v(_vm._s(_vm.title))])],2)]),_c("div",{staticClass:"el-page-header__content"},[_vm._t("content",[_vm._v(_vm._s(_vm.content))])],2)]);};var mainvue_type_template_id_5070954c_staticRenderFns=[];mainvue_type_template_id_5070954c_render._withStripped=true;// CONCATENATED MODULE: ./packages/page-header/src/main.vue?vue&type=template&id=5070954c&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/page-header/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var page_header_src_mainvue_type_script_lang_js_={name:'ElPageHeader',props:{title:{type:String,default:function _default(){return Object(lib_locale_["t"])('el.pageHeader.title');}},content:String}};// CONCATENATED MODULE: ./packages/page-header/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_page_header_src_mainvue_type_script_lang_js_=page_header_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/page-header/src/main.vue
/* normalize component */var page_header_src_main_component=normalizeComponent(packages_page_header_src_mainvue_type_script_lang_js_,mainvue_type_template_id_5070954c_render,mainvue_type_template_id_5070954c_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var page_header_src_main_api; }page_header_src_main_component.options.__file="packages/page-header/src/main.vue";/* harmony default export */var page_header_src_main=page_header_src_main_component.exports;// CONCATENATED MODULE: ./packages/page-header/index.js
/* istanbul ignore next */page_header_src_main.install=function(Vue){Vue.component(page_header_src_main.name,page_header_src_main);};/* harmony default export */var page_header=page_header_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-panel.vue?vue&type=template&id=34932346&
var cascader_panelvue_type_template_id_34932346_render=function cascader_panelvue_type_template_id_34932346_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div",{class:["el-cascader-panel",_vm.border&&"is-bordered"],on:{keydown:_vm.handleKeyDown}},_vm._l(_vm.menus,function(menu,index){return _c("cascader-menu",{key:index,ref:"menu",refInFor:true,attrs:{index:index,nodes:menu}});}),1);};var cascader_panelvue_type_template_id_34932346_staticRenderFns=[];cascader_panelvue_type_template_id_34932346_render._withStripped=true;// CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue?vue&type=template&id=34932346&
// EXTERNAL MODULE: external "element-ui/lib/radio"
var radio_=__webpack_require__(43);var radio_default=/*#__PURE__*/__webpack_require__.n(radio_);// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-node.vue?vue&type=script&lang=js&
var stopPropagation=function stopPropagation(e){return e.stopPropagation();};/* harmony default export */var cascader_nodevue_type_script_lang_js_={inject:['panel'],components:{ElCheckbox:checkbox_default.a,ElRadio:radio_default.a},props:{node:{required:true},nodeId:String},computed:{config:function config(){return this.panel.config;},isLeaf:function isLeaf(){return this.node.isLeaf;},isDisabled:function isDisabled(){return this.node.isDisabled;},checkedValue:function checkedValue(){return this.panel.checkedValue;},isChecked:function isChecked(){return this.node.isSameNode(this.checkedValue);},inActivePath:function inActivePath(){return this.isInPath(this.panel.activePath);},inCheckedPath:function inCheckedPath(){var _this=this;if(!this.config.checkStrictly)return false;return this.panel.checkedNodePaths.some(function(checkedPath){return _this.isInPath(checkedPath);});},value:function value(){return this.node.getValueByOption();}},methods:{handleExpand:function handleExpand(){var _this2=this;var panel=this.panel,node=this.node,isDisabled=this.isDisabled,config=this.config;var multiple=config.multiple,checkStrictly=config.checkStrictly;if(!checkStrictly&&isDisabled||node.loading)return;if(config.lazy&&!node.loaded){panel.lazyLoad(node,function(){// do not use cached leaf value here, invoke this.isLeaf to get new value.
var isLeaf=_this2.isLeaf;if(!isLeaf)_this2.handleExpand();if(multiple){// if leaf sync checked state, else clear checked state
var checked=isLeaf?node.checked:false;_this2.handleMultiCheckChange(checked);}});}else{panel.handleExpand(node);}},handleCheckChange:function handleCheckChange(){var panel=this.panel,value=this.value,node=this.node;panel.handleCheckChange(value);panel.handleExpand(node);},handleMultiCheckChange:function handleMultiCheckChange(checked){this.node.doCheck(checked);this.panel.calculateMultiCheckedValue();},isInPath:function isInPath(pathNodes){var node=this.node;var selectedPathNode=pathNodes[node.level-1]||{};return selectedPathNode.uid===node.uid;},renderPrefix:function renderPrefix(h){var isLeaf=this.isLeaf,isChecked=this.isChecked,config=this.config;var checkStrictly=config.checkStrictly,multiple=config.multiple;if(multiple){return this.renderCheckbox(h);}else if(checkStrictly){return this.renderRadio(h);}else if(isLeaf&&isChecked){return this.renderCheckIcon(h);}return null;},renderPostfix:function renderPostfix(h){var node=this.node,isLeaf=this.isLeaf;if(node.loading){return this.renderLoadingIcon(h);}else if(!isLeaf){return this.renderExpandIcon(h);}return null;},renderCheckbox:function renderCheckbox(h){var node=this.node,config=this.config,isDisabled=this.isDisabled;var events={on:{change:this.handleMultiCheckChange},nativeOn:{}};if(config.checkStrictly){// when every node is selectable, click event should not trigger expand event.
events.nativeOn.click=stopPropagation;}return h('el-checkbox',external_babel_helper_vue_jsx_merge_props_default()([{attrs:{value:node.checked,indeterminate:node.indeterminate,disabled:isDisabled}},events]));},renderRadio:function renderRadio(h){var checkedValue=this.checkedValue,value=this.value,isDisabled=this.isDisabled;// to keep same reference if value cause radio's checked state is calculated by reference comparision;
if(Object(util_["isEqual"])(value,checkedValue)){value=checkedValue;}return h('el-radio',{attrs:{value:checkedValue,label:value,disabled:isDisabled},on:{'change':this.handleCheckChange},nativeOn:{'click':stopPropagation}},[h('span')]);},renderCheckIcon:function renderCheckIcon(h){return h('i',{'class':'el-icon-check el-cascader-node__prefix'});},renderLoadingIcon:function renderLoadingIcon(h){return h('i',{'class':'el-icon-loading el-cascader-node__postfix'});},renderExpandIcon:function renderExpandIcon(h){return h('i',{'class':'el-icon-arrow-right el-cascader-node__postfix'});},renderContent:function renderContent(h){var panel=this.panel,node=this.node;var render=panel.renderLabelFn;var vnode=render?render({node:node,data:node.data}):null;return h('span',{'class':'el-cascader-node__label'},[vnode||node.label]);}},render:function render(h){var _this3=this;var inActivePath=this.inActivePath,inCheckedPath=this.inCheckedPath,isChecked=this.isChecked,isLeaf=this.isLeaf,isDisabled=this.isDisabled,config=this.config,nodeId=this.nodeId;var expandTrigger=config.expandTrigger,checkStrictly=config.checkStrictly,multiple=config.multiple;var disabled=!checkStrictly&&isDisabled;var events={on:{}};if(expandTrigger==='click'){events.on.click=this.handleExpand;}else{events.on.mouseenter=function(e){_this3.handleExpand();_this3.$emit('expand',e);};events.on.focus=function(e){_this3.handleExpand();_this3.$emit('expand',e);};}if(isLeaf&&!isDisabled&&!checkStrictly&&!multiple){events.on.click=this.handleCheckChange;}return h('li',external_babel_helper_vue_jsx_merge_props_default()([{attrs:{role:'menuitem',id:nodeId,'aria-expanded':inActivePath,tabindex:disabled?null:-1},'class':{'el-cascader-node':true,'is-selectable':checkStrictly,'in-active-path':inActivePath,'in-checked-path':inCheckedPath,'is-active':isChecked,'is-disabled':disabled}},events]),[this.renderPrefix(h),this.renderContent(h),this.renderPostfix(h)]);}};// CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-node.vue?vue&type=script&lang=js&
/* harmony default export */var src_cascader_nodevue_type_script_lang_js_=cascader_nodevue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-node.vue
var cascader_node_render,cascader_node_staticRenderFns;/* normalize component */var cascader_node_component=normalizeComponent(src_cascader_nodevue_type_script_lang_js_,cascader_node_render,cascader_node_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var cascader_node_api; }cascader_node_component.options.__file="packages/cascader-panel/src/cascader-node.vue";/* harmony default export */var cascader_node=cascader_node_component.exports;// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-menu.vue?vue&type=script&lang=js&
/* harmony default export */var cascader_menuvue_type_script_lang_js_={name:'ElCascaderMenu',mixins:[locale_default.a],inject:['panel'],components:{ElScrollbar:scrollbar_default.a,CascaderNode:cascader_node},props:{nodes:{type:Array,required:true},index:Number},data:function data(){return{activeNode:null,hoverTimer:null,id:Object(util_["generateId"])()};},computed:{isEmpty:function isEmpty(){return!this.nodes.length;},menuId:function menuId(){return'cascader-menu-'+this.id+'-'+this.index;}},methods:{handleExpand:function handleExpand(e){this.activeNode=e.target;},handleMouseMove:function handleMouseMove(e){var activeNode=this.activeNode,hoverTimer=this.hoverTimer;var hoverZone=this.$refs.hoverZone;if(!activeNode||!hoverZone)return;if(activeNode.contains(e.target)){clearTimeout(hoverTimer);var _$el$getBoundingClien=this.$el.getBoundingClientRect(),left=_$el$getBoundingClien.left;var startX=e.clientX-left;var _$el=this.$el,offsetWidth=_$el.offsetWidth,offsetHeight=_$el.offsetHeight;var top=activeNode.offsetTop;var bottom=top+activeNode.offsetHeight;hoverZone.innerHTML='\n          <path style="pointer-events: auto;" fill="transparent" d="M'+startX+' '+top+' L'+offsetWidth+' 0 V'+top+' Z" />\n          <path style="pointer-events: auto;" fill="transparent" d="M'+startX+' '+bottom+' L'+offsetWidth+' '+offsetHeight+' V'+bottom+' Z" />\n        ';}else if(!hoverTimer){this.hoverTimer=setTimeout(this.clearHoverZone,this.panel.config.hoverThreshold);}},clearHoverZone:function clearHoverZone(){var hoverZone=this.$refs.hoverZone;if(!hoverZone)return;hoverZone.innerHTML='';},renderEmptyText:function renderEmptyText(h){return h('div',{'class':'el-cascader-menu__empty-text'},[this.t('el.cascader.noData')]);},renderNodeList:function renderNodeList(h){var menuId=this.menuId;var isHoverMenu=this.panel.isHoverMenu;var events={on:{}};if(isHoverMenu){events.on.expand=this.handleExpand;}var nodes=this.nodes.map(function(node,index){var hasChildren=node.hasChildren;return h('cascader-node',external_babel_helper_vue_jsx_merge_props_default()([{key:node.uid,attrs:{node:node,'node-id':menuId+'-'+index,'aria-haspopup':hasChildren,'aria-owns':hasChildren?menuId:null}},events]));});return[].concat(nodes,[isHoverMenu?h('svg',{ref:'hoverZone','class':'el-cascader-menu__hover-zone'}):null]);}},render:function render(h){var isEmpty=this.isEmpty,menuId=this.menuId;var events={nativeOn:{}};// optimize hover to expand experience (#8010)
if(this.panel.isHoverMenu){events.nativeOn.mousemove=this.handleMouseMove;// events.nativeOn.mouseleave = this.clearHoverZone;
}return h('el-scrollbar',external_babel_helper_vue_jsx_merge_props_default()([{attrs:{tag:'ul',role:'menu',id:menuId,'wrap-class':'el-cascader-menu__wrap','view-class':{'el-cascader-menu__list':true,'is-empty':isEmpty}},'class':'el-cascader-menu'},events]),[isEmpty?this.renderEmptyText(h):this.renderNodeList(h)]);}};// CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-menu.vue?vue&type=script&lang=js&
/* harmony default export */var src_cascader_menuvue_type_script_lang_js_=cascader_menuvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-menu.vue
var cascader_menu_render,cascader_menu_staticRenderFns;/* normalize component */var cascader_menu_component=normalizeComponent(src_cascader_menuvue_type_script_lang_js_,cascader_menu_render,cascader_menu_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var cascader_menu_api; }cascader_menu_component.options.__file="packages/cascader-panel/src/cascader-menu.vue";/* harmony default export */var cascader_menu=cascader_menu_component.exports;// CONCATENATED MODULE: ./packages/cascader-panel/src/node.js
var node_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function src_node_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}var uid=0;var src_node_Node=function(){function Node(data,config,parentNode){src_node_classCallCheck(this,Node);this.data=data;this.config=config;this.parent=parentNode||null;this.level=!this.parent?1:this.parent.level+1;this.uid=uid++;this.initState();this.initChildren();}Node.prototype.initState=function initState(){var _config=this.config,valueKey=_config.value,labelKey=_config.label;this.value=this.data[valueKey];this.label=this.data[labelKey];this.pathNodes=this.calculatePathNodes();this.path=this.pathNodes.map(function(node){return node.value;});this.pathLabels=this.pathNodes.map(function(node){return node.label;});// lazy load
this.loading=false;this.loaded=false;};Node.prototype.initChildren=function initChildren(){var _this=this;var config=this.config;var childrenKey=config.children;var childrenData=this.data[childrenKey];this.hasChildren=Array.isArray(childrenData);this.children=(childrenData||[]).map(function(child){return new Node(child,config,_this);});};Node.prototype.calculatePathNodes=function calculatePathNodes(){var nodes=[this];var parent=this.parent;while(parent){nodes.unshift(parent);parent=parent.parent;}return nodes;};Node.prototype.getPath=function getPath(){return this.path;};Node.prototype.getValue=function getValue(){return this.value;};Node.prototype.getValueByOption=function getValueByOption(){return this.config.emitPath?this.getPath():this.getValue();};Node.prototype.getText=function getText(allLevels,separator){return allLevels?this.pathLabels.join(separator):this.label;};Node.prototype.isSameNode=function isSameNode(checkedValue){var value=this.getValueByOption();return this.config.multiple&&Array.isArray(checkedValue)?checkedValue.some(function(val){return Object(util_["isEqual"])(val,value);}):Object(util_["isEqual"])(checkedValue,value);};Node.prototype.broadcast=function broadcast(event){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key];}var handlerName='onParent'+Object(util_["capitalize"])(event);this.children.forEach(function(child){if(child){// bottom up
child.broadcast.apply(child,[event].concat(args));child[handlerName]&&child[handlerName].apply(child,args);}});};Node.prototype.emit=function emit(event){var parent=this.parent;var handlerName='onChild'+Object(util_["capitalize"])(event);if(parent){for(var _len2=arguments.length,args=Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){args[_key2-1]=arguments[_key2];}parent[handlerName]&&parent[handlerName].apply(parent,args);parent.emit.apply(parent,[event].concat(args));}};Node.prototype.onParentCheck=function onParentCheck(checked){if(!this.isDisabled){this.setCheckState(checked);}};Node.prototype.onChildCheck=function onChildCheck(){var children=this.children;var validChildren=children.filter(function(child){return!child.isDisabled;});var checked=validChildren.length?validChildren.every(function(child){return child.checked;}):false;this.setCheckState(checked);};Node.prototype.setCheckState=function setCheckState(checked){var totalNum=this.children.length;var checkedNum=this.children.reduce(function(c,p){var num=p.checked?1:p.indeterminate?0.5:0;return c+num;},0);this.checked=checked;this.indeterminate=checkedNum!==totalNum&&checkedNum>0;};Node.prototype.syncCheckState=function syncCheckState(checkedValue){var value=this.getValueByOption();var checked=this.isSameNode(checkedValue,value);this.doCheck(checked);};Node.prototype.doCheck=function doCheck(checked){if(this.checked!==checked){if(this.config.checkStrictly){this.checked=checked;}else{// bottom up to unify the calculation of the indeterminate state
this.broadcast('check',checked);this.setCheckState(checked);this.emit('check');}}};node_createClass(Node,[{key:'isDisabled',get:function get(){var data=this.data,parent=this.parent,config=this.config;var disabledKey=config.disabled;var checkStrictly=config.checkStrictly;return data[disabledKey]||!checkStrictly&&parent&&parent.isDisabled;}},{key:'isLeaf',get:function get(){var data=this.data,loaded=this.loaded,hasChildren=this.hasChildren,children=this.children;var _config2=this.config,lazy=_config2.lazy,leafKey=_config2.leaf;if(lazy){var isLeaf=Object(shared_["isDef"])(data[leafKey])?data[leafKey]:loaded?!children.length:false;this.hasChildren=!isLeaf;return isLeaf;}return!hasChildren;}}]);return Node;}();/* harmony default export */var src_node=src_node_Node;// CONCATENATED MODULE: ./packages/cascader-panel/src/store.js
function store_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}var flatNodes=function flatNodes(data,leafOnly){return data.reduce(function(res,node){if(node.isLeaf){res.push(node);}else{!leafOnly&&res.push(node);res=res.concat(flatNodes(node.children,leafOnly));}return res;},[]);};var store_Store=function(){function Store(data,config){store_classCallCheck(this,Store);this.config=config;this.initNodes(data);}Store.prototype.initNodes=function initNodes(data){var _this=this;data=Object(util_["coerceTruthyValueToArray"])(data);this.nodes=data.map(function(nodeData){return new src_node(nodeData,_this.config);});this.flattedNodes=this.getFlattedNodes(false,false);this.leafNodes=this.getFlattedNodes(true,false);};Store.prototype.appendNode=function appendNode(nodeData,parentNode){var node=new src_node(nodeData,this.config,parentNode);var children=parentNode?parentNode.children:this.nodes;children.push(node);};Store.prototype.appendNodes=function appendNodes(nodeDataList,parentNode){var _this2=this;nodeDataList=Object(util_["coerceTruthyValueToArray"])(nodeDataList);nodeDataList.forEach(function(nodeData){return _this2.appendNode(nodeData,parentNode);});};Store.prototype.getNodes=function getNodes(){return this.nodes;};Store.prototype.getFlattedNodes=function getFlattedNodes(leafOnly){var cached=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var cachedNodes=leafOnly?this.leafNodes:this.flattedNodes;return cached?cachedNodes:flatNodes(this.nodes,leafOnly);};Store.prototype.getNodeByValue=function getNodeByValue(value){if(value){var nodes=this.getFlattedNodes(false,!this.config.lazy).filter(function(node){return Object(util_["valueEquals"])(node.path,value)||node.value===value;});return nodes&&nodes.length?nodes[0]:null;}return null;};return Store;}();/* harmony default export */var cascader_panel_src_store=store_Store;// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-panel.vue?vue&type=script&lang=js&
var cascader_panelvue_type_script_lang_js_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var cascader_panelvue_type_script_lang_js_KeyCode=aria_utils_default.a.keys;var DefaultProps={expandTrigger:'click',// or hover
multiple:false,checkStrictly:false,// whether all nodes can be selected
emitPath:true,// wether to emit an array of all levels value in which node is located
lazy:false,lazyLoad:util_["noop"],value:'value',label:'label',children:'children',leaf:'leaf',disabled:'disabled',hoverThreshold:500};var cascader_panelvue_type_script_lang_js_isLeaf=function isLeaf(el){return!el.getAttribute('aria-owns');};var getSibling=function getSibling(el,distance){var parentNode=el.parentNode;if(parentNode){var siblings=parentNode.querySelectorAll('.el-cascader-node[tabindex="-1"]');var index=Array.prototype.indexOf.call(siblings,el);return siblings[index+distance]||null;}return null;};var getMenuIndex=function getMenuIndex(el,distance){if(!el)return;var pieces=el.id.split('-');return Number(pieces[pieces.length-2]);};var focusNode=function focusNode(el){if(!el)return;el.focus();!cascader_panelvue_type_script_lang_js_isLeaf(el)&&el.click();};var checkNode=function checkNode(el){if(!el)return;var input=el.querySelector('input');if(input){input.click();}else if(cascader_panelvue_type_script_lang_js_isLeaf(el)){el.click();}};/* harmony default export */var cascader_panelvue_type_script_lang_js_={name:'ElCascaderPanel',components:{CascaderMenu:cascader_menu},props:{value:{},options:Array,props:Object,border:{type:Boolean,default:true},renderLabel:Function},provide:function provide(){return{panel:this};},data:function data(){return{checkedValue:null,checkedNodePaths:[],store:[],menus:[],activePath:[],loadCount:0};},computed:{config:function config(){return merge_default()(cascader_panelvue_type_script_lang_js_extends({},DefaultProps),this.props||{});},multiple:function multiple(){return this.config.multiple;},checkStrictly:function checkStrictly(){return this.config.checkStrictly;},leafOnly:function leafOnly(){return!this.checkStrictly;},isHoverMenu:function isHoverMenu(){return this.config.expandTrigger==='hover';},renderLabelFn:function renderLabelFn(){return this.renderLabel||this.$scopedSlots.default;}},watch:{options:{handler:function handler(){this.initStore();},immediate:true,deep:true},value:function value(){this.syncCheckedValue();this.checkStrictly&&this.calculateCheckedNodePaths();},checkedValue:function checkedValue(val){if(!Object(util_["isEqual"])(val,this.value)){this.checkStrictly&&this.calculateCheckedNodePaths();this.$emit('input',val);this.$emit('change',val);}}},mounted:function mounted(){if(!Object(util_["isEmpty"])(this.value)){this.syncCheckedValue();}},methods:{initStore:function initStore(){var config=this.config,options=this.options;if(config.lazy&&Object(util_["isEmpty"])(options)){this.lazyLoad();}else{this.store=new cascader_panel_src_store(options,config);this.menus=[this.store.getNodes()];this.syncMenuState();}},syncCheckedValue:function syncCheckedValue(){var value=this.value,checkedValue=this.checkedValue;if(!Object(util_["isEqual"])(value,checkedValue)){this.checkedValue=value;this.syncMenuState();}},syncMenuState:function syncMenuState(){var multiple=this.multiple,checkStrictly=this.checkStrictly;this.syncActivePath();multiple&&this.syncMultiCheckState();checkStrictly&&this.calculateCheckedNodePaths();this.$nextTick(this.scrollIntoView);},syncMultiCheckState:function syncMultiCheckState(){var _this=this;var nodes=this.getFlattedNodes(this.leafOnly);nodes.forEach(function(node){node.syncCheckState(_this.checkedValue);});},syncActivePath:function syncActivePath(){var _this2=this;var store=this.store,multiple=this.multiple,activePath=this.activePath,checkedValue=this.checkedValue;if(!Object(util_["isEmpty"])(activePath)){var nodes=activePath.map(function(node){return _this2.getNodeByValue(node.getValue());});this.expandNodes(nodes);}else if(!Object(util_["isEmpty"])(checkedValue)){var value=multiple?checkedValue[0]:checkedValue;var checkedNode=this.getNodeByValue(value)||{};var _nodes=(checkedNode.pathNodes||[]).slice(0,-1);this.expandNodes(_nodes);}else{this.activePath=[];this.menus=[store.getNodes()];}},expandNodes:function expandNodes(nodes){var _this3=this;nodes.forEach(function(node){return _this3.handleExpand(node,true/* silent */);});},calculateCheckedNodePaths:function calculateCheckedNodePaths(){var _this4=this;var checkedValue=this.checkedValue,multiple=this.multiple;var checkedValues=multiple?Object(util_["coerceTruthyValueToArray"])(checkedValue):[checkedValue];this.checkedNodePaths=checkedValues.map(function(v){var checkedNode=_this4.getNodeByValue(v);return checkedNode?checkedNode.pathNodes:[];});},handleKeyDown:function handleKeyDown(e){var target=e.target,keyCode=e.keyCode;switch(keyCode){case cascader_panelvue_type_script_lang_js_KeyCode.up:var prev=getSibling(target,-1);focusNode(prev);break;case cascader_panelvue_type_script_lang_js_KeyCode.down:var next=getSibling(target,1);focusNode(next);break;case cascader_panelvue_type_script_lang_js_KeyCode.left:var preMenu=this.$refs.menu[getMenuIndex(target)-1];if(preMenu){var expandedNode=preMenu.$el.querySelector('.el-cascader-node[aria-expanded="true"]');focusNode(expandedNode);}break;case cascader_panelvue_type_script_lang_js_KeyCode.right:var nextMenu=this.$refs.menu[getMenuIndex(target)+1];if(nextMenu){var firstNode=nextMenu.$el.querySelector('.el-cascader-node[tabindex="-1"]');focusNode(firstNode);}break;case cascader_panelvue_type_script_lang_js_KeyCode.enter:checkNode(target);break;case cascader_panelvue_type_script_lang_js_KeyCode.esc:case cascader_panelvue_type_script_lang_js_KeyCode.tab:this.$emit('close');break;default:return;}},handleExpand:function handleExpand(node,silent){var activePath=this.activePath;var level=node.level;var path=activePath.slice(0,level-1);var menus=this.menus.slice(0,level);if(!node.isLeaf){path.push(node);menus.push(node.children);}this.activePath=path;this.menus=menus;if(!silent){var pathValues=path.map(function(node){return node.getValue();});var activePathValues=activePath.map(function(node){return node.getValue();});if(!Object(util_["valueEquals"])(pathValues,activePathValues)){this.$emit('active-item-change',pathValues);// Deprecated
this.$emit('expand-change',pathValues);}}},handleCheckChange:function handleCheckChange(value){this.checkedValue=value;},lazyLoad:function lazyLoad(node,onFullfiled){var _this5=this;var config=this.config;if(!node){node=node||{root:true,level:0};this.store=new cascader_panel_src_store([],config);this.menus=[this.store.getNodes()];}node.loading=true;var resolve=function resolve(dataList){var parent=node.root?null:node;dataList&&dataList.length&&_this5.store.appendNodes(dataList,parent);node.loading=false;node.loaded=true;// dispose default value on lazy load mode
if(Array.isArray(_this5.checkedValue)){var nodeValue=_this5.checkedValue[_this5.loadCount++];var valueKey=_this5.config.value;var leafKey=_this5.config.leaf;if(Array.isArray(dataList)&&dataList.filter(function(item){return item[valueKey]===nodeValue;}).length>0){var checkedNode=_this5.store.getNodeByValue(nodeValue);if(!checkedNode.data[leafKey]){_this5.lazyLoad(checkedNode,function(){_this5.handleExpand(checkedNode);});}if(_this5.loadCount===_this5.checkedValue.length){_this5.$parent.computePresentText();}}}onFullfiled&&onFullfiled(dataList);};config.lazyLoad(node,resolve);},/**
     * public methods
    */calculateMultiCheckedValue:function calculateMultiCheckedValue(){this.checkedValue=this.getCheckedNodes(this.leafOnly).map(function(node){return node.getValueByOption();});},scrollIntoView:function scrollIntoView(){if(this.$isServer)return;var menus=this.$refs.menu||[];menus.forEach(function(menu){var menuElement=menu.$el;if(menuElement){var container=menuElement.querySelector('.el-scrollbar__wrap');var activeNode=menuElement.querySelector('.el-cascader-node.is-active')||menuElement.querySelector('.el-cascader-node.in-active-path');scroll_into_view_default()(container,activeNode);}});},getNodeByValue:function getNodeByValue(val){return this.store.getNodeByValue(val);},getFlattedNodes:function getFlattedNodes(leafOnly){var cached=!this.config.lazy;return this.store.getFlattedNodes(leafOnly,cached);},getCheckedNodes:function getCheckedNodes(leafOnly){var checkedValue=this.checkedValue,multiple=this.multiple;if(multiple){var nodes=this.getFlattedNodes(leafOnly);return nodes.filter(function(node){return node.checked;});}else{return Object(util_["isEmpty"])(checkedValue)?[]:[this.getNodeByValue(checkedValue)];}},clearCheckedNodes:function clearCheckedNodes(){var config=this.config,leafOnly=this.leafOnly;var multiple=config.multiple,emitPath=config.emitPath;if(multiple){this.getCheckedNodes(leafOnly).filter(function(node){return!node.isDisabled;}).forEach(function(node){return node.doCheck(false);});this.calculateMultiCheckedValue();}else{this.checkedValue=emitPath?[]:null;}}}};// CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue?vue&type=script&lang=js&
/* harmony default export */var src_cascader_panelvue_type_script_lang_js_=cascader_panelvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue
/* normalize component */var cascader_panel_component=normalizeComponent(src_cascader_panelvue_type_script_lang_js_,cascader_panelvue_type_template_id_34932346_render,cascader_panelvue_type_template_id_34932346_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var cascader_panel_api; }cascader_panel_component.options.__file="packages/cascader-panel/src/cascader-panel.vue";/* harmony default export */var cascader_panel=cascader_panel_component.exports;// CONCATENATED MODULE: ./packages/cascader-panel/index.js
/* istanbul ignore next */cascader_panel.install=function(Vue){Vue.component(cascader_panel.name,cascader_panel);};/* harmony default export */var packages_cascader_panel=cascader_panel;// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/avatar/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var avatar_src_mainvue_type_script_lang_js_={name:'ElAvatar',props:{size:{type:[Number,String],validator:function validator(val){if(typeof val==='string'){return['large','medium','small'].includes(val);}return typeof val==='number';}},shape:{type:String,default:'circle',validator:function validator(val){return['circle','square'].includes(val);}},icon:String,src:String,alt:String,srcSet:String,error:Function,fit:{type:String,default:'cover'}},data:function data(){return{isImageExist:true};},computed:{avatarClass:function avatarClass(){var size=this.size,icon=this.icon,shape=this.shape;var classList=['el-avatar'];if(size&&typeof size==='string'){classList.push('el-avatar--'+size);}if(icon){classList.push('el-avatar--icon');}if(shape){classList.push('el-avatar--'+shape);}return classList.join(' ');}},methods:{handleError:function handleError(){var error=this.error;var errorFlag=error?error():undefined;if(errorFlag!==false){this.isImageExist=false;}},renderAvatar:function renderAvatar(){var h=this.$createElement;var icon=this.icon,src=this.src,alt=this.alt,isImageExist=this.isImageExist,srcSet=this.srcSet,fit=this.fit;if(isImageExist&&src){return h('img',{attrs:{src:src,alt:alt,srcSet:srcSet},on:{'error':this.handleError},style:{'object-fit':fit}});}if(icon){return h('i',{'class':icon});}return this.$slots.default;}},render:function render(){var h=arguments[0];var avatarClass=this.avatarClass,size=this.size;var sizeStyle=typeof size==='number'?{height:size+'px',width:size+'px',lineHeight:size+'px'}:{};return h('span',{'class':avatarClass,style:sizeStyle},[this.renderAvatar()]);}};// CONCATENATED MODULE: ./packages/avatar/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_avatar_src_mainvue_type_script_lang_js_=avatar_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/avatar/src/main.vue
var src_main_render,src_main_staticRenderFns;/* normalize component */var avatar_src_main_component=normalizeComponent(packages_avatar_src_mainvue_type_script_lang_js_,src_main_render,src_main_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var avatar_src_main_api; }avatar_src_main_component.options.__file="packages/avatar/src/main.vue";/* harmony default export */var avatar_src_main=avatar_src_main_component.exports;// CONCATENATED MODULE: ./packages/avatar/index.js
/* istanbul ignore next */avatar_src_main.install=function(Vue){Vue.component(avatar_src_main.name,avatar_src_main);};/* harmony default export */var avatar=avatar_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/drawer/src/main.vue?vue&type=template&id=a4885264&
var mainvue_type_template_id_a4885264_render=function mainvue_type_template_id_a4885264_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("transition",{attrs:{name:"el-drawer-fade"},on:{"after-enter":_vm.afterEnter,"after-leave":_vm.afterLeave}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.visible,expression:"visible"}],staticClass:"el-drawer__wrapper",attrs:{tabindex:"-1"}},[_c("div",{staticClass:"el-drawer__container",class:_vm.visible&&"el-drawer__open",attrs:{role:"document",tabindex:"-1"},on:{click:function click($event){if($event.target!==$event.currentTarget){return null;}return _vm.handleWrapperClick($event);}}},[_c("div",{ref:"drawer",staticClass:"el-drawer",class:[_vm.direction,_vm.customClass],style:_vm.isHorizontal?"width: "+_vm.size:"height: "+_vm.size,attrs:{"aria-modal":"true","aria-labelledby":"el-drawer__title","aria-label":_vm.title,role:"dialog",tabindex:"-1"}},[_vm.withHeader?_c("header",{staticClass:"el-drawer__header",attrs:{id:"el-drawer__title"}},[_vm._t("title",[_c("span",{attrs:{role:"heading",tabindex:"0",title:_vm.title}},[_vm._v(_vm._s(_vm.title))])]),_vm.showClose?_c("button",{staticClass:"el-drawer__close-btn",attrs:{"aria-label":"close "+(_vm.title||"drawer"),type:"button"},on:{click:_vm.closeDrawer}},[_c("i",{staticClass:"el-dialog__close el-icon el-icon-close"})]):_vm._e()],2):_vm._e(),_vm.rendered?_c("section",{staticClass:"el-drawer__body"},[_vm._t("default")],2):_vm._e()])])])]);};var mainvue_type_template_id_a4885264_staticRenderFns=[];mainvue_type_template_id_a4885264_render._withStripped=true;// CONCATENATED MODULE: ./packages/drawer/src/main.vue?vue&type=template&id=a4885264&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/drawer/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var drawer_src_mainvue_type_script_lang_js_={name:'ElDrawer',mixins:[popup_default.a,emitter_default.a],props:{appendToBody:{type:Boolean,default:false},beforeClose:{type:Function},customClass:{type:String,default:''},closeOnPressEscape:{type:Boolean,default:true},destroyOnClose:{type:Boolean,default:false},modal:{type:Boolean,default:true},direction:{type:String,default:'rtl',validator:function validator(val){return['ltr','rtl','ttb','btt'].indexOf(val)!==-1;}},modalAppendToBody:{type:Boolean,default:true},showClose:{type:Boolean,default:true},size:{type:String,default:'30%'},title:{type:String,default:''},visible:{type:Boolean},wrapperClosable:{type:Boolean,default:true},withHeader:{type:Boolean,default:true}},computed:{isHorizontal:function isHorizontal(){return this.direction==='rtl'||this.direction==='ltr';}},data:function data(){return{closed:false,prevActiveElement:null};},watch:{visible:function visible(val){var _this=this;if(val){this.closed=false;this.$emit('open');if(this.appendToBody){document.body.appendChild(this.$el);}this.prevActiveElement=document.activeElement;this.$nextTick(function(){aria_utils_default.a.focusFirstDescendant(_this.$refs.drawer);});}else{if(!this.closed)this.$emit('close');this.$nextTick(function(){if(_this.prevActiveElement){_this.prevActiveElement.focus();}});}}},methods:{afterEnter:function afterEnter(){this.$emit('opened');},afterLeave:function afterLeave(){this.$emit('closed');},hide:function hide(cancel){if(cancel!==false){this.$emit('update:visible',false);this.$emit('close');if(this.destroyOnClose===true){this.rendered=false;}this.closed=true;}},handleWrapperClick:function handleWrapperClick(){if(this.wrapperClosable){this.closeDrawer();}},closeDrawer:function closeDrawer(){if(typeof this.beforeClose==='function'){this.beforeClose(this.hide);}else{this.hide();}},handleClose:function handleClose(){// This method here will be called by PopupManger, when the `closeOnPressEscape` was set to true
// pressing `ESC` will call this method, and also close the drawer.
// This method also calls `beforeClose` if there was one.
this.closeDrawer();}},mounted:function mounted(){if(this.visible){this.rendered=true;this.open();}},destroyed:function destroyed(){// if appendToBody is true, remove DOM node after destroy
if(this.appendToBody&&this.$el&&this.$el.parentNode){this.$el.parentNode.removeChild(this.$el);}}};// CONCATENATED MODULE: ./packages/drawer/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_drawer_src_mainvue_type_script_lang_js_=drawer_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/drawer/src/main.vue
/* normalize component */var drawer_src_main_component=normalizeComponent(packages_drawer_src_mainvue_type_script_lang_js_,mainvue_type_template_id_a4885264_render,mainvue_type_template_id_a4885264_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var drawer_src_main_api; }drawer_src_main_component.options.__file="packages/drawer/src/main.vue";/* harmony default export */var drawer_src_main=drawer_src_main_component.exports;// CONCATENATED MODULE: ./packages/drawer/index.js
/* istanbul ignore next */drawer_src_main.install=function(Vue){Vue.component(drawer_src_main.name,drawer_src_main);};/* harmony default export */var drawer=drawer_src_main;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/popconfirm/src/main.vue?vue&type=template&id=048de730&
var mainvue_type_template_id_048de730_render=function mainvue_type_template_id_048de730_render(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("el-popover",_vm._b({attrs:{trigger:"click"},model:{value:_vm.visible,callback:function callback($$v){_vm.visible=$$v;},expression:"visible"}},"el-popover",_vm.$attrs,false),[_c("div",{staticClass:"el-popconfirm"},[_c("p",{staticClass:"el-popconfirm__main"},[!_vm.hideIcon?_c("i",{staticClass:"el-popconfirm__icon",class:_vm.icon,style:{color:_vm.iconColor}}):_vm._e(),_vm._v("\n      "+_vm._s(_vm.title)+"\n    ")]),_c("div",{staticClass:"el-popconfirm__action"},[_c("el-button",{attrs:{size:"mini",type:_vm.cancelButtonType},on:{click:_vm.cancel}},[_vm._v("\n        "+_vm._s(_vm.cancelButtonText)+"\n      ")]),_c("el-button",{attrs:{size:"mini",type:_vm.confirmButtonType},on:{click:_vm.confirm}},[_vm._v("\n        "+_vm._s(_vm.confirmButtonText)+"\n      ")])],1)]),_vm._t("reference",null,{slot:"reference"})],2);};var mainvue_type_template_id_048de730_staticRenderFns=[];mainvue_type_template_id_048de730_render._withStripped=true;// CONCATENATED MODULE: ./packages/popconfirm/src/main.vue?vue&type=template&id=048de730&
// EXTERNAL MODULE: external "element-ui/lib/popover"
var popover_=__webpack_require__(44);var popover_default=/*#__PURE__*/__webpack_require__.n(popover_);// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/popconfirm/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */var popconfirm_src_mainvue_type_script_lang_js_={name:'ElPopconfirm',props:{title:{type:String},confirmButtonText:{type:String,default:Object(lib_locale_["t"])('el.popconfirm.confirmButtonText')},cancelButtonText:{type:String,default:Object(lib_locale_["t"])('el.popconfirm.cancelButtonText')},confirmButtonType:{type:String,default:'primary'},cancelButtonType:{type:String,default:'text'},icon:{type:String,default:'el-icon-question'},iconColor:{type:String,default:'#f90'},hideIcon:{type:Boolean,default:false}},components:{ElPopover:popover_default.a,ElButton:button_default.a},data:function data(){return{visible:false};},methods:{confirm:function confirm(){this.visible=false;this.$emit('onConfirm');},cancel:function cancel(){this.visible=false;this.$emit('onCancel');}}};// CONCATENATED MODULE: ./packages/popconfirm/src/main.vue?vue&type=script&lang=js&
/* harmony default export */var packages_popconfirm_src_mainvue_type_script_lang_js_=popconfirm_src_mainvue_type_script_lang_js_;// CONCATENATED MODULE: ./packages/popconfirm/src/main.vue
/* normalize component */var popconfirm_src_main_component=normalizeComponent(packages_popconfirm_src_mainvue_type_script_lang_js_,mainvue_type_template_id_048de730_render,mainvue_type_template_id_048de730_staticRenderFns,false,null,null,null);/* hot reload */if(false){ var popconfirm_src_main_api; }popconfirm_src_main_component.options.__file="packages/popconfirm/src/main.vue";/* harmony default export */var popconfirm_src_main=popconfirm_src_main_component.exports;// CONCATENATED MODULE: ./packages/popconfirm/index.js
/* istanbul ignore next */popconfirm_src_main.install=function(Vue){Vue.component(popconfirm_src_main.name,popconfirm_src_main);};/* harmony default export */var popconfirm=popconfirm_src_main;// CONCATENATED MODULE: ./src/index.js
/* Automatically generated by './build/bin/build-entry.js' */var components=[packages_pagination,dialog,packages_autocomplete,packages_dropdown,packages_dropdown_menu,packages_dropdown_item,packages_menu,packages_submenu,packages_menu_item,packages_menu_item_group,packages_input,packages_input_number,packages_radio,packages_radio_group,packages_radio_button,packages_checkbox,packages_checkbox_button,packages_checkbox_group,packages_switch,packages_select,packages_option,packages_option_group,packages_button,packages_button_group,packages_table,packages_table_column,packages_date_picker,packages_time_select,packages_time_picker,popover,packages_tooltip,packages_breadcrumb,packages_breadcrumb_item,packages_form,packages_form_item,packages_tabs,packages_tab_pane,packages_tag,packages_tree,packages_alert,slider,packages_icon,packages_row,packages_col,packages_upload,packages_progress,packages_spinner,badge,card,rate,packages_steps,packages_step,carousel,scrollbar,carousel_item,packages_collapse,packages_collapse_item,packages_cascader,color_picker,transfer,packages_container,header,aside,packages_main,footer,timeline,timeline_item,packages_link,divider,packages_image,calendar,backtop,page_header,packages_cascader_panel,avatar,drawer,popconfirm,collapse_transition_default.a];var src_install=function install(Vue){var opts=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};lib_locale_default.a.use(opts.locale);lib_locale_default.a.i18n(opts.i18n);components.forEach(function(component){Vue.component(component.name,component);});Vue.use(infinite_scroll);Vue.use(packages_loading.directive);Vue.prototype.$ELEMENT={size:opts.size||'',zIndex:opts.zIndex||2000};Vue.prototype.$loading=packages_loading.service;Vue.prototype.$msgbox=message_box;Vue.prototype.$alert=message_box.alert;Vue.prototype.$confirm=message_box.confirm;Vue.prototype.$prompt=message_box.prompt;Vue.prototype.$notify=notification;Vue.prototype.$message=packages_message;};/* istanbul ignore if */if(typeof window!=='undefined'&&window.Vue){src_install(window.Vue);}/* harmony default export */var src_0=__webpack_exports__["default"]={version:'2.13.2',locale:lib_locale_default.a.use,i18n:lib_locale_default.a.i18n,install:src_install,CollapseTransition:collapse_transition_default.a,Loading:packages_loading,Pagination:packages_pagination,Dialog:dialog,Autocomplete:packages_autocomplete,Dropdown:packages_dropdown,DropdownMenu:packages_dropdown_menu,DropdownItem:packages_dropdown_item,Menu:packages_menu,Submenu:packages_submenu,MenuItem:packages_menu_item,MenuItemGroup:packages_menu_item_group,Input:packages_input,InputNumber:packages_input_number,Radio:packages_radio,RadioGroup:packages_radio_group,RadioButton:packages_radio_button,Checkbox:packages_checkbox,CheckboxButton:packages_checkbox_button,CheckboxGroup:packages_checkbox_group,Switch:packages_switch,Select:packages_select,Option:packages_option,OptionGroup:packages_option_group,Button:packages_button,ButtonGroup:packages_button_group,Table:packages_table,TableColumn:packages_table_column,DatePicker:packages_date_picker,TimeSelect:packages_time_select,TimePicker:packages_time_picker,Popover:popover,Tooltip:packages_tooltip,MessageBox:message_box,Breadcrumb:packages_breadcrumb,BreadcrumbItem:packages_breadcrumb_item,Form:packages_form,FormItem:packages_form_item,Tabs:packages_tabs,TabPane:packages_tab_pane,Tag:packages_tag,Tree:packages_tree,Alert:packages_alert,Notification:notification,Slider:slider,Icon:packages_icon,Row:packages_row,Col:packages_col,Upload:packages_upload,Progress:packages_progress,Spinner:packages_spinner,Message:packages_message,Badge:badge,Card:card,Rate:rate,Steps:packages_steps,Step:packages_step,Carousel:carousel,Scrollbar:scrollbar,CarouselItem:carousel_item,Collapse:packages_collapse,CollapseItem:packages_collapse_item,Cascader:packages_cascader,ColorPicker:color_picker,Transfer:transfer,Container:packages_container,Header:header,Aside:aside,Main:packages_main,Footer:footer,Timeline:timeline,TimelineItem:timeline_item,Link:packages_link,Divider:divider,Image:packages_image,Calendar:calendar,Backtop:backtop,InfiniteScroll:infinite_scroll,PageHeader:page_header,CascaderPanel:packages_cascader_panel,Avatar:avatar,Drawer:drawer,Popconfirm:popconfirm};/***/}/******/])["default"];

/***/ }),

/***/ "5cc6":
/***/ (function(module, exports, __webpack_require__) {

var createTypedArrayConstructor = __webpack_require__("74e8");

// `Uint8Array` constructor
// https://tc39.github.io/ecma262/#sec-typedarray-objects
createTypedArrayConstructor('Uint8', function (init) {
  return function Uint8Array(data, byteOffset, length) {
    return init(this, data, byteOffset, length);
  };
});


/***/ }),

/***/ "5f96":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__("ebb5");

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var $join = [].join;

// `%TypedArray%.prototype.join` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.join
// eslint-disable-next-line no-unused-vars
exportTypedArrayMethod('join', function join(separator) {
  return $join.apply(aTypedArray(this), arguments);
});


/***/ }),

/***/ "5fb2":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js
var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
var base = 36;
var tMin = 1;
var tMax = 26;
var skew = 38;
var damp = 700;
var initialBias = 72;
var initialN = 128; // 0x80
var delimiter = '-'; // '\x2D'
var regexNonASCII = /[^\0-\u007E]/; // non-ASCII chars
var regexSeparators = /[.\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';
var baseMinusTMin = base - tMin;
var floor = Math.floor;
var stringFromCharCode = String.fromCharCode;

/**
 * Creates an array containing the numeric code points of each Unicode
 * character in the string. While JavaScript uses UCS-2 internally,
 * this function will convert a pair of surrogate halves (each of which
 * UCS-2 exposes as separate characters) into a single code point,
 * matching UTF-16.
 */
var ucs2decode = function (string) {
  var output = [];
  var counter = 0;
  var length = string.length;
  while (counter < length) {
    var value = string.charCodeAt(counter++);
    if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
      // It's a high surrogate, and there is a next character.
      var extra = string.charCodeAt(counter++);
      if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.
        output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
      } else {
        // It's an unmatched surrogate; only append this code unit, in case the
        // next code unit is the high surrogate of a surrogate pair.
        output.push(value);
        counter--;
      }
    } else {
      output.push(value);
    }
  }
  return output;
};

/**
 * Converts a digit/integer into a basic code point.
 */
var digitToBasic = function (digit) {
  //  0..25 map to ASCII a..z or A..Z
  // 26..35 map to ASCII 0..9
  return digit + 22 + 75 * (digit < 26);
};

/**
 * Bias adaptation function as per section 3.4 of RFC 3492.
 * https://tools.ietf.org/html/rfc3492#section-3.4
 */
var adapt = function (delta, numPoints, firstTime) {
  var k = 0;
  delta = firstTime ? floor(delta / damp) : delta >> 1;
  delta += floor(delta / numPoints);
  for (; delta > baseMinusTMin * tMax >> 1; k += base) {
    delta = floor(delta / baseMinusTMin);
  }
  return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
};

/**
 * Converts a string of Unicode symbols (e.g. a domain name label) to a
 * Punycode string of ASCII-only symbols.
 */
// eslint-disable-next-line  max-statements
var encode = function (input) {
  var output = [];

  // Convert the input in UCS-2 to an array of Unicode code points.
  input = ucs2decode(input);

  // Cache the length.
  var inputLength = input.length;

  // Initialize the state.
  var n = initialN;
  var delta = 0;
  var bias = initialBias;
  var i, currentValue;

  // Handle the basic code points.
  for (i = 0; i < input.length; i++) {
    currentValue = input[i];
    if (currentValue < 0x80) {
      output.push(stringFromCharCode(currentValue));
    }
  }

  var basicLength = output.length; // number of basic code points.
  var handledCPCount = basicLength; // number of code points that have been handled;

  // Finish the basic string with a delimiter unless it's empty.
  if (basicLength) {
    output.push(delimiter);
  }

  // Main encoding loop:
  while (handledCPCount < inputLength) {
    // All non-basic code points < n have been handled already. Find the next larger one:
    var m = maxInt;
    for (i = 0; i < input.length; i++) {
      currentValue = input[i];
      if (currentValue >= n && currentValue < m) {
        m = currentValue;
      }
    }

    // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.
    var handledCPCountPlusOne = handledCPCount + 1;
    if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
      throw RangeError(OVERFLOW_ERROR);
    }

    delta += (m - n) * handledCPCountPlusOne;
    n = m;

    for (i = 0; i < input.length; i++) {
      currentValue = input[i];
      if (currentValue < n && ++delta > maxInt) {
        throw RangeError(OVERFLOW_ERROR);
      }
      if (currentValue == n) {
        // Represent delta as a generalized variable-length integer.
        var q = delta;
        for (var k = base; /* no condition */; k += base) {
          var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
          if (q < t) break;
          var qMinusT = q - t;
          var baseMinusT = base - t;
          output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT)));
          q = floor(qMinusT / baseMinusT);
        }

        output.push(stringFromCharCode(digitToBasic(q)));
        bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
        delta = 0;
        ++handledCPCount;
      }
    }

    ++delta;
    ++n;
  }
  return output.join('');
};

module.exports = function (input) {
  var encoded = [];
  var labels = input.toLowerCase().replace(regexSeparators, '\u002E').split('.');
  var i, label;
  for (i = 0; i < labels.length; i++) {
    label = labels[i];
    encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label);
  }
  return encoded.join('.');
};


/***/ }),

/***/ "606f":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_aside_vue_vue_type_style_index_0_id_2c81d596_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("87d4");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_aside_vue_vue_type_style_index_0_id_2c81d596_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_aside_vue_vue_type_style_index_0_id_2c81d596_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_aside_vue_vue_type_style_index_0_id_2c81d596_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "60bd":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var global = __webpack_require__("da84");
var ArrayBufferViewCore = __webpack_require__("ebb5");
var ArrayIterators = __webpack_require__("e260");
var wellKnownSymbol = __webpack_require__("b622");

var ITERATOR = wellKnownSymbol('iterator');
var Uint8Array = global.Uint8Array;
var arrayValues = ArrayIterators.values;
var arrayKeys = ArrayIterators.keys;
var arrayEntries = ArrayIterators.entries;
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var nativeTypedArrayIterator = Uint8Array && Uint8Array.prototype[ITERATOR];

var CORRECT_ITER_NAME = !!nativeTypedArrayIterator
  && (nativeTypedArrayIterator.name == 'values' || nativeTypedArrayIterator.name == undefined);

var typedArrayValues = function values() {
  return arrayValues.call(aTypedArray(this));
};

// `%TypedArray%.prototype.entries` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.entries
exportTypedArrayMethod('entries', function entries() {
  return arrayEntries.call(aTypedArray(this));
});
// `%TypedArray%.prototype.keys` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.keys
exportTypedArrayMethod('keys', function keys() {
  return arrayKeys.call(aTypedArray(this));
});
// `%TypedArray%.prototype.values` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.values
exportTypedArrayMethod('values', typedArrayValues, !CORRECT_ITER_NAME);
// `%TypedArray%.prototype[@@iterator]` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype-@@iterator
exportTypedArrayMethod(ITERATOR, typedArrayValues, !CORRECT_ITER_NAME);


/***/ }),

/***/ "60cf":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "60da":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var DESCRIPTORS = __webpack_require__("83ab");
var fails = __webpack_require__("d039");
var objectKeys = __webpack_require__("df75");
var getOwnPropertySymbolsModule = __webpack_require__("7418");
var propertyIsEnumerableModule = __webpack_require__("d1e7");
var toObject = __webpack_require__("7b0b");
var IndexedObject = __webpack_require__("44ad");

var nativeAssign = Object.assign;
var defineProperty = Object.defineProperty;

// `Object.assign` method
// https://tc39.github.io/ecma262/#sec-object.assign
module.exports = !nativeAssign || fails(function () {
  // should have correct order of operations (Edge bug)
  if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {
    enumerable: true,
    get: function () {
      defineProperty(this, 'b', {
        value: 3,
        enumerable: false
      });
    }
  }), { b: 2 })).b !== 1) return true;
  // should work with symbols and should have deterministic property order (V8 bug)
  var A = {};
  var B = {};
  // eslint-disable-next-line no-undef
  var symbol = Symbol();
  var alphabet = 'abcdefghijklmnopqrst';
  A[symbol] = 7;
  alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
  var T = toObject(target);
  var argumentsLength = arguments.length;
  var index = 1;
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  var propertyIsEnumerable = propertyIsEnumerableModule.f;
  while (argumentsLength > index) {
    var S = IndexedObject(arguments[index++]);
    var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
    var length = keys.length;
    var j = 0;
    var key;
    while (length > j) {
      key = keys[j++];
      if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];
    }
  } return T;
} : nativeAssign;


/***/ }),

/***/ "6167":
/***/ (function(module, exports, __webpack_require__) {

"use strict";
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;

__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("d28b");

__webpack_require__("4de4");

__webpack_require__("4160");

__webpack_require__("c975");

__webpack_require__("e260");

__webpack_require__("d81d");

__webpack_require__("fb6a");

__webpack_require__("cca6");

__webpack_require__("e439");

__webpack_require__("b64b");

__webpack_require__("d3b7");

__webpack_require__("ac1f");

__webpack_require__("25f0");

__webpack_require__("3ca3");

__webpack_require__("5319");

__webpack_require__("1276");

__webpack_require__("159b");

__webpack_require__("ddb0");

var _typeof2 = __webpack_require__("7037");

var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) {
  return _typeof2(obj);
} : function (obj) {
  return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
};
/**
 * @fileOverview Kickass library to create and place poppers near their reference elements.
 * @version {{version}}
 * @license
 * Copyright (c) 2016 Federico Zivolo and contributors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
//
// Cross module loader
// Supported: Node, AMD, Browser globals
//


;

(function (root, factory) {
  if (true) {
    // AMD. Register as an anonymous module.
    !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
				__WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else {}
})(undefined, function () {
  'use strict';

  var root = window; // default options

  var DEFAULTS = {
    // placement of the popper
    placement: 'bottom',
    gpuAcceleration: true,
    // shift popper from its origin by the given amount of pixels (can be negative)
    offset: 0,
    // the element which will act as boundary of the popper
    boundariesElement: 'viewport',
    // amount of pixel used to define a minimum distance between the boundaries and the popper
    boundariesPadding: 5,
    // popper will try to prevent overflow following this order,
    // by default, then, it could overflow on the left and on top of the boundariesElement
    preventOverflowOrder: ['left', 'right', 'top', 'bottom'],
    // the behavior used by flip to change the placement of the popper
    flipBehavior: 'flip',
    arrowElement: '[x-arrow]',
    arrowOffset: 0,
    // list of functions used to modify the offsets before they are applied to the popper
    modifiers: ['shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle'],
    modifiersIgnored: [],
    forceAbsolute: false
  };
  /**
   * Create a new Popper.js instance
   * @constructor Popper
   * @param {HTMLElement} reference - The reference element used to position the popper
   * @param {HTMLElement|Object} popper
   *      The HTML element used as popper, or a configuration used to generate the popper.
   * @param {String} [popper.tagName='div'] The tag name of the generated popper.
   * @param {Array} [popper.classNames=['popper']] Array of classes to apply to the generated popper.
   * @param {Array} [popper.attributes] Array of attributes to apply, specify `attr:value` to assign a value to it.
   * @param {HTMLElement|String} [popper.parent=window.document.body] The parent element, given as HTMLElement or as query string.
   * @param {String} [popper.content=''] The content of the popper, it can be text, html, or node; if it is not text, set `contentType` to `html` or `node`.
   * @param {String} [popper.contentType='text'] If `html`, the `content` will be parsed as HTML. If `node`, it will be appended as-is.
   * @param {String} [popper.arrowTagName='div'] Same as `popper.tagName` but for the arrow element.
   * @param {Array} [popper.arrowClassNames='popper__arrow'] Same as `popper.classNames` but for the arrow element.
   * @param {String} [popper.arrowAttributes=['x-arrow']] Same as `popper.attributes` but for the arrow element.
   * @param {Object} options
   * @param {String} [options.placement=bottom]
   *      Placement of the popper accepted values: `top(-start, -end), right(-start, -end), bottom(-start, -right),
   *      left(-start, -end)`
   *
   * @param {HTMLElement|String} [options.arrowElement='[x-arrow]']
   *      The DOM Node used as arrow for the popper, or a CSS selector used to get the DOM node. It must be child of
   *      its parent Popper. Popper.js will apply to the given element the style required to align the arrow with its
   *      reference element.
   *      By default, it will look for a child node of the popper with the `x-arrow` attribute.
   *
   * @param {Boolean} [options.gpuAcceleration=true]
   *      When this property is set to true, the popper position will be applied using CSS3 translate3d, allowing the
   *      browser to use the GPU to accelerate the rendering.
   *      If set to false, the popper will be placed using `top` and `left` properties, not using the GPU.
   *
   * @param {Number} [options.offset=0]
   *      Amount of pixels the popper will be shifted (can be negative).
   *
   * @param {String|Element} [options.boundariesElement='viewport']
   *      The element which will define the boundaries of the popper position, the popper will never be placed outside
   *      of the defined boundaries (except if `keepTogether` is enabled)
   *
   * @param {Number} [options.boundariesPadding=5]
   *      Additional padding for the boundaries
   *
   * @param {Array} [options.preventOverflowOrder=['left', 'right', 'top', 'bottom']]
   *      Order used when Popper.js tries to avoid overflows from the boundaries, they will be checked in order,
   *      this means that the last ones will never overflow
   *
   * @param {String|Array} [options.flipBehavior='flip']
   *      The behavior used by the `flip` modifier to change the placement of the popper when the latter is trying to
   *      overlap its reference element. Defining `flip` as value, the placement will be flipped on
   *      its axis (`right - left`, `top - bottom`).
   *      You can even pass an array of placements (eg: `['right', 'left', 'top']` ) to manually specify
   *      how alter the placement when a flip is needed. (eg. in the above example, it would first flip from right to left,
   *      then, if even in its new placement, the popper is overlapping its reference element, it will be moved to top)
   *
   * @param {Array} [options.modifiers=[ 'shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle']]
   *      List of functions used to modify the data before they are applied to the popper, add your custom functions
   *      to this array to edit the offsets and placement.
   *      The function should reflect the @params and @returns of preventOverflow
   *
   * @param {Array} [options.modifiersIgnored=[]]
   *      Put here any built-in modifier name you want to exclude from the modifiers list
   *      The function should reflect the @params and @returns of preventOverflow
   *
   * @param {Boolean} [options.removeOnDestroy=false]
   *      Set to true if you want to automatically remove the popper when you call the `destroy` method.
   */

  function Popper(reference, popper, options) {
    this._reference = reference.jquery ? reference[0] : reference;
    this.state = {}; // if the popper variable is a configuration object, parse it to generate an HTMLElement
    // generate a default popper if is not defined

    var isNotDefined = typeof popper === 'undefined' || popper === null;
    var isConfig = popper && Object.prototype.toString.call(popper) === '[object Object]';

    if (isNotDefined || isConfig) {
      this._popper = this.parse(isConfig ? popper : {});
    } // otherwise, use the given HTMLElement as popper
    else {
        this._popper = popper.jquery ? popper[0] : popper;
      } // with {} we create a new object with the options inside it


    this._options = Object.assign({}, DEFAULTS, options); // refactoring modifiers' list

    this._options.modifiers = this._options.modifiers.map(function (modifier) {
      // remove ignored modifiers
      if (this._options.modifiersIgnored.indexOf(modifier) !== -1) return; // set the x-placement attribute before everything else because it could be used to add margins to the popper
      // margins needs to be calculated to get the correct popper offsets

      if (modifier === 'applyStyle') {
        this._popper.setAttribute('x-placement', this._options.placement);
      } // return predefined modifier identified by string or keep the custom one


      return this.modifiers[modifier] || modifier;
    }.bind(this)); // make sure to apply the popper position before any computation

    this.state.position = this._getPosition(this._popper, this._reference);
    setStyle(this._popper, {
      position: this.state.position,
      top: 0
    }); // fire the first update to position the popper in the right place

    this.update(); // setup event listeners, they will take care of update the position in specific situations

    this._setupEventListeners();

    return this;
  } //
  // Methods
  //

  /**
   * Destroy the popper
   * @method
   * @memberof Popper
   */


  Popper.prototype.destroy = function () {
    this._popper.removeAttribute('x-placement');

    this._popper.style.left = '';
    this._popper.style.position = '';
    this._popper.style.top = '';
    this._popper.style[getSupportedPropertyName('transform')] = '';

    this._removeEventListeners(); // remove the popper if user explicity asked for the deletion on destroy


    if (this._options.removeOnDestroy) {
      this._popper.remove();
    }

    return this;
  };
  /**
   * Updates the position of the popper, computing the new offsets and applying the new style
   * @method
   * @memberof Popper
   */


  Popper.prototype.update = function () {
    var data = {
      instance: this,
      styles: {}
    }; // store placement inside the data object, modifiers will be able to edit `placement` if needed
    // and refer to _originalPlacement to know the original value

    data.placement = this._options.placement;
    data._originalPlacement = this._options.placement; // compute the popper and reference offsets and put them inside data.offsets

    data.offsets = this._getOffsets(this._popper, this._reference, data.placement); // get boundaries

    data.boundaries = this._getBoundaries(data, this._options.boundariesPadding, this._options.boundariesElement);
    data = this.runModifiers(data, this._options.modifiers);

    if (typeof this.state.updateCallback === 'function') {
      this.state.updateCallback(data);
    }
  };
  /**
   * If a function is passed, it will be executed after the initialization of popper with as first argument the Popper instance.
   * @method
   * @memberof Popper
   * @param {Function} callback
   */


  Popper.prototype.onCreate = function (callback) {
    // the createCallbacks return as first argument the popper instance
    callback(this);
    return this;
  };
  /**
   * If a function is passed, it will be executed after each update of popper with as first argument the set of coordinates and informations
   * used to style popper and its arrow.
   * NOTE: it doesn't get fired on the first call of the `Popper.update()` method inside the `Popper` constructor!
   * @method
   * @memberof Popper
   * @param {Function} callback
   */


  Popper.prototype.onUpdate = function (callback) {
    this.state.updateCallback = callback;
    return this;
  };
  /**
   * Helper used to generate poppers from a configuration file
   * @method
   * @memberof Popper
   * @param config {Object} configuration
   * @returns {HTMLElement} popper
   */


  Popper.prototype.parse = function (config) {
    var defaultConfig = {
      tagName: 'div',
      classNames: ['popper'],
      attributes: [],
      parent: root.document.body,
      content: '',
      contentType: 'text',
      arrowTagName: 'div',
      arrowClassNames: ['popper__arrow'],
      arrowAttributes: ['x-arrow']
    };
    config = Object.assign({}, defaultConfig, config);
    var d = root.document;
    var popper = d.createElement(config.tagName);
    addClassNames(popper, config.classNames);
    addAttributes(popper, config.attributes);

    if (config.contentType === 'node') {
      popper.appendChild(config.content.jquery ? config.content[0] : config.content);
    } else if (config.contentType === 'html') {
      popper.innerHTML = config.content;
    } else {
      popper.textContent = config.content;
    }

    if (config.arrowTagName) {
      var arrow = d.createElement(config.arrowTagName);
      addClassNames(arrow, config.arrowClassNames);
      addAttributes(arrow, config.arrowAttributes);
      popper.appendChild(arrow);
    }

    var parent = config.parent.jquery ? config.parent[0] : config.parent; // if the given parent is a string, use it to match an element
    // if more than one element is matched, the first one will be used as parent
    // if no elements are matched, the script will throw an error

    if (typeof parent === 'string') {
      parent = d.querySelectorAll(config.parent);

      if (parent.length > 1) {
        console.warn('WARNING: the given `parent` query(' + config.parent + ') matched more than one element, the first one will be used');
      }

      if (parent.length === 0) {
        throw 'ERROR: the given `parent` doesn\'t exists!';
      }

      parent = parent[0];
    } // if the given parent is a DOM nodes list or an array of nodes with more than one element,
    // the first one will be used as parent


    if (parent.length > 1 && parent instanceof Element === false) {
      console.warn('WARNING: you have passed as parent a list of elements, the first one will be used');
      parent = parent[0];
    } // append the generated popper to its parent


    parent.appendChild(popper);
    return popper;
    /**
     * Adds class names to the given element
     * @function
     * @ignore
     * @param {HTMLElement} target
     * @param {Array} classes
     */

    function addClassNames(element, classNames) {
      classNames.forEach(function (className) {
        element.classList.add(className);
      });
    }
    /**
     * Adds attributes to the given element
     * @function
     * @ignore
     * @param {HTMLElement} target
     * @param {Array} attributes
     * @example
     * addAttributes(element, [ 'data-info:foobar' ]);
     */


    function addAttributes(element, attributes) {
      attributes.forEach(function (attribute) {
        element.setAttribute(attribute.split(':')[0], attribute.split(':')[1] || '');
      });
    }
  };
  /**
   * Helper used to get the position which will be applied to the popper
   * @method
   * @memberof Popper
   * @param config {HTMLElement} popper element
   * @param reference {HTMLElement} reference element
   * @returns {String} position
   */


  Popper.prototype._getPosition = function (popper, reference) {
    var container = getOffsetParent(reference);

    if (this._options.forceAbsolute) {
      return 'absolute';
    } // Decide if the popper will be fixed
    // If the reference element is inside a fixed context, the popper will be fixed as well to allow them to scroll together


    var isParentFixed = isFixed(reference, container);
    return isParentFixed ? 'fixed' : 'absolute';
  };
  /**
   * Get offsets to the popper
   * @method
   * @memberof Popper
   * @access private
   * @param {Element} popper - the popper element
   * @param {Element} reference - the reference element (the popper will be relative to this)
   * @returns {Object} An object containing the offsets which will be applied to the popper
   */


  Popper.prototype._getOffsets = function (popper, reference, placement) {
    placement = placement.split('-')[0];
    var popperOffsets = {};
    popperOffsets.position = this.state.position;
    var isParentFixed = popperOffsets.position === 'fixed'; //
    // Get reference element position
    //

    var referenceOffsets = getOffsetRectRelativeToCustomParent(reference, getOffsetParent(popper), isParentFixed); //
    // Get popper sizes
    //

    var popperRect = getOuterSizes(popper); //
    // Compute offsets of popper
    //
    // depending by the popper placement we have to compute its offsets slightly differently

    if (['right', 'left'].indexOf(placement) !== -1) {
      popperOffsets.top = referenceOffsets.top + referenceOffsets.height / 2 - popperRect.height / 2;

      if (placement === 'left') {
        popperOffsets.left = referenceOffsets.left - popperRect.width;
      } else {
        popperOffsets.left = referenceOffsets.right;
      }
    } else {
      popperOffsets.left = referenceOffsets.left + referenceOffsets.width / 2 - popperRect.width / 2;

      if (placement === 'top') {
        popperOffsets.top = referenceOffsets.top - popperRect.height;
      } else {
        popperOffsets.top = referenceOffsets.bottom;
      }
    } // Add width and height to our offsets object


    popperOffsets.width = popperRect.width;
    popperOffsets.height = popperRect.height;
    return {
      popper: popperOffsets,
      reference: referenceOffsets
    };
  };
  /**
   * Setup needed event listeners used to update the popper position
   * @method
   * @memberof Popper
   * @access private
   */


  Popper.prototype._setupEventListeners = function () {
    // NOTE: 1 DOM access here
    this.state.updateBound = this.update.bind(this);
    root.addEventListener('resize', this.state.updateBound); // if the boundariesElement is window we don't need to listen for the scroll event

    if (this._options.boundariesElement !== 'window') {
      var target = getScrollParent(this._reference); // here it could be both `body` or `documentElement` thanks to Firefox, we then check both

      if (target === root.document.body || target === root.document.documentElement) {
        target = root;
      }

      target.addEventListener('scroll', this.state.updateBound);
      this.state.scrollTarget = target;
    }
  };
  /**
   * Remove event listeners used to update the popper position
   * @method
   * @memberof Popper
   * @access private
   */


  Popper.prototype._removeEventListeners = function () {
    // NOTE: 1 DOM access here
    root.removeEventListener('resize', this.state.updateBound);

    if (this._options.boundariesElement !== 'window' && this.state.scrollTarget) {
      this.state.scrollTarget.removeEventListener('scroll', this.state.updateBound);
      this.state.scrollTarget = null;
    }

    this.state.updateBound = null;
  };
  /**
   * Computed the boundaries limits and return them
   * @method
   * @memberof Popper
   * @access private
   * @param {Object} data - Object containing the property "offsets" generated by `_getOffsets`
   * @param {Number} padding - Boundaries padding
   * @param {Element} boundariesElement - Element used to define the boundaries
   * @returns {Object} Coordinates of the boundaries
   */


  Popper.prototype._getBoundaries = function (data, padding, boundariesElement) {
    // NOTE: 1 DOM access here
    var boundaries = {};
    var width, height;

    if (boundariesElement === 'window') {
      var body = root.document.body,
          html = root.document.documentElement;
      height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
      width = Math.max(body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth);
      boundaries = {
        top: 0,
        right: width,
        bottom: height,
        left: 0
      };
    } else if (boundariesElement === 'viewport') {
      var offsetParent = getOffsetParent(this._popper);
      var scrollParent = getScrollParent(this._popper);
      var offsetParentRect = getOffsetRect(offsetParent); // Thanks the fucking native API, `document.body.scrollTop` & `document.documentElement.scrollTop`

      var getScrollTopValue = function getScrollTopValue(element) {
        return element == document.body ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) : element.scrollTop;
      };

      var getScrollLeftValue = function getScrollLeftValue(element) {
        return element == document.body ? Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) : element.scrollLeft;
      }; // if the popper is fixed we don't have to substract scrolling from the boundaries


      var scrollTop = data.offsets.popper.position === 'fixed' ? 0 : getScrollTopValue(scrollParent);
      var scrollLeft = data.offsets.popper.position === 'fixed' ? 0 : getScrollLeftValue(scrollParent);
      boundaries = {
        top: 0 - (offsetParentRect.top - scrollTop),
        right: root.document.documentElement.clientWidth - (offsetParentRect.left - scrollLeft),
        bottom: root.document.documentElement.clientHeight - (offsetParentRect.top - scrollTop),
        left: 0 - (offsetParentRect.left - scrollLeft)
      };
    } else {
      if (getOffsetParent(this._popper) === boundariesElement) {
        boundaries = {
          top: 0,
          left: 0,
          right: boundariesElement.clientWidth,
          bottom: boundariesElement.clientHeight
        };
      } else {
        boundaries = getOffsetRect(boundariesElement);
      }
    }

    boundaries.left += padding;
    boundaries.right -= padding;
    boundaries.top = boundaries.top + padding;
    boundaries.bottom = boundaries.bottom - padding;
    return boundaries;
  };
  /**
   * Loop trough the list of modifiers and run them in order, each of them will then edit the data object
   * @method
   * @memberof Popper
   * @access public
   * @param {Object} data
   * @param {Array} modifiers
   * @param {Function} ends
   */


  Popper.prototype.runModifiers = function (data, modifiers, ends) {
    var modifiersToRun = modifiers.slice();

    if (ends !== undefined) {
      modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
    }

    modifiersToRun.forEach(function (modifier) {
      if (isFunction(modifier)) {
        data = modifier.call(this, data);
      }
    }.bind(this));
    return data;
  };
  /**
   * Helper used to know if the given modifier depends from another one.
   * @method
   * @memberof Popper
   * @param {String} requesting - name of requesting modifier
   * @param {String} requested - name of requested modifier
   * @returns {Boolean}
   */


  Popper.prototype.isModifierRequired = function (requesting, requested) {
    var index = getArrayKeyIndex(this._options.modifiers, requesting);
    return !!this._options.modifiers.slice(0, index).filter(function (modifier) {
      return modifier === requested;
    }).length;
  }; //
  // Modifiers
  //

  /**
   * Modifiers list
   * @namespace Popper.modifiers
   * @memberof Popper
   * @type {Object}
   */


  Popper.prototype.modifiers = {};
  /**
   * Apply the computed styles to the popper element
   * @method
   * @memberof Popper.modifiers
   * @argument {Object} data - The data object generated by `update` method
   * @returns {Object} The same data object
   */

  Popper.prototype.modifiers.applyStyle = function (data) {
    // apply the final offsets to the popper
    // NOTE: 1 DOM access here
    var styles = {
      position: data.offsets.popper.position
    }; // round top and left to avoid blurry text

    var left = Math.round(data.offsets.popper.left);
    var top = Math.round(data.offsets.popper.top); // if gpuAcceleration is set to true and transform is supported, we use `translate3d` to apply the position to the popper
    // we automatically use the supported prefixed version if needed

    var prefixedProperty;

    if (this._options.gpuAcceleration && (prefixedProperty = getSupportedPropertyName('transform'))) {
      styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
      styles.top = 0;
      styles.left = 0;
    } // othwerise, we use the standard `left` and `top` properties
    else {
        styles.left = left;
        styles.top = top;
      } // any property present in `data.styles` will be applied to the popper,
    // in this way we can make the 3rd party modifiers add custom styles to it
    // Be aware, modifiers could override the properties defined in the previous
    // lines of this modifier!


    Object.assign(styles, data.styles);
    setStyle(this._popper, styles); // set an attribute which will be useful to style the tooltip (use it to properly position its arrow)
    // NOTE: 1 DOM access here

    this._popper.setAttribute('x-placement', data.placement); // if the arrow modifier is required and the arrow style has been computed, apply the arrow style


    if (this.isModifierRequired(this.modifiers.applyStyle, this.modifiers.arrow) && data.offsets.arrow) {
      setStyle(data.arrowElement, data.offsets.arrow);
    }

    return data;
  };
  /**
   * Modifier used to shift the popper on the start or end of its reference element side
   * @method
   * @memberof Popper.modifiers
   * @argument {Object} data - The data object generated by `update` method
   * @returns {Object} The data object, properly modified
   */


  Popper.prototype.modifiers.shift = function (data) {
    var placement = data.placement;
    var basePlacement = placement.split('-')[0];
    var shiftVariation = placement.split('-')[1]; // if shift shiftVariation is specified, run the modifier

    if (shiftVariation) {
      var reference = data.offsets.reference;
      var popper = getPopperClientRect(data.offsets.popper);
      var shiftOffsets = {
        y: {
          start: {
            top: reference.top
          },
          end: {
            top: reference.top + reference.height - popper.height
          }
        },
        x: {
          start: {
            left: reference.left
          },
          end: {
            left: reference.left + reference.width - popper.width
          }
        }
      };
      var axis = ['bottom', 'top'].indexOf(basePlacement) !== -1 ? 'x' : 'y';
      data.offsets.popper = Object.assign(popper, shiftOffsets[axis][shiftVariation]);
    }

    return data;
  };
  /**
   * Modifier used to make sure the popper does not overflows from it's boundaries
   * @method
   * @memberof Popper.modifiers
   * @argument {Object} data - The data object generated by `update` method
   * @returns {Object} The data object, properly modified
   */


  Popper.prototype.modifiers.preventOverflow = function (data) {
    var order = this._options.preventOverflowOrder;
    var popper = getPopperClientRect(data.offsets.popper);
    var check = {
      left: function left() {
        var left = popper.left;

        if (popper.left < data.boundaries.left) {
          left = Math.max(popper.left, data.boundaries.left);
        }

        return {
          left: left
        };
      },
      right: function right() {
        var left = popper.left;

        if (popper.right > data.boundaries.right) {
          left = Math.min(popper.left, data.boundaries.right - popper.width);
        }

        return {
          left: left
        };
      },
      top: function top() {
        var top = popper.top;

        if (popper.top < data.boundaries.top) {
          top = Math.max(popper.top, data.boundaries.top);
        }

        return {
          top: top
        };
      },
      bottom: function bottom() {
        var top = popper.top;

        if (popper.bottom > data.boundaries.bottom) {
          top = Math.min(popper.top, data.boundaries.bottom - popper.height);
        }

        return {
          top: top
        };
      }
    };
    order.forEach(function (direction) {
      data.offsets.popper = Object.assign(popper, check[direction]());
    });
    return data;
  };
  /**
   * Modifier used to make sure the popper is always near its reference
   * @method
   * @memberof Popper.modifiers
   * @argument {Object} data - The data object generated by _update method
   * @returns {Object} The data object, properly modified
   */


  Popper.prototype.modifiers.keepTogether = function (data) {
    var popper = getPopperClientRect(data.offsets.popper);
    var reference = data.offsets.reference;
    var f = Math.floor;

    if (popper.right < f(reference.left)) {
      data.offsets.popper.left = f(reference.left) - popper.width;
    }

    if (popper.left > f(reference.right)) {
      data.offsets.popper.left = f(reference.right);
    }

    if (popper.bottom < f(reference.top)) {
      data.offsets.popper.top = f(reference.top) - popper.height;
    }

    if (popper.top > f(reference.bottom)) {
      data.offsets.popper.top = f(reference.bottom);
    }

    return data;
  };
  /**
   * Modifier used to flip the placement of the popper when the latter is starting overlapping its reference element.
   * Requires the `preventOverflow` modifier before it in order to work.
   * **NOTE:** This modifier will run all its previous modifiers everytime it tries to flip the popper!
   * @method
   * @memberof Popper.modifiers
   * @argument {Object} data - The data object generated by _update method
   * @returns {Object} The data object, properly modified
   */


  Popper.prototype.modifiers.flip = function (data) {
    // check if preventOverflow is in the list of modifiers before the flip modifier.
    // otherwise flip would not work as expected.
    if (!this.isModifierRequired(this.modifiers.flip, this.modifiers.preventOverflow)) {
      console.warn('WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!');
      return data;
    }

    if (data.flipped && data.placement === data._originalPlacement) {
      // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
      return data;
    }

    var placement = data.placement.split('-')[0];
    var placementOpposite = getOppositePlacement(placement);
    var variation = data.placement.split('-')[1] || '';
    var flipOrder = [];

    if (this._options.flipBehavior === 'flip') {
      flipOrder = [placement, placementOpposite];
    } else {
      flipOrder = this._options.flipBehavior;
    }

    flipOrder.forEach(function (step, index) {
      if (placement !== step || flipOrder.length === index + 1) {
        return;
      }

      placement = data.placement.split('-')[0];
      placementOpposite = getOppositePlacement(placement);
      var popperOffsets = getPopperClientRect(data.offsets.popper); // this boolean is used to distinguish right and bottom from top and left
      // they need different computations to get flipped

      var a = ['right', 'bottom'].indexOf(placement) !== -1; // using Math.floor because the reference offsets may contain decimals we are not going to consider here

      if (a && Math.floor(data.offsets.reference[placement]) > Math.floor(popperOffsets[placementOpposite]) || !a && Math.floor(data.offsets.reference[placement]) < Math.floor(popperOffsets[placementOpposite])) {
        // we'll use this boolean to detect any flip loop
        data.flipped = true;
        data.placement = flipOrder[index + 1];

        if (variation) {
          data.placement += '-' + variation;
        }

        data.offsets.popper = this._getOffsets(this._popper, this._reference, data.placement).popper;
        data = this.runModifiers(data, this._options.modifiers, this._flip);
      }
    }.bind(this));
    return data;
  };
  /**
   * Modifier used to add an offset to the popper, useful if you more granularity positioning your popper.
   * The offsets will shift the popper on the side of its reference element.
   * @method
   * @memberof Popper.modifiers
   * @argument {Object} data - The data object generated by _update method
   * @returns {Object} The data object, properly modified
   */


  Popper.prototype.modifiers.offset = function (data) {
    var offset = this._options.offset;
    var popper = data.offsets.popper;

    if (data.placement.indexOf('left') !== -1) {
      popper.top -= offset;
    } else if (data.placement.indexOf('right') !== -1) {
      popper.top += offset;
    } else if (data.placement.indexOf('top') !== -1) {
      popper.left -= offset;
    } else if (data.placement.indexOf('bottom') !== -1) {
      popper.left += offset;
    }

    return data;
  };
  /**
   * Modifier used to move the arrows on the edge of the popper to make sure them are always between the popper and the reference element
   * It will use the CSS outer size of the arrow element to know how many pixels of conjuction are needed
   * @method
   * @memberof Popper.modifiers
   * @argument {Object} data - The data object generated by _update method
   * @returns {Object} The data object, properly modified
   */


  Popper.prototype.modifiers.arrow = function (data) {
    var arrow = this._options.arrowElement;
    var arrowOffset = this._options.arrowOffset; // if the arrowElement is a string, suppose it's a CSS selector

    if (typeof arrow === 'string') {
      arrow = this._popper.querySelector(arrow);
    } // if arrow element is not found, don't run the modifier


    if (!arrow) {
      return data;
    } // the arrow element must be child of its popper


    if (!this._popper.contains(arrow)) {
      console.warn('WARNING: `arrowElement` must be child of its popper element!');
      return data;
    } // arrow depends on keepTogether in order to work


    if (!this.isModifierRequired(this.modifiers.arrow, this.modifiers.keepTogether)) {
      console.warn('WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!');
      return data;
    }

    var arrowStyle = {};
    var placement = data.placement.split('-')[0];
    var popper = getPopperClientRect(data.offsets.popper);
    var reference = data.offsets.reference;
    var isVertical = ['left', 'right'].indexOf(placement) !== -1;
    var len = isVertical ? 'height' : 'width';
    var side = isVertical ? 'top' : 'left';
    var translate = isVertical ? 'translateY' : 'translateX';
    var altSide = isVertical ? 'left' : 'top';
    var opSide = isVertical ? 'bottom' : 'right';
    var arrowSize = getOuterSizes(arrow)[len]; //
    // extends keepTogether behavior making sure the popper and its reference have enough pixels in conjuction
    //
    // top/left side

    if (reference[opSide] - arrowSize < popper[side]) {
      data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowSize);
    } // bottom/right side


    if (reference[side] + arrowSize > popper[opSide]) {
      data.offsets.popper[side] += reference[side] + arrowSize - popper[opSide];
    } // compute center of the popper


    var center = reference[side] + (arrowOffset || reference[len] / 2 - arrowSize / 2);
    var sideValue = center - popper[side]; // prevent arrow from being placed not contiguously to its popper

    sideValue = Math.max(Math.min(popper[len] - arrowSize - 8, sideValue), 8);
    arrowStyle[side] = sideValue;
    arrowStyle[altSide] = ''; // make sure to remove any old style from the arrow

    data.offsets.arrow = arrowStyle;
    data.arrowElement = arrow;
    return data;
  }; //
  // Helpers
  //

  /**
   * Get the outer sizes of the given element (offset size + margins)
   * @function
   * @ignore
   * @argument {Element} element
   * @returns {Object} object containing width and height properties
   */


  function getOuterSizes(element) {
    // NOTE: 1 DOM access here
    var _display = element.style.display,
        _visibility = element.style.visibility;
    element.style.display = 'block';
    element.style.visibility = 'hidden';
    var calcWidthToForceRepaint = element.offsetWidth; // original method

    var styles = root.getComputedStyle(element);
    var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
    var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
    var result = {
      width: element.offsetWidth + y,
      height: element.offsetHeight + x
    }; // reset element styles

    element.style.display = _display;
    element.style.visibility = _visibility;
    return result;
  }
  /**
   * Get the opposite placement of the given one/
   * @function
   * @ignore
   * @argument {String} placement
   * @returns {String} flipped placement
   */


  function getOppositePlacement(placement) {
    var hash = {
      left: 'right',
      right: 'left',
      bottom: 'top',
      top: 'bottom'
    };
    return placement.replace(/left|right|bottom|top/g, function (matched) {
      return hash[matched];
    });
  }
  /**
   * Given the popper offsets, generate an output similar to getBoundingClientRect
   * @function
   * @ignore
   * @argument {Object} popperOffsets
   * @returns {Object} ClientRect like output
   */


  function getPopperClientRect(popperOffsets) {
    var offsets = Object.assign({}, popperOffsets);
    offsets.right = offsets.left + offsets.width;
    offsets.bottom = offsets.top + offsets.height;
    return offsets;
  }
  /**
   * Given an array and the key to find, returns its index
   * @function
   * @ignore
   * @argument {Array} arr
   * @argument keyToFind
   * @returns index or null
   */


  function getArrayKeyIndex(arr, keyToFind) {
    var i = 0,
        key;

    for (key in arr) {
      if (arr[key] === keyToFind) {
        return i;
      }

      i++;
    }

    return null;
  }
  /**
   * Get CSS computed property of the given element
   * @function
   * @ignore
   * @argument {Eement} element
   * @argument {String} property
   */


  function getStyleComputedProperty(element, property) {
    // NOTE: 1 DOM access here
    var css = root.getComputedStyle(element, null);
    return css[property];
  }
  /**
   * Returns the offset parent of the given element
   * @function
   * @ignore
   * @argument {Element} element
   * @returns {Element} offset parent
   */


  function getOffsetParent(element) {
    // NOTE: 1 DOM access here
    var offsetParent = element.offsetParent;
    return offsetParent === root.document.body || !offsetParent ? root.document.documentElement : offsetParent;
  }
  /**
   * Returns the scrolling parent of the given element
   * @function
   * @ignore
   * @argument {Element} element
   * @returns {Element} offset parent
   */


  function getScrollParent(element) {
    var parent = element.parentNode;

    if (!parent) {
      return element;
    }

    if (parent === root.document) {
      // Firefox puts the scrollTOp value on `documentElement` instead of `body`, we then check which of them is
      // greater than 0 and return the proper element
      if (root.document.body.scrollTop || root.document.body.scrollLeft) {
        return root.document.body;
      } else {
        return root.document.documentElement;
      }
    } // Firefox want us to check `-x` and `-y` variations as well


    if (['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-x')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-y')) !== -1) {
      // If the detected scrollParent is body, we perform an additional check on its parentNode
      // in this way we'll get body if the browser is Chrome-ish, or documentElement otherwise
      // fixes issue #65
      return parent;
    }

    return getScrollParent(element.parentNode);
  }
  /**
   * Check if the given element is fixed or is inside a fixed parent
   * @function
   * @ignore
   * @argument {Element} element
   * @argument {Element} customContainer
   * @returns {Boolean} answer to "isFixed?"
   */


  function isFixed(element) {
    if (element === root.document.body) {
      return false;
    }

    if (getStyleComputedProperty(element, 'position') === 'fixed') {
      return true;
    }

    return element.parentNode ? isFixed(element.parentNode) : element;
  }
  /**
   * Set the style to the given popper
   * @function
   * @ignore
   * @argument {Element} element - Element to apply the style to
   * @argument {Object} styles - Object with a list of properties and values which will be applied to the element
   */


  function setStyle(element, styles) {
    function is_numeric(n) {
      return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
    }

    Object.keys(styles).forEach(function (prop) {
      var unit = ''; // add unit if the value is numeric and is one of the following

      if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && is_numeric(styles[prop])) {
        unit = 'px';
      }

      element.style[prop] = styles[prop] + unit;
    });
  }
  /**
   * Check if the given variable is a function
   * @function
   * @ignore
   * @argument {*} functionToCheck - variable to check
   * @returns {Boolean} answer to: is a function?
   */


  function isFunction(functionToCheck) {
    var getType = {};
    return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
  }
  /**
   * Get the position of the given element, relative to its offset parent
   * @function
   * @ignore
   * @param {Element} element
   * @return {Object} position - Coordinates of the element and its `scrollTop`
   */


  function getOffsetRect(element) {
    var elementRect = {
      width: element.offsetWidth,
      height: element.offsetHeight,
      left: element.offsetLeft,
      top: element.offsetTop
    };
    elementRect.right = elementRect.left + elementRect.width;
    elementRect.bottom = elementRect.top + elementRect.height; // position

    return elementRect;
  }
  /**
   * Get bounding client rect of given element
   * @function
   * @ignore
   * @param {HTMLElement} element
   * @return {Object} client rect
   */


  function getBoundingClientRect(element) {
    var rect = element.getBoundingClientRect(); // whether the IE version is lower than 11

    var isIE = navigator.userAgent.indexOf("MSIE") != -1; // fix ie document bounding top always 0 bug

    var rectTop = isIE && element.tagName === 'HTML' ? -element.scrollTop : rect.top;
    return {
      left: rect.left,
      top: rectTop,
      right: rect.right,
      bottom: rect.bottom,
      width: rect.right - rect.left,
      height: rect.bottom - rectTop
    };
  }
  /**
   * Given an element and one of its parents, return the offset
   * @function
   * @ignore
   * @param {HTMLElement} element
   * @param {HTMLElement} parent
   * @return {Object} rect
   */


  function getOffsetRectRelativeToCustomParent(element, parent, fixed) {
    var elementRect = getBoundingClientRect(element);
    var parentRect = getBoundingClientRect(parent);

    if (fixed) {
      var scrollParent = getScrollParent(parent);
      parentRect.top += scrollParent.scrollTop;
      parentRect.bottom += scrollParent.scrollTop;
      parentRect.left += scrollParent.scrollLeft;
      parentRect.right += scrollParent.scrollLeft;
    }

    var rect = {
      top: elementRect.top - parentRect.top,
      left: elementRect.left - parentRect.left,
      bottom: elementRect.top - parentRect.top + elementRect.height,
      right: elementRect.left - parentRect.left + elementRect.width,
      width: elementRect.width,
      height: elementRect.height
    };
    return rect;
  }
  /**
   * Get the prefixed supported property name
   * @function
   * @ignore
   * @argument {String} property (camelCase)
   * @returns {String} prefixed property (camelCase)
   */


  function getSupportedPropertyName(property) {
    var prefixes = ['', 'ms', 'webkit', 'moz', 'o'];

    for (var i = 0; i < prefixes.length; i++) {
      var toCheck = prefixes[i] ? prefixes[i] + property.charAt(0).toUpperCase() + property.slice(1) : property;

      if (typeof root.document.body.style[toCheck] !== 'undefined') {
        return toCheck;
      }
    }

    return null;
  }
  /**
   * The Object.assign() method is used to copy the values of all enumerable own properties from one or more source
   * objects to a target object. It will return the target object.
   * This polyfill doesn't support symbol properties, since ES5 doesn't have symbols anyway
   * Source: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
   * @function
   * @ignore
   */


  if (!Object.assign) {
    Object.defineProperty(Object, 'assign', {
      enumerable: false,
      configurable: true,
      writable: true,
      value: function value(target) {
        if (target === undefined || target === null) {
          throw new TypeError('Cannot convert first argument to object');
        }

        var to = Object(target);

        for (var i = 1; i < arguments.length; i++) {
          var nextSource = arguments[i];

          if (nextSource === undefined || nextSource === null) {
            continue;
          }

          nextSource = Object(nextSource);
          var keysArray = Object.keys(nextSource);

          for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
            var nextKey = keysArray[nextIndex];
            var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);

            if (desc !== undefined && desc.enumerable) {
              to[nextKey] = nextSource[nextKey];
            }
          }
        }

        return to;
      }
    });
  }

  return Popper;
});

/***/ }),

/***/ "621a":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var global = __webpack_require__("da84");
var DESCRIPTORS = __webpack_require__("83ab");
var NATIVE_ARRAY_BUFFER = __webpack_require__("a981");
var createNonEnumerableProperty = __webpack_require__("9112");
var redefineAll = __webpack_require__("e2cc");
var fails = __webpack_require__("d039");
var anInstance = __webpack_require__("19aa");
var toInteger = __webpack_require__("a691");
var toLength = __webpack_require__("50c4");
var toIndex = __webpack_require__("0b25");
var IEEE754 = __webpack_require__("77a7");
var getPrototypeOf = __webpack_require__("e163");
var setPrototypeOf = __webpack_require__("d2bb");
var getOwnPropertyNames = __webpack_require__("241c").f;
var defineProperty = __webpack_require__("9bf2").f;
var arrayFill = __webpack_require__("81d5");
var setToStringTag = __webpack_require__("d44e");
var InternalStateModule = __webpack_require__("69f3");

var getInternalState = InternalStateModule.get;
var setInternalState = InternalStateModule.set;
var ARRAY_BUFFER = 'ArrayBuffer';
var DATA_VIEW = 'DataView';
var PROTOTYPE = 'prototype';
var WRONG_LENGTH = 'Wrong length';
var WRONG_INDEX = 'Wrong index';
var NativeArrayBuffer = global[ARRAY_BUFFER];
var $ArrayBuffer = NativeArrayBuffer;
var $DataView = global[DATA_VIEW];
var $DataViewPrototype = $DataView && $DataView[PROTOTYPE];
var ObjectPrototype = Object.prototype;
var RangeError = global.RangeError;

var packIEEE754 = IEEE754.pack;
var unpackIEEE754 = IEEE754.unpack;

var packInt8 = function (number) {
  return [number & 0xFF];
};

var packInt16 = function (number) {
  return [number & 0xFF, number >> 8 & 0xFF];
};

var packInt32 = function (number) {
  return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];
};

var unpackInt32 = function (buffer) {
  return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];
};

var packFloat32 = function (number) {
  return packIEEE754(number, 23, 4);
};

var packFloat64 = function (number) {
  return packIEEE754(number, 52, 8);
};

var addGetter = function (Constructor, key) {
  defineProperty(Constructor[PROTOTYPE], key, { get: function () { return getInternalState(this)[key]; } });
};

var get = function (view, count, index, isLittleEndian) {
  var intIndex = toIndex(index);
  var store = getInternalState(view);
  if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);
  var bytes = getInternalState(store.buffer).bytes;
  var start = intIndex + store.byteOffset;
  var pack = bytes.slice(start, start + count);
  return isLittleEndian ? pack : pack.reverse();
};

var set = function (view, count, index, conversion, value, isLittleEndian) {
  var intIndex = toIndex(index);
  var store = getInternalState(view);
  if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);
  var bytes = getInternalState(store.buffer).bytes;
  var start = intIndex + store.byteOffset;
  var pack = conversion(+value);
  for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];
};

if (!NATIVE_ARRAY_BUFFER) {
  $ArrayBuffer = function ArrayBuffer(length) {
    anInstance(this, $ArrayBuffer, ARRAY_BUFFER);
    var byteLength = toIndex(length);
    setInternalState(this, {
      bytes: arrayFill.call(new Array(byteLength), 0),
      byteLength: byteLength
    });
    if (!DESCRIPTORS) this.byteLength = byteLength;
  };

  $DataView = function DataView(buffer, byteOffset, byteLength) {
    anInstance(this, $DataView, DATA_VIEW);
    anInstance(buffer, $ArrayBuffer, DATA_VIEW);
    var bufferLength = getInternalState(buffer).byteLength;
    var offset = toInteger(byteOffset);
    if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset');
    byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
    if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);
    setInternalState(this, {
      buffer: buffer,
      byteLength: byteLength,
      byteOffset: offset
    });
    if (!DESCRIPTORS) {
      this.buffer = buffer;
      this.byteLength = byteLength;
      this.byteOffset = offset;
    }
  };

  if (DESCRIPTORS) {
    addGetter($ArrayBuffer, 'byteLength');
    addGetter($DataView, 'buffer');
    addGetter($DataView, 'byteLength');
    addGetter($DataView, 'byteOffset');
  }

  redefineAll($DataView[PROTOTYPE], {
    getInt8: function getInt8(byteOffset) {
      return get(this, 1, byteOffset)[0] << 24 >> 24;
    },
    getUint8: function getUint8(byteOffset) {
      return get(this, 1, byteOffset)[0];
    },
    getInt16: function getInt16(byteOffset /* , littleEndian */) {
      var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
      return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
    },
    getUint16: function getUint16(byteOffset /* , littleEndian */) {
      var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
      return bytes[1] << 8 | bytes[0];
    },
    getInt32: function getInt32(byteOffset /* , littleEndian */) {
      return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));
    },
    getUint32: function getUint32(byteOffset /* , littleEndian */) {
      return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;
    },
    getFloat32: function getFloat32(byteOffset /* , littleEndian */) {
      return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);
    },
    getFloat64: function getFloat64(byteOffset /* , littleEndian */) {
      return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);
    },
    setInt8: function setInt8(byteOffset, value) {
      set(this, 1, byteOffset, packInt8, value);
    },
    setUint8: function setUint8(byteOffset, value) {
      set(this, 1, byteOffset, packInt8, value);
    },
    setInt16: function setInt16(byteOffset, value /* , littleEndian */) {
      set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
    },
    setUint16: function setUint16(byteOffset, value /* , littleEndian */) {
      set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
    },
    setInt32: function setInt32(byteOffset, value /* , littleEndian */) {
      set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
    },
    setUint32: function setUint32(byteOffset, value /* , littleEndian */) {
      set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
    },
    setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {
      set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);
    },
    setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {
      set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);
    }
  });
} else {
  if (!fails(function () {
    NativeArrayBuffer(1);
  }) || !fails(function () {
    new NativeArrayBuffer(-1); // eslint-disable-line no-new
  }) || fails(function () {
    new NativeArrayBuffer(); // eslint-disable-line no-new
    new NativeArrayBuffer(1.5); // eslint-disable-line no-new
    new NativeArrayBuffer(NaN); // eslint-disable-line no-new
    return NativeArrayBuffer.name != ARRAY_BUFFER;
  })) {
    $ArrayBuffer = function ArrayBuffer(length) {
      anInstance(this, $ArrayBuffer);
      return new NativeArrayBuffer(toIndex(length));
    };
    var ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE] = NativeArrayBuffer[PROTOTYPE];
    for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) {
      if (!((key = keys[j++]) in $ArrayBuffer)) {
        createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]);
      }
    }
    ArrayBufferPrototype.constructor = $ArrayBuffer;
  }

  // WebKit bug - the same parent prototype for typed arrays and data view
  if (setPrototypeOf && getPrototypeOf($DataViewPrototype) !== ObjectPrototype) {
    setPrototypeOf($DataViewPrototype, ObjectPrototype);
  }

  // iOS Safari 7.x bug
  var testView = new $DataView(new $ArrayBuffer(2));
  var nativeSetInt8 = $DataViewPrototype.setInt8;
  testView.setInt8(0, 2147483648);
  testView.setInt8(1, 2147483649);
  if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll($DataViewPrototype, {
    setInt8: function setInt8(byteOffset, value) {
      nativeSetInt8.call(this, byteOffset, value << 24 >> 24);
    },
    setUint8: function setUint8(byteOffset, value) {
      nativeSetInt8.call(this, byteOffset, value << 24 >> 24);
    }
  }, { unsafe: true });
}

setToStringTag($ArrayBuffer, ARRAY_BUFFER);
setToStringTag($DataView, DATA_VIEW);

module.exports = {
  ArrayBuffer: $ArrayBuffer,
  DataView: $DataView
};


/***/ }),

/***/ "62e4":
/***/ (function(module, exports) {

module.exports = function(module) {
	if (!module.webpackPolyfill) {
		module.deprecate = function() {};
		module.paths = [];
		// module.parent = undefined by default
		if (!module.children) module.children = [];
		Object.defineProperty(module, "loaded", {
			enumerable: true,
			get: function() {
				return module.l;
			}
		});
		Object.defineProperty(module, "id", {
			enumerable: true,
			get: function() {
				return module.i;
			}
		});
		module.webpackPolyfill = 1;
	}
	return module;
};


/***/ }),

/***/ "6325":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_input_number_vue_vue_type_style_index_0_id_e0a0c7e8_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("43b2");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_input_number_vue_vue_type_style_index_0_id_e0a0c7e8_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_input_number_vue_vue_type_style_index_0_id_e0a0c7e8_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_input_number_vue_vue_type_style_index_0_id_e0a0c7e8_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "6374":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("d28b");

__webpack_require__("e260");

__webpack_require__("d3b7");

__webpack_require__("3ca3");

__webpack_require__("ddb0");

var unsupportedIterableToArray = __webpack_require__("6613");

function _createForOfIteratorHelper(o) {
  if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
    if (Array.isArray(o) || (o = unsupportedIterableToArray(o))) {
      var i = 0;

      var F = function F() {};

      return {
        s: F,
        n: function n() {
          if (i >= o.length) return {
            done: true
          };
          return {
            done: false,
            value: o[i++]
          };
        },
        e: function e(_e) {
          throw _e;
        },
        f: F
      };
    }

    throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  }

  var it,
      normalCompletion = true,
      didErr = false,
      err;
  return {
    s: function s() {
      it = o[Symbol.iterator]();
    },
    n: function n() {
      var step = it.next();
      normalCompletion = step.done;
      return step;
    },
    e: function e(_e2) {
      didErr = true;
      err = _e2;
    },
    f: function f() {
      try {
        if (!normalCompletion && it["return"] != null) it["return"]();
      } finally {
        if (didErr) throw err;
      }
    }
  };
}

module.exports = _createForOfIteratorHelper;

/***/ }),

/***/ "63c1":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "6438":
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
var $keys = __webpack_require__("03d6");
var hiddenKeys = __webpack_require__("9742").concat('length', 'prototype');

exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  return $keys(O, hiddenKeys);
};


/***/ }),

/***/ "646a":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_button_group_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("391a");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_button_group_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_button_group_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_button_group_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "6495":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_message_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1054");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_message_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_message_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_message_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "649e":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__("ebb5");
var $some = __webpack_require__("b727").some;

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

// `%TypedArray%.prototype.some` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.some
exportTypedArrayMethod('some', function some(callbackfn /* , thisArg */) {
  return $some(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
});


/***/ }),

/***/ "6547":
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__("a691");
var requireObjectCoercible = __webpack_require__("1d80");

// `String.prototype.{ codePointAt, at }` methods implementation
var createMethod = function (CONVERT_TO_STRING) {
  return function ($this, pos) {
    var S = String(requireObjectCoercible($this));
    var position = toInteger(pos);
    var size = S.length;
    var first, second;
    if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
    first = S.charCodeAt(position);
    return first < 0xD800 || first > 0xDBFF || position + 1 === size
      || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
        ? CONVERT_TO_STRING ? S.charAt(position) : first
        : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  };
};

module.exports = {
  // `String.prototype.codePointAt` method
  // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
  codeAt: createMethod(false),
  // `String.prototype.at` method
  // https://github.com/mathiasbynens/String.prototype.at
  charAt: createMethod(true)
};


/***/ }),

/***/ "658f":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("6858");
var global = __webpack_require__("ef08");
var hide = __webpack_require__("051b");
var Iterators = __webpack_require__("8a0d");
var TO_STRING_TAG = __webpack_require__("cc15")('toStringTag');

var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
  'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
  'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
  'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
  'TextTrackList,TouchList').split(',');

for (var i = 0; i < DOMIterables.length; i++) {
  var NAME = DOMIterables[i];
  var Collection = global[NAME];
  var proto = Collection && Collection.prototype;
  if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
  Iterators[NAME] = Iterators.Array;
}


/***/ }),

/***/ "65f0":
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__("861d");
var isArray = __webpack_require__("e8b5");
var wellKnownSymbol = __webpack_require__("b622");

var SPECIES = wellKnownSymbol('species');

// `ArraySpeciesCreate` abstract operation
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
module.exports = function (originalArray, length) {
  var C;
  if (isArray(originalArray)) {
    C = originalArray.constructor;
    // cross-realm fallback
    if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
    else if (isObject(C)) {
      C = C[SPECIES];
      if (C === null) C = undefined;
    }
  } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
};


/***/ }),

/***/ "6613":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("a630");

__webpack_require__("fb6a");

__webpack_require__("b0c0");

__webpack_require__("d3b7");

__webpack_require__("25f0");

__webpack_require__("3ca3");

var arrayLikeToArray = __webpack_require__("5a43");

function _unsupportedIterableToArray(o, minLen) {
  if (!o) return;
  if (typeof o === "string") return arrayLikeToArray(o, minLen);
  var n = Object.prototype.toString.call(o).slice(8, -1);
  if (n === "Object" && o.constructor) n = o.constructor.name;
  if (n === "Map" || n === "Set") return Array.from(n);
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
}

module.exports = _unsupportedIterableToArray;

/***/ }),

/***/ "6858":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var addToUnscopables = __webpack_require__("2f9a");
var step = __webpack_require__("ea34");
var Iterators = __webpack_require__("8a0d");
var toIObject = __webpack_require__("6ca1");

// 22.1.3.4 Array.prototype.entries()
// 22.1.3.13 Array.prototype.keys()
// 22.1.3.29 Array.prototype.values()
// 22.1.3.30 Array.prototype[@@iterator]()
module.exports = __webpack_require__("393a")(Array, 'Array', function (iterated, kind) {
  this._t = toIObject(iterated); // target
  this._i = 0;                   // next index
  this._k = kind;                // kind
// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
}, function () {
  var O = this._t;
  var kind = this._k;
  var index = this._i++;
  if (!O || index >= O.length) {
    this._t = undefined;
    return step(1);
  }
  if (kind == 'keys') return step(0, index);
  if (kind == 'values') return step(0, O[index]);
  return step(0, [index, O[index]]);
}, 'values');

// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
Iterators.Arguments = Iterators.Array;

addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');


/***/ }),

/***/ "693d":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// ECMAScript 6 symbols shim
var global = __webpack_require__("ef08");
var has = __webpack_require__("9c0e");
var DESCRIPTORS = __webpack_require__("0bad");
var $export = __webpack_require__("512c");
var redefine = __webpack_require__("ba01");
var META = __webpack_require__("e34a").KEY;
var $fails = __webpack_require__("4b8b");
var shared = __webpack_require__("b367");
var setToStringTag = __webpack_require__("92f0");
var uid = __webpack_require__("8b1a");
var wks = __webpack_require__("cc15");
var wksExt = __webpack_require__("fcd4");
var wksDefine = __webpack_require__("e198");
var enumKeys = __webpack_require__("0ae2");
var isArray = __webpack_require__("4ebc");
var anObject = __webpack_require__("77e9");
var isObject = __webpack_require__("7a41");
var toObject = __webpack_require__("0983");
var toIObject = __webpack_require__("6ca1");
var toPrimitive = __webpack_require__("3397");
var createDesc = __webpack_require__("10db");
var _create = __webpack_require__("6f4f");
var gOPNExt = __webpack_require__("1836");
var $GOPD = __webpack_require__("4d20");
var $GOPS = __webpack_require__("fed5");
var $DP = __webpack_require__("1a14");
var $keys = __webpack_require__("9876");
var gOPD = $GOPD.f;
var dP = $DP.f;
var gOPN = gOPNExt.f;
var $Symbol = global.Symbol;
var $JSON = global.JSON;
var _stringify = $JSON && $JSON.stringify;
var PROTOTYPE = 'prototype';
var HIDDEN = wks('_hidden');
var TO_PRIMITIVE = wks('toPrimitive');
var isEnum = {}.propertyIsEnumerable;
var SymbolRegistry = shared('symbol-registry');
var AllSymbols = shared('symbols');
var OPSymbols = shared('op-symbols');
var ObjectProto = Object[PROTOTYPE];
var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f;
var QObject = global.QObject;
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;

// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
var setSymbolDesc = DESCRIPTORS && $fails(function () {
  return _create(dP({}, 'a', {
    get: function () { return dP(this, 'a', { value: 7 }).a; }
  })).a != 7;
}) ? function (it, key, D) {
  var protoDesc = gOPD(ObjectProto, key);
  if (protoDesc) delete ObjectProto[key];
  dP(it, key, D);
  if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
} : dP;

var wrap = function (tag) {
  var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
  sym._k = tag;
  return sym;
};

var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
  return typeof it == 'symbol';
} : function (it) {
  return it instanceof $Symbol;
};

var $defineProperty = function defineProperty(it, key, D) {
  if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
  anObject(it);
  key = toPrimitive(key, true);
  anObject(D);
  if (has(AllSymbols, key)) {
    if (!D.enumerable) {
      if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
      it[HIDDEN][key] = true;
    } else {
      if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
      D = _create(D, { enumerable: createDesc(0, false) });
    } return setSymbolDesc(it, key, D);
  } return dP(it, key, D);
};
var $defineProperties = function defineProperties(it, P) {
  anObject(it);
  var keys = enumKeys(P = toIObject(P));
  var i = 0;
  var l = keys.length;
  var key;
  while (l > i) $defineProperty(it, key = keys[i++], P[key]);
  return it;
};
var $create = function create(it, P) {
  return P === undefined ? _create(it) : $defineProperties(_create(it), P);
};
var $propertyIsEnumerable = function propertyIsEnumerable(key) {
  var E = isEnum.call(this, key = toPrimitive(key, true));
  if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
  return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
};
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
  it = toIObject(it);
  key = toPrimitive(key, true);
  if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
  var D = gOPD(it, key);
  if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
  return D;
};
var $getOwnPropertyNames = function getOwnPropertyNames(it) {
  var names = gOPN(toIObject(it));
  var result = [];
  var i = 0;
  var key;
  while (names.length > i) {
    if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
  } return result;
};
var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
  var IS_OP = it === ObjectProto;
  var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
  var result = [];
  var i = 0;
  var key;
  while (names.length > i) {
    if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
  } return result;
};

// 19.4.1.1 Symbol([description])
if (!USE_NATIVE) {
  $Symbol = function Symbol() {
    if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
    var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
    var $set = function (value) {
      if (this === ObjectProto) $set.call(OPSymbols, value);
      if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
      setSymbolDesc(this, tag, createDesc(1, value));
    };
    if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
    return wrap(tag);
  };
  redefine($Symbol[PROTOTYPE], 'toString', function toString() {
    return this._k;
  });

  $GOPD.f = $getOwnPropertyDescriptor;
  $DP.f = $defineProperty;
  __webpack_require__("6438").f = gOPNExt.f = $getOwnPropertyNames;
  __webpack_require__("1917").f = $propertyIsEnumerable;
  $GOPS.f = $getOwnPropertySymbols;

  if (DESCRIPTORS && !__webpack_require__("e444")) {
    redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
  }

  wksExt.f = function (name) {
    return wrap(wks(name));
  };
}

$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });

for (var es6Symbols = (
  // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
  'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);

for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);

$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
  // 19.4.2.1 Symbol.for(key)
  'for': function (key) {
    return has(SymbolRegistry, key += '')
      ? SymbolRegistry[key]
      : SymbolRegistry[key] = $Symbol(key);
  },
  // 19.4.2.5 Symbol.keyFor(sym)
  keyFor: function keyFor(sym) {
    if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
    for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
  },
  useSetter: function () { setter = true; },
  useSimple: function () { setter = false; }
});

$export($export.S + $export.F * !USE_NATIVE, 'Object', {
  // 19.1.2.2 Object.create(O [, Properties])
  create: $create,
  // 19.1.2.4 Object.defineProperty(O, P, Attributes)
  defineProperty: $defineProperty,
  // 19.1.2.3 Object.defineProperties(O, Properties)
  defineProperties: $defineProperties,
  // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
  getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
  // 19.1.2.7 Object.getOwnPropertyNames(O)
  getOwnPropertyNames: $getOwnPropertyNames,
  // 19.1.2.8 Object.getOwnPropertySymbols(O)
  getOwnPropertySymbols: $getOwnPropertySymbols
});

// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
// https://bugs.chromium.org/p/v8/issues/detail?id=3443
var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); });

$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', {
  getOwnPropertySymbols: function getOwnPropertySymbols(it) {
    return $GOPS.f(toObject(it));
  }
});

// 24.3.2 JSON.stringify(value [, replacer [, space]])
$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
  var S = $Symbol();
  // MS Edge converts symbol values to JSON as {}
  // WebKit converts symbol values to JSON as null
  // V8 throws on boxed symbols
  return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
})), 'JSON', {
  stringify: function stringify(it) {
    var args = [it];
    var i = 1;
    var replacer, $replacer;
    while (arguments.length > i) args.push(arguments[i++]);
    $replacer = replacer = args[1];
    if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
    if (!isArray(replacer)) replacer = function (key, value) {
      if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
      if (!isSymbol(value)) return value;
    };
    args[1] = replacer;
    return _stringify.apply($JSON, args);
  }
});

// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__("051b")($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
// 19.4.3.5 Symbol.prototype[@@toStringTag]
setToStringTag($Symbol, 'Symbol');
// 20.2.1.9 Math[@@toStringTag]
setToStringTag(Math, 'Math', true);
// 24.3.3 JSON[@@toStringTag]
setToStringTag(global.JSON, 'JSON', true);


/***/ }),

/***/ "693d8":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function (mod) {
  "use strict";
  if (true) {// CommonJS
    mod(__webpack_require__("56b3"),
        __webpack_require__("9eb9"),
        __webpack_require__("d5e0"),
        __webpack_require__("f9d4"),
        __webpack_require__("a0bd"),
        __webpack_require__("7b00"),
        __webpack_require__("1b63"),
        __webpack_require__("76d2"),
        __webpack_require__("5bef"),
        __webpack_require__("e1de"));
  } else {}
})(function (CodeMirror) {
  var tagLanguages = {
    script: [
      ["lang", /coffee(script)?/, "coffeescript"],
      ["type", /^(?:text|application)\/(?:x-)?coffee(?:script)?$/, "coffeescript"],
      ["lang", /^babel$/, "javascript"],
      ["type", /^text\/babel$/, "javascript"],
      ["type", /^text\/ecmascript-\d+$/, "javascript"]
    ],
    style: [
      ["lang", /^stylus$/i, "stylus"],
      ["lang", /^sass$/i, "sass"],
      ["lang", /^less$/i, "text/x-less"],
      ["lang", /^scss$/i, "text/x-scss"],
      ["type", /^(text\/)?(x-)?styl(us)?$/i, "stylus"],
      ["type", /^text\/sass/i, "sass"],
      ["type", /^(text\/)?(x-)?scss$/i, "text/x-scss"],
      ["type", /^(text\/)?(x-)?less$/i, "text/x-less"]
    ],
    template: [
      ["lang", /^vue-template$/i, "vue"],
      ["lang", /^pug$/i, "pug"],
      ["lang", /^handlebars$/i, "handlebars"],
      ["type", /^(text\/)?(x-)?pug$/i, "pug"],
      ["type", /^text\/x-handlebars-template$/i, "handlebars"],
      [null, null, "vue-template"]
    ]
  };

  CodeMirror.defineMode("vue-template", function (config, parserConfig) {
    var mustacheOverlay = {
      token: function (stream) {
        if (stream.match(/^\{\{.*?\}\}/)) return "meta mustache";
        while (stream.next() && !stream.match("{{", false)) {}
        return null;
      }
    };
    return CodeMirror.overlayMode(CodeMirror.getMode(config, parserConfig.backdrop || "text/html"), mustacheOverlay);
  });

  CodeMirror.defineMode("vue", function (config) {
    return CodeMirror.getMode(config, {name: "htmlmixed", tags: tagLanguages});
  }, "htmlmixed", "xml", "javascript", "coffeescript", "css", "sass", "stylus", "pug", "handlebars");

  CodeMirror.defineMIME("script/x-vue", "vue");
  CodeMirror.defineMIME("text/x-vue", "vue");
});


/***/ }),

/***/ "69d2":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tree_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("155a");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tree_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tree_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tree_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "69f3":
/***/ (function(module, exports, __webpack_require__) {

var NATIVE_WEAK_MAP = __webpack_require__("7f9a");
var global = __webpack_require__("da84");
var isObject = __webpack_require__("861d");
var createNonEnumerableProperty = __webpack_require__("9112");
var objectHas = __webpack_require__("5135");
var sharedKey = __webpack_require__("f772");
var hiddenKeys = __webpack_require__("d012");

var WeakMap = global.WeakMap;
var set, get, has;

var enforce = function (it) {
  return has(it) ? get(it) : set(it, {});
};

var getterFor = function (TYPE) {
  return function (it) {
    var state;
    if (!isObject(it) || (state = get(it)).type !== TYPE) {
      throw TypeError('Incompatible receiver, ' + TYPE + ' required');
    } return state;
  };
};

if (NATIVE_WEAK_MAP) {
  var store = new WeakMap();
  var wmget = store.get;
  var wmhas = store.has;
  var wmset = store.set;
  set = function (it, metadata) {
    wmset.call(store, it, metadata);
    return metadata;
  };
  get = function (it) {
    return wmget.call(store, it) || {};
  };
  has = function (it) {
    return wmhas.call(store, it);
  };
} else {
  var STATE = sharedKey('state');
  hiddenKeys[STATE] = true;
  set = function (it, metadata) {
    createNonEnumerableProperty(it, STATE, metadata);
    return metadata;
  };
  get = function (it) {
    return objectHas(it, STATE) ? it[STATE] : {};
  };
  has = function (it) {
    return objectHas(it, STATE);
  };
}

module.exports = {
  set: set,
  get: get,
  has: has,
  enforce: enforce,
  getterFor: getterFor
};


/***/ }),

/***/ "6a70":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "6ac9":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("944a");

__webpack_require__("99af");

__webpack_require__("c975");

__webpack_require__("b0c0");

__webpack_require__("0c47");

__webpack_require__("23dc");

__webpack_require__("a9e3");

__webpack_require__("d3b7");

var _typeof = __webpack_require__("7037");

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

  /******/

  /******/
  // Load entry module and return exports

  /******/

  return __webpack_require__(__webpack_require__.s = 74);
  /******/
}(
/************************************************************************/

/******/
{
  /***/
  0:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";
    /* harmony export (binding) */

    __webpack_require__.d(__webpack_exports__, "a", function () {
      return normalizeComponent;
    });
    /* globals __VUE_SSR_CONTEXT__ */
    // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
    // This module is a runtime utility for cleaner component module output and will
    // be included in the final webpack user bundle.


    function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier,
    /* server only */
    shadowMode
    /* vue-cli only */
    ) {
      // Vue.extend constructor export interop
      var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports; // render functions

      if (render) {
        options.render = render;
        options.staticRenderFns = staticRenderFns;
        options._compiled = true;
      } // functional template


      if (functionalTemplate) {
        options.functional = true;
      } // scopedId


      if (scopeId) {
        options._scopeId = 'data-v-' + scopeId;
      }

      var hook;

      if (moduleIdentifier) {
        // server build
        hook = function hook(context) {
          // 2.3 injection
          context = context || // cached call
          this.$vnode && this.$vnode.ssrContext || // stateful
          this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
          // 2.2 with runInNewContext: true

          if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
            context = __VUE_SSR_CONTEXT__;
          } // inject component styles


          if (injectStyles) {
            injectStyles.call(this, context);
          } // register component module identifier for async chunk inferrence


          if (context && context._registeredComponents) {
            context._registeredComponents.add(moduleIdentifier);
          }
        }; // used by ssr in case component is cached and beforeCreate
        // never gets called


        options._ssrRegister = hook;
      } else if (injectStyles) {
        hook = shadowMode ? function () {
          injectStyles.call(this, this.$root.$options.shadowRoot);
        } : injectStyles;
      }

      if (hook) {
        if (options.functional) {
          // for template-only hot-reload because in that case the render fn doesn't
          // go through the normalizer
          options._injectStyles = hook; // register for functioal component in vue file

          var originalRender = options.render;

          options.render = function renderWithStyleInjection(h, context) {
            hook.call(context);
            return originalRender(h, context);
          };
        } else {
          // inject component registration as beforeCreate hook
          var existing = options.beforeCreate;
          options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
        }
      }

      return {
        exports: scriptExports,
        options: options
      };
    }
    /***/

  },

  /***/
  2:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("5924");
    /***/
  },

  /***/
  3:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("8122");
    /***/
  },

  /***/
  5:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("e974");
    /***/
  },

  /***/
  7:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("8bbf");
    /***/
  },

  /***/
  74:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/popover/src/main.vue?vue&type=template&id=52060272&


    var render = function render() {
      var _vm = this;

      var _h = _vm.$createElement;

      var _c = _vm._self._c || _h;

      return _c("span", [_c("transition", {
        attrs: {
          name: _vm.transition
        },
        on: {
          "after-enter": _vm.handleAfterEnter,
          "after-leave": _vm.handleAfterLeave
        }
      }, [_c("div", {
        directives: [{
          name: "show",
          rawName: "v-show",
          value: !_vm.disabled && _vm.showPopper,
          expression: "!disabled && showPopper"
        }],
        ref: "popper",
        staticClass: "el-popover el-popper",
        class: [_vm.popperClass, _vm.content && "el-popover--plain"],
        style: {
          width: _vm.width + "px"
        },
        attrs: {
          role: "tooltip",
          id: _vm.tooltipId,
          "aria-hidden": _vm.disabled || !_vm.showPopper ? "true" : "false"
        }
      }, [_vm.title ? _c("div", {
        staticClass: "el-popover__title",
        domProps: {
          textContent: _vm._s(_vm.title)
        }
      }) : _vm._e(), _vm._t("default", [_vm._v(_vm._s(_vm.content))])], 2)]), _vm._t("reference")], 2);
    };

    var staticRenderFns = [];
    render._withStripped = true; // CONCATENATED MODULE: ./packages/popover/src/main.vue?vue&type=template&id=52060272&
    // EXTERNAL MODULE: external "element-ui/lib/utils/vue-popper"

    var vue_popper_ = __webpack_require__(5);

    var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_); // EXTERNAL MODULE: external "element-ui/lib/utils/dom"


    var dom_ = __webpack_require__(2); // EXTERNAL MODULE: external "element-ui/lib/utils/util"


    var util_ = __webpack_require__(3); // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/popover/src/main.vue?vue&type=script&lang=js&
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //

    /* harmony default export */


    var mainvue_type_script_lang_js_ = {
      name: 'ElPopover',
      mixins: [vue_popper_default.a],
      props: {
        trigger: {
          type: String,
          default: 'click',
          validator: function validator(value) {
            return ['click', 'focus', 'hover', 'manual'].indexOf(value) > -1;
          }
        },
        openDelay: {
          type: Number,
          default: 0
        },
        closeDelay: {
          type: Number,
          default: 200
        },
        title: String,
        disabled: Boolean,
        content: String,
        reference: {},
        popperClass: String,
        width: {},
        visibleArrow: {
          default: true
        },
        arrowOffset: {
          type: Number,
          default: 0
        },
        transition: {
          type: String,
          default: 'fade-in-linear'
        },
        tabindex: {
          type: Number,
          default: 0
        }
      },
      computed: {
        tooltipId: function tooltipId() {
          return 'el-popover-' + Object(util_["generateId"])();
        }
      },
      watch: {
        showPopper: function showPopper(val) {
          if (this.disabled) {
            return;
          }

          val ? this.$emit('show') : this.$emit('hide');
        }
      },
      mounted: function mounted() {
        var _this = this;

        var reference = this.referenceElm = this.reference || this.$refs.reference;
        var popper = this.popper || this.$refs.popper;

        if (!reference && this.$slots.reference && this.$slots.reference[0]) {
          reference = this.referenceElm = this.$slots.reference[0].elm;
        } // 可访问性


        if (reference) {
          Object(dom_["addClass"])(reference, 'el-popover__reference');
          reference.setAttribute('aria-describedby', this.tooltipId);
          reference.setAttribute('tabindex', this.tabindex); // tab序列

          popper.setAttribute('tabindex', 0);

          if (this.trigger !== 'click') {
            Object(dom_["on"])(reference, 'focusin', function () {
              _this.handleFocus();

              var instance = reference.__vue__;

              if (instance && typeof instance.focus === 'function') {
                instance.focus();
              }
            });
            Object(dom_["on"])(popper, 'focusin', this.handleFocus);
            Object(dom_["on"])(reference, 'focusout', this.handleBlur);
            Object(dom_["on"])(popper, 'focusout', this.handleBlur);
          }

          Object(dom_["on"])(reference, 'keydown', this.handleKeydown);
          Object(dom_["on"])(reference, 'click', this.handleClick);
        }

        if (this.trigger === 'click') {
          Object(dom_["on"])(reference, 'click', this.doToggle);
          Object(dom_["on"])(document, 'click', this.handleDocumentClick);
        } else if (this.trigger === 'hover') {
          Object(dom_["on"])(reference, 'mouseenter', this.handleMouseEnter);
          Object(dom_["on"])(popper, 'mouseenter', this.handleMouseEnter);
          Object(dom_["on"])(reference, 'mouseleave', this.handleMouseLeave);
          Object(dom_["on"])(popper, 'mouseleave', this.handleMouseLeave);
        } else if (this.trigger === 'focus') {
          if (this.tabindex < 0) {
            console.warn('[Element Warn][Popover]a negative taindex means that the element cannot be focused by tab key');
          }

          if (reference.querySelector('input, textarea')) {
            Object(dom_["on"])(reference, 'focusin', this.doShow);
            Object(dom_["on"])(reference, 'focusout', this.doClose);
          } else {
            Object(dom_["on"])(reference, 'mousedown', this.doShow);
            Object(dom_["on"])(reference, 'mouseup', this.doClose);
          }
        }
      },
      beforeDestroy: function beforeDestroy() {
        this.cleanup();
      },
      deactivated: function deactivated() {
        this.cleanup();
      },
      methods: {
        doToggle: function doToggle() {
          this.showPopper = !this.showPopper;
        },
        doShow: function doShow() {
          this.showPopper = true;
        },
        doClose: function doClose() {
          this.showPopper = false;
        },
        handleFocus: function handleFocus() {
          Object(dom_["addClass"])(this.referenceElm, 'focusing');
          if (this.trigger === 'click' || this.trigger === 'focus') this.showPopper = true;
        },
        handleClick: function handleClick() {
          Object(dom_["removeClass"])(this.referenceElm, 'focusing');
        },
        handleBlur: function handleBlur() {
          Object(dom_["removeClass"])(this.referenceElm, 'focusing');
          if (this.trigger === 'click' || this.trigger === 'focus') this.showPopper = false;
        },
        handleMouseEnter: function handleMouseEnter() {
          var _this2 = this;

          clearTimeout(this._timer);

          if (this.openDelay) {
            this._timer = setTimeout(function () {
              _this2.showPopper = true;
            }, this.openDelay);
          } else {
            this.showPopper = true;
          }
        },
        handleKeydown: function handleKeydown(ev) {
          if (ev.keyCode === 27 && this.trigger !== 'manual') {
            // esc
            this.doClose();
          }
        },
        handleMouseLeave: function handleMouseLeave() {
          var _this3 = this;

          clearTimeout(this._timer);

          if (this.closeDelay) {
            this._timer = setTimeout(function () {
              _this3.showPopper = false;
            }, this.closeDelay);
          } else {
            this.showPopper = false;
          }
        },
        handleDocumentClick: function handleDocumentClick(e) {
          var reference = this.reference || this.$refs.reference;
          var popper = this.popper || this.$refs.popper;

          if (!reference && this.$slots.reference && this.$slots.reference[0]) {
            reference = this.referenceElm = this.$slots.reference[0].elm;
          }

          if (!this.$el || !reference || this.$el.contains(e.target) || reference.contains(e.target) || !popper || popper.contains(e.target)) return;
          this.showPopper = false;
        },
        handleAfterEnter: function handleAfterEnter() {
          this.$emit('after-enter');
        },
        handleAfterLeave: function handleAfterLeave() {
          this.$emit('after-leave');
          this.doDestroy();
        },
        cleanup: function cleanup() {
          if (this.openDelay || this.closeDelay) {
            clearTimeout(this._timer);
          }
        }
      },
      destroyed: function destroyed() {
        var reference = this.reference;
        Object(dom_["off"])(reference, 'click', this.doToggle);
        Object(dom_["off"])(reference, 'mouseup', this.doClose);
        Object(dom_["off"])(reference, 'mousedown', this.doShow);
        Object(dom_["off"])(reference, 'focusin', this.doShow);
        Object(dom_["off"])(reference, 'focusout', this.doClose);
        Object(dom_["off"])(reference, 'mousedown', this.doShow);
        Object(dom_["off"])(reference, 'mouseup', this.doClose);
        Object(dom_["off"])(reference, 'mouseleave', this.handleMouseLeave);
        Object(dom_["off"])(reference, 'mouseenter', this.handleMouseEnter);
        Object(dom_["off"])(document, 'click', this.handleDocumentClick);
      }
    }; // CONCATENATED MODULE: ./packages/popover/src/main.vue?vue&type=script&lang=js&

    /* harmony default export */

    var src_mainvue_type_script_lang_js_ = mainvue_type_script_lang_js_; // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js

    var componentNormalizer = __webpack_require__(0); // CONCATENATED MODULE: ./packages/popover/src/main.vue

    /* normalize component */


    var component = Object(componentNormalizer["a"
    /* default */
    ])(src_mainvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null);
    /* hot reload */

    if (false) { var api; }

    component.options.__file = "packages/popover/src/main.vue";
    /* harmony default export */

    var main = component.exports; // CONCATENATED MODULE: ./packages/popover/src/directive.js

    var getReference = function getReference(el, binding, vnode) {
      var _ref = binding.expression ? binding.value : binding.arg;

      var popper = vnode.context.$refs[_ref];

      if (popper) {
        if (Array.isArray(popper)) {
          popper[0].$refs.reference = el;
        } else {
          popper.$refs.reference = el;
        }
      }
    };
    /* harmony default export */


    var directive = {
      bind: function bind(el, binding, vnode) {
        getReference(el, binding, vnode);
      },
      inserted: function inserted(el, binding, vnode) {
        getReference(el, binding, vnode);
      }
    }; // EXTERNAL MODULE: external "vue"

    var external_vue_ = __webpack_require__(7);

    var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_); // CONCATENATED MODULE: ./packages/popover/index.js


    external_vue_default.a.directive('popover', directive);
    /* istanbul ignore next */

    main.install = function (Vue) {
      Vue.directive('popover', directive);
      Vue.component(main.name, main);
    };

    main.directive = directive;
    /* harmony default export */

    var popover = __webpack_exports__["default"] = main;
    /***/
  }
  /******/

});

/***/ }),

/***/ "6b03":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_select_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("efed");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_select_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_select_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_select_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "6b4b":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_code_helper_vue_vue_type_style_index_1_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0b40");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_code_helper_vue_vue_type_style_index_1_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_code_helper_vue_vue_type_style_index_1_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_code_helper_vue_vue_type_style_index_1_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "6b75":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
function _arrayLikeToArray(arr, len) {
  if (len == null || len > arr.length) len = arr.length;

  for (var i = 0, arr2 = new Array(len); i < len; i++) {
    arr2[i] = arr[i];
  }

  return arr2;
}

/***/ }),

/***/ "6b7c":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _locale = __webpack_require__("4897");

exports.default = {
  methods: {
    t: function t() {
      for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }

      return _locale.t.apply(this, args);
    }
  }
};

/***/ }),

/***/ "6bc3":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_dialog_vue_vue_type_style_index_0_id_a8aa50ee_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0204");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_dialog_vue_vue_type_style_index_0_id_a8aa50ee_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_dialog_vue_vue_type_style_index_0_id_a8aa50ee_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_dialog_vue_vue_type_style_index_0_id_a8aa50ee_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "6ca1":
/***/ (function(module, exports, __webpack_require__) {

// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = __webpack_require__("9fbb");
var defined = __webpack_require__("c901");
module.exports = function (it) {
  return IObject(defined(it));
};


/***/ }),

/***/ "6d78":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"));
  else {}
})(function(CodeMirror) {
  "use strict";

  CodeMirror.defineOption("fullScreen", false, function(cm, val, old) {
    if (old == CodeMirror.Init) old = false;
    if (!old == !val) return;
    if (val) setFullscreen(cm);
    else setNormal(cm);
  });

  function setFullscreen(cm) {
    var wrap = cm.getWrapperElement();
    cm.state.fullScreenRestore = {scrollTop: window.pageYOffset, scrollLeft: window.pageXOffset,
                                  width: wrap.style.width, height: wrap.style.height};
    wrap.style.width = "";
    wrap.style.height = "auto";
    wrap.className += " CodeMirror-fullscreen";
    document.documentElement.style.overflow = "hidden";
    cm.refresh();
  }

  function setNormal(cm) {
    var wrap = cm.getWrapperElement();
    wrap.className = wrap.className.replace(/\s*CodeMirror-fullscreen\b/, "");
    document.documentElement.style.overflow = "";
    var info = cm.state.fullScreenRestore;
    wrap.style.width = info.width; wrap.style.height = info.height;
    window.scrollTo(info.scrollLeft, info.scrollTop);
    cm.refresh();
  }
});


/***/ }),

/***/ "6dd8":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* WEBPACK VAR INJECTION */(function(global) {/**
 * A collection of shims that provide minimal functionality of the ES6 collections.
 *
 * These implementations are not meant to be used outside of the ResizeObserver
 * modules as they cover only a limited range of use cases.
 */
/* eslint-disable require-jsdoc, valid-jsdoc */
var MapShim = (function () {
    if (typeof Map !== 'undefined') {
        return Map;
    }
    /**
     * Returns index in provided array that matches the specified key.
     *
     * @param {Array<Array>} arr
     * @param {*} key
     * @returns {number}
     */
    function getIndex(arr, key) {
        var result = -1;
        arr.some(function (entry, index) {
            if (entry[0] === key) {
                result = index;
                return true;
            }
            return false;
        });
        return result;
    }
    return /** @class */ (function () {
        function class_1() {
            this.__entries__ = [];
        }
        Object.defineProperty(class_1.prototype, "size", {
            /**
             * @returns {boolean}
             */
            get: function () {
                return this.__entries__.length;
            },
            enumerable: true,
            configurable: true
        });
        /**
         * @param {*} key
         * @returns {*}
         */
        class_1.prototype.get = function (key) {
            var index = getIndex(this.__entries__, key);
            var entry = this.__entries__[index];
            return entry && entry[1];
        };
        /**
         * @param {*} key
         * @param {*} value
         * @returns {void}
         */
        class_1.prototype.set = function (key, value) {
            var index = getIndex(this.__entries__, key);
            if (~index) {
                this.__entries__[index][1] = value;
            }
            else {
                this.__entries__.push([key, value]);
            }
        };
        /**
         * @param {*} key
         * @returns {void}
         */
        class_1.prototype.delete = function (key) {
            var entries = this.__entries__;
            var index = getIndex(entries, key);
            if (~index) {
                entries.splice(index, 1);
            }
        };
        /**
         * @param {*} key
         * @returns {void}
         */
        class_1.prototype.has = function (key) {
            return !!~getIndex(this.__entries__, key);
        };
        /**
         * @returns {void}
         */
        class_1.prototype.clear = function () {
            this.__entries__.splice(0);
        };
        /**
         * @param {Function} callback
         * @param {*} [ctx=null]
         * @returns {void}
         */
        class_1.prototype.forEach = function (callback, ctx) {
            if (ctx === void 0) { ctx = null; }
            for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
                var entry = _a[_i];
                callback.call(ctx, entry[1], entry[0]);
            }
        };
        return class_1;
    }());
})();

/**
 * Detects whether window and document objects are available in current environment.
 */
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;

// Returns global object of a current environment.
var global$1 = (function () {
    if (typeof global !== 'undefined' && global.Math === Math) {
        return global;
    }
    if (typeof self !== 'undefined' && self.Math === Math) {
        return self;
    }
    if (typeof window !== 'undefined' && window.Math === Math) {
        return window;
    }
    // eslint-disable-next-line no-new-func
    return Function('return this')();
})();

/**
 * A shim for the requestAnimationFrame which falls back to the setTimeout if
 * first one is not supported.
 *
 * @returns {number} Requests' identifier.
 */
var requestAnimationFrame$1 = (function () {
    if (typeof requestAnimationFrame === 'function') {
        // It's required to use a bounded function because IE sometimes throws
        // an "Invalid calling object" error if rAF is invoked without the global
        // object on the left hand side.
        return requestAnimationFrame.bind(global$1);
    }
    return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
})();

// Defines minimum timeout before adding a trailing call.
var trailingTimeout = 2;
/**
 * Creates a wrapper function which ensures that provided callback will be
 * invoked only once during the specified delay period.
 *
 * @param {Function} callback - Function to be invoked after the delay period.
 * @param {number} delay - Delay after which to invoke callback.
 * @returns {Function}
 */
function throttle (callback, delay) {
    var leadingCall = false, trailingCall = false, lastCallTime = 0;
    /**
     * Invokes the original callback function and schedules new invocation if
     * the "proxy" was called during current request.
     *
     * @returns {void}
     */
    function resolvePending() {
        if (leadingCall) {
            leadingCall = false;
            callback();
        }
        if (trailingCall) {
            proxy();
        }
    }
    /**
     * Callback invoked after the specified delay. It will further postpone
     * invocation of the original function delegating it to the
     * requestAnimationFrame.
     *
     * @returns {void}
     */
    function timeoutCallback() {
        requestAnimationFrame$1(resolvePending);
    }
    /**
     * Schedules invocation of the original function.
     *
     * @returns {void}
     */
    function proxy() {
        var timeStamp = Date.now();
        if (leadingCall) {
            // Reject immediately following calls.
            if (timeStamp - lastCallTime < trailingTimeout) {
                return;
            }
            // Schedule new call to be in invoked when the pending one is resolved.
            // This is important for "transitions" which never actually start
            // immediately so there is a chance that we might miss one if change
            // happens amids the pending invocation.
            trailingCall = true;
        }
        else {
            leadingCall = true;
            trailingCall = false;
            setTimeout(timeoutCallback, delay);
        }
        lastCallTime = timeStamp;
    }
    return proxy;
}

// Minimum delay before invoking the update of observers.
var REFRESH_DELAY = 20;
// A list of substrings of CSS properties used to find transition events that
// might affect dimensions of observed elements.
var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
// Check if MutationObserver is available.
var mutationObserverSupported = typeof MutationObserver !== 'undefined';
/**
 * Singleton controller class which handles updates of ResizeObserver instances.
 */
var ResizeObserverController = /** @class */ (function () {
    /**
     * Creates a new instance of ResizeObserverController.
     *
     * @private
     */
    function ResizeObserverController() {
        /**
         * Indicates whether DOM listeners have been added.
         *
         * @private {boolean}
         */
        this.connected_ = false;
        /**
         * Tells that controller has subscribed for Mutation Events.
         *
         * @private {boolean}
         */
        this.mutationEventsAdded_ = false;
        /**
         * Keeps reference to the instance of MutationObserver.
         *
         * @private {MutationObserver}
         */
        this.mutationsObserver_ = null;
        /**
         * A list of connected observers.
         *
         * @private {Array<ResizeObserverSPI>}
         */
        this.observers_ = [];
        this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
        this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
    }
    /**
     * Adds observer to observers list.
     *
     * @param {ResizeObserverSPI} observer - Observer to be added.
     * @returns {void}
     */
    ResizeObserverController.prototype.addObserver = function (observer) {
        if (!~this.observers_.indexOf(observer)) {
            this.observers_.push(observer);
        }
        // Add listeners if they haven't been added yet.
        if (!this.connected_) {
            this.connect_();
        }
    };
    /**
     * Removes observer from observers list.
     *
     * @param {ResizeObserverSPI} observer - Observer to be removed.
     * @returns {void}
     */
    ResizeObserverController.prototype.removeObserver = function (observer) {
        var observers = this.observers_;
        var index = observers.indexOf(observer);
        // Remove observer if it's present in registry.
        if (~index) {
            observers.splice(index, 1);
        }
        // Remove listeners if controller has no connected observers.
        if (!observers.length && this.connected_) {
            this.disconnect_();
        }
    };
    /**
     * Invokes the update of observers. It will continue running updates insofar
     * it detects changes.
     *
     * @returns {void}
     */
    ResizeObserverController.prototype.refresh = function () {
        var changesDetected = this.updateObservers_();
        // Continue running updates if changes have been detected as there might
        // be future ones caused by CSS transitions.
        if (changesDetected) {
            this.refresh();
        }
    };
    /**
     * Updates every observer from observers list and notifies them of queued
     * entries.
     *
     * @private
     * @returns {boolean} Returns "true" if any observer has detected changes in
     *      dimensions of it's elements.
     */
    ResizeObserverController.prototype.updateObservers_ = function () {
        // Collect observers that have active observations.
        var activeObservers = this.observers_.filter(function (observer) {
            return observer.gatherActive(), observer.hasActive();
        });
        // Deliver notifications in a separate cycle in order to avoid any
        // collisions between observers, e.g. when multiple instances of
        // ResizeObserver are tracking the same element and the callback of one
        // of them changes content dimensions of the observed target. Sometimes
        // this may result in notifications being blocked for the rest of observers.
        activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
        return activeObservers.length > 0;
    };
    /**
     * Initializes DOM listeners.
     *
     * @private
     * @returns {void}
     */
    ResizeObserverController.prototype.connect_ = function () {
        // Do nothing if running in a non-browser environment or if listeners
        // have been already added.
        if (!isBrowser || this.connected_) {
            return;
        }
        // Subscription to the "Transitionend" event is used as a workaround for
        // delayed transitions. This way it's possible to capture at least the
        // final state of an element.
        document.addEventListener('transitionend', this.onTransitionEnd_);
        window.addEventListener('resize', this.refresh);
        if (mutationObserverSupported) {
            this.mutationsObserver_ = new MutationObserver(this.refresh);
            this.mutationsObserver_.observe(document, {
                attributes: true,
                childList: true,
                characterData: true,
                subtree: true
            });
        }
        else {
            document.addEventListener('DOMSubtreeModified', this.refresh);
            this.mutationEventsAdded_ = true;
        }
        this.connected_ = true;
    };
    /**
     * Removes DOM listeners.
     *
     * @private
     * @returns {void}
     */
    ResizeObserverController.prototype.disconnect_ = function () {
        // Do nothing if running in a non-browser environment or if listeners
        // have been already removed.
        if (!isBrowser || !this.connected_) {
            return;
        }
        document.removeEventListener('transitionend', this.onTransitionEnd_);
        window.removeEventListener('resize', this.refresh);
        if (this.mutationsObserver_) {
            this.mutationsObserver_.disconnect();
        }
        if (this.mutationEventsAdded_) {
            document.removeEventListener('DOMSubtreeModified', this.refresh);
        }
        this.mutationsObserver_ = null;
        this.mutationEventsAdded_ = false;
        this.connected_ = false;
    };
    /**
     * "Transitionend" event handler.
     *
     * @private
     * @param {TransitionEvent} event
     * @returns {void}
     */
    ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
        var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
        // Detect whether transition may affect dimensions of an element.
        var isReflowProperty = transitionKeys.some(function (key) {
            return !!~propertyName.indexOf(key);
        });
        if (isReflowProperty) {
            this.refresh();
        }
    };
    /**
     * Returns instance of the ResizeObserverController.
     *
     * @returns {ResizeObserverController}
     */
    ResizeObserverController.getInstance = function () {
        if (!this.instance_) {
            this.instance_ = new ResizeObserverController();
        }
        return this.instance_;
    };
    /**
     * Holds reference to the controller's instance.
     *
     * @private {ResizeObserverController}
     */
    ResizeObserverController.instance_ = null;
    return ResizeObserverController;
}());

/**
 * Defines non-writable/enumerable properties of the provided target object.
 *
 * @param {Object} target - Object for which to define properties.
 * @param {Object} props - Properties to be defined.
 * @returns {Object} Target object.
 */
var defineConfigurable = (function (target, props) {
    for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
        var key = _a[_i];
        Object.defineProperty(target, key, {
            value: props[key],
            enumerable: false,
            writable: false,
            configurable: true
        });
    }
    return target;
});

/**
 * Returns the global object associated with provided element.
 *
 * @param {Object} target
 * @returns {Object}
 */
var getWindowOf = (function (target) {
    // Assume that the element is an instance of Node, which means that it
    // has the "ownerDocument" property from which we can retrieve a
    // corresponding global object.
    var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
    // Return the local global object if it's not possible extract one from
    // provided element.
    return ownerGlobal || global$1;
});

// Placeholder of an empty content rectangle.
var emptyRect = createRectInit(0, 0, 0, 0);
/**
 * Converts provided string to a number.
 *
 * @param {number|string} value
 * @returns {number}
 */
function toFloat(value) {
    return parseFloat(value) || 0;
}
/**
 * Extracts borders size from provided styles.
 *
 * @param {CSSStyleDeclaration} styles
 * @param {...string} positions - Borders positions (top, right, ...)
 * @returns {number}
 */
function getBordersSize(styles) {
    var positions = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        positions[_i - 1] = arguments[_i];
    }
    return positions.reduce(function (size, position) {
        var value = styles['border-' + position + '-width'];
        return size + toFloat(value);
    }, 0);
}
/**
 * Extracts paddings sizes from provided styles.
 *
 * @param {CSSStyleDeclaration} styles
 * @returns {Object} Paddings box.
 */
function getPaddings(styles) {
    var positions = ['top', 'right', 'bottom', 'left'];
    var paddings = {};
    for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
        var position = positions_1[_i];
        var value = styles['padding-' + position];
        paddings[position] = toFloat(value);
    }
    return paddings;
}
/**
 * Calculates content rectangle of provided SVG element.
 *
 * @param {SVGGraphicsElement} target - Element content rectangle of which needs
 *      to be calculated.
 * @returns {DOMRectInit}
 */
function getSVGContentRect(target) {
    var bbox = target.getBBox();
    return createRectInit(0, 0, bbox.width, bbox.height);
}
/**
 * Calculates content rectangle of provided HTMLElement.
 *
 * @param {HTMLElement} target - Element for which to calculate the content rectangle.
 * @returns {DOMRectInit}
 */
function getHTMLElementContentRect(target) {
    // Client width & height properties can't be
    // used exclusively as they provide rounded values.
    var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
    // By this condition we can catch all non-replaced inline, hidden and
    // detached elements. Though elements with width & height properties less
    // than 0.5 will be discarded as well.
    //
    // Without it we would need to implement separate methods for each of
    // those cases and it's not possible to perform a precise and performance
    // effective test for hidden elements. E.g. even jQuery's ':visible' filter
    // gives wrong results for elements with width & height less than 0.5.
    if (!clientWidth && !clientHeight) {
        return emptyRect;
    }
    var styles = getWindowOf(target).getComputedStyle(target);
    var paddings = getPaddings(styles);
    var horizPad = paddings.left + paddings.right;
    var vertPad = paddings.top + paddings.bottom;
    // Computed styles of width & height are being used because they are the
    // only dimensions available to JS that contain non-rounded values. It could
    // be possible to utilize the getBoundingClientRect if only it's data wasn't
    // affected by CSS transformations let alone paddings, borders and scroll bars.
    var width = toFloat(styles.width), height = toFloat(styles.height);
    // Width & height include paddings and borders when the 'border-box' box
    // model is applied (except for IE).
    if (styles.boxSizing === 'border-box') {
        // Following conditions are required to handle Internet Explorer which
        // doesn't include paddings and borders to computed CSS dimensions.
        //
        // We can say that if CSS dimensions + paddings are equal to the "client"
        // properties then it's either IE, and thus we don't need to subtract
        // anything, or an element merely doesn't have paddings/borders styles.
        if (Math.round(width + horizPad) !== clientWidth) {
            width -= getBordersSize(styles, 'left', 'right') + horizPad;
        }
        if (Math.round(height + vertPad) !== clientHeight) {
            height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
        }
    }
    // Following steps can't be applied to the document's root element as its
    // client[Width/Height] properties represent viewport area of the window.
    // Besides, it's as well not necessary as the <html> itself neither has
    // rendered scroll bars nor it can be clipped.
    if (!isDocumentElement(target)) {
        // In some browsers (only in Firefox, actually) CSS width & height
        // include scroll bars size which can be removed at this step as scroll
        // bars are the only difference between rounded dimensions + paddings
        // and "client" properties, though that is not always true in Chrome.
        var vertScrollbar = Math.round(width + horizPad) - clientWidth;
        var horizScrollbar = Math.round(height + vertPad) - clientHeight;
        // Chrome has a rather weird rounding of "client" properties.
        // E.g. for an element with content width of 314.2px it sometimes gives
        // the client width of 315px and for the width of 314.7px it may give
        // 314px. And it doesn't happen all the time. So just ignore this delta
        // as a non-relevant.
        if (Math.abs(vertScrollbar) !== 1) {
            width -= vertScrollbar;
        }
        if (Math.abs(horizScrollbar) !== 1) {
            height -= horizScrollbar;
        }
    }
    return createRectInit(paddings.left, paddings.top, width, height);
}
/**
 * Checks whether provided element is an instance of the SVGGraphicsElement.
 *
 * @param {Element} target - Element to be checked.
 * @returns {boolean}
 */
var isSVGGraphicsElement = (function () {
    // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
    // interface.
    if (typeof SVGGraphicsElement !== 'undefined') {
        return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
    }
    // If it's so, then check that element is at least an instance of the
    // SVGElement and that it has the "getBBox" method.
    // eslint-disable-next-line no-extra-parens
    return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
        typeof target.getBBox === 'function'); };
})();
/**
 * Checks whether provided element is a document element (<html>).
 *
 * @param {Element} target - Element to be checked.
 * @returns {boolean}
 */
function isDocumentElement(target) {
    return target === getWindowOf(target).document.documentElement;
}
/**
 * Calculates an appropriate content rectangle for provided html or svg element.
 *
 * @param {Element} target - Element content rectangle of which needs to be calculated.
 * @returns {DOMRectInit}
 */
function getContentRect(target) {
    if (!isBrowser) {
        return emptyRect;
    }
    if (isSVGGraphicsElement(target)) {
        return getSVGContentRect(target);
    }
    return getHTMLElementContentRect(target);
}
/**
 * Creates rectangle with an interface of the DOMRectReadOnly.
 * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
 *
 * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
 * @returns {DOMRectReadOnly}
 */
function createReadOnlyRect(_a) {
    var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
    // If DOMRectReadOnly is available use it as a prototype for the rectangle.
    var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
    var rect = Object.create(Constr.prototype);
    // Rectangle's properties are not writable and non-enumerable.
    defineConfigurable(rect, {
        x: x, y: y, width: width, height: height,
        top: y,
        right: x + width,
        bottom: height + y,
        left: x
    });
    return rect;
}
/**
 * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
 * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
 *
 * @param {number} x - X coordinate.
 * @param {number} y - Y coordinate.
 * @param {number} width - Rectangle's width.
 * @param {number} height - Rectangle's height.
 * @returns {DOMRectInit}
 */
function createRectInit(x, y, width, height) {
    return { x: x, y: y, width: width, height: height };
}

/**
 * Class that is responsible for computations of the content rectangle of
 * provided DOM element and for keeping track of it's changes.
 */
var ResizeObservation = /** @class */ (function () {
    /**
     * Creates an instance of ResizeObservation.
     *
     * @param {Element} target - Element to be observed.
     */
    function ResizeObservation(target) {
        /**
         * Broadcasted width of content rectangle.
         *
         * @type {number}
         */
        this.broadcastWidth = 0;
        /**
         * Broadcasted height of content rectangle.
         *
         * @type {number}
         */
        this.broadcastHeight = 0;
        /**
         * Reference to the last observed content rectangle.
         *
         * @private {DOMRectInit}
         */
        this.contentRect_ = createRectInit(0, 0, 0, 0);
        this.target = target;
    }
    /**
     * Updates content rectangle and tells whether it's width or height properties
     * have changed since the last broadcast.
     *
     * @returns {boolean}
     */
    ResizeObservation.prototype.isActive = function () {
        var rect = getContentRect(this.target);
        this.contentRect_ = rect;
        return (rect.width !== this.broadcastWidth ||
            rect.height !== this.broadcastHeight);
    };
    /**
     * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
     * from the corresponding properties of the last observed content rectangle.
     *
     * @returns {DOMRectInit} Last observed content rectangle.
     */
    ResizeObservation.prototype.broadcastRect = function () {
        var rect = this.contentRect_;
        this.broadcastWidth = rect.width;
        this.broadcastHeight = rect.height;
        return rect;
    };
    return ResizeObservation;
}());

var ResizeObserverEntry = /** @class */ (function () {
    /**
     * Creates an instance of ResizeObserverEntry.
     *
     * @param {Element} target - Element that is being observed.
     * @param {DOMRectInit} rectInit - Data of the element's content rectangle.
     */
    function ResizeObserverEntry(target, rectInit) {
        var contentRect = createReadOnlyRect(rectInit);
        // According to the specification following properties are not writable
        // and are also not enumerable in the native implementation.
        //
        // Property accessors are not being used as they'd require to define a
        // private WeakMap storage which may cause memory leaks in browsers that
        // don't support this type of collections.
        defineConfigurable(this, { target: target, contentRect: contentRect });
    }
    return ResizeObserverEntry;
}());

var ResizeObserverSPI = /** @class */ (function () {
    /**
     * Creates a new instance of ResizeObserver.
     *
     * @param {ResizeObserverCallback} callback - Callback function that is invoked
     *      when one of the observed elements changes it's content dimensions.
     * @param {ResizeObserverController} controller - Controller instance which
     *      is responsible for the updates of observer.
     * @param {ResizeObserver} callbackCtx - Reference to the public
     *      ResizeObserver instance which will be passed to callback function.
     */
    function ResizeObserverSPI(callback, controller, callbackCtx) {
        /**
         * Collection of resize observations that have detected changes in dimensions
         * of elements.
         *
         * @private {Array<ResizeObservation>}
         */
        this.activeObservations_ = [];
        /**
         * Registry of the ResizeObservation instances.
         *
         * @private {Map<Element, ResizeObservation>}
         */
        this.observations_ = new MapShim();
        if (typeof callback !== 'function') {
            throw new TypeError('The callback provided as parameter 1 is not a function.');
        }
        this.callback_ = callback;
        this.controller_ = controller;
        this.callbackCtx_ = callbackCtx;
    }
    /**
     * Starts observing provided element.
     *
     * @param {Element} target - Element to be observed.
     * @returns {void}
     */
    ResizeObserverSPI.prototype.observe = function (target) {
        if (!arguments.length) {
            throw new TypeError('1 argument required, but only 0 present.');
        }
        // Do nothing if current environment doesn't have the Element interface.
        if (typeof Element === 'undefined' || !(Element instanceof Object)) {
            return;
        }
        if (!(target instanceof getWindowOf(target).Element)) {
            throw new TypeError('parameter 1 is not of type "Element".');
        }
        var observations = this.observations_;
        // Do nothing if element is already being observed.
        if (observations.has(target)) {
            return;
        }
        observations.set(target, new ResizeObservation(target));
        this.controller_.addObserver(this);
        // Force the update of observations.
        this.controller_.refresh();
    };
    /**
     * Stops observing provided element.
     *
     * @param {Element} target - Element to stop observing.
     * @returns {void}
     */
    ResizeObserverSPI.prototype.unobserve = function (target) {
        if (!arguments.length) {
            throw new TypeError('1 argument required, but only 0 present.');
        }
        // Do nothing if current environment doesn't have the Element interface.
        if (typeof Element === 'undefined' || !(Element instanceof Object)) {
            return;
        }
        if (!(target instanceof getWindowOf(target).Element)) {
            throw new TypeError('parameter 1 is not of type "Element".');
        }
        var observations = this.observations_;
        // Do nothing if element is not being observed.
        if (!observations.has(target)) {
            return;
        }
        observations.delete(target);
        if (!observations.size) {
            this.controller_.removeObserver(this);
        }
    };
    /**
     * Stops observing all elements.
     *
     * @returns {void}
     */
    ResizeObserverSPI.prototype.disconnect = function () {
        this.clearActive();
        this.observations_.clear();
        this.controller_.removeObserver(this);
    };
    /**
     * Collects observation instances the associated element of which has changed
     * it's content rectangle.
     *
     * @returns {void}
     */
    ResizeObserverSPI.prototype.gatherActive = function () {
        var _this = this;
        this.clearActive();
        this.observations_.forEach(function (observation) {
            if (observation.isActive()) {
                _this.activeObservations_.push(observation);
            }
        });
    };
    /**
     * Invokes initial callback function with a list of ResizeObserverEntry
     * instances collected from active resize observations.
     *
     * @returns {void}
     */
    ResizeObserverSPI.prototype.broadcastActive = function () {
        // Do nothing if observer doesn't have active observations.
        if (!this.hasActive()) {
            return;
        }
        var ctx = this.callbackCtx_;
        // Create ResizeObserverEntry instance for every active observation.
        var entries = this.activeObservations_.map(function (observation) {
            return new ResizeObserverEntry(observation.target, observation.broadcastRect());
        });
        this.callback_.call(ctx, entries, ctx);
        this.clearActive();
    };
    /**
     * Clears the collection of active observations.
     *
     * @returns {void}
     */
    ResizeObserverSPI.prototype.clearActive = function () {
        this.activeObservations_.splice(0);
    };
    /**
     * Tells whether observer has active observations.
     *
     * @returns {boolean}
     */
    ResizeObserverSPI.prototype.hasActive = function () {
        return this.activeObservations_.length > 0;
    };
    return ResizeObserverSPI;
}());

// Registry of internal observers. If WeakMap is not available use current shim
// for the Map collection as it has all required methods and because WeakMap
// can't be fully polyfilled anyway.
var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
/**
 * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
 * exposing only those methods and properties that are defined in the spec.
 */
var ResizeObserver = /** @class */ (function () {
    /**
     * Creates a new instance of ResizeObserver.
     *
     * @param {ResizeObserverCallback} callback - Callback that is invoked when
     *      dimensions of the observed elements change.
     */
    function ResizeObserver(callback) {
        if (!(this instanceof ResizeObserver)) {
            throw new TypeError('Cannot call a class as a function.');
        }
        if (!arguments.length) {
            throw new TypeError('1 argument required, but only 0 present.');
        }
        var controller = ResizeObserverController.getInstance();
        var observer = new ResizeObserverSPI(callback, controller, this);
        observers.set(this, observer);
    }
    return ResizeObserver;
}());
// Expose public methods of ResizeObserver.
[
    'observe',
    'unobserve',
    'disconnect'
].forEach(function (method) {
    ResizeObserver.prototype[method] = function () {
        var _a;
        return (_a = observers.get(this))[method].apply(_a, arguments);
    };
});

var index = (function () {
    // Export existing implementation if available.
    if (typeof global$1.ResizeObserver !== 'undefined') {
        return global$1.ResizeObserver;
    }
    return ResizeObserver;
})();

/* harmony default export */ __webpack_exports__["default"] = (index);

/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))

/***/ }),

/***/ "6eeb":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var createNonEnumerableProperty = __webpack_require__("9112");
var has = __webpack_require__("5135");
var setGlobal = __webpack_require__("ce4e");
var inspectSource = __webpack_require__("8925");
var InternalStateModule = __webpack_require__("69f3");

var getInternalState = InternalStateModule.get;
var enforceInternalState = InternalStateModule.enforce;
var TEMPLATE = String(String).split('String');

(module.exports = function (O, key, value, options) {
  var unsafe = options ? !!options.unsafe : false;
  var simple = options ? !!options.enumerable : false;
  var noTargetGet = options ? !!options.noTargetGet : false;
  if (typeof value == 'function') {
    if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
    enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
  }
  if (O === global) {
    if (simple) O[key] = value;
    else setGlobal(key, value);
    return;
  } else if (!unsafe) {
    delete O[key];
  } else if (!noTargetGet && O[key]) {
    simple = true;
  }
  if (simple) O[key] = value;
  else createNonEnumerableProperty(O, key, value);
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, 'toString', function toString() {
  return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
});


/***/ }),

/***/ "6f4f":
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
var anObject = __webpack_require__("77e9");
var dPs = __webpack_require__("85e7");
var enumBugKeys = __webpack_require__("9742");
var IE_PROTO = __webpack_require__("5a94")('IE_PROTO');
var Empty = function () { /* empty */ };
var PROTOTYPE = 'prototype';

// Create object with fake `null` prototype: use iframe Object with cleared prototype
var createDict = function () {
  // Thrash, waste and sodomy: IE GC bug
  var iframe = __webpack_require__("05f5")('iframe');
  var i = enumBugKeys.length;
  var lt = '<';
  var gt = '>';
  var iframeDocument;
  iframe.style.display = 'none';
  __webpack_require__("9141").appendChild(iframe);
  iframe.src = 'javascript:'; // eslint-disable-line no-script-url
  // createDict = iframe.contentWindow.Object;
  // html.removeChild(iframe);
  iframeDocument = iframe.contentWindow.document;
  iframeDocument.open();
  iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
  iframeDocument.close();
  createDict = iframeDocument.F;
  while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
  return createDict();
};

module.exports = Object.create || function create(O, Properties) {
  var result;
  if (O !== null) {
    Empty[PROTOTYPE] = anObject(O);
    result = new Empty();
    Empty[PROTOTYPE] = null;
    // add "__proto__" for Object.getPrototypeOf polyfill
    result[IE_PROTO] = O;
  } else result = createDict();
  return Properties === undefined ? result : dPs(result, Properties);
};


/***/ }),

/***/ "6f53":
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__("83ab");
var objectKeys = __webpack_require__("df75");
var toIndexedObject = __webpack_require__("fc6a");
var propertyIsEnumerable = __webpack_require__("d1e7").f;

// `Object.{ entries, values }` methods implementation
var createMethod = function (TO_ENTRIES) {
  return function (it) {
    var O = toIndexedObject(it);
    var keys = objectKeys(O);
    var length = keys.length;
    var i = 0;
    var result = [];
    var key;
    while (length > i) {
      key = keys[i++];
      if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) {
        result.push(TO_ENTRIES ? [key, O[key]] : O[key]);
      }
    }
    return result;
  };
};

module.exports = {
  // `Object.entries` method
  // https://tc39.github.io/ecma262/#sec-object.entries
  entries: createMethod(true),
  // `Object.values` method
  // https://tc39.github.io/ecma262/#sec-object.values
  values: createMethod(false)
};


/***/ }),

/***/ "6fb9":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "7037":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("d28b");

__webpack_require__("e260");

__webpack_require__("d3b7");

__webpack_require__("3ca3");

__webpack_require__("ddb0");

function _typeof(obj) {
  "@babel/helpers - typeof";

  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
    module.exports = _typeof = function _typeof(obj) {
      return typeof obj;
    };
  } else {
    module.exports = _typeof = function _typeof(obj) {
      return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
    };
  }

  return _typeof(obj);
}

module.exports = _typeof;

/***/ }),

/***/ "7156":
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__("861d");
var setPrototypeOf = __webpack_require__("d2bb");

// makes subclassing work correct for wrapped built-ins
module.exports = function ($this, dummy, Wrapper) {
  var NewTarget, NewTargetPrototype;
  if (
    // it can work only with native `setPrototypeOf`
    setPrototypeOf &&
    // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
    typeof (NewTarget = dummy.constructor) == 'function' &&
    NewTarget !== Wrapper &&
    isObject(NewTargetPrototype = NewTarget.prototype) &&
    NewTargetPrototype !== Wrapper.prototype
  ) setPrototypeOf($this, NewTargetPrototype);
  return $this;
};


/***/ }),

/***/ "722f":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("d28b");

__webpack_require__("e260");

__webpack_require__("d3b7");

__webpack_require__("3ca3");

__webpack_require__("ddb0");

var _typeof2 = __webpack_require__("7037");

exports.__esModule = true;

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

var _ariaUtils = __webpack_require__("e452");

var _ariaUtils2 = _interopRequireDefault(_ariaUtils);

function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    default: obj
  };
}
/**
 * @constructor
 * @desc Dialog object providing modal focus management.
 *
 * Assumptions: The element serving as the dialog container is present in the
 * DOM and hidden. The dialog container has role='dialog'.
 *
 * @param dialogId
 *          The ID of the element serving as the dialog container.
 * @param focusAfterClosed
 *          Either the DOM node or the ID of the DOM node to focus when the
 *          dialog closes.
 * @param focusFirst
 *          Optional parameter containing either the DOM node or the ID of the
 *          DOM node to focus when the dialog opens. If not specified, the
 *          first focusable element in the dialog will receive focus.
 */


var aria = aria || {};
var tabEvent;

aria.Dialog = function (dialog, focusAfterClosed, focusFirst) {
  var _this = this;

  this.dialogNode = dialog;

  if (this.dialogNode === null || this.dialogNode.getAttribute('role') !== 'dialog') {
    throw new Error('Dialog() requires a DOM element with ARIA role of dialog.');
  }

  if (typeof focusAfterClosed === 'string') {
    this.focusAfterClosed = document.getElementById(focusAfterClosed);
  } else if ((typeof focusAfterClosed === 'undefined' ? 'undefined' : _typeof(focusAfterClosed)) === 'object') {
    this.focusAfterClosed = focusAfterClosed;
  } else {
    this.focusAfterClosed = null;
  }

  if (typeof focusFirst === 'string') {
    this.focusFirst = document.getElementById(focusFirst);
  } else if ((typeof focusFirst === 'undefined' ? 'undefined' : _typeof(focusFirst)) === 'object') {
    this.focusFirst = focusFirst;
  } else {
    this.focusFirst = null;
  }

  if (this.focusFirst) {
    this.focusFirst.focus();
  } else {
    _ariaUtils2.default.focusFirstDescendant(this.dialogNode);
  }

  this.lastFocus = document.activeElement;

  tabEvent = function tabEvent(e) {
    _this.trapFocus(e);
  };

  this.addListeners();
};

aria.Dialog.prototype.addListeners = function () {
  document.addEventListener('focus', tabEvent, true);
};

aria.Dialog.prototype.removeListeners = function () {
  document.removeEventListener('focus', tabEvent, true);
};

aria.Dialog.prototype.closeDialog = function () {
  var _this2 = this;

  this.removeListeners();

  if (this.focusAfterClosed) {
    setTimeout(function () {
      _this2.focusAfterClosed.focus();
    });
  }
};

aria.Dialog.prototype.trapFocus = function (event) {
  if (_ariaUtils2.default.IgnoreUtilFocusChanges) {
    return;
  }

  if (this.dialogNode.contains(event.target)) {
    this.lastFocus = event.target;
  } else {
    _ariaUtils2.default.focusFirstDescendant(this.dialogNode);

    if (this.lastFocus === document.activeElement) {
      _ariaUtils2.default.focusLastDescendant(this.dialogNode);
    }

    this.lastFocus = document.activeElement;
  }
};

exports.default = aria.Dialog;

/***/ }),

/***/ "72cd":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_switch_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c861");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_switch_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_switch_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_switch_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "72f7":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var exportTypedArrayMethod = __webpack_require__("ebb5").exportTypedArrayMethod;
var fails = __webpack_require__("d039");
var global = __webpack_require__("da84");

var Uint8Array = global.Uint8Array;
var Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};
var arrayToString = [].toString;
var arrayJoin = [].join;

if (fails(function () { arrayToString.call({}); })) {
  arrayToString = function toString() {
    return arrayJoin.call(this);
  };
}

var IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;

// `%TypedArray%.prototype.toString` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.tostring
exportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);


/***/ }),

/***/ "735e":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__("ebb5");
var $fill = __webpack_require__("81d5");

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

// `%TypedArray%.prototype.fill` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.fill
// eslint-disable-next-line no-unused-vars
exportTypedArrayMethod('fill', function fill(value /* , start, end */) {
  return $fill.apply(aTypedArray(this), arguments);
});


/***/ }),

/***/ "7418":
/***/ (function(module, exports) {

exports.f = Object.getOwnPropertySymbols;


/***/ }),

/***/ "746f":
/***/ (function(module, exports, __webpack_require__) {

var path = __webpack_require__("428f");
var has = __webpack_require__("5135");
var wrappedWellKnownSymbolModule = __webpack_require__("e538");
var defineProperty = __webpack_require__("9bf2").f;

module.exports = function (NAME) {
  var Symbol = path.Symbol || (path.Symbol = {});
  if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {
    value: wrappedWellKnownSymbolModule.f(NAME)
  });
};


/***/ }),

/***/ "74d3":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var core_js_modules_es_object_assign__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("cca6");
/* harmony import */ var core_js_modules_es_object_assign__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_assign__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _plugins_codemirror_addon_edit_matchbrackets__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("1850");
/* harmony import */ var _plugins_codemirror_addon_edit_matchbrackets__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_plugins_codemirror_addon_edit_matchbrackets__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _plugins_codemirror_addon_hint_show_hint_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("9bc9");
/* harmony import */ var _plugins_codemirror_addon_hint_show_hint_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_plugins_codemirror_addon_hint_show_hint_css__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _plugins_codemirror_addon_hint_show_hint__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("addb");
/* harmony import */ var _plugins_codemirror_addon_hint_show_hint__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_plugins_codemirror_addon_hint_show_hint__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _plugins_codemirror_plugs_aws_formula_addon_hint_aws_at_hint__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("3c47");
/* harmony import */ var _plugins_codemirror_plugs_aws_formula_addon_hint_aws_at_hint__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_plugins_codemirror_plugs_aws_formula_addon_hint_aws_at_hint__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _plugins_codemirror_plugs_aws_formula_mode_awsat_aws_at__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("79ef");
/* harmony import */ var _plugins_codemirror_plugs_aws_formula_mode_awsat_aws_at__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_plugins_codemirror_plugs_aws_formula_mode_awsat_aws_at__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _plugins_codemirror_plugs_aws_formula_awsui_formula_util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("82bb");
/* harmony import */ var _plugins_codemirror_plugs_aws_formula_awsui_formula_util__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_plugins_codemirror_plugs_aws_formula_awsui_formula_util__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _plugins_codemirror_plugs_aws_formula_theme_aws_formula_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("8ce5");
/* harmony import */ var _plugins_codemirror_plugs_aws_formula_theme_aws_formula_css__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_plugins_codemirror_plugs_aws_formula_theme_aws_formula_css__WEBPACK_IMPORTED_MODULE_7__);

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//







window.formulaLabelMap = {};
/* harmony default export */ __webpack_exports__["a"] = ({
  name: "AwsuiFormula",
  componentName: "AwsuiCodemirror",
  props: {
    content: {
      type: String,
      default: ""
    },
    option: {
      type: Object
    },
    value: {
      type: String
    },
    placeholder: {
      type: String,
      default: "请输入内容"
    }
  },
  data: function data() {
    return {
      options: {
        height: "28px",
        theme: "aws-formula",
        //设置主题
        foldGutter: true,
        singleCursorHeightPerLine: false,
        gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
        matchBrackets: true,
        //括号匹配
        mode: {
          name: "awsAt"
        },
        //提示语言
        defaultTable: [1, 2, 3],
        autofocus: false,
        lineWrapping: true
      },
      iframeOption: {
        url: this.getPath(),
        data: {
          sid: this.getSid(),
          cmd: "CLIENT_M_FORMULA_EDITOR_MAIN_PAGE",
          contextData: ""
        }
      },
      currentContent: this.value,
      otherInstanceVue: null,
      dialogVisible: false,
      cm: null,
      width: "850px",
      height: window.top !== window && window.height > 550 ? window.height * 0.6 + "px" : "550px"
    };
  },
  watch: {
    content: {
      handler: function handler() {
        if (this.content !== "") {
          this.currentContent = this.content;
        }
      },
      immediate: true
    },
    currentContent: function currentContent(val) {
      this.$emit("input", val);
    },
    value: {
      handler: function handler() {
        if (this.currentContent != this.value) {
          this.currentContent = this.value;
          this.onCmReady();
        }
      },
      immediate: true
    }
  },
  methods: {
    onCmReady: function onCmReady(cm) {
      var _this = this;

      this.cm = cm != null ? cm : this.cm;

      if (this.cm == null) {
        // 初始化value 触发的不需要执行
        return;
      }

      var opt = this.getOpt();

      if (this.option.readonly === true) {
        this.cm.setOption("readOnly", "nocursor");
      }

      this.cm.setSize(null, this.option.height); // 禁用回车事件

      this.cm.setOption("isSupportReturn", false);
      var params = {
        url: "jd",
        data: {
          sid: this.getSid(),
          contextData: JSON.stringify(opt.contextData),
          content: JSON.stringify(this.currentContent),
          cmd: "CLIENT_M_FORMULA_EDITOR_PARSE_CONTENT"
        }
      };
      this.awsuiaxios.post(params).then(function (r) {
        if (r.result === "ok") {
          if (r.data.formulaLabelMapCache !== undefined) {
            var formulaLabelMapCache = r.data.formulaLabelMapCache;

            if (formulaLabelMapCache != null) {
              var tmp = Object.assign({}, window.formulaLabelMap, formulaLabelMapCache);
              window.formulaLabelMap = tmp;
              window.initFormulaEditor(_this.currentContent, _this.cm, opt.type);
            }
          }
        }
      }).catch(function (error) {
        console.log(error);
      });
    },
    refresh: function refresh() {
      this.onCmReady();
    },
    getSid: function getSid() {
      var sid = this.option.sid;

      if (sid === undefined) {
        sid = typeof settingParam != "undefined" ? eval("settingParam")["sessionId"] : window.settingParam != null ? window.settingParam.sessionId : this.option.sid;
      }

      return sid;
    },
    getPath: function getPath() {
      return eval("axiosBaseUrl") + "w";
    },
    getOpt: function getOpt() {
      var opt = Object.assign({}, this.options, this.option);
      opt.defaultValue = this.currentContent;
      return opt;
    },
    // 图标按钮
    openDialog: function openDialog(assignOpt, otherInstanceVue) {
      var $this = this;
      var opt = assignOpt;

      if (opt == null) {
        opt = this.getOpt();
        opt.contextData.defaultValue = this.currentContent;
      }

      if (this.option.disabled === true || this.option.readonly === true) {
        return;
      }

      this.otherInstanceVue = otherInstanceVue == null ? this : otherInstanceVue;

      if (window.atOnce != null && window.atOnce !== this) {
        opt.contextData.defaultValue = this.currentContent;
        window.atOnce.openDialog(opt, this);
        return;
      }

      if (opt.contextData !== undefined) {
        this.iframeOption.data.contextData = JSON.stringify(opt.contextData);
      }

      if (this.option.readonly !== true && this.option.disabled !== true) {
        this.dialogVisible = true;
      }

      $this.$nextTick(function () {
        $this.width = window.top !== window && window.width > 850 ? window.width * 0.7 + "px" : "850px";
      });
    },
    // 弹框的确定按钮
    dialogConfirm: function dialogConfirm(value) {
      if (value != null) {
        this.currentContent = value;
        return;
      }

      if (this.otherInstanceVue) {
        // let otherDialogConfirmFn = this.otherInstanceVue.dialogConfirm;
        // let otherOnCmReady = this.otherInstanceVue.onCmReady;
        this.otherInstanceVue.dialogConfirm(this.getValue());
        this.otherInstanceVue.onCmReady();
        this.otherInstanceVue = null;
        this.dialogVisible = false;
      }
    },
    getValue: function getValue() {
      return this.$refs.awsuiDialog.getWin().getVal();
    },
    dialogCancel: function dialogCancel() {
      this.dialogVisible = false;
    }
  },
  mounted: function mounted() {
    if (!window.atOnce) {
      window.atOnce = this;
    }
  },
  destroyed: function destroyed() {
    window.atOnce = null;
  },
  computed: {
    dialogOnce: function dialogOnce() {
      return window.atOnce == null;
    }
  }
});

/***/ }),

/***/ "74e8":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var global = __webpack_require__("da84");
var DESCRIPTORS = __webpack_require__("83ab");
var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __webpack_require__("8aa7");
var ArrayBufferViewCore = __webpack_require__("ebb5");
var ArrayBufferModule = __webpack_require__("621a");
var anInstance = __webpack_require__("19aa");
var createPropertyDescriptor = __webpack_require__("5c6c");
var createNonEnumerableProperty = __webpack_require__("9112");
var toLength = __webpack_require__("50c4");
var toIndex = __webpack_require__("0b25");
var toOffset = __webpack_require__("182d");
var toPrimitive = __webpack_require__("c04e");
var has = __webpack_require__("5135");
var classof = __webpack_require__("f5df");
var isObject = __webpack_require__("861d");
var create = __webpack_require__("7c73");
var setPrototypeOf = __webpack_require__("d2bb");
var getOwnPropertyNames = __webpack_require__("241c").f;
var typedArrayFrom = __webpack_require__("a078");
var forEach = __webpack_require__("b727").forEach;
var setSpecies = __webpack_require__("2626");
var definePropertyModule = __webpack_require__("9bf2");
var getOwnPropertyDescriptorModule = __webpack_require__("06cf");
var InternalStateModule = __webpack_require__("69f3");
var inheritIfRequired = __webpack_require__("7156");

var getInternalState = InternalStateModule.get;
var setInternalState = InternalStateModule.set;
var nativeDefineProperty = definePropertyModule.f;
var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
var round = Math.round;
var RangeError = global.RangeError;
var ArrayBuffer = ArrayBufferModule.ArrayBuffer;
var DataView = ArrayBufferModule.DataView;
var NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;
var TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;
var TypedArray = ArrayBufferViewCore.TypedArray;
var TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;
var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
var isTypedArray = ArrayBufferViewCore.isTypedArray;
var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';
var WRONG_LENGTH = 'Wrong length';

var fromList = function (C, list) {
  var index = 0;
  var length = list.length;
  var result = new (aTypedArrayConstructor(C))(length);
  while (length > index) result[index] = list[index++];
  return result;
};

var addGetter = function (it, key) {
  nativeDefineProperty(it, key, { get: function () {
    return getInternalState(this)[key];
  } });
};

var isArrayBuffer = function (it) {
  var klass;
  return it instanceof ArrayBuffer || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';
};

var isTypedArrayIndex = function (target, key) {
  return isTypedArray(target)
    && typeof key != 'symbol'
    && key in target
    && String(+key) == String(key);
};

var wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {
  return isTypedArrayIndex(target, key = toPrimitive(key, true))
    ? createPropertyDescriptor(2, target[key])
    : nativeGetOwnPropertyDescriptor(target, key);
};

var wrappedDefineProperty = function defineProperty(target, key, descriptor) {
  if (isTypedArrayIndex(target, key = toPrimitive(key, true))
    && isObject(descriptor)
    && has(descriptor, 'value')
    && !has(descriptor, 'get')
    && !has(descriptor, 'set')
    // TODO: add validation descriptor w/o calling accessors
    && !descriptor.configurable
    && (!has(descriptor, 'writable') || descriptor.writable)
    && (!has(descriptor, 'enumerable') || descriptor.enumerable)
  ) {
    target[key] = descriptor.value;
    return target;
  } return nativeDefineProperty(target, key, descriptor);
};

if (DESCRIPTORS) {
  if (!NATIVE_ARRAY_BUFFER_VIEWS) {
    getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor;
    definePropertyModule.f = wrappedDefineProperty;
    addGetter(TypedArrayPrototype, 'buffer');
    addGetter(TypedArrayPrototype, 'byteOffset');
    addGetter(TypedArrayPrototype, 'byteLength');
    addGetter(TypedArrayPrototype, 'length');
  }

  $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {
    getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,
    defineProperty: wrappedDefineProperty
  });

  module.exports = function (TYPE, wrapper, CLAMPED) {
    var BYTES = TYPE.match(/\d+$/)[0] / 8;
    var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';
    var GETTER = 'get' + TYPE;
    var SETTER = 'set' + TYPE;
    var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME];
    var TypedArrayConstructor = NativeTypedArrayConstructor;
    var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;
    var exported = {};

    var getter = function (that, index) {
      var data = getInternalState(that);
      return data.view[GETTER](index * BYTES + data.byteOffset, true);
    };

    var setter = function (that, index, value) {
      var data = getInternalState(that);
      if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;
      data.view[SETTER](index * BYTES + data.byteOffset, value, true);
    };

    var addElement = function (that, index) {
      nativeDefineProperty(that, index, {
        get: function () {
          return getter(this, index);
        },
        set: function (value) {
          return setter(this, index, value);
        },
        enumerable: true
      });
    };

    if (!NATIVE_ARRAY_BUFFER_VIEWS) {
      TypedArrayConstructor = wrapper(function (that, data, offset, $length) {
        anInstance(that, TypedArrayConstructor, CONSTRUCTOR_NAME);
        var index = 0;
        var byteOffset = 0;
        var buffer, byteLength, length;
        if (!isObject(data)) {
          length = toIndex(data);
          byteLength = length * BYTES;
          buffer = new ArrayBuffer(byteLength);
        } else if (isArrayBuffer(data)) {
          buffer = data;
          byteOffset = toOffset(offset, BYTES);
          var $len = data.byteLength;
          if ($length === undefined) {
            if ($len % BYTES) throw RangeError(WRONG_LENGTH);
            byteLength = $len - byteOffset;
            if (byteLength < 0) throw RangeError(WRONG_LENGTH);
          } else {
            byteLength = toLength($length) * BYTES;
            if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH);
          }
          length = byteLength / BYTES;
        } else if (isTypedArray(data)) {
          return fromList(TypedArrayConstructor, data);
        } else {
          return typedArrayFrom.call(TypedArrayConstructor, data);
        }
        setInternalState(that, {
          buffer: buffer,
          byteOffset: byteOffset,
          byteLength: byteLength,
          length: length,
          view: new DataView(buffer)
        });
        while (index < length) addElement(that, index++);
      });

      if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);
      TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype);
    } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) {
      TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {
        anInstance(dummy, TypedArrayConstructor, CONSTRUCTOR_NAME);
        return inheritIfRequired(function () {
          if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data));
          if (isArrayBuffer(data)) return $length !== undefined
            ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length)
            : typedArrayOffset !== undefined
              ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))
              : new NativeTypedArrayConstructor(data);
          if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);
          return typedArrayFrom.call(TypedArrayConstructor, data);
        }(), dummy, TypedArrayConstructor);
      });

      if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);
      forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) {
        if (!(key in TypedArrayConstructor)) {
          createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);
        }
      });
      TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;
    }

    if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {
      createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);
    }

    if (TYPED_ARRAY_TAG) {
      createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);
    }

    exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;

    $({
      global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS
    }, exported);

    if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {
      createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);
    }

    if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {
      createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);
    }

    setSpecies(CONSTRUCTOR_NAME);
  };
} else module.exports = function () { /* empty */ };


/***/ }),

/***/ "74ec":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "76ae":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"));
  else {}
})(function(CodeMirror) {
  "use strict";

  CodeMirror.defineSimpleMode = function(name, states) {
    CodeMirror.defineMode(name, function(config) {
      return CodeMirror.simpleMode(config, states);
    });
  };

  CodeMirror.simpleMode = function(config, states) {
    ensureState(states, "start");
    var states_ = {}, meta = states.meta || {}, hasIndentation = false;
    for (var state in states) if (state != meta && states.hasOwnProperty(state)) {
      var list = states_[state] = [], orig = states[state];
      for (var i = 0; i < orig.length; i++) {
        var data = orig[i];
        list.push(new Rule(data, states));
        if (data.indent || data.dedent) hasIndentation = true;
      }
    }
    var mode = {
      startState: function() {
        return {state: "start", pending: null,
                local: null, localState: null,
                indent: hasIndentation ? [] : null};
      },
      copyState: function(state) {
        var s = {state: state.state, pending: state.pending,
                 local: state.local, localState: null,
                 indent: state.indent && state.indent.slice(0)};
        if (state.localState)
          s.localState = CodeMirror.copyState(state.local.mode, state.localState);
        if (state.stack)
          s.stack = state.stack.slice(0);
        for (var pers = state.persistentStates; pers; pers = pers.next)
          s.persistentStates = {mode: pers.mode,
                                spec: pers.spec,
                                state: pers.state == state.localState ? s.localState : CodeMirror.copyState(pers.mode, pers.state),
                                next: s.persistentStates};
        return s;
      },
      token: tokenFunction(states_, config),
      innerMode: function(state) { return state.local && {mode: state.local.mode, state: state.localState}; },
      indent: indentFunction(states_, meta)
    };
    if (meta) for (var prop in meta) if (meta.hasOwnProperty(prop))
      mode[prop] = meta[prop];
    return mode;
  };

  function ensureState(states, name) {
    if (!states.hasOwnProperty(name))
      throw new Error("Undefined state " + name + " in simple mode");
  }

  function toRegex(val, caret) {
    if (!val) return /(?:)/;
    var flags = "";
    if (val instanceof RegExp) {
      if (val.ignoreCase) flags = "i";
      val = val.source;
    } else {
      val = String(val);
    }
    return new RegExp((caret === false ? "" : "^") + "(?:" + val + ")", flags);
  }

  function asToken(val) {
    if (!val) return null;
    if (val.apply) return val
    if (typeof val == "string") return val.replace(/\./g, " ");
    var result = [];
    for (var i = 0; i < val.length; i++)
      result.push(val[i] && val[i].replace(/\./g, " "));
    return result;
  }

  function Rule(data, states) {
    if (data.next || data.push) ensureState(states, data.next || data.push);
    this.regex = toRegex(data.regex);
    this.token = asToken(data.token);
    this.data = data;
  }

  function tokenFunction(states, config) {
    return function(stream, state) {
      if (state.pending) {
        var pend = state.pending.shift();
        if (state.pending.length == 0) state.pending = null;
        stream.pos += pend.text.length;
        return pend.token;
      }

      if (state.local) {
        if (state.local.end && stream.match(state.local.end)) {
          var tok = state.local.endToken || null;
          state.local = state.localState = null;
          return tok;
        } else {
          var tok = state.local.mode.token(stream, state.localState), m;
          if (state.local.endScan && (m = state.local.endScan.exec(stream.current())))
            stream.pos = stream.start + m.index;
          return tok;
        }
      }

      var curState = states[state.state];
      for (var i = 0; i < curState.length; i++) {
        var rule = curState[i];
        var matches = (!rule.data.sol || stream.sol()) && stream.match(rule.regex);
        if (matches) {
          if (rule.data.next) {
            state.state = rule.data.next;
          } else if (rule.data.push) {
            (state.stack || (state.stack = [])).push(state.state);
            state.state = rule.data.push;
          } else if (rule.data.pop && state.stack && state.stack.length) {
            state.state = state.stack.pop();
          }

          if (rule.data.mode)
            enterLocalMode(config, state, rule.data.mode, rule.token);
          if (rule.data.indent)
            state.indent.push(stream.indentation() + config.indentUnit);
          if (rule.data.dedent)
            state.indent.pop();
          var token = rule.token
          if (token && token.apply) token = token(matches)
          if (matches.length > 2 && rule.token && typeof rule.token != "string") {
            state.pending = [];
            for (var j = 2; j < matches.length; j++)
              if (matches[j])
                state.pending.push({text: matches[j], token: rule.token[j - 1]});
            stream.backUp(matches[0].length - (matches[1] ? matches[1].length : 0));
            return token[0];
          } else if (token && token.join) {
            return token[0];
          } else {
            return token;
          }
        }
      }
      stream.next();
      return null;
    };
  }

  function cmp(a, b) {
    if (a === b) return true;
    if (!a || typeof a != "object" || !b || typeof b != "object") return false;
    var props = 0;
    for (var prop in a) if (a.hasOwnProperty(prop)) {
      if (!b.hasOwnProperty(prop) || !cmp(a[prop], b[prop])) return false;
      props++;
    }
    for (var prop in b) if (b.hasOwnProperty(prop)) props--;
    return props == 0;
  }

  function enterLocalMode(config, state, spec, token) {
    var pers;
    if (spec.persistent) for (var p = state.persistentStates; p && !pers; p = p.next)
      if (spec.spec ? cmp(spec.spec, p.spec) : spec.mode == p.mode) pers = p;
    var mode = pers ? pers.mode : spec.mode || CodeMirror.getMode(config, spec.spec);
    var lState = pers ? pers.state : CodeMirror.startState(mode);
    if (spec.persistent && !pers)
      state.persistentStates = {mode: mode, spec: spec.spec, state: lState, next: state.persistentStates};

    state.localState = lState;
    state.local = {mode: mode,
                   end: spec.end && toRegex(spec.end),
                   endScan: spec.end && spec.forceEnd !== false && toRegex(spec.end, false),
                   endToken: token && token.join ? token[token.length - 1] : token};
  }

  function indexOf(val, arr) {
    for (var i = 0; i < arr.length; i++) if (arr[i] === val) return true;
  }

  function indentFunction(states, meta) {
    return function(state, textAfter, line) {
      if (state.local && state.local.mode.indent)
        return state.local.mode.indent(state.localState, textAfter, line);
      if (state.indent == null || state.local || meta.dontIndentStates && indexOf(state.state, meta.dontIndentStates) > -1)
        return CodeMirror.Pass;

      var pos = state.indent.length - 1, rules = states[state.state];
      scan: for (;;) {
        for (var i = 0; i < rules.length; i++) {
          var rule = rules[i];
          if (rule.data.dedent && rule.data.dedentIfLineStart !== false) {
            var m = rule.regex.exec(textAfter);
            if (m && m[0]) {
              pos--;
              if (rule.next || rule.push) rules = states[rule.next || rule.push];
              textAfter = textAfter.slice(m[0].length);
              continue scan;
            }
          }
        }
        break;
      }
      return pos < 0 ? 0 : state.indent[pos];
    };
  }
});


/***/ }),

/***/ "76d2":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

// Stylus mode created by Dmitry Kiselyov http://git.io/AaRB

(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"));
  else {}
})(function(CodeMirror) {
  "use strict";

  CodeMirror.defineMode("stylus", function(config) {
    var indentUnit = config.indentUnit,
        indentUnitString = '',
        tagKeywords = keySet(tagKeywords_),
        tagVariablesRegexp = /^(a|b|i|s|col|em)$/i,
        propertyKeywords = keySet(propertyKeywords_),
        nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_),
        valueKeywords = keySet(valueKeywords_),
        colorKeywords = keySet(colorKeywords_),
        documentTypes = keySet(documentTypes_),
        documentTypesRegexp = wordRegexp(documentTypes_),
        mediaFeatures = keySet(mediaFeatures_),
        mediaTypes = keySet(mediaTypes_),
        fontProperties = keySet(fontProperties_),
        operatorsRegexp = /^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/,
        wordOperatorKeywordsRegexp = wordRegexp(wordOperatorKeywords_),
        blockKeywords = keySet(blockKeywords_),
        vendorPrefixesRegexp = new RegExp(/^\-(moz|ms|o|webkit)-/i),
        commonAtoms = keySet(commonAtoms_),
        firstWordMatch = "",
        states = {},
        ch,
        style,
        type,
        override;

    while (indentUnitString.length < indentUnit) indentUnitString += ' ';

    /**
     * Tokenizers
     */
    function tokenBase(stream, state) {
      firstWordMatch = stream.string.match(/(^[\w-]+\s*=\s*$)|(^\s*[\w-]+\s*=\s*[\w-])|(^\s*(\.|#|@|\$|\&|\[|\d|\+|::?|\{|\>|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/);
      state.context.line.firstWord = firstWordMatch ? firstWordMatch[0].replace(/^\s*/, "") : "";
      state.context.line.indent = stream.indentation();
      ch = stream.peek();

      // Line comment
      if (stream.match("//")) {
        stream.skipToEnd();
        return ["comment", "comment"];
      }
      // Block comment
      if (stream.match("/*")) {
        state.tokenize = tokenCComment;
        return tokenCComment(stream, state);
      }
      // String
      if (ch == "\"" || ch == "'") {
        stream.next();
        state.tokenize = tokenString(ch);
        return state.tokenize(stream, state);
      }
      // Def
      if (ch == "@") {
        stream.next();
        stream.eatWhile(/[\w\\-]/);
        return ["def", stream.current()];
      }
      // ID selector or Hex color
      if (ch == "#") {
        stream.next();
        // Hex color
        if (stream.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\b(?!-)/i)) {
          return ["atom", "atom"];
        }
        // ID selector
        if (stream.match(/^[a-z][\w-]*/i)) {
          return ["builtin", "hash"];
        }
      }
      // Vendor prefixes
      if (stream.match(vendorPrefixesRegexp)) {
        return ["meta", "vendor-prefixes"];
      }
      // Numbers
      if (stream.match(/^-?[0-9]?\.?[0-9]/)) {
        stream.eatWhile(/[a-z%]/i);
        return ["number", "unit"];
      }
      // !important|optional
      if (ch == "!") {
        stream.next();
        return [stream.match(/^(important|optional)/i) ? "keyword": "operator", "important"];
      }
      // Class
      if (ch == "." && stream.match(/^\.[a-z][\w-]*/i)) {
        return ["qualifier", "qualifier"];
      }
      // url url-prefix domain regexp
      if (stream.match(documentTypesRegexp)) {
        if (stream.peek() == "(") state.tokenize = tokenParenthesized;
        return ["property", "word"];
      }
      // Mixins / Functions
      if (stream.match(/^[a-z][\w-]*\(/i)) {
        stream.backUp(1);
        return ["keyword", "mixin"];
      }
      // Block mixins
      if (stream.match(/^(\+|-)[a-z][\w-]*\(/i)) {
        stream.backUp(1);
        return ["keyword", "block-mixin"];
      }
      // Parent Reference BEM naming
      if (stream.string.match(/^\s*&/) && stream.match(/^[-_]+[a-z][\w-]*/)) {
        return ["qualifier", "qualifier"];
      }
      // / Root Reference & Parent Reference
      if (stream.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)) {
        stream.backUp(1);
        return ["variable-3", "reference"];
      }
      if (stream.match(/^&{1}\s*$/)) {
        return ["variable-3", "reference"];
      }
      // Word operator
      if (stream.match(wordOperatorKeywordsRegexp)) {
        return ["operator", "operator"];
      }
      // Word
      if (stream.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)) {
        // Variable
        if (stream.match(/^(\.|\[)[\w-\'\"\]]+/i, false)) {
          if (!wordIsTag(stream.current())) {
            stream.match(/\./);
            return ["variable-2", "variable-name"];
          }
        }
        return ["variable-2", "word"];
      }
      // Operators
      if (stream.match(operatorsRegexp)) {
        return ["operator", stream.current()];
      }
      // Delimiters
      if (/[:;,{}\[\]\(\)]/.test(ch)) {
        stream.next();
        return [null, ch];
      }
      // Non-detected items
      stream.next();
      return [null, null];
    }

    /**
     * Token comment
     */
    function tokenCComment(stream, state) {
      var maybeEnd = false, ch;
      while ((ch = stream.next()) != null) {
        if (maybeEnd && ch == "/") {
          state.tokenize = null;
          break;
        }
        maybeEnd = (ch == "*");
      }
      return ["comment", "comment"];
    }

    /**
     * Token string
     */
    function tokenString(quote) {
      return function(stream, state) {
        var escaped = false, ch;
        while ((ch = stream.next()) != null) {
          if (ch == quote && !escaped) {
            if (quote == ")") stream.backUp(1);
            break;
          }
          escaped = !escaped && ch == "\\";
        }
        if (ch == quote || !escaped && quote != ")") state.tokenize = null;
        return ["string", "string"];
      };
    }

    /**
     * Token parenthesized
     */
    function tokenParenthesized(stream, state) {
      stream.next(); // Must be "("
      if (!stream.match(/\s*[\"\')]/, false))
        state.tokenize = tokenString(")");
      else
        state.tokenize = null;
      return [null, "("];
    }

    /**
     * Context management
     */
    function Context(type, indent, prev, line) {
      this.type = type;
      this.indent = indent;
      this.prev = prev;
      this.line = line || {firstWord: "", indent: 0};
    }

    function pushContext(state, stream, type, indent) {
      indent = indent >= 0 ? indent : indentUnit;
      state.context = new Context(type, stream.indentation() + indent, state.context);
      return type;
    }

    function popContext(state, currentIndent) {
      var contextIndent = state.context.indent - indentUnit;
      currentIndent = currentIndent || false;
      state.context = state.context.prev;
      if (currentIndent) state.context.indent = contextIndent;
      return state.context.type;
    }

    function pass(type, stream, state) {
      return states[state.context.type](type, stream, state);
    }

    function popAndPass(type, stream, state, n) {
      for (var i = n || 1; i > 0; i--)
        state.context = state.context.prev;
      return pass(type, stream, state);
    }


    /**
     * Parser
     */
    function wordIsTag(word) {
      return word.toLowerCase() in tagKeywords;
    }

    function wordIsProperty(word) {
      word = word.toLowerCase();
      return word in propertyKeywords || word in fontProperties;
    }

    function wordIsBlock(word) {
      return word.toLowerCase() in blockKeywords;
    }

    function wordIsVendorPrefix(word) {
      return word.toLowerCase().match(vendorPrefixesRegexp);
    }

    function wordAsValue(word) {
      var wordLC = word.toLowerCase();
      var override = "variable-2";
      if (wordIsTag(word)) override = "tag";
      else if (wordIsBlock(word)) override = "block-keyword";
      else if (wordIsProperty(word)) override = "property";
      else if (wordLC in valueKeywords || wordLC in commonAtoms) override = "atom";
      else if (wordLC == "return" || wordLC in colorKeywords) override = "keyword";

      // Font family
      else if (word.match(/^[A-Z]/)) override = "string";
      return override;
    }

    function typeIsBlock(type, stream) {
      return ((endOfLine(stream) && (type == "{" || type == "]" || type == "hash" || type == "qualifier")) || type == "block-mixin");
    }

    function typeIsInterpolation(type, stream) {
      return type == "{" && stream.match(/^\s*\$?[\w-]+/i, false);
    }

    function typeIsPseudo(type, stream) {
      return type == ":" && stream.match(/^[a-z-]+/, false);
    }

    function startOfLine(stream) {
      return stream.sol() || stream.string.match(new RegExp("^\\s*" + escapeRegExp(stream.current())));
    }

    function endOfLine(stream) {
      return stream.eol() || stream.match(/^\s*$/, false);
    }

    function firstWordOfLine(line) {
      var re = /^\s*[-_]*[a-z0-9]+[\w-]*/i;
      var result = typeof line == "string" ? line.match(re) : line.string.match(re);
      return result ? result[0].replace(/^\s*/, "") : "";
    }


    /**
     * Block
     */
    states.block = function(type, stream, state) {
      if ((type == "comment" && startOfLine(stream)) ||
          (type == "," && endOfLine(stream)) ||
          type == "mixin") {
        return pushContext(state, stream, "block", 0);
      }
      if (typeIsInterpolation(type, stream)) {
        return pushContext(state, stream, "interpolation");
      }
      if (endOfLine(stream) && type == "]") {
        if (!/^\s*(\.|#|:|\[|\*|&)/.test(stream.string) && !wordIsTag(firstWordOfLine(stream))) {
          return pushContext(state, stream, "block", 0);
        }
      }
      if (typeIsBlock(type, stream)) {
        return pushContext(state, stream, "block");
      }
      if (type == "}" && endOfLine(stream)) {
        return pushContext(state, stream, "block", 0);
      }
      if (type == "variable-name") {
        if (stream.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/) || wordIsBlock(firstWordOfLine(stream))) {
          return pushContext(state, stream, "variableName");
        }
        else {
          return pushContext(state, stream, "variableName", 0);
        }
      }
      if (type == "=") {
        if (!endOfLine(stream) && !wordIsBlock(firstWordOfLine(stream))) {
          return pushContext(state, stream, "block", 0);
        }
        return pushContext(state, stream, "block");
      }
      if (type == "*") {
        if (endOfLine(stream) || stream.match(/\s*(,|\.|#|\[|:|{)/,false)) {
          override = "tag";
          return pushContext(state, stream, "block");
        }
      }
      if (typeIsPseudo(type, stream)) {
        return pushContext(state, stream, "pseudo");
      }
      if (/@(font-face|media|supports|(-moz-)?document)/.test(type)) {
        return pushContext(state, stream, endOfLine(stream) ? "block" : "atBlock");
      }
      if (/@(-(moz|ms|o|webkit)-)?keyframes$/.test(type)) {
        return pushContext(state, stream, "keyframes");
      }
      if (/@extends?/.test(type)) {
        return pushContext(state, stream, "extend", 0);
      }
      if (type && type.charAt(0) == "@") {

        // Property Lookup
        if (stream.indentation() > 0 && wordIsProperty(stream.current().slice(1))) {
          override = "variable-2";
          return "block";
        }
        if (/(@import|@require|@charset)/.test(type)) {
          return pushContext(state, stream, "block", 0);
        }
        return pushContext(state, stream, "block");
      }
      if (type == "reference" && endOfLine(stream)) {
        return pushContext(state, stream, "block");
      }
      if (type == "(") {
        return pushContext(state, stream, "parens");
      }

      if (type == "vendor-prefixes") {
        return pushContext(state, stream, "vendorPrefixes");
      }
      if (type == "word") {
        var word = stream.current();
        override = wordAsValue(word);

        if (override == "property") {
          if (startOfLine(stream)) {
            return pushContext(state, stream, "block", 0);
          } else {
            override = "atom";
            return "block";
          }
        }

        if (override == "tag") {

          // tag is a css value
          if (/embed|menu|pre|progress|sub|table/.test(word)) {
            if (wordIsProperty(firstWordOfLine(stream))) {
              override = "atom";
              return "block";
            }
          }

          // tag is an attribute
          if (stream.string.match(new RegExp("\\[\\s*" + word + "|" + word +"\\s*\\]"))) {
            override = "atom";
            return "block";
          }

          // tag is a variable
          if (tagVariablesRegexp.test(word)) {
            if ((startOfLine(stream) && stream.string.match(/=/)) ||
                (!startOfLine(stream) &&
                 !stream.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/) &&
                 !wordIsTag(firstWordOfLine(stream)))) {
              override = "variable-2";
              if (wordIsBlock(firstWordOfLine(stream)))  return "block";
              return pushContext(state, stream, "block", 0);
            }
          }

          if (endOfLine(stream)) return pushContext(state, stream, "block");
        }
        if (override == "block-keyword") {
          override = "keyword";

          // Postfix conditionals
          if (stream.current(/(if|unless)/) && !startOfLine(stream)) {
            return "block";
          }
          return pushContext(state, stream, "block");
        }
        if (word == "return") return pushContext(state, stream, "block", 0);

        // Placeholder selector
        if (override == "variable-2" && stream.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)) {
          return pushContext(state, stream, "block");
        }
      }
      return state.context.type;
    };


    /**
     * Parens
     */
    states.parens = function(type, stream, state) {
      if (type == "(") return pushContext(state, stream, "parens");
      if (type == ")") {
        if (state.context.prev.type == "parens") {
          return popContext(state);
        }
        if ((stream.string.match(/^[a-z][\w-]*\(/i) && endOfLine(stream)) ||
            wordIsBlock(firstWordOfLine(stream)) ||
            /(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(firstWordOfLine(stream)) ||
            (!stream.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/) &&
             wordIsTag(firstWordOfLine(stream)))) {
          return pushContext(state, stream, "block");
        }
        if (stream.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/) ||
            stream.string.match(/^\s*(\(|\)|[0-9])/) ||
            stream.string.match(/^\s+[a-z][\w-]*\(/i) ||
            stream.string.match(/^\s+[\$-]?[a-z]/i)) {
          return pushContext(state, stream, "block", 0);
        }
        if (endOfLine(stream)) return pushContext(state, stream, "block");
        else return pushContext(state, stream, "block", 0);
      }
      if (type && type.charAt(0) == "@" && wordIsProperty(stream.current().slice(1))) {
        override = "variable-2";
      }
      if (type == "word") {
        var word = stream.current();
        override = wordAsValue(word);
        if (override == "tag" && tagVariablesRegexp.test(word)) {
          override = "variable-2";
        }
        if (override == "property" || word == "to") override = "atom";
      }
      if (type == "variable-name") {
        return pushContext(state, stream, "variableName");
      }
      if (typeIsPseudo(type, stream)) {
        return pushContext(state, stream, "pseudo");
      }
      return state.context.type;
    };


    /**
     * Vendor prefixes
     */
    states.vendorPrefixes = function(type, stream, state) {
      if (type == "word") {
        override = "property";
        return pushContext(state, stream, "block", 0);
      }
      return popContext(state);
    };


    /**
     * Pseudo
     */
    states.pseudo = function(type, stream, state) {
      if (!wordIsProperty(firstWordOfLine(stream.string))) {
        stream.match(/^[a-z-]+/);
        override = "variable-3";
        if (endOfLine(stream)) return pushContext(state, stream, "block");
        return popContext(state);
      }
      return popAndPass(type, stream, state);
    };


    /**
     * atBlock
     */
    states.atBlock = function(type, stream, state) {
      if (type == "(") return pushContext(state, stream, "atBlock_parens");
      if (typeIsBlock(type, stream)) {
        return pushContext(state, stream, "block");
      }
      if (typeIsInterpolation(type, stream)) {
        return pushContext(state, stream, "interpolation");
      }
      if (type == "word") {
        var word = stream.current().toLowerCase();
        if (/^(only|not|and|or)$/.test(word))
          override = "keyword";
        else if (documentTypes.hasOwnProperty(word))
          override = "tag";
        else if (mediaTypes.hasOwnProperty(word))
          override = "attribute";
        else if (mediaFeatures.hasOwnProperty(word))
          override = "property";
        else if (nonStandardPropertyKeywords.hasOwnProperty(word))
          override = "string-2";
        else override = wordAsValue(stream.current());
        if (override == "tag" && endOfLine(stream)) {
          return pushContext(state, stream, "block");
        }
      }
      if (type == "operator" && /^(not|and|or)$/.test(stream.current())) {
        override = "keyword";
      }
      return state.context.type;
    };

    states.atBlock_parens = function(type, stream, state) {
      if (type == "{" || type == "}") return state.context.type;
      if (type == ")") {
        if (endOfLine(stream)) return pushContext(state, stream, "block");
        else return pushContext(state, stream, "atBlock");
      }
      if (type == "word") {
        var word = stream.current().toLowerCase();
        override = wordAsValue(word);
        if (/^(max|min)/.test(word)) override = "property";
        if (override == "tag") {
          tagVariablesRegexp.test(word) ? override = "variable-2" : override = "atom";
        }
        return state.context.type;
      }
      return states.atBlock(type, stream, state);
    };


    /**
     * Keyframes
     */
    states.keyframes = function(type, stream, state) {
      if (stream.indentation() == "0" && ((type == "}" && startOfLine(stream)) || type == "]" || type == "hash"
                                          || type == "qualifier" || wordIsTag(stream.current()))) {
        return popAndPass(type, stream, state);
      }
      if (type == "{") return pushContext(state, stream, "keyframes");
      if (type == "}") {
        if (startOfLine(stream)) return popContext(state, true);
        else return pushContext(state, stream, "keyframes");
      }
      if (type == "unit" && /^[0-9]+\%$/.test(stream.current())) {
        return pushContext(state, stream, "keyframes");
      }
      if (type == "word") {
        override = wordAsValue(stream.current());
        if (override == "block-keyword") {
          override = "keyword";
          return pushContext(state, stream, "keyframes");
        }
      }
      if (/@(font-face|media|supports|(-moz-)?document)/.test(type)) {
        return pushContext(state, stream, endOfLine(stream) ? "block" : "atBlock");
      }
      if (type == "mixin") {
        return pushContext(state, stream, "block", 0);
      }
      return state.context.type;
    };


    /**
     * Interpolation
     */
    states.interpolation = function(type, stream, state) {
      if (type == "{") popContext(state) && pushContext(state, stream, "block");
      if (type == "}") {
        if (stream.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i) ||
            (stream.string.match(/^\s*[a-z]/i) && wordIsTag(firstWordOfLine(stream)))) {
          return pushContext(state, stream, "block");
        }
        if (!stream.string.match(/^(\{|\s*\&)/) ||
            stream.match(/\s*[\w-]/,false)) {
          return pushContext(state, stream, "block", 0);
        }
        return pushContext(state, stream, "block");
      }
      if (type == "variable-name") {
        return pushContext(state, stream, "variableName", 0);
      }
      if (type == "word") {
        override = wordAsValue(stream.current());
        if (override == "tag") override = "atom";
      }
      return state.context.type;
    };


    /**
     * Extend/s
     */
    states.extend = function(type, stream, state) {
      if (type == "[" || type == "=") return "extend";
      if (type == "]") return popContext(state);
      if (type == "word") {
        override = wordAsValue(stream.current());
        return "extend";
      }
      return popContext(state);
    };


    /**
     * Variable name
     */
    states.variableName = function(type, stream, state) {
      if (type == "string" || type == "[" || type == "]" || stream.current().match(/^(\.|\$)/)) {
        if (stream.current().match(/^\.[\w-]+/i)) override = "variable-2";
        return "variableName";
      }
      return popAndPass(type, stream, state);
    };


    return {
      startState: function(base) {
        return {
          tokenize: null,
          state: "block",
          context: new Context("block", base || 0, null)
        };
      },
      token: function(stream, state) {
        if (!state.tokenize && stream.eatSpace()) return null;
        style = (state.tokenize || tokenBase)(stream, state);
        if (style && typeof style == "object") {
          type = style[1];
          style = style[0];
        }
        override = style;
        state.state = states[state.state](type, stream, state);
        return override;
      },
      indent: function(state, textAfter, line) {

        var cx = state.context,
            ch = textAfter && textAfter.charAt(0),
            indent = cx.indent,
            lineFirstWord = firstWordOfLine(textAfter),
            lineIndent = line.match(/^\s*/)[0].replace(/\t/g, indentUnitString).length,
            prevLineFirstWord = state.context.prev ? state.context.prev.line.firstWord : "",
            prevLineIndent = state.context.prev ? state.context.prev.line.indent : lineIndent;

        if (cx.prev &&
            (ch == "}" && (cx.type == "block" || cx.type == "atBlock" || cx.type == "keyframes") ||
             ch == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") ||
             ch == "{" && (cx.type == "at"))) {
          indent = cx.indent - indentUnit;
        } else if (!(/(\})/.test(ch))) {
          if (/@|\$|\d/.test(ch) ||
              /^\{/.test(textAfter) ||
/^\s*\/(\/|\*)/.test(textAfter) ||
              /^\s*\/\*/.test(prevLineFirstWord) ||
              /^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(textAfter) ||
/^(\+|-)?[a-z][\w-]*\(/i.test(textAfter) ||
/^return/.test(textAfter) ||
              wordIsBlock(lineFirstWord)) {
            indent = lineIndent;
          } else if (/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(ch) || wordIsTag(lineFirstWord)) {
            if (/\,\s*$/.test(prevLineFirstWord)) {
              indent = prevLineIndent;
            } else if (/^\s+/.test(line) && (/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(prevLineFirstWord) || wordIsTag(prevLineFirstWord))) {
              indent = lineIndent <= prevLineIndent ? prevLineIndent : prevLineIndent + indentUnit;
            } else {
              indent = lineIndent;
            }
          } else if (!/,\s*$/.test(line) && (wordIsVendorPrefix(lineFirstWord) || wordIsProperty(lineFirstWord))) {
            if (wordIsBlock(prevLineFirstWord)) {
              indent = lineIndent <= prevLineIndent ? prevLineIndent : prevLineIndent + indentUnit;
            } else if (/^\{/.test(prevLineFirstWord)) {
              indent = lineIndent <= prevLineIndent ? lineIndent : prevLineIndent + indentUnit;
            } else if (wordIsVendorPrefix(prevLineFirstWord) || wordIsProperty(prevLineFirstWord)) {
              indent = lineIndent >= prevLineIndent ? prevLineIndent : lineIndent;
            } else if (/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(prevLineFirstWord) ||
                      /=\s*$/.test(prevLineFirstWord) ||
                      wordIsTag(prevLineFirstWord) ||
                      /^\$[\w-\.\[\]\'\"]/.test(prevLineFirstWord)) {
              indent = prevLineIndent + indentUnit;
            } else {
              indent = lineIndent;
            }
          }
        }
        return indent;
      },
      electricChars: "}",
      blockCommentStart: "/*",
      blockCommentEnd: "*/",
      blockCommentContinue: " * ",
      lineComment: "//",
      fold: "indent"
    };
  });

  // developer.mozilla.org/en-US/docs/Web/HTML/Element
  var tagKeywords_ = ["a","abbr","address","area","article","aside","audio", "b", "base","bdi", "bdo","bgsound","blockquote","body","br","button","canvas","caption","cite", "code","col","colgroup","data","datalist","dd","del","details","dfn","div", "dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1", "h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe", "img","input","ins","kbd","keygen","label","legend","li","link","main","map", "mark","marquee","menu","menuitem","meta","meter","nav","nobr","noframes", "noscript","object","ol","optgroup","option","output","p","param","pre", "progress","q","rp","rt","ruby","s","samp","script","section","select", "small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track", "u","ul","var","video"];

  // github.com/codemirror/CodeMirror/blob/master/mode/css/css.js
  // Note, "url-prefix" should precede "url" in order to match correctly in documentTypesRegexp
  var documentTypes_ = ["domain", "regexp", "url-prefix", "url"];
  var mediaTypes_ = ["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"];
  var mediaFeatures_ = ["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid"];
  var propertyKeywords_ = ["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode","font-smoothing","osx-font-smoothing"];
  var nonStandardPropertyKeywords_ = ["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"];
  var fontProperties_ = ["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"];
  var colorKeywords_ = ["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"];
  var valueKeywords_ = ["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scale","scale3d","scaleX","scaleY","scaleZ","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","x-large","x-small","xor","xx-large","xx-small","bicubic","optimizespeed","grayscale","row","row-reverse","wrap","wrap-reverse","column-reverse","flex-start","flex-end","space-between","space-around", "unset"];

  var wordOperatorKeywords_ = ["in","and","or","not","is not","is a","is","isnt","defined","if unless"],
      blockKeywords_ = ["for","if","else","unless", "from", "to"],
      commonAtoms_ = ["null","true","false","href","title","type","not-allowed","readonly","disabled"],
      commonDef_ = ["@font-face", "@keyframes", "@media", "@viewport", "@page", "@host", "@supports", "@block", "@css"];

  var hintWords = tagKeywords_.concat(documentTypes_,mediaTypes_,mediaFeatures_,
                                      propertyKeywords_,nonStandardPropertyKeywords_,
                                      colorKeywords_,valueKeywords_,fontProperties_,
                                      wordOperatorKeywords_,blockKeywords_,
                                      commonAtoms_,commonDef_);

  function wordRegexp(words) {
    words = words.sort(function(a,b){return b > a;});
    return new RegExp("^((" + words.join(")|(") + "))\\b");
  }

  function keySet(array) {
    var keys = {};
    for (var i = 0; i < array.length; ++i) keys[array[i]] = true;
    return keys;
  }

  function escapeRegExp(text) {
    return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
  }

  CodeMirror.registerHelper("hintWords", "stylus", hintWords);
  CodeMirror.defineMIME("text/x-styl", "stylus");
});


/***/ }),

/***/ "76f2":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_message_box_vue_vue_type_style_index_0_id_ed5b8260_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cca");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_message_box_vue_vue_type_style_index_0_id_ed5b8260_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_message_box_vue_vue_type_style_index_0_id_ed5b8260_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_message_box_vue_vue_type_style_index_0_id_ed5b8260_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "77a7":
/***/ (function(module, exports) {

// IEEE754 conversions based on https://github.com/feross/ieee754
// eslint-disable-next-line no-shadow-restricted-names
var Infinity = 1 / 0;
var abs = Math.abs;
var pow = Math.pow;
var floor = Math.floor;
var log = Math.log;
var LN2 = Math.LN2;

var pack = function (number, mantissaLength, bytes) {
  var buffer = new Array(bytes);
  var exponentLength = bytes * 8 - mantissaLength - 1;
  var eMax = (1 << exponentLength) - 1;
  var eBias = eMax >> 1;
  var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;
  var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;
  var index = 0;
  var exponent, mantissa, c;
  number = abs(number);
  // eslint-disable-next-line no-self-compare
  if (number != number || number === Infinity) {
    // eslint-disable-next-line no-self-compare
    mantissa = number != number ? 1 : 0;
    exponent = eMax;
  } else {
    exponent = floor(log(number) / LN2);
    if (number * (c = pow(2, -exponent)) < 1) {
      exponent--;
      c *= 2;
    }
    if (exponent + eBias >= 1) {
      number += rt / c;
    } else {
      number += rt * pow(2, 1 - eBias);
    }
    if (number * c >= 2) {
      exponent++;
      c /= 2;
    }
    if (exponent + eBias >= eMax) {
      mantissa = 0;
      exponent = eMax;
    } else if (exponent + eBias >= 1) {
      mantissa = (number * c - 1) * pow(2, mantissaLength);
      exponent = exponent + eBias;
    } else {
      mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);
      exponent = 0;
    }
  }
  for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8);
  exponent = exponent << mantissaLength | mantissa;
  exponentLength += mantissaLength;
  for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8);
  buffer[--index] |= sign * 128;
  return buffer;
};

var unpack = function (buffer, mantissaLength) {
  var bytes = buffer.length;
  var exponentLength = bytes * 8 - mantissaLength - 1;
  var eMax = (1 << exponentLength) - 1;
  var eBias = eMax >> 1;
  var nBits = exponentLength - 7;
  var index = bytes - 1;
  var sign = buffer[index--];
  var exponent = sign & 127;
  var mantissa;
  sign >>= 7;
  for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8);
  mantissa = exponent & (1 << -nBits) - 1;
  exponent >>= -nBits;
  nBits += mantissaLength;
  for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8);
  if (exponent === 0) {
    exponent = 1 - eBias;
  } else if (exponent === eMax) {
    return mantissa ? NaN : sign ? -Infinity : Infinity;
  } else {
    mantissa = mantissa + pow(2, mantissaLength);
    exponent = exponent - eBias;
  } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);
};

module.exports = {
  pack: pack,
  unpack: unpack
};


/***/ }),

/***/ "77e9":
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__("7a41");
module.exports = function (it) {
  if (!isObject(it)) throw TypeError(it + ' is not an object!');
  return it;
};


/***/ }),

/***/ "7839":
/***/ (function(module, exports) {

// IE8- don't enum bug keys
module.exports = [
  'constructor',
  'hasOwnProperty',
  'isPrototypeOf',
  'propertyIsEnumerable',
  'toLocaleString',
  'toString',
  'valueOf'
];


/***/ }),

/***/ "79ef":
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;__webpack_require__("c975");

__webpack_require__("ac1f");

__webpack_require__("466d");

__webpack_require__("5319");

__webpack_require__("1276");

var _typeof = __webpack_require__("7037");

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function (mod) {
  if (( false ? undefined : _typeof(exports)) == "object" && ( false ? undefined : _typeof(module)) == "object") // CommonJS
    mod(__webpack_require__("f3a7"));else if (true) // AMD
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__("f3a7")], __WEBPACK_AMD_DEFINE_FACTORY__ = (mod),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else // Plain browser env
    {}
})(function (CodeMirror) {
  "use strict";

  CodeMirror.defineMode("atformula", function (config, parserConfig) {
    "use strict";

    var client = parserConfig.client || {},
        atoms = parserConfig.atoms || {
      "false": true,
      "true": true,
      "null": true
    },
        builtin = parserConfig.builtin || {},
        keywords = parserConfig.keywords || {},
        atKeywords = parserConfig.atKeywords || {},
        operatorChars = parserConfig.operatorChars || /^[*+\-%<>!=&|~^]/,
        support = parserConfig.support || {},
        hooks = parserConfig.hooks || {},
        dateSQL = parserConfig.dateSQL || {
      "date": true,
      "time": true,
      "timestamp": true
    },
        backslashStringEscapes = parserConfig.backslashStringEscapes !== false,
        brackets = parserConfig.brackets || /^[\{}\(\)\[\]]/,
        punctuation = parserConfig.punctuation || /^[;.,:]/,
        bokeys = parserConfig.bokeys || {};

    function tokenBase(stream, state) {
      var ch = stream.next();

      if (support.hexNumber && (ch == "0" && stream.match(/^[xX][0-9a-fA-F]+/) || (ch == "x" || ch == "X") && stream.match(/^'[0-9a-fA-F]+'/))) {
        return "number";
      } else if (brackets.test(ch)) {
        // brackets
        stream.eatWhile(brackets);
        return "bracket";
      } else if (punctuation.test(ch)) {
        // punctuation
        stream.eatWhile(punctuation);
        return "punctuation";
      } else {
        stream.eatWhile(/^[_\w\d]/); // var word = stream.current().toLowerCase();
        //取消转换为小写 add by zl on 2020-05-08 17:35:51

        var word = stream.current();
        if (dateSQL.hasOwnProperty(word) && (stream.match(/^( )+'[^']*'/) || stream.match(/^( )+"[^"]*"/))) return "number";
        if (atoms.hasOwnProperty(word)) return "atom";
        if (builtin.hasOwnProperty(word)) return "builtin";
        if (keywords.hasOwnProperty(word)) return "keyword";
        if (atKeywords.hasOwnProperty(word)) return "keyword";
        if (bokeys.hasOwnProperty(word)) return "param";
        return "test";
      }
    } // 'string', with char specified in quote escaped by '\'


    function tokenLiteral(quote) {
      return function (stream, state) {
        var escaped = false,
            ch;

        while ((ch = stream.next()) != null) {
          if (ch == quote && !escaped) {
            state.tokenize = tokenBase;
            break;
          }

          escaped = backslashStringEscapes && !escaped && ch == "\\";
        }

        return "string";
      };
    }

    function tokenComment(depth) {
      return function (stream, state) {
        var m = stream.match(/^.*?(\/\*|\*\/)/);
        if (!m) stream.skipToEnd();else if (m[1] == "/*") state.tokenize = tokenComment(depth + 1);else if (depth > 1) state.tokenize = tokenComment(depth - 1);else state.tokenize = tokenBase;
        return "comment";
      };
    }

    function pushContext(stream, state, type) {
      state.context = {
        prev: state.context,
        indent: stream.indentation(),
        col: stream.column(),
        type: type
      };
    }

    function popContext(state) {
      state.indent = state.context.indent;
      state.context = state.context.prev;
    }

    return {
      startState: function startState() {
        return {
          tokenize: tokenBase,
          context: null
        };
      },
      token: function token(stream, state) {
        if (stream.sol()) {
          if (state.context && state.context.align == null) state.context.align = false;
        }

        if (state.tokenize == tokenBase && stream.eatSpace()) return null;
        var style = state.tokenize(stream, state);
        if (style == "comment") return style;
        if (state.context && state.context.align == null) state.context.align = true;
        var tok = stream.current();
        if (tok == "(") pushContext(stream, state, ")");else if (tok == "[") pushContext(stream, state, "]");else if (state.context && state.context.type == tok) popContext(state);
        return style;
      },
      indent: function indent(state, textAfter) {
        var cx = state.context;
        if (!cx) return CodeMirror.Pass;
        var closing = textAfter.charAt(0) == cx.type;
        if (cx.align) return cx.col + (closing ? 0 : 1);else return cx.indent + (closing ? 0 : config.indentUnit);
      },
      blockCommentStart: "/*",
      blockCommentEnd: "*/",
      lineComment: support.commentSlashSlash ? "//" : support.commentHash ? "#" : "--",
      closeBrackets: "()[]{}''\"\"``"
    };
  });

  (function () {
    "use strict"; // these keywords are used by all SQL dialects (however, a mode can still overwrite it)

    var defaultAtExpressKeywords = "@AWS5SessionId() @AWS5WebURL(*url) @TaskSameHuman(*nextUserTaskDefId,isPerformer,taskInstId) @abs(*num) @activityDefDurationTime(taskInstId) @activityDefExt(taskInstId) @activityDefId(taskInstId) @activityDefName(taskInstId) @activityDefNo(taskInstId) @activityDefWarningTime(taskInstId) @and(*logical1,*logical2,logical3,logical4,logical5) @ascii(*str) @boItemPropVal(*boName,*fieldName,*prop) @calc(*expression) @char(*ascii) @clientIp @companyExt1(contextType,contextId) @companyExt2(contextType,contextId) @companyExt3(contextType,contextId) @companyExt4(contextType,contextId) @companyExt5(contextType,contextId) @companyId(contextType,contextId) @companyName(contextType,contextId) @companyNo(contextType,contextId) @companyType(contextType,contextId) @date() @date2Chinese(*date) @dateAdd(*datepart,*number,*date) @datetime() @dayOfMonth(date) @dayOfYear(date) @decode(*str) @departmentExt1(contextType,contextId) @departmentExt2(contextType,contextId) @departmentExt3(contextType,contextId) @departmentExt4(contextType,contextId) @departmentExt5(contextType,contextId) @departmentId(contextType,contextId) @departmentManager(isIgnoreMe,contextType,contextId) @departmentName(contextType,contextId) @departmentNo(contextType,contextId) @departmentPathId(contextType,contextId) @departmentPathName(contextType,contextId) @departmentType(contextType,contextId) @departmentZone(contextType,contextId) @deviceType() @dictValue(*dictKey,*itemNo,fieldName) @encode(*str) @equals(*str1,*str2) @execJXPath(*jxpath) @execJavaBean(*appId,*className,param) @form(*boName,*fieldName,processInstId) @formDefId() @formItemDefId() @formTheme @getAppName(appId) @getDWCondition(*fieldName,*fieldValue) @getHistoryTaskNum(@uid) @getJgdwType @getMyCreateTaskNum(@uid) @getProperty(*name,appId) @getTodoTaskNum(@uid) @gridAvg(*boName,*fieldName,sqlClause,processInstId) @gridCount(*boName,sqlClause,processInstId) @gridFirst(*boName,*fieldName,sqlClause,processInstId) @gridLast(*boName,*fieldName,sqlClause,processInstId) @gridMax(*boName,*fieldName,sqlClause,processInstId) @gridMin(*boName,*fieldName,sqlClause,processInstId) @gridSum(*boName,*fieldName,sqlClause,processInstId) @hour(datetime) @i18n(*key,*appId,lang) @if(*logical,*valueTrue,*valueFalse) @in(*str1,*str2,str3,str4,str5) @indexOf(*str1,*str2) @isActive(*appId) @isDepartmentManager(contextType,contextId) @isLeapYear(date) @isProcessEnd(contextType,contextId) @isSubProcess(contextType,contextId) @isTaskEnd(taskInstId) @lang() @lastIndexOf(*str1,*str2) @len(*str) @lessThan(*num1,*num2) @loadFile(*appId,*fileName) @lower(*str) @lpad(*str,*len,padStr) @max(*num1,*num2,num3,num4,num5) @md5(*str) @min(*num1,*num2,num3,num4,num5) @minute(datetime) @mod(*num1,*num2) @month(date) @monthBegin(date) @monthEnd(date) @nextDate(date) @nullValue(*str1,*str2) @numAdd(*num1,*num2,num3,num4,num5) @numDiv(*num1,*num2,scale) @numMul(*num1,*num2) @numSub(*num1,*num2,num3,num4,num5) @or(*logical1,*logical2,logical3,logical4,logical5) @parentForm(*boName,*parentBoName,*parentFieldName) @phonetic(*str) @portalUrl() @preDate(date) @processBusinessKey(contextType,contextId) @processComment(*activityId,*policy,contextType,contextId) @processCostTime(contextType,contextId) @processCreateTime(contextType,contextId) @processCreateUser(contextType,contextId) @processDefAppId(contextType,contextId) @processDefDurationTime(contextType,contextId) @processDefGroupId(contextType,contextId) @processDefGroupName(contextType,contextId) @processDefId(contextType,contextId) @processDefName(contextType,contextId) @processDefVersionId(contextType,contextId) @processDefWarningTime(contextType,contextId) @processEndTime(contextType,contextId) @processExpireTime(contextType,contextId) @processExt1(contextType,contextId) @processExt2(contextType,contextId) @processExt3(contextType,contextId) @processExt4(contextType,contextId) @processExt5(contextType,contextId) @processExt6(contextType,contextId) @processExt7(contextType,contextId) @processExt8(contextType,contextId) @processId(businessKey) @processParentId(contextType,contextId) @processParentTaskId(contextType,contextId) @processStartTime(contextType,contextId) @processStatus(contextType,contextId) @processTitle(contextType,contextId) @processVar(*varName,contextType,contextId) @quarter(date) @quarterBegin(date) @quarterEnd(date) @replace(*str,*oldStr,*newStr) @rmb(*num) @roleExt1(contextType,contextId) @roleExt2(contextType,contextId) @roleExt3(contextType,contextId) @roleExt4(contextType,contextId) @roleExt5(contextType,contextId) @roleName(contextType,contextId) @roleNameKey(contextType,contextId) @roleNoUsers(*no,delimiter) @roleUsers(*roleId,delimiter) @round(*num,scale) @rpad(*str,*len,padStr) @second(datetime) @sequence(varName,padLen,padStr) @sequenceMonth(varName,padLen,padStr) @sequenceYear(varName,padLen,padStr) @serverInstance() @serverProperty(*name) @sha256(*str,*password) @sid() @sqlClauseOfManager(*fieldName,isSubDepartment) @sqlSet(*sql,separator,cc) @sqlValue(*sql,cc) @strAdd(str1,str2) @substring(*str,begin,end) @sysProperty(name) @taskBeginTime(taskInstId) @taskCostTime(taskInstId) @taskDueTime(taskInstId) @taskEndTime(taskInstId) @taskExpireTime(taskInstId) @taskExt1(taskInstId) @taskExt2(taskInstId) @taskExt3(taskInstId) @taskExt4(taskInstId) @taskExt5(taskInstId) @taskExt6(taskInstId) @taskExt7(taskInstId) @taskExt8(taskInstId) @taskHumanType(taskInstId) @taskId() @taskOwner(taskInstId) @taskPreHumanTaskId(taskInstId) @taskPreTaskId(taskInstId) @taskPriority(taskInstId) @taskReadTime(taskInstId) @taskStatus(taskInstId) @taskTarget(taskInstId) @taskTitle(taskInstId) @teamUsers(*teamId,delimiter) @time(datetime) @timestemp() @trim(*str) @uid(uidAliasName,delimiter) @upper(*str) @urlDecode(*str) @urlEncode(*str,charset) @user(key,uidAliasName,delimiter) @userEmail(uidAliasName,delimiter) @userExt1(uidAliasName,delimiter) @userExt2(uidAliasName,delimiter) @userExt3(uidAliasName,delimiter) @userExt4(uidAliasName,delimiter) @userExt5(uidAliasName,delimiter) @userManager(uidAliasName,type,delimiter,includeSelf) @userMobile(uidAliasName,delimiter) @userName(uidAliasName,delimiter) @userNo(uidAliasName,delimiter) @userPhoto(uidAliasName) @userPositionLayer(uidAliasName,delimiter) @userPositionName(uidAliasName,delimiter) @userPositionNo(uidAliasName,delimiter) @userTel(uidAliasName,delimiter) @userUniqueId(uidAliasName,delimiter) @uuid() @weekDay(date) @weekOfYear(date) @year(date) ";
    var keywords = "SUM MAX MIN AVG COUNT ";
    var atParams = "";
    var isSeverKeys = false;
    var exPressData = typeof window.atExpressKeywords !== 'undefined' ? window : window.settingParam && typeof window.settingParam.atExpressKeywords !== 'undefined' ? window.settingParam : typeof settingParam !== 'undefined' ? eval("settingParam") : null;

    if (exPressData != null && exPressData.atExpressKeywords != null) {
      defaultAtExpressKeywords = exPressData.atExpressKeywords;
      isSeverKeys = true;
    } else {
      // 如果都不存在，则发送一个请求获取一下
      // awsuiaxios CMD:CLIENT_M_FORMULA_LIST
      // isSeverKeys = true;
      // 同时也把atParams获取一下
      keywords += defaultAtExpressKeywords.replace(/\(.*?\)/g, "");
    }

    if (atParams !== "") {
      if (exPressData != null && exPressData.atExpressParams != null) {
        atParams = exPressData.atExpressParams;
      }
    } // bo table,cell auto hint


    var boKeywords = "";

    if (exPressData != null && exPressData.boExpressKeywords != null) {
      boKeywords = exPressData.boExpressKeywords;
    } // turn a space-separated list into an array


    function set(str) {
      var obj = {},
          words = str.split(" ");

      for (var i = 0; i < words.length; ++i) {
        obj[words[i]] = true;
      }

      return obj;
    }

    function getKeyWords() {
      var obj = {};
      var jsonArr = {};

      if (isSeverKeys) {
        jsonArr = JSON.parse(defaultAtExpressKeywords);

        for (var _i = 0; _i < jsonArr.length; _i++) {
          var value = jsonArr[_i];
          obj[value.key] = value;
          keywords += value.key.replace(/\(.*?\)/g, " ");
        }
      } else {
        obj = set(defaultAtExpressKeywords);
      }

      for (var i = 0; i < boKeywords.length; i++) {
        obj[boKeywords[i].id] = boKeywords[i];
        keywords += boKeywords[i].id + " ";
        if (boKeywords[i].id.indexOf(".") > -1) keywords += boKeywords[i].id.split(".")[1] + " ";
      }

      return obj;
    }

    CodeMirror.defineMIME("awsAt", {
      name: "atformula",
      keywords: getKeyWords(),
      atKeywords: set(keywords),
      atoms: set("false true null unknown"),
      operatorChars: /^[*+\-%<>!=&|^]/,
      bokeys: set(atParams)
    });
  })();
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("62e4")(module)))

/***/ }),

/***/ "7a41":
/***/ (function(module, exports) {

module.exports = function (it) {
  return typeof it === 'object' ? it !== null : typeof it === 'function';
};


/***/ }),

/***/ "7a77":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


/**
 * A `Cancel` is an object that is thrown when an operation is canceled.
 *
 * @class
 * @param {string=} message The message.
 */
function Cancel(message) {
  this.message = message;
}

Cancel.prototype.toString = function toString() {
  return 'Cancel' + (this.message ? ': ' + this.message : '');
};

Cancel.prototype.__CANCEL__ = true;

module.exports = Cancel;


/***/ }),

/***/ "7aac":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");

module.exports = (
  utils.isStandardBrowserEnv() ?

  // Standard browser envs support document.cookie
    (function standardBrowserEnv() {
      return {
        write: function write(name, value, expires, path, domain, secure) {
          var cookie = [];
          cookie.push(name + '=' + encodeURIComponent(value));

          if (utils.isNumber(expires)) {
            cookie.push('expires=' + new Date(expires).toGMTString());
          }

          if (utils.isString(path)) {
            cookie.push('path=' + path);
          }

          if (utils.isString(domain)) {
            cookie.push('domain=' + domain);
          }

          if (secure === true) {
            cookie.push('secure');
          }

          document.cookie = cookie.join('; ');
        },

        read: function read(name) {
          var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
          return (match ? decodeURIComponent(match[3]) : null);
        },

        remove: function remove(name) {
          this.write(name, '', Date.now() - 86400000);
        }
      };
    })() :

  // Non standard browser env (web workers, react-native) lack needed support.
    (function nonStandardBrowserEnv() {
      return {
        write: function write() {},
        read: function read() { return null; },
        remove: function remove() {}
      };
    })()
);


/***/ }),

/***/ "7b00":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"));
  else {}
})(function(CodeMirror) {
"use strict";

CodeMirror.defineMode("css", function(config, parserConfig) {
  var inline = parserConfig.inline
  if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode("text/css");

  var indentUnit = config.indentUnit,
      tokenHooks = parserConfig.tokenHooks,
      documentTypes = parserConfig.documentTypes || {},
      mediaTypes = parserConfig.mediaTypes || {},
      mediaFeatures = parserConfig.mediaFeatures || {},
      mediaValueKeywords = parserConfig.mediaValueKeywords || {},
      propertyKeywords = parserConfig.propertyKeywords || {},
      nonStandardPropertyKeywords = parserConfig.nonStandardPropertyKeywords || {},
      fontProperties = parserConfig.fontProperties || {},
      counterDescriptors = parserConfig.counterDescriptors || {},
      colorKeywords = parserConfig.colorKeywords || {},
      valueKeywords = parserConfig.valueKeywords || {},
      allowNested = parserConfig.allowNested,
      lineComment = parserConfig.lineComment,
      supportsAtComponent = parserConfig.supportsAtComponent === true,
      highlightNonStandardPropertyKeywords = config.highlightNonStandardPropertyKeywords !== false;

  var type, override;
  function ret(style, tp) { type = tp; return style; }

  // Tokenizers

  function tokenBase(stream, state) {
    var ch = stream.next();
    if (tokenHooks[ch]) {
      var result = tokenHooks[ch](stream, state);
      if (result !== false) return result;
    }
    if (ch == "@") {
      stream.eatWhile(/[\w\\\-]/);
      return ret("def", stream.current());
    } else if (ch == "=" || (ch == "~" || ch == "|") && stream.eat("=")) {
      return ret(null, "compare");
    } else if (ch == "\"" || ch == "'") {
      state.tokenize = tokenString(ch);
      return state.tokenize(stream, state);
    } else if (ch == "#") {
      stream.eatWhile(/[\w\\\-]/);
      return ret("atom", "hash");
    } else if (ch == "!") {
      stream.match(/^\s*\w*/);
      return ret("keyword", "important");
    } else if (/\d/.test(ch) || ch == "." && stream.eat(/\d/)) {
      stream.eatWhile(/[\w.%]/);
      return ret("number", "unit");
    } else if (ch === "-") {
      if (/[\d.]/.test(stream.peek())) {
        stream.eatWhile(/[\w.%]/);
        return ret("number", "unit");
      } else if (stream.match(/^-[\w\\\-]*/)) {
        stream.eatWhile(/[\w\\\-]/);
        if (stream.match(/^\s*:/, false))
          return ret("variable-2", "variable-definition");
        return ret("variable-2", "variable");
      } else if (stream.match(/^\w+-/)) {
        return ret("meta", "meta");
      }
    } else if (/[,+>*\/]/.test(ch)) {
      return ret(null, "select-op");
    } else if (ch == "." && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) {
      return ret("qualifier", "qualifier");
    } else if (/[:;{}\[\]\(\)]/.test(ch)) {
      return ret(null, ch);
    } else if (stream.match(/[\w-.]+(?=\()/)) {
      if (/^(url(-prefix)?|domain|regexp)$/.test(stream.current().toLowerCase())) {
        state.tokenize = tokenParenthesized;
      }
      return ret("variable callee", "variable");
    } else if (/[\w\\\-]/.test(ch)) {
      stream.eatWhile(/[\w\\\-]/);
      return ret("property", "word");
    } else {
      return ret(null, null);
    }
  }

  function tokenString(quote) {
    return function(stream, state) {
      var escaped = false, ch;
      while ((ch = stream.next()) != null) {
        if (ch == quote && !escaped) {
          if (quote == ")") stream.backUp(1);
          break;
        }
        escaped = !escaped && ch == "\\";
      }
      if (ch == quote || !escaped && quote != ")") state.tokenize = null;
      return ret("string", "string");
    };
  }

  function tokenParenthesized(stream, state) {
    stream.next(); // Must be '('
    if (!stream.match(/\s*[\"\')]/, false))
      state.tokenize = tokenString(")");
    else
      state.tokenize = null;
    return ret(null, "(");
  }

  // Context management

  function Context(type, indent, prev) {
    this.type = type;
    this.indent = indent;
    this.prev = prev;
  }

  function pushContext(state, stream, type, indent) {
    state.context = new Context(type, stream.indentation() + (indent === false ? 0 : indentUnit), state.context);
    return type;
  }

  function popContext(state) {
    if (state.context.prev)
      state.context = state.context.prev;
    return state.context.type;
  }

  function pass(type, stream, state) {
    return states[state.context.type](type, stream, state);
  }
  function popAndPass(type, stream, state, n) {
    for (var i = n || 1; i > 0; i--)
      state.context = state.context.prev;
    return pass(type, stream, state);
  }

  // Parser

  function wordAsValue(stream) {
    var word = stream.current().toLowerCase();
    if (valueKeywords.hasOwnProperty(word))
      override = "atom";
    else if (colorKeywords.hasOwnProperty(word))
      override = "keyword";
    else
      override = "variable";
  }

  var states = {};

  states.top = function(type, stream, state) {
    if (type == "{") {
      return pushContext(state, stream, "block");
    } else if (type == "}" && state.context.prev) {
      return popContext(state);
    } else if (supportsAtComponent && /@component/i.test(type)) {
      return pushContext(state, stream, "atComponentBlock");
    } else if (/^@(-moz-)?document$/i.test(type)) {
      return pushContext(state, stream, "documentTypes");
    } else if (/^@(media|supports|(-moz-)?document|import)$/i.test(type)) {
      return pushContext(state, stream, "atBlock");
    } else if (/^@(font-face|counter-style)/i.test(type)) {
      state.stateArg = type;
      return "restricted_atBlock_before";
    } else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(type)) {
      return "keyframes";
    } else if (type && type.charAt(0) == "@") {
      return pushContext(state, stream, "at");
    } else if (type == "hash") {
      override = "builtin";
    } else if (type == "word") {
      override = "tag";
    } else if (type == "variable-definition") {
      return "maybeprop";
    } else if (type == "interpolation") {
      return pushContext(state, stream, "interpolation");
    } else if (type == ":") {
      return "pseudo";
    } else if (allowNested && type == "(") {
      return pushContext(state, stream, "parens");
    }
    return state.context.type;
  };

  states.block = function(type, stream, state) {
    if (type == "word") {
      var word = stream.current().toLowerCase();
      if (propertyKeywords.hasOwnProperty(word)) {
        override = "property";
        return "maybeprop";
      } else if (nonStandardPropertyKeywords.hasOwnProperty(word)) {
        override = highlightNonStandardPropertyKeywords ? "string-2" : "property";
        return "maybeprop";
      } else if (allowNested) {
        override = stream.match(/^\s*:(?:\s|$)/, false) ? "property" : "tag";
        return "block";
      } else {
        override += " error";
        return "maybeprop";
      }
    } else if (type == "meta") {
      return "block";
    } else if (!allowNested && (type == "hash" || type == "qualifier")) {
      override = "error";
      return "block";
    } else {
      return states.top(type, stream, state);
    }
  };

  states.maybeprop = function(type, stream, state) {
    if (type == ":") return pushContext(state, stream, "prop");
    return pass(type, stream, state);
  };

  states.prop = function(type, stream, state) {
    if (type == ";") return popContext(state);
    if (type == "{" && allowNested) return pushContext(state, stream, "propBlock");
    if (type == "}" || type == "{") return popAndPass(type, stream, state);
    if (type == "(") return pushContext(state, stream, "parens");

    if (type == "hash" && !/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(stream.current())) {
      override += " error";
    } else if (type == "word") {
      wordAsValue(stream);
    } else if (type == "interpolation") {
      return pushContext(state, stream, "interpolation");
    }
    return "prop";
  };

  states.propBlock = function(type, _stream, state) {
    if (type == "}") return popContext(state);
    if (type == "word") { override = "property"; return "maybeprop"; }
    return state.context.type;
  };

  states.parens = function(type, stream, state) {
    if (type == "{" || type == "}") return popAndPass(type, stream, state);
    if (type == ")") return popContext(state);
    if (type == "(") return pushContext(state, stream, "parens");
    if (type == "interpolation") return pushContext(state, stream, "interpolation");
    if (type == "word") wordAsValue(stream);
    return "parens";
  };

  states.pseudo = function(type, stream, state) {
    if (type == "meta") return "pseudo";

    if (type == "word") {
      override = "variable-3";
      return state.context.type;
    }
    return pass(type, stream, state);
  };

  states.documentTypes = function(type, stream, state) {
    if (type == "word" && documentTypes.hasOwnProperty(stream.current())) {
      override = "tag";
      return state.context.type;
    } else {
      return states.atBlock(type, stream, state);
    }
  };

  states.atBlock = function(type, stream, state) {
    if (type == "(") return pushContext(state, stream, "atBlock_parens");
    if (type == "}" || type == ";") return popAndPass(type, stream, state);
    if (type == "{") return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top");

    if (type == "interpolation") return pushContext(state, stream, "interpolation");

    if (type == "word") {
      var word = stream.current().toLowerCase();
      if (word == "only" || word == "not" || word == "and" || word == "or")
        override = "keyword";
      else if (mediaTypes.hasOwnProperty(word))
        override = "attribute";
      else if (mediaFeatures.hasOwnProperty(word))
        override = "property";
      else if (mediaValueKeywords.hasOwnProperty(word))
        override = "keyword";
      else if (propertyKeywords.hasOwnProperty(word))
        override = "property";
      else if (nonStandardPropertyKeywords.hasOwnProperty(word))
        override = highlightNonStandardPropertyKeywords ? "string-2" : "property";
      else if (valueKeywords.hasOwnProperty(word))
        override = "atom";
      else if (colorKeywords.hasOwnProperty(word))
        override = "keyword";
      else
        override = "error";
    }
    return state.context.type;
  };

  states.atComponentBlock = function(type, stream, state) {
    if (type == "}")
      return popAndPass(type, stream, state);
    if (type == "{")
      return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top", false);
    if (type == "word")
      override = "error";
    return state.context.type;
  };

  states.atBlock_parens = function(type, stream, state) {
    if (type == ")") return popContext(state);
    if (type == "{" || type == "}") return popAndPass(type, stream, state, 2);
    return states.atBlock(type, stream, state);
  };

  states.restricted_atBlock_before = function(type, stream, state) {
    if (type == "{")
      return pushContext(state, stream, "restricted_atBlock");
    if (type == "word" && state.stateArg == "@counter-style") {
      override = "variable";
      return "restricted_atBlock_before";
    }
    return pass(type, stream, state);
  };

  states.restricted_atBlock = function(type, stream, state) {
    if (type == "}") {
      state.stateArg = null;
      return popContext(state);
    }
    if (type == "word") {
      if ((state.stateArg == "@font-face" && !fontProperties.hasOwnProperty(stream.current().toLowerCase())) ||
          (state.stateArg == "@counter-style" && !counterDescriptors.hasOwnProperty(stream.current().toLowerCase())))
        override = "error";
      else
        override = "property";
      return "maybeprop";
    }
    return "restricted_atBlock";
  };

  states.keyframes = function(type, stream, state) {
    if (type == "word") { override = "variable"; return "keyframes"; }
    if (type == "{") return pushContext(state, stream, "top");
    return pass(type, stream, state);
  };

  states.at = function(type, stream, state) {
    if (type == ";") return popContext(state);
    if (type == "{" || type == "}") return popAndPass(type, stream, state);
    if (type == "word") override = "tag";
    else if (type == "hash") override = "builtin";
    return "at";
  };

  states.interpolation = function(type, stream, state) {
    if (type == "}") return popContext(state);
    if (type == "{" || type == ";") return popAndPass(type, stream, state);
    if (type == "word") override = "variable";
    else if (type != "variable" && type != "(" && type != ")") override = "error";
    return "interpolation";
  };

  return {
    startState: function(base) {
      return {tokenize: null,
              state: inline ? "block" : "top",
              stateArg: null,
              context: new Context(inline ? "block" : "top", base || 0, null)};
    },

    token: function(stream, state) {
      if (!state.tokenize && stream.eatSpace()) return null;
      var style = (state.tokenize || tokenBase)(stream, state);
      if (style && typeof style == "object") {
        type = style[1];
        style = style[0];
      }
      override = style;
      if (type != "comment")
        state.state = states[state.state](type, stream, state);
      return override;
    },

    indent: function(state, textAfter) {
      var cx = state.context, ch = textAfter && textAfter.charAt(0);
      var indent = cx.indent;
      if (cx.type == "prop" && (ch == "}" || ch == ")")) cx = cx.prev;
      if (cx.prev) {
        if (ch == "}" && (cx.type == "block" || cx.type == "top" ||
                          cx.type == "interpolation" || cx.type == "restricted_atBlock")) {
          // Resume indentation from parent context.
          cx = cx.prev;
          indent = cx.indent;
        } else if (ch == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") ||
            ch == "{" && (cx.type == "at" || cx.type == "atBlock")) {
          // Dedent relative to current context.
          indent = Math.max(0, cx.indent - indentUnit);
        }
      }
      return indent;
    },

    electricChars: "}",
    blockCommentStart: "/*",
    blockCommentEnd: "*/",
    blockCommentContinue: " * ",
    lineComment: lineComment,
    fold: "brace"
  };
});

  function keySet(array) {
    var keys = {};
    for (var i = 0; i < array.length; ++i) {
      keys[array[i].toLowerCase()] = true;
    }
    return keys;
  }

  var documentTypes_ = [
    "domain", "regexp", "url", "url-prefix"
  ], documentTypes = keySet(documentTypes_);

  var mediaTypes_ = [
    "all", "aural", "braille", "handheld", "print", "projection", "screen",
    "tty", "tv", "embossed"
  ], mediaTypes = keySet(mediaTypes_);

  var mediaFeatures_ = [
    "width", "min-width", "max-width", "height", "min-height", "max-height",
    "device-width", "min-device-width", "max-device-width", "device-height",
    "min-device-height", "max-device-height", "aspect-ratio",
    "min-aspect-ratio", "max-aspect-ratio", "device-aspect-ratio",
    "min-device-aspect-ratio", "max-device-aspect-ratio", "color", "min-color",
    "max-color", "color-index", "min-color-index", "max-color-index",
    "monochrome", "min-monochrome", "max-monochrome", "resolution",
    "min-resolution", "max-resolution", "scan", "grid", "orientation",
    "device-pixel-ratio", "min-device-pixel-ratio", "max-device-pixel-ratio",
    "pointer", "any-pointer", "hover", "any-hover", "prefers-color-scheme"
  ], mediaFeatures = keySet(mediaFeatures_);

  var mediaValueKeywords_ = [
    "landscape", "portrait", "none", "coarse", "fine", "on-demand", "hover",
    "interlace", "progressive",
    "dark", "light"
  ], mediaValueKeywords = keySet(mediaValueKeywords_);

  var propertyKeywords_ = [
    "align-content", "align-items", "align-self", "alignment-adjust",
    "alignment-baseline", "all", "anchor-point", "animation", "animation-delay",
    "animation-direction", "animation-duration", "animation-fill-mode",
    "animation-iteration-count", "animation-name", "animation-play-state",
    "animation-timing-function", "appearance", "azimuth", "backdrop-filter",
    "backface-visibility", "background", "background-attachment",
    "background-blend-mode", "background-clip", "background-color",
    "background-image", "background-origin", "background-position",
    "background-position-x", "background-position-y", "background-repeat",
    "background-size", "baseline-shift", "binding", "bleed", "block-size",
    "bookmark-label", "bookmark-level", "bookmark-state", "bookmark-target",
    "border", "border-bottom", "border-bottom-color", "border-bottom-left-radius",
    "border-bottom-right-radius", "border-bottom-style", "border-bottom-width",
    "border-collapse", "border-color", "border-image", "border-image-outset",
    "border-image-repeat", "border-image-slice", "border-image-source",
    "border-image-width", "border-left", "border-left-color", "border-left-style",
    "border-left-width", "border-radius", "border-right", "border-right-color",
    "border-right-style", "border-right-width", "border-spacing", "border-style",
    "border-top", "border-top-color", "border-top-left-radius",
    "border-top-right-radius", "border-top-style", "border-top-width",
    "border-width", "bottom", "box-decoration-break", "box-shadow", "box-sizing",
    "break-after", "break-before", "break-inside", "caption-side", "caret-color",
    "clear", "clip", "color", "color-profile", "column-count", "column-fill",
    "column-gap", "column-rule", "column-rule-color", "column-rule-style",
    "column-rule-width", "column-span", "column-width", "columns", "contain",
    "content", "counter-increment", "counter-reset", "crop", "cue", "cue-after",
    "cue-before", "cursor", "direction", "display", "dominant-baseline",
    "drop-initial-after-adjust", "drop-initial-after-align",
    "drop-initial-before-adjust", "drop-initial-before-align", "drop-initial-size",
    "drop-initial-value", "elevation", "empty-cells", "fit", "fit-position",
    "flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow",
    "flex-shrink", "flex-wrap", "float", "float-offset", "flow-from", "flow-into",
    "font", "font-family", "font-feature-settings", "font-kerning",
    "font-language-override", "font-optical-sizing", "font-size",
    "font-size-adjust", "font-stretch", "font-style", "font-synthesis",
    "font-variant", "font-variant-alternates", "font-variant-caps",
    "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric",
    "font-variant-position", "font-variation-settings", "font-weight", "gap",
    "grid", "grid-area", "grid-auto-columns", "grid-auto-flow", "grid-auto-rows",
    "grid-column", "grid-column-end", "grid-column-gap", "grid-column-start",
    "grid-gap", "grid-row", "grid-row-end", "grid-row-gap", "grid-row-start",
    "grid-template", "grid-template-areas", "grid-template-columns",
    "grid-template-rows", "hanging-punctuation", "height", "hyphens", "icon",
    "image-orientation", "image-rendering", "image-resolution", "inline-box-align",
    "inset", "inset-block", "inset-block-end", "inset-block-start", "inset-inline",
    "inset-inline-end", "inset-inline-start", "isolation", "justify-content",
    "justify-items", "justify-self", "left", "letter-spacing", "line-break",
    "line-height", "line-height-step", "line-stacking", "line-stacking-ruby",
    "line-stacking-shift", "line-stacking-strategy", "list-style",
    "list-style-image", "list-style-position", "list-style-type", "margin",
    "margin-bottom", "margin-left", "margin-right", "margin-top", "marks",
    "marquee-direction", "marquee-loop", "marquee-play-count", "marquee-speed",
    "marquee-style", "mask-clip", "mask-composite", "mask-image", "mask-mode",
    "mask-origin", "mask-position", "mask-repeat", "mask-size","mask-type",
    "max-block-size", "max-height", "max-inline-size",
    "max-width", "min-block-size", "min-height", "min-inline-size", "min-width",
    "mix-blend-mode", "move-to", "nav-down", "nav-index", "nav-left", "nav-right",
    "nav-up", "object-fit", "object-position", "offset", "offset-anchor",
    "offset-distance", "offset-path", "offset-position", "offset-rotate",
    "opacity", "order", "orphans", "outline", "outline-color", "outline-offset",
    "outline-style", "outline-width", "overflow", "overflow-style",
    "overflow-wrap", "overflow-x", "overflow-y", "padding", "padding-bottom",
    "padding-left", "padding-right", "padding-top", "page", "page-break-after",
    "page-break-before", "page-break-inside", "page-policy", "pause",
    "pause-after", "pause-before", "perspective", "perspective-origin", "pitch",
    "pitch-range", "place-content", "place-items", "place-self", "play-during",
    "position", "presentation-level", "punctuation-trim", "quotes",
    "region-break-after", "region-break-before", "region-break-inside",
    "region-fragment", "rendering-intent", "resize", "rest", "rest-after",
    "rest-before", "richness", "right", "rotate", "rotation", "rotation-point",
    "row-gap", "ruby-align", "ruby-overhang", "ruby-position", "ruby-span",
    "scale", "scroll-behavior", "scroll-margin", "scroll-margin-block",
    "scroll-margin-block-end", "scroll-margin-block-start", "scroll-margin-bottom",
    "scroll-margin-inline", "scroll-margin-inline-end",
    "scroll-margin-inline-start", "scroll-margin-left", "scroll-margin-right",
    "scroll-margin-top", "scroll-padding", "scroll-padding-block",
    "scroll-padding-block-end", "scroll-padding-block-start",
    "scroll-padding-bottom", "scroll-padding-inline", "scroll-padding-inline-end",
    "scroll-padding-inline-start", "scroll-padding-left", "scroll-padding-right",
    "scroll-padding-top", "scroll-snap-align", "scroll-snap-type",
    "shape-image-threshold", "shape-inside", "shape-margin", "shape-outside",
    "size", "speak", "speak-as", "speak-header", "speak-numeral",
    "speak-punctuation", "speech-rate", "stress", "string-set", "tab-size",
    "table-layout", "target", "target-name", "target-new", "target-position",
    "text-align", "text-align-last", "text-combine-upright", "text-decoration",
    "text-decoration-color", "text-decoration-line", "text-decoration-skip",
    "text-decoration-skip-ink", "text-decoration-style", "text-emphasis",
    "text-emphasis-color", "text-emphasis-position", "text-emphasis-style",
    "text-height", "text-indent", "text-justify", "text-orientation",
    "text-outline", "text-overflow", "text-rendering", "text-shadow",
    "text-size-adjust", "text-space-collapse", "text-transform",
    "text-underline-position", "text-wrap", "top", "touch-action", "transform", "transform-origin",
    "transform-style", "transition", "transition-delay", "transition-duration",
    "transition-property", "transition-timing-function", "translate",
    "unicode-bidi", "user-select", "vertical-align", "visibility", "voice-balance",
    "voice-duration", "voice-family", "voice-pitch", "voice-range", "voice-rate",
    "voice-stress", "voice-volume", "volume", "white-space", "widows", "width",
    "will-change", "word-break", "word-spacing", "word-wrap", "writing-mode", "z-index",
    // SVG-specific
    "clip-path", "clip-rule", "mask", "enable-background", "filter", "flood-color",
    "flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events",
    "color-interpolation", "color-interpolation-filters",
    "color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering",
    "marker", "marker-end", "marker-mid", "marker-start", "paint-order", "shape-rendering", "stroke",
    "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin",
    "stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering",
    "baseline-shift", "dominant-baseline", "glyph-orientation-horizontal",
    "glyph-orientation-vertical", "text-anchor", "writing-mode",
  ], propertyKeywords = keySet(propertyKeywords_);

  var nonStandardPropertyKeywords_ = [
    "border-block", "border-block-color", "border-block-end",
    "border-block-end-color", "border-block-end-style", "border-block-end-width",
    "border-block-start", "border-block-start-color", "border-block-start-style",
    "border-block-start-width", "border-block-style", "border-block-width",
    "border-inline", "border-inline-color", "border-inline-end",
    "border-inline-end-color", "border-inline-end-style",
    "border-inline-end-width", "border-inline-start", "border-inline-start-color",
    "border-inline-start-style", "border-inline-start-width",
    "border-inline-style", "border-inline-width", "margin-block",
    "margin-block-end", "margin-block-start", "margin-inline", "margin-inline-end",
    "margin-inline-start", "padding-block", "padding-block-end",
    "padding-block-start", "padding-inline", "padding-inline-end",
    "padding-inline-start", "scroll-snap-stop", "scrollbar-3d-light-color",
    "scrollbar-arrow-color", "scrollbar-base-color", "scrollbar-dark-shadow-color",
    "scrollbar-face-color", "scrollbar-highlight-color", "scrollbar-shadow-color",
    "scrollbar-track-color", "searchfield-cancel-button", "searchfield-decoration",
    "searchfield-results-button", "searchfield-results-decoration", "shape-inside", "zoom"
  ], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_);

  var fontProperties_ = [
    "font-display", "font-family", "src", "unicode-range", "font-variant",
     "font-feature-settings", "font-stretch", "font-weight", "font-style"
  ], fontProperties = keySet(fontProperties_);

  var counterDescriptors_ = [
    "additive-symbols", "fallback", "negative", "pad", "prefix", "range",
    "speak-as", "suffix", "symbols", "system"
  ], counterDescriptors = keySet(counterDescriptors_);

  var colorKeywords_ = [
    "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige",
    "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown",
    "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue",
    "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod",
    "darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen",
    "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen",
    "darkslateblue", "darkslategray", "darkturquoise", "darkviolet",
    "deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick",
    "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite",
    "gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew",
    "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender",
    "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral",
    "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightpink",
    "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray",
    "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta",
    "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple",
    "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise",
    "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin",
    "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered",
    "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred",
    "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue",
    "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown",
    "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue",
    "slateblue", "slategray", "snow", "springgreen", "steelblue", "tan",
    "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white",
    "whitesmoke", "yellow", "yellowgreen"
  ], colorKeywords = keySet(colorKeywords_);

  var valueKeywords_ = [
    "above", "absolute", "activeborder", "additive", "activecaption", "afar",
    "after-white-space", "ahead", "alias", "all", "all-scroll", "alphabetic", "alternate",
    "always", "amharic", "amharic-abegede", "antialiased", "appworkspace",
    "arabic-indic", "armenian", "asterisks", "attr", "auto", "auto-flow", "avoid", "avoid-column", "avoid-page",
    "avoid-region", "axis-pan", "background", "backwards", "baseline", "below", "bidi-override", "binary",
    "bengali", "blink", "block", "block-axis", "bold", "bolder", "border", "border-box",
    "both", "bottom", "break", "break-all", "break-word", "bullets", "button", "button-bevel",
    "buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "cambodian",
    "capitalize", "caps-lock-indicator", "caption", "captiontext", "caret",
    "cell", "center", "checkbox", "circle", "cjk-decimal", "cjk-earthly-branch",
    "cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote",
    "col-resize", "collapse", "color", "color-burn", "color-dodge", "column", "column-reverse",
    "compact", "condensed", "contain", "content", "contents",
    "content-box", "context-menu", "continuous", "copy", "counter", "counters", "cover", "crop",
    "cross", "crosshair", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal",
    "decimal-leading-zero", "default", "default-button", "dense", "destination-atop",
    "destination-in", "destination-out", "destination-over", "devanagari", "difference",
    "disc", "discard", "disclosure-closed", "disclosure-open", "document",
    "dot-dash", "dot-dot-dash",
    "dotted", "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out",
    "element", "ellipse", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede",
    "ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er",
    "ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er",
    "ethiopic-halehame-aa-et", "ethiopic-halehame-am-et",
    "ethiopic-halehame-gez", "ethiopic-halehame-om-et",
    "ethiopic-halehame-sid-et", "ethiopic-halehame-so-et",
    "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig",
    "ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed",
    "extra-expanded", "fantasy", "fast", "fill", "fill-box", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes",
    "forwards", "from", "geometricPrecision", "georgian", "graytext", "grid", "groove",
    "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew",
    "help", "hidden", "hide", "higher", "highlight", "highlighttext",
    "hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "hue", "icon", "ignore",
    "inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite",
    "infobackground", "infotext", "inherit", "initial", "inline", "inline-axis",
    "inline-block", "inline-flex", "inline-grid", "inline-table", "inset", "inside", "intrinsic", "invert",
    "italic", "japanese-formal", "japanese-informal", "justify", "kannada",
    "katakana", "katakana-iroha", "keep-all", "khmer",
    "korean-hangul-formal", "korean-hanja-formal", "korean-hanja-informal",
    "landscape", "lao", "large", "larger", "left", "level", "lighter", "lighten",
    "line-through", "linear", "linear-gradient", "lines", "list-item", "listbox", "listitem",
    "local", "logical", "loud", "lower", "lower-alpha", "lower-armenian",
    "lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian",
    "lower-roman", "lowercase", "ltr", "luminosity", "malayalam", "manipulation", "match", "matrix", "matrix3d",
    "media-controls-background", "media-current-time-display",
    "media-fullscreen-button", "media-mute-button", "media-play-button",
    "media-return-to-realtime-button", "media-rewind-button",
    "media-seek-back-button", "media-seek-forward-button", "media-slider",
    "media-sliderthumb", "media-time-remaining-display", "media-volume-slider",
    "media-volume-slider-container", "media-volume-sliderthumb", "medium",
    "menu", "menulist", "menulist-button", "menulist-text",
    "menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic",
    "mix", "mongolian", "monospace", "move", "multiple", "multiple_mask_images", "multiply", "myanmar", "n-resize",
    "narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop",
    "no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap",
    "ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize", "oblique", "octal", "opacity", "open-quote",
    "optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset",
    "outside", "outside-shape", "overlay", "overline", "padding", "padding-box",
    "painted", "page", "paused", "persian", "perspective", "pinch-zoom", "plus-darker", "plus-lighter",
    "pointer", "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d",
    "progress", "push-button", "radial-gradient", "radio", "read-only",
    "read-write", "read-write-plaintext-only", "rectangle", "region",
    "relative", "repeat", "repeating-linear-gradient",
    "repeating-radial-gradient", "repeat-x", "repeat-y", "reset", "reverse",
    "rgb", "rgba", "ridge", "right", "rotate", "rotate3d", "rotateX", "rotateY",
    "rotateZ", "round", "row", "row-resize", "row-reverse", "rtl", "run-in", "running",
    "s-resize", "sans-serif", "saturation", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "screen",
    "scroll", "scrollbar", "scroll-position", "se-resize", "searchfield",
    "searchfield-cancel-button", "searchfield-decoration",
    "searchfield-results-button", "searchfield-results-decoration", "self-start", "self-end",
    "semi-condensed", "semi-expanded", "separate", "serif", "show", "sidama",
    "simp-chinese-formal", "simp-chinese-informal", "single",
    "skew", "skewX", "skewY", "skip-white-space", "slide", "slider-horizontal",
    "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",
    "small", "small-caps", "small-caption", "smaller", "soft-light", "solid", "somali",
    "source-atop", "source-in", "source-out", "source-over", "space", "space-around", "space-between", "space-evenly", "spell-out", "square",
    "square-button", "start", "static", "status-bar", "stretch", "stroke", "stroke-box", "sub",
    "subpixel-antialiased", "svg_masks", "super", "sw-resize", "symbolic", "symbols", "system-ui", "table",
    "table-caption", "table-cell", "table-column", "table-column-group",
    "table-footer-group", "table-header-group", "table-row", "table-row-group",
    "tamil",
    "telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai",
    "thick", "thin", "threeddarkshadow", "threedface", "threedhighlight",
    "threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er",
    "tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top",
    "trad-chinese-formal", "trad-chinese-informal", "transform",
    "translate", "translate3d", "translateX", "translateY", "translateZ",
    "transparent", "ultra-condensed", "ultra-expanded", "underline", "unidirectional-pan", "unset", "up",
    "upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal",
    "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url",
    "var", "vertical", "vertical-text", "view-box", "visible", "visibleFill", "visiblePainted",
    "visibleStroke", "visual", "w-resize", "wait", "wave", "wider",
    "window", "windowframe", "windowtext", "words", "wrap", "wrap-reverse", "x-large", "x-small", "xor",
    "xx-large", "xx-small"
  ], valueKeywords = keySet(valueKeywords_);

  var allWords = documentTypes_.concat(mediaTypes_).concat(mediaFeatures_).concat(mediaValueKeywords_)
    .concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_)
    .concat(valueKeywords_);
  CodeMirror.registerHelper("hintWords", "css", allWords);

  function tokenCComment(stream, state) {
    var maybeEnd = false, ch;
    while ((ch = stream.next()) != null) {
      if (maybeEnd && ch == "/") {
        state.tokenize = null;
        break;
      }
      maybeEnd = (ch == "*");
    }
    return ["comment", "comment"];
  }

  CodeMirror.defineMIME("text/css", {
    documentTypes: documentTypes,
    mediaTypes: mediaTypes,
    mediaFeatures: mediaFeatures,
    mediaValueKeywords: mediaValueKeywords,
    propertyKeywords: propertyKeywords,
    nonStandardPropertyKeywords: nonStandardPropertyKeywords,
    fontProperties: fontProperties,
    counterDescriptors: counterDescriptors,
    colorKeywords: colorKeywords,
    valueKeywords: valueKeywords,
    tokenHooks: {
      "/": function(stream, state) {
        if (!stream.eat("*")) return false;
        state.tokenize = tokenCComment;
        return tokenCComment(stream, state);
      }
    },
    name: "css"
  });

  CodeMirror.defineMIME("text/x-scss", {
    mediaTypes: mediaTypes,
    mediaFeatures: mediaFeatures,
    mediaValueKeywords: mediaValueKeywords,
    propertyKeywords: propertyKeywords,
    nonStandardPropertyKeywords: nonStandardPropertyKeywords,
    colorKeywords: colorKeywords,
    valueKeywords: valueKeywords,
    fontProperties: fontProperties,
    allowNested: true,
    lineComment: "//",
    tokenHooks: {
      "/": function(stream, state) {
        if (stream.eat("/")) {
          stream.skipToEnd();
          return ["comment", "comment"];
        } else if (stream.eat("*")) {
          state.tokenize = tokenCComment;
          return tokenCComment(stream, state);
        } else {
          return ["operator", "operator"];
        }
      },
      ":": function(stream) {
        if (stream.match(/\s*\{/, false))
          return [null, null]
        return false;
      },
      "$": function(stream) {
        stream.match(/^[\w-]+/);
        if (stream.match(/^\s*:/, false))
          return ["variable-2", "variable-definition"];
        return ["variable-2", "variable"];
      },
      "#": function(stream) {
        if (!stream.eat("{")) return false;
        return [null, "interpolation"];
      }
    },
    name: "css",
    helperType: "scss"
  });

  CodeMirror.defineMIME("text/x-less", {
    mediaTypes: mediaTypes,
    mediaFeatures: mediaFeatures,
    mediaValueKeywords: mediaValueKeywords,
    propertyKeywords: propertyKeywords,
    nonStandardPropertyKeywords: nonStandardPropertyKeywords,
    colorKeywords: colorKeywords,
    valueKeywords: valueKeywords,
    fontProperties: fontProperties,
    allowNested: true,
    lineComment: "//",
    tokenHooks: {
      "/": function(stream, state) {
        if (stream.eat("/")) {
          stream.skipToEnd();
          return ["comment", "comment"];
        } else if (stream.eat("*")) {
          state.tokenize = tokenCComment;
          return tokenCComment(stream, state);
        } else {
          return ["operator", "operator"];
        }
      },
      "@": function(stream) {
        if (stream.eat("{")) return [null, "interpolation"];
        if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i, false)) return false;
        stream.eatWhile(/[\w\\\-]/);
        if (stream.match(/^\s*:/, false))
          return ["variable-2", "variable-definition"];
        return ["variable-2", "variable"];
      },
      "&": function() {
        return ["atom", "atom"];
      }
    },
    name: "css",
    helperType: "less"
  });

  CodeMirror.defineMIME("text/x-gss", {
    documentTypes: documentTypes,
    mediaTypes: mediaTypes,
    mediaFeatures: mediaFeatures,
    propertyKeywords: propertyKeywords,
    nonStandardPropertyKeywords: nonStandardPropertyKeywords,
    fontProperties: fontProperties,
    counterDescriptors: counterDescriptors,
    colorKeywords: colorKeywords,
    valueKeywords: valueKeywords,
    supportsAtComponent: true,
    tokenHooks: {
      "/": function(stream, state) {
        if (!stream.eat("*")) return false;
        state.tokenize = tokenCComment;
        return tokenCComment(stream, state);
      }
    },
    name: "css",
    helperType: "gss"
  });

});


/***/ }),

/***/ "7b0b":
/***/ (function(module, exports, __webpack_require__) {

var requireObjectCoercible = __webpack_require__("1d80");

// `ToObject` abstract operation
// https://tc39.github.io/ecma262/#sec-toobject
module.exports = function (argument) {
  return Object(requireObjectCoercible(argument));
};


/***/ }),

/***/ "7b3e":
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/**
 * Copyright 2013-2015, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule isEventSupported
 */



var ExecutionEnvironment = __webpack_require__("a3de");

var useHasFeature;
if (ExecutionEnvironment.canUseDOM) {
  useHasFeature =
    document.implementation &&
    document.implementation.hasFeature &&
    // always returns true in newer browsers as per the standard.
    // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
    document.implementation.hasFeature('', '') !== true;
}

/**
 * Checks if an event is supported in the current execution environment.
 *
 * NOTE: This will not work correctly for non-generic events such as `change`,
 * `reset`, `load`, `error`, and `select`.
 *
 * Borrows from Modernizr.
 *
 * @param {string} eventNameSuffix Event name, e.g. "click".
 * @param {?boolean} capture Check if the capture phase is supported.
 * @return {boolean} True if the event is supported.
 * @internal
 * @license Modernizr 3.0.0pre (Custom Build) | MIT
 */
function isEventSupported(eventNameSuffix, capture) {
  if (!ExecutionEnvironment.canUseDOM ||
      capture && !('addEventListener' in document)) {
    return false;
  }

  var eventName = 'on' + eventNameSuffix;
  var isSupported = eventName in document;

  if (!isSupported) {
    var element = document.createElement('div');
    element.setAttribute(eventName, 'return;');
    isSupported = typeof element[eventName] === 'function';
  }

  if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
    // This is the only way to test support for the `wheel` event in IE9+.
    isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
  }

  return isSupported;
}

module.exports = isEventSupported;


/***/ }),

/***/ "7c73":
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__("825a");
var defineProperties = __webpack_require__("37e8");
var enumBugKeys = __webpack_require__("7839");
var hiddenKeys = __webpack_require__("d012");
var html = __webpack_require__("1be4");
var documentCreateElement = __webpack_require__("cc12");
var sharedKey = __webpack_require__("f772");

var GT = '>';
var LT = '<';
var PROTOTYPE = 'prototype';
var SCRIPT = 'script';
var IE_PROTO = sharedKey('IE_PROTO');

var EmptyConstructor = function () { /* empty */ };

var scriptTag = function (content) {
  return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
};

// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
var NullProtoObjectViaActiveX = function (activeXDocument) {
  activeXDocument.write(scriptTag(''));
  activeXDocument.close();
  var temp = activeXDocument.parentWindow.Object;
  activeXDocument = null; // avoid memory leak
  return temp;
};

// Create object with fake `null` prototype: use iframe Object with cleared prototype
var NullProtoObjectViaIFrame = function () {
  // Thrash, waste and sodomy: IE GC bug
  var iframe = documentCreateElement('iframe');
  var JS = 'java' + SCRIPT + ':';
  var iframeDocument;
  iframe.style.display = 'none';
  html.appendChild(iframe);
  // https://github.com/zloirock/core-js/issues/475
  iframe.src = String(JS);
  iframeDocument = iframe.contentWindow.document;
  iframeDocument.open();
  iframeDocument.write(scriptTag('document.F=Object'));
  iframeDocument.close();
  return iframeDocument.F;
};

// Check for document.domain and active x support
// No need to use active x approach when document.domain is not set
// see https://github.com/es-shims/es5-shim/issues/150
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
// avoid IE GC bug
var activeXDocument;
var NullProtoObject = function () {
  try {
    /* global ActiveXObject */
    activeXDocument = document.domain && new ActiveXObject('htmlfile');
  } catch (error) { /* ignore */ }
  NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
  var length = enumBugKeys.length;
  while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  return NullProtoObject();
};

hiddenKeys[IE_PROTO] = true;

// `Object.create` method
// https://tc39.github.io/ecma262/#sec-object.create
module.exports = Object.create || function create(O, Properties) {
  var result;
  if (O !== null) {
    EmptyConstructor[PROTOTYPE] = anObject(O);
    result = new EmptyConstructor();
    EmptyConstructor[PROTOTYPE] = null;
    // add "__proto__" for Object.getPrototypeOf polyfill
    result[IE_PROTO] = O;
  } else result = NullProtoObject();
  return Properties === undefined ? result : defineProperties(result, Properties);
};


/***/ }),

/***/ "7db0":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var $find = __webpack_require__("b727").find;
var addToUnscopables = __webpack_require__("44d2");
var arrayMethodUsesToLength = __webpack_require__("ae40");

var FIND = 'find';
var SKIPS_HOLES = true;

var USES_TO_LENGTH = arrayMethodUsesToLength(FIND);

// Shouldn't skip holes
if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });

// `Array.prototype.find` method
// https://tc39.github.io/ecma262/#sec-array.prototype.find
$({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH }, {
  find: function find(callbackfn /* , that = undefined */) {
    return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});

// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables(FIND);


/***/ }),

/***/ "7dd0":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var createIteratorConstructor = __webpack_require__("9ed3");
var getPrototypeOf = __webpack_require__("e163");
var setPrototypeOf = __webpack_require__("d2bb");
var setToStringTag = __webpack_require__("d44e");
var createNonEnumerableProperty = __webpack_require__("9112");
var redefine = __webpack_require__("6eeb");
var wellKnownSymbol = __webpack_require__("b622");
var IS_PURE = __webpack_require__("c430");
var Iterators = __webpack_require__("3f8c");
var IteratorsCore = __webpack_require__("ae93");

var IteratorPrototype = IteratorsCore.IteratorPrototype;
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
var ITERATOR = wellKnownSymbol('iterator');
var KEYS = 'keys';
var VALUES = 'values';
var ENTRIES = 'entries';

var returnThis = function () { return this; };

module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
  createIteratorConstructor(IteratorConstructor, NAME, next);

  var getIterationMethod = function (KIND) {
    if (KIND === DEFAULT && defaultIterator) return defaultIterator;
    if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
    switch (KIND) {
      case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
      case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
      case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
    } return function () { return new IteratorConstructor(this); };
  };

  var TO_STRING_TAG = NAME + ' Iterator';
  var INCORRECT_VALUES_NAME = false;
  var IterablePrototype = Iterable.prototype;
  var nativeIterator = IterablePrototype[ITERATOR]
    || IterablePrototype['@@iterator']
    || DEFAULT && IterablePrototype[DEFAULT];
  var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
  var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
  var CurrentIteratorPrototype, methods, KEY;

  // fix native
  if (anyNativeIterator) {
    CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
    if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
      if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
        if (setPrototypeOf) {
          setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
        } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {
          createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);
        }
      }
      // Set @@toStringTag to native iterators
      setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
      if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
    }
  }

  // fix Array#{values, @@iterator}.name in V8 / FF
  if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
    INCORRECT_VALUES_NAME = true;
    defaultIterator = function values() { return nativeIterator.call(this); };
  }

  // define iterator
  if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
    createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);
  }
  Iterators[NAME] = defaultIterator;

  // export additional methods
  if (DEFAULT) {
    methods = {
      values: getIterationMethod(VALUES),
      keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
      entries: getIterationMethod(ENTRIES)
    };
    if (FORCED) for (KEY in methods) {
      if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
        redefine(IterablePrototype, KEY, methods[KEY]);
      }
    } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
  }

  return methods;
};


/***/ }),

/***/ "7e12":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var trim = __webpack_require__("58a8").trim;
var whitespaces = __webpack_require__("5899");

var $parseFloat = global.parseFloat;
var FORCED = 1 / $parseFloat(whitespaces + '-0') !== -Infinity;

// `parseFloat` method
// https://tc39.github.io/ecma262/#sec-parsefloat-string
module.exports = FORCED ? function parseFloat(string) {
  var trimmedString = trim(String(string));
  var result = $parseFloat(trimmedString);
  return result === 0 && trimmedString.charAt(0) == '-' ? -0 : result;
} : $parseFloat;


/***/ }),

/***/ "7f4d":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

exports.default = function (target) {
  for (var i = 1, j = arguments.length; i < j; i++) {
    var source = arguments[i] || {};

    for (var prop in source) {
      if (source.hasOwnProperty(prop)) {
        var value = source[prop];

        if (value !== undefined) {
          target[prop] = value;
        }
      }
    }
  }

  return target;
};

;

/***/ }),

/***/ "7f9a":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var inspectSource = __webpack_require__("8925");

var WeakMap = global.WeakMap;

module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));


/***/ }),

/***/ "7fc1":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("944a");

__webpack_require__("99af");

__webpack_require__("b0c0");

__webpack_require__("0c47");

__webpack_require__("23dc");

__webpack_require__("a9e3");

__webpack_require__("d3b7");

var _typeof = __webpack_require__("7037");

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

  /******/

  /******/
  // Load entry module and return exports

  /******/

  return __webpack_require__(__webpack_require__.s = 86);
  /******/
}(
/************************************************************************/

/******/
{
  /***/
  0:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";
    /* harmony export (binding) */

    __webpack_require__.d(__webpack_exports__, "a", function () {
      return normalizeComponent;
    });
    /* globals __VUE_SSR_CONTEXT__ */
    // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
    // This module is a runtime utility for cleaner component module output and will
    // be included in the final webpack user bundle.


    function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier,
    /* server only */
    shadowMode
    /* vue-cli only */
    ) {
      // Vue.extend constructor export interop
      var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports; // render functions

      if (render) {
        options.render = render;
        options.staticRenderFns = staticRenderFns;
        options._compiled = true;
      } // functional template


      if (functionalTemplate) {
        options.functional = true;
      } // scopedId


      if (scopeId) {
        options._scopeId = 'data-v-' + scopeId;
      }

      var hook;

      if (moduleIdentifier) {
        // server build
        hook = function hook(context) {
          // 2.3 injection
          context = context || // cached call
          this.$vnode && this.$vnode.ssrContext || // stateful
          this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
          // 2.2 with runInNewContext: true

          if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
            context = __VUE_SSR_CONTEXT__;
          } // inject component styles


          if (injectStyles) {
            injectStyles.call(this, context);
          } // register component module identifier for async chunk inferrence


          if (context && context._registeredComponents) {
            context._registeredComponents.add(moduleIdentifier);
          }
        }; // used by ssr in case component is cached and beforeCreate
        // never gets called


        options._ssrRegister = hook;
      } else if (injectStyles) {
        hook = shadowMode ? function () {
          injectStyles.call(this, this.$root.$options.shadowRoot);
        } : injectStyles;
      }

      if (hook) {
        if (options.functional) {
          // for template-only hot-reload because in that case the render fn doesn't
          // go through the normalizer
          options._injectStyles = hook; // register for functioal component in vue file

          var originalRender = options.render;

          options.render = function renderWithStyleInjection(h, context) {
            hook.call(context);
            return originalRender(h, context);
          };
        } else {
          // inject component registration as beforeCreate hook
          var existing = options.beforeCreate;
          options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
        }
      }

      return {
        exports: scriptExports,
        options: options
      };
    }
    /***/

  },

  /***/
  4:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("d010");
    /***/
  },

  /***/
  86:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox-group.vue?vue&type=template&id=7289a290&


    var render = function render() {
      var _vm = this;

      var _h = _vm.$createElement;

      var _c = _vm._self._c || _h;

      return _c("div", {
        staticClass: "el-checkbox-group",
        attrs: {
          role: "group",
          "aria-label": "checkbox-group"
        }
      }, [_vm._t("default")], 2);
    };

    var staticRenderFns = [];
    render._withStripped = true; // CONCATENATED MODULE: ./packages/checkbox/src/checkbox-group.vue?vue&type=template&id=7289a290&
    // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"

    var emitter_ = __webpack_require__(4);

    var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_); // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox-group.vue?vue&type=script&lang=js&

    /* harmony default export */


    var checkbox_groupvue_type_script_lang_js_ = {
      name: 'ElCheckboxGroup',
      componentName: 'ElCheckboxGroup',
      mixins: [emitter_default.a],
      inject: {
        elFormItem: {
          default: ''
        }
      },
      props: {
        value: {},
        disabled: Boolean,
        min: Number,
        max: Number,
        size: String,
        fill: String,
        textColor: String
      },
      computed: {
        _elFormItemSize: function _elFormItemSize() {
          return (this.elFormItem || {}).elFormItemSize;
        },
        checkboxGroupSize: function checkboxGroupSize() {
          return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
        }
      },
      watch: {
        value: function value(_value) {
          this.dispatch('ElFormItem', 'el.form.change', [_value]);
        }
      }
    }; // CONCATENATED MODULE: ./packages/checkbox/src/checkbox-group.vue?vue&type=script&lang=js&

    /* harmony default export */

    var src_checkbox_groupvue_type_script_lang_js_ = checkbox_groupvue_type_script_lang_js_; // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js

    var componentNormalizer = __webpack_require__(0); // CONCATENATED MODULE: ./packages/checkbox/src/checkbox-group.vue

    /* normalize component */


    var component = Object(componentNormalizer["a"
    /* default */
    ])(src_checkbox_groupvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null);
    /* hot reload */

    if (false) { var api; }

    component.options.__file = "packages/checkbox/src/checkbox-group.vue";
    /* harmony default export */

    var checkbox_group = component.exports; // CONCATENATED MODULE: ./packages/checkbox-group/index.js

    /* istanbul ignore next */

    checkbox_group.install = function (Vue) {
      Vue.component(checkbox_group.name, checkbox_group);
    };
    /* harmony default export */


    var packages_checkbox_group = __webpack_exports__["default"] = checkbox_group;
    /***/
  }
  /******/

});

/***/ }),

/***/ "8119":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("693d");
__webpack_require__("dfe5");
__webpack_require__("301c");
__webpack_require__("4e71");
module.exports = __webpack_require__("5524").Symbol;


/***/ }),

/***/ "81196":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_radio_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1377");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_radio_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_radio_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_radio_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "8122":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("d28b");

__webpack_require__("4160");

__webpack_require__("c975");

__webpack_require__("e260");

__webpack_require__("fb6a");

__webpack_require__("a9e3");

__webpack_require__("b64b");

__webpack_require__("d3b7");

__webpack_require__("ac1f");

__webpack_require__("25f0");

__webpack_require__("3ca3");

__webpack_require__("466d");

__webpack_require__("5319");

__webpack_require__("1276");

__webpack_require__("ddb0");

var _typeof2 = __webpack_require__("7037");

exports.__esModule = true;
exports.isEmpty = exports.isEqual = exports.arrayEquals = exports.looseEqual = exports.capitalize = exports.kebabCase = exports.autoprefixer = exports.isFirefox = exports.isEdge = exports.isIE = exports.coerceTruthyValueToArray = exports.arrayFind = exports.arrayFindIndex = exports.escapeRegexpString = exports.valueEquals = exports.generateId = exports.getValueByPath = undefined;

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

exports.noop = noop;
exports.hasOwn = hasOwn;
exports.toObject = toObject;
exports.getPropByPath = getPropByPath;
exports.rafThrottle = rafThrottle;
exports.objToArray = objToArray;

var _vue = __webpack_require__("8bbf");

var _vue2 = _interopRequireDefault(_vue);

var _types = __webpack_require__("a742");

function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    default: obj
  };
}

var hasOwnProperty = Object.prototype.hasOwnProperty;

function noop() {}

;

function hasOwn(obj, key) {
  return hasOwnProperty.call(obj, key);
}

;

function extend(to, _from) {
  for (var key in _from) {
    to[key] = _from[key];
  }

  return to;
}

;

function toObject(arr) {
  var res = {};

  for (var i = 0; i < arr.length; i++) {
    if (arr[i]) {
      extend(res, arr[i]);
    }
  }

  return res;
}

;

var getValueByPath = exports.getValueByPath = function getValueByPath(object, prop) {
  prop = prop || '';
  var paths = prop.split('.');
  var current = object;
  var result = null;

  for (var i = 0, j = paths.length; i < j; i++) {
    var path = paths[i];
    if (!current) break;

    if (i === j - 1) {
      result = current[path];
      break;
    }

    current = current[path];
  }

  return result;
};

function getPropByPath(obj, path, strict) {
  var tempObj = obj;
  path = path.replace(/\[(\w+)\]/g, '.$1');
  path = path.replace(/^\./, '');
  var keyArr = path.split('.');
  var i = 0;

  for (var len = keyArr.length; i < len - 1; ++i) {
    if (!tempObj && !strict) break;
    var key = keyArr[i];

    if (key in tempObj) {
      tempObj = tempObj[key];
    } else {
      if (strict) {
        throw new Error('please transfer a valid prop path to form item!');
      }

      break;
    }
  }

  return {
    o: tempObj,
    k: keyArr[i],
    v: tempObj ? tempObj[keyArr[i]] : null
  };
}

;

var generateId = exports.generateId = function generateId() {
  return Math.floor(Math.random() * 10000);
};

var valueEquals = exports.valueEquals = function valueEquals(a, b) {
  // see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
  if (a === b) return true;
  if (!(a instanceof Array)) return false;
  if (!(b instanceof Array)) return false;
  if (a.length !== b.length) return false;

  for (var i = 0; i !== a.length; ++i) {
    if (a[i] !== b[i]) return false;
  }

  return true;
};

var escapeRegexpString = exports.escapeRegexpString = function escapeRegexpString() {
  var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  return String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
}; // TODO: use native Array.find, Array.findIndex when IE support is dropped


var arrayFindIndex = exports.arrayFindIndex = function arrayFindIndex(arr, pred) {
  for (var i = 0; i !== arr.length; ++i) {
    if (pred(arr[i])) {
      return i;
    }
  }

  return -1;
};

var arrayFind = exports.arrayFind = function arrayFind(arr, pred) {
  var idx = arrayFindIndex(arr, pred);
  return idx !== -1 ? arr[idx] : undefined;
}; // coerce truthy value to array


var coerceTruthyValueToArray = exports.coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
  if (Array.isArray(val)) {
    return val;
  } else if (val) {
    return [val];
  } else {
    return [];
  }
};

var isIE = exports.isIE = function isIE() {
  return !_vue2.default.prototype.$isServer && !isNaN(Number(document.documentMode));
};

var isEdge = exports.isEdge = function isEdge() {
  return !_vue2.default.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
};

var isFirefox = exports.isFirefox = function isFirefox() {
  return !_vue2.default.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
};

var autoprefixer = exports.autoprefixer = function autoprefixer(style) {
  if ((typeof style === 'undefined' ? 'undefined' : _typeof(style)) !== 'object') return style;
  var rules = ['transform', 'transition', 'animation'];
  var prefixes = ['ms-', 'webkit-'];
  rules.forEach(function (rule) {
    var value = style[rule];

    if (rule && value) {
      prefixes.forEach(function (prefix) {
        style[prefix + rule] = value;
      });
    }
  });
  return style;
};

var kebabCase = exports.kebabCase = function kebabCase(str) {
  var hyphenateRE = /([^-])([A-Z])/g;
  return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase();
};

var capitalize = exports.capitalize = function capitalize(str) {
  if (!(0, _types.isString)(str)) return str;
  return str.charAt(0).toUpperCase() + str.slice(1);
};

var looseEqual = exports.looseEqual = function looseEqual(a, b) {
  var isObjectA = (0, _types.isObject)(a);
  var isObjectB = (0, _types.isObject)(b);

  if (isObjectA && isObjectB) {
    return JSON.stringify(a) === JSON.stringify(b);
  } else if (!isObjectA && !isObjectB) {
    return String(a) === String(b);
  } else {
    return false;
  }
};

var arrayEquals = exports.arrayEquals = function arrayEquals(arrayA, arrayB) {
  arrayA = arrayA || [];
  arrayB = arrayB || [];

  if (arrayA.length !== arrayB.length) {
    return false;
  }

  for (var i = 0; i < arrayA.length; i++) {
    if (!looseEqual(arrayA[i], arrayB[i])) {
      return false;
    }
  }

  return true;
};

var isEqual = exports.isEqual = function isEqual(value1, value2) {
  if (Array.isArray(value1) && Array.isArray(value2)) {
    return arrayEquals(value1, value2);
  }

  return looseEqual(value1, value2);
};

var isEmpty = exports.isEmpty = function isEmpty(val) {
  // null or undefined
  if (val == null) return true;
  if (typeof val === 'boolean') return false;
  if (typeof val === 'number') return !val;
  if (val instanceof Error) return val.message === '';

  switch (Object.prototype.toString.call(val)) {
    // String or Array
    case '[object String]':
    case '[object Array]':
      return !val.length;
    // Map or Set or File

    case '[object File]':
    case '[object Map]':
    case '[object Set]':
      {
        return !val.size;
      }
    // Plain Object

    case '[object Object]':
      {
        return !Object.keys(val).length;
      }
  }

  return false;
};

function rafThrottle(fn) {
  var locked = false;
  return function () {
    var _this = this;

    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    if (locked) return;
    locked = true;
    window.requestAnimationFrame(function (_) {
      fn.apply(_this, args);
      locked = false;
    });
  };
}

function objToArray(obj) {
  if (Array.isArray(obj)) {
    return obj;
  }

  return isEmpty(obj) ? [] : [obj];
}

/***/ }),

/***/ "81d5":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toObject = __webpack_require__("7b0b");
var toAbsoluteIndex = __webpack_require__("23cb");
var toLength = __webpack_require__("50c4");

// `Array.prototype.fill` method implementation
// https://tc39.github.io/ecma262/#sec-array.prototype.fill
module.exports = function fill(value /* , start = 0, end = @length */) {
  var O = toObject(this);
  var length = toLength(O.length);
  var argumentsLength = arguments.length;
  var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
  var end = argumentsLength > 2 ? arguments[2] : undefined;
  var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
  while (endPos > index) O[index++] = value;
  return O;
};


/***/ }),

/***/ "820c":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_bo_metadata_select_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("391f");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_bo_metadata_select_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_bo_metadata_select_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_bo_metadata_select_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "825a":
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__("861d");

module.exports = function (it) {
  if (!isObject(it)) {
    throw TypeError(String(it) + ' is not an object');
  } return it;
};


/***/ }),

/***/ "82bb":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("4de4");

__webpack_require__("c975");

__webpack_require__("a15b");

__webpack_require__("ac1f");

__webpack_require__("466d");

__webpack_require__("5319");

__webpack_require__("1276");

var _createForOfIteratorHelper = __webpack_require__("6374");

var _typeof = __webpack_require__("7037");

//初始化TextMarker标签
function createSpan(id, name, type) {
  //初始化标记
  var span = document.createElement("span");
  span.setAttribute("awsui-qtip", "text:'" + id + "'");
  span.setAttribute("class", "CodeMirror-widget cm-field-" + type);
  span.setAttribute("data-field", id);
  span.innerHTML = "<span class=\"cm-field cm-field-" + type + "\">" + name + "</span>";
  return span;
} //解析公式 str:需要解析的字符串  editor:赋值的编辑器


window.initFormulaEditor = function (str, editor) {
  var editorValue = [],
      n = [];

  if (str) {
    //var str1 = str.split("\n");
    var str1 = [str];
    forEach(str1, function (t, trs) {
      var r = "",
          o = splitFunc(trs);
      forEach(o, function (editorValue, s) {
        if (isNull(s)) return;
        var o,
            l = "BOITEMNAME",
            c;

        if (/^(@form\([0-9a-zA-Z._]+,[0-9a-zA-Z._]+\))/.test(s)) {
          c = s.replace("@form(", "").replace(")", "").replace(",", ".");
          window.formulaLabelMap && (o = window.formulaLabelMap[c]);

          if (isNull(o)) {
            r += s;
            return;
          }
        } else if (/^(%_[0-9a-zA-Z._]+_%)/.test(s)) {
          c = s.replace("%_", "").replace("_%", "");
          window.formulaLabelMap && (o = window.formulaLabelMap[c]);

          if (isNull(o)) {
            r += s;
            return;
          }

          l = "common_field";
        } else if (/^\\,/.test(s)) {
          o = ",";
        } else if (/^\\\(/.test(s)) {
          o = "(";
        } else if (/^\\\)/.test(s)) {
          o = ")";
        } else if (/^\\\\/.test(s)) {
          o = "\\";
        } else if (/^(\$\[[0-9a-zA-Z._]+\])/.test(s)) {
          c = s.replace("$[", "").replace("]", "");
          var contextData = editor.getOption("contextData");

          if (typeof contextData != "undefined" && typeof contextData.data != "undefined" && Array.isArray(contextData.data)) {
            var arr = contextData.data;

            for (var k = 0; k < arr.length; k++) {
              var arrElement = arr[k];

              if (typeof arrElement == "string" && arrElement.indexOf("$_BO_") > -1) {
                var id = arrElement.replace("$_BO_", "");

                if (id != null && window.formulaLabelMap[id] != null) {
                  if (window.formulaLabelMap[id][c] != null) {
                    o = window.formulaLabelMap[id][c];
                    break;
                  }
                }
              }
            }
          }

          if (typeof o == "undefined") {
            window.formulaLabelMap && (o = window.formulaLabelMap[c]);
          }

          if (isNull(o)) {
            r += s;
            return;
          }

          o = "$[" + o + "]";
          l = "source";
        } else if (/^(#\[[0-9a-zA-Z._]+\])/.test(s)) {
          c = s.replace("#[", "").replace("]", "");

          var _contextData = editor.getOption("contextData");

          if (typeof _contextData != "undefined" && typeof _contextData.data != "undefined" && Array.isArray(_contextData.data)) {
            var arr2 = _contextData.data;

            for (var p = 0; p < arr2.length; p++) {
              var arrElement2 = arr2[p];

              if (typeof arrElement2 == "string" && arrElement2.indexOf("#_BO_") > -1) {
                var _id = arrElement2.replace("#_BO_", "");

                if (_id != null && window.formulaLabelMap[_id] != null) {
                  if (window.formulaLabelMap[_id][c] != null) {
                    o = window.formulaLabelMap[_id][c];
                    break;
                  }
                }
              }
            }
          }

          if (typeof o == "undefined") {
            c = s.replace("#[", "").replace("]", "");
            window.formulaLabelMap && (o = window.formulaLabelMap[c]);
          }

          if (isNull(o)) {
            r += s;
            return;
          }

          o = "#[" + o + "]";
          l = "target";
        } else if (/^([0-9a-zA-Z._]+,[0-9a-zA-Z._]+)/.test(s)) {
          c = s.replace(",", ".");
          window.formulaLabelMap && (o = window.formulaLabelMap[c]);

          if (isNull(o)) {
            r += s;
            return;
          }

          l = "BOITEMNAME_PARAM";
        } else if (/^(@processVar\([\u4e00-\u9fa5_a-zA-Z0-9]+\))/.test(s)) {
          o = s.replace("@processVar(", "").replace(")", "");

          if (isNull(o)) {
            r += s;
            return;
          }

          l = "common_field";
        } else if (/^(@env\([\u4e00-\u9fa5_a-zA-Z0-9]+[\,(ext1|ext2|ext3)]*\))/.test(s)) {
          o = s.replace("@env(", "").replace(")", "");

          if (isNull(o)) {
            r += s;
            return;
          }

          l = "ccVar";
        } else if (/^(@[uid|companyId|departmentId|roleId|teamId]+\([0-9,A-z._-]+\))/.test(s)) {
          c = s;
          window.formulaLabelMap && (o = window.formulaLabelMap[c]);

          if (isNull(o)) {
            r += s;
            return;
          }

          if (s.indexOf("uid") > -1) {
            l = "User";
          } else if (s.indexOf("companyId") > -1) {
            l = "Company";
          } else if (s.indexOf("departmentId") > -1) {
            l = "Department";
          } else if (s.indexOf("roleId") > -1) {
            l = "Role";
          } else if (s.indexOf("teamId") > -1) {
            l = "Team";
          }
        } else {
          r += s;
          return;
        }

        var h = window.CodeMirror.Pos(t, r.length);
        r += s;
        var p = window.CodeMirror.Pos(t, r.length);
        n.push({
          from: h,
          to: p,
          field: s,
          invalid: l,
          label: o
        });
      }), editorValue.push(r);
    });
  }

  editor.setValue(editorValue.join("\n")), forEach(n, function (t, i) {
    markField(i, editor);
  });
};

function markField(e, editor) {
  editor.markText(e.from, e.to, {
    handleMouseEvents: !0,
    atomic: !0,
    replacedWith: createSpan(e.field, e.label, e.invalid)
  });
  window.CodeMirror.signal(editor.doc.cm, "endCompletion", editor.doc.cm);
}

function forEach(t, e) {
  if (Array.isArray(t)) for (var i = 0, a = t.length; i < a && !1 !== e.apply(t[i], [i, t[i]]); i++) {
    ;
  } else if (t && "object" == _typeof(t)) for (var n in t) {
    if (Object.prototype.hasOwnProperty.call(t, n) && !1 === e.apply(t[n], [n, t[n]])) break;
  }
}

function isNull(t) {
  return null == t;
}

function splitFunc(str) {
  var splitReg = /(@form\([0-9a-zA-Z._]+,[0-9a-zA-Z._]+\))|(%_[0-9a-zA-Z._]+_%)|(\$\[[0-9a-zA-Z._]+\])|(#\[[0-9a-zA-Z._]+\])|(@form\(|@gridFirst\(|@gridLast\(|@gridSum\(|@gridAvg\(|@gridMax\(|@gridMin\()+([0-9a-zA-Z._]+,[0-9a-zA-Z._]+(?=,|\)))|(\\,|\\\(|\\\)|\\\\)|(@processVar\([\u4e00-\u9fa5_a-zA-Z0-9]+\))|(@env\([\u4e00-\u9fa5_a-zA-Z0-9]+[\,(ext1|ext2|ext3)]*\))|(@[uid|companyId|departmentId|roleId|teamId]+\([0-9,A-z._-]+\))/g;

  if (window.navigator.userAgent.indexOf("MSIE") > -1 || window.navigator.userAgent.indexOf("Trident") > -1) {
    var _ret = function () {
      //IE
      var array = [],
          matches = str.match(splitReg);

      if (matches.length == 0) {
        array.push(str);
      } else {
        var toUseStr = str;

        var _iterator = _createForOfIteratorHelper(matches),
            _step;

        try {
          var _loop = function _loop() {
            var matStr = _step.value;
            toUseStr.replace(matStr, function (reStr, index, allStr) {
              if (index > 0) {
                array.push(allStr.substring(0, index)); //前半部分
              }

              array.push(matStr); //中间

              toUseStr = allStr.substring(index + reStr.length); //后半部分
            });
          };

          for (_iterator.s(); !(_step = _iterator.n()).done;) {
            _loop();
          }
        } catch (err) {
          _iterator.e(err);
        } finally {
          _iterator.f();
        }

        if (toUseStr.length > 0) {
          array.push(toUseStr); //最后的
        }
      }

      return {
        v: array
      };
    }();

    if (_typeof(_ret) === "object") return _ret.v;
  } else {
    return str.split(splitReg).filter(Boolean);
  }
}

/***/ }),

/***/ "82f8":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__("ebb5");
var $includes = __webpack_require__("4d64").includes;

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

// `%TypedArray%.prototype.includes` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.includes
exportTypedArrayMethod('includes', function includes(searchElement /* , fromIndex */) {
  return $includes(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
});


/***/ }),

/***/ "83ab":
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__("d039");

// Thank's IE8 for his funny defineProperty
module.exports = !fails(function () {
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
});


/***/ }),

/***/ "83b9":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var isAbsoluteURL = __webpack_require__("d925");
var combineURLs = __webpack_require__("e683");

/**
 * Creates a new URL by combining the baseURL with the requestedURL,
 * only when the requestedURL is not already an absolute URL.
 * If the requestURL is absolute, this function returns the requestedURL untouched.
 *
 * @param {string} baseURL The base URL
 * @param {string} requestedURL Absolute or relative URL to combine
 * @returns {string} The combined full path
 */
module.exports = function buildFullPath(baseURL, requestedURL) {
  if (baseURL && !isAbsoluteURL(requestedURL)) {
    return combineURLs(baseURL, requestedURL);
  }
  return requestedURL;
};


/***/ }),

/***/ "8418":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toPrimitive = __webpack_require__("c04e");
var definePropertyModule = __webpack_require__("9bf2");
var createPropertyDescriptor = __webpack_require__("5c6c");

module.exports = function (object, key, value) {
  var propertyKey = toPrimitive(key);
  if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
  else object[propertyKey] = value;
};


/***/ }),

/***/ "841c":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fixRegExpWellKnownSymbolLogic = __webpack_require__("d784");
var anObject = __webpack_require__("825a");
var requireObjectCoercible = __webpack_require__("1d80");
var sameValue = __webpack_require__("129f");
var regExpExec = __webpack_require__("14c3");

// @@search logic
fixRegExpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {
  return [
    // `String.prototype.search` method
    // https://tc39.github.io/ecma262/#sec-string.prototype.search
    function search(regexp) {
      var O = requireObjectCoercible(this);
      var searcher = regexp == undefined ? undefined : regexp[SEARCH];
      return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
    },
    // `RegExp.prototype[@@search]` method
    // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search
    function (regexp) {
      var res = maybeCallNative(nativeSearch, regexp, this);
      if (res.done) return res.value;

      var rx = anObject(regexp);
      var S = String(this);

      var previousLastIndex = rx.lastIndex;
      if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
      var result = regExpExec(rx, S);
      if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
      return result === null ? -1 : result.index;
    }
  ];
});


/***/ }),

/***/ "845f":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("944a");

__webpack_require__("99af");

__webpack_require__("b0c0");

__webpack_require__("0c47");

__webpack_require__("23dc");

__webpack_require__("d3b7");

var _typeof = __webpack_require__("7037");

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

  /******/

  /******/
  // Load entry module and return exports

  /******/

  return __webpack_require__(__webpack_require__.s = 99);
  /******/
}(
/************************************************************************/

/******/
{
  /***/
  0:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";
    /* harmony export (binding) */

    __webpack_require__.d(__webpack_exports__, "a", function () {
      return normalizeComponent;
    });
    /* globals __VUE_SSR_CONTEXT__ */
    // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
    // This module is a runtime utility for cleaner component module output and will
    // be included in the final webpack user bundle.


    function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier,
    /* server only */
    shadowMode
    /* vue-cli only */
    ) {
      // Vue.extend constructor export interop
      var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports; // render functions

      if (render) {
        options.render = render;
        options.staticRenderFns = staticRenderFns;
        options._compiled = true;
      } // functional template


      if (functionalTemplate) {
        options.functional = true;
      } // scopedId


      if (scopeId) {
        options._scopeId = 'data-v-' + scopeId;
      }

      var hook;

      if (moduleIdentifier) {
        // server build
        hook = function hook(context) {
          // 2.3 injection
          context = context || // cached call
          this.$vnode && this.$vnode.ssrContext || // stateful
          this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
          // 2.2 with runInNewContext: true

          if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
            context = __VUE_SSR_CONTEXT__;
          } // inject component styles


          if (injectStyles) {
            injectStyles.call(this, context);
          } // register component module identifier for async chunk inferrence


          if (context && context._registeredComponents) {
            context._registeredComponents.add(moduleIdentifier);
          }
        }; // used by ssr in case component is cached and beforeCreate
        // never gets called


        options._ssrRegister = hook;
      } else if (injectStyles) {
        hook = shadowMode ? function () {
          injectStyles.call(this, this.$root.$options.shadowRoot);
        } : injectStyles;
      }

      if (hook) {
        if (options.functional) {
          // for template-only hot-reload because in that case the render fn doesn't
          // go through the normalizer
          options._injectStyles = hook; // register for functioal component in vue file

          var originalRender = options.render;

          options.render = function renderWithStyleInjection(h, context) {
            hook.call(context);
            return originalRender(h, context);
          };
        } else {
          // inject component registration as beforeCreate hook
          var existing = options.beforeCreate;
          options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
        }
      }

      return {
        exports: scriptExports,
        options: options
      };
    }
    /***/

  },

  /***/
  99:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button-group.vue?vue&type=template&id=3d8661d0&


    var render = function render() {
      var _vm = this;

      var _h = _vm.$createElement;

      var _c = _vm._self._c || _h;

      return _c("div", {
        staticClass: "el-button-group"
      }, [_vm._t("default")], 2);
    };

    var staticRenderFns = [];
    render._withStripped = true; // CONCATENATED MODULE: ./packages/button/src/button-group.vue?vue&type=template&id=3d8661d0&
    // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button-group.vue?vue&type=script&lang=js&
    //
    //
    //
    //
    //

    /* harmony default export */

    var button_groupvue_type_script_lang_js_ = {
      name: 'ElButtonGroup'
    }; // CONCATENATED MODULE: ./packages/button/src/button-group.vue?vue&type=script&lang=js&

    /* harmony default export */

    var src_button_groupvue_type_script_lang_js_ = button_groupvue_type_script_lang_js_; // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js

    var componentNormalizer = __webpack_require__(0); // CONCATENATED MODULE: ./packages/button/src/button-group.vue

    /* normalize component */


    var component = Object(componentNormalizer["a"
    /* default */
    ])(src_button_groupvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null);
    /* hot reload */

    if (false) { var api; }

    component.options.__file = "packages/button/src/button-group.vue";
    /* harmony default export */

    var button_group = component.exports; // CONCATENATED MODULE: ./packages/button-group/index.js

    /* istanbul ignore next */

    button_group.install = function (Vue) {
      Vue.component(button_group.name, button_group);
    };
    /* harmony default export */


    var packages_button_group = __webpack_exports__["default"] = button_group;
    /***/
  }
  /******/

});

/***/ }),

/***/ "857a":
/***/ (function(module, exports, __webpack_require__) {

var requireObjectCoercible = __webpack_require__("1d80");

var quot = /"/g;

// B.2.3.2.1 CreateHTML(string, tag, attribute, value)
// https://tc39.github.io/ecma262/#sec-createhtml
module.exports = function (string, tag, attribute, value) {
  var S = String(requireObjectCoercible(string));
  var p1 = '<' + tag;
  if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '&quot;') + '"';
  return p1 + '>' + S + '</' + tag + '>';
};


/***/ }),

/***/ "85e7":
/***/ (function(module, exports, __webpack_require__) {

var dP = __webpack_require__("1a14");
var anObject = __webpack_require__("77e9");
var getKeys = __webpack_require__("9876");

module.exports = __webpack_require__("0bad") ? Object.defineProperties : function defineProperties(O, Properties) {
  anObject(O);
  var keys = getKeys(Properties);
  var length = keys.length;
  var i = 0;
  var P;
  while (length > i) dP.f(O, P = keys[i++], Properties[P]);
  return O;
};


/***/ }),

/***/ "861d":
/***/ (function(module, exports) {

module.exports = function (it) {
  return typeof it === 'object' ? it !== null : typeof it === 'function';
};


/***/ }),

/***/ "8773":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_icon_picker_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0b51");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_icon_picker_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_icon_picker_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_icon_picker_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "87d4":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "8875":
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
// MIT license
// source: https://github.com/amiller-gh/currentScript-polyfill

// added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505

(function (root, factory) {
  if (true) {
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else {}
}(typeof self !== 'undefined' ? self : this, function () {
  function getCurrentScript () {
    if (document.currentScript) {
      return document.currentScript
    }
  
    // IE 8-10 support script readyState
    // IE 11+ & Firefox support stack trace
    try {
      throw new Error();
    }
    catch (err) {
      // Find the second match for the "at" string to get file src url from stack.
      var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
        ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
        stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
        scriptLocation = (stackDetails && stackDetails[1]) || false,
        line = (stackDetails && stackDetails[2]) || false,
        currentLocation = document.location.href.replace(document.location.hash, ''),
        pageSource,
        inlineScriptSourceRegExp,
        inlineScriptSource,
        scripts = document.getElementsByTagName('script'); // Live NodeList collection
  
      if (scriptLocation === currentLocation) {
        pageSource = document.documentElement.outerHTML;
        inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i');
        inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();
      }
  
      for (var i = 0; i < scripts.length; i++) {
        // If ready state is interactive, return the script tag
        if (scripts[i].readyState === 'interactive') {
          return scripts[i];
        }
  
        // If src matches, return the script tag
        if (scripts[i].src === scriptLocation) {
          return scripts[i];
        }
  
        // If inline source matches, return the script tag
        if (
          scriptLocation === currentLocation &&
          scripts[i].innerHTML &&
          scripts[i].innerHTML.trim() === inlineScriptSource
        ) {
          return scripts[i];
        }
      }
  
      // If no match, return null
      return null;
    }
  };

  return getCurrentScript
}));


/***/ }),

/***/ "8888":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_upload_vue_vue_type_style_index_0_id_7dde4dbe_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("095f");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_upload_vue_vue_type_style_index_0_id_7dde4dbe_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_upload_vue_vue_type_style_index_0_id_7dde4dbe_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_upload_vue_vue_type_style_index_0_id_7dde4dbe_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "8925":
/***/ (function(module, exports, __webpack_require__) {

var store = __webpack_require__("c6cd");

var functionToString = Function.toString;

// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
if (typeof store.inspectSource != 'function') {
  store.inspectSource = function (it) {
    return functionToString.call(it);
  };
}

module.exports = store.inspectSource;


/***/ }),

/***/ "8942":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_input_vue_vue_type_style_index_0_id_8434a23e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1138");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_input_vue_vue_type_style_index_0_id_8434a23e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_input_vue_vue_type_style_index_0_id_8434a23e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_input_vue_vue_type_style_index_0_id_8434a23e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "89c1":
/***/ (function(module, exports, __webpack_require__) {

/*!
 * vue-virtual-scroll-list v2.3.2
 * open source under the MIT license
 * https://github.com/tangbc/vue-virtual-scroll-list#readme
 */

(function (global, factory) {
   true ? module.exports = factory(__webpack_require__("8bbf")) :
  undefined;
}(this, (function (Vue) { 'use strict';

  Vue = Vue && Object.prototype.hasOwnProperty.call(Vue, 'default') ? Vue['default'] : Vue;

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  function _defineProperties(target, props) {
    for (var i = 0; i < props.length; i++) {
      var descriptor = props[i];
      descriptor.enumerable = descriptor.enumerable || false;
      descriptor.configurable = true;
      if ("value" in descriptor) descriptor.writable = true;
      Object.defineProperty(target, descriptor.key, descriptor);
    }
  }

  function _createClass(Constructor, protoProps, staticProps) {
    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
    if (staticProps) _defineProperties(Constructor, staticProps);
    return Constructor;
  }

  function _toConsumableArray(arr) {
    return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  }

  function _arrayWithoutHoles(arr) {
    if (Array.isArray(arr)) return _arrayLikeToArray(arr);
  }

  function _iterableToArray(iter) {
    if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
  }

  function _unsupportedIterableToArray(o, minLen) {
    if (!o) return;
    if (typeof o === "string") return _arrayLikeToArray(o, minLen);
    var n = Object.prototype.toString.call(o).slice(8, -1);
    if (n === "Object" && o.constructor) n = o.constructor.name;
    if (n === "Map" || n === "Set") return Array.from(n);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  }

  function _arrayLikeToArray(arr, len) {
    if (len == null || len > arr.length) len = arr.length;

    for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];

    return arr2;
  }

  function _nonIterableSpread() {
    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  }

  /**
   * virtual list core calculating center
   */
  var DIRECTION_TYPE = {
    FRONT: 'FRONT',
    // scroll up or left
    BEHIND: 'BEHIND' // scroll down or right

  };
  var CALC_TYPE = {
    INIT: 'INIT',
    FIXED: 'FIXED',
    DYNAMIC: 'DYNAMIC'
  };
  var LEADING_BUFFER = 2;

  var Virtual = /*#__PURE__*/function () {
    function Virtual(param, callUpdate) {
      _classCallCheck(this, Virtual);

      this.init(param, callUpdate);
    }

    _createClass(Virtual, [{
      key: "init",
      value: function init(param, callUpdate) {
        // param data
        this.param = param;
        this.callUpdate = callUpdate; // size data

        this.sizes = new Map();
        this.firstRangeTotalSize = 0;
        this.firstRangeAverageSize = 0;
        this.lastCalcIndex = 0;
        this.fixedSizeValue = 0;
        this.calcType = CALC_TYPE.INIT; // scroll data

        this.offset = 0;
        this.direction = ''; // range data

        this.range = Object.create(null);

        if (param) {
          this.checkRange(0, param.keeps - 1);
        } // benchmark test data
        // this.__bsearchCalls = 0
        // this.__getIndexOffsetCalls = 0

      }
    }, {
      key: "destroy",
      value: function destroy() {
        this.init(null, null);
      } // return current render range

    }, {
      key: "getRange",
      value: function getRange() {
        var range = Object.create(null);
        range.start = this.range.start;
        range.end = this.range.end;
        range.padFront = this.range.padFront;
        range.padBehind = this.range.padBehind;
        return range;
      }
    }, {
      key: "isBehind",
      value: function isBehind() {
        return this.direction === DIRECTION_TYPE.BEHIND;
      }
    }, {
      key: "isFront",
      value: function isFront() {
        return this.direction === DIRECTION_TYPE.FRONT;
      } // return start index offset

    }, {
      key: "getOffset",
      value: function getOffset(start) {
        return (start < 1 ? 0 : this.getIndexOffset(start)) + this.param.slotHeaderSize;
      }
    }, {
      key: "updateParam",
      value: function updateParam(key, value) {
        var _this = this;

        if (this.param && key in this.param) {
          // if uniqueIds change, find out deleted id and remove from size map
          if (key === 'uniqueIds') {
            this.sizes.forEach(function (v, key) {
              if (!value.includes(key)) {
                _this.sizes["delete"](key);
              }
            });
          }

          this.param[key] = value;
        }
      } // save each size map by id

    }, {
      key: "saveSize",
      value: function saveSize(id, size) {
        this.sizes.set(id, size); // we assume size type is fixed at the beginning and remember first size value
        // if there is no size value different from this at next comming saving
        // we think it's a fixed size list, otherwise is dynamic size list

        if (this.calcType === CALC_TYPE.INIT) {
          this.fixedSizeValue = size;
          this.calcType = CALC_TYPE.FIXED;
        } else if (this.calcType === CALC_TYPE.FIXED && this.fixedSizeValue !== size) {
          this.calcType = CALC_TYPE.DYNAMIC; // it's no use at all

          delete this.fixedSizeValue;
        } // calculate the average size only in the first range


        if (this.calcType !== CALC_TYPE.FIXED && typeof this.firstRangeTotalSize !== 'undefined') {
          if (this.sizes.size < Math.min(this.param.keeps, this.param.uniqueIds.length)) {
            this.firstRangeTotalSize = _toConsumableArray(this.sizes.values()).reduce(function (acc, val) {
              return acc + val;
            }, 0);
            this.firstRangeAverageSize = Math.round(this.firstRangeTotalSize / this.sizes.size);
          } else {
            // it's done using
            delete this.firstRangeTotalSize;
          }
        }
      } // in some special situation (e.g. length change) we need to update in a row
      // try goiong to render next range by a leading buffer according to current direction

    }, {
      key: "handleDataSourcesChange",
      value: function handleDataSourcesChange() {
        var start = this.range.start;

        if (this.isFront()) {
          start = start - LEADING_BUFFER;
        } else if (this.isBehind()) {
          start = start + LEADING_BUFFER;
        }

        start = Math.max(start, 0);
        this.updateRange(this.range.start, this.getEndByStart(start));
      } // when slot size change, we also need force update

    }, {
      key: "handleSlotSizeChange",
      value: function handleSlotSizeChange() {
        this.handleDataSourcesChange();
      } // calculating range on scroll

    }, {
      key: "handleScroll",
      value: function handleScroll(offset) {
        this.direction = offset < this.offset ? DIRECTION_TYPE.FRONT : DIRECTION_TYPE.BEHIND;
        this.offset = offset;

        if (!this.param) {
          return;
        }

        if (this.direction === DIRECTION_TYPE.FRONT) {
          this.handleFront();
        } else if (this.direction === DIRECTION_TYPE.BEHIND) {
          this.handleBehind();
        }
      } // ----------- public method end -----------

    }, {
      key: "handleFront",
      value: function handleFront() {
        var overs = this.getScrollOvers(); // should not change range if start doesn't exceed overs

        if (overs > this.range.start) {
          return;
        } // move up start by a buffer length, and make sure its safety


        var start = Math.max(overs - this.param.buffer, 0);
        this.checkRange(start, this.getEndByStart(start));
      }
    }, {
      key: "handleBehind",
      value: function handleBehind() {
        var overs = this.getScrollOvers(); // range should not change if scroll overs within buffer

        if (overs < this.range.start + this.param.buffer) {
          return;
        }

        this.checkRange(overs, this.getEndByStart(overs));
      } // return the pass overs according to current scroll offset

    }, {
      key: "getScrollOvers",
      value: function getScrollOvers() {
        // if slot header exist, we need subtract its size
        var offset = this.offset - this.param.slotHeaderSize;

        if (offset <= 0) {
          return 0;
        } // if is fixed type, that can be easily


        if (this.isFixedType()) {
          return Math.floor(offset / this.fixedSizeValue);
        }

        var low = 0;
        var middle = 0;
        var middleOffset = 0;
        var high = this.param.uniqueIds.length;

        while (low <= high) {
          // this.__bsearchCalls++
          middle = low + Math.floor((high - low) / 2);
          middleOffset = this.getIndexOffset(middle);

          if (middleOffset === offset) {
            return middle;
          } else if (middleOffset < offset) {
            low = middle + 1;
          } else if (middleOffset > offset) {
            high = middle - 1;
          }
        }

        return low > 0 ? --low : 0;
      } // return a scroll offset from given index, can efficiency be improved more here?
      // although the call frequency is very high, its only a superposition of numbers

    }, {
      key: "getIndexOffset",
      value: function getIndexOffset(givenIndex) {
        if (!givenIndex) {
          return 0;
        }

        var offset = 0;
        var indexSize = 0;

        for (var index = 0; index < givenIndex; index++) {
          // this.__getIndexOffsetCalls++
          indexSize = this.sizes.get(this.param.uniqueIds[index]);
          offset = offset + (typeof indexSize === 'number' ? indexSize : this.getEstimateSize());
        } // remember last calculate index


        this.lastCalcIndex = Math.max(this.lastCalcIndex, givenIndex - 1);
        this.lastCalcIndex = Math.min(this.lastCalcIndex, this.getLastIndex());
        return offset;
      } // is fixed size type

    }, {
      key: "isFixedType",
      value: function isFixedType() {
        return this.calcType === CALC_TYPE.FIXED;
      } // return the real last index

    }, {
      key: "getLastIndex",
      value: function getLastIndex() {
        return this.param.uniqueIds.length - 1;
      } // in some conditions range is broke, we need correct it
      // and then decide whether need update to next range

    }, {
      key: "checkRange",
      value: function checkRange(start, end) {
        var keeps = this.param.keeps;
        var total = this.param.uniqueIds.length; // datas less than keeps, render all

        if (total <= keeps) {
          start = 0;
          end = this.getLastIndex();
        } else if (end - start < keeps - 1) {
          // if range length is less than keeps, corrent it base on end
          start = end - keeps + 1;
        }

        if (this.range.start !== start) {
          this.updateRange(start, end);
        }
      } // setting to a new range and rerender

    }, {
      key: "updateRange",
      value: function updateRange(start, end) {
        this.range.start = start;
        this.range.end = end;
        this.range.padFront = this.getPadFront();
        this.range.padBehind = this.getPadBehind();
        this.callUpdate(this.getRange());
      } // return end base on start

    }, {
      key: "getEndByStart",
      value: function getEndByStart(start) {
        var theoryEnd = start + this.param.keeps - 1;
        var truelyEnd = Math.min(theoryEnd, this.getLastIndex());
        return truelyEnd;
      } // return total front offset

    }, {
      key: "getPadFront",
      value: function getPadFront() {
        if (this.isFixedType()) {
          return this.fixedSizeValue * this.range.start;
        } else {
          return this.getIndexOffset(this.range.start);
        }
      } // return total behind offset

    }, {
      key: "getPadBehind",
      value: function getPadBehind() {
        var end = this.range.end;
        var lastIndex = this.getLastIndex();

        if (this.isFixedType()) {
          return (lastIndex - end) * this.fixedSizeValue;
        } // if it's all calculated, return the exactly offset


        if (this.lastCalcIndex === lastIndex) {
          return this.getIndexOffset(lastIndex) - this.getIndexOffset(end);
        } else {
          // if not, use a estimated value
          return (lastIndex - end) * this.getEstimateSize();
        }
      } // get the item estimate size

    }, {
      key: "getEstimateSize",
      value: function getEstimateSize() {
        return this.isFixedType() ? this.fixedSizeValue : this.firstRangeAverageSize || this.param.estimateSize;
      }
    }]);

    return Virtual;
  }();

  /**
   * props declaration for default, item and slot component
   */
  var VirtualProps = {
    dataKey: {
      type: [String, Function],
      required: true
    },
    dataSources: {
      type: Array,
      required: true
    },
    dataComponent: {
      type: [Object, Function],
      required: true
    },
    keeps: {
      type: Number,
      "default": 30
    },
    extraProps: {
      type: Object
    },
    estimateSize: {
      type: Number,
      "default": 50
    },
    direction: {
      type: String,
      "default": 'vertical' // the other value is horizontal

    },
    start: {
      type: Number,
      "default": 0
    },
    offset: {
      type: Number,
      "default": 0
    },
    topThreshold: {
      type: Number,
      "default": 0
    },
    bottomThreshold: {
      type: Number,
      "default": 0
    },
    pageMode: {
      type: Boolean,
      "default": false
    },
    rootTag: {
      type: String,
      "default": 'div'
    },
    wrapTag: {
      type: String,
      "default": 'div'
    },
    wrapClass: {
      type: String,
      "default": ''
    },
    wrapStyle: {
      type: Object
    },
    itemTag: {
      type: String,
      "default": 'div'
    },
    itemClass: {
      type: String,
      "default": ''
    },
    itemClassAdd: {
      type: Function
    },
    itemStyle: {
      type: Object
    },
    headerTag: {
      type: String,
      "default": 'div'
    },
    headerClass: {
      type: String,
      "default": ''
    },
    headerStyle: {
      type: Object
    },
    footerTag: {
      type: String,
      "default": 'div'
    },
    footerClass: {
      type: String,
      "default": ''
    },
    footerStyle: {
      type: Object
    },
    itemScopedSlots: {
      type: Object
    }
  };
  var ItemProps = {
    index: {
      type: Number
    },
    event: {
      type: String
    },
    tag: {
      type: String
    },
    horizontal: {
      type: Boolean
    },
    source: {
      type: Object
    },
    component: {
      type: [Object, Function]
    },
    uniqueKey: {
      type: [String, Number]
    },
    extraProps: {
      type: Object
    },
    scopedSlots: {
      type: Object
    }
  };
  var SlotProps = {
    event: {
      type: String
    },
    uniqueKey: {
      type: String
    },
    tag: {
      type: String
    },
    horizontal: {
      type: Boolean
    }
  };

  /**
   * item and slot component both use similar wrapper
   * we need to know their size change at any time
   */
  var Wrapper = {
    created: function created() {
      this.shapeKey = this.horizontal ? 'offsetWidth' : 'offsetHeight';
    },
    mounted: function mounted() {
      var _this = this;

      if (typeof ResizeObserver !== 'undefined') {
        this.resizeObserver = new ResizeObserver(function () {
          _this.dispatchSizeChange();
        });
        this.resizeObserver.observe(this.$el);
      }
    },
    // since componet will be reused, so disptach when updated
    updated: function updated() {
      this.dispatchSizeChange();
    },
    beforeDestroy: function beforeDestroy() {
      if (this.resizeObserver) {
        this.resizeObserver.disconnect();
        this.resizeObserver = null;
      }
    },
    methods: {
      getCurrentSize: function getCurrentSize() {
        return this.$el ? this.$el[this.shapeKey] : 0;
      },
      // tell parent current size identify by unqiue key
      dispatchSizeChange: function dispatchSizeChange() {
        this.$parent.$emit(this.event, this.uniqueKey, this.getCurrentSize(), this.hasInitial);
      }
    }
  }; // wrapping for item

  var Item = Vue.component('virtual-list-item', {
    mixins: [Wrapper],
    props: ItemProps,
    render: function render(h) {
      var tag = this.tag,
          component = this.component,
          _this$extraProps = this.extraProps,
          extraProps = _this$extraProps === void 0 ? {} : _this$extraProps,
          index = this.index,
          _this$scopedSlots = this.scopedSlots,
          scopedSlots = _this$scopedSlots === void 0 ? {} : _this$scopedSlots,
          uniqueKey = this.uniqueKey;
      extraProps.source = this.source;
      extraProps.index = index;
      return h(tag, {
        key: uniqueKey,
        attrs: {
          role: 'listitem'
        }
      }, [h(component, {
        props: extraProps,
        scopedSlots: scopedSlots
      })]);
    }
  }); // wrapping for slot

  var Slot = Vue.component('virtual-list-slot', {
    mixins: [Wrapper],
    props: SlotProps,
    render: function render(h) {
      var tag = this.tag,
          uniqueKey = this.uniqueKey;
      return h(tag, {
        key: uniqueKey,
        attrs: {
          role: uniqueKey
        }
      }, this.$slots["default"]);
    }
  });

  /**
   * virtual list default component
   */
  var EVENT_TYPE = {
    ITEM: 'item_resize',
    SLOT: 'slot_resize'
  };
  var SLOT_TYPE = {
    HEADER: 'header',
    // string value also use for aria role attribute
    FOOTER: 'footer'
  };
  var VirtualList = Vue.component('virtual-list', {
    props: VirtualProps,
    data: function data() {
      return {
        range: null
      };
    },
    watch: {
      'dataSources.length': function dataSourcesLength() {
        this.virtual.updateParam('uniqueIds', this.getUniqueIdFromDataSources());
        this.virtual.handleDataSourcesChange();
      },
      keeps: function keeps(newValue) {
        this.virtual.updateParam('keeps', newValue);
        this.virtual.handleSlotSizeChange();
      },
      start: function start(newValue) {
        this.scrollToIndex(newValue);
      },
      offset: function offset(newValue) {
        this.scrollToOffset(newValue);
      }
    },
    created: function created() {
      this.isHorizontal = this.direction === 'horizontal';
      this.directionKey = this.isHorizontal ? 'scrollLeft' : 'scrollTop';
      this.installVirtual(); // listen item size change

      this.$on(EVENT_TYPE.ITEM, this.onItemResized); // listen slot size change

      if (this.$slots.header || this.$slots.footer) {
        this.$on(EVENT_TYPE.SLOT, this.onSlotResized);
      }
    },
    // set back offset when awake from keep-alive
    activated: function activated() {
      this.scrollToOffset(this.virtual.offset);
    },
    mounted: function mounted() {
      // set position
      if (this.start) {
        this.scrollToIndex(this.start);
      } else if (this.offset) {
        this.scrollToOffset(this.offset);
      } // in page mode we bind scroll event to document


      if (this.pageMode) {
        this.updatePageModeFront();
        document.addEventListener('scroll', this.onScroll, {
          passive: false
        });
      }
    },
    beforeDestroy: function beforeDestroy() {
      this.virtual.destroy();

      if (this.pageMode) {
        document.removeEventListener('scroll', this.onScroll);
      }
    },
    methods: {
      // get item size by id
      getSize: function getSize(id) {
        return this.virtual.sizes.get(id);
      },
      // get the total number of stored (rendered) items
      getSizes: function getSizes() {
        return this.virtual.sizes.size;
      },
      // return current scroll offset
      getOffset: function getOffset() {
        if (this.pageMode) {
          return document.documentElement[this.directionKey] || document.body[this.directionKey];
        } else {
          var root = this.$refs.root;
          return root ? Math.ceil(root[this.directionKey]) : 0;
        }
      },
      // return client viewport size
      getClientSize: function getClientSize() {
        var key = this.isHorizontal ? 'clientWidth' : 'clientHeight';

        if (this.pageMode) {
          return document.documentElement[key] || document.body[key];
        } else {
          var root = this.$refs.root;
          return root ? Math.ceil(root[key]) : 0;
        }
      },
      // return all scroll size
      getScrollSize: function getScrollSize() {
        var key = this.isHorizontal ? 'scrollWidth' : 'scrollHeight';

        if (this.pageMode) {
          return document.documentElement[key] || document.body[key];
        } else {
          var root = this.$refs.root;
          return root ? Math.ceil(root[key]) : 0;
        }
      },
      // set current scroll position to a expectant offset
      scrollToOffset: function scrollToOffset(offset) {
        if (this.pageMode) {
          document.body[this.directionKey] = offset;
          document.documentElement[this.directionKey] = offset;
        } else {
          var root = this.$refs.root;

          if (root) {
            root[this.directionKey] = offset;
          }
        }
      },
      // set current scroll position to a expectant index
      scrollToIndex: function scrollToIndex(index) {
        // scroll to bottom
        if (index >= this.dataSources.length - 1) {
          this.scrollToBottom();
        } else {
          var offset = this.virtual.getOffset(index);
          this.scrollToOffset(offset);
        }
      },
      // set current scroll position to bottom
      scrollToBottom: function scrollToBottom() {
        var _this = this;

        var shepherd = this.$refs.shepherd;

        if (shepherd) {
          var offset = shepherd[this.isHorizontal ? 'offsetLeft' : 'offsetTop'];
          this.scrollToOffset(offset); // check if it's really scrolled to the bottom
          // maybe list doesn't render and calculate to last range
          // so we need retry in next event loop until it really at bottom

          setTimeout(function () {
            if (_this.getOffset() + _this.getClientSize() < _this.getScrollSize()) {
              _this.scrollToBottom();
            }
          }, 3);
        }
      },
      // when using page mode we need update slot header size manually
      // taking root offset relative to the browser as slot header size
      updatePageModeFront: function updatePageModeFront() {
        var root = this.$refs.root;

        if (root) {
          var rect = root.getBoundingClientRect();
          var defaultView = root.ownerDocument.defaultView;
          var offsetFront = this.isHorizontal ? rect.left + defaultView.pageXOffset : rect.top + defaultView.pageYOffset;
          this.virtual.updateParam('slotHeaderSize', offsetFront);
        }
      },
      // reset all state back to initial
      reset: function reset() {
        this.virtual.destroy();
        this.scrollToOffset(0);
        this.installVirtual();
      },
      // ----------- public method end -----------
      installVirtual: function installVirtual() {
        this.virtual = new Virtual({
          slotHeaderSize: 0,
          slotFooterSize: 0,
          keeps: this.keeps,
          estimateSize: this.estimateSize,
          buffer: Math.round(this.keeps / 3),
          // recommend for a third of keeps
          uniqueIds: this.getUniqueIdFromDataSources()
        }, this.onRangeChanged); // sync initial range

        this.range = this.virtual.getRange();
      },
      getUniqueIdFromDataSources: function getUniqueIdFromDataSources() {
        var dataKey = this.dataKey;
        return this.dataSources.map(function (dataSource) {
          return typeof dataKey === 'function' ? dataKey(dataSource) : dataSource[dataKey];
        });
      },
      // event called when each item mounted or size changed
      onItemResized: function onItemResized(id, size) {
        this.virtual.saveSize(id, size);
        this.$emit('resized', id, size);
      },
      // event called when slot mounted or size changed
      onSlotResized: function onSlotResized(type, size, hasInit) {
        if (type === SLOT_TYPE.HEADER) {
          this.virtual.updateParam('slotHeaderSize', size);
        } else if (type === SLOT_TYPE.FOOTER) {
          this.virtual.updateParam('slotFooterSize', size);
        }

        if (hasInit) {
          this.virtual.handleSlotSizeChange();
        }
      },
      // here is the rerendering entry
      onRangeChanged: function onRangeChanged(range) {
        this.range = range;
      },
      onScroll: function onScroll(evt) {
        var offset = this.getOffset();
        var clientSize = this.getClientSize();
        var scrollSize = this.getScrollSize(); // iOS scroll-spring-back behavior will make direction mistake

        if (offset < 0 || offset + clientSize > scrollSize + 1 || !scrollSize) {
          return;
        }

        this.virtual.handleScroll(offset);
        this.emitEvent(offset, clientSize, scrollSize, evt);
      },
      // emit event in special position
      emitEvent: function emitEvent(offset, clientSize, scrollSize, evt) {
        this.$emit('scroll', evt, this.virtual.getRange());

        if (this.virtual.isFront() && !!this.dataSources.length && offset - this.topThreshold <= 0) {
          this.$emit('totop');
        } else if (this.virtual.isBehind() && offset + clientSize + this.bottomThreshold >= scrollSize) {
          this.$emit('tobottom');
        }
      },
      // get the real render slots based on range data
      // in-place patch strategy will try to reuse components as possible
      // so those components that are reused will not trigger lifecycle mounted
      getRenderSlots: function getRenderSlots(h) {
        var slots = [];
        var _this$range = this.range,
            start = _this$range.start,
            end = _this$range.end;
        var dataSources = this.dataSources,
            dataKey = this.dataKey,
            itemClass = this.itemClass,
            itemTag = this.itemTag,
            itemStyle = this.itemStyle,
            isHorizontal = this.isHorizontal,
            extraProps = this.extraProps,
            dataComponent = this.dataComponent,
            itemScopedSlots = this.itemScopedSlots;

        for (var index = start; index <= end; index++) {
          var dataSource = dataSources[index];

          if (dataSource) {
            var uniqueKey = typeof dataKey === 'function' ? dataKey(dataSource) : dataSource[dataKey];

            if (typeof uniqueKey === 'string' || typeof uniqueKey === 'number') {
              slots.push(h(Item, {
                props: {
                  index: index,
                  tag: itemTag,
                  event: EVENT_TYPE.ITEM,
                  horizontal: isHorizontal,
                  uniqueKey: uniqueKey,
                  source: dataSource,
                  extraProps: extraProps,
                  component: dataComponent,
                  scopedSlots: itemScopedSlots
                },
                style: itemStyle,
                "class": "".concat(itemClass).concat(this.itemClassAdd ? ' ' + this.itemClassAdd(index) : '')
              }));
            } else {
              console.warn("Cannot get the data-key '".concat(dataKey, "' from data-sources."));
            }
          } else {
            console.warn("Cannot get the index '".concat(index, "' from data-sources."));
          }
        }

        return slots;
      }
    },
    // render function, a closer-to-the-compiler alternative to templates
    // https://vuejs.org/v2/guide/render-function.html#The-Data-Object-In-Depth
    render: function render(h) {
      var _this$$slots = this.$slots,
          header = _this$$slots.header,
          footer = _this$$slots.footer;
      var _this$range2 = this.range,
          padFront = _this$range2.padFront,
          padBehind = _this$range2.padBehind;
      var isHorizontal = this.isHorizontal,
          pageMode = this.pageMode,
          rootTag = this.rootTag,
          wrapTag = this.wrapTag,
          wrapClass = this.wrapClass,
          wrapStyle = this.wrapStyle,
          headerTag = this.headerTag,
          headerClass = this.headerClass,
          headerStyle = this.headerStyle,
          footerTag = this.footerTag,
          footerClass = this.footerClass,
          footerStyle = this.footerStyle;
      var paddingStyle = {
        padding: isHorizontal ? "0px ".concat(padBehind, "px 0px ").concat(padFront, "px") : "".concat(padFront, "px 0px ").concat(padBehind, "px")
      };
      var wrapperStyle = wrapStyle ? Object.assign({}, wrapStyle, paddingStyle) : paddingStyle;
      return h(rootTag, {
        ref: 'root',
        on: {
          '&scroll': !pageMode && this.onScroll
        }
      }, [// header slot
      header ? h(Slot, {
        "class": headerClass,
        style: headerStyle,
        props: {
          tag: headerTag,
          event: EVENT_TYPE.SLOT,
          uniqueKey: SLOT_TYPE.HEADER
        }
      }, header) : null, // main list
      h(wrapTag, {
        "class": wrapClass,
        attrs: {
          role: 'group'
        },
        style: wrapperStyle
      }, this.getRenderSlots(h)), // footer slot
      footer ? h(Slot, {
        "class": footerClass,
        style: footerStyle,
        props: {
          tag: footerTag,
          event: EVENT_TYPE.SLOT,
          uniqueKey: SLOT_TYPE.FOOTER
        }
      }, footer) : null, // an empty element use to scroll to bottom
      h('div', {
        ref: 'shepherd',
        style: {
          width: isHorizontal ? '0px' : '100%',
          height: isHorizontal ? '100%' : '0px'
        }
      })]);
    }
  });

  return VirtualList;

})));


/***/ }),

/***/ "8a0d":
/***/ (function(module, exports) {

module.exports = {};


/***/ }),

/***/ "8aa5":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var charAt = __webpack_require__("6547").charAt;

// `AdvanceStringIndex` abstract operation
// https://tc39.github.io/ecma262/#sec-advancestringindex
module.exports = function (S, index, unicode) {
  return index + (unicode ? charAt(S, index).length : 1);
};


/***/ }),

/***/ "8aa7":
/***/ (function(module, exports, __webpack_require__) {

/* eslint-disable no-new */
var global = __webpack_require__("da84");
var fails = __webpack_require__("d039");
var checkCorrectnessOfIteration = __webpack_require__("1c7e");
var NATIVE_ARRAY_BUFFER_VIEWS = __webpack_require__("ebb5").NATIVE_ARRAY_BUFFER_VIEWS;

var ArrayBuffer = global.ArrayBuffer;
var Int8Array = global.Int8Array;

module.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {
  Int8Array(1);
}) || !fails(function () {
  new Int8Array(-1);
}) || !checkCorrectnessOfIteration(function (iterable) {
  new Int8Array();
  new Int8Array(null);
  new Int8Array(1.5);
  new Int8Array(iterable);
}, true) || fails(function () {
  // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill
  return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1;
});


/***/ }),

/***/ "8b00":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "8b1a":
/***/ (function(module, exports) {

var id = 0;
var px = Math.random();
module.exports = function (key) {
  return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};


/***/ }),

/***/ "8bbc":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("944a");

__webpack_require__("99af");

__webpack_require__("c975");

__webpack_require__("b0c0");

__webpack_require__("0c47");

__webpack_require__("23dc");

__webpack_require__("d3b7");

var _typeof = __webpack_require__("7037");

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

  /******/

  /******/
  // Load entry module and return exports

  /******/

  return __webpack_require__(__webpack_require__.s = 124);
  /******/
}(
/************************************************************************/

/******/
{
  /***/
  0:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";
    /* harmony export (binding) */

    __webpack_require__.d(__webpack_exports__, "a", function () {
      return normalizeComponent;
    });
    /* globals __VUE_SSR_CONTEXT__ */
    // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
    // This module is a runtime utility for cleaner component module output and will
    // be included in the final webpack user bundle.


    function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier,
    /* server only */
    shadowMode
    /* vue-cli only */
    ) {
      // Vue.extend constructor export interop
      var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports; // render functions

      if (render) {
        options.render = render;
        options.staticRenderFns = staticRenderFns;
        options._compiled = true;
      } // functional template


      if (functionalTemplate) {
        options.functional = true;
      } // scopedId


      if (scopeId) {
        options._scopeId = 'data-v-' + scopeId;
      }

      var hook;

      if (moduleIdentifier) {
        // server build
        hook = function hook(context) {
          // 2.3 injection
          context = context || // cached call
          this.$vnode && this.$vnode.ssrContext || // stateful
          this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
          // 2.2 with runInNewContext: true

          if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
            context = __VUE_SSR_CONTEXT__;
          } // inject component styles


          if (injectStyles) {
            injectStyles.call(this, context);
          } // register component module identifier for async chunk inferrence


          if (context && context._registeredComponents) {
            context._registeredComponents.add(moduleIdentifier);
          }
        }; // used by ssr in case component is cached and beforeCreate
        // never gets called


        options._ssrRegister = hook;
      } else if (injectStyles) {
        hook = shadowMode ? function () {
          injectStyles.call(this, this.$root.$options.shadowRoot);
        } : injectStyles;
      }

      if (hook) {
        if (options.functional) {
          // for template-only hot-reload because in that case the render fn doesn't
          // go through the normalizer
          options._injectStyles = hook; // register for functioal component in vue file

          var originalRender = options.render;

          options.render = function renderWithStyleInjection(h, context) {
            hook.call(context);
            return originalRender(h, context);
          };
        } else {
          // inject component registration as beforeCreate hook
          var existing = options.beforeCreate;
          options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
        }
      }

      return {
        exports: scriptExports,
        options: options
      };
    }
    /***/

  },

  /***/
  124:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tag/src/tag.vue?vue&type=script&lang=js&

    /* harmony default export */


    var tagvue_type_script_lang_js_ = {
      name: 'ElTag',
      props: {
        text: String,
        closable: Boolean,
        type: String,
        hit: Boolean,
        disableTransitions: Boolean,
        color: String,
        size: String,
        effect: {
          type: String,
          default: 'light',
          validator: function validator(val) {
            return ['dark', 'light', 'plain'].indexOf(val) !== -1;
          }
        }
      },
      methods: {
        handleClose: function handleClose(event) {
          event.stopPropagation();
          this.$emit('close', event);
        },
        handleClick: function handleClick(event) {
          this.$emit('click', event);
        }
      },
      computed: {
        tagSize: function tagSize() {
          return this.size || (this.$ELEMENT || {}).size;
        }
      },
      render: function render(h) {
        var type = this.type,
            tagSize = this.tagSize,
            hit = this.hit,
            effect = this.effect;
        var classes = ['el-tag', type ? 'el-tag--' + type : '', tagSize ? 'el-tag--' + tagSize : '', effect ? 'el-tag--' + effect : '', hit && 'is-hit'];
        var tagEl = h('span', {
          'class': classes,
          style: {
            backgroundColor: this.color
          },
          on: {
            'click': this.handleClick
          }
        }, [this.$slots.default, this.closable && h('i', {
          'class': 'el-tag__close el-icon-close',
          on: {
            'click': this.handleClose
          }
        })]);
        return this.disableTransitions ? tagEl : h('transition', {
          attrs: {
            name: 'el-zoom-in-center'
          }
        }, [tagEl]);
      }
    }; // CONCATENATED MODULE: ./packages/tag/src/tag.vue?vue&type=script&lang=js&

    /* harmony default export */

    var src_tagvue_type_script_lang_js_ = tagvue_type_script_lang_js_; // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js

    var componentNormalizer = __webpack_require__(0); // CONCATENATED MODULE: ./packages/tag/src/tag.vue


    var render, staticRenderFns;
    /* normalize component */

    var component = Object(componentNormalizer["a"
    /* default */
    ])(src_tagvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null);
    /* hot reload */

    if (false) { var api; }

    component.options.__file = "packages/tag/src/tag.vue";
    /* harmony default export */

    var tag = component.exports; // CONCATENATED MODULE: ./packages/tag/index.js

    /* istanbul ignore next */

    tag.install = function (Vue) {
      Vue.component(tag.name, tag);
    };
    /* harmony default export */


    var packages_tag = __webpack_exports__["default"] = tag;
    /***/
  }
  /******/

});

/***/ }),

/***/ "8bbf":
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;

/***/ }),

/***/ "8cca":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "8ce5":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "8df4":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var Cancel = __webpack_require__("7a77");

/**
 * A `CancelToken` is an object that can be used to request cancellation of an operation.
 *
 * @class
 * @param {Function} executor The executor function.
 */
function CancelToken(executor) {
  if (typeof executor !== 'function') {
    throw new TypeError('executor must be a function.');
  }

  var resolvePromise;
  this.promise = new Promise(function promiseExecutor(resolve) {
    resolvePromise = resolve;
  });

  var token = this;
  executor(function cancel(message) {
    if (token.reason) {
      // Cancellation has already been requested
      return;
    }

    token.reason = new Cancel(message);
    resolvePromise(token.reason);
  });
}

/**
 * Throws a `Cancel` if cancellation has been requested.
 */
CancelToken.prototype.throwIfRequested = function throwIfRequested() {
  if (this.reason) {
    throw this.reason;
  }
};

/**
 * Returns an object that contains a new `CancelToken` and a function that, when called,
 * cancels the `CancelToken`.
 */
CancelToken.source = function source() {
  var cancel;
  var token = new CancelToken(function executor(c) {
    cancel = c;
  });
  return {
    token: token,
    cancel: cancel
  };
};

module.exports = CancelToken;


/***/ }),

/***/ "8e34":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "8eb7":
/***/ (function(module, exports) {

/**
 * Copyright 2004-present Facebook. All Rights Reserved.
 *
 * @providesModule UserAgent_DEPRECATED
 */

/**
 *  Provides entirely client-side User Agent and OS detection. You should prefer
 *  the non-deprecated UserAgent module when possible, which exposes our
 *  authoritative server-side PHP-based detection to the client.
 *
 *  Usage is straightforward:
 *
 *    if (UserAgent_DEPRECATED.ie()) {
 *      //  IE
 *    }
 *
 *  You can also do version checks:
 *
 *    if (UserAgent_DEPRECATED.ie() >= 7) {
 *      //  IE7 or better
 *    }
 *
 *  The browser functions will return NaN if the browser does not match, so
 *  you can also do version compares the other way:
 *
 *    if (UserAgent_DEPRECATED.ie() < 7) {
 *      //  IE6 or worse
 *    }
 *
 *  Note that the version is a float and may include a minor version number,
 *  so you should always use range operators to perform comparisons, not
 *  strict equality.
 *
 *  **Note:** You should **strongly** prefer capability detection to browser
 *  version detection where it's reasonable:
 *
 *    http://www.quirksmode.org/js/support.html
 *
 *  Further, we have a large number of mature wrapper functions and classes
 *  which abstract away many browser irregularities. Check the documentation,
 *  grep for things, or ask on javascript@lists.facebook.com before writing yet
 *  another copy of "event || window.event".
 *
 */

var _populated = false;

// Browsers
var _ie, _firefox, _opera, _webkit, _chrome;

// Actual IE browser for compatibility mode
var _ie_real_version;

// Platforms
var _osx, _windows, _linux, _android;

// Architectures
var _win64;

// Devices
var _iphone, _ipad, _native;

var _mobile;

function _populate() {
  if (_populated) {
    return;
  }

  _populated = true;

  // To work around buggy JS libraries that can't handle multi-digit
  // version numbers, Opera 10's user agent string claims it's Opera
  // 9, then later includes a Version/X.Y field:
  //
  // Opera/9.80 (foo) Presto/2.2.15 Version/10.10
  var uas = navigator.userAgent;
  var agent = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(uas);
  var os    = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);

  _iphone = /\b(iPhone|iP[ao]d)/.exec(uas);
  _ipad = /\b(iP[ao]d)/.exec(uas);
  _android = /Android/i.exec(uas);
  _native = /FBAN\/\w+;/i.exec(uas);
  _mobile = /Mobile/i.exec(uas);

  // Note that the IE team blog would have you believe you should be checking
  // for 'Win64; x64'.  But MSDN then reveals that you can actually be coming
  // from either x64 or ia64;  so ultimately, you should just check for Win64
  // as in indicator of whether you're in 64-bit IE.  32-bit IE on 64-bit
  // Windows will send 'WOW64' instead.
  _win64 = !!(/Win64/.exec(uas));

  if (agent) {
    _ie = agent[1] ? parseFloat(agent[1]) : (
          agent[5] ? parseFloat(agent[5]) : NaN);
    // IE compatibility mode
    if (_ie && document && document.documentMode) {
      _ie = document.documentMode;
    }
    // grab the "true" ie version from the trident token if available
    var trident = /(?:Trident\/(\d+.\d+))/.exec(uas);
    _ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;

    _firefox = agent[2] ? parseFloat(agent[2]) : NaN;
    _opera   = agent[3] ? parseFloat(agent[3]) : NaN;
    _webkit  = agent[4] ? parseFloat(agent[4]) : NaN;
    if (_webkit) {
      // We do not add the regexp to the above test, because it will always
      // match 'safari' only since 'AppleWebKit' appears before 'Chrome' in
      // the userAgent string.
      agent = /(?:Chrome\/(\d+\.\d+))/.exec(uas);
      _chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;
    } else {
      _chrome = NaN;
    }
  } else {
    _ie = _firefox = _opera = _chrome = _webkit = NaN;
  }

  if (os) {
    if (os[1]) {
      // Detect OS X version.  If no version number matches, set _osx to true.
      // Version examples:  10, 10_6_1, 10.7
      // Parses version number as a float, taking only first two sets of
      // digits.  If only one set of digits is found, returns just the major
      // version number.
      var ver = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(uas);

      _osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;
    } else {
      _osx = false;
    }
    _windows = !!os[2];
    _linux   = !!os[3];
  } else {
    _osx = _windows = _linux = false;
  }
}

var UserAgent_DEPRECATED = {

  /**
   *  Check if the UA is Internet Explorer.
   *
   *
   *  @return float|NaN Version number (if match) or NaN.
   */
  ie: function() {
    return _populate() || _ie;
  },

  /**
   * Check if we're in Internet Explorer compatibility mode.
   *
   * @return bool true if in compatibility mode, false if
   * not compatibility mode or not ie
   */
  ieCompatibilityMode: function() {
    return _populate() || (_ie_real_version > _ie);
  },


  /**
   * Whether the browser is 64-bit IE.  Really, this is kind of weak sauce;  we
   * only need this because Skype can't handle 64-bit IE yet.  We need to remove
   * this when we don't need it -- tracked by #601957.
   */
  ie64: function() {
    return UserAgent_DEPRECATED.ie() && _win64;
  },

  /**
   *  Check if the UA is Firefox.
   *
   *
   *  @return float|NaN Version number (if match) or NaN.
   */
  firefox: function() {
    return _populate() || _firefox;
  },


  /**
   *  Check if the UA is Opera.
   *
   *
   *  @return float|NaN Version number (if match) or NaN.
   */
  opera: function() {
    return _populate() || _opera;
  },


  /**
   *  Check if the UA is WebKit.
   *
   *
   *  @return float|NaN Version number (if match) or NaN.
   */
  webkit: function() {
    return _populate() || _webkit;
  },

  /**
   *  For Push
   *  WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit
   */
  safari: function() {
    return UserAgent_DEPRECATED.webkit();
  },

  /**
   *  Check if the UA is a Chrome browser.
   *
   *
   *  @return float|NaN Version number (if match) or NaN.
   */
  chrome : function() {
    return _populate() || _chrome;
  },


  /**
   *  Check if the user is running Windows.
   *
   *  @return bool `true' if the user's OS is Windows.
   */
  windows: function() {
    return _populate() || _windows;
  },


  /**
   *  Check if the user is running Mac OS X.
   *
   *  @return float|bool   Returns a float if a version number is detected,
   *                       otherwise true/false.
   */
  osx: function() {
    return _populate() || _osx;
  },

  /**
   * Check if the user is running Linux.
   *
   * @return bool `true' if the user's OS is some flavor of Linux.
   */
  linux: function() {
    return _populate() || _linux;
  },

  /**
   * Check if the user is running on an iPhone or iPod platform.
   *
   * @return bool `true' if the user is running some flavor of the
   *    iPhone OS.
   */
  iphone: function() {
    return _populate() || _iphone;
  },

  mobile: function() {
    return _populate() || (_iphone || _ipad || _android || _mobile);
  },

  nativeApp: function() {
    // webviews inside of the native apps
    return _populate() || _native;
  },

  android: function() {
    return _populate() || _android;
  },

  ipad: function() {
    return _populate() || _ipad;
  }
};

module.exports = UserAgent_DEPRECATED;


/***/ }),

/***/ "8f94":
/***/ (function(module, exports, __webpack_require__) {

!function(e,t){ true?module.exports=t(__webpack_require__("56b3")):undefined}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=3)}([function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r),i=window.CodeMirror||o.default;"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),r=1;r<arguments.length;r++){var o=arguments[r];if(null!=o)for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])}return n},writable:!0,configurable:!0}),t.default={name:"codemirror",data:function(){return{content:"",codemirror:null,cminstance:null}},props:{code:String,value:String,marker:Function,unseenLines:Array,name:{type:String,default:"codemirror"},placeholder:{type:String,default:""},merge:{type:Boolean,default:!1},options:{type:Object,default:function(){return{}}},events:{type:Array,default:function(){return[]}},globalOptions:{type:Object,default:function(){return{}}},globalEvents:{type:Array,default:function(){return[]}}},watch:{options:{deep:!0,handler:function(e){for(var t in e)this.cminstance.setOption(t,e[t])}},merge:function(){this.$nextTick(this.switchMerge)},code:function(e){this.handerCodeChange(e)},value:function(e){this.handerCodeChange(e)}},methods:{initialize:function(){var e=this,t=Object.assign({},this.globalOptions,this.options);this.merge?(this.codemirror=i.MergeView(this.$refs.mergeview,t),this.cminstance=this.codemirror.edit):(this.codemirror=i.fromTextArea(this.$refs.textarea,t),this.cminstance=this.codemirror,this.cminstance.setValue(this.code||this.value||this.content)),this.cminstance.on("change",function(t){e.content=t.getValue(),e.$emit&&e.$emit("input",e.content)});var n={};["scroll","changes","beforeChange","cursorActivity","keyHandled","inputRead","electricInput","beforeSelectionChange","viewportChange","swapDoc","gutterClick","gutterContextMenu","focus","blur","refresh","optionChange","scrollCursorIntoView","update"].concat(this.events).concat(this.globalEvents).filter(function(e){return!n[e]&&(n[e]=!0)}).forEach(function(t){e.cminstance.on(t,function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];e.$emit.apply(e,[t].concat(r));var i=t.replace(/([A-Z])/g,"-$1").toLowerCase();i!==t&&e.$emit.apply(e,[i].concat(r))})});this.$emit("ready",this.codemirror),this.unseenLineMarkers(),this.refresh()},refresh:function(){var e=this;this.$nextTick(function(){e.cminstance.refresh()})},destroy:function(){var e=this.cminstance.doc.cm.getWrapperElement();e&&e.remove&&e.remove()},handerCodeChange:function(e){if(e!==this.cminstance.getValue()){var t=this.cminstance.getScrollInfo();this.cminstance.setValue(e),this.content=e,this.cminstance.scrollTo(t.left,t.top)}this.unseenLineMarkers()},unseenLineMarkers:function(){var e=this;void 0!==this.unseenLines&&void 0!==this.marker&&this.unseenLines.forEach(function(t){var n=e.cminstance.lineInfo(t);e.cminstance.setGutterMarker(t,"breakpoints",n.gutterMarkers?null:e.marker())})},switchMerge:function(){var e=this.cminstance.doc.history,t=this.cminstance.doc.cleanGeneration;this.options.value=this.cminstance.getValue(),this.destroy(),this.initialize(),this.cminstance.doc.history=e,this.cminstance.doc.cleanGeneration=t}},mounted:function(){this.initialize()},beforeDestroy:function(){this.destroy()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n.n(r);for(var i in r)["default","default"].indexOf(i)<0&&function(e){n.d(t,e,function(){return r[e]})}(i);var s=n(5),c=n(4),a=c(o.a,s.a,!1,null,null,null);t.default=a.exports},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.install=t.codemirror=t.CodeMirror=void 0;var o=n(0),i=r(o),s=n(2),c=r(s),a=window.CodeMirror||i.default,u=function(e,t){t&&(t.options&&(c.default.props.globalOptions.default=function(){return t.options}),t.events&&(c.default.props.globalEvents.default=function(){return t.events})),e.component(c.default.name,c.default)},l={CodeMirror:a,codemirror:c.default,install:u};t.default=l,t.CodeMirror=a,t.codemirror=c.default,t.install=u},function(e,t){e.exports=function(e,t,n,r,o,i){var s,c=e=e||{},a=typeof e.default;"object"!==a&&"function"!==a||(s=e,c=e.default);var u="function"==typeof c?c.options:c;t&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0),n&&(u.functional=!0),o&&(u._scopeId=o);var l;if(i?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},u._ssrRegister=l):r&&(l=r),l){var f=u.functional,d=f?u.render:u.beforeCreate;f?(u._injectStyles=l,u.render=function(e,t){return l.call(t),d(e,t)}):u.beforeCreate=d?[].concat(d,l):[l]}return{esModule:s,exports:c,options:u}}},function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"vue-codemirror",class:{merge:e.merge}},[e.merge?n("div",{ref:"mergeview"}):n("textarea",{ref:"textarea",attrs:{name:e.name,placeholder:e.placeholder}})])},o=[],i={render:r,staticRenderFns:o};t.a=i}])});

/***/ }),

/***/ "903e":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"));
  else {}
})(function(CodeMirror) {
"use strict";

CodeMirror.registerHelper("wordChars", "r", /[\w.]/);

CodeMirror.defineMode("r", function(config) {
  function wordObj(words) {
    var res = {};
    for (var i = 0; i < words.length; ++i) res[words[i]] = true;
    return res;
  }
  var commonAtoms = ["NULL", "NA", "Inf", "NaN", "NA_integer_", "NA_real_", "NA_complex_", "NA_character_", "TRUE", "FALSE"];
  var commonBuiltins = ["list", "quote", "bquote", "eval", "return", "call", "parse", "deparse"];
  var commonKeywords = ["if", "else", "repeat", "while", "function", "for", "in", "next", "break"];
  var commonBlockKeywords = ["if", "else", "repeat", "while", "function", "for"];

  CodeMirror.registerHelper("hintWords", "r", commonAtoms.concat(commonBuiltins, commonKeywords));

  var atoms = wordObj(commonAtoms);
  var builtins = wordObj(commonBuiltins);
  var keywords = wordObj(commonKeywords);
  var blockkeywords = wordObj(commonBlockKeywords);
  var opChars = /[+\-*\/^<>=!&|~$:]/;
  var curPunc;

  function tokenBase(stream, state) {
    curPunc = null;
    var ch = stream.next();
    if (ch == "#") {
      stream.skipToEnd();
      return "comment";
    } else if (ch == "0" && stream.eat("x")) {
      stream.eatWhile(/[\da-f]/i);
      return "number";
    } else if (ch == "." && stream.eat(/\d/)) {
      stream.match(/\d*(?:e[+\-]?\d+)?/);
      return "number";
    } else if (/\d/.test(ch)) {
      stream.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/);
      return "number";
    } else if (ch == "'" || ch == '"') {
      state.tokenize = tokenString(ch);
      return "string";
    } else if (ch == "`") {
      stream.match(/[^`]+`/);
      return "variable-3";
    } else if (ch == "." && stream.match(/.[.\d]+/)) {
      return "keyword";
    } else if (/[\w\.]/.test(ch) && ch != "_") {
      stream.eatWhile(/[\w\.]/);
      var word = stream.current();
      if (atoms.propertyIsEnumerable(word)) return "atom";
      if (keywords.propertyIsEnumerable(word)) {
        // Block keywords start new blocks, except 'else if', which only starts
        // one new block for the 'if', no block for the 'else'.
        if (blockkeywords.propertyIsEnumerable(word) &&
            !stream.match(/\s*if(\s+|$)/, false))
          curPunc = "block";
        return "keyword";
      }
      if (builtins.propertyIsEnumerable(word)) return "builtin";
      return "variable";
    } else if (ch == "%") {
      if (stream.skipTo("%")) stream.next();
      return "operator variable-2";
    } else if (
        (ch == "<" && stream.eat("-")) ||
        (ch == "<" && stream.match("<-")) ||
        (ch == "-" && stream.match(/>>?/))
      ) {
      return "operator arrow";
    } else if (ch == "=" && state.ctx.argList) {
      return "arg-is";
    } else if (opChars.test(ch)) {
      if (ch == "$") return "operator dollar";
      stream.eatWhile(opChars);
      return "operator";
    } else if (/[\(\){}\[\];]/.test(ch)) {
      curPunc = ch;
      if (ch == ";") return "semi";
      return null;
    } else {
      return null;
    }
  }

  function tokenString(quote) {
    return function(stream, state) {
      if (stream.eat("\\")) {
        var ch = stream.next();
        if (ch == "x") stream.match(/^[a-f0-9]{2}/i);
        else if ((ch == "u" || ch == "U") && stream.eat("{") && stream.skipTo("}")) stream.next();
        else if (ch == "u") stream.match(/^[a-f0-9]{4}/i);
        else if (ch == "U") stream.match(/^[a-f0-9]{8}/i);
        else if (/[0-7]/.test(ch)) stream.match(/^[0-7]{1,2}/);
        return "string-2";
      } else {
        var next;
        while ((next = stream.next()) != null) {
          if (next == quote) { state.tokenize = tokenBase; break; }
          if (next == "\\") { stream.backUp(1); break; }
        }
        return "string";
      }
    };
  }

  var ALIGN_YES = 1, ALIGN_NO = 2, BRACELESS = 4

  function push(state, type, stream) {
    state.ctx = {type: type,
                 indent: state.indent,
                 flags: 0,
                 column: stream.column(),
                 prev: state.ctx};
  }
  function setFlag(state, flag) {
    var ctx = state.ctx
    state.ctx = {type: ctx.type,
                 indent: ctx.indent,
                 flags: ctx.flags | flag,
                 column: ctx.column,
                 prev: ctx.prev}
  }
  function pop(state) {
    state.indent = state.ctx.indent;
    state.ctx = state.ctx.prev;
  }

  return {
    startState: function() {
      return {tokenize: tokenBase,
              ctx: {type: "top",
                    indent: -config.indentUnit,
                    flags: ALIGN_NO},
              indent: 0,
              afterIdent: false};
    },

    token: function(stream, state) {
      if (stream.sol()) {
        if ((state.ctx.flags & 3) == 0) state.ctx.flags |= ALIGN_NO
        if (state.ctx.flags & BRACELESS) pop(state)
        state.indent = stream.indentation();
      }
      if (stream.eatSpace()) return null;
      var style = state.tokenize(stream, state);
      if (style != "comment" && (state.ctx.flags & ALIGN_NO) == 0) setFlag(state, ALIGN_YES)

      if ((curPunc == ";" || curPunc == "{" || curPunc == "}") && state.ctx.type == "block") pop(state);
      if (curPunc == "{") push(state, "}", stream);
      else if (curPunc == "(") {
        push(state, ")", stream);
        if (state.afterIdent) state.ctx.argList = true;
      }
      else if (curPunc == "[") push(state, "]", stream);
      else if (curPunc == "block") push(state, "block", stream);
      else if (curPunc == state.ctx.type) pop(state);
      else if (state.ctx.type == "block" && style != "comment") setFlag(state, BRACELESS)
      state.afterIdent = style == "variable" || style == "keyword";
      return style;
    },

    indent: function(state, textAfter) {
      if (state.tokenize != tokenBase) return 0;
      var firstChar = textAfter && textAfter.charAt(0), ctx = state.ctx,
          closing = firstChar == ctx.type;
      if (ctx.flags & BRACELESS) ctx = ctx.prev
      if (ctx.type == "block") return ctx.indent + (firstChar == "{" ? 0 : config.indentUnit);
      else if (ctx.flags & ALIGN_YES) return ctx.column + (closing ? 0 : 1);
      else return ctx.indent + (closing ? 0 : config.indentUnit);
    },

    lineComment: "#"
  };
});

CodeMirror.defineMIME("text/x-rsrc", "r");

});


/***/ }),

/***/ "90e3":
/***/ (function(module, exports) {

var id = 0;
var postfix = Math.random();

module.exports = function (key) {
  return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
};


/***/ }),

/***/ "9112":
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__("83ab");
var definePropertyModule = __webpack_require__("9bf2");
var createPropertyDescriptor = __webpack_require__("5c6c");

module.exports = DESCRIPTORS ? function (object, key, value) {
  return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
} : function (object, key, value) {
  object[key] = value;
  return object;
};


/***/ }),

/***/ "9115":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_formula_vue_vue_type_style_index_1_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9f7f");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_formula_vue_vue_type_style_index_1_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_formula_vue_vue_type_style_index_1_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_formula_vue_vue_type_style_index_1_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "9129":
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__("23e7");

// `Number.isNaN` method
// https://tc39.github.io/ecma262/#sec-number.isnan
$({ target: 'Number', stat: true }, {
  isNaN: function isNaN(number) {
    // eslint-disable-next-line no-self-compare
    return number != number;
  }
});


/***/ }),

/***/ "9141":
/***/ (function(module, exports, __webpack_require__) {

var document = __webpack_require__("ef08").document;
module.exports = document && document.documentElement;


/***/ }),

/***/ "921b":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "9263":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var regexpFlags = __webpack_require__("ad6d");
var stickyHelpers = __webpack_require__("9f7fd");

var nativeExec = RegExp.prototype.exec;
// This always refers to the native implementation, because the
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
// which loads this file before patching the method.
var nativeReplace = String.prototype.replace;

var patchedExec = nativeExec;

var UPDATES_LAST_INDEX_WRONG = (function () {
  var re1 = /a/;
  var re2 = /b*/g;
  nativeExec.call(re1, 'a');
  nativeExec.call(re2, 'a');
  return re1.lastIndex !== 0 || re2.lastIndex !== 0;
})();

var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;

// nonparticipating capturing group, copied from es5-shim's String#split patch.
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;

var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;

if (PATCH) {
  patchedExec = function exec(str) {
    var re = this;
    var lastIndex, reCopy, match, i;
    var sticky = UNSUPPORTED_Y && re.sticky;
    var flags = regexpFlags.call(re);
    var source = re.source;
    var charsAdded = 0;
    var strCopy = str;

    if (sticky) {
      flags = flags.replace('y', '');
      if (flags.indexOf('g') === -1) {
        flags += 'g';
      }

      strCopy = String(str).slice(re.lastIndex);
      // Support anchored sticky behavior.
      if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
        source = '(?: ' + source + ')';
        strCopy = ' ' + strCopy;
        charsAdded++;
      }
      // ^(? + rx + ) is needed, in combination with some str slicing, to
      // simulate the 'y' flag.
      reCopy = new RegExp('^(?:' + source + ')', flags);
    }

    if (NPCG_INCLUDED) {
      reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
    }
    if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;

    match = nativeExec.call(sticky ? reCopy : re, strCopy);

    if (sticky) {
      if (match) {
        match.input = match.input.slice(charsAdded);
        match[0] = match[0].slice(charsAdded);
        match.index = re.lastIndex;
        re.lastIndex += match[0].length;
      } else re.lastIndex = 0;
    } else if (UPDATES_LAST_INDEX_WRONG && match) {
      re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
    }
    if (NPCG_INCLUDED && match && match.length > 1) {
      // Fix browsers whose `exec` methods don't consistently return `undefined`
      // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
      nativeReplace.call(match[0], reCopy, function () {
        for (i = 1; i < arguments.length - 2; i++) {
          if (arguments[i] === undefined) match[i] = undefined;
        }
      });
    }

    return match;
  };
}

module.exports = patchedExec;


/***/ }),

/***/ "92f0":
/***/ (function(module, exports, __webpack_require__) {

var def = __webpack_require__("1a14").f;
var has = __webpack_require__("9c0e");
var TAG = __webpack_require__("cc15")('toStringTag');

module.exports = function (it, tag, stat) {
  if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
};


/***/ }),

/***/ "92fa":
/***/ (function(module, exports) {

var nestRE = /^(attrs|props|on|nativeOn|class|style|hook)$/

module.exports = function mergeJSXProps (objs) {
  return objs.reduce(function (a, b) {
    var aa, bb, key, nestedKey, temp
    for (key in b) {
      aa = a[key]
      bb = b[key]
      if (aa && nestRE.test(key)) {
        // normalize class
        if (key === 'class') {
          if (typeof aa === 'string') {
            temp = aa
            a[key] = aa = {}
            aa[temp] = true
          }
          if (typeof bb === 'string') {
            temp = bb
            b[key] = bb = {}
            bb[temp] = true
          }
        }
        if (key === 'on' || key === 'nativeOn' || key === 'hook') {
          // merge functions
          for (nestedKey in bb) {
            aa[nestedKey] = mergeFn(aa[nestedKey], bb[nestedKey])
          }
        } else if (Array.isArray(aa)) {
          a[key] = aa.concat(bb)
        } else if (Array.isArray(bb)) {
          a[key] = [aa].concat(bb)
        } else {
          for (nestedKey in bb) {
            aa[nestedKey] = bb[nestedKey]
          }
        }
      } else {
        a[key] = b[key]
      }
    }
    return a
  }, {})
}

function mergeFn (a, b) {
  return function () {
    a && a.apply(this, arguments)
    b && b.apply(this, arguments)
  }
}


/***/ }),

/***/ "944a":
/***/ (function(module, exports, __webpack_require__) {

var defineWellKnownSymbol = __webpack_require__("746f");

// `Symbol.toStringTag` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.tostringtag
defineWellKnownSymbol('toStringTag');


/***/ }),

/***/ "94ca":
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__("d039");

var replacement = /#|\.prototype\./;

var isForced = function (feature, detection) {
  var value = data[normalize(feature)];
  return value == POLYFILL ? true
    : value == NATIVE ? false
    : typeof detection == 'function' ? fails(detection)
    : !!detection;
};

var normalize = isForced.normalize = function (string) {
  return String(string).replace(replacement, '.').toLowerCase();
};

var data = isForced.data = {};
var NATIVE = isForced.NATIVE = 'N';
var POLYFILL = isForced.POLYFILL = 'P';

module.exports = isForced;


/***/ }),

/***/ "959b":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"), __webpack_require__("d5e0"), __webpack_require__("f040"));
  else {}
})(function(CodeMirror) {
"use strict";

CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {

  var htmlMode = CodeMirror.getMode(cmCfg, "text/html");
  var htmlModeMissing = htmlMode.name == "null"

  function getMode(name) {
    if (CodeMirror.findModeByName) {
      var found = CodeMirror.findModeByName(name);
      if (found) name = found.mime || found.mimes[0];
    }
    var mode = CodeMirror.getMode(cmCfg, name);
    return mode.name == "null" ? null : mode;
  }

  // Should characters that affect highlighting be highlighted separate?
  // Does not include characters that will be output (such as `1.` and `-` for lists)
  if (modeCfg.highlightFormatting === undefined)
    modeCfg.highlightFormatting = false;

  // Maximum number of nested blockquotes. Set to 0 for infinite nesting.
  // Excess `>` will emit `error` token.
  if (modeCfg.maxBlockquoteDepth === undefined)
    modeCfg.maxBlockquoteDepth = 0;

  // Turn on task lists? ("- [ ] " and "- [x] ")
  if (modeCfg.taskLists === undefined) modeCfg.taskLists = false;

  // Turn on strikethrough syntax
  if (modeCfg.strikethrough === undefined)
    modeCfg.strikethrough = false;

  if (modeCfg.emoji === undefined)
    modeCfg.emoji = false;

  if (modeCfg.fencedCodeBlockHighlighting === undefined)
    modeCfg.fencedCodeBlockHighlighting = true;

  if (modeCfg.fencedCodeBlockDefaultMode === undefined)
    modeCfg.fencedCodeBlockDefaultMode = 'text/plain';

  if (modeCfg.xml === undefined)
    modeCfg.xml = true;

  // Allow token types to be overridden by user-provided token types.
  if (modeCfg.tokenTypeOverrides === undefined)
    modeCfg.tokenTypeOverrides = {};

  var tokenTypes = {
    header: "header",
    code: "comment",
    quote: "quote",
    list1: "variable-2",
    list2: "variable-3",
    list3: "keyword",
    hr: "hr",
    image: "image",
    imageAltText: "image-alt-text",
    imageMarker: "image-marker",
    formatting: "formatting",
    linkInline: "link",
    linkEmail: "link",
    linkText: "link",
    linkHref: "string",
    em: "em",
    strong: "strong",
    strikethrough: "strikethrough",
    emoji: "builtin"
  };

  for (var tokenType in tokenTypes) {
    if (tokenTypes.hasOwnProperty(tokenType) && modeCfg.tokenTypeOverrides[tokenType]) {
      tokenTypes[tokenType] = modeCfg.tokenTypeOverrides[tokenType];
    }
  }

  var hrRE = /^([*\-_])(?:\s*\1){2,}\s*$/
  ,   listRE = /^(?:[*\-+]|^[0-9]+([.)]))\s+/
  ,   taskListRE = /^\[(x| )\](?=\s)/i // Must follow listRE
  ,   atxHeaderRE = modeCfg.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/
  ,   setextHeaderRE = /^ {0,3}(?:\={1,}|-{2,})\s*$/
  ,   textRE = /^[^#!\[\]*_\\<>` "'(~:]+/
  ,   fencedCodeRE = /^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/
  ,   linkDefRE = /^\s*\[[^\]]+?\]:.*$/ // naive link-definition
  ,   punctuation = /[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/
  ,   expandedTab = "    " // CommonMark specifies tab as 4 spaces

  function switchInline(stream, state, f) {
    state.f = state.inline = f;
    return f(stream, state);
  }

  function switchBlock(stream, state, f) {
    state.f = state.block = f;
    return f(stream, state);
  }

  function lineIsEmpty(line) {
    return !line || !/\S/.test(line.string)
  }

  // Blocks

  function blankLine(state) {
    // Reset linkTitle state
    state.linkTitle = false;
    state.linkHref = false;
    state.linkText = false;
    // Reset EM state
    state.em = false;
    // Reset STRONG state
    state.strong = false;
    // Reset strikethrough state
    state.strikethrough = false;
    // Reset state.quote
    state.quote = 0;
    // Reset state.indentedCode
    state.indentedCode = false;
    if (state.f == htmlBlock) {
      var exit = htmlModeMissing
      if (!exit) {
        var inner = CodeMirror.innerMode(htmlMode, state.htmlState)
        exit = inner.mode.name == "xml" && inner.state.tagStart === null &&
          (!inner.state.context && inner.state.tokenize.isInText)
      }
      if (exit) {
        state.f = inlineNormal;
        state.block = blockNormal;
        state.htmlState = null;
      }
    }
    // Reset state.trailingSpace
    state.trailingSpace = 0;
    state.trailingSpaceNewLine = false;
    // Mark this line as blank
    state.prevLine = state.thisLine
    state.thisLine = {stream: null}
    return null;
  }

  function blockNormal(stream, state) {
    var firstTokenOnLine = stream.column() === state.indentation;
    var prevLineLineIsEmpty = lineIsEmpty(state.prevLine.stream);
    var prevLineIsIndentedCode = state.indentedCode;
    var prevLineIsHr = state.prevLine.hr;
    var prevLineIsList = state.list !== false;
    var maxNonCodeIndentation = (state.listStack[state.listStack.length - 1] || 0) + 3;

    state.indentedCode = false;

    var lineIndentation = state.indentation;
    // compute once per line (on first token)
    if (state.indentationDiff === null) {
      state.indentationDiff = state.indentation;
      if (prevLineIsList) {
        state.list = null;
        // While this list item's marker's indentation is less than the deepest
        //  list item's content's indentation,pop the deepest list item
        //  indentation off the stack, and update block indentation state
        while (lineIndentation < state.listStack[state.listStack.length - 1]) {
          state.listStack.pop();
          if (state.listStack.length) {
            state.indentation = state.listStack[state.listStack.length - 1];
          // less than the first list's indent -> the line is no longer a list
          } else {
            state.list = false;
          }
        }
        if (state.list !== false) {
          state.indentationDiff = lineIndentation - state.listStack[state.listStack.length - 1]
        }
      }
    }

    // not comprehensive (currently only for setext detection purposes)
    var allowsInlineContinuation = (
        !prevLineLineIsEmpty && !prevLineIsHr && !state.prevLine.header &&
        (!prevLineIsList || !prevLineIsIndentedCode) &&
        !state.prevLine.fencedCodeEnd
    );

    var isHr = (state.list === false || prevLineIsHr || prevLineLineIsEmpty) &&
      state.indentation <= maxNonCodeIndentation && stream.match(hrRE);

    var match = null;
    if (state.indentationDiff >= 4 && (prevLineIsIndentedCode || state.prevLine.fencedCodeEnd ||
         state.prevLine.header || prevLineLineIsEmpty)) {
      stream.skipToEnd();
      state.indentedCode = true;
      return tokenTypes.code;
    } else if (stream.eatSpace()) {
      return null;
    } else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(atxHeaderRE)) && match[1].length <= 6) {
      state.quote = 0;
      state.header = match[1].length;
      state.thisLine.header = true;
      if (modeCfg.highlightFormatting) state.formatting = "header";
      state.f = state.inline;
      return getType(state);
    } else if (state.indentation <= maxNonCodeIndentation && stream.eat('>')) {
      state.quote = firstTokenOnLine ? 1 : state.quote + 1;
      if (modeCfg.highlightFormatting) state.formatting = "quote";
      stream.eatSpace();
      return getType(state);
    } else if (!isHr && !state.setext && firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(listRE))) {
      var listType = match[1] ? "ol" : "ul";

      state.indentation = lineIndentation + stream.current().length;
      state.list = true;
      state.quote = 0;

      // Add this list item's content's indentation to the stack
      state.listStack.push(state.indentation);
      // Reset inline styles which shouldn't propagate aross list items
      state.em = false;
      state.strong = false;
      state.code = false;
      state.strikethrough = false;

      if (modeCfg.taskLists && stream.match(taskListRE, false)) {
        state.taskList = true;
      }
      state.f = state.inline;
      if (modeCfg.highlightFormatting) state.formatting = ["list", "list-" + listType];
      return getType(state);
    } else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(fencedCodeRE, true))) {
      state.quote = 0;
      state.fencedEndRE = new RegExp(match[1] + "+ *$");
      // try switching mode
      state.localMode = modeCfg.fencedCodeBlockHighlighting && getMode(match[2] || modeCfg.fencedCodeBlockDefaultMode );
      if (state.localMode) state.localState = CodeMirror.startState(state.localMode);
      state.f = state.block = local;
      if (modeCfg.highlightFormatting) state.formatting = "code-block";
      state.code = -1
      return getType(state);
    // SETEXT has lowest block-scope precedence after HR, so check it after
    //  the others (code, blockquote, list...)
    } else if (
      // if setext set, indicates line after ---/===
      state.setext || (
        // line before ---/===
        (!allowsInlineContinuation || !prevLineIsList) && !state.quote && state.list === false &&
        !state.code && !isHr && !linkDefRE.test(stream.string) &&
        (match = stream.lookAhead(1)) && (match = match.match(setextHeaderRE))
      )
    ) {
      if ( !state.setext ) {
        state.header = match[0].charAt(0) == '=' ? 1 : 2;
        state.setext = state.header;
      } else {
        state.header = state.setext;
        // has no effect on type so we can reset it now
        state.setext = 0;
        stream.skipToEnd();
        if (modeCfg.highlightFormatting) state.formatting = "header";
      }
      state.thisLine.header = true;
      state.f = state.inline;
      return getType(state);
    } else if (isHr) {
      stream.skipToEnd();
      state.hr = true;
      state.thisLine.hr = true;
      return tokenTypes.hr;
    } else if (stream.peek() === '[') {
      return switchInline(stream, state, footnoteLink);
    }

    return switchInline(stream, state, state.inline);
  }

  function htmlBlock(stream, state) {
    var style = htmlMode.token(stream, state.htmlState);
    if (!htmlModeMissing) {
      var inner = CodeMirror.innerMode(htmlMode, state.htmlState)
      if ((inner.mode.name == "xml" && inner.state.tagStart === null &&
           (!inner.state.context && inner.state.tokenize.isInText)) ||
          (state.md_inside && stream.current().indexOf(">") > -1)) {
        state.f = inlineNormal;
        state.block = blockNormal;
        state.htmlState = null;
      }
    }
    return style;
  }

  function local(stream, state) {
    var currListInd = state.listStack[state.listStack.length - 1] || 0;
    var hasExitedList = state.indentation < currListInd;
    var maxFencedEndInd = currListInd + 3;
    if (state.fencedEndRE && state.indentation <= maxFencedEndInd && (hasExitedList || stream.match(state.fencedEndRE))) {
      if (modeCfg.highlightFormatting) state.formatting = "code-block";
      var returnType;
      if (!hasExitedList) returnType = getType(state)
      state.localMode = state.localState = null;
      state.block = blockNormal;
      state.f = inlineNormal;
      state.fencedEndRE = null;
      state.code = 0
      state.thisLine.fencedCodeEnd = true;
      if (hasExitedList) return switchBlock(stream, state, state.block);
      return returnType;
    } else if (state.localMode) {
      return state.localMode.token(stream, state.localState);
    } else {
      stream.skipToEnd();
      return tokenTypes.code;
    }
  }

  // Inline
  function getType(state) {
    var styles = [];

    if (state.formatting) {
      styles.push(tokenTypes.formatting);

      if (typeof state.formatting === "string") state.formatting = [state.formatting];

      for (var i = 0; i < state.formatting.length; i++) {
        styles.push(tokenTypes.formatting + "-" + state.formatting[i]);

        if (state.formatting[i] === "header") {
          styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.header);
        }

        // Add `formatting-quote` and `formatting-quote-#` for blockquotes
        // Add `error` instead if the maximum blockquote nesting depth is passed
        if (state.formatting[i] === "quote") {
          if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {
            styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.quote);
          } else {
            styles.push("error");
          }
        }
      }
    }

    if (state.taskOpen) {
      styles.push("meta");
      return styles.length ? styles.join(' ') : null;
    }
    if (state.taskClosed) {
      styles.push("property");
      return styles.length ? styles.join(' ') : null;
    }

    if (state.linkHref) {
      styles.push(tokenTypes.linkHref, "url");
    } else { // Only apply inline styles to non-url text
      if (state.strong) { styles.push(tokenTypes.strong); }
      if (state.em) { styles.push(tokenTypes.em); }
      if (state.strikethrough) { styles.push(tokenTypes.strikethrough); }
      if (state.emoji) { styles.push(tokenTypes.emoji); }
      if (state.linkText) { styles.push(tokenTypes.linkText); }
      if (state.code) { styles.push(tokenTypes.code); }
      if (state.image) { styles.push(tokenTypes.image); }
      if (state.imageAltText) { styles.push(tokenTypes.imageAltText, "link"); }
      if (state.imageMarker) { styles.push(tokenTypes.imageMarker); }
    }

    if (state.header) { styles.push(tokenTypes.header, tokenTypes.header + "-" + state.header); }

    if (state.quote) {
      styles.push(tokenTypes.quote);

      // Add `quote-#` where the maximum for `#` is modeCfg.maxBlockquoteDepth
      if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {
        styles.push(tokenTypes.quote + "-" + state.quote);
      } else {
        styles.push(tokenTypes.quote + "-" + modeCfg.maxBlockquoteDepth);
      }
    }

    if (state.list !== false) {
      var listMod = (state.listStack.length - 1) % 3;
      if (!listMod) {
        styles.push(tokenTypes.list1);
      } else if (listMod === 1) {
        styles.push(tokenTypes.list2);
      } else {
        styles.push(tokenTypes.list3);
      }
    }

    if (state.trailingSpaceNewLine) {
      styles.push("trailing-space-new-line");
    } else if (state.trailingSpace) {
      styles.push("trailing-space-" + (state.trailingSpace % 2 ? "a" : "b"));
    }

    return styles.length ? styles.join(' ') : null;
  }

  function handleText(stream, state) {
    if (stream.match(textRE, true)) {
      return getType(state);
    }
    return undefined;
  }

  function inlineNormal(stream, state) {
    var style = state.text(stream, state);
    if (typeof style !== 'undefined')
      return style;

    if (state.list) { // List marker (*, +, -, 1., etc)
      state.list = null;
      return getType(state);
    }

    if (state.taskList) {
      var taskOpen = stream.match(taskListRE, true)[1] === " ";
      if (taskOpen) state.taskOpen = true;
      else state.taskClosed = true;
      if (modeCfg.highlightFormatting) state.formatting = "task";
      state.taskList = false;
      return getType(state);
    }

    state.taskOpen = false;
    state.taskClosed = false;

    if (state.header && stream.match(/^#+$/, true)) {
      if (modeCfg.highlightFormatting) state.formatting = "header";
      return getType(state);
    }

    var ch = stream.next();

    // Matches link titles present on next line
    if (state.linkTitle) {
      state.linkTitle = false;
      var matchCh = ch;
      if (ch === '(') {
        matchCh = ')';
      }
      matchCh = (matchCh+'').replace(/([.?*+^\[\]\\(){}|-])/g, "\\$1");
      var regex = '^\\s*(?:[^' + matchCh + '\\\\]+|\\\\\\\\|\\\\.)' + matchCh;
      if (stream.match(new RegExp(regex), true)) {
        return tokenTypes.linkHref;
      }
    }

    // If this block is changed, it may need to be updated in GFM mode
    if (ch === '`') {
      var previousFormatting = state.formatting;
      if (modeCfg.highlightFormatting) state.formatting = "code";
      stream.eatWhile('`');
      var count = stream.current().length
      if (state.code == 0 && (!state.quote || count == 1)) {
        state.code = count
        return getType(state)
      } else if (count == state.code) { // Must be exact
        var t = getType(state)
        state.code = 0
        return t
      } else {
        state.formatting = previousFormatting
        return getType(state)
      }
    } else if (state.code) {
      return getType(state);
    }

    if (ch === '\\') {
      stream.next();
      if (modeCfg.highlightFormatting) {
        var type = getType(state);
        var formattingEscape = tokenTypes.formatting + "-escape";
        return type ? type + " " + formattingEscape : formattingEscape;
      }
    }

    if (ch === '!' && stream.match(/\[[^\]]*\] ?(?:\(|\[)/, false)) {
      state.imageMarker = true;
      state.image = true;
      if (modeCfg.highlightFormatting) state.formatting = "image";
      return getType(state);
    }

    if (ch === '[' && state.imageMarker && stream.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/, false)) {
      state.imageMarker = false;
      state.imageAltText = true
      if (modeCfg.highlightFormatting) state.formatting = "image";
      return getType(state);
    }

    if (ch === ']' && state.imageAltText) {
      if (modeCfg.highlightFormatting) state.formatting = "image";
      var type = getType(state);
      state.imageAltText = false;
      state.image = false;
      state.inline = state.f = linkHref;
      return type;
    }

    if (ch === '[' && !state.image) {
      if (state.linkText && stream.match(/^.*?\]/)) return getType(state)
      state.linkText = true;
      if (modeCfg.highlightFormatting) state.formatting = "link";
      return getType(state);
    }

    if (ch === ']' && state.linkText) {
      if (modeCfg.highlightFormatting) state.formatting = "link";
      var type = getType(state);
      state.linkText = false;
      state.inline = state.f = stream.match(/\(.*?\)| ?\[.*?\]/, false) ? linkHref : inlineNormal
      return type;
    }

    if (ch === '<' && stream.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/, false)) {
      state.f = state.inline = linkInline;
      if (modeCfg.highlightFormatting) state.formatting = "link";
      var type = getType(state);
      if (type){
        type += " ";
      } else {
        type = "";
      }
      return type + tokenTypes.linkInline;
    }

    if (ch === '<' && stream.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/, false)) {
      state.f = state.inline = linkInline;
      if (modeCfg.highlightFormatting) state.formatting = "link";
      var type = getType(state);
      if (type){
        type += " ";
      } else {
        type = "";
      }
      return type + tokenTypes.linkEmail;
    }

    if (modeCfg.xml && ch === '<' && stream.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i, false)) {
      var end = stream.string.indexOf(">", stream.pos);
      if (end != -1) {
        var atts = stream.string.substring(stream.start, end);
        if (/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(atts)) state.md_inside = true;
      }
      stream.backUp(1);
      state.htmlState = CodeMirror.startState(htmlMode);
      return switchBlock(stream, state, htmlBlock);
    }

    if (modeCfg.xml && ch === '<' && stream.match(/^\/\w*?>/)) {
      state.md_inside = false;
      return "tag";
    } else if (ch === "*" || ch === "_") {
      var len = 1, before = stream.pos == 1 ? " " : stream.string.charAt(stream.pos - 2)
      while (len < 3 && stream.eat(ch)) len++
      var after = stream.peek() || " "
      // See http://spec.commonmark.org/0.27/#emphasis-and-strong-emphasis
      var leftFlanking = !/\s/.test(after) && (!punctuation.test(after) || /\s/.test(before) || punctuation.test(before))
      var rightFlanking = !/\s/.test(before) && (!punctuation.test(before) || /\s/.test(after) || punctuation.test(after))
      var setEm = null, setStrong = null
      if (len % 2) { // Em
        if (!state.em && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before)))
          setEm = true
        else if (state.em == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after)))
          setEm = false
      }
      if (len > 1) { // Strong
        if (!state.strong && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before)))
          setStrong = true
        else if (state.strong == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after)))
          setStrong = false
      }
      if (setStrong != null || setEm != null) {
        if (modeCfg.highlightFormatting) state.formatting = setEm == null ? "strong" : setStrong == null ? "em" : "strong em"
        if (setEm === true) state.em = ch
        if (setStrong === true) state.strong = ch
        var t = getType(state)
        if (setEm === false) state.em = false
        if (setStrong === false) state.strong = false
        return t
      }
    } else if (ch === ' ') {
      if (stream.eat('*') || stream.eat('_')) { // Probably surrounded by spaces
        if (stream.peek() === ' ') { // Surrounded by spaces, ignore
          return getType(state);
        } else { // Not surrounded by spaces, back up pointer
          stream.backUp(1);
        }
      }
    }

    if (modeCfg.strikethrough) {
      if (ch === '~' && stream.eatWhile(ch)) {
        if (state.strikethrough) {// Remove strikethrough
          if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
          var t = getType(state);
          state.strikethrough = false;
          return t;
        } else if (stream.match(/^[^\s]/, false)) {// Add strikethrough
          state.strikethrough = true;
          if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
          return getType(state);
        }
      } else if (ch === ' ') {
        if (stream.match(/^~~/, true)) { // Probably surrounded by space
          if (stream.peek() === ' ') { // Surrounded by spaces, ignore
            return getType(state);
          } else { // Not surrounded by spaces, back up pointer
            stream.backUp(2);
          }
        }
      }
    }

    if (modeCfg.emoji && ch === ":" && stream.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)) {
      state.emoji = true;
      if (modeCfg.highlightFormatting) state.formatting = "emoji";
      var retType = getType(state);
      state.emoji = false;
      return retType;
    }

    if (ch === ' ') {
      if (stream.match(/^ +$/, false)) {
        state.trailingSpace++;
      } else if (state.trailingSpace) {
        state.trailingSpaceNewLine = true;
      }
    }

    return getType(state);
  }

  function linkInline(stream, state) {
    var ch = stream.next();

    if (ch === ">") {
      state.f = state.inline = inlineNormal;
      if (modeCfg.highlightFormatting) state.formatting = "link";
      var type = getType(state);
      if (type){
        type += " ";
      } else {
        type = "";
      }
      return type + tokenTypes.linkInline;
    }

    stream.match(/^[^>]+/, true);

    return tokenTypes.linkInline;
  }

  function linkHref(stream, state) {
    // Check if space, and return NULL if so (to avoid marking the space)
    if(stream.eatSpace()){
      return null;
    }
    var ch = stream.next();
    if (ch === '(' || ch === '[') {
      state.f = state.inline = getLinkHrefInside(ch === "(" ? ")" : "]");
      if (modeCfg.highlightFormatting) state.formatting = "link-string";
      state.linkHref = true;
      return getType(state);
    }
    return 'error';
  }

  var linkRE = {
    ")": /^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,
    "]": /^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/
  }

  function getLinkHrefInside(endChar) {
    return function(stream, state) {
      var ch = stream.next();

      if (ch === endChar) {
        state.f = state.inline = inlineNormal;
        if (modeCfg.highlightFormatting) state.formatting = "link-string";
        var returnState = getType(state);
        state.linkHref = false;
        return returnState;
      }

      stream.match(linkRE[endChar])
      state.linkHref = true;
      return getType(state);
    };
  }

  function footnoteLink(stream, state) {
    if (stream.match(/^([^\]\\]|\\.)*\]:/, false)) {
      state.f = footnoteLinkInside;
      stream.next(); // Consume [
      if (modeCfg.highlightFormatting) state.formatting = "link";
      state.linkText = true;
      return getType(state);
    }
    return switchInline(stream, state, inlineNormal);
  }

  function footnoteLinkInside(stream, state) {
    if (stream.match(/^\]:/, true)) {
      state.f = state.inline = footnoteUrl;
      if (modeCfg.highlightFormatting) state.formatting = "link";
      var returnType = getType(state);
      state.linkText = false;
      return returnType;
    }

    stream.match(/^([^\]\\]|\\.)+/, true);

    return tokenTypes.linkText;
  }

  function footnoteUrl(stream, state) {
    // Check if space, and return NULL if so (to avoid marking the space)
    if(stream.eatSpace()){
      return null;
    }
    // Match URL
    stream.match(/^[^\s]+/, true);
    // Check for link title
    if (stream.peek() === undefined) { // End of line, set flag to check next line
      state.linkTitle = true;
    } else { // More content on line, check if link title
      stream.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/, true);
    }
    state.f = state.inline = inlineNormal;
    return tokenTypes.linkHref + " url";
  }

  var mode = {
    startState: function() {
      return {
        f: blockNormal,

        prevLine: {stream: null},
        thisLine: {stream: null},

        block: blockNormal,
        htmlState: null,
        indentation: 0,

        inline: inlineNormal,
        text: handleText,

        formatting: false,
        linkText: false,
        linkHref: false,
        linkTitle: false,
        code: 0,
        em: false,
        strong: false,
        header: 0,
        setext: 0,
        hr: false,
        taskList: false,
        list: false,
        listStack: [],
        quote: 0,
        trailingSpace: 0,
        trailingSpaceNewLine: false,
        strikethrough: false,
        emoji: false,
        fencedEndRE: null
      };
    },

    copyState: function(s) {
      return {
        f: s.f,

        prevLine: s.prevLine,
        thisLine: s.thisLine,

        block: s.block,
        htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState),
        indentation: s.indentation,

        localMode: s.localMode,
        localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null,

        inline: s.inline,
        text: s.text,
        formatting: false,
        linkText: s.linkText,
        linkTitle: s.linkTitle,
        linkHref: s.linkHref,
        code: s.code,
        em: s.em,
        strong: s.strong,
        strikethrough: s.strikethrough,
        emoji: s.emoji,
        header: s.header,
        setext: s.setext,
        hr: s.hr,
        taskList: s.taskList,
        list: s.list,
        listStack: s.listStack.slice(0),
        quote: s.quote,
        indentedCode: s.indentedCode,
        trailingSpace: s.trailingSpace,
        trailingSpaceNewLine: s.trailingSpaceNewLine,
        md_inside: s.md_inside,
        fencedEndRE: s.fencedEndRE
      };
    },

    token: function(stream, state) {

      // Reset state.formatting
      state.formatting = false;

      if (stream != state.thisLine.stream) {
        state.header = 0;
        state.hr = false;

        if (stream.match(/^\s*$/, true)) {
          blankLine(state);
          return null;
        }

        state.prevLine = state.thisLine
        state.thisLine = {stream: stream}

        // Reset state.taskList
        state.taskList = false;

        // Reset state.trailingSpace
        state.trailingSpace = 0;
        state.trailingSpaceNewLine = false;

        if (!state.localState) {
          state.f = state.block;
          if (state.f != htmlBlock) {
            var indentation = stream.match(/^\s*/, true)[0].replace(/\t/g, expandedTab).length;
            state.indentation = indentation;
            state.indentationDiff = null;
            if (indentation > 0) return null;
          }
        }
      }
      return state.f(stream, state);
    },

    innerMode: function(state) {
      if (state.block == htmlBlock) return {state: state.htmlState, mode: htmlMode};
      if (state.localState) return {state: state.localState, mode: state.localMode};
      return {state: state, mode: mode};
    },

    indent: function(state, textAfter, line) {
      if (state.block == htmlBlock && htmlMode.indent) return htmlMode.indent(state.htmlState, textAfter, line)
      if (state.localState && state.localMode.indent) return state.localMode.indent(state.localState, textAfter, line)
      return CodeMirror.Pass
    },

    blankLine: blankLine,

    getType: getType,

    blockCommentStart: "<!--",
    blockCommentEnd: "-->",
    closeBrackets: "()[]{}''\"\"``",
    fold: "markdown"
  };
  return mode;
}, "xml");

CodeMirror.defineMIME("text/markdown", "markdown");

CodeMirror.defineMIME("text/x-markdown", "markdown");

});


/***/ }),

/***/ "9619":
/***/ (function(module, exports, __webpack_require__) {

var throttle = __webpack_require__("597f");
var debounce = __webpack_require__("0e15");

module.exports = {
	throttle: throttle,
	debounce: debounce
};


/***/ }),

/***/ "96cf":
/***/ (function(module, exports, __webpack_require__) {

/**
 * Copyright (c) 2014-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

var runtime = (function (exports) {
  "use strict";

  var Op = Object.prototype;
  var hasOwn = Op.hasOwnProperty;
  var undefined; // More compressible than void 0.
  var $Symbol = typeof Symbol === "function" ? Symbol : {};
  var iteratorSymbol = $Symbol.iterator || "@@iterator";
  var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";

  function wrap(innerFn, outerFn, self, tryLocsList) {
    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
    var generator = Object.create(protoGenerator.prototype);
    var context = new Context(tryLocsList || []);

    // The ._invoke method unifies the implementations of the .next,
    // .throw, and .return methods.
    generator._invoke = makeInvokeMethod(innerFn, self, context);

    return generator;
  }
  exports.wrap = wrap;

  // Try/catch helper to minimize deoptimizations. Returns a completion
  // record like context.tryEntries[i].completion. This interface could
  // have been (and was previously) designed to take a closure to be
  // invoked without arguments, but in all the cases we care about we
  // already have an existing method we want to call, so there's no need
  // to create a new function object. We can even get away with assuming
  // the method takes exactly one argument, since that happens to be true
  // in every case, so we don't have to touch the arguments object. The
  // only additional allocation required is the completion record, which
  // has a stable shape and so hopefully should be cheap to allocate.
  function tryCatch(fn, obj, arg) {
    try {
      return { type: "normal", arg: fn.call(obj, arg) };
    } catch (err) {
      return { type: "throw", arg: err };
    }
  }

  var GenStateSuspendedStart = "suspendedStart";
  var GenStateSuspendedYield = "suspendedYield";
  var GenStateExecuting = "executing";
  var GenStateCompleted = "completed";

  // Returning this object from the innerFn has the same effect as
  // breaking out of the dispatch switch statement.
  var ContinueSentinel = {};

  // Dummy constructor functions that we use as the .constructor and
  // .constructor.prototype properties for functions that return Generator
  // objects. For full spec compliance, you may wish to configure your
  // minifier not to mangle the names of these two functions.
  function Generator() {}
  function GeneratorFunction() {}
  function GeneratorFunctionPrototype() {}

  // This is a polyfill for %IteratorPrototype% for environments that
  // don't natively support it.
  var IteratorPrototype = {};
  IteratorPrototype[iteratorSymbol] = function () {
    return this;
  };

  var getProto = Object.getPrototypeOf;
  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  if (NativeIteratorPrototype &&
      NativeIteratorPrototype !== Op &&
      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
    // This environment has a native %IteratorPrototype%; use it instead
    // of the polyfill.
    IteratorPrototype = NativeIteratorPrototype;
  }

  var Gp = GeneratorFunctionPrototype.prototype =
    Generator.prototype = Object.create(IteratorPrototype);
  GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  GeneratorFunctionPrototype.constructor = GeneratorFunction;
  GeneratorFunctionPrototype[toStringTagSymbol] =
    GeneratorFunction.displayName = "GeneratorFunction";

  // Helper for defining the .next, .throw, and .return methods of the
  // Iterator interface in terms of a single ._invoke method.
  function defineIteratorMethods(prototype) {
    ["next", "throw", "return"].forEach(function(method) {
      prototype[method] = function(arg) {
        return this._invoke(method, arg);
      };
    });
  }

  exports.isGeneratorFunction = function(genFun) {
    var ctor = typeof genFun === "function" && genFun.constructor;
    return ctor
      ? ctor === GeneratorFunction ||
        // For the native GeneratorFunction constructor, the best we can
        // do is to check its .name property.
        (ctor.displayName || ctor.name) === "GeneratorFunction"
      : false;
  };

  exports.mark = function(genFun) {
    if (Object.setPrototypeOf) {
      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
    } else {
      genFun.__proto__ = GeneratorFunctionPrototype;
      if (!(toStringTagSymbol in genFun)) {
        genFun[toStringTagSymbol] = "GeneratorFunction";
      }
    }
    genFun.prototype = Object.create(Gp);
    return genFun;
  };

  // Within the body of any async function, `await x` is transformed to
  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  // `hasOwn.call(value, "__await")` to determine if the yielded value is
  // meant to be awaited.
  exports.awrap = function(arg) {
    return { __await: arg };
  };

  function AsyncIterator(generator, PromiseImpl) {
    function invoke(method, arg, resolve, reject) {
      var record = tryCatch(generator[method], generator, arg);
      if (record.type === "throw") {
        reject(record.arg);
      } else {
        var result = record.arg;
        var value = result.value;
        if (value &&
            typeof value === "object" &&
            hasOwn.call(value, "__await")) {
          return PromiseImpl.resolve(value.__await).then(function(value) {
            invoke("next", value, resolve, reject);
          }, function(err) {
            invoke("throw", err, resolve, reject);
          });
        }

        return PromiseImpl.resolve(value).then(function(unwrapped) {
          // When a yielded Promise is resolved, its final value becomes
          // the .value of the Promise<{value,done}> result for the
          // current iteration.
          result.value = unwrapped;
          resolve(result);
        }, function(error) {
          // If a rejected Promise was yielded, throw the rejection back
          // into the async generator function so it can be handled there.
          return invoke("throw", error, resolve, reject);
        });
      }
    }

    var previousPromise;

    function enqueue(method, arg) {
      function callInvokeWithMethodAndArg() {
        return new PromiseImpl(function(resolve, reject) {
          invoke(method, arg, resolve, reject);
        });
      }

      return previousPromise =
        // If enqueue has been called before, then we want to wait until
        // all previous Promises have been resolved before calling invoke,
        // so that results are always delivered in the correct order. If
        // enqueue has not been called before, then it is important to
        // call invoke immediately, without waiting on a callback to fire,
        // so that the async generator function has the opportunity to do
        // any necessary setup in a predictable way. This predictability
        // is why the Promise constructor synchronously invokes its
        // executor callback, and why async functions synchronously
        // execute code before the first await. Since we implement simple
        // async functions in terms of async generators, it is especially
        // important to get this right, even though it requires care.
        previousPromise ? previousPromise.then(
          callInvokeWithMethodAndArg,
          // Avoid propagating failures to Promises returned by later
          // invocations of the iterator.
          callInvokeWithMethodAndArg
        ) : callInvokeWithMethodAndArg();
    }

    // Define the unified helper method that is used to implement .next,
    // .throw, and .return (see defineIteratorMethods).
    this._invoke = enqueue;
  }

  defineIteratorMethods(AsyncIterator.prototype);
  AsyncIterator.prototype[asyncIteratorSymbol] = function () {
    return this;
  };
  exports.AsyncIterator = AsyncIterator;

  // Note that simple async functions are implemented on top of
  // AsyncIterator objects; they just return a Promise for the value of
  // the final result produced by the iterator.
  exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
    if (PromiseImpl === void 0) PromiseImpl = Promise;

    var iter = new AsyncIterator(
      wrap(innerFn, outerFn, self, tryLocsList),
      PromiseImpl
    );

    return exports.isGeneratorFunction(outerFn)
      ? iter // If outerFn is a generator, return the full iterator.
      : iter.next().then(function(result) {
          return result.done ? result.value : iter.next();
        });
  };

  function makeInvokeMethod(innerFn, self, context) {
    var state = GenStateSuspendedStart;

    return function invoke(method, arg) {
      if (state === GenStateExecuting) {
        throw new Error("Generator is already running");
      }

      if (state === GenStateCompleted) {
        if (method === "throw") {
          throw arg;
        }

        // Be forgiving, per 25.3.3.3.3 of the spec:
        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
        return doneResult();
      }

      context.method = method;
      context.arg = arg;

      while (true) {
        var delegate = context.delegate;
        if (delegate) {
          var delegateResult = maybeInvokeDelegate(delegate, context);
          if (delegateResult) {
            if (delegateResult === ContinueSentinel) continue;
            return delegateResult;
          }
        }

        if (context.method === "next") {
          // Setting context._sent for legacy support of Babel's
          // function.sent implementation.
          context.sent = context._sent = context.arg;

        } else if (context.method === "throw") {
          if (state === GenStateSuspendedStart) {
            state = GenStateCompleted;
            throw context.arg;
          }

          context.dispatchException(context.arg);

        } else if (context.method === "return") {
          context.abrupt("return", context.arg);
        }

        state = GenStateExecuting;

        var record = tryCatch(innerFn, self, context);
        if (record.type === "normal") {
          // If an exception is thrown from innerFn, we leave state ===
          // GenStateExecuting and loop back for another invocation.
          state = context.done
            ? GenStateCompleted
            : GenStateSuspendedYield;

          if (record.arg === ContinueSentinel) {
            continue;
          }

          return {
            value: record.arg,
            done: context.done
          };

        } else if (record.type === "throw") {
          state = GenStateCompleted;
          // Dispatch the exception by looping back around to the
          // context.dispatchException(context.arg) call above.
          context.method = "throw";
          context.arg = record.arg;
        }
      }
    };
  }

  // Call delegate.iterator[context.method](context.arg) and handle the
  // result, either by returning a { value, done } result from the
  // delegate iterator, or by modifying context.method and context.arg,
  // setting context.delegate to null, and returning the ContinueSentinel.
  function maybeInvokeDelegate(delegate, context) {
    var method = delegate.iterator[context.method];
    if (method === undefined) {
      // A .throw or .return when the delegate iterator has no .throw
      // method always terminates the yield* loop.
      context.delegate = null;

      if (context.method === "throw") {
        // Note: ["return"] must be used for ES3 parsing compatibility.
        if (delegate.iterator["return"]) {
          // If the delegate iterator has a return method, give it a
          // chance to clean up.
          context.method = "return";
          context.arg = undefined;
          maybeInvokeDelegate(delegate, context);

          if (context.method === "throw") {
            // If maybeInvokeDelegate(context) changed context.method from
            // "return" to "throw", let that override the TypeError below.
            return ContinueSentinel;
          }
        }

        context.method = "throw";
        context.arg = new TypeError(
          "The iterator does not provide a 'throw' method");
      }

      return ContinueSentinel;
    }

    var record = tryCatch(method, delegate.iterator, context.arg);

    if (record.type === "throw") {
      context.method = "throw";
      context.arg = record.arg;
      context.delegate = null;
      return ContinueSentinel;
    }

    var info = record.arg;

    if (! info) {
      context.method = "throw";
      context.arg = new TypeError("iterator result is not an object");
      context.delegate = null;
      return ContinueSentinel;
    }

    if (info.done) {
      // Assign the result of the finished delegate to the temporary
      // variable specified by delegate.resultName (see delegateYield).
      context[delegate.resultName] = info.value;

      // Resume execution at the desired location (see delegateYield).
      context.next = delegate.nextLoc;

      // If context.method was "throw" but the delegate handled the
      // exception, let the outer generator proceed normally. If
      // context.method was "next", forget context.arg since it has been
      // "consumed" by the delegate iterator. If context.method was
      // "return", allow the original .return call to continue in the
      // outer generator.
      if (context.method !== "return") {
        context.method = "next";
        context.arg = undefined;
      }

    } else {
      // Re-yield the result returned by the delegate method.
      return info;
    }

    // The delegate iterator is finished, so forget it and continue with
    // the outer generator.
    context.delegate = null;
    return ContinueSentinel;
  }

  // Define Generator.prototype.{next,throw,return} in terms of the
  // unified ._invoke helper method.
  defineIteratorMethods(Gp);

  Gp[toStringTagSymbol] = "Generator";

  // A Generator should always return itself as the iterator object when the
  // @@iterator function is called on it. Some browsers' implementations of the
  // iterator prototype chain incorrectly implement this, causing the Generator
  // object to not be returned from this call. This ensures that doesn't happen.
  // See https://github.com/facebook/regenerator/issues/274 for more details.
  Gp[iteratorSymbol] = function() {
    return this;
  };

  Gp.toString = function() {
    return "[object Generator]";
  };

  function pushTryEntry(locs) {
    var entry = { tryLoc: locs[0] };

    if (1 in locs) {
      entry.catchLoc = locs[1];
    }

    if (2 in locs) {
      entry.finallyLoc = locs[2];
      entry.afterLoc = locs[3];
    }

    this.tryEntries.push(entry);
  }

  function resetTryEntry(entry) {
    var record = entry.completion || {};
    record.type = "normal";
    delete record.arg;
    entry.completion = record;
  }

  function Context(tryLocsList) {
    // The root entry object (effectively a try statement without a catch
    // or a finally block) gives us a place to store values thrown from
    // locations where there is no enclosing try statement.
    this.tryEntries = [{ tryLoc: "root" }];
    tryLocsList.forEach(pushTryEntry, this);
    this.reset(true);
  }

  exports.keys = function(object) {
    var keys = [];
    for (var key in object) {
      keys.push(key);
    }
    keys.reverse();

    // Rather than returning an object with a next method, we keep
    // things simple and return the next function itself.
    return function next() {
      while (keys.length) {
        var key = keys.pop();
        if (key in object) {
          next.value = key;
          next.done = false;
          return next;
        }
      }

      // To avoid creating an additional object, we just hang the .value
      // and .done properties off the next function object itself. This
      // also ensures that the minifier will not anonymize the function.
      next.done = true;
      return next;
    };
  };

  function values(iterable) {
    if (iterable) {
      var iteratorMethod = iterable[iteratorSymbol];
      if (iteratorMethod) {
        return iteratorMethod.call(iterable);
      }

      if (typeof iterable.next === "function") {
        return iterable;
      }

      if (!isNaN(iterable.length)) {
        var i = -1, next = function next() {
          while (++i < iterable.length) {
            if (hasOwn.call(iterable, i)) {
              next.value = iterable[i];
              next.done = false;
              return next;
            }
          }

          next.value = undefined;
          next.done = true;

          return next;
        };

        return next.next = next;
      }
    }

    // Return an iterator with no values.
    return { next: doneResult };
  }
  exports.values = values;

  function doneResult() {
    return { value: undefined, done: true };
  }

  Context.prototype = {
    constructor: Context,

    reset: function(skipTempReset) {
      this.prev = 0;
      this.next = 0;
      // Resetting context._sent for legacy support of Babel's
      // function.sent implementation.
      this.sent = this._sent = undefined;
      this.done = false;
      this.delegate = null;

      this.method = "next";
      this.arg = undefined;

      this.tryEntries.forEach(resetTryEntry);

      if (!skipTempReset) {
        for (var name in this) {
          // Not sure about the optimal order of these conditions:
          if (name.charAt(0) === "t" &&
              hasOwn.call(this, name) &&
              !isNaN(+name.slice(1))) {
            this[name] = undefined;
          }
        }
      }
    },

    stop: function() {
      this.done = true;

      var rootEntry = this.tryEntries[0];
      var rootRecord = rootEntry.completion;
      if (rootRecord.type === "throw") {
        throw rootRecord.arg;
      }

      return this.rval;
    },

    dispatchException: function(exception) {
      if (this.done) {
        throw exception;
      }

      var context = this;
      function handle(loc, caught) {
        record.type = "throw";
        record.arg = exception;
        context.next = loc;

        if (caught) {
          // If the dispatched exception was caught by a catch block,
          // then let that catch block handle the exception normally.
          context.method = "next";
          context.arg = undefined;
        }

        return !! caught;
      }

      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        var record = entry.completion;

        if (entry.tryLoc === "root") {
          // Exception thrown outside of any try block that could handle
          // it, so set the completion value of the entire function to
          // throw the exception.
          return handle("end");
        }

        if (entry.tryLoc <= this.prev) {
          var hasCatch = hasOwn.call(entry, "catchLoc");
          var hasFinally = hasOwn.call(entry, "finallyLoc");

          if (hasCatch && hasFinally) {
            if (this.prev < entry.catchLoc) {
              return handle(entry.catchLoc, true);
            } else if (this.prev < entry.finallyLoc) {
              return handle(entry.finallyLoc);
            }

          } else if (hasCatch) {
            if (this.prev < entry.catchLoc) {
              return handle(entry.catchLoc, true);
            }

          } else if (hasFinally) {
            if (this.prev < entry.finallyLoc) {
              return handle(entry.finallyLoc);
            }

          } else {
            throw new Error("try statement without catch or finally");
          }
        }
      }
    },

    abrupt: function(type, arg) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.tryLoc <= this.prev &&
            hasOwn.call(entry, "finallyLoc") &&
            this.prev < entry.finallyLoc) {
          var finallyEntry = entry;
          break;
        }
      }

      if (finallyEntry &&
          (type === "break" ||
           type === "continue") &&
          finallyEntry.tryLoc <= arg &&
          arg <= finallyEntry.finallyLoc) {
        // Ignore the finally entry if control is not jumping to a
        // location outside the try/catch block.
        finallyEntry = null;
      }

      var record = finallyEntry ? finallyEntry.completion : {};
      record.type = type;
      record.arg = arg;

      if (finallyEntry) {
        this.method = "next";
        this.next = finallyEntry.finallyLoc;
        return ContinueSentinel;
      }

      return this.complete(record);
    },

    complete: function(record, afterLoc) {
      if (record.type === "throw") {
        throw record.arg;
      }

      if (record.type === "break" ||
          record.type === "continue") {
        this.next = record.arg;
      } else if (record.type === "return") {
        this.rval = this.arg = record.arg;
        this.method = "return";
        this.next = "end";
      } else if (record.type === "normal" && afterLoc) {
        this.next = afterLoc;
      }

      return ContinueSentinel;
    },

    finish: function(finallyLoc) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.finallyLoc === finallyLoc) {
          this.complete(entry.completion, entry.afterLoc);
          resetTryEntry(entry);
          return ContinueSentinel;
        }
      }
    },

    "catch": function(tryLoc) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.tryLoc === tryLoc) {
          var record = entry.completion;
          if (record.type === "throw") {
            var thrown = record.arg;
            resetTryEntry(entry);
          }
          return thrown;
        }
      }

      // The context.catch method must only be called with a location
      // argument that corresponds to a known catch block.
      throw new Error("illegal catch attempt");
    },

    delegateYield: function(iterable, resultName, nextLoc) {
      this.delegate = {
        iterator: values(iterable),
        resultName: resultName,
        nextLoc: nextLoc
      };

      if (this.method === "next") {
        // Deliberately forget the last sent value so that we don't
        // accidentally pass it on to the delegate.
        this.arg = undefined;
      }

      return ContinueSentinel;
    }
  };

  // Regardless of whether this script is executing as a CommonJS module
  // or not, return the runtime object so that we can declare the variable
  // regeneratorRuntime in the outer scope, which allows this module to be
  // injected easily by `bin/regenerator --include-runtime script.js`.
  return exports;

}(
  // If this script is executing as a CommonJS module, use module.exports
  // as the regeneratorRuntime namespace. Otherwise create a new empty
  // object. Either way, the resulting object will be used to initialize
  // the regeneratorRuntime variable at the top of this file.
   true ? module.exports : undefined
));

try {
  regeneratorRuntime = runtime;
} catch (accidentalStrictMode) {
  // This module should not be running in strict mode, so the above
  // assignment should always work unless something is misconfigured. Just
  // in case runtime.js accidentally runs in strict mode, we can escape
  // strict mode using a global Function call. This could conceivably fail
  // if a Content Security Policy forbids using Function, but in that case
  // the proper solution is to fix the accidental strict mode problem. If
  // you've misconfigured your bundler to force strict mode and applied a
  // CSP to forbid Function, and you're not willing to fix either of those
  // problems, please detail your unique predicament in a GitHub issue.
  Function("r", "regeneratorRuntime = r")(runtime);
}


/***/ }),

/***/ "9742":
/***/ (function(module, exports) {

// IE 8- don't enum bug keys
module.exports = (
  'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
).split(',');


/***/ }),

/***/ "9861":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
__webpack_require__("e260");
var $ = __webpack_require__("23e7");
var getBuiltIn = __webpack_require__("d066");
var USE_NATIVE_URL = __webpack_require__("0d3b");
var redefine = __webpack_require__("6eeb");
var redefineAll = __webpack_require__("e2cc");
var setToStringTag = __webpack_require__("d44e");
var createIteratorConstructor = __webpack_require__("9ed3");
var InternalStateModule = __webpack_require__("69f3");
var anInstance = __webpack_require__("19aa");
var hasOwn = __webpack_require__("5135");
var bind = __webpack_require__("0366");
var classof = __webpack_require__("f5df");
var anObject = __webpack_require__("825a");
var isObject = __webpack_require__("861d");
var create = __webpack_require__("7c73");
var createPropertyDescriptor = __webpack_require__("5c6c");
var getIterator = __webpack_require__("9a1f");
var getIteratorMethod = __webpack_require__("35a1");
var wellKnownSymbol = __webpack_require__("b622");

var $fetch = getBuiltIn('fetch');
var Headers = getBuiltIn('Headers');
var ITERATOR = wellKnownSymbol('iterator');
var URL_SEARCH_PARAMS = 'URLSearchParams';
var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';
var setInternalState = InternalStateModule.set;
var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);
var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);

var plus = /\+/g;
var sequences = Array(4);

var percentSequence = function (bytes) {
  return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\da-f]{2}){' + bytes + '})', 'gi'));
};

var percentDecode = function (sequence) {
  try {
    return decodeURIComponent(sequence);
  } catch (error) {
    return sequence;
  }
};

var deserialize = function (it) {
  var result = it.replace(plus, ' ');
  var bytes = 4;
  try {
    return decodeURIComponent(result);
  } catch (error) {
    while (bytes) {
      result = result.replace(percentSequence(bytes--), percentDecode);
    }
    return result;
  }
};

var find = /[!'()~]|%20/g;

var replace = {
  '!': '%21',
  "'": '%27',
  '(': '%28',
  ')': '%29',
  '~': '%7E',
  '%20': '+'
};

var replacer = function (match) {
  return replace[match];
};

var serialize = function (it) {
  return encodeURIComponent(it).replace(find, replacer);
};

var parseSearchParams = function (result, query) {
  if (query) {
    var attributes = query.split('&');
    var index = 0;
    var attribute, entry;
    while (index < attributes.length) {
      attribute = attributes[index++];
      if (attribute.length) {
        entry = attribute.split('=');
        result.push({
          key: deserialize(entry.shift()),
          value: deserialize(entry.join('='))
        });
      }
    }
  }
};

var updateSearchParams = function (query) {
  this.entries.length = 0;
  parseSearchParams(this.entries, query);
};

var validateArgumentsLength = function (passed, required) {
  if (passed < required) throw TypeError('Not enough arguments');
};

var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {
  setInternalState(this, {
    type: URL_SEARCH_PARAMS_ITERATOR,
    iterator: getIterator(getInternalParamsState(params).entries),
    kind: kind
  });
}, 'Iterator', function next() {
  var state = getInternalIteratorState(this);
  var kind = state.kind;
  var step = state.iterator.next();
  var entry = step.value;
  if (!step.done) {
    step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];
  } return step;
});

// `URLSearchParams` constructor
// https://url.spec.whatwg.org/#interface-urlsearchparams
var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
  anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS);
  var init = arguments.length > 0 ? arguments[0] : undefined;
  var that = this;
  var entries = [];
  var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key;

  setInternalState(that, {
    type: URL_SEARCH_PARAMS,
    entries: entries,
    updateURL: function () { /* empty */ },
    updateSearchParams: updateSearchParams
  });

  if (init !== undefined) {
    if (isObject(init)) {
      iteratorMethod = getIteratorMethod(init);
      if (typeof iteratorMethod === 'function') {
        iterator = iteratorMethod.call(init);
        next = iterator.next;
        while (!(step = next.call(iterator)).done) {
          entryIterator = getIterator(anObject(step.value));
          entryNext = entryIterator.next;
          if (
            (first = entryNext.call(entryIterator)).done ||
            (second = entryNext.call(entryIterator)).done ||
            !entryNext.call(entryIterator).done
          ) throw TypeError('Expected sequence with length 2');
          entries.push({ key: first.value + '', value: second.value + '' });
        }
      } else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: init[key] + '' });
    } else {
      parseSearchParams(entries, typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : init + '');
    }
  }
};

var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;

redefineAll(URLSearchParamsPrototype, {
  // `URLSearchParams.prototype.appent` method
  // https://url.spec.whatwg.org/#dom-urlsearchparams-append
  append: function append(name, value) {
    validateArgumentsLength(arguments.length, 2);
    var state = getInternalParamsState(this);
    state.entries.push({ key: name + '', value: value + '' });
    state.updateURL();
  },
  // `URLSearchParams.prototype.delete` method
  // https://url.spec.whatwg.org/#dom-urlsearchparams-delete
  'delete': function (name) {
    validateArgumentsLength(arguments.length, 1);
    var state = getInternalParamsState(this);
    var entries = state.entries;
    var key = name + '';
    var index = 0;
    while (index < entries.length) {
      if (entries[index].key === key) entries.splice(index, 1);
      else index++;
    }
    state.updateURL();
  },
  // `URLSearchParams.prototype.get` method
  // https://url.spec.whatwg.org/#dom-urlsearchparams-get
  get: function get(name) {
    validateArgumentsLength(arguments.length, 1);
    var entries = getInternalParamsState(this).entries;
    var key = name + '';
    var index = 0;
    for (; index < entries.length; index++) {
      if (entries[index].key === key) return entries[index].value;
    }
    return null;
  },
  // `URLSearchParams.prototype.getAll` method
  // https://url.spec.whatwg.org/#dom-urlsearchparams-getall
  getAll: function getAll(name) {
    validateArgumentsLength(arguments.length, 1);
    var entries = getInternalParamsState(this).entries;
    var key = name + '';
    var result = [];
    var index = 0;
    for (; index < entries.length; index++) {
      if (entries[index].key === key) result.push(entries[index].value);
    }
    return result;
  },
  // `URLSearchParams.prototype.has` method
  // https://url.spec.whatwg.org/#dom-urlsearchparams-has
  has: function has(name) {
    validateArgumentsLength(arguments.length, 1);
    var entries = getInternalParamsState(this).entries;
    var key = name + '';
    var index = 0;
    while (index < entries.length) {
      if (entries[index++].key === key) return true;
    }
    return false;
  },
  // `URLSearchParams.prototype.set` method
  // https://url.spec.whatwg.org/#dom-urlsearchparams-set
  set: function set(name, value) {
    validateArgumentsLength(arguments.length, 1);
    var state = getInternalParamsState(this);
    var entries = state.entries;
    var found = false;
    var key = name + '';
    var val = value + '';
    var index = 0;
    var entry;
    for (; index < entries.length; index++) {
      entry = entries[index];
      if (entry.key === key) {
        if (found) entries.splice(index--, 1);
        else {
          found = true;
          entry.value = val;
        }
      }
    }
    if (!found) entries.push({ key: key, value: val });
    state.updateURL();
  },
  // `URLSearchParams.prototype.sort` method
  // https://url.spec.whatwg.org/#dom-urlsearchparams-sort
  sort: function sort() {
    var state = getInternalParamsState(this);
    var entries = state.entries;
    // Array#sort is not stable in some engines
    var slice = entries.slice();
    var entry, entriesIndex, sliceIndex;
    entries.length = 0;
    for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) {
      entry = slice[sliceIndex];
      for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) {
        if (entries[entriesIndex].key > entry.key) {
          entries.splice(entriesIndex, 0, entry);
          break;
        }
      }
      if (entriesIndex === sliceIndex) entries.push(entry);
    }
    state.updateURL();
  },
  // `URLSearchParams.prototype.forEach` method
  forEach: function forEach(callback /* , thisArg */) {
    var entries = getInternalParamsState(this).entries;
    var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3);
    var index = 0;
    var entry;
    while (index < entries.length) {
      entry = entries[index++];
      boundFunction(entry.value, entry.key, this);
    }
  },
  // `URLSearchParams.prototype.keys` method
  keys: function keys() {
    return new URLSearchParamsIterator(this, 'keys');
  },
  // `URLSearchParams.prototype.values` method
  values: function values() {
    return new URLSearchParamsIterator(this, 'values');
  },
  // `URLSearchParams.prototype.entries` method
  entries: function entries() {
    return new URLSearchParamsIterator(this, 'entries');
  }
}, { enumerable: true });

// `URLSearchParams.prototype[@@iterator]` method
redefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries);

// `URLSearchParams.prototype.toString` method
// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior
redefine(URLSearchParamsPrototype, 'toString', function toString() {
  var entries = getInternalParamsState(this).entries;
  var result = [];
  var index = 0;
  var entry;
  while (index < entries.length) {
    entry = entries[index++];
    result.push(serialize(entry.key) + '=' + serialize(entry.value));
  } return result.join('&');
}, { enumerable: true });

setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);

$({ global: true, forced: !USE_NATIVE_URL }, {
  URLSearchParams: URLSearchParamsConstructor
});

// Wrap `fetch` for correct work with polyfilled `URLSearchParams`
// https://github.com/zloirock/core-js/issues/674
if (!USE_NATIVE_URL && typeof $fetch == 'function' && typeof Headers == 'function') {
  $({ global: true, enumerable: true, forced: true }, {
    fetch: function fetch(input /* , init */) {
      var args = [input];
      var init, body, headers;
      if (arguments.length > 1) {
        init = arguments[1];
        if (isObject(init)) {
          body = init.body;
          if (classof(body) === URL_SEARCH_PARAMS) {
            headers = init.headers ? new Headers(init.headers) : new Headers();
            if (!headers.has('content-type')) {
              headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
            }
            init = create(init, {
              body: createPropertyDescriptor(0, String(body)),
              headers: createPropertyDescriptor(0, headers)
            });
          }
        }
        args.push(init);
      } return $fetch.apply(this, args);
    }
  });
}

module.exports = {
  URLSearchParams: URLSearchParamsConstructor,
  getState: getInternalParamsState
};


/***/ }),

/***/ "9876":
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.14 / 15.2.3.14 Object.keys(O)
var $keys = __webpack_require__("03d6");
var enumBugKeys = __webpack_require__("9742");

module.exports = Object.keys || function keys(O) {
  return $keys(O, enumBugKeys);
};


/***/ }),

/***/ "9911":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var createHTML = __webpack_require__("857a");
var forcedStringHTMLMethod = __webpack_require__("af03");

// `String.prototype.link` method
// https://tc39.github.io/ecma262/#sec-string.prototype.link
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('link') }, {
  link: function link(url) {
    return createHTML(this, 'a', 'href', url);
  }
});


/***/ }),

/***/ "991c":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"), __webpack_require__("ffda"));
  else {}
})(function(CodeMirror) {
  "use strict";

  var tables;
  var defaultTable;
  var keywords;
  var identifierQuote;
  var CONS = {
    QUERY_DIV: ";",
    ALIAS_KEYWORD: "AS"
  };
  var Pos = CodeMirror.Pos, cmpPos = CodeMirror.cmpPos;

  function isArray(val) { return Object.prototype.toString.call(val) == "[object Array]" }

  function getKeywords(editor) {
    var mode = editor.doc.modeOption;
    if (mode === "sql") mode = "text/x-sql";
    return CodeMirror.resolveMode(mode).keywords;
  }

  function getIdentifierQuote(editor) {
    var mode = editor.doc.modeOption;
    if (mode === "sql") mode = "text/x-sql";
    return CodeMirror.resolveMode(mode).identifierQuote || "`";
  }

  function getText(item) {
    return typeof item == "string" ? item : item.text;
  }

  function wrapTable(name, value) {
    if (isArray(value)) value = {columns: value}
    if (!value.text) value.text = name
    return value
  }

  function parseTables(input) {
    var result = {}
    if (isArray(input)) {
      for (var i = input.length - 1; i >= 0; i--) {
        var item = input[i]
        result[getText(item).toUpperCase()] = wrapTable(getText(item), item)
      }
    } else if (input) {
      for (var name in input)
        result[name.toUpperCase()] = wrapTable(name, input[name])
    }
    return result
  }

  function getTable(name) {
    return tables[name.toUpperCase()]
  }

  function shallowClone(object) {
    var result = {};
    for (var key in object) if (object.hasOwnProperty(key))
      result[key] = object[key];
    return result;
  }

  function match(string, word) {
    var len = string.length;
    var sub = getText(word).substr(0, len);
    return string.toUpperCase() === sub.toUpperCase();
  }

  function addMatches(result, search, wordlist, formatter) {
    if (isArray(wordlist)) {
      for (var i = 0; i < wordlist.length; i++)
        if (match(search, wordlist[i])) result.push(formatter(wordlist[i]))
    } else {
      for (var word in wordlist) if (wordlist.hasOwnProperty(word)) {
        var val = wordlist[word]
        if (!val || val === true)
          val = word
        else
          val = val.displayText ? {text: val.text, displayText: val.displayText} : val.text
        if (match(search, val)) result.push(formatter(val))
      }
    }
  }

  function cleanName(name) {
    // Get rid name from identifierQuote and preceding dot(.)
    if (name.charAt(0) == ".") {
      name = name.substr(1);
    }
    // replace doublicated identifierQuotes with single identifierQuotes
    // and remove single identifierQuotes
    var nameParts = name.split(identifierQuote+identifierQuote);
    for (var i = 0; i < nameParts.length; i++)
      nameParts[i] = nameParts[i].replace(new RegExp(identifierQuote,"g"), "");
    return nameParts.join(identifierQuote);
  }

  function insertIdentifierQuotes(name) {
    var nameParts = getText(name).split(".");
    for (var i = 0; i < nameParts.length; i++)
      nameParts[i] = identifierQuote +
        // doublicate identifierQuotes
        nameParts[i].replace(new RegExp(identifierQuote,"g"), identifierQuote+identifierQuote) +
        identifierQuote;
    var escaped = nameParts.join(".");
    if (typeof name == "string") return escaped;
    name = shallowClone(name);
    name.text = escaped;
    return name;
  }

  function nameCompletion(cur, token, result, editor) {
    // Try to complete table, column names and return start position of completion
    var useIdentifierQuotes = false;
    var nameParts = [];
    var start = token.start;
    var cont = true;
    while (cont) {
      cont = (token.string.charAt(0) == ".");
      useIdentifierQuotes = useIdentifierQuotes || (token.string.charAt(0) == identifierQuote);

      start = token.start;
      nameParts.unshift(cleanName(token.string));

      token = editor.getTokenAt(Pos(cur.line, token.start));
      if (token.string == ".") {
        cont = true;
        token = editor.getTokenAt(Pos(cur.line, token.start));
      }
    }

    // Try to complete table names
    var string = nameParts.join(".");
    addMatches(result, string, tables, function(w) {
      return useIdentifierQuotes ? insertIdentifierQuotes(w) : w;
    });

    // Try to complete columns from defaultTable
    addMatches(result, string, defaultTable, function(w) {
      return useIdentifierQuotes ? insertIdentifierQuotes(w) : w;
    });

    // Try to complete columns
    string = nameParts.pop();
    var table = nameParts.join(".");

    var alias = false;
    var aliasTable = table;
    // Check if table is available. If not, find table by Alias
    if (!getTable(table)) {
      var oldTable = table;
      table = findTableByAlias(table, editor);
      if (table !== oldTable) alias = true;
    }

    var columns = getTable(table);
    if (columns && columns.columns)
      columns = columns.columns;

    if (columns) {
      addMatches(result, string, columns, function(w) {
        var tableInsert = table;
        if (alias == true) tableInsert = aliasTable;
        if (typeof w == "string") {
          w = tableInsert + "." + w;
        } else {
          w = shallowClone(w);
          w.text = tableInsert + "." + w.text;
        }
        return useIdentifierQuotes ? insertIdentifierQuotes(w) : w;
      });
    }

    return start;
  }

  function eachWord(lineText, f) {
    var words = lineText.split(/\s+/)
    for (var i = 0; i < words.length; i++)
      if (words[i]) f(words[i].replace(/[`,;]/g, ''))
  }

  function findTableByAlias(alias, editor) {
    var doc = editor.doc;
    var fullQuery = doc.getValue();
    var aliasUpperCase = alias.toUpperCase();
    var previousWord = "";
    var table = "";
    var separator = [];
    var validRange = {
      start: Pos(0, 0),
      end: Pos(editor.lastLine(), editor.getLineHandle(editor.lastLine()).length)
    };

    //add separator
    var indexOfSeparator = fullQuery.indexOf(CONS.QUERY_DIV);
    while(indexOfSeparator != -1) {
      separator.push(doc.posFromIndex(indexOfSeparator));
      indexOfSeparator = fullQuery.indexOf(CONS.QUERY_DIV, indexOfSeparator+1);
    }
    separator.unshift(Pos(0, 0));
    separator.push(Pos(editor.lastLine(), editor.getLineHandle(editor.lastLine()).text.length));

    //find valid range
    var prevItem = null;
    var current = editor.getCursor()
    for (var i = 0; i < separator.length; i++) {
      if ((prevItem == null || cmpPos(current, prevItem) > 0) && cmpPos(current, separator[i]) <= 0) {
        validRange = {start: prevItem, end: separator[i]};
        break;
      }
      prevItem = separator[i];
    }

    if (validRange.start) {
      var query = doc.getRange(validRange.start, validRange.end, false);

      for (var i = 0; i < query.length; i++) {
        var lineText = query[i];
        eachWord(lineText, function(word) {
          var wordUpperCase = word.toUpperCase();
          if (wordUpperCase === aliasUpperCase && getTable(previousWord))
            table = previousWord;
          if (wordUpperCase !== CONS.ALIAS_KEYWORD)
            previousWord = word;
        });
        if (table) break;
      }
    }
    return table;
  }

  CodeMirror.registerHelper("hint", "sql", function(editor, options) {
    tables = parseTables(options && options.tables)
    var defaultTableName = options && options.defaultTable;
    var disableKeywords = options && options.disableKeywords;
    defaultTable = defaultTableName && getTable(defaultTableName);
    keywords = getKeywords(editor);
    identifierQuote = getIdentifierQuote(editor);

    if (defaultTableName && !defaultTable)
      defaultTable = findTableByAlias(defaultTableName, editor);

    defaultTable = defaultTable || [];

    if (defaultTable.columns)
      defaultTable = defaultTable.columns;

    var cur = editor.getCursor();
    var result = [];
    var token = editor.getTokenAt(cur), start, end, search;
    if (token.end > cur.ch) {
      token.end = cur.ch;
      token.string = token.string.slice(0, cur.ch - token.start);
    }

    if (token.string.match(/^[.`"'\w@][\w$#]*$/g)) {
      search = token.string;
      start = token.start;
      end = token.end;
    } else {
      start = end = cur.ch;
      search = "";
    }
    if (search.charAt(0) == "." || search.charAt(0) == identifierQuote) {
      start = nameCompletion(cur, token, result, editor);
    } else {
      var objectOrClass = function(w, className) {
        if (typeof w === "object") {
          w.className = className;
        } else {
          w = { text: w, className: className };
        }
        return w;
      };
    addMatches(result, search, defaultTable, function(w) {
        return objectOrClass(w, "CodeMirror-hint-table CodeMirror-hint-default-table");
    });
    addMatches(
        result,
        search,
        tables, function(w) {
          return objectOrClass(w, "CodeMirror-hint-table");
        }
    );
    if (!disableKeywords)
      addMatches(result, search, keywords, function(w) {
          return objectOrClass(w.toUpperCase(), "CodeMirror-hint-keyword");
      });
  }

    return {list: result, from: Pos(cur.line, start), to: Pos(cur.line, end)};
  });
});


/***/ }),

/***/ "9949":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_button_vue_vue_type_style_index_0_id_d4629d24_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b3ff");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_button_vue_vue_type_style_index_0_id_d4629d24_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_button_vue_vue_type_style_index_0_id_d4629d24_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_button_vue_vue_type_style_index_0_id_d4629d24_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "99af":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var fails = __webpack_require__("d039");
var isArray = __webpack_require__("e8b5");
var isObject = __webpack_require__("861d");
var toObject = __webpack_require__("7b0b");
var toLength = __webpack_require__("50c4");
var createProperty = __webpack_require__("8418");
var arraySpeciesCreate = __webpack_require__("65f0");
var arrayMethodHasSpeciesSupport = __webpack_require__("1dde");
var wellKnownSymbol = __webpack_require__("b622");
var V8_VERSION = __webpack_require__("2d00");

var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';

// We can't use this feature detection in V8 since it causes
// deoptimization and serious performance degradation
// https://github.com/zloirock/core-js/issues/679
var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
  var array = [];
  array[IS_CONCAT_SPREADABLE] = false;
  return array.concat()[0] !== array;
});

var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');

var isConcatSpreadable = function (O) {
  if (!isObject(O)) return false;
  var spreadable = O[IS_CONCAT_SPREADABLE];
  return spreadable !== undefined ? !!spreadable : isArray(O);
};

var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;

// `Array.prototype.concat` method
// https://tc39.github.io/ecma262/#sec-array.prototype.concat
// with adding support of @@isConcatSpreadable and @@species
$({ target: 'Array', proto: true, forced: FORCED }, {
  concat: function concat(arg) { // eslint-disable-line no-unused-vars
    var O = toObject(this);
    var A = arraySpeciesCreate(O, 0);
    var n = 0;
    var i, k, length, len, E;
    for (i = -1, length = arguments.length; i < length; i++) {
      E = i === -1 ? O : arguments[i];
      if (isConcatSpreadable(E)) {
        len = toLength(E.length);
        if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
        for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
      } else {
        if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
        createProperty(A, n++, E);
      }
    }
    A.length = n;
    return A;
  }
});


/***/ }),

/***/ "9a1f":
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__("825a");
var getIteratorMethod = __webpack_require__("35a1");

module.exports = function (it) {
  var iteratorMethod = getIteratorMethod(it);
  if (typeof iteratorMethod != 'function') {
    throw TypeError(String(it) + ' is not iterable');
  } return anObject(iteratorMethod.call(it));
};


/***/ }),

/***/ "9a8c":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__("ebb5");
var $copyWithin = __webpack_require__("145e");

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

// `%TypedArray%.prototype.copyWithin` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.copywithin
exportTypedArrayMethod('copyWithin', function copyWithin(target, start /* , end */) {
  return $copyWithin.call(aTypedArray(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
});


/***/ }),

/***/ "9b74":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"));
  else {}
})(function(CodeMirror) {
  "use strict";

  var HINT_ELEMENT_CLASS        = "CodeMirror-hint";
  var ACTIVE_HINT_ELEMENT_CLASS = "CodeMirror-hint-active";

  // This is the old interface, kept around for now to stay
  // backwards-compatible.
  CodeMirror.showHint = function(cm, getHints, options) {
    if (!getHints) return cm.showHint(options);
    if (options && options.async) getHints.async = true;
    var newOpts = {hint: getHints};
    if (options) for (var prop in options) newOpts[prop] = options[prop];
    return cm.showHint(newOpts);
  };

  CodeMirror.defineExtension("showHint", function(options) {
    options = parseOptions(this, this.getCursor("start"), options);
    var selections = this.listSelections()
    if (selections.length > 1) return;
    // By default, don't allow completion when something is selected.
    // A hint function can have a `supportsSelection` property to
    // indicate that it can handle selections.
    if (this.somethingSelected()) {
      if (!options.hint.supportsSelection) return;
      // Don't try with cross-line selections
      for (var i = 0; i < selections.length; i++)
        if (selections[i].head.line != selections[i].anchor.line) return;
    }

    if (this.state.completionActive) this.state.completionActive.close();
    var completion = this.state.completionActive = new Completion(this, options);
    if (!completion.options.hint) return;

    CodeMirror.signal(this, "startCompletion", this);
    completion.update(true);
  });

  CodeMirror.defineExtension("closeHint", function() {
    if (this.state.completionActive) this.state.completionActive.close()
  })

  function Completion(cm, options) {
    this.cm = cm;
    this.options = options;
    this.widget = null;
    this.debounce = 0;
    this.tick = 0;
    this.startPos = this.cm.getCursor("start");
    this.startLen = this.cm.getLine(this.startPos.line).length - this.cm.getSelection().length;

    var self = this;
    cm.on("cursorActivity", this.activityFunc = function() { self.cursorActivity(); });
  }

  var requestAnimationFrame = window.requestAnimationFrame || function(fn) {
    return setTimeout(fn, 1000/60);
  };
  var cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout;

  Completion.prototype = {
    close: function() {
      if (!this.active()) return;
      this.cm.state.completionActive = null;
      this.tick = null;
      this.cm.off("cursorActivity", this.activityFunc);

      if (this.widget && this.data) CodeMirror.signal(this.data, "close");
      if (this.widget) this.widget.close();
      CodeMirror.signal(this.cm, "endCompletion", this.cm);
    },

    active: function() {
      return this.cm.state.completionActive == this;
    },

    pick: function(data, i) {
      var completion = data.list[i], self = this;
      this.cm.operation(function() {
        if (completion.hint)
          completion.hint(self.cm, data, completion);
        else
          self.cm.replaceRange(getText(completion), completion.from || data.from,
                               completion.to || data.to, "complete");
        CodeMirror.signal(data, "pick", completion);
        self.cm.scrollIntoView();
      })
      this.close();
    },

    cursorActivity: function() {
      if (this.debounce) {
        cancelAnimationFrame(this.debounce);
        this.debounce = 0;
      }

      var identStart = this.startPos;
      if(this.data) {
        identStart = this.data.from;
      }

      var pos = this.cm.getCursor(), line = this.cm.getLine(pos.line);
      if (pos.line != this.startPos.line || line.length - pos.ch != this.startLen - this.startPos.ch ||
          pos.ch < identStart.ch || this.cm.somethingSelected() ||
          (!pos.ch || this.options.closeCharacters.test(line.charAt(pos.ch - 1)))) {
        this.close();
      } else {
        var self = this;
        this.debounce = requestAnimationFrame(function() {self.update();});
        if (this.widget) this.widget.disable();
      }
    },

    update: function(first) {
      if (this.tick == null) return
      var self = this, myTick = ++this.tick
      fetchHints(this.options.hint, this.cm, this.options, function(data) {
        if (self.tick == myTick) self.finishUpdate(data, first)
      })
    },

    finishUpdate: function(data, first) {
      if (this.data) CodeMirror.signal(this.data, "update");

      var picked = (this.widget && this.widget.picked) || (first && this.options.completeSingle);
      if (this.widget) this.widget.close();

      this.data = data;

      if (data && data.list.length) {
        if (picked && data.list.length == 1) {
          this.pick(data, 0);
        } else {
          this.widget = new Widget(this, data);
          CodeMirror.signal(data, "shown");
        }
      }
    }
  };

  function parseOptions(cm, pos, options) {
    var editor = cm.options.hintOptions;
    var out = {};
    for (var prop in defaultOptions) out[prop] = defaultOptions[prop];
    if (editor) for (var prop in editor)
      if (editor[prop] !== undefined) out[prop] = editor[prop];
    if (options) for (var prop in options)
      if (options[prop] !== undefined) out[prop] = options[prop];
    if (out.hint.resolve) out.hint = out.hint.resolve(cm, pos)
    return out;
  }

  function getText(completion) {
    if (typeof completion == "string") return completion;
    else return completion.text;
  }

  function buildKeyMap(completion, handle) {
    var baseMap = {
      Up: function() {handle.moveFocus(-1);},
      Down: function() {handle.moveFocus(1);},
      PageUp: function() {handle.moveFocus(-handle.menuSize() + 1, true);},
      PageDown: function() {handle.moveFocus(handle.menuSize() - 1, true);},
      Home: function() {handle.setFocus(0);},
      End: function() {handle.setFocus(handle.length - 1);},
      Enter: handle.pick,
      Tab: handle.pick,
      Esc: handle.close
    };

    var mac = /Mac/.test(navigator.platform);

    if (mac) {
      baseMap["Ctrl-P"] = function() {handle.moveFocus(-1);};
      baseMap["Ctrl-N"] = function() {handle.moveFocus(1);};
    }

    var custom = completion.options.customKeys;
    var ourMap = custom ? {} : baseMap;
    function addBinding(key, val) {
      var bound;
      if (typeof val != "string")
        bound = function(cm) { return val(cm, handle); };
      // This mechanism is deprecated
      else if (baseMap.hasOwnProperty(val))
        bound = baseMap[val];
      else
        bound = val;
      ourMap[key] = bound;
    }
    if (custom)
      for (var key in custom) if (custom.hasOwnProperty(key))
        addBinding(key, custom[key]);
    var extra = completion.options.extraKeys;
    if (extra)
      for (var key in extra) if (extra.hasOwnProperty(key))
        addBinding(key, extra[key]);
    return ourMap;
  }

  function getHintElement(hintsElement, el) {
    while (el && el != hintsElement) {
      if (el.nodeName.toUpperCase() === "LI" && el.parentNode == hintsElement) return el;
      el = el.parentNode;
    }
  }

  function Widget(completion, data) {
    this.completion = completion;
    this.data = data;
    this.picked = false;
    var widget = this, cm = completion.cm;
    var ownerDocument = cm.getInputField().ownerDocument;
    var parentWindow = ownerDocument.defaultView || ownerDocument.parentWindow;

    var hints = this.hints = ownerDocument.createElement("ul");
    var theme = completion.cm.options.theme;
    hints.className = "CodeMirror-hints " + theme;
    this.selectedHint = data.selectedHint || 0;

    var completions = data.list;
    for (var i = 0; i < completions.length; ++i) {
      var elt = hints.appendChild(ownerDocument.createElement("li")), cur = completions[i];
      var className = HINT_ELEMENT_CLASS + (i != this.selectedHint ? "" : " " + ACTIVE_HINT_ELEMENT_CLASS);
      if (cur.className != null) className = cur.className + " " + className;
      elt.className = className;
      if (cur.render) cur.render(elt, data, cur);
      else elt.appendChild(ownerDocument.createTextNode(cur.displayText || getText(cur)));
      elt.hintId = i;
    }

    var container = completion.options.container || ownerDocument.body;
    var pos = cm.cursorCoords(completion.options.alignWithWord ? data.from : null);
    var left = pos.left, top = pos.bottom, below = true;
    var offsetLeft = 0, offsetTop = 0;
    if (container !== ownerDocument.body) {
      // We offset the cursor position because left and top are relative to the offsetParent's top left corner.
      var isContainerPositioned = ['absolute', 'relative', 'fixed'].indexOf(parentWindow.getComputedStyle(container).position) !== -1;
      var offsetParent = isContainerPositioned ? container : container.offsetParent;
      var offsetParentPosition = offsetParent.getBoundingClientRect();
      var bodyPosition = ownerDocument.body.getBoundingClientRect();
      offsetLeft = (offsetParentPosition.left - bodyPosition.left - offsetParent.scrollLeft);
      offsetTop = (offsetParentPosition.top - bodyPosition.top - offsetParent.scrollTop);
    }
    hints.style.left = (left - offsetLeft) + "px";
    hints.style.top = (top - offsetTop) + "px";

    // If we're at the edge of the screen, then we want the menu to appear on the left of the cursor.
    var winW = parentWindow.innerWidth || Math.max(ownerDocument.body.offsetWidth, ownerDocument.documentElement.offsetWidth);
    var winH = parentWindow.innerHeight || Math.max(ownerDocument.body.offsetHeight, ownerDocument.documentElement.offsetHeight);
    container.appendChild(hints);
    var box = hints.getBoundingClientRect(), overlapY = box.bottom - winH;
    var scrolls = hints.scrollHeight > hints.clientHeight + 1
    var startScroll = cm.getScrollInfo();

    if (overlapY > 0) {
      var height = box.bottom - box.top, curTop = pos.top - (pos.bottom - box.top);
      if (curTop - height > 0) { // Fits above cursor
        hints.style.top = (top = pos.top - height - offsetTop) + "px";
        below = false;
      } else if (height > winH) {
        hints.style.height = (winH - 5) + "px";
        hints.style.top = (top = pos.bottom - box.top - offsetTop) + "px";
        var cursor = cm.getCursor();
        if (data.from.ch != cursor.ch) {
          pos = cm.cursorCoords(cursor);
          hints.style.left = (left = pos.left - offsetLeft) + "px";
          box = hints.getBoundingClientRect();
        }
      }
    }
    var overlapX = box.right - winW;
    if (overlapX > 0) {
      if (box.right - box.left > winW) {
        hints.style.width = (winW - 5) + "px";
        overlapX -= (box.right - box.left) - winW;
      }
      hints.style.left = (left = pos.left - overlapX - offsetLeft) + "px";
    }
    if (scrolls) for (var node = hints.firstChild; node; node = node.nextSibling)
      node.style.paddingRight = cm.display.nativeBarWidth + "px"

    cm.addKeyMap(this.keyMap = buildKeyMap(completion, {
      moveFocus: function(n, avoidWrap) { widget.changeActive(widget.selectedHint + n, avoidWrap); },
      setFocus: function(n) { widget.changeActive(n); },
      menuSize: function() { return widget.screenAmount(); },
      length: completions.length,
      close: function() { completion.close(); },
      pick: function() { widget.pick(); },
      data: data
    }));

    if (completion.options.closeOnUnfocus) {
      var closingOnBlur;
      cm.on("blur", this.onBlur = function() { closingOnBlur = setTimeout(function() { completion.close(); }, 100); });
      cm.on("focus", this.onFocus = function() { clearTimeout(closingOnBlur); });
    }

    cm.on("scroll", this.onScroll = function() {
      var curScroll = cm.getScrollInfo(), editor = cm.getWrapperElement().getBoundingClientRect();
      var newTop = top + startScroll.top - curScroll.top;
      var point = newTop - (parentWindow.pageYOffset || (ownerDocument.documentElement || ownerDocument.body).scrollTop);
      if (!below) point += hints.offsetHeight;
      if (point <= editor.top || point >= editor.bottom) return completion.close();
      hints.style.top = newTop + "px";
      hints.style.left = (left + startScroll.left - curScroll.left) + "px";
    });

    CodeMirror.on(hints, "dblclick", function(e) {
      var t = getHintElement(hints, e.target || e.srcElement);
      if (t && t.hintId != null) {widget.changeActive(t.hintId); widget.pick();}
    });

    CodeMirror.on(hints, "click", function(e) {
      var t = getHintElement(hints, e.target || e.srcElement);
      if (t && t.hintId != null) {
        widget.changeActive(t.hintId);
        if (completion.options.completeOnSingleClick) widget.pick();
      }
    });

    CodeMirror.on(hints, "mousedown", function() {
      setTimeout(function(){cm.focus();}, 20);
    });
    this.scrollToActive()

    CodeMirror.signal(data, "select", completions[this.selectedHint], hints.childNodes[this.selectedHint]);
    return true;
  }

  Widget.prototype = {
    close: function() {
      if (this.completion.widget != this) return;
      this.completion.widget = null;
      this.hints.parentNode.removeChild(this.hints);
      this.completion.cm.removeKeyMap(this.keyMap);

      var cm = this.completion.cm;
      if (this.completion.options.closeOnUnfocus) {
        cm.off("blur", this.onBlur);
        cm.off("focus", this.onFocus);
      }
      cm.off("scroll", this.onScroll);
    },

    disable: function() {
      this.completion.cm.removeKeyMap(this.keyMap);
      var widget = this;
      this.keyMap = {Enter: function() { widget.picked = true; }};
      this.completion.cm.addKeyMap(this.keyMap);
    },

    pick: function() {
      this.completion.pick(this.data, this.selectedHint);
    },

    changeActive: function(i, avoidWrap) {
      if (i >= this.data.list.length)
        i = avoidWrap ? this.data.list.length - 1 : 0;
      else if (i < 0)
        i = avoidWrap ? 0  : this.data.list.length - 1;
      if (this.selectedHint == i) return;
      var node = this.hints.childNodes[this.selectedHint];
      if (node) node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, "");
      node = this.hints.childNodes[this.selectedHint = i];
      node.className += " " + ACTIVE_HINT_ELEMENT_CLASS;
      this.scrollToActive()
      CodeMirror.signal(this.data, "select", this.data.list[this.selectedHint], node);
    },

    scrollToActive: function() {
      var margin = this.completion.options.scrollMargin || 0;
      var node1 = this.hints.childNodes[Math.max(0, this.selectedHint - margin)];
      var node2 = this.hints.childNodes[Math.min(this.data.list.length - 1, this.selectedHint + margin)];
      var firstNode = this.hints.firstChild;
      if (node1.offsetTop < this.hints.scrollTop)
        this.hints.scrollTop = node1.offsetTop - firstNode.offsetTop;
      else if (node2.offsetTop + node2.offsetHeight > this.hints.scrollTop + this.hints.clientHeight)
        this.hints.scrollTop = node2.offsetTop + node2.offsetHeight - this.hints.clientHeight + firstNode.offsetTop;
    },

    screenAmount: function() {
      return Math.floor(this.hints.clientHeight / this.hints.firstChild.offsetHeight) || 1;
    }
  };

  function applicableHelpers(cm, helpers) {
    if (!cm.somethingSelected()) return helpers
    var result = []
    for (var i = 0; i < helpers.length; i++)
      if (helpers[i].supportsSelection) result.push(helpers[i])
    return result
  }

  function fetchHints(hint, cm, options, callback) {
    if (hint.async) {
      hint(cm, callback, options)
    } else {
      var result = hint(cm, options)
      if (result && result.then) result.then(callback)
      else callback(result)
    }
  }

  function resolveAutoHints(cm, pos) {
    var helpers = cm.getHelpers(pos, "hint"), words
    if (helpers.length) {
      var resolved = function(cm, callback, options) {
        var app = applicableHelpers(cm, helpers);
        function run(i) {
          if (i == app.length) return callback(null)
          fetchHints(app[i], cm, options, function(result) {
            if (result && result.list.length > 0) callback(result)
            else run(i + 1)
          })
        }
        run(0)
      }
      resolved.async = true
      resolved.supportsSelection = true
      return resolved
    } else if (words = cm.getHelper(cm.getCursor(), "hintWords")) {
      return function(cm) { return CodeMirror.hint.fromList(cm, {words: words}) }
    } else if (CodeMirror.hint.anyword) {
      return function(cm, options) { return CodeMirror.hint.anyword(cm, options) }
    } else {
      return function() {}
    }
  }

  CodeMirror.registerHelper("hint", "auto", {
    resolve: resolveAutoHints
  });

  CodeMirror.registerHelper("hint", "fromList", function(cm, options) {
    var cur = cm.getCursor(), token = cm.getTokenAt(cur)
    var term, from = CodeMirror.Pos(cur.line, token.start), to = cur
    if (token.start < cur.ch && /\w/.test(token.string.charAt(cur.ch - token.start - 1))) {
      term = token.string.substr(0, cur.ch - token.start)
    } else {
      term = ""
      from = cur
    }
    var found = [];
    for (var i = 0; i < options.words.length; i++) {
      var word = options.words[i];
      if (word.slice(0, term.length) == term)
        found.push(word);
    }

    if (found.length) return {list: found, from: from, to: to};
  });

  CodeMirror.commands.autocomplete = CodeMirror.showHint;

  var defaultOptions = {
    hint: CodeMirror.hint.auto,
    completeSingle: true,
    alignWithWord: true,
    closeCharacters: /[\s()\[\]{};:>,]/,
    closeOnUnfocus: true,
    completeOnSingleClick: true,
    container: null,
    customKeys: null,
    extraKeys: null
  };

  CodeMirror.defineOption("hintOptions", null);
});


/***/ }),

/***/ "9bc9":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "9bdd":
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__("825a");

// call something on iterator step with safe closing on error
module.exports = function (iterator, fn, value, ENTRIES) {
  try {
    return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
  // 7.4.6 IteratorClose(iterator, completion)
  } catch (error) {
    var returnMethod = iterator['return'];
    if (returnMethod !== undefined) anObject(returnMethod.call(iterator));
    throw error;
  }
};


/***/ }),

/***/ "9bf2":
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__("83ab");
var IE8_DOM_DEFINE = __webpack_require__("0cfb");
var anObject = __webpack_require__("825a");
var toPrimitive = __webpack_require__("c04e");

var nativeDefineProperty = Object.defineProperty;

// `Object.defineProperty` method
// https://tc39.github.io/ecma262/#sec-object.defineproperty
exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
  anObject(O);
  P = toPrimitive(P, true);
  anObject(Attributes);
  if (IE8_DOM_DEFINE) try {
    return nativeDefineProperty(O, P, Attributes);
  } catch (error) { /* empty */ }
  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  if ('value' in Attributes) O[P] = Attributes.value;
  return O;
};


/***/ }),

/***/ "9c0c":
/***/ (function(module, exports, __webpack_require__) {

// optional / simple context binding
var aFunction = __webpack_require__("1609");
module.exports = function (fn, that, length) {
  aFunction(fn);
  if (that === undefined) return fn;
  switch (length) {
    case 1: return function (a) {
      return fn.call(that, a);
    };
    case 2: return function (a, b) {
      return fn.call(that, a, b);
    };
    case 3: return function (a, b, c) {
      return fn.call(that, a, b, c);
    };
  }
  return function (/* ...args */) {
    return fn.apply(that, arguments);
  };
};


/***/ }),

/***/ "9c0e":
/***/ (function(module, exports) {

var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
  return hasOwnProperty.call(it, key);
};


/***/ }),

/***/ "9d11":
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__("fc5e");
var max = Math.max;
var min = Math.min;
module.exports = function (index, length) {
  index = toInteger(index);
  return index < 0 ? max(index + length, 0) : min(index, length);
};


/***/ }),

/***/ "9d7e":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("d28b");

__webpack_require__("e260");

__webpack_require__("d3b7");

__webpack_require__("ac1f");

__webpack_require__("3ca3");

__webpack_require__("5319");

__webpack_require__("ddb0");

var _typeof2 = __webpack_require__("7037");

exports.__esModule = true;

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

exports.default = function (Vue) {
  /**
   * template
   *
   * @param {String} string
   * @param {Array} ...args
   * @return {String}
   */
  function template(string) {
    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
      args[_key - 1] = arguments[_key];
    }

    if (args.length === 1 && _typeof(args[0]) === 'object') {
      args = args[0];
    }

    if (!args || !args.hasOwnProperty) {
      args = {};
    }

    return string.replace(RE_NARGS, function (match, prefix, i, index) {
      var result = void 0;

      if (string[index - 1] === '{' && string[index + match.length] === '}') {
        return i;
      } else {
        result = (0, _util.hasOwn)(args, i) ? args[i] : null;

        if (result === null || result === undefined) {
          return '';
        }

        return result;
      }
    });
  }

  return template;
};

var _util = __webpack_require__("8122");

var RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
/**
 *  String format template
 *  - Inspired:
 *    https://github.com/Matt-Esch/string-template/index.js
 */

/***/ }),

/***/ "9e6a":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("d233");

var has = Object.prototype.hasOwnProperty;

var defaults = {
    allowDots: false,
    allowPrototypes: false,
    arrayLimit: 20,
    decoder: utils.decode,
    delimiter: '&',
    depth: 5,
    parameterLimit: 1000,
    plainObjects: false,
    strictNullHandling: false
};

var parseValues = function parseQueryStringValues(str, options) {
    var obj = {};
    var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
    var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
    var parts = cleanStr.split(options.delimiter, limit);

    for (var i = 0; i < parts.length; ++i) {
        var part = parts[i];

        var bracketEqualsPos = part.indexOf(']=');
        var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;

        var key, val;
        if (pos === -1) {
            key = options.decoder(part, defaults.decoder);
            val = options.strictNullHandling ? null : '';
        } else {
            key = options.decoder(part.slice(0, pos), defaults.decoder);
            val = options.decoder(part.slice(pos + 1), defaults.decoder);
        }
        if (has.call(obj, key)) {
            obj[key] = [].concat(obj[key]).concat(val);
        } else {
            obj[key] = val;
        }
    }

    return obj;
};

var parseObject = function (chain, val, options) {
    var leaf = val;

    for (var i = chain.length - 1; i >= 0; --i) {
        var obj;
        var root = chain[i];

        if (root === '[]') {
            obj = [];
            obj = obj.concat(leaf);
        } else {
            obj = options.plainObjects ? Object.create(null) : {};
            var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
            var index = parseInt(cleanRoot, 10);
            if (
                !isNaN(index)
                && root !== cleanRoot
                && String(index) === cleanRoot
                && index >= 0
                && (options.parseArrays && index <= options.arrayLimit)
            ) {
                obj = [];
                obj[index] = leaf;
            } else {
                obj[cleanRoot] = leaf;
            }
        }

        leaf = obj;
    }

    return leaf;
};

var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
    if (!givenKey) {
        return;
    }

    // Transform dot notation to bracket notation
    var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;

    // The regex chunks

    var brackets = /(\[[^[\]]*])/;
    var child = /(\[[^[\]]*])/g;

    // Get the parent

    var segment = brackets.exec(key);
    var parent = segment ? key.slice(0, segment.index) : key;

    // Stash the parent if it exists

    var keys = [];
    if (parent) {
        // If we aren't using plain objects, optionally prefix keys
        // that would overwrite object prototype properties
        if (!options.plainObjects && has.call(Object.prototype, parent)) {
            if (!options.allowPrototypes) {
                return;
            }
        }

        keys.push(parent);
    }

    // Loop through children appending to the array until we hit depth

    var i = 0;
    while ((segment = child.exec(key)) !== null && i < options.depth) {
        i += 1;
        if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
            if (!options.allowPrototypes) {
                return;
            }
        }
        keys.push(segment[1]);
    }

    // If there's a remainder, just add whatever is left

    if (segment) {
        keys.push('[' + key.slice(segment.index) + ']');
    }

    return parseObject(keys, val, options);
};

module.exports = function (str, opts) {
    var options = opts ? utils.assign({}, opts) : {};

    if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') {
        throw new TypeError('Decoder has to be a function.');
    }

    options.ignoreQueryPrefix = options.ignoreQueryPrefix === true;
    options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;
    options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;
    options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;
    options.parseArrays = options.parseArrays !== false;
    options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder;
    options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots;
    options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects;
    options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes;
    options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit;
    options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;

    if (str === '' || str === null || typeof str === 'undefined') {
        return options.plainObjects ? Object.create(null) : {};
    }

    var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
    var obj = options.plainObjects ? Object.create(null) : {};

    // Iterate over the keys and setup the new object

    var keys = Object.keys(tempObj);
    for (var i = 0; i < keys.length; ++i) {
        var key = keys[i];
        var newObj = parseKeys(key, tempObj[key], options);
        obj = utils.merge(obj, newObj, options);
    }

    return utils.compact(obj);
};


/***/ }),

/***/ "9eb9":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

// Utility function that allows modes to be combined. The mode given
// as the base argument takes care of most of the normal mode
// functionality, but a second (typically simple) mode is used, which
// can override the style of text. Both modes get to parse all of the
// text, but when both assign a non-null style to a piece of code, the
// overlay wins, unless the combine argument was true and not overridden,
// or state.overlay.combineTokens was true, in which case the styles are
// combined.

(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"));
  else {}
})(function(CodeMirror) {
"use strict";

CodeMirror.overlayMode = function(base, overlay, combine) {
  return {
    startState: function() {
      return {
        base: CodeMirror.startState(base),
        overlay: CodeMirror.startState(overlay),
        basePos: 0, baseCur: null,
        overlayPos: 0, overlayCur: null,
        streamSeen: null
      };
    },
    copyState: function(state) {
      return {
        base: CodeMirror.copyState(base, state.base),
        overlay: CodeMirror.copyState(overlay, state.overlay),
        basePos: state.basePos, baseCur: null,
        overlayPos: state.overlayPos, overlayCur: null
      };
    },

    token: function(stream, state) {
      if (stream != state.streamSeen ||
          Math.min(state.basePos, state.overlayPos) < stream.start) {
        state.streamSeen = stream;
        state.basePos = state.overlayPos = stream.start;
      }

      if (stream.start == state.basePos) {
        state.baseCur = base.token(stream, state.base);
        state.basePos = stream.pos;
      }
      if (stream.start == state.overlayPos) {
        stream.pos = stream.start;
        state.overlayCur = overlay.token(stream, state.overlay);
        state.overlayPos = stream.pos;
      }
      stream.pos = Math.min(state.basePos, state.overlayPos);

      // state.overlay.combineTokens always takes precedence over combine,
      // unless set to null
      if (state.overlayCur == null) return state.baseCur;
      else if (state.baseCur != null &&
               state.overlay.combineTokens ||
               combine && state.overlay.combineTokens == null)
        return state.baseCur + " " + state.overlayCur;
      else return state.overlayCur;
    },

    indent: base.indent && function(state, textAfter, line) {
      return base.indent(state.base, textAfter, line);
    },
    electricChars: base.electricChars,

    innerMode: function(state) { return {state: state.base, mode: base}; },

    blankLine: function(state) {
      var baseToken, overlayToken;
      if (base.blankLine) baseToken = base.blankLine(state.base);
      if (overlay.blankLine) overlayToken = overlay.blankLine(state.overlay);

      return overlayToken == null ?
        baseToken :
        (combine && baseToken != null ? baseToken + " " + overlayToken : overlayToken);
    }
  };
};

});


/***/ }),

/***/ "9ed3":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var IteratorPrototype = __webpack_require__("ae93").IteratorPrototype;
var create = __webpack_require__("7c73");
var createPropertyDescriptor = __webpack_require__("5c6c");
var setToStringTag = __webpack_require__("d44e");
var Iterators = __webpack_require__("3f8c");

var returnThis = function () { return this; };

module.exports = function (IteratorConstructor, NAME, next) {
  var TO_STRING_TAG = NAME + ' Iterator';
  IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
  setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
  Iterators[TO_STRING_TAG] = returnThis;
  return IteratorConstructor;
};


/***/ }),

/***/ "9f7f":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "9f7fd":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var fails = __webpack_require__("d039");

// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
// so we use an intermediate function.
function RE(s, f) {
  return RegExp(s, f);
}

exports.UNSUPPORTED_Y = fails(function () {
  // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  var re = RE('a', 'y');
  re.lastIndex = 2;
  return re.exec('abcd') != null;
});

exports.BROKEN_CARET = fails(function () {
  // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  var re = RE('^r', 'gy');
  re.lastIndex = 2;
  return re.exec('str') != null;
});


/***/ }),

/***/ "9fbb":
/***/ (function(module, exports, __webpack_require__) {

// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__("4d88");
// eslint-disable-next-line no-prototype-builtins
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
  return cof(it) == 'String' ? it.split('') : Object(it);
};


/***/ }),

/***/ "9fcc":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_time_picker_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("14b4");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_time_picker_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_time_picker_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_time_picker_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "a078":
/***/ (function(module, exports, __webpack_require__) {

var toObject = __webpack_require__("7b0b");
var toLength = __webpack_require__("50c4");
var getIteratorMethod = __webpack_require__("35a1");
var isArrayIteratorMethod = __webpack_require__("e95a");
var bind = __webpack_require__("0366");
var aTypedArrayConstructor = __webpack_require__("ebb5").aTypedArrayConstructor;

module.exports = function from(source /* , mapfn, thisArg */) {
  var O = toObject(source);
  var argumentsLength = arguments.length;
  var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
  var mapping = mapfn !== undefined;
  var iteratorMethod = getIteratorMethod(O);
  var i, length, result, step, iterator, next;
  if (iteratorMethod != undefined && !isArrayIteratorMethod(iteratorMethod)) {
    iterator = iteratorMethod.call(O);
    next = iterator.next;
    O = [];
    while (!(step = next.call(iterator)).done) {
      O.push(step.value);
    }
  }
  if (mapping && argumentsLength > 2) {
    mapfn = bind(mapfn, arguments[2], 2);
  }
  length = toLength(O.length);
  result = new (aTypedArrayConstructor(this))(length);
  for (i = 0; length > i; i++) {
    result[i] = mapping ? mapfn(O[i], i) : O[i];
  }
  return result;
};


/***/ }),

/***/ "a0bd":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

/**
 * Link to the project's GitHub page:
 * https://github.com/pickhardt/coffeescript-codemirror-mode
 */
(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"));
  else {}
})(function(CodeMirror) {
"use strict";

CodeMirror.defineMode("coffeescript", function(conf, parserConf) {
  var ERRORCLASS = "error";

  function wordRegexp(words) {
    return new RegExp("^((" + words.join(")|(") + "))\\b");
  }

  var operators = /^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/;
  var delimiters = /^(?:[()\[\]{},:`=;]|\.\.?\.?)/;
  var identifiers = /^[_A-Za-z$][_A-Za-z$0-9]*/;
  var atProp = /^@[_A-Za-z$][_A-Za-z$0-9]*/;

  var wordOperators = wordRegexp(["and", "or", "not",
                                  "is", "isnt", "in",
                                  "instanceof", "typeof"]);
  var indentKeywords = ["for", "while", "loop", "if", "unless", "else",
                        "switch", "try", "catch", "finally", "class"];
  var commonKeywords = ["break", "by", "continue", "debugger", "delete",
                        "do", "in", "of", "new", "return", "then",
                        "this", "@", "throw", "when", "until", "extends"];

  var keywords = wordRegexp(indentKeywords.concat(commonKeywords));

  indentKeywords = wordRegexp(indentKeywords);


  var stringPrefixes = /^('{3}|\"{3}|['\"])/;
  var regexPrefixes = /^(\/{3}|\/)/;
  var commonConstants = ["Infinity", "NaN", "undefined", "null", "true", "false", "on", "off", "yes", "no"];
  var constants = wordRegexp(commonConstants);

  // Tokenizers
  function tokenBase(stream, state) {
    // Handle scope changes
    if (stream.sol()) {
      if (state.scope.align === null) state.scope.align = false;
      var scopeOffset = state.scope.offset;
      if (stream.eatSpace()) {
        var lineOffset = stream.indentation();
        if (lineOffset > scopeOffset && state.scope.type == "coffee") {
          return "indent";
        } else if (lineOffset < scopeOffset) {
          return "dedent";
        }
        return null;
      } else {
        if (scopeOffset > 0) {
          dedent(stream, state);
        }
      }
    }
    if (stream.eatSpace()) {
      return null;
    }

    var ch = stream.peek();

    // Handle docco title comment (single line)
    if (stream.match("####")) {
      stream.skipToEnd();
      return "comment";
    }

    // Handle multi line comments
    if (stream.match("###")) {
      state.tokenize = longComment;
      return state.tokenize(stream, state);
    }

    // Single line comment
    if (ch === "#") {
      stream.skipToEnd();
      return "comment";
    }

    // Handle number literals
    if (stream.match(/^-?[0-9\.]/, false)) {
      var floatLiteral = false;
      // Floats
      if (stream.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)) {
        floatLiteral = true;
      }
      if (stream.match(/^-?\d+\.\d*/)) {
        floatLiteral = true;
      }
      if (stream.match(/^-?\.\d+/)) {
        floatLiteral = true;
      }

      if (floatLiteral) {
        // prevent from getting extra . on 1..
        if (stream.peek() == "."){
          stream.backUp(1);
        }
        return "number";
      }
      // Integers
      var intLiteral = false;
      // Hex
      if (stream.match(/^-?0x[0-9a-f]+/i)) {
        intLiteral = true;
      }
      // Decimal
      if (stream.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)) {
        intLiteral = true;
      }
      // Zero by itself with no other piece of number.
      if (stream.match(/^-?0(?![\dx])/i)) {
        intLiteral = true;
      }
      if (intLiteral) {
        return "number";
      }
    }

    // Handle strings
    if (stream.match(stringPrefixes)) {
      state.tokenize = tokenFactory(stream.current(), false, "string");
      return state.tokenize(stream, state);
    }
    // Handle regex literals
    if (stream.match(regexPrefixes)) {
      if (stream.current() != "/" || stream.match(/^.*\//, false)) { // prevent highlight of division
        state.tokenize = tokenFactory(stream.current(), true, "string-2");
        return state.tokenize(stream, state);
      } else {
        stream.backUp(1);
      }
    }



    // Handle operators and delimiters
    if (stream.match(operators) || stream.match(wordOperators)) {
      return "operator";
    }
    if (stream.match(delimiters)) {
      return "punctuation";
    }

    if (stream.match(constants)) {
      return "atom";
    }

    if (stream.match(atProp) || state.prop && stream.match(identifiers)) {
      return "property";
    }

    if (stream.match(keywords)) {
      return "keyword";
    }

    if (stream.match(identifiers)) {
      return "variable";
    }

    // Handle non-detected items
    stream.next();
    return ERRORCLASS;
  }

  function tokenFactory(delimiter, singleline, outclass) {
    return function(stream, state) {
      while (!stream.eol()) {
        stream.eatWhile(/[^'"\/\\]/);
        if (stream.eat("\\")) {
          stream.next();
          if (singleline && stream.eol()) {
            return outclass;
          }
        } else if (stream.match(delimiter)) {
          state.tokenize = tokenBase;
          return outclass;
        } else {
          stream.eat(/['"\/]/);
        }
      }
      if (singleline) {
        if (parserConf.singleLineStringErrors) {
          outclass = ERRORCLASS;
        } else {
          state.tokenize = tokenBase;
        }
      }
      return outclass;
    };
  }

  function longComment(stream, state) {
    while (!stream.eol()) {
      stream.eatWhile(/[^#]/);
      if (stream.match("###")) {
        state.tokenize = tokenBase;
        break;
      }
      stream.eatWhile("#");
    }
    return "comment";
  }

  function indent(stream, state, type) {
    type = type || "coffee";
    var offset = 0, align = false, alignOffset = null;
    for (var scope = state.scope; scope; scope = scope.prev) {
      if (scope.type === "coffee" || scope.type == "}") {
        offset = scope.offset + conf.indentUnit;
        break;
      }
    }
    if (type !== "coffee") {
      align = null;
      alignOffset = stream.column() + stream.current().length;
    } else if (state.scope.align) {
      state.scope.align = false;
    }
    state.scope = {
      offset: offset,
      type: type,
      prev: state.scope,
      align: align,
      alignOffset: alignOffset
    };
  }

  function dedent(stream, state) {
    if (!state.scope.prev) return;
    if (state.scope.type === "coffee") {
      var _indent = stream.indentation();
      var matched = false;
      for (var scope = state.scope; scope; scope = scope.prev) {
        if (_indent === scope.offset) {
          matched = true;
          break;
        }
      }
      if (!matched) {
        return true;
      }
      while (state.scope.prev && state.scope.offset !== _indent) {
        state.scope = state.scope.prev;
      }
      return false;
    } else {
      state.scope = state.scope.prev;
      return false;
    }
  }

  function tokenLexer(stream, state) {
    var style = state.tokenize(stream, state);
    var current = stream.current();

    // Handle scope changes.
    if (current === "return") {
      state.dedent = true;
    }
    if (((current === "->" || current === "=>") && stream.eol())
        || style === "indent") {
      indent(stream, state);
    }
    var delimiter_index = "[({".indexOf(current);
    if (delimiter_index !== -1) {
      indent(stream, state, "])}".slice(delimiter_index, delimiter_index+1));
    }
    if (indentKeywords.exec(current)){
      indent(stream, state);
    }
    if (current == "then"){
      dedent(stream, state);
    }


    if (style === "dedent") {
      if (dedent(stream, state)) {
        return ERRORCLASS;
      }
    }
    delimiter_index = "])}".indexOf(current);
    if (delimiter_index !== -1) {
      while (state.scope.type == "coffee" && state.scope.prev)
        state.scope = state.scope.prev;
      if (state.scope.type == current)
        state.scope = state.scope.prev;
    }
    if (state.dedent && stream.eol()) {
      if (state.scope.type == "coffee" && state.scope.prev)
        state.scope = state.scope.prev;
      state.dedent = false;
    }

    return style;
  }

  var external = {
    startState: function(basecolumn) {
      return {
        tokenize: tokenBase,
        scope: {offset:basecolumn || 0, type:"coffee", prev: null, align: false},
        prop: false,
        dedent: 0
      };
    },

    token: function(stream, state) {
      var fillAlign = state.scope.align === null && state.scope;
      if (fillAlign && stream.sol()) fillAlign.align = false;

      var style = tokenLexer(stream, state);
      if (style && style != "comment") {
        if (fillAlign) fillAlign.align = true;
        state.prop = style == "punctuation" && stream.current() == "."
      }

      return style;
    },

    indent: function(state, text) {
      if (state.tokenize != tokenBase) return 0;
      var scope = state.scope;
      var closer = text && "])}".indexOf(text.charAt(0)) > -1;
      if (closer) while (scope.type == "coffee" && scope.prev) scope = scope.prev;
      var closes = closer && scope.type === text.charAt(0);
      if (scope.align)
        return scope.alignOffset - (closes ? 1 : 0);
      else
        return (closes ? scope.prev : scope).offset;
    },

    lineComment: "#",
    fold: "indent"
  };
  return external;
});

// IANA registered media type
// https://www.iana.org/assignments/media-types/
CodeMirror.defineMIME("application/vnd.coffeescript", "coffeescript");

CodeMirror.defineMIME("text/x-coffeescript", "coffeescript");
CodeMirror.defineMIME("text/coffeescript", "coffeescript");

});


/***/ }),

/***/ "a13b":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "a15b":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var IndexedObject = __webpack_require__("44ad");
var toIndexedObject = __webpack_require__("fc6a");
var arrayMethodIsStrict = __webpack_require__("a640");

var nativeJoin = [].join;

var ES3_STRINGS = IndexedObject != Object;
var STRICT_METHOD = arrayMethodIsStrict('join', ',');

// `Array.prototype.join` method
// https://tc39.github.io/ecma262/#sec-array.prototype.join
$({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
  join: function join(separator) {
    return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
  }
});


/***/ }),

/***/ "a1ff":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "a2c5":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_checkbox_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("921b");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_checkbox_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_checkbox_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_checkbox_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "a3c7":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "a3de":
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/**
 * Copyright (c) 2015, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule ExecutionEnvironment
 */

/*jslint evil: true */



var canUseDOM = !!(
  typeof window !== 'undefined' &&
  window.document &&
  window.document.createElement
);

/**
 * Simple, lightweight module assisting with the detection and context of
 * Worker. Helps avoid circular dependencies and allows code to reason about
 * whether or not they are in a Worker, even if they never include the main
 * `ReactWorker` dependency.
 */
var ExecutionEnvironment = {

  canUseDOM: canUseDOM,

  canUseWorkers: typeof Worker !== 'undefined',

  canUseEventListeners:
    canUseDOM && !!(window.addEventListener || window.attachEvent),

  canUseViewport: canUseDOM && !!window.screen,

  isInWorker: !canUseDOM // For now, this is true - might change in the future.

};

module.exports = ExecutionEnvironment;


/***/ }),

/***/ "a434":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var toAbsoluteIndex = __webpack_require__("23cb");
var toInteger = __webpack_require__("a691");
var toLength = __webpack_require__("50c4");
var toObject = __webpack_require__("7b0b");
var arraySpeciesCreate = __webpack_require__("65f0");
var createProperty = __webpack_require__("8418");
var arrayMethodHasSpeciesSupport = __webpack_require__("1dde");
var arrayMethodUsesToLength = __webpack_require__("ae40");

var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
var USES_TO_LENGTH = arrayMethodUsesToLength('splice', { ACCESSORS: true, 0: 0, 1: 2 });

var max = Math.max;
var min = Math.min;
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';

// `Array.prototype.splice` method
// https://tc39.github.io/ecma262/#sec-array.prototype.splice
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
  splice: function splice(start, deleteCount /* , ...items */) {
    var O = toObject(this);
    var len = toLength(O.length);
    var actualStart = toAbsoluteIndex(start, len);
    var argumentsLength = arguments.length;
    var insertCount, actualDeleteCount, A, k, from, to;
    if (argumentsLength === 0) {
      insertCount = actualDeleteCount = 0;
    } else if (argumentsLength === 1) {
      insertCount = 0;
      actualDeleteCount = len - actualStart;
    } else {
      insertCount = argumentsLength - 2;
      actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);
    }
    if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {
      throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
    }
    A = arraySpeciesCreate(O, actualDeleteCount);
    for (k = 0; k < actualDeleteCount; k++) {
      from = actualStart + k;
      if (from in O) createProperty(A, k, O[from]);
    }
    A.length = actualDeleteCount;
    if (insertCount < actualDeleteCount) {
      for (k = actualStart; k < len - actualDeleteCount; k++) {
        from = k + actualDeleteCount;
        to = k + insertCount;
        if (from in O) O[to] = O[from];
        else delete O[to];
      }
      for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];
    } else if (insertCount > actualDeleteCount) {
      for (k = len - actualDeleteCount; k > actualStart; k--) {
        from = k + actualDeleteCount - 1;
        to = k + insertCount - 1;
        if (from in O) O[to] = O[from];
        else delete O[to];
      }
    }
    for (k = 0; k < insertCount; k++) {
      O[k + actualStart] = arguments[k + 2];
    }
    O.length = len - actualDeleteCount + insertCount;
    return A;
  }
});


/***/ }),

/***/ "a4c8":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "a4d3":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var global = __webpack_require__("da84");
var getBuiltIn = __webpack_require__("d066");
var IS_PURE = __webpack_require__("c430");
var DESCRIPTORS = __webpack_require__("83ab");
var NATIVE_SYMBOL = __webpack_require__("4930");
var USE_SYMBOL_AS_UID = __webpack_require__("fdbf");
var fails = __webpack_require__("d039");
var has = __webpack_require__("5135");
var isArray = __webpack_require__("e8b5");
var isObject = __webpack_require__("861d");
var anObject = __webpack_require__("825a");
var toObject = __webpack_require__("7b0b");
var toIndexedObject = __webpack_require__("fc6a");
var toPrimitive = __webpack_require__("c04e");
var createPropertyDescriptor = __webpack_require__("5c6c");
var nativeObjectCreate = __webpack_require__("7c73");
var objectKeys = __webpack_require__("df75");
var getOwnPropertyNamesModule = __webpack_require__("241c");
var getOwnPropertyNamesExternal = __webpack_require__("057f");
var getOwnPropertySymbolsModule = __webpack_require__("7418");
var getOwnPropertyDescriptorModule = __webpack_require__("06cf");
var definePropertyModule = __webpack_require__("9bf2");
var propertyIsEnumerableModule = __webpack_require__("d1e7");
var createNonEnumerableProperty = __webpack_require__("9112");
var redefine = __webpack_require__("6eeb");
var shared = __webpack_require__("5692");
var sharedKey = __webpack_require__("f772");
var hiddenKeys = __webpack_require__("d012");
var uid = __webpack_require__("90e3");
var wellKnownSymbol = __webpack_require__("b622");
var wrappedWellKnownSymbolModule = __webpack_require__("e538");
var defineWellKnownSymbol = __webpack_require__("746f");
var setToStringTag = __webpack_require__("d44e");
var InternalStateModule = __webpack_require__("69f3");
var $forEach = __webpack_require__("b727").forEach;

var HIDDEN = sharedKey('hidden');
var SYMBOL = 'Symbol';
var PROTOTYPE = 'prototype';
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(SYMBOL);
var ObjectPrototype = Object[PROTOTYPE];
var $Symbol = global.Symbol;
var $stringify = getBuiltIn('JSON', 'stringify');
var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
var nativeDefineProperty = definePropertyModule.f;
var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;
var nativePropertyIsEnumerable = propertyIsEnumerableModule.f;
var AllSymbols = shared('symbols');
var ObjectPrototypeSymbols = shared('op-symbols');
var StringToSymbolRegistry = shared('string-to-symbol-registry');
var SymbolToStringRegistry = shared('symbol-to-string-registry');
var WellKnownSymbolsStore = shared('wks');
var QObject = global.QObject;
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;

// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
var setSymbolDescriptor = DESCRIPTORS && fails(function () {
  return nativeObjectCreate(nativeDefineProperty({}, 'a', {
    get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }
  })).a != 7;
}) ? function (O, P, Attributes) {
  var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);
  if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
  nativeDefineProperty(O, P, Attributes);
  if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
    nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);
  }
} : nativeDefineProperty;

var wrap = function (tag, description) {
  var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);
  setInternalState(symbol, {
    type: SYMBOL,
    tag: tag,
    description: description
  });
  if (!DESCRIPTORS) symbol.description = description;
  return symbol;
};

var isSymbol = USE_SYMBOL_AS_UID ? function (it) {
  return typeof it == 'symbol';
} : function (it) {
  return Object(it) instanceof $Symbol;
};

var $defineProperty = function defineProperty(O, P, Attributes) {
  if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
  anObject(O);
  var key = toPrimitive(P, true);
  anObject(Attributes);
  if (has(AllSymbols, key)) {
    if (!Attributes.enumerable) {
      if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));
      O[HIDDEN][key] = true;
    } else {
      if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
      Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
    } return setSymbolDescriptor(O, key, Attributes);
  } return nativeDefineProperty(O, key, Attributes);
};

var $defineProperties = function defineProperties(O, Properties) {
  anObject(O);
  var properties = toIndexedObject(Properties);
  var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
  $forEach(keys, function (key) {
    if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);
  });
  return O;
};

var $create = function create(O, Properties) {
  return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);
};

var $propertyIsEnumerable = function propertyIsEnumerable(V) {
  var P = toPrimitive(V, true);
  var enumerable = nativePropertyIsEnumerable.call(this, P);
  if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;
  return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;
};

var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
  var it = toIndexedObject(O);
  var key = toPrimitive(P, true);
  if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;
  var descriptor = nativeGetOwnPropertyDescriptor(it, key);
  if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {
    descriptor.enumerable = true;
  }
  return descriptor;
};

var $getOwnPropertyNames = function getOwnPropertyNames(O) {
  var names = nativeGetOwnPropertyNames(toIndexedObject(O));
  var result = [];
  $forEach(names, function (key) {
    if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);
  });
  return result;
};

var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
  var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
  var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
  var result = [];
  $forEach(names, function (key) {
    if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {
      result.push(AllSymbols[key]);
    }
  });
  return result;
};

// `Symbol` constructor
// https://tc39.github.io/ecma262/#sec-symbol-constructor
if (!NATIVE_SYMBOL) {
  $Symbol = function Symbol() {
    if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
    var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);
    var tag = uid(description);
    var setter = function (value) {
      if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);
      if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
      setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
    };
    if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
    return wrap(tag, description);
  };

  redefine($Symbol[PROTOTYPE], 'toString', function toString() {
    return getInternalState(this).tag;
  });

  redefine($Symbol, 'withoutSetter', function (description) {
    return wrap(uid(description), description);
  });

  propertyIsEnumerableModule.f = $propertyIsEnumerable;
  definePropertyModule.f = $defineProperty;
  getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;
  getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;
  getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;

  wrappedWellKnownSymbolModule.f = function (name) {
    return wrap(wellKnownSymbol(name), name);
  };

  if (DESCRIPTORS) {
    // https://github.com/tc39/proposal-Symbol-description
    nativeDefineProperty($Symbol[PROTOTYPE], 'description', {
      configurable: true,
      get: function description() {
        return getInternalState(this).description;
      }
    });
    if (!IS_PURE) {
      redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
    }
  }
}

$({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {
  Symbol: $Symbol
});

$forEach(objectKeys(WellKnownSymbolsStore), function (name) {
  defineWellKnownSymbol(name);
});

$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {
  // `Symbol.for` method
  // https://tc39.github.io/ecma262/#sec-symbol.for
  'for': function (key) {
    var string = String(key);
    if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
    var symbol = $Symbol(string);
    StringToSymbolRegistry[string] = symbol;
    SymbolToStringRegistry[symbol] = string;
    return symbol;
  },
  // `Symbol.keyFor` method
  // https://tc39.github.io/ecma262/#sec-symbol.keyfor
  keyFor: function keyFor(sym) {
    if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
    if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
  },
  useSetter: function () { USE_SETTER = true; },
  useSimple: function () { USE_SETTER = false; }
});

$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {
  // `Object.create` method
  // https://tc39.github.io/ecma262/#sec-object.create
  create: $create,
  // `Object.defineProperty` method
  // https://tc39.github.io/ecma262/#sec-object.defineproperty
  defineProperty: $defineProperty,
  // `Object.defineProperties` method
  // https://tc39.github.io/ecma262/#sec-object.defineproperties
  defineProperties: $defineProperties,
  // `Object.getOwnPropertyDescriptor` method
  // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors
  getOwnPropertyDescriptor: $getOwnPropertyDescriptor
});

$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {
  // `Object.getOwnPropertyNames` method
  // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
  getOwnPropertyNames: $getOwnPropertyNames,
  // `Object.getOwnPropertySymbols` method
  // https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols
  getOwnPropertySymbols: $getOwnPropertySymbols
});

// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
// https://bugs.chromium.org/p/v8/issues/detail?id=3443
$({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {
  getOwnPropertySymbols: function getOwnPropertySymbols(it) {
    return getOwnPropertySymbolsModule.f(toObject(it));
  }
});

// `JSON.stringify` method behavior with symbols
// https://tc39.github.io/ecma262/#sec-json.stringify
if ($stringify) {
  var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {
    var symbol = $Symbol();
    // MS Edge converts symbol values to JSON as {}
    return $stringify([symbol]) != '[null]'
      // WebKit converts symbol values to JSON as null
      || $stringify({ a: symbol }) != '{}'
      // V8 throws on boxed symbols
      || $stringify(Object(symbol)) != '{}';
  });

  $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
    // eslint-disable-next-line no-unused-vars
    stringify: function stringify(it, replacer, space) {
      var args = [it];
      var index = 1;
      var $replacer;
      while (arguments.length > index) args.push(arguments[index++]);
      $replacer = replacer;
      if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
      if (!isArray(replacer)) replacer = function (key, value) {
        if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
        if (!isSymbol(value)) return value;
      };
      args[1] = replacer;
      return $stringify.apply(null, args);
    }
  });
}

// `Symbol.prototype[@@toPrimitive]` method
// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive
if (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {
  createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
}
// `Symbol.prototype[@@toStringTag]` property
// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag
setToStringTag($Symbol, SYMBOL);

hiddenKeys[HIDDEN] = true;


/***/ }),

/***/ "a4f7":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_down_select_item_vue_vue_type_style_index_1_lang_less___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d537");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_down_select_item_vue_vue_type_style_index_1_lang_less___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_down_select_item_vue_vue_type_style_index_1_lang_less___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_down_select_item_vue_vue_type_style_index_1_lang_less___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "a623":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var $every = __webpack_require__("b727").every;
var arrayMethodIsStrict = __webpack_require__("a640");
var arrayMethodUsesToLength = __webpack_require__("ae40");

var STRICT_METHOD = arrayMethodIsStrict('every');
var USES_TO_LENGTH = arrayMethodUsesToLength('every');

// `Array.prototype.every` method
// https://tc39.github.io/ecma262/#sec-array.prototype.every
$({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH }, {
  every: function every(callbackfn /* , thisArg */) {
    return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),

/***/ "a630":
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__("23e7");
var from = __webpack_require__("4df4");
var checkCorrectnessOfIteration = __webpack_require__("1c7e");

var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
  Array.from(iterable);
});

// `Array.from` method
// https://tc39.github.io/ecma262/#sec-array.from
$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {
  from: from
});


/***/ }),

/***/ "a640":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fails = __webpack_require__("d039");

module.exports = function (METHOD_NAME, argument) {
  var method = [][METHOD_NAME];
  return !!method && fails(function () {
    // eslint-disable-next-line no-useless-call,no-throw-literal
    method.call(null, argument || function () { throw 1; }, 1);
  });
};


/***/ }),

/***/ "a691":
/***/ (function(module, exports) {

var ceil = Math.ceil;
var floor = Math.floor;

// `ToInteger` abstract operation
// https://tc39.github.io/ecma262/#sec-tointeger
module.exports = function (argument) {
  return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
};


/***/ }),

/***/ "a742":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


__webpack_require__("d3b7");

__webpack_require__("25f0");

exports.__esModule = true;
exports.isString = isString;
exports.isObject = isObject;
exports.isHtmlElement = isHtmlElement;

function isString(obj) {
  return Object.prototype.toString.call(obj) === '[object String]';
}

function isObject(obj) {
  return Object.prototype.toString.call(obj) === '[object Object]';
}

function isHtmlElement(node) {
  return node && node.nodeType === Node.ELEMENT_NODE;
}

var isFunction = exports.isFunction = function isFunction(functionToCheck) {
  var getType = {};
  return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
};

var isUndefined = exports.isUndefined = function isUndefined(val) {
  return val === void 0;
};

var isDefined = exports.isDefined = function isDefined(val) {
  return val !== undefined && val !== null;
};

/***/ }),

/***/ "a7be":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "a975":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__("ebb5");
var $every = __webpack_require__("b727").every;

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

// `%TypedArray%.prototype.every` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.every
exportTypedArrayMethod('every', function every(callbackfn /* , thisArg */) {
  return $every(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
});


/***/ }),

/***/ "a981":
/***/ (function(module, exports) {

module.exports = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';


/***/ }),

/***/ "a9ac":
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;__webpack_require__("ac1f");

__webpack_require__("5319");

var _typeof = __webpack_require__("7037");

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function (mod) {
  if (( false ? undefined : _typeof(exports)) == "object" && ( false ? undefined : _typeof(module)) == "object") // CommonJS
    mod(__webpack_require__("f3a7"));else if (true) // AMD
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__("f3a7")], __WEBPACK_AMD_DEFINE_FACTORY__ = (mod),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else // Plain browser env
    {}
})(function (CodeMirror) {
  CodeMirror.defineOption("placeholder", "", function (cm, val, old) {
    var prev = old && old != CodeMirror.Init;

    if (val && !prev) {
      cm.on("blur", onBlur);
      cm.on("change", onChange);
      cm.on("swapDoc", onChange);
      CodeMirror.on(cm.getInputField(), "compositionupdate", cm.state.placeholderCompose = function () {
        onComposition(cm);
      });
      onChange(cm);
    } else if (!val && prev) {
      cm.off("blur", onBlur);
      cm.off("change", onChange);
      cm.off("swapDoc", onChange);
      CodeMirror.off(cm.getInputField(), "compositionupdate", cm.state.placeholderCompose);
      clearPlaceholder(cm);
      var wrapper = cm.getWrapperElement();
      wrapper.className = wrapper.className.replace(" CodeMirror-empty", "");
    }

    if (val && !cm.hasFocus()) onBlur(cm);
  });

  function clearPlaceholder(cm) {
    if (cm.state.placeholder) {
      cm.state.placeholder.parentNode.removeChild(cm.state.placeholder);
      cm.state.placeholder = null;
    }
  }

  function setPlaceholder(cm) {
    clearPlaceholder(cm);
    var elt = cm.state.placeholder = document.createElement("pre");
    elt.style.cssText = "height: 0; overflow: visible";
    elt.style.direction = cm.getOption("direction");
    elt.className = "CodeMirror-placeholder CodeMirror-line-like";
    var placeHolder = cm.getOption("placeholder");
    if (typeof placeHolder == "string") placeHolder = document.createTextNode(placeHolder);
    elt.appendChild(placeHolder);
    cm.display.lineSpace.insertBefore(elt, cm.display.lineSpace.firstChild);
  }

  function onComposition(cm) {
    setTimeout(function () {
      var empty = false;

      if (cm.lineCount() == 1) {
        var input = cm.getInputField();
        empty = input.nodeName == "TEXTAREA" ? !cm.getLine(0).length : !/[^\u200b]/.test(input.querySelector(".CodeMirror-line").textContent);
      }

      if (empty) setPlaceholder(cm);else clearPlaceholder(cm);
    }, 20);
  }

  function onBlur(cm) {
    if (isEmpty(cm)) setPlaceholder(cm);
  }

  function onChange(cm) {
    var wrapper = cm.getWrapperElement(),
        empty = isEmpty(cm);
    wrapper.className = wrapper.className.replace(" CodeMirror-empty", "") + (empty ? " CodeMirror-empty" : "");
    if (empty) setPlaceholder(cm);else clearPlaceholder(cm);
  }

  function isEmpty(cm) {
    return cm.lineCount() === 1 && cm.getLine(0) === "";
  }
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("62e4")(module)))

/***/ }),

/***/ "a9e3":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var DESCRIPTORS = __webpack_require__("83ab");
var global = __webpack_require__("da84");
var isForced = __webpack_require__("94ca");
var redefine = __webpack_require__("6eeb");
var has = __webpack_require__("5135");
var classof = __webpack_require__("c6b6");
var inheritIfRequired = __webpack_require__("7156");
var toPrimitive = __webpack_require__("c04e");
var fails = __webpack_require__("d039");
var create = __webpack_require__("7c73");
var getOwnPropertyNames = __webpack_require__("241c").f;
var getOwnPropertyDescriptor = __webpack_require__("06cf").f;
var defineProperty = __webpack_require__("9bf2").f;
var trim = __webpack_require__("58a8").trim;

var NUMBER = 'Number';
var NativeNumber = global[NUMBER];
var NumberPrototype = NativeNumber.prototype;

// Opera ~12 has broken Object#toString
var BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER;

// `ToNumber` abstract operation
// https://tc39.github.io/ecma262/#sec-tonumber
var toNumber = function (argument) {
  var it = toPrimitive(argument, false);
  var first, third, radix, maxCode, digits, length, index, code;
  if (typeof it == 'string' && it.length > 2) {
    it = trim(it);
    first = it.charCodeAt(0);
    if (first === 43 || first === 45) {
      third = it.charCodeAt(2);
      if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
    } else if (first === 48) {
      switch (it.charCodeAt(1)) {
        case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i
        case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i
        default: return +it;
      }
      digits = it.slice(2);
      length = digits.length;
      for (index = 0; index < length; index++) {
        code = digits.charCodeAt(index);
        // parseInt parses a string to a first unavailable symbol
        // but ToNumber should return NaN if a string contains unavailable symbols
        if (code < 48 || code > maxCode) return NaN;
      } return parseInt(digits, radix);
    }
  } return +it;
};

// `Number` constructor
// https://tc39.github.io/ecma262/#sec-number-constructor
if (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {
  var NumberWrapper = function Number(value) {
    var it = arguments.length < 1 ? 0 : value;
    var dummy = this;
    return dummy instanceof NumberWrapper
      // check on 1..constructor(foo) case
      && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER)
        ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);
  };
  for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (
    // ES3:
    'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
    // ES2015 (in case, if modules with ES2015 Number statics required before):
    'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
    'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
  ).split(','), j = 0, key; keys.length > j; j++) {
    if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) {
      defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));
    }
  }
  NumberWrapper.prototype = NumberPrototype;
  NumberPrototype.constructor = NumberWrapper;
  redefine(global, NUMBER, NumberWrapper);
}


/***/ }),

/***/ "ab13":
/***/ (function(module, exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__("b622");

var MATCH = wellKnownSymbol('match');

module.exports = function (METHOD_NAME) {
  var regexp = /./;
  try {
    '/./'[METHOD_NAME](regexp);
  } catch (e) {
    try {
      regexp[MATCH] = false;
      return '/./'[METHOD_NAME](regexp);
    } catch (f) { /* empty */ }
  } return false;
};


/***/ }),

/***/ "ac1f":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var exec = __webpack_require__("9263");

$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
  exec: exec
});


/***/ }),

/***/ "ace4":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "ace42":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var fails = __webpack_require__("d039");
var ArrayBufferModule = __webpack_require__("621a");
var anObject = __webpack_require__("825a");
var toAbsoluteIndex = __webpack_require__("23cb");
var toLength = __webpack_require__("50c4");
var speciesConstructor = __webpack_require__("4840");

var ArrayBuffer = ArrayBufferModule.ArrayBuffer;
var DataView = ArrayBufferModule.DataView;
var nativeArrayBufferSlice = ArrayBuffer.prototype.slice;

var INCORRECT_SLICE = fails(function () {
  return !new ArrayBuffer(2).slice(1, undefined).byteLength;
});

// `ArrayBuffer.prototype.slice` method
// https://tc39.github.io/ecma262/#sec-arraybuffer.prototype.slice
$({ target: 'ArrayBuffer', proto: true, unsafe: true, forced: INCORRECT_SLICE }, {
  slice: function slice(start, end) {
    if (nativeArrayBufferSlice !== undefined && end === undefined) {
      return nativeArrayBufferSlice.call(anObject(this), start); // FF fix
    }
    var length = anObject(this).byteLength;
    var first = toAbsoluteIndex(start, length);
    var fin = toAbsoluteIndex(end === undefined ? length : end, length);
    var result = new (speciesConstructor(this, ArrayBuffer))(toLength(fin - first));
    var viewSource = new DataView(this);
    var viewTarget = new DataView(result);
    var index = 0;
    while (first < fin) {
      viewTarget.setUint8(index++, viewSource.getUint8(first++));
    } return result;
  }
});


/***/ }),

/***/ "ad6d":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var anObject = __webpack_require__("825a");

// `RegExp.prototype.flags` getter implementation
// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
module.exports = function () {
  var that = anObject(this);
  var result = '';
  if (that.global) result += 'g';
  if (that.ignoreCase) result += 'i';
  if (that.multiline) result += 'm';
  if (that.dotAll) result += 's';
  if (that.unicode) result += 'u';
  if (that.sticky) result += 'y';
  return result;
};


/***/ }),

/***/ "addb":
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;__webpack_require__("c975");

__webpack_require__("a15b");

__webpack_require__("fb6a");

__webpack_require__("ac1f");

__webpack_require__("5319");

__webpack_require__("1276");

__webpack_require__("18a5");

var _typeof = __webpack_require__("7037");

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
// declare global: DOMRect
(function (mod) {
  if (( false ? undefined : _typeof(exports)) == "object" && ( false ? undefined : _typeof(module)) == "object") // CommonJS
    mod(__webpack_require__("f3a7"));else if (true) // AMD
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__("f3a7")], __WEBPACK_AMD_DEFINE_FACTORY__ = (mod),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else // Plain browser env
    {}
})(function (CodeMirror) {
  "use strict";

  var HINT_ELEMENT_CLASS = "CodeMirror-hint";
  var ACTIVE_HINT_ELEMENT_CLASS = "CodeMirror-hint-active"; // This is the old interface, kept around for now to stay
  // backwards-compatible.

  CodeMirror.showHint = function (cm, getHints, options) {
    if (!getHints) return cm.showHint(options);
    if (options && options.async) getHints.async = true;
    var newOpts = {
      hint: getHints
    };
    if (options) for (var prop in options) {
      newOpts[prop] = options[prop];
    }
    return cm.showHint(newOpts);
  };

  CodeMirror.defineExtension("showHint", function (options) {
    options = parseOptions(this, this.getCursor("start"), options);
    var selections = this.listSelections();
    if (selections.length > 1) return; // By default, don't allow completion when something is selected.
    // A hint function can have a `supportsSelection` property to
    // indicate that it can handle selections.

    if (this.somethingSelected()) {
      if (!options.hint.supportsSelection) return; // Don't try with cross-line selections

      for (var i = 0; i < selections.length; i++) {
        if (selections[i].head.line != selections[i].anchor.line) return;
      }
    }

    if (this.state.completionActive) this.state.completionActive.close();
    var completion = this.state.completionActive = new Completion(this, options);
    if (!completion.options.hint) return;
    CodeMirror.signal(this, "startCompletion", this);
    completion.update(true);
  });
  CodeMirror.defineExtension("closeHint", function () {
    if (this.state.completionActive) this.state.completionActive.close();
  });

  function Completion(cm, options) {
    this.cm = cm;
    this.options = options;
    this.widget = null;
    this.debounce = 0;
    this.tick = 0;
    this.startPos = this.cm.getCursor("start");
    this.startLen = this.cm.getLine(this.startPos.line).length - this.cm.getSelection().length;
    var self = this;
    cm.on("cursorActivity", this.activityFunc = function () {
      self.cursorActivity();
    });
  }

  function enterSwitch(editor, atKeyWord) {
    var matchReg = /@[0-9a-zA-Z]+\([0-9a-zA-Z,@\*]+\)/;
    var editorValue = editor.getRange(CodeMirror.Pos(0, 0), editor.getCursor("start"));

    if (matchReg.test(atKeyWord)) {
      var curruntAt = editorValue.split("").reverse().join("").split("@")[0].split("").reverse().join('').replace("(", ",").replace(")", "");
      if (curruntAt != null && curruntAt != "") curruntAt = "@" + curruntAt;
      var startValue = editorValue.substring(0, editorValue.length - curruntAt.length - 1).replace(/\(/g, ",").replace(/,/g, ")");
      var param = startValue + curruntAt;
      var a = param.split(",");
      var startCh = a[0].length + 1;
      var ranges = [];

      for (var j = 1; j < a.length; j++) {
        var endCh = startCh + a[j].length;
        var lineRange = editor.newRange(CodeMirror.Pos(0, startCh), CodeMirror.Pos(0, endCh));
        ranges.push(lineRange);
        if (j === 1) editor.setSelection(CodeMirror.Pos(0, startCh), CodeMirror.Pos(0, endCh), {
          scroll: false
        });
        startCh = endCh + 1;
      }

      var selection = {
        "ranges": ranges,
        primary: 1
      };
      editor.setOption("selection", selection);
    }
  }

  function getKey(completion) {
    if (typeof completion == "string") return completion;else return completion.key ? completion.key : completion.text;
  }

  var requestAnimationFrame = window.requestAnimationFrame || function (fn) {
    return setTimeout(fn, 1000 / 60);
  };

  var cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout;
  Completion.prototype = {
    close: function close() {
      if (!this.active()) return;
      this.cm.state.completionActive = null;
      this.tick = null;
      this.cm.off("cursorActivity", this.activityFunc);
      if (this.widget && this.data) CodeMirror.signal(this.data, "close");
      if (this.widget) this.widget.close();
      CodeMirror.signal(this.cm, "endCompletion", this.cm);
    },
    active: function active() {
      return this.cm.state.completionActive == this;
    },
    pick: function pick(data, i) {
      var completion = data.list[i],
          self = this;
      this.cm.operation(function () {
        if (completion.hint) completion.hint(self.cm, data, completion);else // self.cm.replaceRange(getText(completion), completion.from || data.from,
          //                      completion.to || data.to, "complete");
          self.cm.replaceRange(getKey(completion), completion.from || data.from, completion.to || data.to, "complete");
        CodeMirror.signal(data, "pick", completion);
        self.cm.scrollIntoView();
      }); // 优化回填自动拾取机制
      // try {

      enterSwitch(this.cm, getKey(completion)); // }catch (e) {
      // }

      if (this.options.closeOnPick) {
        this.close();
      }
    },
    cursorActivity: function cursorActivity() {
      if (this.debounce) {
        cancelAnimationFrame(this.debounce);
        this.debounce = 0;
      }

      var identStart = this.startPos;

      if (this.data) {
        identStart = this.data.from;
      }

      var pos = this.cm.getCursor(),
          line = this.cm.getLine(pos.line);

      if (pos.line != this.startPos.line || line.length - pos.ch != this.startLen - this.startPos.ch || pos.ch < identStart.ch || this.cm.somethingSelected() || !pos.ch || this.options.closeCharacters.test(line.charAt(pos.ch - 1))) {
        if (this.options.closeOnCursorActivity) {
          this.close();
        }
      } else {
        var self = this;
        this.debounce = requestAnimationFrame(function () {
          self.update();
        });
        if (this.widget) this.widget.disable();
      }
    },
    update: function update(first) {
      if (this.tick == null) return;
      var self = this,
          myTick = ++this.tick;
      fetchHints(this.options.hint, this.cm, this.options, function (data) {
        if (self.tick == myTick) self.finishUpdate(data, first);
      });
    },
    finishUpdate: function finishUpdate(data, first) {
      if (this.data) CodeMirror.signal(this.data, "update");
      var picked = this.widget && this.widget.picked || first && this.options.completeSingle;
      if (this.widget) this.widget.close();
      this.data = data;

      if (data && data.list.length) {
        if (picked && data.list.length == 1) {
          this.pick(data, 0);
        } else {
          this.widget = new Widget(this, data);
          CodeMirror.signal(data, "shown");
        }
      }
    }
  };

  function parseOptions(cm, pos, options) {
    var editor = cm.options.hintOptions;
    var out = {};

    for (var prop in defaultOptions) {
      out[prop] = defaultOptions[prop];
    }

    if (editor) for (var prop in editor) {
      if (editor[prop] !== undefined) out[prop] = editor[prop];
    }
    if (options) for (var prop in options) {
      if (options[prop] !== undefined) out[prop] = options[prop];
    }
    if (out.hint.resolve) out.hint = out.hint.resolve(cm, pos);
    return out;
  }

  function getText(completion) {
    if (typeof completion == "string") return completion;else return completion.text;
  }

  function buildKeyMap(completion, handle) {
    var baseMap = {
      Up: function Up() {
        handle.moveFocus(-1);
      },
      Down: function Down() {
        handle.moveFocus(1);
      },
      PageUp: function PageUp() {
        handle.moveFocus(-handle.menuSize() + 1, true);
      },
      PageDown: function PageDown() {
        handle.moveFocus(handle.menuSize() - 1, true);
      },
      Home: function Home() {
        handle.setFocus(0);
      },
      End: function End() {
        handle.setFocus(handle.length - 1);
      },
      Enter: handle.pick,
      Tab: handle.pick,
      Esc: handle.close
    };
    var mac = /Mac/.test(navigator.platform);

    if (mac) {
      baseMap["Ctrl-P"] = function () {
        handle.moveFocus(-1);
      };

      baseMap["Ctrl-N"] = function () {
        handle.moveFocus(1);
      };
    }

    var custom = completion.options.customKeys;
    var ourMap = custom ? {} : baseMap;

    function addBinding(key, val) {
      var bound;
      if (typeof val != "string") bound = function bound(cm) {
        return val(cm, handle);
      }; // This mechanism is deprecated
      else if (baseMap.hasOwnProperty(val)) bound = baseMap[val];else bound = val;
      ourMap[key] = bound;
    }

    if (custom) for (var key in custom) {
      if (custom.hasOwnProperty(key)) addBinding(key, custom[key]);
    }
    var extra = completion.options.extraKeys;
    if (extra) for (var key in extra) {
      if (extra.hasOwnProperty(key)) addBinding(key, extra[key]);
    }
    return ourMap;
  }

  function getHintElement(hintsElement, el) {
    while (el && el != hintsElement) {
      if (el.nodeName.toUpperCase() === "LI" && el.parentNode == hintsElement) return el;
      el = el.parentNode;
    }
  }

  function Widget(completion, data) {
    this.completion = completion;
    this.data = data;
    this.picked = false;
    var widget = this,
        cm = completion.cm;
    var ownerDocument = cm.getInputField().ownerDocument;
    var parentWindow = ownerDocument.defaultView || ownerDocument.parentWindow;
    var hints = this.hints = ownerDocument.createElement("ul");
    var theme = completion.cm.options.theme;
    hints.className = "CodeMirror-hints " + theme;
    this.selectedHint = data.selectedHint || 0;
    var completions = data.list;

    for (var i = 0; i < completions.length; ++i) {
      var elt = hints.appendChild(ownerDocument.createElement("li")),
          cur = completions[i];
      var className = HINT_ELEMENT_CLASS + (i != this.selectedHint ? "" : " " + ACTIVE_HINT_ELEMENT_CLASS);
      if (cur.className != null) className = cur.className + " " + className;
      elt.className = className;
      if (cur.render) cur.render(elt, data, cur);else elt.appendChild(ownerDocument.createTextNode(cur.displayText || getText(cur)));
      elt.hintId = i;
    }

    var container = completion.options.container || ownerDocument.body;
    var pos = cm.cursorCoords(completion.options.alignWithWord ? data.from : null);
    var left = pos.left,
        top = pos.bottom,
        below = true;
    var offsetLeft = 0,
        offsetTop = 0;

    if (container !== ownerDocument.body) {
      // We offset the cursor position because left and top are relative to the offsetParent's top left corner.
      var isContainerPositioned = ['absolute', 'relative', 'fixed'].indexOf(parentWindow.getComputedStyle(container).position) !== -1;
      var offsetParent = isContainerPositioned ? container : container.offsetParent;
      var offsetParentPosition = offsetParent.getBoundingClientRect();
      var bodyPosition = ownerDocument.body.getBoundingClientRect();
      offsetLeft = offsetParentPosition.left - bodyPosition.left - offsetParent.scrollLeft;
      offsetTop = offsetParentPosition.top - bodyPosition.top - offsetParent.scrollTop;
    }

    hints.style.left = left - offsetLeft + "px";
    hints.style.top = top - offsetTop + "px"; // If we're at the edge of the screen, then we want the menu to appear on the left of the cursor.

    var winW = parentWindow.innerWidth || Math.max(ownerDocument.body.offsetWidth, ownerDocument.documentElement.offsetWidth);
    var winH = parentWindow.innerHeight || Math.max(ownerDocument.body.offsetHeight, ownerDocument.documentElement.offsetHeight);
    container.appendChild(hints);
    var box = completion.options.moveOnOverlap ? hints.getBoundingClientRect() : new DOMRect();
    var scrolls = completion.options.paddingForScrollbar ? hints.scrollHeight > hints.clientHeight + 1 : false; // Compute in the timeout to avoid reflow on init

    var startScroll;
    setTimeout(function () {
      startScroll = cm.getScrollInfo();
    });
    var overlapY = box.bottom - winH;

    if (overlapY > 0) {
      var height = box.bottom - box.top,
          curTop = pos.top - (pos.bottom - box.top);

      if (curTop - height > 0) {
        // Fits above cursor
        hints.style.top = (top = pos.top - height - offsetTop) + "px";
        below = false;
      } else if (height > winH) {
        hints.style.height = winH - 5 + "px";
        hints.style.top = (top = pos.bottom - box.top - offsetTop) + "px";
        var cursor = cm.getCursor();

        if (data.from.ch != cursor.ch) {
          pos = cm.cursorCoords(cursor);
          hints.style.left = (left = pos.left - offsetLeft) + "px";
          box = hints.getBoundingClientRect();
        }
      }
    }

    var overlapX = box.right - winW;

    if (overlapX > 0) {
      if (box.right - box.left > winW) {
        hints.style.width = winW - 5 + "px";
        overlapX -= box.right - box.left - winW;
      }

      hints.style.left = (left = pos.left - overlapX - offsetLeft) + "px";
    }

    if (scrolls) for (var node = hints.firstChild; node; node = node.nextSibling) {
      node.style.paddingRight = cm.display.nativeBarWidth + "px";
    }
    cm.addKeyMap(this.keyMap = buildKeyMap(completion, {
      moveFocus: function moveFocus(n, avoidWrap) {
        widget.changeActive(widget.selectedHint + n, avoidWrap);
      },
      setFocus: function setFocus(n) {
        widget.changeActive(n);
      },
      menuSize: function menuSize() {
        return widget.screenAmount();
      },
      length: completions.length,
      close: function close() {
        completion.close();
      },
      pick: function pick() {
        widget.pick();
      },
      data: data
    }));

    if (completion.options.closeOnUnfocus) {
      var closingOnBlur;
      cm.on("blur", this.onBlur = function () {
        closingOnBlur = setTimeout(function () {
          completion.close();
        }, 100);
      });
      cm.on("focus", this.onFocus = function () {
        clearTimeout(closingOnBlur);
      });
    }

    cm.on("scroll", this.onScroll = function () {
      var curScroll = cm.getScrollInfo(),
          editor = cm.getWrapperElement().getBoundingClientRect();
      var newTop = top + startScroll.top - curScroll.top;
      var point = newTop - (parentWindow.pageYOffset || (ownerDocument.documentElement || ownerDocument.body).scrollTop);
      if (!below) point += hints.offsetHeight;
      if (point <= editor.top || point >= editor.bottom) return completion.close();
      hints.style.top = newTop + "px";
      hints.style.left = left + startScroll.left - curScroll.left + "px";
    });
    CodeMirror.on(hints, "dblclick", function (e) {
      var t = getHintElement(hints, e.target || e.srcElement);

      if (t && t.hintId != null) {
        widget.changeActive(t.hintId);
        widget.pick();
      }
    });
    CodeMirror.on(hints, "click", function (e) {
      var t = getHintElement(hints, e.target || e.srcElement);

      if (t && t.hintId != null) {
        widget.changeActive(t.hintId);
        if (completion.options.completeOnSingleClick) widget.pick();
      }
    });
    CodeMirror.on(hints, "mousedown", function () {
      setTimeout(function () {
        cm.focus();
      }, 20);
    }); // The first hint doesn't need to be scrolled to on init

    var selectedHintRange = this.getSelectedHintRange();

    if (selectedHintRange.from !== 0 || selectedHintRange.to !== 0) {
      this.scrollToActive();
    }

    CodeMirror.signal(data, "select", completions[this.selectedHint], hints.childNodes[this.selectedHint]);
    return true;
  }

  Widget.prototype = {
    close: function close() {
      if (this.completion.widget != this) return;
      this.completion.widget = null;
      this.hints.parentNode.removeChild(this.hints);
      this.completion.cm.removeKeyMap(this.keyMap);
      var cm = this.completion.cm;

      if (this.completion.options.closeOnUnfocus) {
        cm.off("blur", this.onBlur);
        cm.off("focus", this.onFocus);
      }

      cm.off("scroll", this.onScroll);
    },
    disable: function disable() {
      this.completion.cm.removeKeyMap(this.keyMap);
      var widget = this;
      this.keyMap = {
        Enter: function Enter() {
          widget.picked = true;
        }
      };
      this.completion.cm.addKeyMap(this.keyMap);
    },
    pick: function pick() {
      this.completion.pick(this.data, this.selectedHint);
    },
    changeActive: function changeActive(i, avoidWrap) {
      if (i >= this.data.list.length) i = avoidWrap ? this.data.list.length - 1 : 0;else if (i < 0) i = avoidWrap ? 0 : this.data.list.length - 1;
      if (this.selectedHint == i) return;
      var node = this.hints.childNodes[this.selectedHint];
      if (node) node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, "");
      node = this.hints.childNodes[this.selectedHint = i];
      node.className += " " + ACTIVE_HINT_ELEMENT_CLASS;
      this.scrollToActive();
      CodeMirror.signal(this.data, "select", this.data.list[this.selectedHint], node);
    },
    scrollToActive: function scrollToActive() {
      var selectedHintRange = this.getSelectedHintRange();
      var node1 = this.hints.childNodes[selectedHintRange.from];
      var node2 = this.hints.childNodes[selectedHintRange.to];
      var firstNode = this.hints.firstChild;
      if (node1.offsetTop < this.hints.scrollTop) this.hints.scrollTop = node1.offsetTop - firstNode.offsetTop;else if (node2.offsetTop + node2.offsetHeight > this.hints.scrollTop + this.hints.clientHeight) this.hints.scrollTop = node2.offsetTop + node2.offsetHeight - this.hints.clientHeight + firstNode.offsetTop;
    },
    screenAmount: function screenAmount() {
      return Math.floor(this.hints.clientHeight / this.hints.firstChild.offsetHeight) || 1;
    },
    getSelectedHintRange: function getSelectedHintRange() {
      var margin = this.completion.options.scrollMargin || 0;
      return {
        from: Math.max(0, this.selectedHint - margin),
        to: Math.min(this.data.list.length - 1, this.selectedHint + margin)
      };
    }
  };

  function applicableHelpers(cm, helpers) {
    if (!cm.somethingSelected()) return helpers;
    var result = [];

    for (var i = 0; i < helpers.length; i++) {
      if (helpers[i].supportsSelection) result.push(helpers[i]);
    }

    return result;
  }

  function fetchHints(hint, cm, options, callback) {
    if (hint.async) {
      hint(cm, callback, options);
    } else {
      var result = hint(cm, options);
      if (result && result.then) result.then(callback);else callback(result);
    }
  }

  function resolveAutoHints(cm, pos) {
    var helpers = cm.getHelpers(pos, "hint"),
        words;

    if (helpers.length) {
      var resolved = function resolved(cm, callback, options) {
        var app = applicableHelpers(cm, helpers);

        function run(i) {
          if (i == app.length) return callback(null);
          fetchHints(app[i], cm, options, function (result) {
            if (result && result.list.length > 0) callback(result);else run(i + 1);
          });
        }

        run(0);
      };

      resolved.async = true;
      resolved.supportsSelection = true;
      return resolved;
    } else if (words = cm.getHelper(cm.getCursor(), "hintWords")) {
      return function (cm) {
        return CodeMirror.hint.fromList(cm, {
          words: words
        });
      };
    } else if (CodeMirror.hint.anyword) {
      return function (cm, options) {
        return CodeMirror.hint.anyword(cm, options);
      };
    } else {
      return function () {};
    }
  }

  CodeMirror.registerHelper("hint", "auto", {
    resolve: resolveAutoHints
  });
  CodeMirror.registerHelper("hint", "fromList", function (cm, options) {
    var cur = cm.getCursor(),
        token = cm.getTokenAt(cur);
    var term,
        from = CodeMirror.Pos(cur.line, token.start),
        to = cur;

    if (token.start < cur.ch && /\w/.test(token.string.charAt(cur.ch - token.start - 1))) {
      term = token.string.substr(0, cur.ch - token.start);
    } else {
      term = "";
      from = cur;
    }

    var found = [];

    for (var i = 0; i < options.words.length; i++) {
      var word = options.words[i];
      if (word.slice(0, term.length) == term) found.push(word);
    }

    if (found.length) return {
      list: found,
      from: from,
      to: to
    };
  });
  CodeMirror.commands.autocomplete = CodeMirror.showHint;
  var defaultOptions = {
    hint: CodeMirror.hint.auto,
    completeSingle: true,
    alignWithWord: true,
    closeCharacters: /[\s()\[\]{};:>,]/,
    closeOnCursorActivity: true,
    closeOnPick: true,
    closeOnUnfocus: true,
    completeOnSingleClick: true,
    container: null,
    customKeys: null,
    extraKeys: null,
    paddingForScrollbar: true,
    moveOnOverlap: true
  };
  CodeMirror.defineOption("hintOptions", null);
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("62e4")(module)))

/***/ }),

/***/ "ae40":
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__("83ab");
var fails = __webpack_require__("d039");
var has = __webpack_require__("5135");

var defineProperty = Object.defineProperty;
var cache = {};

var thrower = function (it) { throw it; };

module.exports = function (METHOD_NAME, options) {
  if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];
  if (!options) options = {};
  var method = [][METHOD_NAME];
  var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;
  var argument0 = has(options, 0) ? options[0] : thrower;
  var argument1 = has(options, 1) ? options[1] : undefined;

  return cache[METHOD_NAME] = !!method && !fails(function () {
    if (ACCESSORS && !DESCRIPTORS) return true;
    var O = { length: -1 };

    if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower });
    else O[1] = 1;

    method.call(O, argument0, argument1);
  });
};


/***/ }),

/***/ "ae93":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var getPrototypeOf = __webpack_require__("e163");
var createNonEnumerableProperty = __webpack_require__("9112");
var has = __webpack_require__("5135");
var wellKnownSymbol = __webpack_require__("b622");
var IS_PURE = __webpack_require__("c430");

var ITERATOR = wellKnownSymbol('iterator');
var BUGGY_SAFARI_ITERATORS = false;

var returnThis = function () { return this; };

// `%IteratorPrototype%` object
// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;

if ([].keys) {
  arrayIterator = [].keys();
  // Safari 8 has buggy iterators w/o `next`
  if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
  else {
    PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
    if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
  }
}

if (IteratorPrototype == undefined) IteratorPrototype = {};

// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
if (!IS_PURE && !has(IteratorPrototype, ITERATOR)) {
  createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
}

module.exports = {
  IteratorPrototype: IteratorPrototype,
  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
};


/***/ }),

/***/ "af03":
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__("d039");

// check the existence of a method, lowercase
// of a tag and escaping quotes in arguments
module.exports = function (METHOD_NAME) {
  return fails(function () {
    var test = ''[METHOD_NAME]('"');
    return test !== test.toLowerCase() || test.split('"').length > 3;
  });
};


/***/ }),

/***/ "b041":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var TO_STRING_TAG_SUPPORT = __webpack_require__("00ee");
var classof = __webpack_require__("f5df");

// `Object.prototype.toString` method implementation
// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
  return '[object ' + classof(this) + ']';
};


/***/ }),

/***/ "b0c0":
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__("83ab");
var defineProperty = __webpack_require__("9bf2").f;

var FunctionPrototype = Function.prototype;
var FunctionPrototypeToString = FunctionPrototype.toString;
var nameRE = /^\s*function ([^ (]*)/;
var NAME = 'name';

// Function instances `.name` property
// https://tc39.github.io/ecma262/#sec-function-instances-name
if (DESCRIPTORS && !(NAME in FunctionPrototype)) {
  defineProperty(FunctionPrototype, NAME, {
    configurable: true,
    get: function () {
      try {
        return FunctionPrototypeToString.call(this).match(nameRE)[1];
      } catch (error) {
        return '';
      }
    }
  });
}


/***/ }),

/***/ "b233":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "b313":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var replace = String.prototype.replace;
var percentTwenties = /%20/g;

module.exports = {
    'default': 'RFC3986',
    formatters: {
        RFC1738: function (value) {
            return replace.call(value, percentTwenties, '+');
        },
        RFC3986: function (value) {
            return value;
        }
    },
    RFC1738: 'RFC1738',
    RFC3986: 'RFC3986'
};


/***/ }),

/***/ "b367":
/***/ (function(module, exports, __webpack_require__) {

var core = __webpack_require__("5524");
var global = __webpack_require__("ef08");
var SHARED = '__core-js_shared__';
var store = global[SHARED] || (global[SHARED] = {});

(module.exports = function (key, value) {
  return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
  version: core.version,
  mode: __webpack_require__("e444") ? 'pure' : 'global',
  copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
});


/***/ }),

/***/ "b39a":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var global = __webpack_require__("da84");
var ArrayBufferViewCore = __webpack_require__("ebb5");
var fails = __webpack_require__("d039");

var Int8Array = global.Int8Array;
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var $toLocaleString = [].toLocaleString;
var $slice = [].slice;

// iOS Safari 6.x fails here
var TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {
  $toLocaleString.call(new Int8Array(1));
});

var FORCED = fails(function () {
  return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString();
}) || !fails(function () {
  Int8Array.prototype.toLocaleString.call([1, 2]);
});

// `%TypedArray%.prototype.toLocaleString` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.tolocalestring
exportTypedArrayMethod('toLocaleString', function toLocaleString() {
  return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice.call(aTypedArray(this)) : aTypedArray(this), arguments);
}, FORCED);


/***/ }),

/***/ "b3ff":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "b4b6":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_backtop_vue_vue_type_style_index_0_id_80867440_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ebee");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_backtop_vue_vue_type_style_index_0_id_80867440_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_backtop_vue_vue_type_style_index_0_id_80867440_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_backtop_vue_vue_type_style_index_0_id_80867440_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "b50d":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");
var settle = __webpack_require__("467f");
var cookies = __webpack_require__("7aac");
var buildURL = __webpack_require__("30b5");
var buildFullPath = __webpack_require__("83b9");
var parseHeaders = __webpack_require__("c345");
var isURLSameOrigin = __webpack_require__("3934");
var createError = __webpack_require__("2d83");

module.exports = function xhrAdapter(config) {
  return new Promise(function dispatchXhrRequest(resolve, reject) {
    var requestData = config.data;
    var requestHeaders = config.headers;

    if (utils.isFormData(requestData)) {
      delete requestHeaders['Content-Type']; // Let the browser set it
    }

    var request = new XMLHttpRequest();

    // HTTP basic authentication
    if (config.auth) {
      var username = config.auth.username || '';
      var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
      requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
    }

    var fullPath = buildFullPath(config.baseURL, config.url);
    request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);

    // Set the request timeout in MS
    request.timeout = config.timeout;

    // Listen for ready state
    request.onreadystatechange = function handleLoad() {
      if (!request || request.readyState !== 4) {
        return;
      }

      // The request errored out and we didn't get a response, this will be
      // handled by onerror instead
      // With one exception: request that using file: protocol, most browsers
      // will return status as 0 even though it's a successful request
      if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
        return;
      }

      // Prepare the response
      var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
      var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
      var response = {
        data: responseData,
        status: request.status,
        statusText: request.statusText,
        headers: responseHeaders,
        config: config,
        request: request
      };

      settle(resolve, reject, response);

      // Clean up request
      request = null;
    };

    // Handle browser request cancellation (as opposed to a manual cancellation)
    request.onabort = function handleAbort() {
      if (!request) {
        return;
      }

      reject(createError('Request aborted', config, 'ECONNABORTED', request));

      // Clean up request
      request = null;
    };

    // Handle low level network errors
    request.onerror = function handleError() {
      // Real errors are hidden from us by the browser
      // onerror should only fire if it's a network error
      reject(createError('Network Error', config, null, request));

      // Clean up request
      request = null;
    };

    // Handle timeout
    request.ontimeout = function handleTimeout() {
      var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
      if (config.timeoutErrorMessage) {
        timeoutErrorMessage = config.timeoutErrorMessage;
      }
      reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',
        request));

      // Clean up request
      request = null;
    };

    // Add xsrf header
    // This is only done if running in a standard browser environment.
    // Specifically not if we're in a web worker, or react-native.
    if (utils.isStandardBrowserEnv()) {
      // Add xsrf header
      var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
        cookies.read(config.xsrfCookieName) :
        undefined;

      if (xsrfValue) {
        requestHeaders[config.xsrfHeaderName] = xsrfValue;
      }
    }

    // Add headers to the request
    if ('setRequestHeader' in request) {
      utils.forEach(requestHeaders, function setRequestHeader(val, key) {
        if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
          // Remove Content-Type if data is undefined
          delete requestHeaders[key];
        } else {
          // Otherwise add header to the request
          request.setRequestHeader(key, val);
        }
      });
    }

    // Add withCredentials to request if needed
    if (!utils.isUndefined(config.withCredentials)) {
      request.withCredentials = !!config.withCredentials;
    }

    // Add responseType to request if needed
    if (config.responseType) {
      try {
        request.responseType = config.responseType;
      } catch (e) {
        // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.
        // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.
        if (config.responseType !== 'json') {
          throw e;
        }
      }
    }

    // Handle progress if needed
    if (typeof config.onDownloadProgress === 'function') {
      request.addEventListener('progress', config.onDownloadProgress);
    }

    // Not all browsers support upload events
    if (typeof config.onUploadProgress === 'function' && request.upload) {
      request.upload.addEventListener('progress', config.onUploadProgress);
    }

    if (config.cancelToken) {
      // Handle cancellation
      config.cancelToken.promise.then(function onCanceled(cancel) {
        if (!request) {
          return;
        }

        request.abort();
        reject(cancel);
        // Clean up request
        request = null;
      });
    }

    if (!requestData) {
      requestData = null;
    }

    // Send the request
    request.send(requestData);
  });
};


/***/ }),

/***/ "b575":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var getOwnPropertyDescriptor = __webpack_require__("06cf").f;
var classof = __webpack_require__("c6b6");
var macrotask = __webpack_require__("2cf4").set;
var IS_IOS = __webpack_require__("1cdc");

var MutationObserver = global.MutationObserver || global.WebKitMutationObserver;
var process = global.process;
var Promise = global.Promise;
var IS_NODE = classof(process) == 'process';
// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');
var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;

var flush, head, last, notify, toggle, node, promise, then;

// modern engines have queueMicrotask method
if (!queueMicrotask) {
  flush = function () {
    var parent, fn;
    if (IS_NODE && (parent = process.domain)) parent.exit();
    while (head) {
      fn = head.fn;
      head = head.next;
      try {
        fn();
      } catch (error) {
        if (head) notify();
        else last = undefined;
        throw error;
      }
    } last = undefined;
    if (parent) parent.enter();
  };

  // Node.js
  if (IS_NODE) {
    notify = function () {
      process.nextTick(flush);
    };
  // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
  } else if (MutationObserver && !IS_IOS) {
    toggle = true;
    node = document.createTextNode('');
    new MutationObserver(flush).observe(node, { characterData: true });
    notify = function () {
      node.data = toggle = !toggle;
    };
  // environments with maybe non-completely correct, but existent Promise
  } else if (Promise && Promise.resolve) {
    // Promise.resolve without an argument throws an error in LG WebOS 2
    promise = Promise.resolve(undefined);
    then = promise.then;
    notify = function () {
      then.call(promise, flush);
    };
  // for other environments - macrotask based on:
  // - setImmediate
  // - MessageChannel
  // - window.postMessag
  // - onreadystatechange
  // - setTimeout
  } else {
    notify = function () {
      // strange IE + webpack dev server bug - use .call(global)
      macrotask.call(global, flush);
    };
  }
}

module.exports = queueMicrotask || function (fn) {
  var task = { fn: fn, next: undefined };
  if (last) last.next = task;
  if (!head) {
    head = task;
    notify();
  } last = task;
};


/***/ }),

/***/ "b577":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_upload_image_vue_vue_type_style_index_0_id_2344d3a1_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8e34");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_upload_image_vue_vue_type_style_index_0_id_2344d3a1_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_upload_image_vue_vue_type_style_index_0_id_2344d3a1_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_upload_image_vue_vue_type_style_index_0_id_2344d3a1_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "b622":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var shared = __webpack_require__("5692");
var has = __webpack_require__("5135");
var uid = __webpack_require__("90e3");
var NATIVE_SYMBOL = __webpack_require__("4930");
var USE_SYMBOL_AS_UID = __webpack_require__("fdbf");

var WellKnownSymbolsStore = shared('wks');
var Symbol = global.Symbol;
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;

module.exports = function (name) {
  if (!has(WellKnownSymbolsStore, name)) {
    if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];
    else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
  } return WellKnownSymbolsStore[name];
};


/***/ }),

/***/ "b64b":
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__("23e7");
var toObject = __webpack_require__("7b0b");
var nativeKeys = __webpack_require__("df75");
var fails = __webpack_require__("d039");

var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });

// `Object.keys` method
// https://tc39.github.io/ecma262/#sec-object.keys
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
  keys: function keys(it) {
    return nativeKeys(toObject(it));
  }
});


/***/ }),

/***/ "b680":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var toInteger = __webpack_require__("a691");
var thisNumberValue = __webpack_require__("408a");
var repeat = __webpack_require__("1148");
var fails = __webpack_require__("d039");

var nativeToFixed = 1.0.toFixed;
var floor = Math.floor;

var pow = function (x, n, acc) {
  return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
};

var log = function (x) {
  var n = 0;
  var x2 = x;
  while (x2 >= 4096) {
    n += 12;
    x2 /= 4096;
  }
  while (x2 >= 2) {
    n += 1;
    x2 /= 2;
  } return n;
};

var FORCED = nativeToFixed && (
  0.00008.toFixed(3) !== '0.000' ||
  0.9.toFixed(0) !== '1' ||
  1.255.toFixed(2) !== '1.25' ||
  1000000000000000128.0.toFixed(0) !== '1000000000000000128'
) || !fails(function () {
  // V8 ~ Android 4.3-
  nativeToFixed.call({});
});

// `Number.prototype.toFixed` method
// https://tc39.github.io/ecma262/#sec-number.prototype.tofixed
$({ target: 'Number', proto: true, forced: FORCED }, {
  // eslint-disable-next-line max-statements
  toFixed: function toFixed(fractionDigits) {
    var number = thisNumberValue(this);
    var fractDigits = toInteger(fractionDigits);
    var data = [0, 0, 0, 0, 0, 0];
    var sign = '';
    var result = '0';
    var e, z, j, k;

    var multiply = function (n, c) {
      var index = -1;
      var c2 = c;
      while (++index < 6) {
        c2 += n * data[index];
        data[index] = c2 % 1e7;
        c2 = floor(c2 / 1e7);
      }
    };

    var divide = function (n) {
      var index = 6;
      var c = 0;
      while (--index >= 0) {
        c += data[index];
        data[index] = floor(c / n);
        c = (c % n) * 1e7;
      }
    };

    var dataToString = function () {
      var index = 6;
      var s = '';
      while (--index >= 0) {
        if (s !== '' || index === 0 || data[index] !== 0) {
          var t = String(data[index]);
          s = s === '' ? t : s + repeat.call('0', 7 - t.length) + t;
        }
      } return s;
    };

    if (fractDigits < 0 || fractDigits > 20) throw RangeError('Incorrect fraction digits');
    // eslint-disable-next-line no-self-compare
    if (number != number) return 'NaN';
    if (number <= -1e21 || number >= 1e21) return String(number);
    if (number < 0) {
      sign = '-';
      number = -number;
    }
    if (number > 1e-21) {
      e = log(number * pow(2, 69, 1)) - 69;
      z = e < 0 ? number * pow(2, -e, 1) : number / pow(2, e, 1);
      z *= 0x10000000000000;
      e = 52 - e;
      if (e > 0) {
        multiply(0, z);
        j = fractDigits;
        while (j >= 7) {
          multiply(1e7, 0);
          j -= 7;
        }
        multiply(pow(10, j, 1), 0);
        j = e - 1;
        while (j >= 23) {
          divide(1 << 23);
          j -= 23;
        }
        divide(1 << j);
        multiply(1, 1);
        divide(2);
        result = dataToString();
      } else {
        multiply(0, z);
        multiply(1 << -e, 0);
        result = dataToString() + repeat.call('0', fractDigits);
      }
    }
    if (fractDigits > 0) {
      k = result.length;
      result = sign + (k <= fractDigits
        ? '0.' + repeat.call('0', fractDigits - k) + result
        : result.slice(0, k - fractDigits) + '.' + result.slice(k - fractDigits));
    } else {
      result = sign + result;
    } return result;
  }
});


/***/ }),

/***/ "b727":
/***/ (function(module, exports, __webpack_require__) {

var bind = __webpack_require__("0366");
var IndexedObject = __webpack_require__("44ad");
var toObject = __webpack_require__("7b0b");
var toLength = __webpack_require__("50c4");
var arraySpeciesCreate = __webpack_require__("65f0");

var push = [].push;

// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
var createMethod = function (TYPE) {
  var IS_MAP = TYPE == 1;
  var IS_FILTER = TYPE == 2;
  var IS_SOME = TYPE == 3;
  var IS_EVERY = TYPE == 4;
  var IS_FIND_INDEX = TYPE == 6;
  var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  return function ($this, callbackfn, that, specificCreate) {
    var O = toObject($this);
    var self = IndexedObject(O);
    var boundFunction = bind(callbackfn, that, 3);
    var length = toLength(self.length);
    var index = 0;
    var create = specificCreate || arraySpeciesCreate;
    var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
    var value, result;
    for (;length > index; index++) if (NO_HOLES || index in self) {
      value = self[index];
      result = boundFunction(value, index, O);
      if (TYPE) {
        if (IS_MAP) target[index] = result; // map
        else if (result) switch (TYPE) {
          case 3: return true;              // some
          case 5: return value;             // find
          case 6: return index;             // findIndex
          case 2: push.call(target, value); // filter
        } else if (IS_EVERY) return false;  // every
      }
    }
    return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  };
};

module.exports = {
  // `Array.prototype.forEach` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
  forEach: createMethod(0),
  // `Array.prototype.map` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.map
  map: createMethod(1),
  // `Array.prototype.filter` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.filter
  filter: createMethod(2),
  // `Array.prototype.some` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.some
  some: createMethod(3),
  // `Array.prototype.every` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.every
  every: createMethod(4),
  // `Array.prototype.find` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.find
  find: createMethod(5),
  // `Array.prototype.findIndex` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
  findIndex: createMethod(6)
};


/***/ }),

/***/ "b9c7":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("e507");
module.exports = __webpack_require__("5524").Object.assign;


/***/ }),

/***/ "ba01":
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__("051b");


/***/ }),

/***/ "bb2f":
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__("d039");

module.exports = !fails(function () {
  return Object.isExtensible(Object.preventExtensions({}));
});


/***/ }),

/***/ "bc3a":
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__("cee4");

/***/ }),

/***/ "c04e":
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__("861d");

// `ToPrimitive` abstract operation
// https://tc39.github.io/ecma262/#sec-toprimitive
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (input, PREFERRED_STRING) {
  if (!isObject(input)) return input;
  var fn, val;
  if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
  if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  throw TypeError("Can't convert object to primitive value");
};


/***/ }),

/***/ "c098":
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__("d4af");


/***/ }),

/***/ "c0e2":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

// Swift mode created by Michael Kaminsky https://github.com/mkaminsky11

(function(mod) {
  if (true)
    mod(__webpack_require__("56b3"))
  else {}
})(function(CodeMirror) {
  "use strict"

  function wordSet(words) {
    var set = {}
    for (var i = 0; i < words.length; i++) set[words[i]] = true
    return set
  }

  var keywords = wordSet(["_","var","let","class","enum","extension","import","protocol","struct","func","typealias","associatedtype",
                          "open","public","internal","fileprivate","private","deinit","init","new","override","self","subscript","super",
                          "convenience","dynamic","final","indirect","lazy","required","static","unowned","unowned(safe)","unowned(unsafe)","weak","as","is",
                          "break","case","continue","default","else","fallthrough","for","guard","if","in","repeat","switch","where","while",
                          "defer","return","inout","mutating","nonmutating","catch","do","rethrows","throw","throws","try","didSet","get","set","willSet",
                          "assignment","associativity","infix","left","none","operator","postfix","precedence","precedencegroup","prefix","right",
                          "Any","AnyObject","Type","dynamicType","Self","Protocol","__COLUMN__","__FILE__","__FUNCTION__","__LINE__"])
  var definingKeywords = wordSet(["var","let","class","enum","extension","import","protocol","struct","func","typealias","associatedtype","for"])
  var atoms = wordSet(["true","false","nil","self","super","_"])
  var types = wordSet(["Array","Bool","Character","Dictionary","Double","Float","Int","Int8","Int16","Int32","Int64","Never","Optional","Set","String",
                       "UInt8","UInt16","UInt32","UInt64","Void"])
  var operators = "+-/*%=|&<>~^?!"
  var punc = ":;,.(){}[]"
  var binary = /^\-?0b[01][01_]*/
  var octal = /^\-?0o[0-7][0-7_]*/
  var hexadecimal = /^\-?0x[\dA-Fa-f][\dA-Fa-f_]*(?:(?:\.[\dA-Fa-f][\dA-Fa-f_]*)?[Pp]\-?\d[\d_]*)?/
  var decimal = /^\-?\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee]\-?\d[\d_]*)?/
  var identifier = /^\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1/
  var property = /^\.(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/
  var instruction = /^\#[A-Za-z]+/
  var attribute = /^@(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/
  //var regexp = /^\/(?!\s)(?:\/\/)?(?:\\.|[^\/])+\//

  function tokenBase(stream, state, prev) {
    if (stream.sol()) state.indented = stream.indentation()
    if (stream.eatSpace()) return null

    var ch = stream.peek()
    if (ch == "/") {
      if (stream.match("//")) {
        stream.skipToEnd()
        return "comment"
      }
      if (stream.match("/*")) {
        state.tokenize.push(tokenComment)
        return tokenComment(stream, state)
      }
    }
    if (stream.match(instruction)) return "builtin"
    if (stream.match(attribute)) return "attribute"
    if (stream.match(binary)) return "number"
    if (stream.match(octal)) return "number"
    if (stream.match(hexadecimal)) return "number"
    if (stream.match(decimal)) return "number"
    if (stream.match(property)) return "property"
    if (operators.indexOf(ch) > -1) {
      stream.next()
      return "operator"
    }
    if (punc.indexOf(ch) > -1) {
      stream.next()
      stream.match("..")
      return "punctuation"
    }
    var stringMatch
    if (stringMatch = stream.match(/("""|"|')/)) {
      var tokenize = tokenString.bind(null, stringMatch[0])
      state.tokenize.push(tokenize)
      return tokenize(stream, state)
    }

    if (stream.match(identifier)) {
      var ident = stream.current()
      if (types.hasOwnProperty(ident)) return "variable-2"
      if (atoms.hasOwnProperty(ident)) return "atom"
      if (keywords.hasOwnProperty(ident)) {
        if (definingKeywords.hasOwnProperty(ident))
          state.prev = "define"
        return "keyword"
      }
      if (prev == "define") return "def"
      return "variable"
    }

    stream.next()
    return null
  }

  function tokenUntilClosingParen() {
    var depth = 0
    return function(stream, state, prev) {
      var inner = tokenBase(stream, state, prev)
      if (inner == "punctuation") {
        if (stream.current() == "(") ++depth
        else if (stream.current() == ")") {
          if (depth == 0) {
            stream.backUp(1)
            state.tokenize.pop()
            return state.tokenize[state.tokenize.length - 1](stream, state)
          }
          else --depth
        }
      }
      return inner
    }
  }

  function tokenString(openQuote, stream, state) {
    var singleLine = openQuote.length == 1
    var ch, escaped = false
    while (ch = stream.peek()) {
      if (escaped) {
        stream.next()
        if (ch == "(") {
          state.tokenize.push(tokenUntilClosingParen())
          return "string"
        }
        escaped = false
      } else if (stream.match(openQuote)) {
        state.tokenize.pop()
        return "string"
      } else {
        stream.next()
        escaped = ch == "\\"
      }
    }
    if (singleLine) {
      state.tokenize.pop()
    }
    return "string"
  }

  function tokenComment(stream, state) {
    var ch
    while (true) {
      stream.match(/^[^/*]+/, true)
      ch = stream.next()
      if (!ch) break
      if (ch === "/" && stream.eat("*")) {
        state.tokenize.push(tokenComment)
      } else if (ch === "*" && stream.eat("/")) {
        state.tokenize.pop()
      }
    }
    return "comment"
  }

  function Context(prev, align, indented) {
    this.prev = prev
    this.align = align
    this.indented = indented
  }

  function pushContext(state, stream) {
    var align = stream.match(/^\s*($|\/[\/\*])/, false) ? null : stream.column() + 1
    state.context = new Context(state.context, align, state.indented)
  }

  function popContext(state) {
    if (state.context) {
      state.indented = state.context.indented
      state.context = state.context.prev
    }
  }

  CodeMirror.defineMode("swift", function(config) {
    return {
      startState: function() {
        return {
          prev: null,
          context: null,
          indented: 0,
          tokenize: []
        }
      },

      token: function(stream, state) {
        var prev = state.prev
        state.prev = null
        var tokenize = state.tokenize[state.tokenize.length - 1] || tokenBase
        var style = tokenize(stream, state, prev)
        if (!style || style == "comment") state.prev = prev
        else if (!state.prev) state.prev = style

        if (style == "punctuation") {
          var bracket = /[\(\[\{]|([\]\)\}])/.exec(stream.current())
          if (bracket) (bracket[1] ? popContext : pushContext)(state, stream)
        }

        return style
      },

      indent: function(state, textAfter) {
        var cx = state.context
        if (!cx) return 0
        var closing = /^[\]\}\)]/.test(textAfter)
        if (cx.align != null) return cx.align - (closing ? 1 : 0)
        return cx.indented + (closing ? 0 : config.indentUnit)
      },

      electricInput: /^\s*[\)\}\]]$/,

      lineComment: "//",
      blockCommentStart: "/*",
      blockCommentEnd: "*/",
      fold: "brace",
      closeBrackets: "()[]{}''\"\"``"
    }
  })

  CodeMirror.defineMIME("text/x-swift","swift")
});


/***/ }),

/***/ "c1ac":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__("ebb5");
var $filter = __webpack_require__("b727").filter;
var speciesConstructor = __webpack_require__("4840");

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

// `%TypedArray%.prototype.filter` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.filter
exportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) {
  var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  var C = speciesConstructor(this, this.constructor);
  var index = 0;
  var length = list.length;
  var result = new (aTypedArrayConstructor(C))(length);
  while (length > index) result[index] = list[index++];
  return result;
});


/***/ }),

/***/ "c284":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("944a");

__webpack_require__("99af");

__webpack_require__("c975");

__webpack_require__("d81d");

__webpack_require__("b0c0");

__webpack_require__("0c47");

__webpack_require__("23dc");

__webpack_require__("a9e3");

__webpack_require__("b680");

__webpack_require__("d3b7");

var _typeof = __webpack_require__("7037");

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

  /******/

  /******/
  // Load entry module and return exports

  /******/

  return __webpack_require__(__webpack_require__.s = 119);
  /******/
}(
/************************************************************************/

/******/
{
  /***/
  0:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";
    /* harmony export (binding) */

    __webpack_require__.d(__webpack_exports__, "a", function () {
      return normalizeComponent;
    });
    /* globals __VUE_SSR_CONTEXT__ */
    // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
    // This module is a runtime utility for cleaner component module output and will
    // be included in the final webpack user bundle.


    function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier,
    /* server only */
    shadowMode
    /* vue-cli only */
    ) {
      // Vue.extend constructor export interop
      var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports; // render functions

      if (render) {
        options.render = render;
        options.staticRenderFns = staticRenderFns;
        options._compiled = true;
      } // functional template


      if (functionalTemplate) {
        options.functional = true;
      } // scopedId


      if (scopeId) {
        options._scopeId = 'data-v-' + scopeId;
      }

      var hook;

      if (moduleIdentifier) {
        // server build
        hook = function hook(context) {
          // 2.3 injection
          context = context || // cached call
          this.$vnode && this.$vnode.ssrContext || // stateful
          this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
          // 2.2 with runInNewContext: true

          if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
            context = __VUE_SSR_CONTEXT__;
          } // inject component styles


          if (injectStyles) {
            injectStyles.call(this, context);
          } // register component module identifier for async chunk inferrence


          if (context && context._registeredComponents) {
            context._registeredComponents.add(moduleIdentifier);
          }
        }; // used by ssr in case component is cached and beforeCreate
        // never gets called


        options._ssrRegister = hook;
      } else if (injectStyles) {
        hook = shadowMode ? function () {
          injectStyles.call(this, this.$root.$options.shadowRoot);
        } : injectStyles;
      }

      if (hook) {
        if (options.functional) {
          // for template-only hot-reload because in that case the render fn doesn't
          // go through the normalizer
          options._injectStyles = hook; // register for functioal component in vue file

          var originalRender = options.render;

          options.render = function renderWithStyleInjection(h, context) {
            hook.call(context);
            return originalRender(h, context);
          };
        } else {
          // inject component registration as beforeCreate hook
          var existing = options.beforeCreate;
          options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
        }
      }

      return {
        exports: scriptExports,
        options: options
      };
    }
    /***/

  },

  /***/
  119:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/progress/src/progress.vue?vue&type=template&id=229ee406&


    var render = function render() {
      var _vm = this;

      var _h = _vm.$createElement;

      var _c = _vm._self._c || _h;

      return _c("div", {
        staticClass: "el-progress",
        class: ["el-progress--" + _vm.type, _vm.status ? "is-" + _vm.status : "", {
          "el-progress--without-text": !_vm.showText,
          "el-progress--text-inside": _vm.textInside
        }],
        attrs: {
          role: "progressbar",
          "aria-valuenow": _vm.percentage,
          "aria-valuemin": "0",
          "aria-valuemax": "100"
        }
      }, [_vm.type === "line" ? _c("div", {
        staticClass: "el-progress-bar"
      }, [_c("div", {
        staticClass: "el-progress-bar__outer",
        style: {
          height: _vm.strokeWidth + "px"
        }
      }, [_c("div", {
        staticClass: "el-progress-bar__inner",
        style: _vm.barStyle
      }, [_vm.showText && _vm.textInside ? _c("div", {
        staticClass: "el-progress-bar__innerText"
      }, [_vm._v(_vm._s(_vm.content))]) : _vm._e()])])]) : _c("div", {
        staticClass: "el-progress-circle",
        style: {
          height: _vm.width + "px",
          width: _vm.width + "px"
        }
      }, [_c("svg", {
        attrs: {
          viewBox: "0 0 100 100"
        }
      }, [_c("path", {
        staticClass: "el-progress-circle__track",
        style: _vm.trailPathStyle,
        attrs: {
          d: _vm.trackPath,
          stroke: "#e5e9f2",
          "stroke-width": _vm.relativeStrokeWidth,
          fill: "none"
        }
      }), _c("path", {
        staticClass: "el-progress-circle__path",
        style: _vm.circlePathStyle,
        attrs: {
          d: _vm.trackPath,
          stroke: _vm.stroke,
          fill: "none",
          "stroke-linecap": _vm.strokeLinecap,
          "stroke-width": _vm.percentage ? _vm.relativeStrokeWidth : 0
        }
      })])]), _vm.showText && !_vm.textInside ? _c("div", {
        staticClass: "el-progress__text",
        style: {
          fontSize: _vm.progressTextSize + "px"
        }
      }, [!_vm.status ? [_vm._v(_vm._s(_vm.content))] : _c("i", {
        class: _vm.iconClass
      })], 2) : _vm._e()]);
    };

    var staticRenderFns = [];
    render._withStripped = true; // CONCATENATED MODULE: ./packages/progress/src/progress.vue?vue&type=template&id=229ee406&
    // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/progress/src/progress.vue?vue&type=script&lang=js&
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //

    /* harmony default export */

    var progressvue_type_script_lang_js_ = {
      name: 'ElProgress',
      props: {
        type: {
          type: String,
          default: 'line',
          validator: function validator(val) {
            return ['line', 'circle', 'dashboard'].indexOf(val) > -1;
          }
        },
        percentage: {
          type: Number,
          default: 0,
          required: true,
          validator: function validator(val) {
            return val >= 0 && val <= 100;
          }
        },
        status: {
          type: String,
          validator: function validator(val) {
            return ['success', 'exception', 'warning'].indexOf(val) > -1;
          }
        },
        strokeWidth: {
          type: Number,
          default: 6
        },
        strokeLinecap: {
          type: String,
          default: 'round'
        },
        textInside: {
          type: Boolean,
          default: false
        },
        width: {
          type: Number,
          default: 126
        },
        showText: {
          type: Boolean,
          default: true
        },
        color: {
          type: [String, Array, Function],
          default: ''
        },
        format: Function
      },
      computed: {
        barStyle: function barStyle() {
          var style = {};
          style.width = this.percentage + '%';
          style.backgroundColor = this.getCurrentColor(this.percentage);
          return style;
        },
        relativeStrokeWidth: function relativeStrokeWidth() {
          return (this.strokeWidth / this.width * 100).toFixed(1);
        },
        radius: function radius() {
          if (this.type === 'circle' || this.type === 'dashboard') {
            return parseInt(50 - parseFloat(this.relativeStrokeWidth) / 2, 10);
          } else {
            return 0;
          }
        },
        trackPath: function trackPath() {
          var radius = this.radius;
          var isDashboard = this.type === 'dashboard';
          return '\n        M 50 50\n        m 0 ' + (isDashboard ? '' : '-') + radius + '\n        a ' + radius + ' ' + radius + ' 0 1 1 0 ' + (isDashboard ? '-' : '') + radius * 2 + '\n        a ' + radius + ' ' + radius + ' 0 1 1 0 ' + (isDashboard ? '' : '-') + radius * 2 + '\n        ';
        },
        perimeter: function perimeter() {
          return 2 * Math.PI * this.radius;
        },
        rate: function rate() {
          return this.type === 'dashboard' ? 0.75 : 1;
        },
        strokeDashoffset: function strokeDashoffset() {
          var offset = -1 * this.perimeter * (1 - this.rate) / 2;
          return offset + 'px';
        },
        trailPathStyle: function trailPathStyle() {
          return {
            strokeDasharray: this.perimeter * this.rate + 'px, ' + this.perimeter + 'px',
            strokeDashoffset: this.strokeDashoffset
          };
        },
        circlePathStyle: function circlePathStyle() {
          return {
            strokeDasharray: this.perimeter * this.rate * (this.percentage / 100) + 'px, ' + this.perimeter + 'px',
            strokeDashoffset: this.strokeDashoffset,
            transition: 'stroke-dasharray 0.6s ease 0s, stroke 0.6s ease'
          };
        },
        stroke: function stroke() {
          var ret = void 0;

          if (this.color) {
            ret = this.getCurrentColor(this.percentage);
          } else {
            switch (this.status) {
              case 'success':
                ret = '#13ce66';
                break;

              case 'exception':
                ret = '#ff4949';
                break;

              case 'warning':
                ret = '#e6a23c';
                break;

              default:
                ret = '#20a0ff';
            }
          }

          return ret;
        },
        iconClass: function iconClass() {
          if (this.status === 'warning') {
            return 'el-icon-warning';
          }

          if (this.type === 'line') {
            return this.status === 'success' ? 'el-icon-circle-check' : 'el-icon-circle-close';
          } else {
            return this.status === 'success' ? 'el-icon-check' : 'el-icon-close';
          }
        },
        progressTextSize: function progressTextSize() {
          return this.type === 'line' ? 12 + this.strokeWidth * 0.4 : this.width * 0.111111 + 2;
        },
        content: function content() {
          if (typeof this.format === 'function') {
            return this.format(this.percentage) || '';
          } else {
            return this.percentage + '%';
          }
        }
      },
      methods: {
        getCurrentColor: function getCurrentColor(percentage) {
          if (typeof this.color === 'function') {
            return this.color(percentage);
          } else if (typeof this.color === 'string') {
            return this.color;
          } else {
            return this.getLevelColor(percentage);
          }
        },
        getLevelColor: function getLevelColor(percentage) {
          var colorArray = this.getColorArray().sort(function (a, b) {
            return a.percentage - b.percentage;
          });

          for (var i = 0; i < colorArray.length; i++) {
            if (colorArray[i].percentage > percentage) {
              return colorArray[i].color;
            }
          }

          return colorArray[colorArray.length - 1].color;
        },
        getColorArray: function getColorArray() {
          var color = this.color;
          var span = 100 / color.length;
          return color.map(function (seriesColor, index) {
            if (typeof seriesColor === 'string') {
              return {
                color: seriesColor,
                progress: (index + 1) * span
              };
            }

            return seriesColor;
          });
        }
      }
    }; // CONCATENATED MODULE: ./packages/progress/src/progress.vue?vue&type=script&lang=js&

    /* harmony default export */

    var src_progressvue_type_script_lang_js_ = progressvue_type_script_lang_js_; // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js

    var componentNormalizer = __webpack_require__(0); // CONCATENATED MODULE: ./packages/progress/src/progress.vue

    /* normalize component */


    var component = Object(componentNormalizer["a"
    /* default */
    ])(src_progressvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null);
    /* hot reload */

    if (false) { var api; }

    component.options.__file = "packages/progress/src/progress.vue";
    /* harmony default export */

    var progress = component.exports; // CONCATENATED MODULE: ./packages/progress/index.js

    /* istanbul ignore next */

    progress.install = function (Vue) {
      Vue.component(progress.name, progress);
    };
    /* harmony default export */


    var packages_progress = __webpack_exports__["default"] = progress;
    /***/
  }
  /******/

});

/***/ }),

/***/ "c2a2":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "c345":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");

// Headers whose duplicates are ignored by node
// c.f. https://nodejs.org/api/http.html#http_message_headers
var ignoreDuplicateOf = [
  'age', 'authorization', 'content-length', 'content-type', 'etag',
  'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
  'last-modified', 'location', 'max-forwards', 'proxy-authorization',
  'referer', 'retry-after', 'user-agent'
];

/**
 * Parse headers into an object
 *
 * ```
 * Date: Wed, 27 Aug 2014 08:58:49 GMT
 * Content-Type: application/json
 * Connection: keep-alive
 * Transfer-Encoding: chunked
 * ```
 *
 * @param {String} headers Headers needing to be parsed
 * @returns {Object} Headers parsed into an object
 */
module.exports = function parseHeaders(headers) {
  var parsed = {};
  var key;
  var val;
  var i;

  if (!headers) { return parsed; }

  utils.forEach(headers.split('\n'), function parser(line) {
    i = line.indexOf(':');
    key = utils.trim(line.substr(0, i)).toLowerCase();
    val = utils.trim(line.substr(i + 1));

    if (key) {
      if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
        return;
      }
      if (key === 'set-cookie') {
        parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
      } else {
        parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
      }
    }
  });

  return parsed;
};


/***/ }),

/***/ "c35a":
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__("23e7");
var parseFloat = __webpack_require__("7e12");

// `Number.parseFloat` method
// https://tc39.github.io/ecma262/#sec-number.parseFloat
$({ target: 'Number', stat: true, forced: Number.parseFloat != parseFloat }, {
  parseFloat: parseFloat
});


/***/ }),

/***/ "c401":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");

/**
 * Transform the data for a request or a response
 *
 * @param {Object|String} data The data to be transformed
 * @param {Array} headers The headers for the request or response
 * @param {Array|Function} fns A single function or Array of functions
 * @returns {*} The resulting transformed data
 */
module.exports = function transformData(data, headers, fns) {
  /*eslint no-param-reassign:0*/
  utils.forEach(fns, function transform(fn) {
    data = fn(data, headers);
  });

  return data;
};


/***/ }),

/***/ "c430":
/***/ (function(module, exports) {

module.exports = false;


/***/ }),

/***/ "c532":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var bind = __webpack_require__("1d2b");

/*global toString:true*/

// utils is a library of generic helper functions non-specific to axios

var toString = Object.prototype.toString;

/**
 * Determine if a value is an Array
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is an Array, otherwise false
 */
function isArray(val) {
  return toString.call(val) === '[object Array]';
}

/**
 * Determine if a value is undefined
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if the value is undefined, otherwise false
 */
function isUndefined(val) {
  return typeof val === 'undefined';
}

/**
 * Determine if a value is a Buffer
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a Buffer, otherwise false
 */
function isBuffer(val) {
  return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
    && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
}

/**
 * Determine if a value is an ArrayBuffer
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is an ArrayBuffer, otherwise false
 */
function isArrayBuffer(val) {
  return toString.call(val) === '[object ArrayBuffer]';
}

/**
 * Determine if a value is a FormData
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is an FormData, otherwise false
 */
function isFormData(val) {
  return (typeof FormData !== 'undefined') && (val instanceof FormData);
}

/**
 * Determine if a value is a view on an ArrayBuffer
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
 */
function isArrayBufferView(val) {
  var result;
  if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
    result = ArrayBuffer.isView(val);
  } else {
    result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
  }
  return result;
}

/**
 * Determine if a value is a String
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a String, otherwise false
 */
function isString(val) {
  return typeof val === 'string';
}

/**
 * Determine if a value is a Number
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a Number, otherwise false
 */
function isNumber(val) {
  return typeof val === 'number';
}

/**
 * Determine if a value is an Object
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is an Object, otherwise false
 */
function isObject(val) {
  return val !== null && typeof val === 'object';
}

/**
 * Determine if a value is a plain Object
 *
 * @param {Object} val The value to test
 * @return {boolean} True if value is a plain Object, otherwise false
 */
function isPlainObject(val) {
  if (toString.call(val) !== '[object Object]') {
    return false;
  }

  var prototype = Object.getPrototypeOf(val);
  return prototype === null || prototype === Object.prototype;
}

/**
 * Determine if a value is a Date
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a Date, otherwise false
 */
function isDate(val) {
  return toString.call(val) === '[object Date]';
}

/**
 * Determine if a value is a File
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a File, otherwise false
 */
function isFile(val) {
  return toString.call(val) === '[object File]';
}

/**
 * Determine if a value is a Blob
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a Blob, otherwise false
 */
function isBlob(val) {
  return toString.call(val) === '[object Blob]';
}

/**
 * Determine if a value is a Function
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a Function, otherwise false
 */
function isFunction(val) {
  return toString.call(val) === '[object Function]';
}

/**
 * Determine if a value is a Stream
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a Stream, otherwise false
 */
function isStream(val) {
  return isObject(val) && isFunction(val.pipe);
}

/**
 * Determine if a value is a URLSearchParams object
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a URLSearchParams object, otherwise false
 */
function isURLSearchParams(val) {
  return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
}

/**
 * Trim excess whitespace off the beginning and end of a string
 *
 * @param {String} str The String to trim
 * @returns {String} The String freed of excess whitespace
 */
function trim(str) {
  return str.replace(/^\s*/, '').replace(/\s*$/, '');
}

/**
 * Determine if we're running in a standard browser environment
 *
 * This allows axios to run in a web worker, and react-native.
 * Both environments support XMLHttpRequest, but not fully standard globals.
 *
 * web workers:
 *  typeof window -> undefined
 *  typeof document -> undefined
 *
 * react-native:
 *  navigator.product -> 'ReactNative'
 * nativescript
 *  navigator.product -> 'NativeScript' or 'NS'
 */
function isStandardBrowserEnv() {
  if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
                                           navigator.product === 'NativeScript' ||
                                           navigator.product === 'NS')) {
    return false;
  }
  return (
    typeof window !== 'undefined' &&
    typeof document !== 'undefined'
  );
}

/**
 * Iterate over an Array or an Object invoking a function for each item.
 *
 * If `obj` is an Array callback will be called passing
 * the value, index, and complete array for each item.
 *
 * If 'obj' is an Object callback will be called passing
 * the value, key, and complete object for each property.
 *
 * @param {Object|Array} obj The object to iterate
 * @param {Function} fn The callback to invoke for each item
 */
function forEach(obj, fn) {
  // Don't bother if no value provided
  if (obj === null || typeof obj === 'undefined') {
    return;
  }

  // Force an array if not already something iterable
  if (typeof obj !== 'object') {
    /*eslint no-param-reassign:0*/
    obj = [obj];
  }

  if (isArray(obj)) {
    // Iterate over array values
    for (var i = 0, l = obj.length; i < l; i++) {
      fn.call(null, obj[i], i, obj);
    }
  } else {
    // Iterate over object keys
    for (var key in obj) {
      if (Object.prototype.hasOwnProperty.call(obj, key)) {
        fn.call(null, obj[key], key, obj);
      }
    }
  }
}

/**
 * Accepts varargs expecting each argument to be an object, then
 * immutably merges the properties of each object and returns result.
 *
 * When multiple objects contain the same key the later object in
 * the arguments list will take precedence.
 *
 * Example:
 *
 * ```js
 * var result = merge({foo: 123}, {foo: 456});
 * console.log(result.foo); // outputs 456
 * ```
 *
 * @param {Object} obj1 Object to merge
 * @returns {Object} Result of all merge properties
 */
function merge(/* obj1, obj2, obj3, ... */) {
  var result = {};
  function assignValue(val, key) {
    if (isPlainObject(result[key]) && isPlainObject(val)) {
      result[key] = merge(result[key], val);
    } else if (isPlainObject(val)) {
      result[key] = merge({}, val);
    } else if (isArray(val)) {
      result[key] = val.slice();
    } else {
      result[key] = val;
    }
  }

  for (var i = 0, l = arguments.length; i < l; i++) {
    forEach(arguments[i], assignValue);
  }
  return result;
}

/**
 * Extends object a by mutably adding to it the properties of object b.
 *
 * @param {Object} a The object to be extended
 * @param {Object} b The object to copy properties from
 * @param {Object} thisArg The object to bind function to
 * @return {Object} The resulting value of object a
 */
function extend(a, b, thisArg) {
  forEach(b, function assignValue(val, key) {
    if (thisArg && typeof val === 'function') {
      a[key] = bind(val, thisArg);
    } else {
      a[key] = val;
    }
  });
  return a;
}

/**
 * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
 *
 * @param {string} content with BOM
 * @return {string} content value without BOM
 */
function stripBOM(content) {
  if (content.charCodeAt(0) === 0xFEFF) {
    content = content.slice(1);
  }
  return content;
}

module.exports = {
  isArray: isArray,
  isArrayBuffer: isArrayBuffer,
  isBuffer: isBuffer,
  isFormData: isFormData,
  isArrayBufferView: isArrayBufferView,
  isString: isString,
  isNumber: isNumber,
  isObject: isObject,
  isPlainObject: isPlainObject,
  isUndefined: isUndefined,
  isDate: isDate,
  isFile: isFile,
  isBlob: isBlob,
  isFunction: isFunction,
  isStream: isStream,
  isURLSearchParams: isURLSearchParams,
  isStandardBrowserEnv: isStandardBrowserEnv,
  forEach: forEach,
  merge: merge,
  extend: extend,
  trim: trim,
  stripBOM: stripBOM
};


/***/ }),

/***/ "c56a":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

exports.default = function (instance, callback) {
  var speed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;
  var once = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  if (!instance || !callback) throw new Error('instance & callback is required');
  var called = false;

  var afterLeaveCallback = function afterLeaveCallback() {
    if (called) return;
    called = true;

    if (callback) {
      callback.apply(null, arguments);
    }
  };

  if (once) {
    instance.$once('after-leave', afterLeaveCallback);
  } else {
    instance.$on('after-leave', afterLeaveCallback);
  }

  setTimeout(function () {
    afterLeaveCallback();
  }, speed + 100);
};

;
/**
 * Bind after-leave event for vue instance. Make sure after-leave is called in any browsers.
 *
 * @param {Vue} instance Vue instance.
 * @param {Function} callback callback of after-leave event
 * @param {Number} speed the speed of transition, default value is 300ms
 * @param {Boolean} once weather bind after-leave once. default value is false.
 */

/***/ }),

/***/ "c64e":
/***/ (function(module, exports, __webpack_require__) {

var rng = __webpack_require__("e1f4");
var bytesToUuid = __webpack_require__("2366");

function v4(options, buf, offset) {
  var i = buf && offset || 0;

  if (typeof(options) == 'string') {
    buf = options === 'binary' ? new Array(16) : null;
    options = null;
  }
  options = options || {};

  var rnds = options.random || (options.rng || rng)();

  // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
  rnds[6] = (rnds[6] & 0x0f) | 0x40;
  rnds[8] = (rnds[8] & 0x3f) | 0x80;

  // Copy bytes to buffer, if provided
  if (buf) {
    for (var ii = 0; ii < 16; ++ii) {
      buf[i + ii] = rnds[ii];
    }
  }

  return buf || bytesToUuid(rnds);
}

module.exports = v4;


/***/ }),

/***/ "c682":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_footer_vue_vue_type_style_index_0_id_49a58776_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6fb9");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_footer_vue_vue_type_style_index_0_id_49a58776_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_footer_vue_vue_type_style_index_0_id_49a58776_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_footer_vue_vue_type_style_index_0_id_49a58776_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "c6b6":
/***/ (function(module, exports) {

var toString = {}.toString;

module.exports = function (it) {
  return toString.call(it).slice(8, -1);
};


/***/ }),

/***/ "c6cd":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var setGlobal = __webpack_require__("ce4e");

var SHARED = '__core-js_shared__';
var store = global[SHARED] || setGlobal(SHARED, {});

module.exports = store;


/***/ }),

/***/ "c72d":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("4de4");
/* harmony import */ var core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("a15b");
/* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_array_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("d81d");
/* harmony import */ var core_js_modules_es_array_map__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_array_splice__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("a434");
/* harmony import */ var core_js_modules_es_array_splice__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_splice__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_object_assign__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("cca6");
/* harmony import */ var core_js_modules_es_object_assign__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_assign__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("ac1f");
/* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("1276");
/* harmony import */ var core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _Users_sunlh_idea_workspace_aws6_vue_aws_awsui_vue_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("2909");








//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["a"] = ({
  name: "AwsuiAddress",
  props: {
    // 处理v-model
    value: String,
    readonly: {
      type: Boolean,
      default: false
    },
    disabled: {
      type: Boolean,
      default: false
    },
    //地址簿的配置项
    config: {
      type: String,
      default: function _default() {
        return "";
      }
    },
    // sessionId
    sid: {
      type: String,
      default: ""
    },
    //appId
    appId: {
      type: String,
      default: ""
    },
    // addressDomId
    addressDomId: {
      type: String,
      default: ""
    },
    formData: {
      type: String,
      default: ""
    }
  },
  data: function data() {
    return {
      addressValue: [],
      dialogVisible: false,
      // 存储以什么格式返回给组件的v-model
      configFormat: " ",
      // 弹框标题
      dialogTitle: "",
      paramsValue: {
        url: this.getPath(),
        data: {
          sid: "",
          appId: "",
          addressConfig: "",
          addressDomId: "",
          value: "",
          formData: ""
        },
        height: "99%"
      },
      otherDiaConfirm: null,
      // 默认配置
      defaultAddressConfig: {
        filter: {
          addressType: "user",
          isAdvMode: true,
          addressSetting: {
            range: "department|role|team",
            delimiter: " ",
            choiceType: "single",
            leafType: "user"
          },
          sourceField: "",
          targetField: "address1_1",
          deptTargetField: ""
        },
        separator: " ",
        valueType: 0
      },
      passConfig: {}
    };
  },
  watch: {
    readonly: function readonly() {
      if (this.readonly === true) {
        this.$refs.awsuiAddress.style.border = "none";
      } else {
        this.$refs.awsuiAddress.style.border = "1px solid #ccc";
      }
    },
    disabled: function disabled() {
      if (this.readonly === true) {
        this.$refs.awsuiAddress.style.border = "none";
      } else {
        this.$refs.awsuiAddress.style.border = "1px solid #ccc";
      }
    },
    config: {
      handler: function handler() {
        this.changeConfigType(this.config);
      },
      immediate: true
    } // 处理v-model
    // value: {
    //   handler() {
    //     if(this.value.length!==0){
    //       this.getNameByValue(this.value);
    //     }
    //   },
    //   immediate: true,
    // }

  },
  computed: {
    delComputed: function delComputed() {
      if (this.addressValue.length === 0) {
        return false;
      }

      return true;
    },
    dialogOnce: function dialogOnce() {
      return window.atAddressOnce == null;
    }
  },
  created: function created() {
    if (this.value.length != 0) {
      this.getNameByValue(this.value);
    }
  },
  methods: {
    // 初始化页面
    getNameByValue: function getNameByValue(value) {
      var _this = this;

      var params = {
        url: "jd",
        data: {
          sid: this.sid,
          appId: this.appId,
          cmd: "CLIENT_AWSUI_ADDRESS_VALUE",
          address: JSON.stringify(this.getDefaultConfig()),
          addressDomId: this.addressDomId,
          formData: this.formData,
          value: value
        }
      };
      this.awsuiaxios.post(params).then(function (res) {
        if (res.result == "ok") {
          var newAry = _this.findValue(res.data.data);

          if (newAry.length != 0) {
            _this.addressValue = newAry;
          }
        }
      });
    },
    findValue: function findValue(inner) {
      var examDiv = document.createElement("div");
      examDiv.innerHTML = inner;
      var ary = examDiv.getElementsByClassName("awsui-user-profile");
      ary = Object(_Users_sunlh_idea_workspace_aws6_vue_aws_awsui_vue_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(ary);
      return ary.map(function (item) {
        return item.innerText;
      });
    },
    getDefaultConfig: function getDefaultConfig() {
      var that = this;
      var mergeConfig = {};
      var mergeFilter = {};
      var mergeAddress = {}; // 给与filter同级的赋默认值

      mergeConfig = Object.assign(mergeConfig, that.defaultAddressConfig, that.passConfig); // 给filter赋默认值

      mergeFilter = Object.assign(mergeFilter, that.defaultAddressConfig.filter, that.passConfig.filter); // 给addressSetting赋默认值

      if (that.passConfig.filter.addressSetting !== undefined) {
        mergeAddress = Object.assign(mergeAddress, that.defaultAddressConfig.filter.addressSetting, that.passConfig.filter.addressSetting);
      } else {
        mergeAddress = that.defaultAddressConfig.filter.addressSetting;
      }

      mergeFilter.addressSetting = mergeAddress;
      mergeConfig.filter = mergeFilter;
      return mergeConfig;
    },
    getAllConfig: function getAllConfig() {
      var ParamsObj = {
        sid: this.sid,
        appId: this.appId,
        cmd: "CLIENT_AWSUI_ADDRESSBOOK",
        address: JSON.stringify(this.getDefaultConfig()),
        addressDomId: this.addressDomId,
        formData: this.formData,
        value: this.value
      };
      return ParamsObj;
    },
    changeConfigType: function changeConfigType(con) {
      if (typeof con == "string") {
        var obj;

        if (con.length != "0") {
          obj = JSON.parse(con);
        } else {
          obj = {};
        }

        if (obj.filter === undefined) {
          this.passConfig.filter = obj;
        } else {
          this.passConfig = obj;
        } // 以什么格式存储value值
        // this.configFormat= obj.filter.addressSetting !==undefined? obj.filter.addressSetting.delimiter:obj.separator;


        this.configFormat = this.getDefaultConfig().filter.addressSetting.delimiter; // 弹框标题

        this.dialogTitle = this.getDefaultConfig().filter.addressType == "dept" ? "部门" : "人员";
      }
    },
    getPath: function getPath() {
      return eval("axiosBaseUrl") + "w"; // "/AWSDEVURL/r/w"
    },
    // 删除所有
    delAll: function delAll() {
      this.addressValue = [];
      this.paramsValue.data.value = "";
      this.$emit("input", "");
      this.$emit("change", "");
    },
    // 单个选项的删除按钮
    delsingle: function delsingle(id, index) {
      this.addressValue = this.addressValue.filter(function (item) {
        return item !== id;
      });
      var ary = this.value.split(this.configFormat);
      ary.splice(index, 1);
      this.$emit("input", ary.join(this.configFormat));
      this.$emit("change", ary.join(this.configFormat));
    },
    // 地址簿按钮
    openDialog: function openDialog(otherParamsObj, otherDiaConfirm) {
      // otherDiaConfirm保存自己的方法
      this.otherDiaConfirm = otherDiaConfirm == null ? this.diaConfirm : otherDiaConfirm;

      if (window.atAddressOnce != null && window.atAddressOnce !== this) {
        window.atAddressOnce.openDialog(this.getAllConfig(), this.diaConfirm);
        return;
      }

      this.paramsValue.data = this.getAllConfig();

      if (otherParamsObj !== undefined) {
        this.paramsValue.data = otherParamsObj;
      }

      if (this.disabled !== true) {
        this.dialogVisible = true;
      }
    },
    // 弹框的确定按钮
    diaConfirm: function diaConfirm(data) {
      //点击的永远是第一个组件的确定按钮
      if (data != null) {
        //this 指向每一个组件自己
        var ary = data.gridValue.split(" "); //gridValue永远以空格隔开

        if (data.valueUids.length !== 0) {
          this.addressValue = ary;
        } else {
          this.addressValue = [];
        }

        this.$emit("input", data.valueUids.join(this.configFormat));
        this.$emit("change", data.valueUids.join(this.configFormat));
        return;
      }

      if (this.otherDiaConfirm) {
        var fn = this.otherDiaConfirm;
        this.otherDiaConfirm = null;
        fn(this.getValue());
        this.dialogVisible = false;
      }
    },
    getValue: function getValue() {
      return this.$refs.DialogAddress.getWin().getValue();
    },
    diaCancel: function diaCancel() {
      this.dialogVisible = false;
    },
    handleClose: function handleClose() {}
  },
  mounted: function mounted() {
    if (!window.atAddressOnce) {
      window.atAddressOnce = this;
    }
  },
  destroyed: function destroyed() {
    window.atAddressOnce = null;
  }
});

/***/ }),

/***/ "c7a6":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_color_picker_vue_vue_type_style_index_0_id_d6ca73fa_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f008");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_color_picker_vue_vue_type_style_index_0_id_d6ca73fa_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_color_picker_vue_vue_type_style_index_0_id_d6ca73fa_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_color_picker_vue_vue_type_style_index_0_id_d6ca73fa_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "c7cd":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var createHTML = __webpack_require__("857a");
var forcedStringHTMLMethod = __webpack_require__("af03");

// `String.prototype.fixed` method
// https://tc39.github.io/ecma262/#sec-string.prototype.fixed
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fixed') }, {
  fixed: function fixed() {
    return createHTML(this, 'tt', '', '');
  }
});


/***/ }),

/***/ "c7db":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "c861":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "c8af":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");

module.exports = function normalizeHeaderName(headers, normalizedName) {
  utils.forEach(headers, function processHeader(value, name) {
    if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
      headers[normalizedName] = value;
      delete headers[name];
    }
  });
};


/***/ }),

/***/ "c8ba":
/***/ (function(module, exports) {

var g;

// This works in non-strict mode
g = (function() {
	return this;
})();

try {
	// This works if eval is allowed (see CSP)
	g = g || new Function("return this")();
} catch (e) {
	// This works if the window reference is available
	if (typeof window === "object") g = window;
}

// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}

module.exports = g;


/***/ }),

/***/ "c8d2":
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__("d039");
var whitespaces = __webpack_require__("5899");

var non = '\u200B\u0085\u180E';

// check that a method works with the correct list
// of whitespaces and has a correct name
module.exports = function (METHOD_NAME) {
  return fails(function () {
    return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;
  });
};


/***/ }),

/***/ "c901":
/***/ (function(module, exports) {

// 7.2.1 RequireObjectCoercible(argument)
module.exports = function (it) {
  if (it == undefined) throw TypeError("Can't call method on  " + it);
  return it;
};


/***/ }),

/***/ "c96a":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var createHTML = __webpack_require__("857a");
var forcedStringHTMLMethod = __webpack_require__("af03");

// `String.prototype.small` method
// https://tc39.github.io/ecma262/#sec-string.prototype.small
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('small') }, {
  small: function small() {
    return createHTML(this, 'small', '', '');
  }
});


/***/ }),

/***/ "c975":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var $indexOf = __webpack_require__("4d64").indexOf;
var arrayMethodIsStrict = __webpack_require__("a640");
var arrayMethodUsesToLength = __webpack_require__("ae40");

var nativeIndexOf = [].indexOf;

var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
var STRICT_METHOD = arrayMethodIsStrict('indexOf');
var USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });

// `Array.prototype.indexOf` method
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
$({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD || !USES_TO_LENGTH }, {
  indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
    return NEGATIVE_ZERO
      // convert -0 to +0
      ? nativeIndexOf.apply(this, arguments) || 0
      : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),

/***/ "ca84":
/***/ (function(module, exports, __webpack_require__) {

var has = __webpack_require__("5135");
var toIndexedObject = __webpack_require__("fc6a");
var indexOf = __webpack_require__("4d64").indexOf;
var hiddenKeys = __webpack_require__("d012");

module.exports = function (object, names) {
  var O = toIndexedObject(object);
  var i = 0;
  var result = [];
  var key;
  for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
  // Don't enum bug & hidden keys
  while (names.length > i) if (has(O, key = names[i++])) {
    ~indexOf(result, key) || result.push(key);
  }
  return result;
};


/***/ }),

/***/ "ca91":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__("ebb5");
var $reduce = __webpack_require__("d58f").left;

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

// `%TypedArray%.prototype.reduce` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reduce
exportTypedArrayMethod('reduce', function reduce(callbackfn /* , initialValue */) {
  return $reduce(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
});


/***/ }),

/***/ "caad":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var $includes = __webpack_require__("4d64").includes;
var addToUnscopables = __webpack_require__("44d2");
var arrayMethodUsesToLength = __webpack_require__("ae40");

var USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });

// `Array.prototype.includes` method
// https://tc39.github.io/ecma262/#sec-array.prototype.includes
$({ target: 'Array', proto: true, forced: !USES_TO_LENGTH }, {
  includes: function includes(el /* , fromIndex = 0 */) {
    return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  }
});

// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('includes');


/***/ }),

/***/ "cb29":
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__("23e7");
var fill = __webpack_require__("81d5");
var addToUnscopables = __webpack_require__("44d2");

// `Array.prototype.fill` method
// https://tc39.github.io/ecma262/#sec-array.prototype.fill
$({ target: 'Array', proto: true }, {
  fill: fill
});

// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('fill');


/***/ }),

/***/ "cc12":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var isObject = __webpack_require__("861d");

var document = global.document;
// typeof document.createElement is 'object' in old IE
var EXISTS = isObject(document) && isObject(document.createElement);

module.exports = function (it) {
  return EXISTS ? document.createElement(it) : {};
};


/***/ }),

/***/ "cc15":
/***/ (function(module, exports, __webpack_require__) {

var store = __webpack_require__("b367")('wks');
var uid = __webpack_require__("8b1a");
var Symbol = __webpack_require__("ef08").Symbol;
var USE_SYMBOL = typeof Symbol == 'function';

var $exports = module.exports = function (name) {
  return store[name] || (store[name] =
    USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
};

$exports.store = store;


/***/ }),

/***/ "cca6":
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__("23e7");
var assign = __webpack_require__("60da");

// `Object.assign` method
// https://tc39.github.io/ecma262/#sec-object.assign
$({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
  assign: assign
});


/***/ }),

/***/ "cd26":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__("ebb5");

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var floor = Math.floor;

// `%TypedArray%.prototype.reverse` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reverse
exportTypedArrayMethod('reverse', function reverse() {
  var that = this;
  var length = aTypedArray(that).length;
  var middle = floor(length / 2);
  var index = 0;
  var value;
  while (index < middle) {
    value = that[index];
    that[index++] = that[--length];
    that[length] = value;
  } return that;
});


/***/ }),

/***/ "cdf9":
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__("825a");
var isObject = __webpack_require__("861d");
var newPromiseCapability = __webpack_require__("f069");

module.exports = function (C, x) {
  anObject(C);
  if (isObject(x) && x.constructor === C) return x;
  var promiseCapability = newPromiseCapability.f(C);
  var resolve = promiseCapability.resolve;
  resolve(x);
  return promiseCapability.promise;
};


/***/ }),

/***/ "ce4e":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var createNonEnumerableProperty = __webpack_require__("9112");

module.exports = function (key, value) {
  try {
    createNonEnumerableProperty(global, key, value);
  } catch (error) {
    global[key] = value;
  } return value;
};


/***/ }),

/***/ "ce7a":
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
var has = __webpack_require__("9c0e");
var toObject = __webpack_require__("0983");
var IE_PROTO = __webpack_require__("5a94")('IE_PROTO');
var ObjectProto = Object.prototype;

module.exports = Object.getPrototypeOf || function (O) {
  O = toObject(O);
  if (has(O, IE_PROTO)) return O[IE_PROTO];
  if (typeof O.constructor == 'function' && O instanceof O.constructor) {
    return O.constructor.prototype;
  } return O instanceof Object ? ObjectProto : null;
};


/***/ }),

/***/ "cee4":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");
var bind = __webpack_require__("1d2b");
var Axios = __webpack_require__("0a06");
var mergeConfig = __webpack_require__("4a7b");
var defaults = __webpack_require__("2444");

/**
 * Create an instance of Axios
 *
 * @param {Object} defaultConfig The default config for the instance
 * @return {Axios} A new instance of Axios
 */
function createInstance(defaultConfig) {
  var context = new Axios(defaultConfig);
  var instance = bind(Axios.prototype.request, context);

  // Copy axios.prototype to instance
  utils.extend(instance, Axios.prototype, context);

  // Copy context to instance
  utils.extend(instance, context);

  return instance;
}

// Create the default instance to be exported
var axios = createInstance(defaults);

// Expose Axios class to allow class inheritance
axios.Axios = Axios;

// Factory for creating new instances
axios.create = function create(instanceConfig) {
  return createInstance(mergeConfig(axios.defaults, instanceConfig));
};

// Expose Cancel & CancelToken
axios.Cancel = __webpack_require__("7a77");
axios.CancelToken = __webpack_require__("8df4");
axios.isCancel = __webpack_require__("2e67");

// Expose all/spread
axios.all = function all(promises) {
  return Promise.all(promises);
};
axios.spread = __webpack_require__("0df6");

module.exports = axios;

// Allow use of default import syntax in TypeScript
module.exports.default = axios;


/***/ }),

/***/ "cf11":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "d010":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


__webpack_require__("99af");

__webpack_require__("4160");

__webpack_require__("159b");

exports.__esModule = true;

function _broadcast(componentName, eventName, params) {
  this.$children.forEach(function (child) {
    var name = child.$options.componentName;

    if (name === componentName) {
      child.$emit.apply(child, [eventName].concat(params));
    } else {
      _broadcast.apply(child, [componentName, eventName].concat([params]));
    }
  });
}

exports.default = {
  methods: {
    dispatch: function dispatch(componentName, eventName, params) {
      var parent = this.$parent || this.$root;
      var name = parent.$options.componentName;

      while (parent && (!name || name !== componentName)) {
        parent = parent.$parent;

        if (parent) {
          name = parent.$options.componentName;
        }
      }

      if (parent) {
        parent.$emit.apply(parent, [eventName].concat(params));
      }
    },
    broadcast: function broadcast(componentName, eventName, params) {
      _broadcast.call(this, componentName, eventName, params);
    }
  }
};

/***/ }),

/***/ "d012":
/***/ (function(module, exports) {

module.exports = {};


/***/ }),

/***/ "d039":
/***/ (function(module, exports) {

module.exports = function (exec) {
  try {
    return !!exec();
  } catch (error) {
    return true;
  }
};


/***/ }),

/***/ "d066":
/***/ (function(module, exports, __webpack_require__) {

var path = __webpack_require__("428f");
var global = __webpack_require__("da84");

var aFunction = function (variable) {
  return typeof variable == 'function' ? variable : undefined;
};

module.exports = function (namespace, method) {
  return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
    : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
};


/***/ }),

/***/ "d139":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__("ebb5");
var $find = __webpack_require__("b727").find;

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

// `%TypedArray%.prototype.find` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.find
exportTypedArrayMethod('find', function find(predicate /* , thisArg */) {
  return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
});


/***/ }),

/***/ "d16a":
/***/ (function(module, exports, __webpack_require__) {

// 7.1.15 ToLength
var toInteger = __webpack_require__("fc5e");
var min = Math.min;
module.exports = function (it) {
  return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};


/***/ }),

/***/ "d1e7":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;

// Nashorn ~ JDK8 bug
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);

// `Object.prototype.propertyIsEnumerable` method implementation
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  var descriptor = getOwnPropertyDescriptor(this, V);
  return !!descriptor && descriptor.enumerable;
} : nativePropertyIsEnumerable;


/***/ }),

/***/ "d233":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var has = Object.prototype.hasOwnProperty;

var hexTable = (function () {
    var array = [];
    for (var i = 0; i < 256; ++i) {
        array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
    }

    return array;
}());

var compactQueue = function compactQueue(queue) {
    var obj;

    while (queue.length) {
        var item = queue.pop();
        obj = item.obj[item.prop];

        if (Array.isArray(obj)) {
            var compacted = [];

            for (var j = 0; j < obj.length; ++j) {
                if (typeof obj[j] !== 'undefined') {
                    compacted.push(obj[j]);
                }
            }

            item.obj[item.prop] = compacted;
        }
    }

    return obj;
};

var arrayToObject = function arrayToObject(source, options) {
    var obj = options && options.plainObjects ? Object.create(null) : {};
    for (var i = 0; i < source.length; ++i) {
        if (typeof source[i] !== 'undefined') {
            obj[i] = source[i];
        }
    }

    return obj;
};

var merge = function merge(target, source, options) {
    if (!source) {
        return target;
    }

    if (typeof source !== 'object') {
        if (Array.isArray(target)) {
            target.push(source);
        } else if (typeof target === 'object') {
            if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) {
                target[source] = true;
            }
        } else {
            return [target, source];
        }

        return target;
    }

    if (typeof target !== 'object') {
        return [target].concat(source);
    }

    var mergeTarget = target;
    if (Array.isArray(target) && !Array.isArray(source)) {
        mergeTarget = arrayToObject(target, options);
    }

    if (Array.isArray(target) && Array.isArray(source)) {
        source.forEach(function (item, i) {
            if (has.call(target, i)) {
                if (target[i] && typeof target[i] === 'object') {
                    target[i] = merge(target[i], item, options);
                } else {
                    target.push(item);
                }
            } else {
                target[i] = item;
            }
        });
        return target;
    }

    return Object.keys(source).reduce(function (acc, key) {
        var value = source[key];

        if (has.call(acc, key)) {
            acc[key] = merge(acc[key], value, options);
        } else {
            acc[key] = value;
        }
        return acc;
    }, mergeTarget);
};

var assign = function assignSingleSource(target, source) {
    return Object.keys(source).reduce(function (acc, key) {
        acc[key] = source[key];
        return acc;
    }, target);
};

var decode = function (str) {
    try {
        return decodeURIComponent(str.replace(/\+/g, ' '));
    } catch (e) {
        return str;
    }
};

var encode = function encode(str) {
    // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
    // It has been adapted here for stricter adherence to RFC 3986
    if (str.length === 0) {
        return str;
    }

    var string = typeof str === 'string' ? str : String(str);

    var out = '';
    for (var i = 0; i < string.length; ++i) {
        var c = string.charCodeAt(i);

        if (
            c === 0x2D // -
            || c === 0x2E // .
            || c === 0x5F // _
            || c === 0x7E // ~
            || (c >= 0x30 && c <= 0x39) // 0-9
            || (c >= 0x41 && c <= 0x5A) // a-z
            || (c >= 0x61 && c <= 0x7A) // A-Z
        ) {
            out += string.charAt(i);
            continue;
        }

        if (c < 0x80) {
            out = out + hexTable[c];
            continue;
        }

        if (c < 0x800) {
            out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
            continue;
        }

        if (c < 0xD800 || c >= 0xE000) {
            out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
            continue;
        }

        i += 1;
        c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
        out += hexTable[0xF0 | (c >> 18)]
            + hexTable[0x80 | ((c >> 12) & 0x3F)]
            + hexTable[0x80 | ((c >> 6) & 0x3F)]
            + hexTable[0x80 | (c & 0x3F)];
    }

    return out;
};

var compact = function compact(value) {
    var queue = [{ obj: { o: value }, prop: 'o' }];
    var refs = [];

    for (var i = 0; i < queue.length; ++i) {
        var item = queue[i];
        var obj = item.obj[item.prop];

        var keys = Object.keys(obj);
        for (var j = 0; j < keys.length; ++j) {
            var key = keys[j];
            var val = obj[key];
            if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
                queue.push({ obj: obj, prop: key });
                refs.push(val);
            }
        }
    }

    return compactQueue(queue);
};

var isRegExp = function isRegExp(obj) {
    return Object.prototype.toString.call(obj) === '[object RegExp]';
};

var isBuffer = function isBuffer(obj) {
    if (obj === null || typeof obj === 'undefined') {
        return false;
    }

    return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
};

module.exports = {
    arrayToObject: arrayToObject,
    assign: assign,
    compact: compact,
    decode: decode,
    encode: encode,
    isBuffer: isBuffer,
    isRegExp: isRegExp,
    merge: merge
};


/***/ }),

/***/ "d28b":
/***/ (function(module, exports, __webpack_require__) {

var defineWellKnownSymbol = __webpack_require__("746f");

// `Symbol.iterator` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.iterator
defineWellKnownSymbol('iterator');


/***/ }),

/***/ "d2bb":
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__("825a");
var aPossiblePrototype = __webpack_require__("3bbe");

// `Object.setPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-object.setprototypeof
// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  var CORRECT_SETTER = false;
  var test = {};
  var setter;
  try {
    setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
    setter.call(test, []);
    CORRECT_SETTER = test instanceof Array;
  } catch (error) { /* empty */ }
  return function setPrototypeOf(O, proto) {
    anObject(O);
    aPossiblePrototype(proto);
    if (CORRECT_SETTER) setter.call(O, proto);
    else O.__proto__ = proto;
    return O;
  };
}() : undefined);


/***/ }),

/***/ "d2d7":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.for-each.js
var es_array_for_each = __webpack_require__("4160");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.some.js
var es_array_some = __webpack_require__("45fc");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.splice.js
var es_array_splice = __webpack_require__("a434");

// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/message/src/message.vue?vue&type=template&id=25ecad3d&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{"name":"awsui-message-fade"},on:{"after-leave":_vm.handleAfterLeave}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.visible),expression:"visible"}],class:[
      'awsui-message',
      _vm.type && !_vm.icon ? ("awsui-message--" + _vm.type) : '',
      _vm.center ? 'is-center' : '',
      _vm.showClose ? 'is-closable' : '',
      _vm.customClass
    ],style:(_vm.positionStyle),attrs:{"role":"alert"},on:{"mouseenter":_vm.clearTimer,"mouseleave":_vm.startTimer}},[(_vm.icon)?_c('i',{staticClass:"awsui-iconfont",domProps:{"innerHTML":_vm._s(_vm.icon)}}):_c('i',{staticClass:"awsui-iconfont",domProps:{"innerHTML":_vm._s(_vm.typeValue)}}),_vm._t("default",[(!_vm.html)?_c('p',{staticClass:"awsui-message__content"},[_vm._v(_vm._s(_vm.message))]):_c('p',{staticClass:"awsui-message__content",domProps:{"innerHTML":_vm._s(_vm.message)}})]),(_vm.showClose)?_c('i',{staticClass:"awsui-iconfont awsui-message__closebtn",on:{"click":_vm.close}},[_vm._v("")]):_vm._e()],2)])}
var staticRenderFns = []


// CONCATENATED MODULE: ./packages/message/src/message.vue?vue&type=template&id=25ecad3d&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/message/src/message.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var typeMap = {
  success: '&#xea71;',
  info: '&#xe635;',
  warning: '&#xe71c;',
  error: '&#xe62f;'
};
/* harmony default export */ var messagevue_type_script_lang_js_ = ({
  data: function data() {
    return {
      visible: false,
      message: '',
      duration: 3000,
      type: 'info',
      showClose: false,
      icon: '',
      customClass: '',
      onClose: null,
      closed: false,
      offset: 20,
      timer: null,
      html: false,
      center: false
    };
  },
  computed: {
    typeValue: function typeValue() {
      return this.type && !this.icon ? "".concat(typeMap[this.type]) : '';
    },
    positionStyle: function positionStyle() {
      return {
        'top': "".concat(this.offset, "px")
      };
    }
  },
  watch: {
    closed: function closed(newVal) {
      if (newVal) {
        this.visible = false;
      }
    }
  },
  methods: {
    handleAfterLeave: function handleAfterLeave() {
      this.$destroy(true);
      this.$el.parentNode.removeChild(this.$el);
    },
    close: function close() {
      this.closed = true;

      if (typeof this.onClose === 'function') {
        this.onClose(this);
      }
    },
    clearTimer: function clearTimer() {
      clearTimeout(this.timer);
    },
    startTimer: function startTimer() {
      var _this = this;

      if (this.type === 'error') {
        this.showClose = true;
        this.duration = 0;
      }

      if (this.duration > 0) {
        this.timer = setTimeout(function () {
          if (!_this.closed) {
            _this.close();
          }
        }, this.duration);
      }
    },
    keydown: function keydown(e) {
      if (e.keyCode === 27) {
        // esc关闭消息
        if (!this.closed) {
          this.close();
        }
      }
    }
  },
  mounted: function mounted() {
    this.startTimer();
    document.addEventListener('keydown', this.keydown);
  },
  beforeDestroy: function beforeDestroy() {
    document.removeEventListener('keydown', this.keydown);
  }
});
// CONCATENATED MODULE: ./packages/message/src/message.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_messagevue_type_script_lang_js_ = (messagevue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/message/src/message.vue?vue&type=style&index=0&lang=css&
var messagevue_type_style_index_0_lang_css_ = __webpack_require__("6495");

// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__("2877");

// CONCATENATED MODULE: ./packages/message/src/message.vue






/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  src_messagevue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var message = (component.exports);
// CONCATENATED MODULE: ./packages/message/src/message.js





var MessageConstructor = external_commonjs_vue_commonjs2_vue_root_Vue_default.a.extend(message);
var instance;
var instances = [];
var seed = 1;
var typeList = ['success', 'warning', 'info', 'error'];

var showMessage = function showMessage(params) {
  // 这里的options用户定义的message样式选项
  var options = params || {};

  if (typeof options === 'string') {
    options = {
      message: options,
      type: 'info'
    };
  }

  if (options.type === undefined) {
    options.type = 'info';
  }

  var userOnClose = options.onClose;
  var id = 'message_' + seed++;

  options.onClose = function () {
    showMessage.close(id, userOnClose);
  };

  if (instances.length === 0) {
    filterInstance(id, options);
  } else {
    var result = instances.some(function (el, i) {
      if (el.type === options.type && el.message === options.message) {
        return true;
      }
    });

    if (!result) {
      filterInstance(id, options);
    }
  }
};

function filterInstance(id, options) {
  showMessage.close();
  instance = new MessageConstructor({
    data: options
  });
  instance.id = id;
  instance.vm = instance.$mount(); // 实例化vue,但未挂载

  document.body.appendChild(instance.vm.$el); // 通过原生的DOM API,append挂载到

  instance.vm.visible = true;
  instance.dom = instance.vm.$el;
  instance.dom.style.zIndex = 10000;
  instances.push(instance);
  return instance.vm;
}

typeList.forEach(function (type) {
  showMessage[type] = function (options) {
    if (typeof options === 'string') {
      options = {
        message: options
      };
      options.type = type;
      return showMessage(options);
    }
  };
});

showMessage.close = function (id, userOnClose) {
  for (var i = 0, len = instances.length; i < len; i++) {
    if (id === instances[i].id) {
      if (typeof userOnClose === 'function') {
        userOnClose(instances[i]);
      }

      instances.splice(i, 1);
      break;
    } else {
      instances[i].close();
    }
  }
};

showMessage.closeAll = function () {
  for (var i = instances.length - 1; i >= 0; i--) {
    instances[i].close();
  }
};

/* harmony default export */ var src_message = (showMessage);
// CONCATENATED MODULE: ./packages/message/index.js

/* harmony default export */ var packages_message = __webpack_exports__["a"] = (src_message);

/***/ }),

/***/ "d397":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;
exports.isDef = isDef;
exports.isKorean = isKorean;

function isDef(val) {
  return val !== undefined && val !== null;
}

function isKorean(text) {
  var reg = /([(\uAC00-\uD7AF)|(\u3130-\u318F)])+/gi;
  return reg.test(text);
}

/***/ }),

/***/ "d3b7":
/***/ (function(module, exports, __webpack_require__) {

var TO_STRING_TAG_SUPPORT = __webpack_require__("00ee");
var redefine = __webpack_require__("6eeb");
var toString = __webpack_require__("b041");

// `Object.prototype.toString` method
// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
if (!TO_STRING_TAG_SUPPORT) {
  redefine(Object.prototype, 'toString', toString, { unsafe: true });
}


/***/ }),

/***/ "d44e":
/***/ (function(module, exports, __webpack_require__) {

var defineProperty = __webpack_require__("9bf2").f;
var has = __webpack_require__("5135");
var wellKnownSymbol = __webpack_require__("b622");

var TO_STRING_TAG = wellKnownSymbol('toStringTag');

module.exports = function (it, TAG, STATIC) {
  if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
    defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
  }
};


/***/ }),

/***/ "d4af":
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/**
 * Copyright (c) 2015, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 * @providesModule normalizeWheel
 * @typechecks
 */



var UserAgent_DEPRECATED = __webpack_require__("8eb7");

var isEventSupported = __webpack_require__("7b3e");


// Reasonable defaults
var PIXEL_STEP  = 10;
var LINE_HEIGHT = 40;
var PAGE_HEIGHT = 800;

/**
 * Mouse wheel (and 2-finger trackpad) support on the web sucks.  It is
 * complicated, thus this doc is long and (hopefully) detailed enough to answer
 * your questions.
 *
 * If you need to react to the mouse wheel in a predictable way, this code is
 * like your bestest friend. * hugs *
 *
 * As of today, there are 4 DOM event types you can listen to:
 *
 *   'wheel'                -- Chrome(31+), FF(17+), IE(9+)
 *   'mousewheel'           -- Chrome, IE(6+), Opera, Safari
 *   'MozMousePixelScroll'  -- FF(3.5 only!) (2010-2013) -- don't bother!
 *   'DOMMouseScroll'       -- FF(0.9.7+) since 2003
 *
 * So what to do?  The is the best:
 *
 *   normalizeWheel.getEventType();
 *
 * In your event callback, use this code to get sane interpretation of the
 * deltas.  This code will return an object with properties:
 *
 *   spinX   -- normalized spin speed (use for zoom) - x plane
 *   spinY   -- " - y plane
 *   pixelX  -- normalized distance (to pixels) - x plane
 *   pixelY  -- " - y plane
 *
 * Wheel values are provided by the browser assuming you are using the wheel to
 * scroll a web page by a number of lines or pixels (or pages).  Values can vary
 * significantly on different platforms and browsers, forgetting that you can
 * scroll at different speeds.  Some devices (like trackpads) emit more events
 * at smaller increments with fine granularity, and some emit massive jumps with
 * linear speed or acceleration.
 *
 * This code does its best to normalize the deltas for you:
 *
 *   - spin is trying to normalize how far the wheel was spun (or trackpad
 *     dragged).  This is super useful for zoom support where you want to
 *     throw away the chunky scroll steps on the PC and make those equal to
 *     the slow and smooth tiny steps on the Mac. Key data: This code tries to
 *     resolve a single slow step on a wheel to 1.
 *
 *   - pixel is normalizing the desired scroll delta in pixel units.  You'll
 *     get the crazy differences between browsers, but at least it'll be in
 *     pixels!
 *
 *   - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT.  This
 *     should translate to positive value zooming IN, negative zooming OUT.
 *     This matches the newer 'wheel' event.
 *
 * Why are there spinX, spinY (or pixels)?
 *
 *   - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn
 *     with a mouse.  It results in side-scrolling in the browser by default.
 *
 *   - spinY is what you expect -- it's the classic axis of a mouse wheel.
 *
 *   - I dropped spinZ/pixelZ.  It is supported by the DOM 3 'wheel' event and
 *     probably is by browsers in conjunction with fancy 3D controllers .. but
 *     you know.
 *
 * Implementation info:
 *
 * Examples of 'wheel' event if you scroll slowly (down) by one step with an
 * average mouse:
 *
 *   OS X + Chrome  (mouse)     -    4   pixel delta  (wheelDelta -120)
 *   OS X + Safari  (mouse)     -  N/A   pixel delta  (wheelDelta  -12)
 *   OS X + Firefox (mouse)     -    0.1 line  delta  (wheelDelta  N/A)
 *   Win8 + Chrome  (mouse)     -  100   pixel delta  (wheelDelta -120)
 *   Win8 + Firefox (mouse)     -    3   line  delta  (wheelDelta -120)
 *
 * On the trackpad:
 *
 *   OS X + Chrome  (trackpad)  -    2   pixel delta  (wheelDelta   -6)
 *   OS X + Firefox (trackpad)  -    1   pixel delta  (wheelDelta  N/A)
 *
 * On other/older browsers.. it's more complicated as there can be multiple and
 * also missing delta values.
 *
 * The 'wheel' event is more standard:
 *
 * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents
 *
 * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and
 * deltaX, deltaY and deltaZ.  Some browsers provide other values to maintain
 * backward compatibility with older events.  Those other values help us
 * better normalize spin speed.  Example of what the browsers provide:
 *
 *                          | event.wheelDelta | event.detail
 *        ------------------+------------------+--------------
 *          Safari v5/OS X  |       -120       |       0
 *          Safari v5/Win7  |       -120       |       0
 *         Chrome v17/OS X  |       -120       |       0
 *         Chrome v17/Win7  |       -120       |       0
 *                IE9/Win7  |       -120       |   undefined
 *         Firefox v4/OS X  |     undefined    |       1
 *         Firefox v4/Win7  |     undefined    |       3
 *
 */
function normalizeWheel(/*object*/ event) /*object*/ {
  var sX = 0, sY = 0,       // spinX, spinY
      pX = 0, pY = 0;       // pixelX, pixelY

  // Legacy
  if ('detail'      in event) { sY = event.detail; }
  if ('wheelDelta'  in event) { sY = -event.wheelDelta / 120; }
  if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }
  if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }

  // side scrolling on FF with DOMMouseScroll
  if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {
    sX = sY;
    sY = 0;
  }

  pX = sX * PIXEL_STEP;
  pY = sY * PIXEL_STEP;

  if ('deltaY' in event) { pY = event.deltaY; }
  if ('deltaX' in event) { pX = event.deltaX; }

  if ((pX || pY) && event.deltaMode) {
    if (event.deltaMode == 1) {          // delta in LINE units
      pX *= LINE_HEIGHT;
      pY *= LINE_HEIGHT;
    } else {                             // delta in PAGE units
      pX *= PAGE_HEIGHT;
      pY *= PAGE_HEIGHT;
    }
  }

  // Fall-back if spin cannot be determined
  if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }
  if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }

  return { spinX  : sX,
           spinY  : sY,
           pixelX : pX,
           pixelY : pY };
}


/**
 * The best combination if you prefer spinX + spinY normalization.  It favors
 * the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with
 * 'wheel' event, making spin speed determination impossible.
 */
normalizeWheel.getEventType = function() /*string*/ {
  return (UserAgent_DEPRECATED.firefox())
           ? 'DOMMouseScroll'
           : (isEventSupported('wheel'))
               ? 'wheel'
               : 'mousewheel';
};

module.exports = normalizeWheel;


/***/ }),

/***/ "d537":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "d58f":
/***/ (function(module, exports, __webpack_require__) {

var aFunction = __webpack_require__("1c0b");
var toObject = __webpack_require__("7b0b");
var IndexedObject = __webpack_require__("44ad");
var toLength = __webpack_require__("50c4");

// `Array.prototype.{ reduce, reduceRight }` methods implementation
var createMethod = function (IS_RIGHT) {
  return function (that, callbackfn, argumentsLength, memo) {
    aFunction(callbackfn);
    var O = toObject(that);
    var self = IndexedObject(O);
    var length = toLength(O.length);
    var index = IS_RIGHT ? length - 1 : 0;
    var i = IS_RIGHT ? -1 : 1;
    if (argumentsLength < 2) while (true) {
      if (index in self) {
        memo = self[index];
        index += i;
        break;
      }
      index += i;
      if (IS_RIGHT ? index < 0 : length <= index) {
        throw TypeError('Reduce of empty array with no initial value');
      }
    }
    for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
      memo = callbackfn(memo, self[index], index, O);
    }
    return memo;
  };
};

module.exports = {
  // `Array.prototype.reduce` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.reduce
  left: createMethod(false),
  // `Array.prototype.reduceRight` method
  // https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
  right: createMethod(true)
};


/***/ }),

/***/ "d5d6":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__("ebb5");
var $forEach = __webpack_require__("b727").forEach;

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

// `%TypedArray%.prototype.forEach` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.foreach
exportTypedArrayMethod('forEach', function forEach(callbackfn /* , thisArg */) {
  $forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
});


/***/ }),

/***/ "d5e0":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"));
  else {}
})(function(CodeMirror) {
"use strict";

var htmlConfig = {
  autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,
                    'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,
                    'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,
                    'track': true, 'wbr': true, 'menuitem': true},
  implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,
                     'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,
                     'th': true, 'tr': true},
  contextGrabbers: {
    'dd': {'dd': true, 'dt': true},
    'dt': {'dd': true, 'dt': true},
    'li': {'li': true},
    'option': {'option': true, 'optgroup': true},
    'optgroup': {'optgroup': true},
    'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,
          'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,
          'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,
          'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,
          'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},
    'rp': {'rp': true, 'rt': true},
    'rt': {'rp': true, 'rt': true},
    'tbody': {'tbody': true, 'tfoot': true},
    'td': {'td': true, 'th': true},
    'tfoot': {'tbody': true},
    'th': {'td': true, 'th': true},
    'thead': {'tbody': true, 'tfoot': true},
    'tr': {'tr': true}
  },
  doNotIndent: {"pre": true},
  allowUnquoted: true,
  allowMissing: true,
  caseFold: true
}

var xmlConfig = {
  autoSelfClosers: {},
  implicitlyClosed: {},
  contextGrabbers: {},
  doNotIndent: {},
  allowUnquoted: false,
  allowMissing: false,
  allowMissingTagName: false,
  caseFold: false
}

CodeMirror.defineMode("xml", function(editorConf, config_) {
  var indentUnit = editorConf.indentUnit
  var config = {}
  var defaults = config_.htmlMode ? htmlConfig : xmlConfig
  for (var prop in defaults) config[prop] = defaults[prop]
  for (var prop in config_) config[prop] = config_[prop]

  // Return variables for tokenizers
  var type, setStyle;

  function inText(stream, state) {
    function chain(parser) {
      state.tokenize = parser;
      return parser(stream, state);
    }

    var ch = stream.next();
    if (ch == "<") {
      if (stream.eat("!")) {
        if (stream.eat("[")) {
          if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>"));
          else return null;
        } else if (stream.match("--")) {
          return chain(inBlock("comment", "-->"));
        } else if (stream.match("DOCTYPE", true, true)) {
          stream.eatWhile(/[\w\._\-]/);
          return chain(doctype(1));
        } else {
          return null;
        }
      } else if (stream.eat("?")) {
        stream.eatWhile(/[\w\._\-]/);
        state.tokenize = inBlock("meta", "?>");
        return "meta";
      } else {
        type = stream.eat("/") ? "closeTag" : "openTag";
        state.tokenize = inTag;
        return "tag bracket";
      }
    } else if (ch == "&") {
      var ok;
      if (stream.eat("#")) {
        if (stream.eat("x")) {
          ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";");
        } else {
          ok = stream.eatWhile(/[\d]/) && stream.eat(";");
        }
      } else {
        ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(";");
      }
      return ok ? "atom" : "error";
    } else {
      stream.eatWhile(/[^&<]/);
      return null;
    }
  }
  inText.isInText = true;

  function inTag(stream, state) {
    var ch = stream.next();
    if (ch == ">" || (ch == "/" && stream.eat(">"))) {
      state.tokenize = inText;
      type = ch == ">" ? "endTag" : "selfcloseTag";
      return "tag bracket";
    } else if (ch == "=") {
      type = "equals";
      return null;
    } else if (ch == "<") {
      state.tokenize = inText;
      state.state = baseState;
      state.tagName = state.tagStart = null;
      var next = state.tokenize(stream, state);
      return next ? next + " tag error" : "tag error";
    } else if (/[\'\"]/.test(ch)) {
      state.tokenize = inAttribute(ch);
      state.stringStartCol = stream.column();
      return state.tokenize(stream, state);
    } else {
      stream.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);
      return "word";
    }
  }

  function inAttribute(quote) {
    var closure = function(stream, state) {
      while (!stream.eol()) {
        if (stream.next() == quote) {
          state.tokenize = inTag;
          break;
        }
      }
      return "string";
    };
    closure.isInAttribute = true;
    return closure;
  }

  function inBlock(style, terminator) {
    return function(stream, state) {
      while (!stream.eol()) {
        if (stream.match(terminator)) {
          state.tokenize = inText;
          break;
        }
        stream.next();
      }
      return style;
    }
  }

  function doctype(depth) {
    return function(stream, state) {
      var ch;
      while ((ch = stream.next()) != null) {
        if (ch == "<") {
          state.tokenize = doctype(depth + 1);
          return state.tokenize(stream, state);
        } else if (ch == ">") {
          if (depth == 1) {
            state.tokenize = inText;
            break;
          } else {
            state.tokenize = doctype(depth - 1);
            return state.tokenize(stream, state);
          }
        }
      }
      return "meta";
    };
  }

  function Context(state, tagName, startOfLine) {
    this.prev = state.context;
    this.tagName = tagName || "";
    this.indent = state.indented;
    this.startOfLine = startOfLine;
    if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))
      this.noIndent = true;
  }
  function popContext(state) {
    if (state.context) state.context = state.context.prev;
  }
  function maybePopContext(state, nextTagName) {
    var parentTagName;
    while (true) {
      if (!state.context) {
        return;
      }
      parentTagName = state.context.tagName;
      if (!config.contextGrabbers.hasOwnProperty(parentTagName) ||
          !config.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {
        return;
      }
      popContext(state);
    }
  }

  function baseState(type, stream, state) {
    if (type == "openTag") {
      state.tagStart = stream.column();
      return tagNameState;
    } else if (type == "closeTag") {
      return closeTagNameState;
    } else {
      return baseState;
    }
  }
  function tagNameState(type, stream, state) {
    if (type == "word") {
      state.tagName = stream.current();
      setStyle = "tag";
      return attrState;
    } else if (config.allowMissingTagName && type == "endTag") {
      setStyle = "tag bracket";
      return attrState(type, stream, state);
    } else {
      setStyle = "error";
      return tagNameState;
    }
  }
  function closeTagNameState(type, stream, state) {
    if (type == "word") {
      var tagName = stream.current();
      if (state.context && state.context.tagName != tagName &&
          config.implicitlyClosed.hasOwnProperty(state.context.tagName))
        popContext(state);
      if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) {
        setStyle = "tag";
        return closeState;
      } else {
        setStyle = "tag error";
        return closeStateErr;
      }
    } else if (config.allowMissingTagName && type == "endTag") {
      setStyle = "tag bracket";
      return closeState(type, stream, state);
    } else {
      setStyle = "error";
      return closeStateErr;
    }
  }

  function closeState(type, _stream, state) {
    if (type != "endTag") {
      setStyle = "error";
      return closeState;
    }
    popContext(state);
    return baseState;
  }
  function closeStateErr(type, stream, state) {
    setStyle = "error";
    return closeState(type, stream, state);
  }

  function attrState(type, _stream, state) {
    if (type == "word") {
      setStyle = "attribute";
      return attrEqState;
    } else if (type == "endTag" || type == "selfcloseTag") {
      var tagName = state.tagName, tagStart = state.tagStart;
      state.tagName = state.tagStart = null;
      if (type == "selfcloseTag" ||
          config.autoSelfClosers.hasOwnProperty(tagName)) {
        maybePopContext(state, tagName);
      } else {
        maybePopContext(state, tagName);
        state.context = new Context(state, tagName, tagStart == state.indented);
      }
      return baseState;
    }
    setStyle = "error";
    return attrState;
  }
  function attrEqState(type, stream, state) {
    if (type == "equals") return attrValueState;
    if (!config.allowMissing) setStyle = "error";
    return attrState(type, stream, state);
  }
  function attrValueState(type, stream, state) {
    if (type == "string") return attrContinuedState;
    if (type == "word" && config.allowUnquoted) {setStyle = "string"; return attrState;}
    setStyle = "error";
    return attrState(type, stream, state);
  }
  function attrContinuedState(type, stream, state) {
    if (type == "string") return attrContinuedState;
    return attrState(type, stream, state);
  }

  return {
    startState: function(baseIndent) {
      var state = {tokenize: inText,
                   state: baseState,
                   indented: baseIndent || 0,
                   tagName: null, tagStart: null,
                   context: null}
      if (baseIndent != null) state.baseIndent = baseIndent
      return state
    },

    token: function(stream, state) {
      if (!state.tagName && stream.sol())
        state.indented = stream.indentation();

      if (stream.eatSpace()) return null;
      type = null;
      var style = state.tokenize(stream, state);
      if ((style || type) && style != "comment") {
        setStyle = null;
        state.state = state.state(type || style, stream, state);
        if (setStyle)
          style = setStyle == "error" ? style + " error" : setStyle;
      }
      return style;
    },

    indent: function(state, textAfter, fullLine) {
      var context = state.context;
      // Indent multi-line strings (e.g. css).
      if (state.tokenize.isInAttribute) {
        if (state.tagStart == state.indented)
          return state.stringStartCol + 1;
        else
          return state.indented + indentUnit;
      }
      if (context && context.noIndent) return CodeMirror.Pass;
      if (state.tokenize != inTag && state.tokenize != inText)
        return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0;
      // Indent the starts of attribute names.
      if (state.tagName) {
        if (config.multilineTagIndentPastTag !== false)
          return state.tagStart + state.tagName.length + 2;
        else
          return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1);
      }
      if (config.alignCDATA && /<!\[CDATA\[/.test(textAfter)) return 0;
      var tagAfter = textAfter && /^<(\/)?([\w_:\.-]*)/.exec(textAfter);
      if (tagAfter && tagAfter[1]) { // Closing tag spotted
        while (context) {
          if (context.tagName == tagAfter[2]) {
            context = context.prev;
            break;
          } else if (config.implicitlyClosed.hasOwnProperty(context.tagName)) {
            context = context.prev;
          } else {
            break;
          }
        }
      } else if (tagAfter) { // Opening tag spotted
        while (context) {
          var grabbers = config.contextGrabbers[context.tagName];
          if (grabbers && grabbers.hasOwnProperty(tagAfter[2]))
            context = context.prev;
          else
            break;
        }
      }
      while (context && context.prev && !context.startOfLine)
        context = context.prev;
      if (context) return context.indent + indentUnit;
      else return state.baseIndent || 0;
    },

    electricInput: /<\/[\s\w:]+>$/,
    blockCommentStart: "<!--",
    blockCommentEnd: "-->",

    configuration: config.htmlMode ? "html" : "xml",
    helperType: config.htmlMode ? "html" : "xml",

    skipAttribute: function(state) {
      if (state.state == attrValueState)
        state.state = attrState
    },

    xmlCurrentTag: function(state) {
      return state.tagName ? {name: state.tagName, close: state.type == "closeTag"} : null
    },

    xmlCurrentContext: function(state) {
      var context = []
      for (var cx = state.context; cx; cx = cx.prev)
        context.push(cx.tagName)
      return context.reverse()
    }
  };
});

CodeMirror.defineMIME("text/xml", "xml");
CodeMirror.defineMIME("application/xml", "xml");
if (!CodeMirror.mimeModes.hasOwnProperty("text/html"))
  CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true});

});


/***/ }),

/***/ "d69f":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"), __webpack_require__("d5e0"), __webpack_require__("f9d4"), __webpack_require__("7b00"));
  else {}
})(function(CodeMirror) {
  "use strict";

  var defaultTags = {
    script: [
      ["lang", /(javascript|babel)/i, "javascript"],
      ["type", /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i, "javascript"],
      ["type", /./, "text/plain"],
      [null, null, "javascript"]
    ],
    style:  [
      ["lang", /^css$/i, "css"],
      ["type", /^(text\/)?(x-)?(stylesheet|css)$/i, "css"],
      ["type", /./, "text/plain"],
      [null, null, "css"]
    ]
  };

  function maybeBackup(stream, pat, style) {
    var cur = stream.current(), close = cur.search(pat);
    if (close > -1) {
      stream.backUp(cur.length - close);
    } else if (cur.match(/<\/?$/)) {
      stream.backUp(cur.length);
      if (!stream.match(pat, false)) stream.match(cur);
    }
    return style;
  }

  var attrRegexpCache = {};
  function getAttrRegexp(attr) {
    var regexp = attrRegexpCache[attr];
    if (regexp) return regexp;
    return attrRegexpCache[attr] = new RegExp("\\s+" + attr + "\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*");
  }

  function getAttrValue(text, attr) {
    var match = text.match(getAttrRegexp(attr))
    return match ? /^\s*(.*?)\s*$/.exec(match[2])[1] : ""
  }

  function getTagRegexp(tagName, anchored) {
    return new RegExp((anchored ? "^" : "") + "<\/\s*" + tagName + "\s*>", "i");
  }

  function addTags(from, to) {
    for (var tag in from) {
      var dest = to[tag] || (to[tag] = []);
      var source = from[tag];
      for (var i = source.length - 1; i >= 0; i--)
        dest.unshift(source[i])
    }
  }

  function findMatchingMode(tagInfo, tagText) {
    for (var i = 0; i < tagInfo.length; i++) {
      var spec = tagInfo[i];
      if (!spec[0] || spec[1].test(getAttrValue(tagText, spec[0]))) return spec[2];
    }
  }

  CodeMirror.defineMode("htmlmixed", function (config, parserConfig) {
    var htmlMode = CodeMirror.getMode(config, {
      name: "xml",
      htmlMode: true,
      multilineTagIndentFactor: parserConfig.multilineTagIndentFactor,
      multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag,
      allowMissingTagName: parserConfig.allowMissingTagName,
    });

    var tags = {};
    var configTags = parserConfig && parserConfig.tags, configScript = parserConfig && parserConfig.scriptTypes;
    addTags(defaultTags, tags);
    if (configTags) addTags(configTags, tags);
    if (configScript) for (var i = configScript.length - 1; i >= 0; i--)
      tags.script.unshift(["type", configScript[i].matches, configScript[i].mode])

    function html(stream, state) {
      var style = htmlMode.token(stream, state.htmlState), tag = /\btag\b/.test(style), tagName
      if (tag && !/[<>\s\/]/.test(stream.current()) &&
          (tagName = state.htmlState.tagName && state.htmlState.tagName.toLowerCase()) &&
          tags.hasOwnProperty(tagName)) {
        state.inTag = tagName + " "
      } else if (state.inTag && tag && />$/.test(stream.current())) {
        var inTag = /^([\S]+) (.*)/.exec(state.inTag)
        state.inTag = null
        var modeSpec = stream.current() == ">" && findMatchingMode(tags[inTag[1]], inTag[2])
        var mode = CodeMirror.getMode(config, modeSpec)
        var endTagA = getTagRegexp(inTag[1], true), endTag = getTagRegexp(inTag[1], false);
        state.token = function (stream, state) {
          if (stream.match(endTagA, false)) {
            state.token = html;
            state.localState = state.localMode = null;
            return null;
          }
          return maybeBackup(stream, endTag, state.localMode.token(stream, state.localState));
        };
        state.localMode = mode;
        state.localState = CodeMirror.startState(mode, htmlMode.indent(state.htmlState, "", ""));
      } else if (state.inTag) {
        state.inTag += stream.current()
        if (stream.eol()) state.inTag += " "
      }
      return style;
    };

    return {
      startState: function () {
        var state = CodeMirror.startState(htmlMode);
        return {token: html, inTag: null, localMode: null, localState: null, htmlState: state};
      },

      copyState: function (state) {
        var local;
        if (state.localState) {
          local = CodeMirror.copyState(state.localMode, state.localState);
        }
        return {token: state.token, inTag: state.inTag,
                localMode: state.localMode, localState: local,
                htmlState: CodeMirror.copyState(htmlMode, state.htmlState)};
      },

      token: function (stream, state) {
        return state.token(stream, state);
      },

      indent: function (state, textAfter, line) {
        if (!state.localMode || /^\s*<\//.test(textAfter))
          return htmlMode.indent(state.htmlState, textAfter, line);
        else if (state.localMode.indent)
          return state.localMode.indent(state.localState, textAfter, line);
        else
          return CodeMirror.Pass;
      },

      innerMode: function (state) {
        return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode};
      }
    };
  }, "xml", "javascript", "css");

  CodeMirror.defineMIME("text/html", "htmlmixed");
});


/***/ }),

/***/ "d757":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "d784":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// TODO: Remove from `core-js@4` since it's moved to entry points
__webpack_require__("ac1f");
var redefine = __webpack_require__("6eeb");
var fails = __webpack_require__("d039");
var wellKnownSymbol = __webpack_require__("b622");
var regexpExec = __webpack_require__("9263");
var createNonEnumerableProperty = __webpack_require__("9112");

var SPECIES = wellKnownSymbol('species');

var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  // #replace needs built-in support for named groups.
  // #match works fine because it just return the exec results, even if it has
  // a "grops" property.
  var re = /./;
  re.exec = function () {
    var result = [];
    result.groups = { a: '7' };
    return result;
  };
  return ''.replace(re, '$<a>') !== '7';
});

// IE <= 11 replaces $0 with the whole match, as if it was $&
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
var REPLACE_KEEPS_$0 = (function () {
  return 'a'.replace(/./, '$0') === '$0';
})();

var REPLACE = wellKnownSymbol('replace');
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  if (/./[REPLACE]) {
    return /./[REPLACE]('a', '$0') === '';
  }
  return false;
})();

// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
  var re = /(?:)/;
  var originalExec = re.exec;
  re.exec = function () { return originalExec.apply(this, arguments); };
  var result = 'ab'.split(re);
  return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
});

module.exports = function (KEY, length, exec, sham) {
  var SYMBOL = wellKnownSymbol(KEY);

  var DELEGATES_TO_SYMBOL = !fails(function () {
    // String methods call symbol-named RegEp methods
    var O = {};
    O[SYMBOL] = function () { return 7; };
    return ''[KEY](O) != 7;
  });

  var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
    // Symbol-named RegExp methods call .exec
    var execCalled = false;
    var re = /a/;

    if (KEY === 'split') {
      // We can't use real regex here since it causes deoptimization
      // and serious performance degradation in V8
      // https://github.com/zloirock/core-js/issues/306
      re = {};
      // RegExp[@@split] doesn't call the regex's exec method, but first creates
      // a new one. We need to return the patched regex when creating the new one.
      re.constructor = {};
      re.constructor[SPECIES] = function () { return re; };
      re.flags = '';
      re[SYMBOL] = /./[SYMBOL];
    }

    re.exec = function () { execCalled = true; return null; };

    re[SYMBOL]('');
    return !execCalled;
  });

  if (
    !DELEGATES_TO_SYMBOL ||
    !DELEGATES_TO_EXEC ||
    (KEY === 'replace' && !(
      REPLACE_SUPPORTS_NAMED_GROUPS &&
      REPLACE_KEEPS_$0 &&
      !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
    )) ||
    (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
  ) {
    var nativeRegExpMethod = /./[SYMBOL];
    var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
      if (regexp.exec === regexpExec) {
        if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
          // The native String method already delegates to @@method (this
          // polyfilled function), leasing to infinite recursion.
          // We avoid it by directly calling the native @@method method.
          return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
        }
        return { done: true, value: nativeMethod.call(str, regexp, arg2) };
      }
      return { done: false };
    }, {
      REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
      REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
    });
    var stringMethod = methods[0];
    var regexMethod = methods[1];

    redefine(String.prototype, KEY, stringMethod);
    redefine(RegExp.prototype, SYMBOL, length == 2
      // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
      // 21.2.5.11 RegExp.prototype[@@split](string, limit)
      ? function (string, arg) { return regexMethod.call(string, this, arg); }
      // 21.2.5.6 RegExp.prototype[@@match](string)
      // 21.2.5.9 RegExp.prototype[@@search](string)
      : function (string) { return regexMethod.call(string, this); }
    );
  }

  if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
};


/***/ }),

/***/ "d7d1":
/***/ (function(module, exports, __webpack_require__) {

"use strict";
var __WEBPACK_AMD_DEFINE_RESULT__;
/* Modified from https://github.com/taylorhakes/fecha
 *
 * The MIT License (MIT)
 *
 * Copyright (c) 2015 Taylor Hakes
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 *     The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

/*eslint-disable*/
// 把 YYYY-MM-DD 改成了 yyyy-MM-dd

__webpack_require__("c975");

__webpack_require__("fb6a");

__webpack_require__("d3b7");

__webpack_require__("4d63");

__webpack_require__("ac1f");

__webpack_require__("25f0");

__webpack_require__("466d");

__webpack_require__("5319");

(function (main) {
  'use strict';
  /**
   * Parse or format dates
   * @class fecha
   */

  var fecha = {};
  var token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
  var twoDigits = '\\d\\d?';
  var threeDigits = '\\d{3}';
  var fourDigits = '\\d{4}';
  var word = '[^\\s]+';
  var literal = /\[([^]*?)\]/gm;

  var noop = function noop() {};

  function regexEscape(str) {
    return str.replace(/[|\\{()[^$+*?.-]/g, '\\$&');
  }

  function shorten(arr, sLen) {
    var newArr = [];

    for (var i = 0, len = arr.length; i < len; i++) {
      newArr.push(arr[i].substr(0, sLen));
    }

    return newArr;
  }

  function monthUpdate(arrName) {
    return function (d, v, i18n) {
      var index = i18n[arrName].indexOf(v.charAt(0).toUpperCase() + v.substr(1).toLowerCase());

      if (~index) {
        d.month = index;
      }
    };
  }

  function pad(val, len) {
    val = String(val);
    len = len || 2;

    while (val.length < len) {
      val = '0' + val;
    }

    return val;
  }

  var dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
  var monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
  var monthNamesShort = shorten(monthNames, 3);
  var dayNamesShort = shorten(dayNames, 3);
  fecha.i18n = {
    dayNamesShort: dayNamesShort,
    dayNames: dayNames,
    monthNamesShort: monthNamesShort,
    monthNames: monthNames,
    amPm: ['am', 'pm'],
    DoFn: function DoFn(D) {
      return D + ['th', 'st', 'nd', 'rd'][D % 10 > 3 ? 0 : (D - D % 10 !== 10) * D % 10];
    }
  };
  var formatFlags = {
    D: function D(dateObj) {
      return dateObj.getDay();
    },
    DD: function DD(dateObj) {
      return pad(dateObj.getDay());
    },
    Do: function Do(dateObj, i18n) {
      return i18n.DoFn(dateObj.getDate());
    },
    d: function d(dateObj) {
      return dateObj.getDate();
    },
    dd: function dd(dateObj) {
      return pad(dateObj.getDate());
    },
    ddd: function ddd(dateObj, i18n) {
      return i18n.dayNamesShort[dateObj.getDay()];
    },
    dddd: function dddd(dateObj, i18n) {
      return i18n.dayNames[dateObj.getDay()];
    },
    M: function M(dateObj) {
      return dateObj.getMonth() + 1;
    },
    MM: function MM(dateObj) {
      return pad(dateObj.getMonth() + 1);
    },
    MMM: function MMM(dateObj, i18n) {
      return i18n.monthNamesShort[dateObj.getMonth()];
    },
    MMMM: function MMMM(dateObj, i18n) {
      return i18n.monthNames[dateObj.getMonth()];
    },
    yy: function yy(dateObj) {
      return pad(String(dateObj.getFullYear()), 4).substr(2);
    },
    yyyy: function yyyy(dateObj) {
      return pad(dateObj.getFullYear(), 4);
    },
    h: function h(dateObj) {
      return dateObj.getHours() % 12 || 12;
    },
    hh: function hh(dateObj) {
      return pad(dateObj.getHours() % 12 || 12);
    },
    H: function H(dateObj) {
      return dateObj.getHours();
    },
    HH: function HH(dateObj) {
      return pad(dateObj.getHours());
    },
    m: function m(dateObj) {
      return dateObj.getMinutes();
    },
    mm: function mm(dateObj) {
      return pad(dateObj.getMinutes());
    },
    s: function s(dateObj) {
      return dateObj.getSeconds();
    },
    ss: function ss(dateObj) {
      return pad(dateObj.getSeconds());
    },
    S: function S(dateObj) {
      return Math.round(dateObj.getMilliseconds() / 100);
    },
    SS: function SS(dateObj) {
      return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
    },
    SSS: function SSS(dateObj) {
      return pad(dateObj.getMilliseconds(), 3);
    },
    a: function a(dateObj, i18n) {
      return dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1];
    },
    A: function A(dateObj, i18n) {
      return dateObj.getHours() < 12 ? i18n.amPm[0].toUpperCase() : i18n.amPm[1].toUpperCase();
    },
    ZZ: function ZZ(dateObj) {
      var o = dateObj.getTimezoneOffset();
      return (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
    }
  };
  var parseFlags = {
    d: [twoDigits, function (d, v) {
      d.day = v;
    }],
    Do: [twoDigits + word, function (d, v) {
      d.day = parseInt(v, 10);
    }],
    M: [twoDigits, function (d, v) {
      d.month = v - 1;
    }],
    yy: [twoDigits, function (d, v) {
      var da = new Date(),
          cent = +('' + da.getFullYear()).substr(0, 2);
      d.year = '' + (v > 68 ? cent - 1 : cent) + v;
    }],
    h: [twoDigits, function (d, v) {
      d.hour = v;
    }],
    m: [twoDigits, function (d, v) {
      d.minute = v;
    }],
    s: [twoDigits, function (d, v) {
      d.second = v;
    }],
    yyyy: [fourDigits, function (d, v) {
      d.year = v;
    }],
    S: ['\\d', function (d, v) {
      d.millisecond = v * 100;
    }],
    SS: ['\\d{2}', function (d, v) {
      d.millisecond = v * 10;
    }],
    SSS: [threeDigits, function (d, v) {
      d.millisecond = v;
    }],
    D: [twoDigits, noop],
    ddd: [word, noop],
    MMM: [word, monthUpdate('monthNamesShort')],
    MMMM: [word, monthUpdate('monthNames')],
    a: [word, function (d, v, i18n) {
      var val = v.toLowerCase();

      if (val === i18n.amPm[0]) {
        d.isPm = false;
      } else if (val === i18n.amPm[1]) {
        d.isPm = true;
      }
    }],
    ZZ: ['[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z', function (d, v) {
      var parts = (v + '').match(/([+-]|\d\d)/gi),
          minutes;

      if (parts) {
        minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
        d.timezoneOffset = parts[0] === '+' ? minutes : -minutes;
      }
    }]
  };
  parseFlags.dd = parseFlags.d;
  parseFlags.dddd = parseFlags.ddd;
  parseFlags.DD = parseFlags.D;
  parseFlags.mm = parseFlags.m;
  parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
  parseFlags.MM = parseFlags.M;
  parseFlags.ss = parseFlags.s;
  parseFlags.A = parseFlags.a; // Some common format strings

  fecha.masks = {
    default: 'ddd MMM dd yyyy HH:mm:ss',
    shortDate: 'M/D/yy',
    mediumDate: 'MMM d, yyyy',
    longDate: 'MMMM d, yyyy',
    fullDate: 'dddd, MMMM d, yyyy',
    shortTime: 'HH:mm',
    mediumTime: 'HH:mm:ss',
    longTime: 'HH:mm:ss.SSS'
  };
  /***
   * Format a date
   * @method format
   * @param {Date|number} dateObj
   * @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate'
   */

  fecha.format = function (dateObj, mask, i18nSettings) {
    var i18n = i18nSettings || fecha.i18n;

    if (typeof dateObj === 'number') {
      dateObj = new Date(dateObj);
    }

    if (Object.prototype.toString.call(dateObj) !== '[object Date]' || isNaN(dateObj.getTime())) {
      throw new Error('Invalid Date in fecha.format');
    }

    mask = fecha.masks[mask] || mask || fecha.masks['default'];
    var literals = []; // Make literals inactive by replacing them with ??

    mask = mask.replace(literal, function ($0, $1) {
      literals.push($1);
      return '@@@';
    }); // Apply formatting rules

    mask = mask.replace(token, function ($0) {
      return $0 in formatFlags ? formatFlags[$0](dateObj, i18n) : $0.slice(1, $0.length - 1);
    }); // Inline literal values back into the formatted value

    return mask.replace(/@@@/g, function () {
      return literals.shift();
    });
  };
  /**
   * Parse a date string into an object, changes - into /
   * @method parse
   * @param {string} dateStr Date string
   * @param {string} format Date parse format
   * @returns {Date|boolean}
   */


  fecha.parse = function (dateStr, format, i18nSettings) {
    var i18n = i18nSettings || fecha.i18n;

    if (typeof format !== 'string') {
      throw new Error('Invalid format in fecha.parse');
    }

    format = fecha.masks[format] || format; // Avoid regular expression denial of service, fail early for really long strings
    // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS

    if (dateStr.length > 1000) {
      return null;
    }

    var dateInfo = {};
    var parseInfo = [];
    var literals = [];
    format = format.replace(literal, function ($0, $1) {
      literals.push($1);
      return '@@@';
    });
    var newFormat = regexEscape(format).replace(token, function ($0) {
      if (parseFlags[$0]) {
        var info = parseFlags[$0];
        parseInfo.push(info[1]);
        return '(' + info[0] + ')';
      }

      return $0;
    });
    newFormat = newFormat.replace(/@@@/g, function () {
      return literals.shift();
    });
    var matches = dateStr.match(new RegExp(newFormat, 'i'));

    if (!matches) {
      return null;
    }

    for (var i = 1; i < matches.length; i++) {
      parseInfo[i - 1](dateInfo, matches[i], i18n);
    }

    var today = new Date();

    if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
      dateInfo.hour = +dateInfo.hour + 12;
    } else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
      dateInfo.hour = 0;
    }

    var date;

    if (dateInfo.timezoneOffset != null) {
      dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
      date = new Date(Date.UTC(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0));
    } else {
      date = new Date(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0);
    }

    return date;
  };
  /* istanbul ignore next */


  if ( true && module.exports) {
    module.exports = fecha;
  } else if (true) {
    !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
      return fecha;
    }).call(exports, __webpack_require__, exports, module),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else {}
})(undefined);

/***/ }),

/***/ "d7d5":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"));
  else {}
})(function(CodeMirror) {
  CodeMirror.defineOption("placeholder", "", function(cm, val, old) {
    var prev = old && old != CodeMirror.Init;
    if (val && !prev) {
      cm.on("blur", onBlur);
      cm.on("change", onChange);
      cm.on("swapDoc", onChange);
      CodeMirror.on(cm.getInputField(), "compositionupdate", cm.state.placeholderCompose = function() { onComposition(cm) })
      onChange(cm);
    } else if (!val && prev) {
      cm.off("blur", onBlur);
      cm.off("change", onChange);
      cm.off("swapDoc", onChange);
      CodeMirror.off(cm.getInputField(), "compositionupdate", cm.state.placeholderCompose)
      clearPlaceholder(cm);
      var wrapper = cm.getWrapperElement();
      wrapper.className = wrapper.className.replace(" CodeMirror-empty", "");
    }

    if (val && !cm.hasFocus()) onBlur(cm);
  });

  function clearPlaceholder(cm) {
    if (cm.state.placeholder) {
      cm.state.placeholder.parentNode.removeChild(cm.state.placeholder);
      cm.state.placeholder = null;
    }
  }
  function setPlaceholder(cm) {
    clearPlaceholder(cm);
    var elt = cm.state.placeholder = document.createElement("pre");
    elt.style.cssText = "height: 0; overflow: visible";
    elt.style.direction = cm.getOption("direction");
    elt.className = "CodeMirror-placeholder CodeMirror-line-like";
    var placeHolder = cm.getOption("placeholder")
    if (typeof placeHolder == "string") placeHolder = document.createTextNode(placeHolder)
    elt.appendChild(placeHolder)
    cm.display.lineSpace.insertBefore(elt, cm.display.lineSpace.firstChild);
  }

  function onComposition(cm) {
    setTimeout(function() {
      var empty = false
      if (cm.lineCount() == 1) {
        var input = cm.getInputField()
        empty = input.nodeName == "TEXTAREA" ? !cm.getLine(0).length
          : !/[^\u200b]/.test(input.querySelector(".CodeMirror-line").textContent)
      }
      if (empty) setPlaceholder(cm)
      else clearPlaceholder(cm)
    }, 20)
  }

  function onBlur(cm) {
    if (isEmpty(cm)) setPlaceholder(cm);
  }
  function onChange(cm) {
    var wrapper = cm.getWrapperElement(), empty = isEmpty(cm);
    wrapper.className = wrapper.className.replace(" CodeMirror-empty", "") + (empty ? " CodeMirror-empty" : "");

    if (empty) setPlaceholder(cm);
    else clearPlaceholder(cm);
  }

  function isEmpty(cm) {
    return (cm.lineCount() === 1) && (cm.getLine(0) === "");
  }
});


/***/ }),

/***/ "d81d":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var $map = __webpack_require__("b727").map;
var arrayMethodHasSpeciesSupport = __webpack_require__("1dde");
var arrayMethodUsesToLength = __webpack_require__("ae40");

var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
// FF49- issue
var USES_TO_LENGTH = arrayMethodUsesToLength('map');

// `Array.prototype.map` method
// https://tc39.github.io/ecma262/#sec-array.prototype.map
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
  map: function map(callbackfn /* , thisArg */) {
    return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),

/***/ "d925":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


/**
 * Determines whether the specified URL is absolute
 *
 * @param {string} url The URL to test
 * @returns {boolean} True if the specified URL is absolute, otherwise false
 */
module.exports = function isAbsoluteURL(url) {
  // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
  // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
  // by any combination of letters, digits, plus, period, or hyphen.
  return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
};


/***/ }),

/***/ "d940":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


__webpack_require__("99af");

__webpack_require__("4160");

__webpack_require__("c975");

__webpack_require__("d81d");

__webpack_require__("45fc");

__webpack_require__("ac1f");

__webpack_require__("5319");

__webpack_require__("498a");

__webpack_require__("159b");

exports.__esModule = true;
exports.validateRangeInOneMonth = exports.extractTimeFormat = exports.extractDateFormat = exports.nextYear = exports.prevYear = exports.nextMonth = exports.prevMonth = exports.changeYearMonthAndClampDate = exports.timeWithinRange = exports.limitTimeRange = exports.clearMilliseconds = exports.clearTime = exports.modifyWithTimeString = exports.modifyTime = exports.modifyDate = exports.range = exports.getRangeMinutes = exports.getMonthDays = exports.getPrevMonthLastDays = exports.getRangeHours = exports.getWeekNumber = exports.getStartDateOfMonth = exports.nextDate = exports.prevDate = exports.getFirstDayOfMonth = exports.getDayCountOfYear = exports.getDayCountOfMonth = exports.parseDate = exports.formatDate = exports.isDateObject = exports.isDate = exports.toDate = exports.getI18nSettings = undefined;

var _date = __webpack_require__("d7d1");

var _date2 = _interopRequireDefault(_date);

var _locale = __webpack_require__("4897");

function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    default: obj
  };
}

var weeks = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];
var months = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'];

var newArray = function newArray(start, end) {
  var result = [];

  for (var i = start; i <= end; i++) {
    result.push(i);
  }

  return result;
};

var getI18nSettings = exports.getI18nSettings = function getI18nSettings() {
  return {
    dayNamesShort: weeks.map(function (week) {
      return (0, _locale.t)('el.datepicker.weeks.' + week);
    }),
    dayNames: weeks.map(function (week) {
      return (0, _locale.t)('el.datepicker.weeks.' + week);
    }),
    monthNamesShort: months.map(function (month) {
      return (0, _locale.t)('el.datepicker.months.' + month);
    }),
    monthNames: months.map(function (month, index) {
      return (0, _locale.t)('el.datepicker.month' + (index + 1));
    }),
    amPm: ['am', 'pm']
  };
};

var toDate = exports.toDate = function toDate(date) {
  return isDate(date) ? new Date(date) : null;
};

var isDate = exports.isDate = function isDate(date) {
  if (date === null || date === undefined) return false;
  if (isNaN(new Date(date).getTime())) return false;
  if (Array.isArray(date)) return false; // deal with `new Date([ new Date() ]) -> new Date()`

  return true;
};

var isDateObject = exports.isDateObject = function isDateObject(val) {
  return val instanceof Date;
};

var formatDate = exports.formatDate = function formatDate(date, format) {
  date = toDate(date);
  if (!date) return '';
  return _date2.default.format(date, format || 'yyyy-MM-dd', getI18nSettings());
};

var parseDate = exports.parseDate = function parseDate(string, format) {
  return _date2.default.parse(string, format || 'yyyy-MM-dd', getI18nSettings());
};

var getDayCountOfMonth = exports.getDayCountOfMonth = function getDayCountOfMonth(year, month) {
  if (month === 3 || month === 5 || month === 8 || month === 10) {
    return 30;
  }

  if (month === 1) {
    if (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0) {
      return 29;
    } else {
      return 28;
    }
  }

  return 31;
};

var getDayCountOfYear = exports.getDayCountOfYear = function getDayCountOfYear(year) {
  var isLeapYear = year % 400 === 0 || year % 100 !== 0 && year % 4 === 0;
  return isLeapYear ? 366 : 365;
};

var getFirstDayOfMonth = exports.getFirstDayOfMonth = function getFirstDayOfMonth(date) {
  var temp = new Date(date.getTime());
  temp.setDate(1);
  return temp.getDay();
}; // see: https://stackoverflow.com/questions/3674539/incrementing-a-date-in-javascript
// {prev, next} Date should work for Daylight Saving Time
// Adding 24 * 60 * 60 * 1000 does not work in the above scenario


var prevDate = exports.prevDate = function prevDate(date) {
  var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
  return new Date(date.getFullYear(), date.getMonth(), date.getDate() - amount);
};

var nextDate = exports.nextDate = function nextDate(date) {
  var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
  return new Date(date.getFullYear(), date.getMonth(), date.getDate() + amount);
};

var getStartDateOfMonth = exports.getStartDateOfMonth = function getStartDateOfMonth(year, month) {
  var result = new Date(year, month, 1);
  var day = result.getDay();

  if (day === 0) {
    return prevDate(result, 7);
  } else {
    return prevDate(result, day);
  }
};

var getWeekNumber = exports.getWeekNumber = function getWeekNumber(src) {
  if (!isDate(src)) return null;
  var date = new Date(src.getTime());
  date.setHours(0, 0, 0, 0); // Thursday in current week decides the year.

  date.setDate(date.getDate() + 3 - (date.getDay() + 6) % 7); // January 4 is always in week 1.

  var week1 = new Date(date.getFullYear(), 0, 4); // Adjust to Thursday in week 1 and count number of weeks from date to week 1.
  // Rounding should be fine for Daylight Saving Time. Its shift should never be more than 12 hours.

  return 1 + Math.round(((date.getTime() - week1.getTime()) / 86400000 - 3 + (week1.getDay() + 6) % 7) / 7);
};

var getRangeHours = exports.getRangeHours = function getRangeHours(ranges) {
  var hours = [];
  var disabledHours = [];
  (ranges || []).forEach(function (range) {
    var value = range.map(function (date) {
      return date.getHours();
    });
    disabledHours = disabledHours.concat(newArray(value[0], value[1]));
  });

  if (disabledHours.length) {
    for (var i = 0; i < 24; i++) {
      hours[i] = disabledHours.indexOf(i) === -1;
    }
  } else {
    for (var _i = 0; _i < 24; _i++) {
      hours[_i] = false;
    }
  }

  return hours;
};

var getPrevMonthLastDays = exports.getPrevMonthLastDays = function getPrevMonthLastDays(date, amount) {
  if (amount <= 0) return [];
  var temp = new Date(date.getTime());
  temp.setDate(0);
  var lastDay = temp.getDate();
  return range(amount).map(function (_, index) {
    return lastDay - (amount - index - 1);
  });
};

var getMonthDays = exports.getMonthDays = function getMonthDays(date) {
  var temp = new Date(date.getFullYear(), date.getMonth() + 1, 0);
  var days = temp.getDate();
  return range(days).map(function (_, index) {
    return index + 1;
  });
};

function setRangeData(arr, start, end, value) {
  for (var i = start; i < end; i++) {
    arr[i] = value;
  }
}

var getRangeMinutes = exports.getRangeMinutes = function getRangeMinutes(ranges, hour) {
  var minutes = new Array(60);

  if (ranges.length > 0) {
    ranges.forEach(function (range) {
      var start = range[0];
      var end = range[1];
      var startHour = start.getHours();
      var startMinute = start.getMinutes();
      var endHour = end.getHours();
      var endMinute = end.getMinutes();

      if (startHour === hour && endHour !== hour) {
        setRangeData(minutes, startMinute, 60, true);
      } else if (startHour === hour && endHour === hour) {
        setRangeData(minutes, startMinute, endMinute + 1, true);
      } else if (startHour !== hour && endHour === hour) {
        setRangeData(minutes, 0, endMinute + 1, true);
      } else if (startHour < hour && endHour > hour) {
        setRangeData(minutes, 0, 60, true);
      }
    });
  } else {
    setRangeData(minutes, 0, 60, true);
  }

  return minutes;
};

var range = exports.range = function range(n) {
  // see https://stackoverflow.com/questions/3746725/create-a-javascript-array-containing-1-n
  return Array.apply(null, {
    length: n
  }).map(function (_, n) {
    return n;
  });
};

var modifyDate = exports.modifyDate = function modifyDate(date, y, m, d) {
  return new Date(y, m, d, date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
};

var modifyTime = exports.modifyTime = function modifyTime(date, h, m, s) {
  return new Date(date.getFullYear(), date.getMonth(), date.getDate(), h, m, s, date.getMilliseconds());
};

var modifyWithTimeString = exports.modifyWithTimeString = function modifyWithTimeString(date, time) {
  if (date == null || !time) {
    return date;
  }

  time = parseDate(time, 'HH:mm:ss');
  return modifyTime(date, time.getHours(), time.getMinutes(), time.getSeconds());
};

var clearTime = exports.clearTime = function clearTime(date) {
  return new Date(date.getFullYear(), date.getMonth(), date.getDate());
};

var clearMilliseconds = exports.clearMilliseconds = function clearMilliseconds(date) {
  return new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), 0);
};

var limitTimeRange = exports.limitTimeRange = function limitTimeRange(date, ranges) {
  var format = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'HH:mm:ss'; // TODO: refactory a more elegant solution

  if (ranges.length === 0) return date;

  var normalizeDate = function normalizeDate(date) {
    return _date2.default.parse(_date2.default.format(date, format), format);
  };

  var ndate = normalizeDate(date);
  var nranges = ranges.map(function (range) {
    return range.map(normalizeDate);
  });
  if (nranges.some(function (nrange) {
    return ndate >= nrange[0] && ndate <= nrange[1];
  })) return date;
  var minDate = nranges[0][0];
  var maxDate = nranges[0][0];
  nranges.forEach(function (nrange) {
    minDate = new Date(Math.min(nrange[0], minDate));
    maxDate = new Date(Math.max(nrange[1], minDate));
  });
  var ret = ndate < minDate ? minDate : maxDate; // preserve Year/Month/Date

  return modifyDate(ret, date.getFullYear(), date.getMonth(), date.getDate());
};

var timeWithinRange = exports.timeWithinRange = function timeWithinRange(date, selectableRange, format) {
  var limitedDate = limitTimeRange(date, selectableRange, format);
  return limitedDate.getTime() === date.getTime();
};

var changeYearMonthAndClampDate = exports.changeYearMonthAndClampDate = function changeYearMonthAndClampDate(date, year, month) {
  // clamp date to the number of days in `year`, `month`
  // eg: (2010-1-31, 2010, 2) => 2010-2-28
  var monthDate = Math.min(date.getDate(), getDayCountOfMonth(year, month));
  return modifyDate(date, year, month, monthDate);
};

var prevMonth = exports.prevMonth = function prevMonth(date) {
  var year = date.getFullYear();
  var month = date.getMonth();
  return month === 0 ? changeYearMonthAndClampDate(date, year - 1, 11) : changeYearMonthAndClampDate(date, year, month - 1);
};

var nextMonth = exports.nextMonth = function nextMonth(date) {
  var year = date.getFullYear();
  var month = date.getMonth();
  return month === 11 ? changeYearMonthAndClampDate(date, year + 1, 0) : changeYearMonthAndClampDate(date, year, month + 1);
};

var prevYear = exports.prevYear = function prevYear(date) {
  var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
  var year = date.getFullYear();
  var month = date.getMonth();
  return changeYearMonthAndClampDate(date, year - amount, month);
};

var nextYear = exports.nextYear = function nextYear(date) {
  var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
  var year = date.getFullYear();
  var month = date.getMonth();
  return changeYearMonthAndClampDate(date, year + amount, month);
};

var extractDateFormat = exports.extractDateFormat = function extractDateFormat(format) {
  return format.replace(/\W?m{1,2}|\W?ZZ/g, '').replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, '').trim();
};

var extractTimeFormat = exports.extractTimeFormat = function extractTimeFormat(format) {
  return format.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?y{2,4}/g, '').trim();
};

var validateRangeInOneMonth = exports.validateRangeInOneMonth = function validateRangeInOneMonth(start, end) {
  return start.getMonth() === end.getMonth() && start.getFullYear() === end.getFullYear();
};

/***/ }),

/***/ "da84":
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global) {var check = function (it) {
  return it && it.Math == Math && it;
};

// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
module.exports =
  // eslint-disable-next-line no-undef
  check(typeof globalThis == 'object' && globalThis) ||
  check(typeof window == 'object' && window) ||
  check(typeof self == 'object' && self) ||
  check(typeof global == 'object' && global) ||
  // eslint-disable-next-line no-new-func
  Function('return this')();

/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))

/***/ }),

/***/ "db91":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"));
  else {}
})(function(CodeMirror) {
  "use strict";

  function wordRegexp(words) {
    return new RegExp("^((" + words.join(")|(") + "))\\b");
  }

  var wordOperators = wordRegexp(["and", "or", "not", "is"]);
  var commonKeywords = ["as", "assert", "break", "class", "continue",
                        "def", "del", "elif", "else", "except", "finally",
                        "for", "from", "global", "if", "import",
                        "lambda", "pass", "raise", "return",
                        "try", "while", "with", "yield", "in"];
  var commonBuiltins = ["abs", "all", "any", "bin", "bool", "bytearray", "callable", "chr",
                        "classmethod", "compile", "complex", "delattr", "dict", "dir", "divmod",
                        "enumerate", "eval", "filter", "float", "format", "frozenset",
                        "getattr", "globals", "hasattr", "hash", "help", "hex", "id",
                        "input", "int", "isinstance", "issubclass", "iter", "len",
                        "list", "locals", "map", "max", "memoryview", "min", "next",
                        "object", "oct", "open", "ord", "pow", "property", "range",
                        "repr", "reversed", "round", "set", "setattr", "slice",
                        "sorted", "staticmethod", "str", "sum", "super", "tuple",
                        "type", "vars", "zip", "__import__", "NotImplemented",
                        "Ellipsis", "__debug__"];
  CodeMirror.registerHelper("hintWords", "python", commonKeywords.concat(commonBuiltins));

  function top(state) {
    return state.scopes[state.scopes.length - 1];
  }

  CodeMirror.defineMode("python", function(conf, parserConf) {
    var ERRORCLASS = "error";

    var delimiters = parserConf.delimiters || parserConf.singleDelimiters || /^[\(\)\[\]\{\}@,:`=;\.\\]/;
    //               (Backwards-compatibility with old, cumbersome config system)
    var operators = [parserConf.singleOperators, parserConf.doubleOperators, parserConf.doubleDelimiters, parserConf.tripleDelimiters,
                     parserConf.operators || /^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/]
    for (var i = 0; i < operators.length; i++) if (!operators[i]) operators.splice(i--, 1)

    var hangingIndent = parserConf.hangingIndent || conf.indentUnit;

    var myKeywords = commonKeywords, myBuiltins = commonBuiltins;
    if (parserConf.extra_keywords != undefined)
      myKeywords = myKeywords.concat(parserConf.extra_keywords);

    if (parserConf.extra_builtins != undefined)
      myBuiltins = myBuiltins.concat(parserConf.extra_builtins);

    var py3 = !(parserConf.version && Number(parserConf.version) < 3)
    if (py3) {
      // since http://legacy.python.org/dev/peps/pep-0465/ @ is also an operator
      var identifiers = parserConf.identifiers|| /^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;
      myKeywords = myKeywords.concat(["nonlocal", "False", "True", "None", "async", "await"]);
      myBuiltins = myBuiltins.concat(["ascii", "bytes", "exec", "print"]);
      var stringPrefixes = new RegExp("^(([rbuf]|(br)|(fr))?('{3}|\"{3}|['\"]))", "i");
    } else {
      var identifiers = parserConf.identifiers|| /^[_A-Za-z][_A-Za-z0-9]*/;
      myKeywords = myKeywords.concat(["exec", "print"]);
      myBuiltins = myBuiltins.concat(["apply", "basestring", "buffer", "cmp", "coerce", "execfile",
                                      "file", "intern", "long", "raw_input", "reduce", "reload",
                                      "unichr", "unicode", "xrange", "False", "True", "None"]);
      var stringPrefixes = new RegExp("^(([rubf]|(ur)|(br))?('{3}|\"{3}|['\"]))", "i");
    }
    var keywords = wordRegexp(myKeywords);
    var builtins = wordRegexp(myBuiltins);

    // tokenizers
    function tokenBase(stream, state) {
      var sol = stream.sol() && state.lastToken != "\\"
      if (sol) state.indent = stream.indentation()
      // Handle scope changes
      if (sol && top(state).type == "py") {
        var scopeOffset = top(state).offset;
        if (stream.eatSpace()) {
          var lineOffset = stream.indentation();
          if (lineOffset > scopeOffset)
            pushPyScope(state);
          else if (lineOffset < scopeOffset && dedent(stream, state) && stream.peek() != "#")
            state.errorToken = true;
          return null;
        } else {
          var style = tokenBaseInner(stream, state);
          if (scopeOffset > 0 && dedent(stream, state))
            style += " " + ERRORCLASS;
          return style;
        }
      }
      return tokenBaseInner(stream, state);
    }

    function tokenBaseInner(stream, state, inFormat) {
      if (stream.eatSpace()) return null;

      // Handle Comments
      if (!inFormat && stream.match(/^#.*/)) return "comment";

      // Handle Number Literals
      if (stream.match(/^[0-9\.]/, false)) {
        var floatLiteral = false;
        // Floats
        if (stream.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)) { floatLiteral = true; }
        if (stream.match(/^[\d_]+\.\d*/)) { floatLiteral = true; }
        if (stream.match(/^\.\d+/)) { floatLiteral = true; }
        if (floatLiteral) {
          // Float literals may be "imaginary"
          stream.eat(/J/i);
          return "number";
        }
        // Integers
        var intLiteral = false;
        // Hex
        if (stream.match(/^0x[0-9a-f_]+/i)) intLiteral = true;
        // Binary
        if (stream.match(/^0b[01_]+/i)) intLiteral = true;
        // Octal
        if (stream.match(/^0o[0-7_]+/i)) intLiteral = true;
        // Decimal
        if (stream.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)) {
          // Decimal literals may be "imaginary"
          stream.eat(/J/i);
          // TODO - Can you have imaginary longs?
          intLiteral = true;
        }
        // Zero by itself with no other piece of number.
        if (stream.match(/^0(?![\dx])/i)) intLiteral = true;
        if (intLiteral) {
          // Integer literals may be "long"
          stream.eat(/L/i);
          return "number";
        }
      }

      // Handle Strings
      if (stream.match(stringPrefixes)) {
        var isFmtString = stream.current().toLowerCase().indexOf('f') !== -1;
        if (!isFmtString) {
          state.tokenize = tokenStringFactory(stream.current(), state.tokenize);
          return state.tokenize(stream, state);
        } else {
          state.tokenize = formatStringFactory(stream.current(), state.tokenize);
          return state.tokenize(stream, state);
        }
      }

      for (var i = 0; i < operators.length; i++)
        if (stream.match(operators[i])) return "operator"

      if (stream.match(delimiters)) return "punctuation";

      if (state.lastToken == "." && stream.match(identifiers))
        return "property";

      if (stream.match(keywords) || stream.match(wordOperators))
        return "keyword";

      if (stream.match(builtins))
        return "builtin";

      if (stream.match(/^(self|cls)\b/))
        return "variable-2";

      if (stream.match(identifiers)) {
        if (state.lastToken == "def" || state.lastToken == "class")
          return "def";
        return "variable";
      }

      // Handle non-detected items
      stream.next();
      return inFormat ? null :ERRORCLASS;
    }

    function formatStringFactory(delimiter, tokenOuter) {
      while ("rubf".indexOf(delimiter.charAt(0).toLowerCase()) >= 0)
        delimiter = delimiter.substr(1);

      var singleline = delimiter.length == 1;
      var OUTCLASS = "string";

      function tokenNestedExpr(depth) {
        return function(stream, state) {
          var inner = tokenBaseInner(stream, state, true)
          if (inner == "punctuation") {
            if (stream.current() == "{") {
              state.tokenize = tokenNestedExpr(depth + 1)
            } else if (stream.current() == "}") {
              if (depth > 1) state.tokenize = tokenNestedExpr(depth - 1)
              else state.tokenize = tokenString
            }
          }
          return inner
        }
      }

      function tokenString(stream, state) {
        while (!stream.eol()) {
          stream.eatWhile(/[^'"\{\}\\]/);
          if (stream.eat("\\")) {
            stream.next();
            if (singleline && stream.eol())
              return OUTCLASS;
          } else if (stream.match(delimiter)) {
            state.tokenize = tokenOuter;
            return OUTCLASS;
          } else if (stream.match('{{')) {
            // ignore {{ in f-str
            return OUTCLASS;
          } else if (stream.match('{', false)) {
            // switch to nested mode
            state.tokenize = tokenNestedExpr(0)
            if (stream.current()) return OUTCLASS;
            else return state.tokenize(stream, state)
          } else if (stream.match('}}')) {
            return OUTCLASS;
          } else if (stream.match('}')) {
            // single } in f-string is an error
            return ERRORCLASS;
          } else {
            stream.eat(/['"]/);
          }
        }
        if (singleline) {
          if (parserConf.singleLineStringErrors)
            return ERRORCLASS;
          else
            state.tokenize = tokenOuter;
        }
        return OUTCLASS;
      }
      tokenString.isString = true;
      return tokenString;
    }

    function tokenStringFactory(delimiter, tokenOuter) {
      while ("rubf".indexOf(delimiter.charAt(0).toLowerCase()) >= 0)
        delimiter = delimiter.substr(1);

      var singleline = delimiter.length == 1;
      var OUTCLASS = "string";

      function tokenString(stream, state) {
        while (!stream.eol()) {
          stream.eatWhile(/[^'"\\]/);
          if (stream.eat("\\")) {
            stream.next();
            if (singleline && stream.eol())
              return OUTCLASS;
          } else if (stream.match(delimiter)) {
            state.tokenize = tokenOuter;
            return OUTCLASS;
          } else {
            stream.eat(/['"]/);
          }
        }
        if (singleline) {
          if (parserConf.singleLineStringErrors)
            return ERRORCLASS;
          else
            state.tokenize = tokenOuter;
        }
        return OUTCLASS;
      }
      tokenString.isString = true;
      return tokenString;
    }

    function pushPyScope(state) {
      while (top(state).type != "py") state.scopes.pop()
      state.scopes.push({offset: top(state).offset + conf.indentUnit,
                         type: "py",
                         align: null})
    }

    function pushBracketScope(stream, state, type) {
      var align = stream.match(/^([\s\[\{\(]|#.*)*$/, false) ? null : stream.column() + 1
      state.scopes.push({offset: state.indent + hangingIndent,
                         type: type,
                         align: align})
    }

    function dedent(stream, state) {
      var indented = stream.indentation();
      while (state.scopes.length > 1 && top(state).offset > indented) {
        if (top(state).type != "py") return true;
        state.scopes.pop();
      }
      return top(state).offset != indented;
    }

    function tokenLexer(stream, state) {
      if (stream.sol()) state.beginningOfLine = true;

      var style = state.tokenize(stream, state);
      var current = stream.current();

      // Handle decorators
      if (state.beginningOfLine && current == "@")
        return stream.match(identifiers, false) ? "meta" : py3 ? "operator" : ERRORCLASS;

      if (/\S/.test(current)) state.beginningOfLine = false;

      if ((style == "variable" || style == "builtin")
          && state.lastToken == "meta")
        style = "meta";

      // Handle scope changes.
      if (current == "pass" || current == "return")
        state.dedent += 1;

      if (current == "lambda") state.lambda = true;
      if (current == ":" && !state.lambda && top(state).type == "py")
        pushPyScope(state);

      if (current.length == 1 && !/string|comment/.test(style)) {
        var delimiter_index = "[({".indexOf(current);
        if (delimiter_index != -1)
          pushBracketScope(stream, state, "])}".slice(delimiter_index, delimiter_index+1));

        delimiter_index = "])}".indexOf(current);
        if (delimiter_index != -1) {
          if (top(state).type == current) state.indent = state.scopes.pop().offset - hangingIndent
          else return ERRORCLASS;
        }
      }
      if (state.dedent > 0 && stream.eol() && top(state).type == "py") {
        if (state.scopes.length > 1) state.scopes.pop();
        state.dedent -= 1;
      }

      return style;
    }

    var external = {
      startState: function(basecolumn) {
        return {
          tokenize: tokenBase,
          scopes: [{offset: basecolumn || 0, type: "py", align: null}],
          indent: basecolumn || 0,
          lastToken: null,
          lambda: false,
          dedent: 0
        };
      },

      token: function(stream, state) {
        var addErr = state.errorToken;
        if (addErr) state.errorToken = false;
        var style = tokenLexer(stream, state);

        if (style && style != "comment")
          state.lastToken = (style == "keyword" || style == "punctuation") ? stream.current() : style;
        if (style == "punctuation") style = null;

        if (stream.eol() && state.lambda)
          state.lambda = false;
        return addErr ? style + " " + ERRORCLASS : style;
      },

      indent: function(state, textAfter) {
        if (state.tokenize != tokenBase)
          return state.tokenize.isString ? CodeMirror.Pass : 0;

        var scope = top(state), closing = scope.type == textAfter.charAt(0)
        if (scope.align != null)
          return scope.align - (closing ? 1 : 0)
        else
          return scope.offset - (closing ? hangingIndent : 0)
      },

      electricInput: /^\s*[\}\]\)]$/,
      closeBrackets: {triples: "'\""},
      lineComment: "#",
      fold: "indent"
    };
    return external;
  });

  CodeMirror.defineMIME("text/x-python", "python");

  var words = function(str) { return str.split(" "); };

  CodeMirror.defineMIME("text/x-cython", {
    name: "python",
    extra_keywords: words("by cdef cimport cpdef ctypedef enum except "+
                          "extern gil include nogil property public "+
                          "readonly struct union DEF IF ELIF ELSE")
  });

});


/***/ }),

/***/ "dca8":
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__("23e7");
var FREEZING = __webpack_require__("bb2f");
var fails = __webpack_require__("d039");
var isObject = __webpack_require__("861d");
var onFreeze = __webpack_require__("f183").onFreeze;

var nativeFreeze = Object.freeze;
var FAILS_ON_PRIMITIVES = fails(function () { nativeFreeze(1); });

// `Object.freeze` method
// https://tc39.github.io/ecma262/#sec-object.freeze
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {
  freeze: function freeze(it) {
    return nativeFreeze && isObject(it) ? nativeFreeze(onFreeze(it)) : it;
  }
});


/***/ }),

/***/ "dcdc":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("944a");

__webpack_require__("99af");

__webpack_require__("c975");

__webpack_require__("fb6a");

__webpack_require__("b0c0");

__webpack_require__("0c47");

__webpack_require__("23dc");

__webpack_require__("a9e3");

__webpack_require__("d3b7");

var _typeof = __webpack_require__("7037");

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

  /******/

  /******/
  // Load entry module and return exports

  /******/

  return __webpack_require__(__webpack_require__.s = 83);
  /******/
}(
/************************************************************************/

/******/
{
  /***/
  0:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";
    /* harmony export (binding) */

    __webpack_require__.d(__webpack_exports__, "a", function () {
      return normalizeComponent;
    });
    /* globals __VUE_SSR_CONTEXT__ */
    // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
    // This module is a runtime utility for cleaner component module output and will
    // be included in the final webpack user bundle.


    function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier,
    /* server only */
    shadowMode
    /* vue-cli only */
    ) {
      // Vue.extend constructor export interop
      var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports; // render functions

      if (render) {
        options.render = render;
        options.staticRenderFns = staticRenderFns;
        options._compiled = true;
      } // functional template


      if (functionalTemplate) {
        options.functional = true;
      } // scopedId


      if (scopeId) {
        options._scopeId = 'data-v-' + scopeId;
      }

      var hook;

      if (moduleIdentifier) {
        // server build
        hook = function hook(context) {
          // 2.3 injection
          context = context || // cached call
          this.$vnode && this.$vnode.ssrContext || // stateful
          this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
          // 2.2 with runInNewContext: true

          if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
            context = __VUE_SSR_CONTEXT__;
          } // inject component styles


          if (injectStyles) {
            injectStyles.call(this, context);
          } // register component module identifier for async chunk inferrence


          if (context && context._registeredComponents) {
            context._registeredComponents.add(moduleIdentifier);
          }
        }; // used by ssr in case component is cached and beforeCreate
        // never gets called


        options._ssrRegister = hook;
      } else if (injectStyles) {
        hook = shadowMode ? function () {
          injectStyles.call(this, this.$root.$options.shadowRoot);
        } : injectStyles;
      }

      if (hook) {
        if (options.functional) {
          // for template-only hot-reload because in that case the render fn doesn't
          // go through the normalizer
          options._injectStyles = hook; // register for functioal component in vue file

          var originalRender = options.render;

          options.render = function renderWithStyleInjection(h, context) {
            hook.call(context);
            return originalRender(h, context);
          };
        } else {
          // inject component registration as beforeCreate hook
          var existing = options.beforeCreate;
          options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
        }
      }

      return {
        exports: scriptExports,
        options: options
      };
    }
    /***/

  },

  /***/
  4:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("d010");
    /***/
  },

  /***/
  83:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox.vue?vue&type=template&id=d0387074&


    var render = function render() {
      var _vm = this;

      var _h = _vm.$createElement;

      var _c = _vm._self._c || _h;

      return _c("label", {
        staticClass: "el-checkbox",
        class: [_vm.border && _vm.checkboxSize ? "el-checkbox--" + _vm.checkboxSize : "", {
          "is-disabled": _vm.isDisabled
        }, {
          "is-bordered": _vm.border
        }, {
          "is-checked": _vm.isChecked
        }],
        attrs: {
          id: _vm.id
        }
      }, [_c("span", {
        staticClass: "el-checkbox__input",
        class: {
          "is-disabled": _vm.isDisabled,
          "is-checked": _vm.isChecked,
          "is-indeterminate": _vm.indeterminate,
          "is-focus": _vm.focus
        },
        attrs: {
          tabindex: _vm.indeterminate ? 0 : false,
          role: _vm.indeterminate ? "checkbox" : false,
          "aria-checked": _vm.indeterminate ? "mixed" : false
        }
      }, [_c("span", {
        staticClass: "el-checkbox__inner"
      }), _vm.trueLabel || _vm.falseLabel ? _c("input", {
        directives: [{
          name: "model",
          rawName: "v-model",
          value: _vm.model,
          expression: "model"
        }],
        staticClass: "el-checkbox__original",
        attrs: {
          type: "checkbox",
          "aria-hidden": _vm.indeterminate ? "true" : "false",
          name: _vm.name,
          disabled: _vm.isDisabled,
          "true-value": _vm.trueLabel,
          "false-value": _vm.falseLabel
        },
        domProps: {
          checked: Array.isArray(_vm.model) ? _vm._i(_vm.model, null) > -1 : _vm._q(_vm.model, _vm.trueLabel)
        },
        on: {
          change: [function ($event) {
            var $$a = _vm.model,
                $$el = $event.target,
                $$c = $$el.checked ? _vm.trueLabel : _vm.falseLabel;

            if (Array.isArray($$a)) {
              var $$v = null,
                  $$i = _vm._i($$a, $$v);

              if ($$el.checked) {
                $$i < 0 && (_vm.model = $$a.concat([$$v]));
              } else {
                $$i > -1 && (_vm.model = $$a.slice(0, $$i).concat($$a.slice($$i + 1)));
              }
            } else {
              _vm.model = $$c;
            }
          }, _vm.handleChange],
          focus: function focus($event) {
            _vm.focus = true;
          },
          blur: function blur($event) {
            _vm.focus = false;
          }
        }
      }) : _c("input", {
        directives: [{
          name: "model",
          rawName: "v-model",
          value: _vm.model,
          expression: "model"
        }],
        staticClass: "el-checkbox__original",
        attrs: {
          type: "checkbox",
          "aria-hidden": _vm.indeterminate ? "true" : "false",
          disabled: _vm.isDisabled,
          name: _vm.name
        },
        domProps: {
          value: _vm.label,
          checked: Array.isArray(_vm.model) ? _vm._i(_vm.model, _vm.label) > -1 : _vm.model
        },
        on: {
          change: [function ($event) {
            var $$a = _vm.model,
                $$el = $event.target,
                $$c = $$el.checked ? true : false;

            if (Array.isArray($$a)) {
              var $$v = _vm.label,
                  $$i = _vm._i($$a, $$v);

              if ($$el.checked) {
                $$i < 0 && (_vm.model = $$a.concat([$$v]));
              } else {
                $$i > -1 && (_vm.model = $$a.slice(0, $$i).concat($$a.slice($$i + 1)));
              }
            } else {
              _vm.model = $$c;
            }
          }, _vm.handleChange],
          focus: function focus($event) {
            _vm.focus = true;
          },
          blur: function blur($event) {
            _vm.focus = false;
          }
        }
      })]), _vm.$slots.default || _vm.label ? _c("span", {
        staticClass: "el-checkbox__label"
      }, [_vm._t("default"), !_vm.$slots.default ? [_vm._v(_vm._s(_vm.label))] : _vm._e()], 2) : _vm._e()]);
    };

    var staticRenderFns = [];
    render._withStripped = true; // CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue?vue&type=template&id=d0387074&
    // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"

    var emitter_ = __webpack_require__(4);

    var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_); // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox.vue?vue&type=script&lang=js&
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //

    /* harmony default export */


    var checkboxvue_type_script_lang_js_ = {
      name: 'ElCheckbox',
      mixins: [emitter_default.a],
      inject: {
        elForm: {
          default: ''
        },
        elFormItem: {
          default: ''
        }
      },
      componentName: 'ElCheckbox',
      data: function data() {
        return {
          selfModel: false,
          focus: false,
          isLimitExceeded: false
        };
      },
      computed: {
        model: {
          get: function get() {
            return this.isGroup ? this.store : this.value !== undefined ? this.value : this.selfModel;
          },
          set: function set(val) {
            if (this.isGroup) {
              this.isLimitExceeded = false;
              this._checkboxGroup.min !== undefined && val.length < this._checkboxGroup.min && (this.isLimitExceeded = true);
              this._checkboxGroup.max !== undefined && val.length > this._checkboxGroup.max && (this.isLimitExceeded = true);
              this.isLimitExceeded === false && this.dispatch('ElCheckboxGroup', 'input', [val]);
            } else {
              this.$emit('input', val);
              this.selfModel = val;
            }
          }
        },
        isChecked: function isChecked() {
          if ({}.toString.call(this.model) === '[object Boolean]') {
            return this.model;
          } else if (Array.isArray(this.model)) {
            return this.model.indexOf(this.label) > -1;
          } else if (this.model !== null && this.model !== undefined) {
            return this.model === this.trueLabel;
          }
        },
        isGroup: function isGroup() {
          var parent = this.$parent;

          while (parent) {
            if (parent.$options.componentName !== 'ElCheckboxGroup') {
              parent = parent.$parent;
            } else {
              this._checkboxGroup = parent;
              return true;
            }
          }

          return false;
        },
        store: function store() {
          return this._checkboxGroup ? this._checkboxGroup.value : this.value;
        },

        /* used to make the isDisabled judgment under max/min props */
        isLimitDisabled: function isLimitDisabled() {
          var _checkboxGroup = this._checkboxGroup,
              max = _checkboxGroup.max,
              min = _checkboxGroup.min;
          return !!(max || min) && this.model.length >= max && !this.isChecked || this.model.length <= min && this.isChecked;
        },
        isDisabled: function isDisabled() {
          return this.isGroup ? this._checkboxGroup.disabled || this.disabled || (this.elForm || {}).disabled || this.isLimitDisabled : this.disabled || (this.elForm || {}).disabled;
        },
        _elFormItemSize: function _elFormItemSize() {
          return (this.elFormItem || {}).elFormItemSize;
        },
        checkboxSize: function checkboxSize() {
          var temCheckboxSize = this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
          return this.isGroup ? this._checkboxGroup.checkboxGroupSize || temCheckboxSize : temCheckboxSize;
        }
      },
      props: {
        value: {},
        label: {},
        indeterminate: Boolean,
        disabled: Boolean,
        checked: Boolean,
        name: String,
        trueLabel: [String, Number],
        falseLabel: [String, Number],
        id: String,

        /* 当indeterminate为真时，为controls提供相关连的checkbox的id，表明元素间的控制关系*/
        controls: String,

        /* 当indeterminate为真时，为controls提供相关连的checkbox的id，表明元素间的控制关系*/
        border: Boolean,
        size: String
      },
      methods: {
        addToStore: function addToStore() {
          if (Array.isArray(this.model) && this.model.indexOf(this.label) === -1) {
            this.model.push(this.label);
          } else {
            this.model = this.trueLabel || true;
          }
        },
        handleChange: function handleChange(ev) {
          var _this = this;

          if (this.isLimitExceeded) return;
          var value = void 0;

          if (ev.target.checked) {
            value = this.trueLabel === undefined ? true : this.trueLabel;
          } else {
            value = this.falseLabel === undefined ? false : this.falseLabel;
          }

          this.$emit('change', value, ev);
          this.$nextTick(function () {
            if (_this.isGroup) {
              _this.dispatch('ElCheckboxGroup', 'change', [_this._checkboxGroup.value]);
            }
          });
        }
      },
      created: function created() {
        this.checked && this.addToStore();
      },
      mounted: function mounted() {
        // 为indeterminate元素 添加aria-controls 属性
        if (this.indeterminate) {
          this.$el.setAttribute('aria-controls', this.controls);
        }
      },
      watch: {
        value: function value(_value) {
          this.dispatch('ElFormItem', 'el.form.change', _value);
        }
      }
    }; // CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue?vue&type=script&lang=js&

    /* harmony default export */

    var src_checkboxvue_type_script_lang_js_ = checkboxvue_type_script_lang_js_; // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js

    var componentNormalizer = __webpack_require__(0); // CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue

    /* normalize component */


    var component = Object(componentNormalizer["a"
    /* default */
    ])(src_checkboxvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null);
    /* hot reload */

    if (false) { var api; }

    component.options.__file = "packages/checkbox/src/checkbox.vue";
    /* harmony default export */

    var src_checkbox = component.exports; // CONCATENATED MODULE: ./packages/checkbox/index.js

    /* istanbul ignore next */

    src_checkbox.install = function (Vue) {
      Vue.component(src_checkbox.name, src_checkbox);
    };
    /* harmony default export */


    var packages_checkbox = __webpack_exports__["default"] = src_checkbox;
    /***/
  }
  /******/

});

/***/ }),

/***/ "dda2":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "ddb0":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var DOMIterables = __webpack_require__("fdbc");
var ArrayIteratorMethods = __webpack_require__("e260");
var createNonEnumerableProperty = __webpack_require__("9112");
var wellKnownSymbol = __webpack_require__("b622");

var ITERATOR = wellKnownSymbol('iterator');
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var ArrayValues = ArrayIteratorMethods.values;

for (var COLLECTION_NAME in DOMIterables) {
  var Collection = global[COLLECTION_NAME];
  var CollectionPrototype = Collection && Collection.prototype;
  if (CollectionPrototype) {
    // some Chrome versions have non-configurable methods on DOMTokenList
    if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
      createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
    } catch (error) {
      CollectionPrototype[ITERATOR] = ArrayValues;
    }
    if (!CollectionPrototype[TO_STRING_TAG]) {
      createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
    }
    if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
      // some Chrome versions have non-configurable methods on DOMTokenList
      if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
        createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
      } catch (error) {
        CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
      }
    }
  }
}


/***/ }),

/***/ "df75":
/***/ (function(module, exports, __webpack_require__) {

var internalObjectKeys = __webpack_require__("ca84");
var enumBugKeys = __webpack_require__("7839");

// `Object.keys` method
// https://tc39.github.io/ecma262/#sec-object.keys
module.exports = Object.keys || function keys(O) {
  return internalObjectKeys(O, enumBugKeys);
};


/***/ }),

/***/ "df7c":
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
// backported and transplited with Babel, with backwards-compat fixes

// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// resolves . and .. elements in a path array with directory names there
// must be no slashes, empty elements, or device names (c:\) in the array
// (so also no leading and trailing slashes - it does not distinguish
// relative and absolute paths)
function normalizeArray(parts, allowAboveRoot) {
  // if the path tries to go above the root, `up` ends up > 0
  var up = 0;
  for (var i = parts.length - 1; i >= 0; i--) {
    var last = parts[i];
    if (last === '.') {
      parts.splice(i, 1);
    } else if (last === '..') {
      parts.splice(i, 1);
      up++;
    } else if (up) {
      parts.splice(i, 1);
      up--;
    }
  }

  // if the path is allowed to go above the root, restore leading ..s
  if (allowAboveRoot) {
    for (; up--; up) {
      parts.unshift('..');
    }
  }

  return parts;
}

// path.resolve([from ...], to)
// posix version
exports.resolve = function() {
  var resolvedPath = '',
      resolvedAbsolute = false;

  for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
    var path = (i >= 0) ? arguments[i] : process.cwd();

    // Skip empty and invalid entries
    if (typeof path !== 'string') {
      throw new TypeError('Arguments to path.resolve must be strings');
    } else if (!path) {
      continue;
    }

    resolvedPath = path + '/' + resolvedPath;
    resolvedAbsolute = path.charAt(0) === '/';
  }

  // At this point the path should be resolved to a full absolute path, but
  // handle relative paths to be safe (might happen when process.cwd() fails)

  // Normalize the path
  resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
    return !!p;
  }), !resolvedAbsolute).join('/');

  return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
};

// path.normalize(path)
// posix version
exports.normalize = function(path) {
  var isAbsolute = exports.isAbsolute(path),
      trailingSlash = substr(path, -1) === '/';

  // Normalize the path
  path = normalizeArray(filter(path.split('/'), function(p) {
    return !!p;
  }), !isAbsolute).join('/');

  if (!path && !isAbsolute) {
    path = '.';
  }
  if (path && trailingSlash) {
    path += '/';
  }

  return (isAbsolute ? '/' : '') + path;
};

// posix version
exports.isAbsolute = function(path) {
  return path.charAt(0) === '/';
};

// posix version
exports.join = function() {
  var paths = Array.prototype.slice.call(arguments, 0);
  return exports.normalize(filter(paths, function(p, index) {
    if (typeof p !== 'string') {
      throw new TypeError('Arguments to path.join must be strings');
    }
    return p;
  }).join('/'));
};


// path.relative(from, to)
// posix version
exports.relative = function(from, to) {
  from = exports.resolve(from).substr(1);
  to = exports.resolve(to).substr(1);

  function trim(arr) {
    var start = 0;
    for (; start < arr.length; start++) {
      if (arr[start] !== '') break;
    }

    var end = arr.length - 1;
    for (; end >= 0; end--) {
      if (arr[end] !== '') break;
    }

    if (start > end) return [];
    return arr.slice(start, end - start + 1);
  }

  var fromParts = trim(from.split('/'));
  var toParts = trim(to.split('/'));

  var length = Math.min(fromParts.length, toParts.length);
  var samePartsLength = length;
  for (var i = 0; i < length; i++) {
    if (fromParts[i] !== toParts[i]) {
      samePartsLength = i;
      break;
    }
  }

  var outputParts = [];
  for (var i = samePartsLength; i < fromParts.length; i++) {
    outputParts.push('..');
  }

  outputParts = outputParts.concat(toParts.slice(samePartsLength));

  return outputParts.join('/');
};

exports.sep = '/';
exports.delimiter = ':';

exports.dirname = function (path) {
  if (typeof path !== 'string') path = path + '';
  if (path.length === 0) return '.';
  var code = path.charCodeAt(0);
  var hasRoot = code === 47 /*/*/;
  var end = -1;
  var matchedSlash = true;
  for (var i = path.length - 1; i >= 1; --i) {
    code = path.charCodeAt(i);
    if (code === 47 /*/*/) {
        if (!matchedSlash) {
          end = i;
          break;
        }
      } else {
      // We saw the first non-path separator
      matchedSlash = false;
    }
  }

  if (end === -1) return hasRoot ? '/' : '.';
  if (hasRoot && end === 1) {
    // return '//';
    // Backwards-compat fix:
    return '/';
  }
  return path.slice(0, end);
};

function basename(path) {
  if (typeof path !== 'string') path = path + '';

  var start = 0;
  var end = -1;
  var matchedSlash = true;
  var i;

  for (i = path.length - 1; i >= 0; --i) {
    if (path.charCodeAt(i) === 47 /*/*/) {
        // If we reached a path separator that was not part of a set of path
        // separators at the end of the string, stop now
        if (!matchedSlash) {
          start = i + 1;
          break;
        }
      } else if (end === -1) {
      // We saw the first non-path separator, mark this as the end of our
      // path component
      matchedSlash = false;
      end = i + 1;
    }
  }

  if (end === -1) return '';
  return path.slice(start, end);
}

// Uses a mixed approach for backwards-compatibility, as ext behavior changed
// in new Node.js versions, so only basename() above is backported here
exports.basename = function (path, ext) {
  var f = basename(path);
  if (ext && f.substr(-1 * ext.length) === ext) {
    f = f.substr(0, f.length - ext.length);
  }
  return f;
};

exports.extname = function (path) {
  if (typeof path !== 'string') path = path + '';
  var startDot = -1;
  var startPart = 0;
  var end = -1;
  var matchedSlash = true;
  // Track the state of characters (if any) we see before our first dot and
  // after any path separator we find
  var preDotState = 0;
  for (var i = path.length - 1; i >= 0; --i) {
    var code = path.charCodeAt(i);
    if (code === 47 /*/*/) {
        // If we reached a path separator that was not part of a set of path
        // separators at the end of the string, stop now
        if (!matchedSlash) {
          startPart = i + 1;
          break;
        }
        continue;
      }
    if (end === -1) {
      // We saw the first non-path separator, mark this as the end of our
      // extension
      matchedSlash = false;
      end = i + 1;
    }
    if (code === 46 /*.*/) {
        // If this is our first dot, mark it as the start of our extension
        if (startDot === -1)
          startDot = i;
        else if (preDotState !== 1)
          preDotState = 1;
    } else if (startDot !== -1) {
      // We saw a non-dot and non-path separator before our dot, so we should
      // have a good chance at having a non-empty extension
      preDotState = -1;
    }
  }

  if (startDot === -1 || end === -1 ||
      // We saw a non-dot character immediately before the dot
      preDotState === 0 ||
      // The (right-most) trimmed path component is exactly '..'
      preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
    return '';
  }
  return path.slice(startDot, end);
};

function filter (xs, f) {
    if (xs.filter) return xs.filter(f);
    var res = [];
    for (var i = 0; i < xs.length; i++) {
        if (f(xs[i], i, xs)) res.push(xs[i]);
    }
    return res;
}

// String.prototype.substr - negative index don't work in IE8
var substr = 'ab'.substr(-1) === 'b'
    ? function (str, start, len) { return str.substr(start, len) }
    : function (str, start, len) {
        if (start < 0) start = str.length + start;
        return str.substr(start, len);
    }
;

/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("4362")))

/***/ }),

/***/ "dfe5":
/***/ (function(module, exports) {



/***/ }),

/***/ "e01a":
/***/ (function(module, exports, __webpack_require__) {

"use strict";
// `Symbol.prototype.description` getter
// https://tc39.github.io/ecma262/#sec-symbol.prototype.description

var $ = __webpack_require__("23e7");
var DESCRIPTORS = __webpack_require__("83ab");
var global = __webpack_require__("da84");
var has = __webpack_require__("5135");
var isObject = __webpack_require__("861d");
var defineProperty = __webpack_require__("9bf2").f;
var copyConstructorProperties = __webpack_require__("e893");

var NativeSymbol = global.Symbol;

if (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||
  // Safari 12 bug
  NativeSymbol().description !== undefined
)) {
  var EmptyStringDescriptionStore = {};
  // wrap Symbol constructor for correct work with undefined description
  var SymbolWrapper = function Symbol() {
    var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);
    var result = this instanceof SymbolWrapper
      ? new NativeSymbol(description)
      // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
      : description === undefined ? NativeSymbol() : NativeSymbol(description);
    if (description === '') EmptyStringDescriptionStore[result] = true;
    return result;
  };
  copyConstructorProperties(SymbolWrapper, NativeSymbol);
  var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;
  symbolPrototype.constructor = SymbolWrapper;

  var symbolToString = symbolPrototype.toString;
  var native = String(NativeSymbol('test')) == 'Symbol(test)';
  var regexp = /^Symbol\((.*)\)[^)]+$/;
  defineProperty(symbolPrototype, 'description', {
    configurable: true,
    get: function description() {
      var symbol = isObject(this) ? this.valueOf() : this;
      var string = symbolToString.call(symbol);
      if (has(EmptyStringDescriptionStore, symbol)) return '';
      var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');
      return desc === '' ? undefined : desc;
    }
  });

  $({ global: true, forced: true }, {
    Symbol: SymbolWrapper
  });
}


/***/ }),

/***/ "e163":
/***/ (function(module, exports, __webpack_require__) {

var has = __webpack_require__("5135");
var toObject = __webpack_require__("7b0b");
var sharedKey = __webpack_require__("f772");
var CORRECT_PROTOTYPE_GETTER = __webpack_require__("e177");

var IE_PROTO = sharedKey('IE_PROTO');
var ObjectPrototype = Object.prototype;

// `Object.getPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
  O = toObject(O);
  if (has(O, IE_PROTO)) return O[IE_PROTO];
  if (typeof O.constructor == 'function' && O instanceof O.constructor) {
    return O.constructor.prototype;
  } return O instanceof Object ? ObjectPrototype : null;
};


/***/ }),

/***/ "e177":
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__("d039");

module.exports = !fails(function () {
  function F() { /* empty */ }
  F.prototype.constructor = null;
  return Object.getPrototypeOf(new F()) !== F.prototype;
});


/***/ }),

/***/ "e198":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("ef08");
var core = __webpack_require__("5524");
var LIBRARY = __webpack_require__("e444");
var wksExt = __webpack_require__("fcd4");
var defineProperty = __webpack_require__("1a14").f;
module.exports = function (name) {
  var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
  if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
};


/***/ }),

/***/ "e1de":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"), __webpack_require__("76ae"), __webpack_require__("eb0c"));
  else {}
})(function(CodeMirror) {
  "use strict";

  CodeMirror.defineSimpleMode("handlebars-tags", {
    start: [
      { regex: /\{\{\{/, push: "handlebars_raw", token: "tag" },
      { regex: /\{\{!--/, push: "dash_comment", token: "comment" },
      { regex: /\{\{!/,   push: "comment", token: "comment" },
      { regex: /\{\{/,    push: "handlebars", token: "tag" }
    ],
    handlebars_raw: [
      { regex: /\}\}\}/, pop: true, token: "tag" },
    ],
    handlebars: [
      { regex: /\}\}/, pop: true, token: "tag" },

      // Double and single quotes
      { regex: /"(?:[^\\"]|\\.)*"?/, token: "string" },
      { regex: /'(?:[^\\']|\\.)*'?/, token: "string" },

      // Handlebars keywords
      { regex: />|[#\/]([A-Za-z_]\w*)/, token: "keyword" },
      { regex: /(?:else|this)\b/, token: "keyword" },

      // Numeral
      { regex: /\d+/i, token: "number" },

      // Atoms like = and .
      { regex: /=|~|@|true|false/, token: "atom" },

      // Paths
      { regex: /(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/, token: "variable-2" }
    ],
    dash_comment: [
      { regex: /--\}\}/, pop: true, token: "comment" },

      // Commented code
      { regex: /./, token: "comment"}
    ],
    comment: [
      { regex: /\}\}/, pop: true, token: "comment" },
      { regex: /./, token: "comment" }
    ],
    meta: {
      blockCommentStart: "{{--",
      blockCommentEnd: "--}}"
    }
  });

  CodeMirror.defineMode("handlebars", function(config, parserConfig) {
    var handlebars = CodeMirror.getMode(config, "handlebars-tags");
    if (!parserConfig || !parserConfig.base) return handlebars;
    return CodeMirror.multiplexingMode(
      CodeMirror.getMode(config, parserConfig.base),
      {open: "{{", close: /\}\}\}?/, mode: handlebars, parseDelimiters: true}
    );
  });

  CodeMirror.defineMIME("text/x-handlebars-template", "handlebars");
});


/***/ }),

/***/ "e1f4":
/***/ (function(module, exports) {

// Unique ID creation requires a high quality random # generator.  In the
// browser this is a little complicated due to unknown quality of Math.random()
// and inconsistent support for the `crypto` API.  We do the best we can via
// feature-detection

// getRandomValues needs to be invoked in a context where "this" is a Crypto
// implementation. Also, find the complete implementation of crypto on IE11.
var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||
                      (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));

if (getRandomValues) {
  // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
  var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef

  module.exports = function whatwgRNG() {
    getRandomValues(rnds8);
    return rnds8;
  };
} else {
  // Math.random()-based (RNG)
  //
  // If all else fails, use Math.random().  It's fast, but is of unspecified
  // quality.
  var rnds = new Array(16);

  module.exports = function mathRNG() {
    for (var i = 0, r; i < 16; i++) {
      if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
      rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
    }

    return rnds;
  };
}


/***/ }),

/***/ "e240":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "e260":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toIndexedObject = __webpack_require__("fc6a");
var addToUnscopables = __webpack_require__("44d2");
var Iterators = __webpack_require__("3f8c");
var InternalStateModule = __webpack_require__("69f3");
var defineIterator = __webpack_require__("7dd0");

var ARRAY_ITERATOR = 'Array Iterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);

// `Array.prototype.entries` method
// https://tc39.github.io/ecma262/#sec-array.prototype.entries
// `Array.prototype.keys` method
// https://tc39.github.io/ecma262/#sec-array.prototype.keys
// `Array.prototype.values` method
// https://tc39.github.io/ecma262/#sec-array.prototype.values
// `Array.prototype[@@iterator]` method
// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator
// `CreateArrayIterator` internal method
// https://tc39.github.io/ecma262/#sec-createarrayiterator
module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
  setInternalState(this, {
    type: ARRAY_ITERATOR,
    target: toIndexedObject(iterated), // target
    index: 0,                          // next index
    kind: kind                         // kind
  });
// `%ArrayIteratorPrototype%.next` method
// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next
}, function () {
  var state = getInternalState(this);
  var target = state.target;
  var kind = state.kind;
  var index = state.index++;
  if (!target || index >= target.length) {
    state.target = undefined;
    return { value: undefined, done: true };
  }
  if (kind == 'keys') return { value: index, done: false };
  if (kind == 'values') return { value: target[index], done: false };
  return { value: [index, target[index]], done: false };
}, 'values');

// argumentsList[@@iterator] is %ArrayProto_values%
// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject
// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject
Iterators.Arguments = Iterators.Array;

// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');


/***/ }),

/***/ "e2ae":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_layout_vue_vue_type_style_index_0_scope_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("576e");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_layout_vue_vue_type_style_index_0_scope_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_layout_vue_vue_type_style_index_0_scope_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_layout_vue_vue_type_style_index_0_scope_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "e2cc":
/***/ (function(module, exports, __webpack_require__) {

var redefine = __webpack_require__("6eeb");

module.exports = function (target, src, options) {
  for (var key in src) redefine(target, key, src[key], options);
  return target;
};


/***/ }),

/***/ "e34a":
/***/ (function(module, exports, __webpack_require__) {

var META = __webpack_require__("8b1a")('meta');
var isObject = __webpack_require__("7a41");
var has = __webpack_require__("9c0e");
var setDesc = __webpack_require__("1a14").f;
var id = 0;
var isExtensible = Object.isExtensible || function () {
  return true;
};
var FREEZE = !__webpack_require__("4b8b")(function () {
  return isExtensible(Object.preventExtensions({}));
});
var setMeta = function (it) {
  setDesc(it, META, { value: {
    i: 'O' + ++id, // object ID
    w: {}          // weak collections IDs
  } });
};
var fastKey = function (it, create) {
  // return primitive with prefix
  if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
  if (!has(it, META)) {
    // can't set metadata to uncaught frozen object
    if (!isExtensible(it)) return 'F';
    // not necessary to add metadata
    if (!create) return 'E';
    // add missing metadata
    setMeta(it);
  // return object ID
  } return it[META].i;
};
var getWeak = function (it, create) {
  if (!has(it, META)) {
    // can't set metadata to uncaught frozen object
    if (!isExtensible(it)) return true;
    // not necessary to add metadata
    if (!create) return false;
    // add missing metadata
    setMeta(it);
  // return hash weak collections IDs
  } return it[META].w;
};
// add metadata on freeze-family methods calling
var onFreeze = function (it) {
  if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
  return it;
};
var meta = module.exports = {
  KEY: META,
  NEED: false,
  fastKey: fastKey,
  getWeak: getWeak,
  onFreeze: onFreeze
};


/***/ }),

/***/ "e439":
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__("23e7");
var fails = __webpack_require__("d039");
var toIndexedObject = __webpack_require__("fc6a");
var nativeGetOwnPropertyDescriptor = __webpack_require__("06cf").f;
var DESCRIPTORS = __webpack_require__("83ab");

var FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });
var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;

// `Object.getOwnPropertyDescriptor` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
  getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
    return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
  }
});


/***/ }),

/***/ "e444":
/***/ (function(module, exports) {

module.exports = true;


/***/ }),

/***/ "e450":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("944a");

__webpack_require__("99af");

__webpack_require__("c975");

__webpack_require__("b0c0");

__webpack_require__("0c47");

__webpack_require__("23dc");

__webpack_require__("a9e3");

__webpack_require__("b680");

__webpack_require__("d3b7");

__webpack_require__("25f0");

var _typeof = __webpack_require__("7037");

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

  /******/

  /******/
  // Load entry module and return exports

  /******/

  return __webpack_require__(__webpack_require__.s = 114);
  /******/
}(
/************************************************************************/

/******/
{
  /***/
  0:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";
    /* harmony export (binding) */

    __webpack_require__.d(__webpack_exports__, "a", function () {
      return normalizeComponent;
    });
    /* globals __VUE_SSR_CONTEXT__ */
    // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
    // This module is a runtime utility for cleaner component module output and will
    // be included in the final webpack user bundle.


    function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier,
    /* server only */
    shadowMode
    /* vue-cli only */
    ) {
      // Vue.extend constructor export interop
      var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports; // render functions

      if (render) {
        options.render = render;
        options.staticRenderFns = staticRenderFns;
        options._compiled = true;
      } // functional template


      if (functionalTemplate) {
        options.functional = true;
      } // scopedId


      if (scopeId) {
        options._scopeId = 'data-v-' + scopeId;
      }

      var hook;

      if (moduleIdentifier) {
        // server build
        hook = function hook(context) {
          // 2.3 injection
          context = context || // cached call
          this.$vnode && this.$vnode.ssrContext || // stateful
          this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
          // 2.2 with runInNewContext: true

          if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
            context = __VUE_SSR_CONTEXT__;
          } // inject component styles


          if (injectStyles) {
            injectStyles.call(this, context);
          } // register component module identifier for async chunk inferrence


          if (context && context._registeredComponents) {
            context._registeredComponents.add(moduleIdentifier);
          }
        }; // used by ssr in case component is cached and beforeCreate
        // never gets called


        options._ssrRegister = hook;
      } else if (injectStyles) {
        hook = shadowMode ? function () {
          injectStyles.call(this, this.$root.$options.shadowRoot);
        } : injectStyles;
      }

      if (hook) {
        if (options.functional) {
          // for template-only hot-reload because in that case the render fn doesn't
          // go through the normalizer
          options._injectStyles = hook; // register for functioal component in vue file

          var originalRender = options.render;

          options.render = function renderWithStyleInjection(h, context) {
            hook.call(context);
            return originalRender(h, context);
          };
        } else {
          // inject component registration as beforeCreate hook
          var existing = options.beforeCreate;
          options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
        }
      }

      return {
        exports: scriptExports,
        options: options
      };
    }
    /***/

  },

  /***/
  10:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("f3ad");
    /***/
  },

  /***/
  114:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/input-number/src/input-number.vue?vue&type=template&id=42f8cf66&


    var render = function render() {
      var _vm = this;

      var _h = _vm.$createElement;

      var _c = _vm._self._c || _h;

      return _c("div", {
        class: ["el-input-number", _vm.inputNumberSize ? "el-input-number--" + _vm.inputNumberSize : "", {
          "is-disabled": _vm.inputNumberDisabled
        }, {
          "is-without-controls": !_vm.controls
        }, {
          "is-controls-right": _vm.controlsAtRight
        }],
        on: {
          dragstart: function dragstart($event) {
            $event.preventDefault();
          }
        }
      }, [_vm.controls ? _c("span", {
        directives: [{
          name: "repeat-click",
          rawName: "v-repeat-click",
          value: _vm.decrease,
          expression: "decrease"
        }],
        staticClass: "el-input-number__decrease",
        class: {
          "is-disabled": _vm.minDisabled
        },
        attrs: {
          role: "button"
        },
        on: {
          keydown: function keydown($event) {
            if (!("button" in $event) && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) {
              return null;
            }

            return _vm.decrease($event);
          }
        }
      }, [_c("i", {
        class: "el-icon-" + (_vm.controlsAtRight ? "arrow-down" : "minus")
      })]) : _vm._e(), _vm.controls ? _c("span", {
        directives: [{
          name: "repeat-click",
          rawName: "v-repeat-click",
          value: _vm.increase,
          expression: "increase"
        }],
        staticClass: "el-input-number__increase",
        class: {
          "is-disabled": _vm.maxDisabled
        },
        attrs: {
          role: "button"
        },
        on: {
          keydown: function keydown($event) {
            if (!("button" in $event) && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) {
              return null;
            }

            return _vm.increase($event);
          }
        }
      }, [_c("i", {
        class: "el-icon-" + (_vm.controlsAtRight ? "arrow-up" : "plus")
      })]) : _vm._e(), _c("el-input", {
        ref: "input",
        attrs: {
          value: _vm.displayValue,
          placeholder: _vm.placeholder,
          disabled: _vm.inputNumberDisabled,
          size: _vm.inputNumberSize,
          max: _vm.max,
          min: _vm.min,
          name: _vm.name,
          label: _vm.label
        },
        on: {
          blur: _vm.handleBlur,
          focus: _vm.handleFocus,
          input: _vm.handleInput,
          change: _vm.handleInputChange
        },
        nativeOn: {
          keydown: [function ($event) {
            if (!("button" in $event) && _vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"])) {
              return null;
            }

            $event.preventDefault();
            return _vm.increase($event);
          }, function ($event) {
            if (!("button" in $event) && _vm._k($event.keyCode, "down", 40, $event.key, ["Down", "ArrowDown"])) {
              return null;
            }

            $event.preventDefault();
            return _vm.decrease($event);
          }]
        }
      })], 1);
    };

    var staticRenderFns = [];
    render._withStripped = true; // CONCATENATED MODULE: ./packages/input-number/src/input-number.vue?vue&type=template&id=42f8cf66&
    // EXTERNAL MODULE: external "element-ui/lib/input"

    var input_ = __webpack_require__(10);

    var input_default = /*#__PURE__*/__webpack_require__.n(input_); // EXTERNAL MODULE: external "element-ui/lib/mixins/focus"


    var focus_ = __webpack_require__(22);

    var focus_default = /*#__PURE__*/__webpack_require__.n(focus_); // EXTERNAL MODULE: ./src/directives/repeat-click.js


    var repeat_click = __webpack_require__(30); // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/input-number/src/input-number.vue?vue&type=script&lang=js&
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //

    /* harmony default export */


    var input_numbervue_type_script_lang_js_ = {
      name: 'ElInputNumber',
      mixins: [focus_default()('input')],
      inject: {
        elForm: {
          default: ''
        },
        elFormItem: {
          default: ''
        }
      },
      directives: {
        repeatClick: repeat_click["a"
        /* default */
        ]
      },
      components: {
        ElInput: input_default.a
      },
      props: {
        step: {
          type: Number,
          default: 1
        },
        stepStrictly: {
          type: Boolean,
          default: false
        },
        max: {
          type: Number,
          default: Infinity
        },
        min: {
          type: Number,
          default: -Infinity
        },
        value: {},
        disabled: Boolean,
        size: String,
        controls: {
          type: Boolean,
          default: true
        },
        controlsPosition: {
          type: String,
          default: ''
        },
        name: String,
        label: String,
        placeholder: String,
        precision: {
          type: Number,
          validator: function validator(val) {
            return val >= 0 && val === parseInt(val, 10);
          }
        }
      },
      data: function data() {
        return {
          currentValue: 0,
          userInput: null
        };
      },
      watch: {
        value: {
          immediate: true,
          handler: function handler(value) {
            var newVal = value === undefined ? value : Number(value);

            if (newVal !== undefined) {
              if (isNaN(newVal)) {
                return;
              }

              if (this.stepStrictly) {
                var stepPrecision = this.getPrecision(this.step);
                var precisionFactor = Math.pow(10, stepPrecision);
                newVal = Math.round(newVal / this.step) * precisionFactor * this.step / precisionFactor;
              }

              if (this.precision !== undefined) {
                newVal = this.toPrecision(newVal, this.precision);
              }
            }

            if (newVal >= this.max) newVal = this.max;
            if (newVal <= this.min) newVal = this.min;
            this.currentValue = newVal;
            this.userInput = null;
            this.$emit('input', newVal);
          }
        }
      },
      computed: {
        minDisabled: function minDisabled() {
          return this._decrease(this.value, this.step) < this.min;
        },
        maxDisabled: function maxDisabled() {
          return this._increase(this.value, this.step) > this.max;
        },
        numPrecision: function numPrecision() {
          var value = this.value,
              step = this.step,
              getPrecision = this.getPrecision,
              precision = this.precision;
          var stepPrecision = getPrecision(step);

          if (precision !== undefined) {
            if (stepPrecision > precision) {
              console.warn('[Element Warn][InputNumber]precision should not be less than the decimal places of step');
            }

            return precision;
          } else {
            return Math.max(getPrecision(value), stepPrecision);
          }
        },
        controlsAtRight: function controlsAtRight() {
          return this.controls && this.controlsPosition === 'right';
        },
        _elFormItemSize: function _elFormItemSize() {
          return (this.elFormItem || {}).elFormItemSize;
        },
        inputNumberSize: function inputNumberSize() {
          return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
        },
        inputNumberDisabled: function inputNumberDisabled() {
          return this.disabled || !!(this.elForm || {}).disabled;
        },
        displayValue: function displayValue() {
          if (this.userInput !== null) {
            return this.userInput;
          }

          var currentValue = this.currentValue;

          if (typeof currentValue === 'number') {
            if (this.stepStrictly) {
              var stepPrecision = this.getPrecision(this.step);
              var precisionFactor = Math.pow(10, stepPrecision);
              currentValue = Math.round(currentValue / this.step) * precisionFactor * this.step / precisionFactor;
            }

            if (this.precision !== undefined) {
              currentValue = currentValue.toFixed(this.precision);
            }
          }

          return currentValue;
        }
      },
      methods: {
        toPrecision: function toPrecision(num, precision) {
          if (precision === undefined) precision = this.numPrecision;
          return parseFloat(Math.round(num * Math.pow(10, precision)) / Math.pow(10, precision));
        },
        getPrecision: function getPrecision(value) {
          if (value === undefined) return 0;
          var valueString = value.toString();
          var dotPosition = valueString.indexOf('.');
          var precision = 0;

          if (dotPosition !== -1) {
            precision = valueString.length - dotPosition - 1;
          }

          return precision;
        },
        _increase: function _increase(val, step) {
          if (typeof val !== 'number' && val !== undefined) return this.currentValue;
          var precisionFactor = Math.pow(10, this.numPrecision); // Solve the accuracy problem of JS decimal calculation by converting the value to integer.

          return this.toPrecision((precisionFactor * val + precisionFactor * step) / precisionFactor);
        },
        _decrease: function _decrease(val, step) {
          if (typeof val !== 'number' && val !== undefined) return this.currentValue;
          var precisionFactor = Math.pow(10, this.numPrecision);
          return this.toPrecision((precisionFactor * val - precisionFactor * step) / precisionFactor);
        },
        increase: function increase() {
          if (this.inputNumberDisabled || this.maxDisabled) return;
          var value = this.value || 0;

          var newVal = this._increase(value, this.step);

          this.setCurrentValue(newVal);
        },
        decrease: function decrease() {
          if (this.inputNumberDisabled || this.minDisabled) return;
          var value = this.value || 0;

          var newVal = this._decrease(value, this.step);

          this.setCurrentValue(newVal);
        },
        handleBlur: function handleBlur(event) {
          this.$emit('blur', event);
        },
        handleFocus: function handleFocus(event) {
          this.$emit('focus', event);
        },
        setCurrentValue: function setCurrentValue(newVal) {
          var oldVal = this.currentValue;

          if (typeof newVal === 'number' && this.precision !== undefined) {
            newVal = this.toPrecision(newVal, this.precision);
          }

          if (newVal >= this.max) newVal = this.max;
          if (newVal <= this.min) newVal = this.min;
          if (oldVal === newVal) return;
          this.userInput = null;
          this.$emit('input', newVal);
          this.$emit('change', newVal, oldVal);
          this.currentValue = newVal;
        },
        handleInput: function handleInput(value) {
          this.userInput = value;
        },
        handleInputChange: function handleInputChange(value) {
          var newVal = value === '' ? undefined : Number(value);

          if (!isNaN(newVal) || value === '') {
            this.setCurrentValue(newVal);
          }

          this.userInput = null;
        },
        select: function select() {
          this.$refs.input.select();
        }
      },
      mounted: function mounted() {
        var innerInput = this.$refs.input.$refs.input;
        innerInput.setAttribute('role', 'spinbutton');
        innerInput.setAttribute('aria-valuemax', this.max);
        innerInput.setAttribute('aria-valuemin', this.min);
        innerInput.setAttribute('aria-valuenow', this.currentValue);
        innerInput.setAttribute('aria-disabled', this.inputNumberDisabled);
      },
      updated: function updated() {
        if (!this.$refs || !this.$refs.input) return;
        var innerInput = this.$refs.input.$refs.input;
        innerInput.setAttribute('aria-valuenow', this.currentValue);
      }
    }; // CONCATENATED MODULE: ./packages/input-number/src/input-number.vue?vue&type=script&lang=js&

    /* harmony default export */

    var src_input_numbervue_type_script_lang_js_ = input_numbervue_type_script_lang_js_; // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js

    var componentNormalizer = __webpack_require__(0); // CONCATENATED MODULE: ./packages/input-number/src/input-number.vue

    /* normalize component */


    var component = Object(componentNormalizer["a"
    /* default */
    ])(src_input_numbervue_type_script_lang_js_, render, staticRenderFns, false, null, null, null);
    /* hot reload */

    if (false) { var api; }

    component.options.__file = "packages/input-number/src/input-number.vue";
    /* harmony default export */

    var input_number = component.exports; // CONCATENATED MODULE: ./packages/input-number/index.js

    /* istanbul ignore next */

    input_number.install = function (Vue) {
      Vue.component(input_number.name, input_number);
    };
    /* harmony default export */


    var packages_input_number = __webpack_exports__["default"] = input_number;
    /***/
  },

  /***/
  2:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("5924");
    /***/
  },

  /***/
  22:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("12f2");
    /***/
  },

  /***/
  30:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";
    /* harmony import */

    var element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
    /* harmony import */


    var element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__);
    /* harmony default export */


    __webpack_exports__["a"] = {
      bind: function bind(el, binding, vnode) {
        var interval = null;
        var startTime = void 0;

        var handler = function handler() {
          return vnode.context[binding.expression].apply();
        };

        var clear = function clear() {
          if (Date.now() - startTime < 100) {
            handler();
          }

          clearInterval(interval);
          interval = null;
        };

        Object(element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__["on"])(el, 'mousedown', function (e) {
          if (e.button !== 0) return;
          startTime = Date.now();
          Object(element_ui_src_utils_dom__WEBPACK_IMPORTED_MODULE_0__["once"])(document, 'mouseup', clear);
          clearInterval(interval);
          interval = setInterval(handler, 100);
        });
      }
    };
    /***/
  }
  /******/

});

/***/ }),

/***/ "e452":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


__webpack_require__("99af");

__webpack_require__("e260");

__webpack_require__("d3b7");

__webpack_require__("ddb0");

exports.__esModule = true;
var aria = aria || {};
aria.Utils = aria.Utils || {};
/**
 * @desc Set focus on descendant nodes until the first focusable element is
 *       found.
 * @param element
 *          DOM node for which to find the first focusable descendant.
 * @returns
 *  true if a focusable element is found and focus is set.
 */

aria.Utils.focusFirstDescendant = function (element) {
  for (var i = 0; i < element.childNodes.length; i++) {
    var child = element.childNodes[i];

    if (aria.Utils.attemptFocus(child) || aria.Utils.focusFirstDescendant(child)) {
      return true;
    }
  }

  return false;
};
/**
 * @desc Find the last descendant node that is focusable.
 * @param element
 *          DOM node for which to find the last focusable descendant.
 * @returns
 *  true if a focusable element is found and focus is set.
 */


aria.Utils.focusLastDescendant = function (element) {
  for (var i = element.childNodes.length - 1; i >= 0; i--) {
    var child = element.childNodes[i];

    if (aria.Utils.attemptFocus(child) || aria.Utils.focusLastDescendant(child)) {
      return true;
    }
  }

  return false;
};
/**
 * @desc Set Attempt to set focus on the current node.
 * @param element
 *          The node to attempt to focus on.
 * @returns
 *  true if element is focused.
 */


aria.Utils.attemptFocus = function (element) {
  if (!aria.Utils.isFocusable(element)) {
    return false;
  }

  aria.Utils.IgnoreUtilFocusChanges = true;

  try {
    element.focus();
  } catch (e) {}

  aria.Utils.IgnoreUtilFocusChanges = false;
  return document.activeElement === element;
};

aria.Utils.isFocusable = function (element) {
  if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute('tabIndex') !== null) {
    return true;
  }

  if (element.disabled) {
    return false;
  }

  switch (element.nodeName) {
    case 'A':
      return !!element.href && element.rel !== 'ignore';

    case 'INPUT':
      return element.type !== 'hidden' && element.type !== 'file';

    case 'BUTTON':
    case 'SELECT':
    case 'TEXTAREA':
      return true;

    default:
      return false;
  }
};
/**
 * 触发一个事件
 * mouseenter, mouseleave, mouseover, keyup, change, click 等
 * @param  {Element} elm
 * @param  {String} name
 * @param  {*} opts
 */


aria.Utils.triggerEvent = function (elm, name) {
  var eventName = void 0;

  if (/^mouse|click/.test(name)) {
    eventName = 'MouseEvents';
  } else if (/^key/.test(name)) {
    eventName = 'KeyboardEvent';
  } else {
    eventName = 'HTMLEvents';
  }

  var evt = document.createEvent(eventName);

  for (var _len = arguments.length, opts = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
    opts[_key - 2] = arguments[_key];
  }

  evt.initEvent.apply(evt, [name].concat(opts));
  elm.dispatchEvent ? elm.dispatchEvent(evt) : elm.fireEvent('on' + name, evt);
  return elm;
};

aria.Utils.keys = {
  tab: 9,
  enter: 13,
  space: 32,
  left: 37,
  up: 38,
  right: 39,
  down: 40,
  esc: 27
};
exports.default = aria.Utils;

/***/ }),

/***/ "e470":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_cascader_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a1ff");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_cascader_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_cascader_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_cascader_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "e501":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_header_vue_vue_type_style_index_0_id_5555ed76_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("74ec");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_header_vue_vue_type_style_index_0_id_5555ed76_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_header_vue_vue_type_style_index_0_id_5555ed76_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_header_vue_vue_type_style_index_0_id_5555ed76_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "e507":
/***/ (function(module, exports, __webpack_require__) {

// 19.1.3.1 Object.assign(target, source)
var $export = __webpack_require__("512c");

$export($export.S + $export.F, 'Object', { assign: __webpack_require__("072d") });


/***/ }),

/***/ "e538":
/***/ (function(module, exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__("b622");

exports.f = wellKnownSymbol;


/***/ }),

/***/ "e58c":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toIndexedObject = __webpack_require__("fc6a");
var toInteger = __webpack_require__("a691");
var toLength = __webpack_require__("50c4");
var arrayMethodIsStrict = __webpack_require__("a640");
var arrayMethodUsesToLength = __webpack_require__("ae40");

var min = Math.min;
var nativeLastIndexOf = [].lastIndexOf;
var NEGATIVE_ZERO = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
var STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');
// For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method
var USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
var FORCED = NEGATIVE_ZERO || !STRICT_METHOD || !USES_TO_LENGTH;

// `Array.prototype.lastIndexOf` method implementation
// https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof
module.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
  // convert -0 to +0
  if (NEGATIVE_ZERO) return nativeLastIndexOf.apply(this, arguments) || 0;
  var O = toIndexedObject(this);
  var length = toLength(O.length);
  var index = length - 1;
  if (arguments.length > 1) index = min(index, toInteger(arguments[1]));
  if (index < 0) index = length + index;
  for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
  return -1;
} : nativeLastIndexOf;


/***/ }),

/***/ "e62d":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

exports.default = function () {
  if (_vue2.default.prototype.$isServer) return 0;
  if (scrollBarWidth !== undefined) return scrollBarWidth;
  var outer = document.createElement('div');
  outer.className = 'el-scrollbar__wrap';
  outer.style.visibility = 'hidden';
  outer.style.width = '100px';
  outer.style.position = 'absolute';
  outer.style.top = '-9999px';
  document.body.appendChild(outer);
  var widthNoScroll = outer.offsetWidth;
  outer.style.overflow = 'scroll';
  var inner = document.createElement('div');
  inner.style.width = '100%';
  outer.appendChild(inner);
  var widthWithScroll = inner.offsetWidth;
  outer.parentNode.removeChild(outer);
  scrollBarWidth = widthNoScroll - widthWithScroll;
  return scrollBarWidth;
};

var _vue = __webpack_require__("8bbf");

var _vue2 = _interopRequireDefault(_vue);

function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    default: obj
  };
}

var scrollBarWidth = void 0;
;

/***/ }),

/***/ "e667":
/***/ (function(module, exports) {

module.exports = function (exec) {
  try {
    return { error: false, value: exec() };
  } catch (error) {
    return { error: true, value: error };
  }
};


/***/ }),

/***/ "e683":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


/**
 * Creates a new URL by combining the specified URLs
 *
 * @param {string} baseURL The base URL
 * @param {string} relativeURL The relative URL
 * @returns {string} The combined URL
 */
module.exports = function combineURLs(baseURL, relativeURL) {
  return relativeURL
    ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
    : baseURL;
};


/***/ }),

/***/ "e6cf":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var IS_PURE = __webpack_require__("c430");
var global = __webpack_require__("da84");
var getBuiltIn = __webpack_require__("d066");
var NativePromise = __webpack_require__("fea9");
var redefine = __webpack_require__("6eeb");
var redefineAll = __webpack_require__("e2cc");
var setToStringTag = __webpack_require__("d44e");
var setSpecies = __webpack_require__("2626");
var isObject = __webpack_require__("861d");
var aFunction = __webpack_require__("1c0b");
var anInstance = __webpack_require__("19aa");
var classof = __webpack_require__("c6b6");
var inspectSource = __webpack_require__("8925");
var iterate = __webpack_require__("2266");
var checkCorrectnessOfIteration = __webpack_require__("1c7e");
var speciesConstructor = __webpack_require__("4840");
var task = __webpack_require__("2cf4").set;
var microtask = __webpack_require__("b575");
var promiseResolve = __webpack_require__("cdf9");
var hostReportErrors = __webpack_require__("44de");
var newPromiseCapabilityModule = __webpack_require__("f069");
var perform = __webpack_require__("e667");
var InternalStateModule = __webpack_require__("69f3");
var isForced = __webpack_require__("94ca");
var wellKnownSymbol = __webpack_require__("b622");
var V8_VERSION = __webpack_require__("2d00");

var SPECIES = wellKnownSymbol('species');
var PROMISE = 'Promise';
var getInternalState = InternalStateModule.get;
var setInternalState = InternalStateModule.set;
var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
var PromiseConstructor = NativePromise;
var TypeError = global.TypeError;
var document = global.document;
var process = global.process;
var $fetch = getBuiltIn('fetch');
var newPromiseCapability = newPromiseCapabilityModule.f;
var newGenericPromiseCapability = newPromiseCapability;
var IS_NODE = classof(process) == 'process';
var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);
var UNHANDLED_REJECTION = 'unhandledrejection';
var REJECTION_HANDLED = 'rejectionhandled';
var PENDING = 0;
var FULFILLED = 1;
var REJECTED = 2;
var HANDLED = 1;
var UNHANDLED = 2;
var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;

var FORCED = isForced(PROMISE, function () {
  var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);
  if (!GLOBAL_CORE_JS_PROMISE) {
    // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
    // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
    // We can't detect it synchronously, so just check versions
    if (V8_VERSION === 66) return true;
    // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
    if (!IS_NODE && typeof PromiseRejectionEvent != 'function') return true;
  }
  // We need Promise#finally in the pure version for preventing prototype pollution
  if (IS_PURE && !PromiseConstructor.prototype['finally']) return true;
  // We can't use @@species feature detection in V8 since it causes
  // deoptimization and performance degradation
  // https://github.com/zloirock/core-js/issues/679
  if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false;
  // Detect correctness of subclassing with @@species support
  var promise = PromiseConstructor.resolve(1);
  var FakePromise = function (exec) {
    exec(function () { /* empty */ }, function () { /* empty */ });
  };
  var constructor = promise.constructor = {};
  constructor[SPECIES] = FakePromise;
  return !(promise.then(function () { /* empty */ }) instanceof FakePromise);
});

var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {
  PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
});

// helpers
var isThenable = function (it) {
  var then;
  return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
};

var notify = function (promise, state, isReject) {
  if (state.notified) return;
  state.notified = true;
  var chain = state.reactions;
  microtask(function () {
    var value = state.value;
    var ok = state.state == FULFILLED;
    var index = 0;
    // variable length - can't use forEach
    while (chain.length > index) {
      var reaction = chain[index++];
      var handler = ok ? reaction.ok : reaction.fail;
      var resolve = reaction.resolve;
      var reject = reaction.reject;
      var domain = reaction.domain;
      var result, then, exited;
      try {
        if (handler) {
          if (!ok) {
            if (state.rejection === UNHANDLED) onHandleUnhandled(promise, state);
            state.rejection = HANDLED;
          }
          if (handler === true) result = value;
          else {
            if (domain) domain.enter();
            result = handler(value); // can throw
            if (domain) {
              domain.exit();
              exited = true;
            }
          }
          if (result === reaction.promise) {
            reject(TypeError('Promise-chain cycle'));
          } else if (then = isThenable(result)) {
            then.call(result, resolve, reject);
          } else resolve(result);
        } else reject(value);
      } catch (error) {
        if (domain && !exited) domain.exit();
        reject(error);
      }
    }
    state.reactions = [];
    state.notified = false;
    if (isReject && !state.rejection) onUnhandled(promise, state);
  });
};

var dispatchEvent = function (name, promise, reason) {
  var event, handler;
  if (DISPATCH_EVENT) {
    event = document.createEvent('Event');
    event.promise = promise;
    event.reason = reason;
    event.initEvent(name, false, true);
    global.dispatchEvent(event);
  } else event = { promise: promise, reason: reason };
  if (handler = global['on' + name]) handler(event);
  else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
};

var onUnhandled = function (promise, state) {
  task.call(global, function () {
    var value = state.value;
    var IS_UNHANDLED = isUnhandled(state);
    var result;
    if (IS_UNHANDLED) {
      result = perform(function () {
        if (IS_NODE) {
          process.emit('unhandledRejection', value, promise);
        } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
      });
      // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
      state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
      if (result.error) throw result.value;
    }
  });
};

var isUnhandled = function (state) {
  return state.rejection !== HANDLED && !state.parent;
};

var onHandleUnhandled = function (promise, state) {
  task.call(global, function () {
    if (IS_NODE) {
      process.emit('rejectionHandled', promise);
    } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
  });
};

var bind = function (fn, promise, state, unwrap) {
  return function (value) {
    fn(promise, state, value, unwrap);
  };
};

var internalReject = function (promise, state, value, unwrap) {
  if (state.done) return;
  state.done = true;
  if (unwrap) state = unwrap;
  state.value = value;
  state.state = REJECTED;
  notify(promise, state, true);
};

var internalResolve = function (promise, state, value, unwrap) {
  if (state.done) return;
  state.done = true;
  if (unwrap) state = unwrap;
  try {
    if (promise === value) throw TypeError("Promise can't be resolved itself");
    var then = isThenable(value);
    if (then) {
      microtask(function () {
        var wrapper = { done: false };
        try {
          then.call(value,
            bind(internalResolve, promise, wrapper, state),
            bind(internalReject, promise, wrapper, state)
          );
        } catch (error) {
          internalReject(promise, wrapper, error, state);
        }
      });
    } else {
      state.value = value;
      state.state = FULFILLED;
      notify(promise, state, false);
    }
  } catch (error) {
    internalReject(promise, { done: false }, error, state);
  }
};

// constructor polyfill
if (FORCED) {
  // 25.4.3.1 Promise(executor)
  PromiseConstructor = function Promise(executor) {
    anInstance(this, PromiseConstructor, PROMISE);
    aFunction(executor);
    Internal.call(this);
    var state = getInternalState(this);
    try {
      executor(bind(internalResolve, this, state), bind(internalReject, this, state));
    } catch (error) {
      internalReject(this, state, error);
    }
  };
  // eslint-disable-next-line no-unused-vars
  Internal = function Promise(executor) {
    setInternalState(this, {
      type: PROMISE,
      done: false,
      notified: false,
      parent: false,
      reactions: [],
      rejection: false,
      state: PENDING,
      value: undefined
    });
  };
  Internal.prototype = redefineAll(PromiseConstructor.prototype, {
    // `Promise.prototype.then` method
    // https://tc39.github.io/ecma262/#sec-promise.prototype.then
    then: function then(onFulfilled, onRejected) {
      var state = getInternalPromiseState(this);
      var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
      reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
      reaction.fail = typeof onRejected == 'function' && onRejected;
      reaction.domain = IS_NODE ? process.domain : undefined;
      state.parent = true;
      state.reactions.push(reaction);
      if (state.state != PENDING) notify(this, state, false);
      return reaction.promise;
    },
    // `Promise.prototype.catch` method
    // https://tc39.github.io/ecma262/#sec-promise.prototype.catch
    'catch': function (onRejected) {
      return this.then(undefined, onRejected);
    }
  });
  OwnPromiseCapability = function () {
    var promise = new Internal();
    var state = getInternalState(promise);
    this.promise = promise;
    this.resolve = bind(internalResolve, promise, state);
    this.reject = bind(internalReject, promise, state);
  };
  newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
    return C === PromiseConstructor || C === PromiseWrapper
      ? new OwnPromiseCapability(C)
      : newGenericPromiseCapability(C);
  };

  if (!IS_PURE && typeof NativePromise == 'function') {
    nativeThen = NativePromise.prototype.then;

    // wrap native Promise#then for native async functions
    redefine(NativePromise.prototype, 'then', function then(onFulfilled, onRejected) {
      var that = this;
      return new PromiseConstructor(function (resolve, reject) {
        nativeThen.call(that, resolve, reject);
      }).then(onFulfilled, onRejected);
    // https://github.com/zloirock/core-js/issues/640
    }, { unsafe: true });

    // wrap fetch result
    if (typeof $fetch == 'function') $({ global: true, enumerable: true, forced: true }, {
      // eslint-disable-next-line no-unused-vars
      fetch: function fetch(input /* , init */) {
        return promiseResolve(PromiseConstructor, $fetch.apply(global, arguments));
      }
    });
  }
}

$({ global: true, wrap: true, forced: FORCED }, {
  Promise: PromiseConstructor
});

setToStringTag(PromiseConstructor, PROMISE, false, true);
setSpecies(PROMISE);

PromiseWrapper = getBuiltIn(PROMISE);

// statics
$({ target: PROMISE, stat: true, forced: FORCED }, {
  // `Promise.reject` method
  // https://tc39.github.io/ecma262/#sec-promise.reject
  reject: function reject(r) {
    var capability = newPromiseCapability(this);
    capability.reject.call(undefined, r);
    return capability.promise;
  }
});

$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {
  // `Promise.resolve` method
  // https://tc39.github.io/ecma262/#sec-promise.resolve
  resolve: function resolve(x) {
    return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);
  }
});

$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
  // `Promise.all` method
  // https://tc39.github.io/ecma262/#sec-promise.all
  all: function all(iterable) {
    var C = this;
    var capability = newPromiseCapability(C);
    var resolve = capability.resolve;
    var reject = capability.reject;
    var result = perform(function () {
      var $promiseResolve = aFunction(C.resolve);
      var values = [];
      var counter = 0;
      var remaining = 1;
      iterate(iterable, function (promise) {
        var index = counter++;
        var alreadyCalled = false;
        values.push(undefined);
        remaining++;
        $promiseResolve.call(C, promise).then(function (value) {
          if (alreadyCalled) return;
          alreadyCalled = true;
          values[index] = value;
          --remaining || resolve(values);
        }, reject);
      });
      --remaining || resolve(values);
    });
    if (result.error) reject(result.value);
    return capability.promise;
  },
  // `Promise.race` method
  // https://tc39.github.io/ecma262/#sec-promise.race
  race: function race(iterable) {
    var C = this;
    var capability = newPromiseCapability(C);
    var reject = capability.reject;
    var result = perform(function () {
      var $promiseResolve = aFunction(C.resolve);
      iterate(iterable, function (promise) {
        $promiseResolve.call(C, promise).then(capability.resolve, reject);
      });
    });
    if (result.error) reject(result.value);
    return capability.promise;
  }
});


/***/ }),

/***/ "e772":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("d28b");

__webpack_require__("944a");

__webpack_require__("99af");

__webpack_require__("c975");

__webpack_require__("e260");

__webpack_require__("45fc");

__webpack_require__("a434");

__webpack_require__("b0c0");

__webpack_require__("0c47");

__webpack_require__("23dc");

__webpack_require__("a9e3");

__webpack_require__("d3b7");

__webpack_require__("4d63");

__webpack_require__("ac1f");

__webpack_require__("25f0");

__webpack_require__("3ca3");

__webpack_require__("ddb0");

var _typeof2 = __webpack_require__("7037");

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 && _typeof2(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 = "/dist/";
  /******/

  /******/

  /******/
  // Load entry module and return exports

  /******/

  return __webpack_require__(__webpack_require__.s = 53);
  /******/
}(
/************************************************************************/

/******/
{
  /***/
  0:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";
    /* harmony export (binding) */

    __webpack_require__.d(__webpack_exports__, "a", function () {
      return normalizeComponent;
    });
    /* globals __VUE_SSR_CONTEXT__ */
    // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
    // This module is a runtime utility for cleaner component module output and will
    // be included in the final webpack user bundle.


    function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier,
    /* server only */
    shadowMode
    /* vue-cli only */
    ) {
      // Vue.extend constructor export interop
      var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports; // render functions

      if (render) {
        options.render = render;
        options.staticRenderFns = staticRenderFns;
        options._compiled = true;
      } // functional template


      if (functionalTemplate) {
        options.functional = true;
      } // scopedId


      if (scopeId) {
        options._scopeId = 'data-v-' + scopeId;
      }

      var hook;

      if (moduleIdentifier) {
        // server build
        hook = function hook(context) {
          // 2.3 injection
          context = context || // cached call
          this.$vnode && this.$vnode.ssrContext || // stateful
          this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
          // 2.2 with runInNewContext: true

          if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
            context = __VUE_SSR_CONTEXT__;
          } // inject component styles


          if (injectStyles) {
            injectStyles.call(this, context);
          } // register component module identifier for async chunk inferrence


          if (context && context._registeredComponents) {
            context._registeredComponents.add(moduleIdentifier);
          }
        }; // used by ssr in case component is cached and beforeCreate
        // never gets called


        options._ssrRegister = hook;
      } else if (injectStyles) {
        hook = shadowMode ? function () {
          injectStyles.call(this, this.$root.$options.shadowRoot);
        } : injectStyles;
      }

      if (hook) {
        if (options.functional) {
          // for template-only hot-reload because in that case the render fn doesn't
          // go through the normalizer
          options._injectStyles = hook; // register for functioal component in vue file

          var originalRender = options.render;

          options.render = function renderWithStyleInjection(h, context) {
            hook.call(context);
            return originalRender(h, context);
          };
        } else {
          // inject component registration as beforeCreate hook
          var existing = options.beforeCreate;
          options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
        }
      }

      return {
        exports: scriptExports,
        options: options
      };
    }
    /***/

  },

  /***/
  3:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("8122");
    /***/
  },

  /***/
  34:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict"; // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option.vue?vue&type=template&id=7a44c642&

    var render = function render() {
      var _vm = this;

      var _h = _vm.$createElement;

      var _c = _vm._self._c || _h;

      return _c("li", {
        directives: [{
          name: "show",
          rawName: "v-show",
          value: _vm.visible,
          expression: "visible"
        }],
        staticClass: "el-select-dropdown__item",
        class: {
          selected: _vm.itemSelected,
          "is-disabled": _vm.disabled || _vm.groupDisabled || _vm.limitReached,
          hover: _vm.hover
        },
        on: {
          mouseenter: _vm.hoverItem,
          click: function click($event) {
            $event.stopPropagation();
            return _vm.selectOptionClick($event);
          }
        }
      }, [_vm._t("default", [_c("span", [_vm._v(_vm._s(_vm.currentLabel))])])], 2);
    };

    var staticRenderFns = [];
    render._withStripped = true; // CONCATENATED MODULE: ./packages/select/src/option.vue?vue&type=template&id=7a44c642&
    // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"

    var emitter_ = __webpack_require__(4);

    var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_); // EXTERNAL MODULE: external "element-ui/lib/utils/util"


    var util_ = __webpack_require__(3); // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/option.vue?vue&type=script&lang=js&


    var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) {
      return _typeof2(obj);
    } : function (obj) {
      return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
    }; //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //

    /* harmony default export */


    var optionvue_type_script_lang_js_ = {
      mixins: [emitter_default.a],
      name: 'ElOption',
      componentName: 'ElOption',
      inject: ['select'],
      props: {
        value: {
          required: true
        },
        label: [String, Number],
        created: Boolean,
        disabled: {
          type: Boolean,
          default: false
        }
      },
      data: function data() {
        return {
          index: -1,
          groupDisabled: false,
          visible: true,
          hitState: false,
          hover: false
        };
      },
      computed: {
        isObject: function isObject() {
          return Object.prototype.toString.call(this.value).toLowerCase() === '[object object]';
        },
        currentLabel: function currentLabel() {
          return this.label || (this.isObject ? '' : this.value);
        },
        currentValue: function currentValue() {
          return this.value || this.label || '';
        },
        itemSelected: function itemSelected() {
          if (!this.select.multiple) {
            return this.isEqual(this.value, this.select.value);
          } else {
            return this.contains(this.select.value, this.value);
          }
        },
        limitReached: function limitReached() {
          if (this.select.multiple) {
            return !this.itemSelected && (this.select.value || []).length >= this.select.multipleLimit && this.select.multipleLimit > 0;
          } else {
            return false;
          }
        }
      },
      watch: {
        currentLabel: function currentLabel() {
          if (!this.created && !this.select.remote) this.dispatch('ElSelect', 'setSelected');
        },
        value: function value(val, oldVal) {
          var _select = this.select,
              remote = _select.remote,
              valueKey = _select.valueKey;

          if (!this.created && !remote) {
            if (valueKey && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object' && (typeof oldVal === 'undefined' ? 'undefined' : _typeof(oldVal)) === 'object' && val[valueKey] === oldVal[valueKey]) {
              return;
            }

            this.dispatch('ElSelect', 'setSelected');
          }
        }
      },
      methods: {
        isEqual: function isEqual(a, b) {
          if (!this.isObject) {
            return a === b;
          } else {
            var valueKey = this.select.valueKey;
            return Object(util_["getValueByPath"])(a, valueKey) === Object(util_["getValueByPath"])(b, valueKey);
          }
        },
        contains: function contains() {
          var arr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
          var target = arguments[1];

          if (!this.isObject) {
            return arr && arr.indexOf(target) > -1;
          } else {
            var valueKey = this.select.valueKey;
            return arr && arr.some(function (item) {
              return Object(util_["getValueByPath"])(item, valueKey) === Object(util_["getValueByPath"])(target, valueKey);
            });
          }
        },
        handleGroupDisabled: function handleGroupDisabled(val) {
          this.groupDisabled = val;
        },
        hoverItem: function hoverItem() {
          if (!this.disabled && !this.groupDisabled) {
            this.select.hoverIndex = this.select.options.indexOf(this);
          }
        },
        selectOptionClick: function selectOptionClick() {
          if (this.disabled !== true && this.groupDisabled !== true) {
            this.dispatch('ElSelect', 'handleOptionClick', [this, true]);
          }
        },
        queryChange: function queryChange(query) {
          this.visible = new RegExp(Object(util_["escapeRegexpString"])(query), 'i').test(this.currentLabel) || this.created;

          if (!this.visible) {
            this.select.filteredOptionsCount--;
          }
        }
      },
      created: function created() {
        this.select.options.push(this);
        this.select.cachedOptions.push(this);
        this.select.optionsCount++;
        this.select.filteredOptionsCount++;
        this.$on('queryChange', this.queryChange);
        this.$on('handleGroupDisabled', this.handleGroupDisabled);
      },
      beforeDestroy: function beforeDestroy() {
        var _select2 = this.select,
            selected = _select2.selected,
            multiple = _select2.multiple;
        var selectedOptions = multiple ? selected : [selected];
        var index = this.select.cachedOptions.indexOf(this);
        var selectedIndex = selectedOptions.indexOf(this); // if option is not selected, remove it from cache

        if (index > -1 && selectedIndex < 0) {
          this.select.cachedOptions.splice(index, 1);
        }

        this.select.onOptionDestroy(this.select.options.indexOf(this));
      }
    }; // CONCATENATED MODULE: ./packages/select/src/option.vue?vue&type=script&lang=js&

    /* harmony default export */

    var src_optionvue_type_script_lang_js_ = optionvue_type_script_lang_js_; // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js

    var componentNormalizer = __webpack_require__(0); // CONCATENATED MODULE: ./packages/select/src/option.vue

    /* normalize component */


    var component = Object(componentNormalizer["a"
    /* default */
    ])(src_optionvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null);
    /* hot reload */

    if (false) { var api; }

    component.options.__file = "packages/select/src/option.vue";
    /* harmony default export */

    var src_option = __webpack_exports__["a"] = component.exports;
    /***/
  },

  /***/
  4:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("d010");
    /***/
  },

  /***/
  53:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony import */


    var _select_src_option__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34);
    /* istanbul ignore next */


    _select_src_option__WEBPACK_IMPORTED_MODULE_0__[
    /* default */
    "a"].install = function (Vue) {
      Vue.component(_select_src_option__WEBPACK_IMPORTED_MODULE_0__[
      /* default */
      "a"].name, _select_src_option__WEBPACK_IMPORTED_MODULE_0__[
      /* default */
      "a"]);
    };
    /* harmony default export */


    __webpack_exports__["default"] = _select_src_option__WEBPACK_IMPORTED_MODULE_0__[
    /* default */
    "a"];
    /***/
  }
  /******/

});

/***/ }),

/***/ "e893":
/***/ (function(module, exports, __webpack_require__) {

var has = __webpack_require__("5135");
var ownKeys = __webpack_require__("56ef");
var getOwnPropertyDescriptorModule = __webpack_require__("06cf");
var definePropertyModule = __webpack_require__("9bf2");

module.exports = function (target, source) {
  var keys = ownKeys(source);
  var defineProperty = definePropertyModule.f;
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  for (var i = 0; i < keys.length; i++) {
    var key = keys[i];
    if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  }
};


/***/ }),

/***/ "e8b5":
/***/ (function(module, exports, __webpack_require__) {

var classof = __webpack_require__("c6b6");

// `IsArray` abstract operation
// https://tc39.github.io/ecma262/#sec-isarray
module.exports = Array.isArray || function isArray(arg) {
  return classof(arg) == 'Array';
};


/***/ }),

/***/ "e91f":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__("ebb5");
var $indexOf = __webpack_require__("4d64").indexOf;

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

// `%TypedArray%.prototype.indexOf` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.indexof
exportTypedArrayMethod('indexOf', function indexOf(searchElement /* , fromIndex */) {
  return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
});


/***/ }),

/***/ "e95a":
/***/ (function(module, exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__("b622");
var Iterators = __webpack_require__("3f8c");

var ITERATOR = wellKnownSymbol('iterator');
var ArrayPrototype = Array.prototype;

// check on default Array iterator
module.exports = function (it) {
  return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
};


/***/ }),

/***/ "e974":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


__webpack_require__("c975");

__webpack_require__("b0c0");

__webpack_require__("a9e3");

__webpack_require__("ac1f");

__webpack_require__("1276");

exports.__esModule = true;

var _vue = __webpack_require__("8bbf");

var _vue2 = _interopRequireDefault(_vue);

var _popup = __webpack_require__("5128");

function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    default: obj
  };
}

var PopperJS = _vue2.default.prototype.$isServer ? function () {} : __webpack_require__("6167");

var stop = function stop(e) {
  return e.stopPropagation();
};
/**
 * @param {HTMLElement} [reference=$refs.reference] - The reference element used to position the popper.
 * @param {HTMLElement} [popper=$refs.popper] - The HTML element used as popper, or a configuration used to generate the popper.
 * @param {String} [placement=button] - Placement of the popper accepted values: top(-start, -end), right(-start, -end), bottom(-start, -end), left(-start, -end)
 * @param {Number} [offset=0] - Amount of pixels the popper will be shifted (can be negative).
 * @param {Boolean} [visible=false] Visibility of the popup element.
 * @param {Boolean} [visible-arrow=false] Visibility of the arrow, no style.
 */


exports.default = {
  props: {
    transformOrigin: {
      type: [Boolean, String],
      default: true
    },
    placement: {
      type: String,
      default: 'bottom'
    },
    boundariesPadding: {
      type: Number,
      default: 5
    },
    reference: {},
    popper: {},
    offset: {
      default: 0
    },
    value: Boolean,
    visibleArrow: Boolean,
    arrowOffset: {
      type: Number,
      default: 35
    },
    appendToBody: {
      type: Boolean,
      default: true
    },
    popperOptions: {
      type: Object,
      default: function _default() {
        return {
          gpuAcceleration: false
        };
      }
    }
  },
  data: function data() {
    return {
      showPopper: false,
      currentPlacement: ''
    };
  },
  watch: {
    value: {
      immediate: true,
      handler: function handler(val) {
        this.showPopper = val;
        this.$emit('input', val);
      }
    },
    showPopper: function showPopper(val) {
      if (this.disabled) return;
      val ? this.updatePopper() : this.destroyPopper();
      this.$emit('input', val);
    }
  },
  methods: {
    createPopper: function createPopper() {
      var _this = this;

      if (this.$isServer) return;
      this.currentPlacement = this.currentPlacement || this.placement;

      if (!/^(top|bottom|left|right)(-start|-end)?$/g.test(this.currentPlacement)) {
        return;
      }

      var options = this.popperOptions;
      var popper = this.popperElm = this.popperElm || this.popper || this.$refs.popper;
      var reference = this.referenceElm = this.referenceElm || this.reference || this.$refs.reference;

      if (!reference && this.$slots.reference && this.$slots.reference[0]) {
        reference = this.referenceElm = this.$slots.reference[0].elm;
      }

      if (!popper || !reference) return;
      if (this.visibleArrow) this.appendArrow(popper);
      if (this.appendToBody) document.body.appendChild(this.popperElm);

      if (this.popperJS && this.popperJS.destroy) {
        this.popperJS.destroy();
      }

      options.placement = this.currentPlacement;
      options.offset = this.offset;
      options.arrowOffset = this.arrowOffset;
      this.popperJS = new PopperJS(reference, popper, options);
      this.popperJS.onCreate(function (_) {
        _this.$emit('created', _this);

        _this.resetTransformOrigin();

        _this.$nextTick(_this.updatePopper);
      });

      if (typeof options.onUpdate === 'function') {
        this.popperJS.onUpdate(options.onUpdate);
      }

      this.popperJS._popper.style.zIndex = _popup.PopupManager.nextZIndex();
      this.popperElm.addEventListener('click', stop);
    },
    updatePopper: function updatePopper() {
      var popperJS = this.popperJS;

      if (popperJS) {
        popperJS.update();

        if (popperJS._popper) {
          popperJS._popper.style.zIndex = _popup.PopupManager.nextZIndex();
        }
      } else {
        this.createPopper();
      }
    },
    doDestroy: function doDestroy(forceDestroy) {
      /* istanbul ignore if */
      if (!this.popperJS || this.showPopper && !forceDestroy) return;
      this.popperJS.destroy();
      this.popperJS = null;
    },
    destroyPopper: function destroyPopper() {
      if (this.popperJS) {
        this.resetTransformOrigin();
      }
    },
    resetTransformOrigin: function resetTransformOrigin() {
      if (!this.transformOrigin) return;
      var placementMap = {
        top: 'bottom',
        bottom: 'top',
        left: 'right',
        right: 'left'
      };

      var placement = this.popperJS._popper.getAttribute('x-placement').split('-')[0];

      var origin = placementMap[placement];
      this.popperJS._popper.style.transformOrigin = typeof this.transformOrigin === 'string' ? this.transformOrigin : ['top', 'bottom'].indexOf(placement) > -1 ? 'center ' + origin : origin + ' center';
    },
    appendArrow: function appendArrow(element) {
      var hash = void 0;

      if (this.appended) {
        return;
      }

      this.appended = true;

      for (var item in element.attributes) {
        if (/^_v-/.test(element.attributes[item].name)) {
          hash = element.attributes[item].name;
          break;
        }
      }

      var arrow = document.createElement('div');

      if (hash) {
        arrow.setAttribute(hash, '');
      }

      arrow.setAttribute('x-arrow', '');
      arrow.className = 'popper__arrow';
      element.appendChild(arrow);
    }
  },
  beforeDestroy: function beforeDestroy() {
    this.doDestroy(true);

    if (this.popperElm && this.popperElm.parentNode === document.body) {
      this.popperElm.removeEventListener('click', stop);
      document.body.removeChild(this.popperElm);
    }
  },
  // call destroy in keep-alive mode
  deactivated: function deactivated() {
    this.$options.beforeDestroy[0].call(this);
  }
};

/***/ }),

/***/ "ea34":
/***/ (function(module, exports) {

module.exports = function (done, value) {
  return { value: value, done: !!done };
};


/***/ }),

/***/ "eaf3":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_app_info_vue_vue_type_style_index_0_id_e8df9950_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a13b");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_app_info_vue_vue_type_style_index_0_id_e8df9950_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_app_info_vue_vue_type_style_index_0_id_e8df9950_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_app_info_vue_vue_type_style_index_0_id_e8df9950_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "eb0c":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"));
  else {}
})(function(CodeMirror) {
"use strict";

CodeMirror.multiplexingMode = function(outer /*, others */) {
  // Others should be {open, close, mode [, delimStyle] [, innerStyle]} objects
  var others = Array.prototype.slice.call(arguments, 1);

  function indexOf(string, pattern, from, returnEnd) {
    if (typeof pattern == "string") {
      var found = string.indexOf(pattern, from);
      return returnEnd && found > -1 ? found + pattern.length : found;
    }
    var m = pattern.exec(from ? string.slice(from) : string);
    return m ? m.index + from + (returnEnd ? m[0].length : 0) : -1;
  }

  return {
    startState: function() {
      return {
        outer: CodeMirror.startState(outer),
        innerActive: null,
        inner: null
      };
    },

    copyState: function(state) {
      return {
        outer: CodeMirror.copyState(outer, state.outer),
        innerActive: state.innerActive,
        inner: state.innerActive && CodeMirror.copyState(state.innerActive.mode, state.inner)
      };
    },

    token: function(stream, state) {
      if (!state.innerActive) {
        var cutOff = Infinity, oldContent = stream.string;
        for (var i = 0; i < others.length; ++i) {
          var other = others[i];
          var found = indexOf(oldContent, other.open, stream.pos);
          if (found == stream.pos) {
            if (!other.parseDelimiters) stream.match(other.open);
            state.innerActive = other;

            // Get the outer indent, making sure to handle CodeMirror.Pass
            var outerIndent = 0;
            if (outer.indent) {
              var possibleOuterIndent = outer.indent(state.outer, "", "");
              if (possibleOuterIndent !== CodeMirror.Pass) outerIndent = possibleOuterIndent;
            }

            state.inner = CodeMirror.startState(other.mode, outerIndent);
            return other.delimStyle && (other.delimStyle + " " + other.delimStyle + "-open");
          } else if (found != -1 && found < cutOff) {
            cutOff = found;
          }
        }
        if (cutOff != Infinity) stream.string = oldContent.slice(0, cutOff);
        var outerToken = outer.token(stream, state.outer);
        if (cutOff != Infinity) stream.string = oldContent;
        return outerToken;
      } else {
        var curInner = state.innerActive, oldContent = stream.string;
        if (!curInner.close && stream.sol()) {
          state.innerActive = state.inner = null;
          return this.token(stream, state);
        }
        var found = curInner.close ? indexOf(oldContent, curInner.close, stream.pos, curInner.parseDelimiters) : -1;
        if (found == stream.pos && !curInner.parseDelimiters) {
          stream.match(curInner.close);
          state.innerActive = state.inner = null;
          return curInner.delimStyle && (curInner.delimStyle + " " + curInner.delimStyle + "-close");
        }
        if (found > -1) stream.string = oldContent.slice(0, found);
        var innerToken = curInner.mode.token(stream, state.inner);
        if (found > -1) stream.string = oldContent;

        if (found == stream.pos && curInner.parseDelimiters)
          state.innerActive = state.inner = null;

        if (curInner.innerStyle) {
          if (innerToken) innerToken = innerToken + " " + curInner.innerStyle;
          else innerToken = curInner.innerStyle;
        }

        return innerToken;
      }
    },

    indent: function(state, textAfter, line) {
      var mode = state.innerActive ? state.innerActive.mode : outer;
      if (!mode.indent) return CodeMirror.Pass;
      return mode.indent(state.innerActive ? state.inner : state.outer, textAfter, line);
    },

    blankLine: function(state) {
      var mode = state.innerActive ? state.innerActive.mode : outer;
      if (mode.blankLine) {
        mode.blankLine(state.innerActive ? state.inner : state.outer);
      }
      if (!state.innerActive) {
        for (var i = 0; i < others.length; ++i) {
          var other = others[i];
          if (other.open === "\n") {
            state.innerActive = other;
            state.inner = CodeMirror.startState(other.mode, mode.indent ? mode.indent(state.outer, "", "") : 0);
          }
        }
      } else if (state.innerActive.close === "\n") {
        state.innerActive = state.inner = null;
      }
    },

    electricChars: outer.electricChars,

    innerMode: function(state) {
      return state.inner ? {state: state.inner, mode: state.innerActive.mode} : {state: state.outer, mode: outer};
    }
  };
};

});


/***/ }),

/***/ "eb50":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_form_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("63c1");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_form_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_form_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_form_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "ebb5":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var NATIVE_ARRAY_BUFFER = __webpack_require__("a981");
var DESCRIPTORS = __webpack_require__("83ab");
var global = __webpack_require__("da84");
var isObject = __webpack_require__("861d");
var has = __webpack_require__("5135");
var classof = __webpack_require__("f5df");
var createNonEnumerableProperty = __webpack_require__("9112");
var redefine = __webpack_require__("6eeb");
var defineProperty = __webpack_require__("9bf2").f;
var getPrototypeOf = __webpack_require__("e163");
var setPrototypeOf = __webpack_require__("d2bb");
var wellKnownSymbol = __webpack_require__("b622");
var uid = __webpack_require__("90e3");

var Int8Array = global.Int8Array;
var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
var Uint8ClampedArray = global.Uint8ClampedArray;
var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;
var TypedArray = Int8Array && getPrototypeOf(Int8Array);
var TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);
var ObjectPrototype = Object.prototype;
var isPrototypeOf = ObjectPrototype.isPrototypeOf;

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
// Fixing native typed arrays in Opera Presto crashes the browser, see #595
var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';
var TYPED_ARRAY_TAG_REQIRED = false;
var NAME;

var TypedArrayConstructorsList = {
  Int8Array: 1,
  Uint8Array: 1,
  Uint8ClampedArray: 1,
  Int16Array: 2,
  Uint16Array: 2,
  Int32Array: 4,
  Uint32Array: 4,
  Float32Array: 4,
  Float64Array: 8
};

var isView = function isView(it) {
  var klass = classof(it);
  return klass === 'DataView' || has(TypedArrayConstructorsList, klass);
};

var isTypedArray = function (it) {
  return isObject(it) && has(TypedArrayConstructorsList, classof(it));
};

var aTypedArray = function (it) {
  if (isTypedArray(it)) return it;
  throw TypeError('Target is not a typed array');
};

var aTypedArrayConstructor = function (C) {
  if (setPrototypeOf) {
    if (isPrototypeOf.call(TypedArray, C)) return C;
  } else for (var ARRAY in TypedArrayConstructorsList) if (has(TypedArrayConstructorsList, NAME)) {
    var TypedArrayConstructor = global[ARRAY];
    if (TypedArrayConstructor && (C === TypedArrayConstructor || isPrototypeOf.call(TypedArrayConstructor, C))) {
      return C;
    }
  } throw TypeError('Target is not a typed array constructor');
};

var exportTypedArrayMethod = function (KEY, property, forced) {
  if (!DESCRIPTORS) return;
  if (forced) for (var ARRAY in TypedArrayConstructorsList) {
    var TypedArrayConstructor = global[ARRAY];
    if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) {
      delete TypedArrayConstructor.prototype[KEY];
    }
  }
  if (!TypedArrayPrototype[KEY] || forced) {
    redefine(TypedArrayPrototype, KEY, forced ? property
      : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property);
  }
};

var exportTypedArrayStaticMethod = function (KEY, property, forced) {
  var ARRAY, TypedArrayConstructor;
  if (!DESCRIPTORS) return;
  if (setPrototypeOf) {
    if (forced) for (ARRAY in TypedArrayConstructorsList) {
      TypedArrayConstructor = global[ARRAY];
      if (TypedArrayConstructor && has(TypedArrayConstructor, KEY)) {
        delete TypedArrayConstructor[KEY];
      }
    }
    if (!TypedArray[KEY] || forced) {
      // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable
      try {
        return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8Array[KEY] || property);
      } catch (error) { /* empty */ }
    } else return;
  }
  for (ARRAY in TypedArrayConstructorsList) {
    TypedArrayConstructor = global[ARRAY];
    if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {
      redefine(TypedArrayConstructor, KEY, property);
    }
  }
};

for (NAME in TypedArrayConstructorsList) {
  if (!global[NAME]) NATIVE_ARRAY_BUFFER_VIEWS = false;
}

// WebKit bug - typed arrays constructors prototype is Object.prototype
if (!NATIVE_ARRAY_BUFFER_VIEWS || typeof TypedArray != 'function' || TypedArray === Function.prototype) {
  // eslint-disable-next-line no-shadow
  TypedArray = function TypedArray() {
    throw TypeError('Incorrect invocation');
  };
  if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
    if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);
  }
}

if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {
  TypedArrayPrototype = TypedArray.prototype;
  if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
    if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);
  }
}

// WebKit bug - one more object in Uint8ClampedArray prototype chain
if (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
  setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
}

if (DESCRIPTORS && !has(TypedArrayPrototype, TO_STRING_TAG)) {
  TYPED_ARRAY_TAG_REQIRED = true;
  defineProperty(TypedArrayPrototype, TO_STRING_TAG, { get: function () {
    return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
  } });
  for (NAME in TypedArrayConstructorsList) if (global[NAME]) {
    createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);
  }
}

module.exports = {
  NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
  TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG,
  aTypedArray: aTypedArray,
  aTypedArrayConstructor: aTypedArrayConstructor,
  exportTypedArrayMethod: exportTypedArrayMethod,
  exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
  isView: isView,
  isTypedArray: isTypedArray,
  TypedArray: TypedArray,
  TypedArrayPrototype: TypedArrayPrototype
};


/***/ }),

/***/ "ebee":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "eedf":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("944a");

__webpack_require__("99af");

__webpack_require__("b0c0");

__webpack_require__("0c47");

__webpack_require__("23dc");

__webpack_require__("d3b7");

var _typeof = __webpack_require__("7037");

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

  /******/

  /******/
  // Load entry module and return exports

  /******/

  return __webpack_require__(__webpack_require__.s = 97);
  /******/
}(
/************************************************************************/

/******/
{
  /***/
  0:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";
    /* harmony export (binding) */

    __webpack_require__.d(__webpack_exports__, "a", function () {
      return normalizeComponent;
    });
    /* globals __VUE_SSR_CONTEXT__ */
    // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
    // This module is a runtime utility for cleaner component module output and will
    // be included in the final webpack user bundle.


    function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier,
    /* server only */
    shadowMode
    /* vue-cli only */
    ) {
      // Vue.extend constructor export interop
      var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports; // render functions

      if (render) {
        options.render = render;
        options.staticRenderFns = staticRenderFns;
        options._compiled = true;
      } // functional template


      if (functionalTemplate) {
        options.functional = true;
      } // scopedId


      if (scopeId) {
        options._scopeId = 'data-v-' + scopeId;
      }

      var hook;

      if (moduleIdentifier) {
        // server build
        hook = function hook(context) {
          // 2.3 injection
          context = context || // cached call
          this.$vnode && this.$vnode.ssrContext || // stateful
          this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
          // 2.2 with runInNewContext: true

          if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
            context = __VUE_SSR_CONTEXT__;
          } // inject component styles


          if (injectStyles) {
            injectStyles.call(this, context);
          } // register component module identifier for async chunk inferrence


          if (context && context._registeredComponents) {
            context._registeredComponents.add(moduleIdentifier);
          }
        }; // used by ssr in case component is cached and beforeCreate
        // never gets called


        options._ssrRegister = hook;
      } else if (injectStyles) {
        hook = shadowMode ? function () {
          injectStyles.call(this, this.$root.$options.shadowRoot);
        } : injectStyles;
      }

      if (hook) {
        if (options.functional) {
          // for template-only hot-reload because in that case the render fn doesn't
          // go through the normalizer
          options._injectStyles = hook; // register for functioal component in vue file

          var originalRender = options.render;

          options.render = function renderWithStyleInjection(h, context) {
            hook.call(context);
            return originalRender(h, context);
          };
        } else {
          // inject component registration as beforeCreate hook
          var existing = options.beforeCreate;
          options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
        }
      }

      return {
        exports: scriptExports,
        options: options
      };
    }
    /***/

  },

  /***/
  97:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button.vue?vue&type=template&id=ca859fb4&


    var render = function render() {
      var _vm = this;

      var _h = _vm.$createElement;

      var _c = _vm._self._c || _h;

      return _c("button", {
        staticClass: "el-button",
        class: [_vm.type ? "el-button--" + _vm.type : "", _vm.buttonSize ? "el-button--" + _vm.buttonSize : "", {
          "is-disabled": _vm.buttonDisabled,
          "is-loading": _vm.loading,
          "is-plain": _vm.plain,
          "is-round": _vm.round,
          "is-circle": _vm.circle
        }],
        attrs: {
          disabled: _vm.buttonDisabled || _vm.loading,
          autofocus: _vm.autofocus,
          type: _vm.nativeType
        },
        on: {
          click: _vm.handleClick
        }
      }, [_vm.loading ? _c("i", {
        staticClass: "el-icon-loading"
      }) : _vm._e(), _vm.icon && !_vm.loading ? _c("i", {
        class: _vm.icon
      }) : _vm._e(), _vm.$slots.default ? _c("span", [_vm._t("default")], 2) : _vm._e()]);
    };

    var staticRenderFns = [];
    render._withStripped = true; // CONCATENATED MODULE: ./packages/button/src/button.vue?vue&type=template&id=ca859fb4&
    // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button.vue?vue&type=script&lang=js&
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //

    /* harmony default export */

    var buttonvue_type_script_lang_js_ = {
      name: 'ElButton',
      inject: {
        elForm: {
          default: ''
        },
        elFormItem: {
          default: ''
        }
      },
      props: {
        type: {
          type: String,
          default: 'default'
        },
        size: String,
        icon: {
          type: String,
          default: ''
        },
        nativeType: {
          type: String,
          default: 'button'
        },
        loading: Boolean,
        disabled: Boolean,
        plain: Boolean,
        autofocus: Boolean,
        round: Boolean,
        circle: Boolean
      },
      computed: {
        _elFormItemSize: function _elFormItemSize() {
          return (this.elFormItem || {}).elFormItemSize;
        },
        buttonSize: function buttonSize() {
          return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
        },
        buttonDisabled: function buttonDisabled() {
          return this.disabled || (this.elForm || {}).disabled;
        }
      },
      methods: {
        handleClick: function handleClick(evt) {
          this.$emit('click', evt);
        }
      }
    }; // CONCATENATED MODULE: ./packages/button/src/button.vue?vue&type=script&lang=js&

    /* harmony default export */

    var src_buttonvue_type_script_lang_js_ = buttonvue_type_script_lang_js_; // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js

    var componentNormalizer = __webpack_require__(0); // CONCATENATED MODULE: ./packages/button/src/button.vue

    /* normalize component */


    var component = Object(componentNormalizer["a"
    /* default */
    ])(src_buttonvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null);
    /* hot reload */

    if (false) { var api; }

    component.options.__file = "packages/button/src/button.vue";
    /* harmony default export */

    var src_button = component.exports; // CONCATENATED MODULE: ./packages/button/index.js

    /* istanbul ignore next */

    src_button.install = function (Vue) {
      Vue.component(src_button.name, src_button);
    };
    /* harmony default export */


    var packages_button = __webpack_exports__["default"] = src_button;
    /***/
  }
  /******/

});

/***/ }),

/***/ "ef08":
/***/ (function(module, exports) {

// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
  ? window : typeof self != 'undefined' && self.Math == Math ? self
  // eslint-disable-next-line no-new-func
  : Function('return this')();
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef


/***/ }),

/***/ "efed":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "f008":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "f040":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"));
  else {}
})(function(CodeMirror) {
  "use strict";

  CodeMirror.modeInfo = [
    {name: "APL", mime: "text/apl", mode: "apl", ext: ["dyalog", "apl"]},
    {name: "PGP", mimes: ["application/pgp", "application/pgp-encrypted", "application/pgp-keys", "application/pgp-signature"], mode: "asciiarmor", ext: ["asc", "pgp", "sig"]},
    {name: "ASN.1", mime: "text/x-ttcn-asn", mode: "asn.1", ext: ["asn", "asn1"]},
    {name: "Asterisk", mime: "text/x-asterisk", mode: "asterisk", file: /^extensions\.conf$/i},
    {name: "Brainfuck", mime: "text/x-brainfuck", mode: "brainfuck", ext: ["b", "bf"]},
    {name: "C", mime: "text/x-csrc", mode: "clike", ext: ["c", "h", "ino"]},
    {name: "C++", mime: "text/x-c++src", mode: "clike", ext: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"], alias: ["cpp"]},
    {name: "Cobol", mime: "text/x-cobol", mode: "cobol", ext: ["cob", "cpy"]},
    {name: "C#", mime: "text/x-csharp", mode: "clike", ext: ["cs"], alias: ["csharp", "cs"]},
    {name: "Clojure", mime: "text/x-clojure", mode: "clojure", ext: ["clj", "cljc", "cljx"]},
    {name: "ClojureScript", mime: "text/x-clojurescript", mode: "clojure", ext: ["cljs"]},
    {name: "Closure Stylesheets (GSS)", mime: "text/x-gss", mode: "css", ext: ["gss"]},
    {name: "CMake", mime: "text/x-cmake", mode: "cmake", ext: ["cmake", "cmake.in"], file: /^CMakeLists\.txt$/},
    {name: "CoffeeScript", mimes: ["application/vnd.coffeescript", "text/coffeescript", "text/x-coffeescript"], mode: "coffeescript", ext: ["coffee"], alias: ["coffee", "coffee-script"]},
    {name: "Common Lisp", mime: "text/x-common-lisp", mode: "commonlisp", ext: ["cl", "lisp", "el"], alias: ["lisp"]},
    {name: "Cypher", mime: "application/x-cypher-query", mode: "cypher", ext: ["cyp", "cypher"]},
    {name: "Cython", mime: "text/x-cython", mode: "python", ext: ["pyx", "pxd", "pxi"]},
    {name: "Crystal", mime: "text/x-crystal", mode: "crystal", ext: ["cr"]},
    {name: "CSS", mime: "text/css", mode: "css", ext: ["css"]},
    {name: "CQL", mime: "text/x-cassandra", mode: "sql", ext: ["cql"]},
    {name: "D", mime: "text/x-d", mode: "d", ext: ["d"]},
    {name: "Dart", mimes: ["application/dart", "text/x-dart"], mode: "dart", ext: ["dart"]},
    {name: "diff", mime: "text/x-diff", mode: "diff", ext: ["diff", "patch"]},
    {name: "Django", mime: "text/x-django", mode: "django"},
    {name: "Dockerfile", mime: "text/x-dockerfile", mode: "dockerfile", file: /^Dockerfile$/},
    {name: "DTD", mime: "application/xml-dtd", mode: "dtd", ext: ["dtd"]},
    {name: "Dylan", mime: "text/x-dylan", mode: "dylan", ext: ["dylan", "dyl", "intr"]},
    {name: "EBNF", mime: "text/x-ebnf", mode: "ebnf"},
    {name: "ECL", mime: "text/x-ecl", mode: "ecl", ext: ["ecl"]},
    {name: "edn", mime: "application/edn", mode: "clojure", ext: ["edn"]},
    {name: "Eiffel", mime: "text/x-eiffel", mode: "eiffel", ext: ["e"]},
    {name: "Elm", mime: "text/x-elm", mode: "elm", ext: ["elm"]},
    {name: "Embedded Javascript", mime: "application/x-ejs", mode: "htmlembedded", ext: ["ejs"]},
    {name: "Embedded Ruby", mime: "application/x-erb", mode: "htmlembedded", ext: ["erb"]},
    {name: "Erlang", mime: "text/x-erlang", mode: "erlang", ext: ["erl"]},
    {name: "Esper", mime: "text/x-esper", mode: "sql"},
    {name: "Factor", mime: "text/x-factor", mode: "factor", ext: ["factor"]},
    {name: "FCL", mime: "text/x-fcl", mode: "fcl"},
    {name: "Forth", mime: "text/x-forth", mode: "forth", ext: ["forth", "fth", "4th"]},
    {name: "Fortran", mime: "text/x-fortran", mode: "fortran", ext: ["f", "for", "f77", "f90", "f95"]},
    {name: "F#", mime: "text/x-fsharp", mode: "mllike", ext: ["fs"], alias: ["fsharp"]},
    {name: "Gas", mime: "text/x-gas", mode: "gas", ext: ["s"]},
    {name: "Gherkin", mime: "text/x-feature", mode: "gherkin", ext: ["feature"]},
    {name: "GitHub Flavored Markdown", mime: "text/x-gfm", mode: "gfm", file: /^(readme|contributing|history)\.md$/i},
    {name: "Go", mime: "text/x-go", mode: "go", ext: ["go"]},
    {name: "Groovy", mime: "text/x-groovy", mode: "groovy", ext: ["groovy", "gradle"], file: /^Jenkinsfile$/},
    {name: "HAML", mime: "text/x-haml", mode: "haml", ext: ["haml"]},
    {name: "Haskell", mime: "text/x-haskell", mode: "haskell", ext: ["hs"]},
    {name: "Haskell (Literate)", mime: "text/x-literate-haskell", mode: "haskell-literate", ext: ["lhs"]},
    {name: "Haxe", mime: "text/x-haxe", mode: "haxe", ext: ["hx"]},
    {name: "HXML", mime: "text/x-hxml", mode: "haxe", ext: ["hxml"]},
    {name: "ASP.NET", mime: "application/x-aspx", mode: "htmlembedded", ext: ["aspx"], alias: ["asp", "aspx"]},
    {name: "HTML", mime: "text/html", mode: "htmlmixed", ext: ["html", "htm", "handlebars", "hbs"], alias: ["xhtml"]},
    {name: "HTTP", mime: "message/http", mode: "http"},
    {name: "IDL", mime: "text/x-idl", mode: "idl", ext: ["pro"]},
    {name: "Pug", mime: "text/x-pug", mode: "pug", ext: ["jade", "pug"], alias: ["jade"]},
    {name: "Java", mime: "text/x-java", mode: "clike", ext: ["java"]},
    {name: "Java Server Pages", mime: "application/x-jsp", mode: "htmlembedded", ext: ["jsp"], alias: ["jsp"]},
    {name: "JavaScript", mimes: ["text/javascript", "text/ecmascript", "application/javascript", "application/x-javascript", "application/ecmascript"],
     mode: "javascript", ext: ["js"], alias: ["ecmascript", "js", "node"]},
    {name: "JSON", mimes: ["application/json", "application/x-json"], mode: "javascript", ext: ["json", "map"], alias: ["json5"]},
    {name: "JSON-LD", mime: "application/ld+json", mode: "javascript", ext: ["jsonld"], alias: ["jsonld"]},
    {name: "JSX", mime: "text/jsx", mode: "jsx", ext: ["jsx"]},
    {name: "Jinja2", mime: "text/jinja2", mode: "jinja2", ext: ["j2", "jinja", "jinja2"]},
    {name: "Julia", mime: "text/x-julia", mode: "julia", ext: ["jl"]},
    {name: "Kotlin", mime: "text/x-kotlin", mode: "clike", ext: ["kt"]},
    {name: "LESS", mime: "text/x-less", mode: "css", ext: ["less"]},
    {name: "LiveScript", mime: "text/x-livescript", mode: "livescript", ext: ["ls"], alias: ["ls"]},
    {name: "Lua", mime: "text/x-lua", mode: "lua", ext: ["lua"]},
    {name: "Markdown", mime: "text/x-markdown", mode: "markdown", ext: ["markdown", "md", "mkd"]},
    {name: "mIRC", mime: "text/mirc", mode: "mirc"},
    {name: "MariaDB SQL", mime: "text/x-mariadb", mode: "sql"},
    {name: "Mathematica", mime: "text/x-mathematica", mode: "mathematica", ext: ["m", "nb", "wl", "wls"]},
    {name: "Modelica", mime: "text/x-modelica", mode: "modelica", ext: ["mo"]},
    {name: "MUMPS", mime: "text/x-mumps", mode: "mumps", ext: ["mps"]},
    {name: "MS SQL", mime: "text/x-mssql", mode: "sql"},
    {name: "mbox", mime: "application/mbox", mode: "mbox", ext: ["mbox"]},
    {name: "MySQL", mime: "text/x-mysql", mode: "sql"},
    {name: "Nginx", mime: "text/x-nginx-conf", mode: "nginx", file: /nginx.*\.conf$/i},
    {name: "NSIS", mime: "text/x-nsis", mode: "nsis", ext: ["nsh", "nsi"]},
    {name: "NTriples", mimes: ["application/n-triples", "application/n-quads", "text/n-triples"],
     mode: "ntriples", ext: ["nt", "nq"]},
    {name: "Objective-C", mime: "text/x-objectivec", mode: "clike", ext: ["m"], alias: ["objective-c", "objc"]},
    {name: "Objective-C++", mime: "text/x-objectivec++", mode: "clike", ext: ["mm"], alias: ["objective-c++", "objc++"]},
    {name: "OCaml", mime: "text/x-ocaml", mode: "mllike", ext: ["ml", "mli", "mll", "mly"]},
    {name: "Octave", mime: "text/x-octave", mode: "octave", ext: ["m"]},
    {name: "Oz", mime: "text/x-oz", mode: "oz", ext: ["oz"]},
    {name: "Pascal", mime: "text/x-pascal", mode: "pascal", ext: ["p", "pas"]},
    {name: "PEG.js", mime: "null", mode: "pegjs", ext: ["jsonld"]},
    {name: "Perl", mime: "text/x-perl", mode: "perl", ext: ["pl", "pm"]},
    {name: "PHP", mimes: ["text/x-php", "application/x-httpd-php", "application/x-httpd-php-open"], mode: "php", ext: ["php", "php3", "php4", "php5", "php7", "phtml"]},
    {name: "Pig", mime: "text/x-pig", mode: "pig", ext: ["pig"]},
    {name: "Plain Text", mime: "text/plain", mode: "null", ext: ["txt", "text", "conf", "def", "list", "log"]},
    {name: "PLSQL", mime: "text/x-plsql", mode: "sql", ext: ["pls"]},
    {name: "PostgreSQL", mime: "text/x-pgsql", mode: "sql"},
    {name: "PowerShell", mime: "application/x-powershell", mode: "powershell", ext: ["ps1", "psd1", "psm1"]},
    {name: "Properties files", mime: "text/x-properties", mode: "properties", ext: ["properties", "ini", "in"], alias: ["ini", "properties"]},
    {name: "ProtoBuf", mime: "text/x-protobuf", mode: "protobuf", ext: ["proto"]},
    {name: "Python", mime: "text/x-python", mode: "python", ext: ["BUILD", "bzl", "py", "pyw"], file: /^(BUCK|BUILD)$/},
    {name: "Puppet", mime: "text/x-puppet", mode: "puppet", ext: ["pp"]},
    {name: "Q", mime: "text/x-q", mode: "q", ext: ["q"]},
    {name: "R", mime: "text/x-rsrc", mode: "r", ext: ["r", "R"], alias: ["rscript"]},
    {name: "reStructuredText", mime: "text/x-rst", mode: "rst", ext: ["rst"], alias: ["rst"]},
    {name: "RPM Changes", mime: "text/x-rpm-changes", mode: "rpm"},
    {name: "RPM Spec", mime: "text/x-rpm-spec", mode: "rpm", ext: ["spec"]},
    {name: "Ruby", mime: "text/x-ruby", mode: "ruby", ext: ["rb"], alias: ["jruby", "macruby", "rake", "rb", "rbx"]},
    {name: "Rust", mime: "text/x-rustsrc", mode: "rust", ext: ["rs"]},
    {name: "SAS", mime: "text/x-sas", mode: "sas", ext: ["sas"]},
    {name: "Sass", mime: "text/x-sass", mode: "sass", ext: ["sass"]},
    {name: "Scala", mime: "text/x-scala", mode: "clike", ext: ["scala"]},
    {name: "Scheme", mime: "text/x-scheme", mode: "scheme", ext: ["scm", "ss"]},
    {name: "SCSS", mime: "text/x-scss", mode: "css", ext: ["scss"]},
    {name: "Shell", mimes: ["text/x-sh", "application/x-sh"], mode: "shell", ext: ["sh", "ksh", "bash"], alias: ["bash", "sh", "zsh"], file: /^PKGBUILD$/},
    {name: "Sieve", mime: "application/sieve", mode: "sieve", ext: ["siv", "sieve"]},
    {name: "Slim", mimes: ["text/x-slim", "application/x-slim"], mode: "slim", ext: ["slim"]},
    {name: "Smalltalk", mime: "text/x-stsrc", mode: "smalltalk", ext: ["st"]},
    {name: "Smarty", mime: "text/x-smarty", mode: "smarty", ext: ["tpl"]},
    {name: "Solr", mime: "text/x-solr", mode: "solr"},
    {name: "SML", mime: "text/x-sml", mode: "mllike", ext: ["sml", "sig", "fun", "smackspec"]},
    {name: "Soy", mime: "text/x-soy", mode: "soy", ext: ["soy"], alias: ["closure template"]},
    {name: "SPARQL", mime: "application/sparql-query", mode: "sparql", ext: ["rq", "sparql"], alias: ["sparul"]},
    {name: "Spreadsheet", mime: "text/x-spreadsheet", mode: "spreadsheet", alias: ["excel", "formula"]},
    {name: "SQL", mime: "text/x-sql", mode: "sql", ext: ["sql"]},
    {name: "SQLite", mime: "text/x-sqlite", mode: "sql"},
    {name: "Squirrel", mime: "text/x-squirrel", mode: "clike", ext: ["nut"]},
    {name: "Stylus", mime: "text/x-styl", mode: "stylus", ext: ["styl"]},
    {name: "Swift", mime: "text/x-swift", mode: "swift", ext: ["swift"]},
    {name: "sTeX", mime: "text/x-stex", mode: "stex"},
    {name: "LaTeX", mime: "text/x-latex", mode: "stex", ext: ["text", "ltx", "tex"], alias: ["tex"]},
    {name: "SystemVerilog", mime: "text/x-systemverilog", mode: "verilog", ext: ["v", "sv", "svh"]},
    {name: "Tcl", mime: "text/x-tcl", mode: "tcl", ext: ["tcl"]},
    {name: "Textile", mime: "text/x-textile", mode: "textile", ext: ["textile"]},
    {name: "TiddlyWiki", mime: "text/x-tiddlywiki", mode: "tiddlywiki"},
    {name: "Tiki wiki", mime: "text/tiki", mode: "tiki"},
    {name: "TOML", mime: "text/x-toml", mode: "toml", ext: ["toml"]},
    {name: "Tornado", mime: "text/x-tornado", mode: "tornado"},
    {name: "troff", mime: "text/troff", mode: "troff", ext: ["1", "2", "3", "4", "5", "6", "7", "8", "9"]},
    {name: "TTCN", mime: "text/x-ttcn", mode: "ttcn", ext: ["ttcn", "ttcn3", "ttcnpp"]},
    {name: "TTCN_CFG", mime: "text/x-ttcn-cfg", mode: "ttcn-cfg", ext: ["cfg"]},
    {name: "Turtle", mime: "text/turtle", mode: "turtle", ext: ["ttl"]},
    {name: "TypeScript", mime: "application/typescript", mode: "javascript", ext: ["ts"], alias: ["ts"]},
    {name: "TypeScript-JSX", mime: "text/typescript-jsx", mode: "jsx", ext: ["tsx"], alias: ["tsx"]},
    {name: "Twig", mime: "text/x-twig", mode: "twig"},
    {name: "Web IDL", mime: "text/x-webidl", mode: "webidl", ext: ["webidl"]},
    {name: "VB.NET", mime: "text/x-vb", mode: "vb", ext: ["vb"]},
    {name: "VBScript", mime: "text/vbscript", mode: "vbscript", ext: ["vbs"]},
    {name: "Velocity", mime: "text/velocity", mode: "velocity", ext: ["vtl"]},
    {name: "Verilog", mime: "text/x-verilog", mode: "verilog", ext: ["v"]},
    {name: "VHDL", mime: "text/x-vhdl", mode: "vhdl", ext: ["vhd", "vhdl"]},
    {name: "Vue.js Component", mimes: ["script/x-vue", "text/x-vue"], mode: "vue", ext: ["vue"]},
    {name: "XML", mimes: ["application/xml", "text/xml"], mode: "xml", ext: ["xml", "xsl", "xsd", "svg"], alias: ["rss", "wsdl", "xsd"]},
    {name: "XQuery", mime: "application/xquery", mode: "xquery", ext: ["xy", "xquery"]},
    {name: "Yacas", mime: "text/x-yacas", mode: "yacas", ext: ["ys"]},
    {name: "YAML", mimes: ["text/x-yaml", "text/yaml"], mode: "yaml", ext: ["yaml", "yml"], alias: ["yml"]},
    {name: "Z80", mime: "text/x-z80", mode: "z80", ext: ["z80"]},
    {name: "mscgen", mime: "text/x-mscgen", mode: "mscgen", ext: ["mscgen", "mscin", "msc"]},
    {name: "xu", mime: "text/x-xu", mode: "mscgen", ext: ["xu"]},
    {name: "msgenny", mime: "text/x-msgenny", mode: "mscgen", ext: ["msgenny"]},
    {name: "WebAssembly", mime: "text/webassembly", mode: "wast", ext: ["wat", "wast"]},
  ];
  // Ensure all modes have a mime property for backwards compatibility
  for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
    var info = CodeMirror.modeInfo[i];
    if (info.mimes) info.mime = info.mimes[0];
  }

  CodeMirror.findModeByMIME = function(mime) {
    mime = mime.toLowerCase();
    for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
      var info = CodeMirror.modeInfo[i];
      if (info.mime == mime) return info;
      if (info.mimes) for (var j = 0; j < info.mimes.length; j++)
        if (info.mimes[j] == mime) return info;
    }
    if (/\+xml$/.test(mime)) return CodeMirror.findModeByMIME("application/xml")
    if (/\+json$/.test(mime)) return CodeMirror.findModeByMIME("application/json")
  };

  CodeMirror.findModeByExtension = function(ext) {
    ext = ext.toLowerCase();
    for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
      var info = CodeMirror.modeInfo[i];
      if (info.ext) for (var j = 0; j < info.ext.length; j++)
        if (info.ext[j] == ext) return info;
    }
  };

  CodeMirror.findModeByFileName = function(filename) {
    for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
      var info = CodeMirror.modeInfo[i];
      if (info.file && info.file.test(filename)) return info;
    }
    var dot = filename.lastIndexOf(".");
    var ext = dot > -1 && filename.substring(dot + 1, filename.length);
    if (ext) return CodeMirror.findModeByExtension(ext);
  };

  CodeMirror.findModeByName = function(name) {
    name = name.toLowerCase();
    for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
      var info = CodeMirror.modeInfo[i];
      if (info.name.toLowerCase() == name) return info;
      if (info.alias) for (var j = 0; j < info.alias.length; j++)
        if (info.alias[j].toLowerCase() == name) return info;
    }
  };
});


/***/ }),

/***/ "f069":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var aFunction = __webpack_require__("1c0b");

var PromiseCapability = function (C) {
  var resolve, reject;
  this.promise = new C(function ($$resolve, $$reject) {
    if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
    resolve = $$resolve;
    reject = $$reject;
  });
  this.resolve = aFunction(resolve);
  this.reject = aFunction(reject);
};

// 25.4.1.5 NewPromiseCapability(C)
module.exports.f = function (C) {
  return new PromiseCapability(C);
};


/***/ }),

/***/ "f0d9":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;
exports.default = {
  el: {
    colorpicker: {
      confirm: '确定',
      clear: '清空'
    },
    datepicker: {
      now: '此刻',
      today: '今天',
      cancel: '取消',
      clear: '清空',
      confirm: '确定',
      selectDate: '选择日期',
      selectTime: '选择时间',
      startDate: '开始日期',
      startTime: '开始时间',
      endDate: '结束日期',
      endTime: '结束时间',
      prevYear: '前一年',
      nextYear: '后一年',
      prevMonth: '上个月',
      nextMonth: '下个月',
      year: '年',
      month1: '1 月',
      month2: '2 月',
      month3: '3 月',
      month4: '4 月',
      month5: '5 月',
      month6: '6 月',
      month7: '7 月',
      month8: '8 月',
      month9: '9 月',
      month10: '10 月',
      month11: '11 月',
      month12: '12 月',
      // week: '周次',
      weeks: {
        sun: '日',
        mon: '一',
        tue: '二',
        wed: '三',
        thu: '四',
        fri: '五',
        sat: '六'
      },
      months: {
        jan: '一月',
        feb: '二月',
        mar: '三月',
        apr: '四月',
        may: '五月',
        jun: '六月',
        jul: '七月',
        aug: '八月',
        sep: '九月',
        oct: '十月',
        nov: '十一月',
        dec: '十二月'
      }
    },
    select: {
      loading: '加载中',
      noMatch: '无匹配数据',
      noData: '无数据',
      placeholder: '请选择'
    },
    cascader: {
      noMatch: '无匹配数据',
      loading: '加载中',
      placeholder: '请选择',
      noData: '暂无数据'
    },
    pagination: {
      goto: '前往',
      pagesize: '条/页',
      total: '共 {total} 条',
      pageClassifier: '页'
    },
    messagebox: {
      title: '提示',
      confirm: '确定',
      cancel: '取消',
      error: '输入的数据不合法!'
    },
    upload: {
      deleteTip: '按 delete 键可删除',
      delete: '删除',
      preview: '查看图片',
      continue: '继续上传'
    },
    table: {
      emptyText: '暂无数据',
      confirmFilter: '筛选',
      resetFilter: '重置',
      clearFilter: '全部',
      sumText: '合计'
    },
    tree: {
      emptyText: '暂无数据'
    },
    transfer: {
      noMatch: '无匹配数据',
      noData: '无数据',
      titles: ['列表 1', '列表 2'],
      filterPlaceholder: '请输入搜索内容',
      noCheckedFormat: '共 {total} 项',
      hasCheckedFormat: '已选 {checked}/{total} 项'
    },
    image: {
      error: '加载失败'
    },
    pageHeader: {
      title: '返回'
    },
    popconfirm: {
      confirmButtonText: '确定',
      cancelButtonText: '取消'
    }
  }
};

/***/ }),

/***/ "f183":
/***/ (function(module, exports, __webpack_require__) {

var hiddenKeys = __webpack_require__("d012");
var isObject = __webpack_require__("861d");
var has = __webpack_require__("5135");
var defineProperty = __webpack_require__("9bf2").f;
var uid = __webpack_require__("90e3");
var FREEZING = __webpack_require__("bb2f");

var METADATA = uid('meta');
var id = 0;

var isExtensible = Object.isExtensible || function () {
  return true;
};

var setMetadata = function (it) {
  defineProperty(it, METADATA, { value: {
    objectID: 'O' + ++id, // object ID
    weakData: {}          // weak collections IDs
  } });
};

var fastKey = function (it, create) {
  // return a primitive with prefix
  if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
  if (!has(it, METADATA)) {
    // can't set metadata to uncaught frozen object
    if (!isExtensible(it)) return 'F';
    // not necessary to add metadata
    if (!create) return 'E';
    // add missing metadata
    setMetadata(it);
  // return object ID
  } return it[METADATA].objectID;
};

var getWeakData = function (it, create) {
  if (!has(it, METADATA)) {
    // can't set metadata to uncaught frozen object
    if (!isExtensible(it)) return true;
    // not necessary to add metadata
    if (!create) return false;
    // add missing metadata
    setMetadata(it);
  // return the store of weak collections IDs
  } return it[METADATA].weakData;
};

// add metadata on freeze-family methods calling
var onFreeze = function (it) {
  if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);
  return it;
};

var meta = module.exports = {
  REQUIRED: false,
  fastKey: fastKey,
  getWeakData: getWeakData,
  onFreeze: onFreeze
};

hiddenKeys[METADATA] = true;


/***/ }),

/***/ "f3a7":
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;__webpack_require__("99af");

__webpack_require__("4de4");

__webpack_require__("7db0");

__webpack_require__("c975");

__webpack_require__("a15b");

__webpack_require__("d81d");

__webpack_require__("fb6a");

__webpack_require__("a434");

__webpack_require__("b0c0");

__webpack_require__("a9e3");

__webpack_require__("d3b7");

__webpack_require__("4d63");

__webpack_require__("ac1f");

__webpack_require__("25f0");

__webpack_require__("466d");

__webpack_require__("5319");

__webpack_require__("841c");

__webpack_require__("1276");

__webpack_require__("18a5");

var _typeof = __webpack_require__("7037");

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
// This is CodeMirror (https://codemirror.net), a code editor
// implemented in JavaScript on top of the browser's DOM.
//
// You can find some technical background for some of the code below
// at http://marijnhaverbeke.nl/blog/#cm-internals .
(function (global, factory) {
  ( false ? undefined : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory() :  true ? !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
				__WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : (undefined);
})(this, function () {
  'use strict'; // Kludges for bugs and behavior differences that can't be feature
  // detected are enabled based on userAgent etc sniffing.

  var userAgent = navigator.userAgent;
  var platform = navigator.platform;
  var gecko = /gecko\/\d/i.test(userAgent);
  var ie_upto10 = /MSIE \d/.test(userAgent);
  var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(userAgent);
  var edge = /Edge\/(\d+)/.exec(userAgent);
  var ie = ie_upto10 || ie_11up || edge;
  var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]);
  var webkit = !edge && /WebKit\//.test(userAgent);
  var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(userAgent);
  var chrome = !edge && /Chrome\//.test(userAgent);
  var presto = /Opera\//.test(userAgent);
  var safari = /Apple Computer/.test(navigator.vendor);
  var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(userAgent);
  var phantom = /PhantomJS/.test(userAgent);
  var ios = !edge && /AppleWebKit/.test(userAgent) && (/Mobile\/\w+/.test(userAgent) || navigator.maxTouchPoints > 2);
  var android = /Android/.test(userAgent); // This is woefully incomplete. Suggestions for alternative methods welcome.

  var mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);
  var mac = ios || /Mac/.test(platform);
  var chromeOS = /\bCrOS\b/.test(userAgent);
  var windows = /win/i.test(platform);
  var presto_version = presto && userAgent.match(/Version\/(\d*\.\d*)/);

  if (presto_version) {
    presto_version = Number(presto_version[1]);
  }

  if (presto_version && presto_version >= 15) {
    presto = false;
    webkit = true;
  } // Some browsers use the wrong event properties to signal cmd/ctrl on OS X


  var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));
  var captureRightClick = gecko || ie && ie_version >= 9;

  function classTest(cls) {
    return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*");
  }

  var rmClass = function rmClass(node, cls) {
    var current = node.className;
    var match = classTest(cls).exec(current);

    if (match) {
      var after = current.slice(match.index + match[0].length);
      node.className = current.slice(0, match.index) + (after ? match[1] + after : "");
    }
  };

  function removeChildren(e) {
    for (var count = e.childNodes.length; count > 0; --count) {
      e.removeChild(e.firstChild);
    }

    return e;
  }

  function removeChildrenAndAdd(parent, e) {
    return removeChildren(parent).appendChild(e);
  }

  function elt(tag, content, className, style) {
    var e = document.createElement(tag);

    if (className) {
      e.className = className;
    }

    if (style) {
      e.style.cssText = style;
    }

    if (typeof content == "string") {
      e.appendChild(document.createTextNode(content));
    } else if (content) {
      for (var i = 0; i < content.length; ++i) {
        e.appendChild(content[i]);
      }
    }

    return e;
  } // wrapper for elt, which removes the elt from the accessibility tree


  function eltP(tag, content, className, style) {
    var e = elt(tag, content, className, style);
    e.setAttribute("role", "presentation");
    return e;
  }

  var range;

  if (document.createRange) {
    range = function range(node, start, end, endNode) {
      var r = document.createRange();
      r.setEnd(endNode || node, end);
      r.setStart(node, start);
      return r;
    };
  } else {
    range = function range(node, start, end) {
      var r = document.body.createTextRange();

      try {
        r.moveToElementText(node.parentNode);
      } catch (e) {
        return r;
      }

      r.collapse(true);
      r.moveEnd("character", end);
      r.moveStart("character", start);
      return r;
    };
  }

  function contains(parent, child) {
    if (child.nodeType == 3) // Android browser always returns false when child is a textnode
      {
        child = child.parentNode;
      }

    if (parent.contains) {
      return parent.contains(child);
    }

    do {
      if (child.nodeType == 11) {
        child = child.host;
      }

      if (child == parent) {
        return true;
      }
    } while (child = child.parentNode);
  }

  function activeElt() {
    // IE and Edge may throw an "Unspecified Error" when accessing document.activeElement.
    // IE < 10 will throw when accessed while the page is loading or in an iframe.
    // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.
    var activeElement;

    try {
      activeElement = document.activeElement;
    } catch (e) {
      activeElement = document.body || null;
    }

    while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement) {
      activeElement = activeElement.shadowRoot.activeElement;
    }

    return activeElement;
  }

  function addClass(node, cls) {
    var current = node.className;

    if (!classTest(cls).test(current)) {
      node.className += (current ? " " : "") + cls;
    }
  }

  function joinClasses(a, b) {
    var as = a.split(" ");

    for (var i = 0; i < as.length; i++) {
      if (as[i] && !classTest(as[i]).test(b)) {
        b += " " + as[i];
      }
    }

    return b;
  }

  var selectInput = function selectInput(node) {
    node.select();
  };

  if (ios) // Mobile Safari apparently has a bug where select() is broken.
    {
      selectInput = function selectInput(node) {
        node.selectionStart = 0;
        node.selectionEnd = node.value.length;
      };
    } else if (ie) // Suppress mysterious IE10 errors
    {
      selectInput = function selectInput(node) {
        try {
          node.select();
        } catch (_e) {}
      };
    }

  function bind(f) {
    var args = Array.prototype.slice.call(arguments, 1);
    return function () {
      return f.apply(null, args);
    };
  }

  function copyObj(obj, target, overwrite) {
    if (!target) {
      target = {};
    }

    for (var prop in obj) {
      if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop))) {
        target[prop] = obj[prop];
      }
    }

    return target;
  } // Counts the column offset in a string, taking tabs into account.
  // Used mostly to find indentation.


  function countColumn(string, end, tabSize, startIndex, startValue) {
    if (end == null) {
      end = string.search(/[^\s\u00a0]/);

      if (end == -1) {
        end = string.length;
      }
    }

    for (var i = startIndex || 0, n = startValue || 0;;) {
      var nextTab = string.indexOf("\t", i);

      if (nextTab < 0 || nextTab >= end) {
        return n + (end - i);
      }

      n += nextTab - i;
      n += tabSize - n % tabSize;
      i = nextTab + 1;
    }
  }

  var Delayed = function Delayed() {
    this.id = null;
    this.f = null;
    this.time = 0;
    this.handler = bind(this.onTimeout, this);
  };

  Delayed.prototype.onTimeout = function (self) {
    self.id = 0;

    if (self.time <= +new Date()) {
      self.f();
    } else {
      setTimeout(self.handler, self.time - +new Date());
    }
  };

  Delayed.prototype.set = function (ms, f) {
    this.f = f;
    var time = +new Date() + ms;

    if (!this.id || time < this.time) {
      clearTimeout(this.id);
      this.id = setTimeout(this.handler, ms);
      this.time = time;
    }
  };

  function indexOf(array, elt) {
    for (var i = 0; i < array.length; ++i) {
      if (array[i] == elt) {
        return i;
      }
    }

    return -1;
  } // Number of pixels added to scroller and sizer to hide scrollbar


  var scrollerGap = 50; // Returned or thrown by various protocols to signal 'I'm not
  // handling this'.

  var Pass = {
    toString: function toString() {
      return "CodeMirror.Pass";
    }
  }; // Reused option objects for setSelection & friends

  var sel_dontScroll = {
    scroll: false
  },
      sel_mouse = {
    origin: "*mouse"
  },
      sel_move = {
    origin: "+move"
  }; // The inverse of countColumn -- find the offset that corresponds to
  // a particular column.

  function findColumn(string, goal, tabSize) {
    for (var pos = 0, col = 0;;) {
      var nextTab = string.indexOf("\t", pos);

      if (nextTab == -1) {
        nextTab = string.length;
      }

      var skipped = nextTab - pos;

      if (nextTab == string.length || col + skipped >= goal) {
        return pos + Math.min(skipped, goal - col);
      }

      col += nextTab - pos;
      col += tabSize - col % tabSize;
      pos = nextTab + 1;

      if (col >= goal) {
        return pos;
      }
    }
  }

  var spaceStrs = [""];

  function spaceStr(n) {
    while (spaceStrs.length <= n) {
      spaceStrs.push(lst(spaceStrs) + " ");
    }

    return spaceStrs[n];
  }

  function lst(arr) {
    return arr[arr.length - 1];
  }

  function map(array, f) {
    var out = [];

    for (var i = 0; i < array.length; i++) {
      out[i] = f(array[i], i);
    }

    return out;
  }

  function insertSorted(array, value, score) {
    var pos = 0,
        priority = score(value);

    while (pos < array.length && score(array[pos]) <= priority) {
      pos++;
    }

    array.splice(pos, 0, value);
  }

  function nothing() {}

  function createObj(base, props) {
    var inst;

    if (Object.create) {
      inst = Object.create(base);
    } else {
      nothing.prototype = base;
      inst = new nothing();
    }

    if (props) {
      copyObj(props, inst);
    }

    return inst;
  }

  var nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;

  function isWordCharBasic(ch) {
    return /\w/.test(ch) || ch > "\x80" && (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch));
  }

  function isWordChar(ch, helper) {
    if (!helper) {
      return isWordCharBasic(ch);
    }

    if (helper.source.indexOf("\\w") > -1 && isWordCharBasic(ch)) {
      return true;
    }

    return helper.test(ch);
  }

  function isEmpty(obj) {
    for (var n in obj) {
      if (obj.hasOwnProperty(n) && obj[n]) {
        return false;
      }
    }

    return true;
  } // Extending unicode characters. A series of a non-extending char +
  // any number of extending chars is treated as a single unit as far
  // as editing and measuring is concerned. This is not fully correct,
  // since some scripts/fonts/browsers also treat other configurations
  // of code points as a group.


  var extendingChars = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;

  function isExtendingChar(ch) {
    return ch.charCodeAt(0) >= 768 && extendingChars.test(ch);
  } // Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range.


  function skipExtendingChars(str, pos, dir) {
    while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) {
      pos += dir;
    }

    return pos;
  } // Returns the value from the range [`from`; `to`] that satisfies
  // `pred` and is closest to `from`. Assumes that at least `to`
  // satisfies `pred`. Supports `from` being greater than `to`.


  function findFirst(pred, from, to) {
    // At any point we are certain `to` satisfies `pred`, don't know
    // whether `from` does.
    var dir = from > to ? -1 : 1;

    for (;;) {
      if (from == to) {
        return from;
      }

      var midF = (from + to) / 2,
          mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);

      if (mid == from) {
        return pred(mid) ? from : to;
      }

      if (pred(mid)) {
        to = mid;
      } else {
        from = mid + dir;
      }
    }
  } // BIDI HELPERS


  function iterateBidiSections(order, from, to, f) {
    if (!order) {
      return f(from, to, "ltr", 0);
    }

    var found = false;

    for (var i = 0; i < order.length; ++i) {
      var part = order[i];

      if (part.from < to && part.to > from || from == to && part.to == from) {
        f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr", i);
        found = true;
      }
    }

    if (!found) {
      f(from, to, "ltr");
    }
  }

  var bidiOther = null;

  function getBidiPartAt(order, ch, sticky) {
    var found;
    bidiOther = null;

    for (var i = 0; i < order.length; ++i) {
      var cur = order[i];

      if (cur.from < ch && cur.to > ch) {
        return i;
      }

      if (cur.to == ch) {
        if (cur.from != cur.to && sticky == "before") {
          found = i;
        } else {
          bidiOther = i;
        }
      }

      if (cur.from == ch) {
        if (cur.from != cur.to && sticky != "before") {
          found = i;
        } else {
          bidiOther = i;
        }
      }
    }

    return found != null ? found : bidiOther;
  } // Bidirectional ordering algorithm
  // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm
  // that this (partially) implements.
  // One-char codes used for character types:
  // L (L):   Left-to-Right
  // R (R):   Right-to-Left
  // r (AL):  Right-to-Left Arabic
  // 1 (EN):  European Number
  // + (ES):  European Number Separator
  // % (ET):  European Number Terminator
  // n (AN):  Arabic Number
  // , (CS):  Common Number Separator
  // m (NSM): Non-Spacing Mark
  // b (BN):  Boundary Neutral
  // s (B):   Paragraph Separator
  // t (S):   Segment Separator
  // w (WS):  Whitespace
  // N (ON):  Other Neutrals
  // Returns null if characters are ordered as they appear
  // (left-to-right), or an array of sections ({from, to, level}
  // objects) in the order in which they occur visually.


  var bidiOrdering = function () {
    // Character types for codepoints 0 to 0xff
    var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN"; // Character types for codepoints 0x600 to 0x6f9

    var arabicTypes = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";

    function charType(code) {
      if (code <= 0xf7) {
        return lowTypes.charAt(code);
      } else if (0x590 <= code && code <= 0x5f4) {
        return "R";
      } else if (0x600 <= code && code <= 0x6f9) {
        return arabicTypes.charAt(code - 0x600);
      } else if (0x6ee <= code && code <= 0x8ac) {
        return "r";
      } else if (0x2000 <= code && code <= 0x200b) {
        return "w";
      } else if (code == 0x200c) {
        return "b";
      } else {
        return "L";
      }
    }

    var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
    var isNeutral = /[stwN]/,
        isStrong = /[LRr]/,
        countsAsLeft = /[Lb1n]/,
        countsAsNum = /[1n]/;

    function BidiSpan(level, from, to) {
      this.level = level;
      this.from = from;
      this.to = to;
    }

    return function (str, direction) {
      var outerType = direction == "ltr" ? "L" : "R";

      if (str.length == 0 || direction == "ltr" && !bidiRE.test(str)) {
        return false;
      }

      var len = str.length,
          types = [];

      for (var i = 0; i < len; ++i) {
        types.push(charType(str.charCodeAt(i)));
      } // W1. Examine each non-spacing mark (NSM) in the level run, and
      // change the type of the NSM to the type of the previous
      // character. If the NSM is at the start of the level run, it will
      // get the type of sor.


      for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) {
        var type = types[i$1];

        if (type == "m") {
          types[i$1] = prev;
        } else {
          prev = type;
        }
      } // W2. Search backwards from each instance of a European number
      // until the first strong type (R, L, AL, or sor) is found. If an
      // AL is found, change the type of the European number to Arabic
      // number.
      // W3. Change all ALs to R.


      for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) {
        var type$1 = types[i$2];

        if (type$1 == "1" && cur == "r") {
          types[i$2] = "n";
        } else if (isStrong.test(type$1)) {
          cur = type$1;

          if (type$1 == "r") {
            types[i$2] = "R";
          }
        }
      } // W4. A single European separator between two European numbers
      // changes to a European number. A single common separator between
      // two numbers of the same type changes to that type.


      for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) {
        var type$2 = types[i$3];

        if (type$2 == "+" && prev$1 == "1" && types[i$3 + 1] == "1") {
          types[i$3] = "1";
        } else if (type$2 == "," && prev$1 == types[i$3 + 1] && (prev$1 == "1" || prev$1 == "n")) {
          types[i$3] = prev$1;
        }

        prev$1 = type$2;
      } // W5. A sequence of European terminators adjacent to European
      // numbers changes to all European numbers.
      // W6. Otherwise, separators and terminators change to Other
      // Neutral.


      for (var i$4 = 0; i$4 < len; ++i$4) {
        var type$3 = types[i$4];

        if (type$3 == ",") {
          types[i$4] = "N";
        } else if (type$3 == "%") {
          var end = void 0;

          for (end = i$4 + 1; end < len && types[end] == "%"; ++end) {}

          var replace = i$4 && types[i$4 - 1] == "!" || end < len && types[end] == "1" ? "1" : "N";

          for (var j = i$4; j < end; ++j) {
            types[j] = replace;
          }

          i$4 = end - 1;
        }
      } // W7. Search backwards from each instance of a European number
      // until the first strong type (R, L, or sor) is found. If an L is
      // found, then change the type of the European number to L.


      for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) {
        var type$4 = types[i$5];

        if (cur$1 == "L" && type$4 == "1") {
          types[i$5] = "L";
        } else if (isStrong.test(type$4)) {
          cur$1 = type$4;
        }
      } // N1. A sequence of neutrals takes the direction of the
      // surrounding strong text if the text on both sides has the same
      // direction. European and Arabic numbers act as if they were R in
      // terms of their influence on neutrals. Start-of-level-run (sor)
      // and end-of-level-run (eor) are used at level run boundaries.
      // N2. Any remaining neutrals take the embedding direction.


      for (var i$6 = 0; i$6 < len; ++i$6) {
        if (isNeutral.test(types[i$6])) {
          var end$1 = void 0;

          for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {}

          var before = (i$6 ? types[i$6 - 1] : outerType) == "L";
          var after = (end$1 < len ? types[end$1] : outerType) == "L";
          var replace$1 = before == after ? before ? "L" : "R" : outerType;

          for (var j$1 = i$6; j$1 < end$1; ++j$1) {
            types[j$1] = replace$1;
          }

          i$6 = end$1 - 1;
        }
      } // Here we depart from the documented algorithm, in order to avoid
      // building up an actual levels array. Since there are only three
      // levels (0, 1, 2) in an implementation that doesn't take
      // explicit embedding into account, we can build up the order on
      // the fly, without following the level-based algorithm.


      var order = [],
          m;

      for (var i$7 = 0; i$7 < len;) {
        if (countsAsLeft.test(types[i$7])) {
          var start = i$7;

          for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {}

          order.push(new BidiSpan(0, start, i$7));
        } else {
          var pos = i$7,
              at = order.length,
              isRTL = direction == "rtl" ? 1 : 0;

          for (++i$7; i$7 < len && types[i$7] != "L"; ++i$7) {}

          for (var j$2 = pos; j$2 < i$7;) {
            if (countsAsNum.test(types[j$2])) {
              if (pos < j$2) {
                order.splice(at, 0, new BidiSpan(1, pos, j$2));
                at += isRTL;
              }

              var nstart = j$2;

              for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}

              order.splice(at, 0, new BidiSpan(2, nstart, j$2));
              at += isRTL;
              pos = j$2;
            } else {
              ++j$2;
            }
          }

          if (pos < i$7) {
            order.splice(at, 0, new BidiSpan(1, pos, i$7));
          }
        }
      }

      if (direction == "ltr") {
        if (order[0].level == 1 && (m = str.match(/^\s+/))) {
          order[0].from = m[0].length;
          order.unshift(new BidiSpan(0, 0, m[0].length));
        }

        if (lst(order).level == 1 && (m = str.match(/\s+$/))) {
          lst(order).to -= m[0].length;
          order.push(new BidiSpan(0, len - m[0].length, len));
        }
      }

      return direction == "rtl" ? order.reverse() : order;
    };
  }(); // Get the bidi ordering for the given line (and cache it). Returns
  // false for lines that are fully left-to-right, and an array of
  // BidiSpan objects otherwise.


  function getOrder(line, direction) {
    var order = line.order;

    if (order == null) {
      order = line.order = bidiOrdering(line.text, direction);
    }

    return order;
  } // EVENT HANDLING
  // Lightweight event framework. on/off also work on DOM nodes,
  // registering native DOM handlers.


  var noHandlers = [];

  var on = function on(emitter, type, f) {
    if (emitter.addEventListener) {
      emitter.addEventListener(type, f, false);
    } else if (emitter.attachEvent) {
      emitter.attachEvent("on" + type, f);
    } else {
      var map = emitter._handlers || (emitter._handlers = {});
      map[type] = (map[type] || noHandlers).concat(f);
    }
  };

  function getHandlers(emitter, type) {
    return emitter._handlers && emitter._handlers[type] || noHandlers;
  }

  function off(emitter, type, f) {
    if (emitter.removeEventListener) {
      emitter.removeEventListener(type, f, false);
    } else if (emitter.detachEvent) {
      emitter.detachEvent("on" + type, f);
    } else {
      var map = emitter._handlers,
          arr = map && map[type];

      if (arr) {
        var index = indexOf(arr, f);

        if (index > -1) {
          map[type] = arr.slice(0, index).concat(arr.slice(index + 1));
        }
      }
    }
  }

  function signal(emitter, type
  /*, values...*/
  ) {
    var handlers = getHandlers(emitter, type);

    if (!handlers.length) {
      return;
    }

    var args = Array.prototype.slice.call(arguments, 2);

    for (var i = 0; i < handlers.length; ++i) {
      handlers[i].apply(null, args);
    }
  } // The DOM events that CodeMirror handles can be overridden by
  // registering a (non-DOM) handler on the editor for the event name,
  // and preventDefault-ing the event in that handler.


  function signalDOMEvent(cm, e, override) {
    if (typeof e == "string") {
      e = {
        type: e,
        preventDefault: function preventDefault() {
          this.defaultPrevented = true;
        }
      };
    }

    signal(cm, override || e.type, cm, e);
    return e_defaultPrevented(e) || e.codemirrorIgnore;
  }

  function signalCursorActivity(cm) {
    var arr = cm._handlers && cm._handlers.cursorActivity;

    if (!arr) {
      return;
    }

    var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);

    for (var i = 0; i < arr.length; ++i) {
      if (indexOf(set, arr[i]) == -1) {
        set.push(arr[i]);
      }
    }
  }

  function hasHandler(emitter, type) {
    return getHandlers(emitter, type).length > 0;
  } // Add on and off methods to a constructor's prototype, to make
  // registering events on such objects more convenient.


  function eventMixin(ctor) {
    ctor.prototype.on = function (type, f) {
      on(this, type, f);
    };

    ctor.prototype.off = function (type, f) {
      off(this, type, f);
    };
  } // Due to the fact that we still support jurassic IE versions, some
  // compatibility wrappers are needed.


  function e_preventDefault(e) {
    if (e.preventDefault) {
      e.preventDefault();
    } else {
      e.returnValue = false;
    }
  }

  function e_stopPropagation(e) {
    if (e.stopPropagation) {
      e.stopPropagation();
    } else {
      e.cancelBubble = true;
    }
  }

  function e_defaultPrevented(e) {
    return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false;
  }

  function e_stop(e) {
    e_preventDefault(e);
    e_stopPropagation(e);
  }

  function e_target(e) {
    return e.target || e.srcElement;
  }

  function e_button(e) {
    var b = e.which;

    if (b == null) {
      if (e.button & 1) {
        b = 1;
      } else if (e.button & 2) {
        b = 3;
      } else if (e.button & 4) {
        b = 2;
      }
    }

    if (mac && e.ctrlKey && b == 1) {
      b = 3;
    }

    return b;
  } // Detect drag-and-drop


  var dragAndDrop = function () {
    // There is *some* kind of drag-and-drop support in IE6-8, but I
    // couldn't get it to work yet.
    if (ie && ie_version < 9) {
      return false;
    }

    var div = elt('div');
    return "draggable" in div || "dragDrop" in div;
  }();

  var zwspSupported;

  function zeroWidthElement(measure) {
    if (zwspSupported == null) {
      var test = elt("span", "\u200B");
      removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")]));

      if (measure.firstChild.offsetHeight != 0) {
        zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8);
      }
    }

    var node = zwspSupported ? elt("span", "\u200B") : elt("span", "\xA0", null, "display: inline-block; width: 1px; margin-right: -1px");
    node.setAttribute("cm-text", "");
    return node;
  } // Feature-detect IE's crummy client rect reporting for bidi text


  var badBidiRects;

  function hasBadBidiRects(measure) {
    if (badBidiRects != null) {
      return badBidiRects;
    }

    var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062EA"));
    var r0 = range(txt, 0, 1).getBoundingClientRect();
    var r1 = range(txt, 1, 2).getBoundingClientRect();
    removeChildren(measure);

    if (!r0 || r0.left == r0.right) {
      return false;
    } // Safari returns null in some cases (#2780)


    return badBidiRects = r1.right - r0.right < 3;
  } // See if "".split is the broken IE version, if so, provide an
  // alternative way to split lines.


  var splitLinesAuto = "\n\nb".split(/\n/).length != 3 ? function (string) {
    var pos = 0,
        result = [],
        l = string.length;

    while (pos <= l) {
      var nl = string.indexOf("\n", pos);

      if (nl == -1) {
        nl = string.length;
      }

      var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl);
      var rt = line.indexOf("\r");

      if (rt != -1) {
        result.push(line.slice(0, rt));
        pos += rt + 1;
      } else {
        result.push(line);
        pos = nl + 1;
      }
    }

    return result;
  } : function (string) {
    return string.split(/\r\n?|\n/);
  };
  var hasSelection = window.getSelection ? function (te) {
    try {
      return te.selectionStart != te.selectionEnd;
    } catch (e) {
      return false;
    }
  } : function (te) {
    var range;

    try {
      range = te.ownerDocument.selection.createRange();
    } catch (e) {}

    if (!range || range.parentElement() != te) {
      return false;
    }

    return range.compareEndPoints("StartToEnd", range) != 0;
  };

  var hasCopyEvent = function () {
    var e = elt("div");

    if ("oncopy" in e) {
      return true;
    }

    e.setAttribute("oncopy", "return;");
    return typeof e.oncopy == "function";
  }();

  var badZoomedRects = null;

  function hasBadZoomedRects(measure) {
    if (badZoomedRects != null) {
      return badZoomedRects;
    }

    var node = removeChildrenAndAdd(measure, elt("span", "x"));
    var normal = node.getBoundingClientRect();
    var fromRange = range(node, 0, 1).getBoundingClientRect();
    return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1;
  } // Known modes, by name and by MIME


  var modes = {},
      mimeModes = {}; // Extra arguments are stored as the mode's dependencies, which is
  // used by (legacy) mechanisms like loadmode.js to automatically
  // load a mode. (Preferred mechanism is the require/define calls.)

  function defineMode(name, mode) {
    if (arguments.length > 2) {
      mode.dependencies = Array.prototype.slice.call(arguments, 2);
    }

    modes[name] = mode;
  }

  function defineMIME(mime, spec) {
    mimeModes[mime] = spec;
  } // Given a MIME type, a {name, ...options} config object, or a name
  // string, return a mode config object.


  function resolveMode(spec) {
    if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) {
      spec = mimeModes[spec];
    } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) {
      var found = mimeModes[spec.name];

      if (typeof found == "string") {
        found = {
          name: found
        };
      }

      spec = createObj(found, spec);
      spec.name = found.name;
    } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) {
      return resolveMode("application/xml");
    } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(spec)) {
      return resolveMode("application/json");
    }

    if (typeof spec == "string") {
      return {
        name: spec
      };
    } else {
      return spec || {
        name: "null"
      };
    }
  } // Given a mode spec (anything that resolveMode accepts), find and
  // initialize an actual mode object.


  function getMode(options, spec) {
    spec = resolveMode(spec);
    var mfactory = modes[spec.name];

    if (!mfactory) {
      return getMode(options, "text/plain");
    }

    var modeObj = mfactory(options, spec);

    if (modeExtensions.hasOwnProperty(spec.name)) {
      var exts = modeExtensions[spec.name];

      for (var prop in exts) {
        if (!exts.hasOwnProperty(prop)) {
          continue;
        }

        if (modeObj.hasOwnProperty(prop)) {
          modeObj["_" + prop] = modeObj[prop];
        }

        modeObj[prop] = exts[prop];
      }
    }

    modeObj.name = spec.name;

    if (spec.helperType) {
      modeObj.helperType = spec.helperType;
    }

    if (spec.modeProps) {
      for (var prop$1 in spec.modeProps) {
        modeObj[prop$1] = spec.modeProps[prop$1];
      }
    }

    return modeObj;
  } // This can be used to attach properties to mode objects from
  // outside the actual mode definition.


  var modeExtensions = {};

  function extendMode(mode, properties) {
    var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : modeExtensions[mode] = {};
    copyObj(properties, exts);
  }

  function copyState(mode, state) {
    if (state === true) {
      return state;
    }

    if (mode.copyState) {
      return mode.copyState(state);
    }

    var nstate = {};

    for (var n in state) {
      var val = state[n];

      if (val instanceof Array) {
        val = val.concat([]);
      }

      nstate[n] = val;
    }

    return nstate;
  } // Given a mode and a state (for that mode), find the inner mode and
  // state at the position that the state refers to.


  function innerMode(mode, state) {
    var info;

    while (mode.innerMode) {
      info = mode.innerMode(state);

      if (!info || info.mode == mode) {
        break;
      }

      state = info.state;
      mode = info.mode;
    }

    return info || {
      mode: mode,
      state: state
    };
  }

  function startState(mode, a1, a2) {
    return mode.startState ? mode.startState(a1, a2) : true;
  } // STRING STREAM
  // Fed to the mode parsers, provides helper functions to make
  // parsers more succinct.


  var StringStream = function StringStream(string, tabSize, lineOracle) {
    this.pos = this.start = 0;
    this.string = string;
    this.tabSize = tabSize || 8;
    this.lastColumnPos = this.lastColumnValue = 0;
    this.lineStart = 0;
    this.lineOracle = lineOracle;
  };

  StringStream.prototype.eol = function () {
    return this.pos >= this.string.length;
  };

  StringStream.prototype.sol = function () {
    return this.pos == this.lineStart;
  };

  StringStream.prototype.peek = function () {
    return this.string.charAt(this.pos) || undefined;
  };

  StringStream.prototype.next = function () {
    if (this.pos < this.string.length) {
      return this.string.charAt(this.pos++);
    }
  };

  StringStream.prototype.eat = function (match) {
    var ch = this.string.charAt(this.pos);
    var ok;

    if (typeof match == "string") {
      ok = ch == match;
    } else {
      ok = ch && (match.test ? match.test(ch) : match(ch));
    }

    if (ok) {
      ++this.pos;
      return ch;
    }
  };

  StringStream.prototype.eatWhile = function (match) {
    var start = this.pos;

    while (this.eat(match)) {}

    return this.pos > start;
  };

  StringStream.prototype.eatSpace = function () {
    var start = this.pos;

    while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) {
      ++this.pos;
    }

    return this.pos > start;
  };

  StringStream.prototype.skipToEnd = function () {
    this.pos = this.string.length;
  };

  StringStream.prototype.skipTo = function (ch) {
    var found = this.string.indexOf(ch, this.pos);

    if (found > -1) {
      this.pos = found;
      return true;
    }
  };

  StringStream.prototype.backUp = function (n) {
    this.pos -= n;
  };

  StringStream.prototype.column = function () {
    if (this.lastColumnPos < this.start) {
      this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);
      this.lastColumnPos = this.start;
    }

    return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0);
  };

  StringStream.prototype.indentation = function () {
    return countColumn(this.string, null, this.tabSize) - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0);
  };

  StringStream.prototype.match = function (pattern, consume, caseInsensitive) {
    if (typeof pattern == "string") {
      var cased = function cased(str) {
        return caseInsensitive ? str.toLowerCase() : str;
      };

      var substr = this.string.substr(this.pos, pattern.length);

      if (cased(substr) == cased(pattern)) {
        if (consume !== false) {
          this.pos += pattern.length;
        }

        return true;
      }
    } else {
      var match = this.string.slice(this.pos).match(pattern);

      if (match && match.index > 0) {
        return null;
      }

      if (match && consume !== false) {
        this.pos += match[0].length;
      }

      return match;
    }
  };

  StringStream.prototype.current = function () {
    return this.string.slice(this.start, this.pos);
  };

  StringStream.prototype.hideFirstChars = function (n, inner) {
    this.lineStart += n;

    try {
      return inner();
    } finally {
      this.lineStart -= n;
    }
  };

  StringStream.prototype.lookAhead = function (n) {
    var oracle = this.lineOracle;
    return oracle && oracle.lookAhead(n);
  };

  StringStream.prototype.baseToken = function () {
    var oracle = this.lineOracle;
    return oracle && oracle.baseToken(this.pos);
  }; // Find the line object corresponding to the given line number.


  function getLine(doc, n) {
    n -= doc.first;

    if (n < 0 || n >= doc.size) {
      throw new Error("There is no line " + (n + doc.first) + " in the document.");
    }

    var chunk = doc;

    while (!chunk.lines) {
      for (var i = 0;; ++i) {
        var child = chunk.children[i],
            sz = child.chunkSize();

        if (n < sz) {
          chunk = child;
          break;
        }

        n -= sz;
      }
    }

    return chunk.lines[n];
  } // Get the part of a document between two positions, as an array of
  // strings.


  function getBetween(doc, start, end) {
    var out = [],
        n = start.line;
    doc.iter(start.line, end.line + 1, function (line) {
      var text = line.text;

      if (n == end.line) {
        text = text.slice(0, end.ch);
      }

      if (n == start.line) {
        text = text.slice(start.ch);
      }

      out.push(text);
      ++n;
    });
    return out;
  } // Get the lines between from and to, as array of strings.


  function getLines(doc, from, to) {
    var out = [];
    doc.iter(from, to, function (line) {
      out.push(line.text);
    }); // iter aborts when callback returns truthy value

    return out;
  } // Update the height of a line, propagating the height change
  // upwards to parent nodes.


  function updateLineHeight(line, height) {
    var diff = height - line.height;

    if (diff) {
      for (var n = line; n; n = n.parent) {
        n.height += diff;
      }
    }
  } // Given a line object, find its line number by walking up through
  // its parent links.


  function lineNo(line) {
    if (line.parent == null) {
      return null;
    }

    var cur = line.parent,
        no = indexOf(cur.lines, line);

    for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {
      for (var i = 0;; ++i) {
        if (chunk.children[i] == cur) {
          break;
        }

        no += chunk.children[i].chunkSize();
      }
    }

    return no + cur.first;
  } // Find the line at the given vertical position, using the height
  // information in the document tree.


  function _lineAtHeight(chunk, h) {
    var n = chunk.first;

    outer: do {
      for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {
        var child = chunk.children[i$1],
            ch = child.height;

        if (h < ch) {
          chunk = child;
          continue outer;
        }

        h -= ch;
        n += child.chunkSize();
      }

      return n;
    } while (!chunk.lines);

    var i = 0;

    for (; i < chunk.lines.length; ++i) {
      var line = chunk.lines[i],
          lh = line.height;

      if (h < lh) {
        break;
      }

      h -= lh;
    }

    return n + i;
  }

  function isLine(doc, l) {
    return l >= doc.first && l < doc.first + doc.size;
  }

  function lineNumberFor(options, i) {
    return String(options.lineNumberFormatter(i + options.firstLineNumber));
  } // A Pos instance represents a position within the text.


  function Pos(line, ch, sticky) {
    if (sticky === void 0) sticky = null;

    if (!(this instanceof Pos)) {
      return new Pos(line, ch, sticky);
    }

    this.line = line;
    this.ch = ch;
    this.sticky = sticky;
  } // Compare two positions, return 0 if they are the same, a negative
  // number when a is less, and a positive number otherwise.


  function cmp(a, b) {
    return a.line - b.line || a.ch - b.ch;
  }

  function equalCursorPos(a, b) {
    return a.sticky == b.sticky && cmp(a, b) == 0;
  }

  function copyPos(x) {
    return Pos(x.line, x.ch);
  }

  function maxPos(a, b) {
    return cmp(a, b) < 0 ? b : a;
  }

  function minPos(a, b) {
    return cmp(a, b) < 0 ? a : b;
  } // Most of the external API clips given positions to make sure they
  // actually exist within the document.


  function clipLine(doc, n) {
    return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1));
  }

  function _clipPos(doc, pos) {
    if (pos.line < doc.first) {
      return Pos(doc.first, 0);
    }

    var last = doc.first + doc.size - 1;

    if (pos.line > last) {
      return Pos(last, getLine(doc, last).text.length);
    }

    return clipToLen(pos, getLine(doc, pos.line).text.length);
  }

  function clipToLen(pos, linelen) {
    var ch = pos.ch;

    if (ch == null || ch > linelen) {
      return Pos(pos.line, linelen);
    } else if (ch < 0) {
      return Pos(pos.line, 0);
    } else {
      return pos;
    }
  }

  function clipPosArray(doc, array) {
    var out = [];

    for (var i = 0; i < array.length; i++) {
      out[i] = _clipPos(doc, array[i]);
    }

    return out;
  }

  var SavedContext = function SavedContext(state, lookAhead) {
    this.state = state;
    this.lookAhead = lookAhead;
  };

  var Context = function Context(doc, state, line, lookAhead) {
    this.state = state;
    this.doc = doc;
    this.line = line;
    this.maxLookAhead = lookAhead || 0;
    this.baseTokens = null;
    this.baseTokenPos = 1;
  };

  Context.prototype.lookAhead = function (n) {
    var line = this.doc.getLine(this.line + n);

    if (line != null && n > this.maxLookAhead) {
      this.maxLookAhead = n;
    }

    return line;
  };

  Context.prototype.baseToken = function (n) {
    if (!this.baseTokens) {
      return null;
    }

    while (this.baseTokens[this.baseTokenPos] <= n) {
      this.baseTokenPos += 2;
    }

    var type = this.baseTokens[this.baseTokenPos + 1];
    return {
      type: type && type.replace(/( |^)overlay .*/, ""),
      size: this.baseTokens[this.baseTokenPos] - n
    };
  };

  Context.prototype.nextLine = function () {
    this.line++;

    if (this.maxLookAhead > 0) {
      this.maxLookAhead--;
    }
  };

  Context.fromSaved = function (doc, saved, line) {
    if (saved instanceof SavedContext) {
      return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead);
    } else {
      return new Context(doc, copyState(doc.mode, saved), line);
    }
  };

  Context.prototype.save = function (copy) {
    var state = copy !== false ? copyState(this.doc.mode, this.state) : this.state;
    return this.maxLookAhead > 0 ? new SavedContext(state, this.maxLookAhead) : state;
  }; // Compute a style array (an array starting with a mode generation
  // -- for invalidation -- followed by pairs of end positions and
  // style strings), which is used to highlight the tokens on the
  // line.


  function highlightLine(cm, line, context, forceToEnd) {
    // A styles array always starts with a number identifying the
    // mode/overlays that it is based on (for easy invalidation).
    var st = [cm.state.modeGen],
        lineClasses = {}; // Compute the base array of styles

    runMode(cm, line.text, cm.doc.mode, context, function (end, style) {
      return st.push(end, style);
    }, lineClasses, forceToEnd);
    var state = context.state; // Run overlays, adjust style array.

    var loop = function loop(o) {
      context.baseTokens = st;
      var overlay = cm.state.overlays[o],
          i = 1,
          at = 0;
      context.state = true;
      runMode(cm, line.text, overlay.mode, context, function (end, style) {
        var start = i; // Ensure there's a token end at the current position, and that i points at it

        while (at < end) {
          var i_end = st[i];

          if (i_end > end) {
            st.splice(i, 1, end, st[i + 1], i_end);
          }

          i += 2;
          at = Math.min(end, i_end);
        }

        if (!style) {
          return;
        }

        if (overlay.opaque) {
          st.splice(start, i - start, end, "overlay " + style);
          i = start + 2;
        } else {
          for (; start < i; start += 2) {
            var cur = st[start + 1];
            st[start + 1] = (cur ? cur + " " : "") + "overlay " + style;
          }
        }
      }, lineClasses);
      context.state = state;
      context.baseTokens = null;
      context.baseTokenPos = 1;
    };

    for (var o = 0; o < cm.state.overlays.length; ++o) {
      loop(o);
    }

    return {
      styles: st,
      classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null
    };
  }

  function getLineStyles(cm, line, updateFrontier) {
    if (!line.styles || line.styles[0] != cm.state.modeGen) {
      var context = getContextBefore(cm, lineNo(line));
      var resetState = line.text.length > cm.options.maxHighlightLength && copyState(cm.doc.mode, context.state);
      var result = highlightLine(cm, line, context);

      if (resetState) {
        context.state = resetState;
      }

      line.stateAfter = context.save(!resetState);
      line.styles = result.styles;

      if (result.classes) {
        line.styleClasses = result.classes;
      } else if (line.styleClasses) {
        line.styleClasses = null;
      }

      if (updateFrontier === cm.doc.highlightFrontier) {
        cm.doc.modeFrontier = Math.max(cm.doc.modeFrontier, ++cm.doc.highlightFrontier);
      }
    }

    return line.styles;
  }

  function getContextBefore(cm, n, precise) {
    var doc = cm.doc,
        display = cm.display;

    if (!doc.mode.startState) {
      return new Context(doc, true, n);
    }

    var start = findStartLine(cm, n, precise);
    var saved = start > doc.first && getLine(doc, start - 1).stateAfter;
    var context = saved ? Context.fromSaved(doc, saved, start) : new Context(doc, startState(doc.mode), start);
    doc.iter(start, n, function (line) {
      processLine(cm, line.text, context);
      var pos = context.line;
      line.stateAfter = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo ? context.save() : null;
      context.nextLine();
    });

    if (precise) {
      doc.modeFrontier = context.line;
    }

    return context;
  } // Lightweight form of highlight -- proceed over this line and
  // update state, but don't save a style array. Used for lines that
  // aren't currently visible.


  function processLine(cm, text, context, startAt) {
    var mode = cm.doc.mode;
    var stream = new StringStream(text, cm.options.tabSize, context);
    stream.start = stream.pos = startAt || 0;

    if (text == "") {
      callBlankLine(mode, context.state);
    }

    while (!stream.eol()) {
      readToken(mode, stream, context.state);
      stream.start = stream.pos;
    }
  }

  function callBlankLine(mode, state) {
    if (mode.blankLine) {
      return mode.blankLine(state);
    }

    if (!mode.innerMode) {
      return;
    }

    var inner = innerMode(mode, state);

    if (inner.mode.blankLine) {
      return inner.mode.blankLine(inner.state);
    }
  }

  function readToken(mode, stream, state, inner) {
    for (var i = 0; i < 10; i++) {
      if (inner) {
        inner[0] = innerMode(mode, state).mode;
      }

      var style = mode.token(stream, state);

      if (stream.pos > stream.start) {
        return style;
      }
    }

    throw new Error("Mode " + mode.name + " failed to advance stream.");
  }

  var Token = function Token(stream, type, state) {
    this.start = stream.start;
    this.end = stream.pos;
    this.string = stream.current();
    this.type = type || null;
    this.state = state;
  }; // Utility for getTokenAt and getLineTokens


  function takeToken(cm, pos, precise, asArray) {
    var doc = cm.doc,
        mode = doc.mode,
        style;
    pos = _clipPos(doc, pos);
    var line = getLine(doc, pos.line),
        context = getContextBefore(cm, pos.line, precise);
    var stream = new StringStream(line.text, cm.options.tabSize, context),
        tokens;

    if (asArray) {
      tokens = [];
    }

    while ((asArray || stream.pos < pos.ch) && !stream.eol()) {
      stream.start = stream.pos;
      style = readToken(mode, stream, context.state);

      if (asArray) {
        tokens.push(new Token(stream, style, copyState(doc.mode, context.state)));
      }
    }

    return asArray ? tokens : new Token(stream, style, context.state);
  }

  function extractLineClasses(type, output) {
    if (type) {
      for (;;) {
        var lineClass = type.match(/(?:^|\s+)line-(background-)?(\S+)/);

        if (!lineClass) {
          break;
        }

        type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);
        var prop = lineClass[1] ? "bgClass" : "textClass";

        if (output[prop] == null) {
          output[prop] = lineClass[2];
        } else if (!new RegExp("(?:^|\\s)" + lineClass[2] + "(?:$|\\s)").test(output[prop])) {
          output[prop] += " " + lineClass[2];
        }
      }
    }

    return type;
  } // Run the given mode's parser over a line, calling f for each token.


  function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {
    var flattenSpans = mode.flattenSpans;

    if (flattenSpans == null) {
      flattenSpans = cm.options.flattenSpans;
    }

    var curStart = 0,
        curStyle = null;
    var stream = new StringStream(text, cm.options.tabSize, context),
        style;
    var inner = cm.options.addModeClass && [null];

    if (text == "") {
      extractLineClasses(callBlankLine(mode, context.state), lineClasses);
    }

    while (!stream.eol()) {
      if (stream.pos > cm.options.maxHighlightLength) {
        flattenSpans = false;

        if (forceToEnd) {
          processLine(cm, text, context, stream.pos);
        }

        stream.pos = text.length;
        style = null;
      } else {
        style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);
      }

      if (inner) {
        var mName = inner[0].name;

        if (mName) {
          style = "m-" + (style ? mName + " " + style : mName);
        }
      }

      if (!flattenSpans || curStyle != style) {
        while (curStart < stream.start) {
          curStart = Math.min(stream.start, curStart + 5000);
          f(curStart, curStyle);
        }

        curStyle = style;
      }

      stream.start = stream.pos;
    }

    while (curStart < stream.pos) {
      // Webkit seems to refuse to render text nodes longer than 57444
      // characters, and returns inaccurate measurements in nodes
      // starting around 5000 chars.
      var pos = Math.min(stream.pos, curStart + 5000);
      f(pos, curStyle);
      curStart = pos;
    }
  } // Finds the line to start with when starting a parse. Tries to
  // find a line with a stateAfter, so that it can start with a
  // valid state. If that fails, it returns the line with the
  // smallest indentation, which tends to need the least context to
  // parse correctly.


  function findStartLine(cm, n, precise) {
    var minindent,
        minline,
        doc = cm.doc;
    var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);

    for (var search = n; search > lim; --search) {
      if (search <= doc.first) {
        return doc.first;
      }

      var line = getLine(doc, search - 1),
          after = line.stateAfter;

      if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier)) {
        return search;
      }

      var indented = countColumn(line.text, null, cm.options.tabSize);

      if (minline == null || minindent > indented) {
        minline = search - 1;
        minindent = indented;
      }
    }

    return minline;
  }

  function retreatFrontier(doc, n) {
    doc.modeFrontier = Math.min(doc.modeFrontier, n);

    if (doc.highlightFrontier < n - 10) {
      return;
    }

    var start = doc.first;

    for (var line = n - 1; line > start; line--) {
      var saved = getLine(doc, line).stateAfter; // change is on 3
      // state on line 1 looked ahead 2 -- so saw 3
      // test 1 + 2 < 3 should cover this

      if (saved && (!(saved instanceof SavedContext) || line + saved.lookAhead < n)) {
        start = line + 1;
        break;
      }
    }

    doc.highlightFrontier = Math.min(doc.highlightFrontier, start);
  } // Optimize some code when these features are not used.


  var sawReadOnlySpans = false,
      sawCollapsedSpans = false;

  function seeReadOnlySpans() {
    sawReadOnlySpans = true;
  }

  function seeCollapsedSpans() {
    sawCollapsedSpans = true;
  } // TEXTMARKER SPANS


  function MarkedSpan(marker, from, to) {
    this.marker = marker;
    this.from = from;
    this.to = to;
  } // Search an array of spans for a span matching the given marker.


  function getMarkedSpanFor(spans, marker) {
    if (spans) {
      for (var i = 0; i < spans.length; ++i) {
        var span = spans[i];

        if (span.marker == marker) {
          return span;
        }
      }
    }
  } // Remove a span from an array, returning undefined if no spans are
  // left (we don't store arrays for lines without spans).


  function removeMarkedSpan(spans, span) {
    var r;

    for (var i = 0; i < spans.length; ++i) {
      if (spans[i] != span) {
        (r || (r = [])).push(spans[i]);
      }
    }

    return r;
  } // Add a span to a line.


  function addMarkedSpan(line, span) {
    line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];
    span.marker.attachLine(line);
  } // Used for the algorithm that adjusts markers for a change in the
  // document. These functions cut an array of spans at a given
  // character position, returning an array of remaining chunks (or
  // undefined if nothing remains).


  function markedSpansBefore(old, startCh, isInsert) {
    var nw;

    if (old) {
      for (var i = 0; i < old.length; ++i) {
        var span = old[i],
            marker = span.marker;
        var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);

        if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) {
          var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh);
          (nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));
        }
      }
    }

    return nw;
  }

  function markedSpansAfter(old, endCh, isInsert) {
    var nw;

    if (old) {
      for (var i = 0; i < old.length; ++i) {
        var span = old[i],
            marker = span.marker;
        var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);

        if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) {
          var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh);
          (nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh, span.to == null ? null : span.to - endCh));
        }
      }
    }

    return nw;
  } // Given a change object, compute the new set of marker spans that
  // cover the line in which the change took place. Removes spans
  // entirely within the change, reconnects spans belonging to the
  // same marker that appear on both sides of the change, and cuts off
  // spans partially within the change. Returns an array of span
  // arrays with one element for each line in (after) the change.


  function stretchSpansOverChange(doc, change) {
    if (change.full) {
      return null;
    }

    var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;
    var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;

    if (!oldFirst && !oldLast) {
      return null;
    }

    var startCh = change.from.ch,
        endCh = change.to.ch,
        isInsert = cmp(change.from, change.to) == 0; // Get the spans that 'stick out' on both sides

    var first = markedSpansBefore(oldFirst, startCh, isInsert);
    var last = markedSpansAfter(oldLast, endCh, isInsert); // Next, merge those two ends

    var sameLine = change.text.length == 1,
        offset = lst(change.text).length + (sameLine ? startCh : 0);

    if (first) {
      // Fix up .to properties of first
      for (var i = 0; i < first.length; ++i) {
        var span = first[i];

        if (span.to == null) {
          var found = getMarkedSpanFor(last, span.marker);

          if (!found) {
            span.to = startCh;
          } else if (sameLine) {
            span.to = found.to == null ? null : found.to + offset;
          }
        }
      }
    }

    if (last) {
      // Fix up .from in last (or move them into first in case of sameLine)
      for (var i$1 = 0; i$1 < last.length; ++i$1) {
        var span$1 = last[i$1];

        if (span$1.to != null) {
          span$1.to += offset;
        }

        if (span$1.from == null) {
          var found$1 = getMarkedSpanFor(first, span$1.marker);

          if (!found$1) {
            span$1.from = offset;

            if (sameLine) {
              (first || (first = [])).push(span$1);
            }
          }
        } else {
          span$1.from += offset;

          if (sameLine) {
            (first || (first = [])).push(span$1);
          }
        }
      }
    } // Make sure we didn't create any zero-length spans


    if (first) {
      first = clearEmptySpans(first);
    }

    if (last && last != first) {
      last = clearEmptySpans(last);
    }

    var newMarkers = [first];

    if (!sameLine) {
      // Fill gap with whole-line-spans
      var gap = change.text.length - 2,
          gapMarkers;

      if (gap > 0 && first) {
        for (var i$2 = 0; i$2 < first.length; ++i$2) {
          if (first[i$2].to == null) {
            (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null));
          }
        }
      }

      for (var i$3 = 0; i$3 < gap; ++i$3) {
        newMarkers.push(gapMarkers);
      }

      newMarkers.push(last);
    }

    return newMarkers;
  } // Remove spans that are empty and don't have a clearWhenEmpty
  // option of false.


  function clearEmptySpans(spans) {
    for (var i = 0; i < spans.length; ++i) {
      var span = spans[i];

      if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false) {
        spans.splice(i--, 1);
      }
    }

    if (!spans.length) {
      return null;
    }

    return spans;
  } // Used to 'clip' out readOnly ranges when making a change.


  function removeReadOnlyRanges(doc, from, to) {
    var markers = null;
    doc.iter(from.line, to.line + 1, function (line) {
      if (line.markedSpans) {
        for (var i = 0; i < line.markedSpans.length; ++i) {
          var mark = line.markedSpans[i].marker;

          if (mark.readOnly && (!markers || indexOf(markers, mark) == -1)) {
            (markers || (markers = [])).push(mark);
          }
        }
      }
    });

    if (!markers) {
      return null;
    }

    var parts = [{
      from: from,
      to: to
    }];

    for (var i = 0; i < markers.length; ++i) {
      var mk = markers[i],
          m = mk.find(0);

      for (var j = 0; j < parts.length; ++j) {
        var p = parts[j];

        if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) {
          continue;
        }

        var newParts = [j, 1],
            dfrom = cmp(p.from, m.from),
            dto = cmp(p.to, m.to);

        if (dfrom < 0 || !mk.inclusiveLeft && !dfrom) {
          newParts.push({
            from: p.from,
            to: m.from
          });
        }

        if (dto > 0 || !mk.inclusiveRight && !dto) {
          newParts.push({
            from: m.to,
            to: p.to
          });
        }

        parts.splice.apply(parts, newParts);
        j += newParts.length - 3;
      }
    }

    return parts;
  } // Connect or disconnect spans from a line.


  function detachMarkedSpans(line) {
    var spans = line.markedSpans;

    if (!spans) {
      return;
    }

    for (var i = 0; i < spans.length; ++i) {
      spans[i].marker.detachLine(line);
    }

    line.markedSpans = null;
  }

  function attachMarkedSpans(line, spans) {
    if (!spans) {
      return;
    }

    for (var i = 0; i < spans.length; ++i) {
      spans[i].marker.attachLine(line);
    }

    line.markedSpans = spans;
  } // Helpers used when computing which overlapping collapsed span
  // counts as the larger one.


  function extraLeft(marker) {
    return marker.inclusiveLeft ? -1 : 0;
  }

  function extraRight(marker) {
    return marker.inclusiveRight ? 1 : 0;
  } // Returns a number indicating which of two overlapping collapsed
  // spans is larger (and thus includes the other). Falls back to
  // comparing ids when the spans cover exactly the same range.


  function compareCollapsedMarkers(a, b) {
    var lenDiff = a.lines.length - b.lines.length;

    if (lenDiff != 0) {
      return lenDiff;
    }

    var aPos = a.find(),
        bPos = b.find();
    var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);

    if (fromCmp) {
      return -fromCmp;
    }

    var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);

    if (toCmp) {
      return toCmp;
    }

    return b.id - a.id;
  } // Find out whether a line ends or starts in a collapsed span. If
  // so, return the marker for that span.


  function collapsedSpanAtSide(line, start) {
    var sps = sawCollapsedSpans && line.markedSpans,
        found;

    if (sps) {
      for (var sp = void 0, i = 0; i < sps.length; ++i) {
        sp = sps[i];

        if (sp.marker.collapsed && (start ? sp.from : sp.to) == null && (!found || compareCollapsedMarkers(found, sp.marker) < 0)) {
          found = sp.marker;
        }
      }
    }

    return found;
  }

  function collapsedSpanAtStart(line) {
    return collapsedSpanAtSide(line, true);
  }

  function collapsedSpanAtEnd(line) {
    return collapsedSpanAtSide(line, false);
  }

  function collapsedSpanAround(line, ch) {
    var sps = sawCollapsedSpans && line.markedSpans,
        found;

    if (sps) {
      for (var i = 0; i < sps.length; ++i) {
        var sp = sps[i];

        if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) && (!found || compareCollapsedMarkers(found, sp.marker) < 0)) {
          found = sp.marker;
        }
      }
    }

    return found;
  } // Test whether there exists a collapsed span that partially
  // overlaps (covers the start or end, but not both) of a new span.
  // Such overlap is not allowed.


  function conflictingCollapsedRange(doc, lineNo, from, to, marker) {
    var line = getLine(doc, lineNo);
    var sps = sawCollapsedSpans && line.markedSpans;

    if (sps) {
      for (var i = 0; i < sps.length; ++i) {
        var sp = sps[i];

        if (!sp.marker.collapsed) {
          continue;
        }

        var found = sp.marker.find(0);
        var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);
        var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);

        if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) {
          continue;
        }

        if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) || fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0)) {
          return true;
        }
      }
    }
  } // A visual line is a line as drawn on the screen. Folding, for
  // example, can cause multiple logical lines to appear on the same
  // visual line. This finds the start of the visual line that the
  // given line is part of (usually that is the line itself).


  function visualLine(line) {
    var merged;

    while (merged = collapsedSpanAtStart(line)) {
      line = merged.find(-1, true).line;
    }

    return line;
  }

  function visualLineEnd(line) {
    var merged;

    while (merged = collapsedSpanAtEnd(line)) {
      line = merged.find(1, true).line;
    }

    return line;
  } // Returns an array of logical lines that continue the visual line
  // started by the argument, or undefined if there are no such lines.


  function visualLineContinued(line) {
    var merged, lines;

    while (merged = collapsedSpanAtEnd(line)) {
      line = merged.find(1, true).line;
      (lines || (lines = [])).push(line);
    }

    return lines;
  } // Get the line number of the start of the visual line that the
  // given line number is part of.


  function visualLineNo(doc, lineN) {
    var line = getLine(doc, lineN),
        vis = visualLine(line);

    if (line == vis) {
      return lineN;
    }

    return lineNo(vis);
  } // Get the line number of the start of the next visual line after
  // the given line.


  function visualLineEndNo(doc, lineN) {
    if (lineN > doc.lastLine()) {
      return lineN;
    }

    var line = getLine(doc, lineN),
        merged;

    if (!lineIsHidden(doc, line)) {
      return lineN;
    }

    while (merged = collapsedSpanAtEnd(line)) {
      line = merged.find(1, true).line;
    }

    return lineNo(line) + 1;
  } // Compute whether a line is hidden. Lines count as hidden when they
  // are part of a visual line that starts with another line, or when
  // they are entirely covered by collapsed, non-widget span.


  function lineIsHidden(doc, line) {
    var sps = sawCollapsedSpans && line.markedSpans;

    if (sps) {
      for (var sp = void 0, i = 0; i < sps.length; ++i) {
        sp = sps[i];

        if (!sp.marker.collapsed) {
          continue;
        }

        if (sp.from == null) {
          return true;
        }

        if (sp.marker.widgetNode) {
          continue;
        }

        if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp)) {
          return true;
        }
      }
    }
  }

  function lineIsHiddenInner(doc, line, span) {
    if (span.to == null) {
      var end = span.marker.find(1, true);
      return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker));
    }

    if (span.marker.inclusiveRight && span.to == line.text.length) {
      return true;
    }

    for (var sp = void 0, i = 0; i < line.markedSpans.length; ++i) {
      sp = line.markedSpans[i];

      if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to && (sp.to == null || sp.to != span.from) && (sp.marker.inclusiveLeft || span.marker.inclusiveRight) && lineIsHiddenInner(doc, line, sp)) {
        return true;
      }
    }
  } // Find the height above the given line.


  function _heightAtLine(lineObj) {
    lineObj = visualLine(lineObj);
    var h = 0,
        chunk = lineObj.parent;

    for (var i = 0; i < chunk.lines.length; ++i) {
      var line = chunk.lines[i];

      if (line == lineObj) {
        break;
      } else {
        h += line.height;
      }
    }

    for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {
      for (var i$1 = 0; i$1 < p.children.length; ++i$1) {
        var cur = p.children[i$1];

        if (cur == chunk) {
          break;
        } else {
          h += cur.height;
        }
      }
    }

    return h;
  } // Compute the character length of a line, taking into account
  // collapsed ranges (see markText) that might hide parts, and join
  // other lines onto it.


  function lineLength(line) {
    if (line.height == 0) {
      return 0;
    }

    var len = line.text.length,
        merged,
        cur = line;

    while (merged = collapsedSpanAtStart(cur)) {
      var found = merged.find(0, true);
      cur = found.from.line;
      len += found.from.ch - found.to.ch;
    }

    cur = line;

    while (merged = collapsedSpanAtEnd(cur)) {
      var found$1 = merged.find(0, true);
      len -= cur.text.length - found$1.from.ch;
      cur = found$1.to.line;
      len += cur.text.length - found$1.to.ch;
    }

    return len;
  } // Find the longest line in the document.


  function findMaxLine(cm) {
    var d = cm.display,
        doc = cm.doc;
    d.maxLine = getLine(doc, doc.first);
    d.maxLineLength = lineLength(d.maxLine);
    d.maxLineChanged = true;
    doc.iter(function (line) {
      var len = lineLength(line);

      if (len > d.maxLineLength) {
        d.maxLineLength = len;
        d.maxLine = line;
      }
    });
  } // LINE DATA STRUCTURE
  // Line objects. These hold state related to a line, including
  // highlighting info (the styles array).


  var Line = function Line(text, markedSpans, estimateHeight) {
    this.text = text;
    attachMarkedSpans(this, markedSpans);
    this.height = estimateHeight ? estimateHeight(this) : 1;
  };

  Line.prototype.lineNo = function () {
    return lineNo(this);
  };

  eventMixin(Line); // Change the content (text, markers) of a line. Automatically
  // invalidates cached information and tries to re-estimate the
  // line's height.

  function updateLine(line, text, markedSpans, estimateHeight) {
    line.text = text;

    if (line.stateAfter) {
      line.stateAfter = null;
    }

    if (line.styles) {
      line.styles = null;
    }

    if (line.order != null) {
      line.order = null;
    }

    detachMarkedSpans(line);
    attachMarkedSpans(line, markedSpans);
    var estHeight = estimateHeight ? estimateHeight(line) : 1;

    if (estHeight != line.height) {
      updateLineHeight(line, estHeight);
    }
  } // Detach a line from the document tree and its markers.


  function cleanUpLine(line) {
    line.parent = null;
    detachMarkedSpans(line);
  } // Convert a style as returned by a mode (either null, or a string
  // containing one or more styles) to a CSS style. This is cached,
  // and also looks for line-wide styles.


  var styleToClassCache = {},
      styleToClassCacheWithMode = {};

  function interpretTokenStyle(style, options) {
    if (!style || /^\s*$/.test(style)) {
      return null;
    }

    var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;
    return cache[style] || (cache[style] = style.replace(/\S+/g, "cm-$&"));
  } // Render the DOM representation of the text of a line. Also builds
  // up a 'line map', which points at the DOM nodes that represent
  // specific stretches of text, and is used by the measuring code.
  // The returned object contains the DOM node, this map, and
  // information about line-wide styles that were set by the mode.


  function buildLineContent(cm, lineView) {
    // The padding-right forces the element to have a 'border', which
    // is needed on Webkit to be able to get line-level bounding
    // rectangles for it (in measureChar).
    var content = eltP("span", null, null, webkit ? "padding-right: .1px" : null);
    var builder = {
      pre: eltP("pre", [content], "CodeMirror-line"),
      content: content,
      col: 0,
      pos: 0,
      cm: cm,
      trailingSpace: false,
      splitSpaces: cm.getOption("lineWrapping")
    };
    lineView.measure = {}; // Iterate over the logical lines that make up this visual line.

    for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {
      var line = i ? lineView.rest[i - 1] : lineView.line,
          order = void 0;
      builder.pos = 0;
      builder.addToken = buildToken; // Optionally wire in some hacks into the token-rendering
      // algorithm, to deal with browser quirks.

      if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction))) {
        builder.addToken = buildTokenBadBidi(builder.addToken, order);
      }

      builder.map = [];
      var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);
      insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));

      if (line.styleClasses) {
        if (line.styleClasses.bgClass) {
          builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || "");
        }

        if (line.styleClasses.textClass) {
          builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || "");
        }
      } // Ensure at least a single node is present, for measuring.


      if (builder.map.length == 0) {
        builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure)));
      } // Store the map and a cache object for the current logical line


      if (i == 0) {
        lineView.measure.map = builder.map;
        lineView.measure.cache = {};
      } else {
        (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map);
        (lineView.measure.caches || (lineView.measure.caches = [])).push({});
      }
    } // See issue #2901


    if (webkit) {
      var last = builder.content.lastChild;

      if (/\bcm-tab\b/.test(last.className) || last.querySelector && last.querySelector(".cm-tab")) {
        builder.content.className = "cm-tab-wrap-hack";
      }
    }

    signal(cm, "renderLine", cm, lineView.line, builder.pre);

    if (builder.pre.className) {
      builder.textClass = joinClasses(builder.pre.className, builder.textClass || "");
    }

    return builder;
  }

  function defaultSpecialCharPlaceholder(ch) {
    var token = elt("span", "\u2022", "cm-invalidchar");
    token.title = "\\u" + ch.charCodeAt(0).toString(16);
    token.setAttribute("aria-label", token.title);
    return token;
  } // Build up the DOM representation for a single token, and add it to
  // the line map. Takes care to render special characters separately.


  function buildToken(builder, text, style, startStyle, endStyle, css, attributes) {
    if (!text) {
      return;
    }

    var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text;
    var special = builder.cm.state.specialChars,
        mustWrap = false;
    var content;

    if (!special.test(text)) {
      builder.col += text.length;
      content = document.createTextNode(displayText);
      builder.map.push(builder.pos, builder.pos + text.length, content);

      if (ie && ie_version < 9) {
        mustWrap = true;
      }

      builder.pos += text.length;
    } else {
      content = document.createDocumentFragment();
      var pos = 0;

      while (true) {
        special.lastIndex = pos;
        var m = special.exec(text);
        var skipped = m ? m.index - pos : text.length - pos;

        if (skipped) {
          var txt = document.createTextNode(displayText.slice(pos, pos + skipped));

          if (ie && ie_version < 9) {
            content.appendChild(elt("span", [txt]));
          } else {
            content.appendChild(txt);
          }

          builder.map.push(builder.pos, builder.pos + skipped, txt);
          builder.col += skipped;
          builder.pos += skipped;
        }

        if (!m) {
          break;
        }

        pos += skipped + 1;
        var txt$1 = void 0;

        if (m[0] == "\t") {
          var tabSize = builder.cm.options.tabSize,
              tabWidth = tabSize - builder.col % tabSize;
          txt$1 = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab"));
          txt$1.setAttribute("role", "presentation");
          txt$1.setAttribute("cm-text", "\t");
          builder.col += tabWidth;
        } else if (m[0] == "\r" || m[0] == "\n") {
          txt$1 = content.appendChild(elt("span", m[0] == "\r" ? "\u240D" : "\u2424", "cm-invalidchar"));
          txt$1.setAttribute("cm-text", m[0]);
          builder.col += 1;
        } else {
          txt$1 = builder.cm.options.specialCharPlaceholder(m[0]);
          txt$1.setAttribute("cm-text", m[0]);

          if (ie && ie_version < 9) {
            content.appendChild(elt("span", [txt$1]));
          } else {
            content.appendChild(txt$1);
          }

          builder.col += 1;
        }

        builder.map.push(builder.pos, builder.pos + 1, txt$1);
        builder.pos++;
      }
    }

    builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32;

    if (style || startStyle || endStyle || mustWrap || css || attributes) {
      var fullStyle = style || "";

      if (startStyle) {
        fullStyle += startStyle;
      }

      if (endStyle) {
        fullStyle += endStyle;
      }

      var token = elt("span", [content], fullStyle, css);

      if (attributes) {
        for (var attr in attributes) {
          if (attributes.hasOwnProperty(attr) && attr != "style" && attr != "class") {
            token.setAttribute(attr, attributes[attr]);
          }
        }
      }

      return builder.content.appendChild(token);
    }

    builder.content.appendChild(content);
  } // Change some spaces to NBSP to prevent the browser from collapsing
  // trailing spaces at the end of a line when rendering text (issue #1362).


  function splitSpaces(text, trailingBefore) {
    if (text.length > 1 && !/  /.test(text)) {
      return text;
    }

    var spaceBefore = trailingBefore,
        result = "";

    for (var i = 0; i < text.length; i++) {
      var ch = text.charAt(i);

      if (ch == " " && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32)) {
        ch = "\xA0";
      }

      result += ch;
      spaceBefore = ch == " ";
    }

    return result;
  } // Work around nonsense dimensions being reported for stretches of
  // right-to-left text.


  function buildTokenBadBidi(inner, order) {
    return function (builder, text, style, startStyle, endStyle, css, attributes) {
      style = style ? style + " cm-force-border" : "cm-force-border";
      var start = builder.pos,
          end = start + text.length;

      for (;;) {
        // Find the part that overlaps with the start of this text
        var part = void 0;

        for (var i = 0; i < order.length; i++) {
          part = order[i];

          if (part.to > start && part.from <= start) {
            break;
          }
        }

        if (part.to >= end) {
          return inner(builder, text, style, startStyle, endStyle, css, attributes);
        }

        inner(builder, text.slice(0, part.to - start), style, startStyle, null, css, attributes);
        startStyle = null;
        text = text.slice(part.to - start);
        start = part.to;
      }
    };
  }

  function buildCollapsedSpan(builder, size, marker, ignoreWidget) {
    var widget = !ignoreWidget && marker.widgetNode;

    if (widget) {
      builder.map.push(builder.pos, builder.pos + size, widget);
    }

    if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {
      if (!widget) {
        widget = builder.content.appendChild(document.createElement("span"));
      }

      widget.setAttribute("cm-marker", marker.id);
    }

    if (widget) {
      builder.cm.display.input.setUneditable(widget);
      builder.content.appendChild(widget);
    }

    builder.pos += size;
    builder.trailingSpace = false;
  } // Outputs a number of spans to make up a line, taking highlighting
  // and marked text into account.


  function insertLineContent(line, builder, styles) {
    var spans = line.markedSpans,
        allText = line.text,
        at = 0;

    if (!spans) {
      for (var i$1 = 1; i$1 < styles.length; i$1 += 2) {
        builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1 + 1], builder.cm.options));
      }

      return;
    }

    var len = allText.length,
        pos = 0,
        i = 1,
        text = "",
        style,
        css;
    var nextChange = 0,
        spanStyle,
        spanEndStyle,
        spanStartStyle,
        collapsed,
        attributes;

    for (;;) {
      if (nextChange == pos) {
        // Update current marker set
        spanStyle = spanEndStyle = spanStartStyle = css = "";
        attributes = null;
        collapsed = null;
        nextChange = Infinity;
        var foundBookmarks = [],
            endStyles = void 0;

        for (var j = 0; j < spans.length; ++j) {
          var sp = spans[j],
              m = sp.marker;

          if (m.type == "bookmark" && sp.from == pos && m.widgetNode) {
            foundBookmarks.push(m);
          } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {
            if (sp.to != null && sp.to != pos && nextChange > sp.to) {
              nextChange = sp.to;
              spanEndStyle = "";
            }

            if (m.className) {
              spanStyle += " " + m.className;
            }

            if (m.css) {
              css = (css ? css + ";" : "") + m.css;
            }

            if (m.startStyle && sp.from == pos) {
              spanStartStyle += " " + m.startStyle;
            }

            if (m.endStyle && sp.to == nextChange) {
              (endStyles || (endStyles = [])).push(m.endStyle, sp.to);
            } // support for the old title property
            // https://github.com/codemirror/CodeMirror/pull/5673


            if (m.title) {
              (attributes || (attributes = {})).title = m.title;
            }

            if (m.attributes) {
              for (var attr in m.attributes) {
                (attributes || (attributes = {}))[attr] = m.attributes[attr];
              }
            }

            if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0)) {
              collapsed = sp;
            }
          } else if (sp.from > pos && nextChange > sp.from) {
            nextChange = sp.from;
          }
        }

        if (endStyles) {
          for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2) {
            if (endStyles[j$1 + 1] == nextChange) {
              spanEndStyle += " " + endStyles[j$1];
            }
          }
        }

        if (!collapsed || collapsed.from == pos) {
          for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2) {
            buildCollapsedSpan(builder, 0, foundBookmarks[j$2]);
          }
        }

        if (collapsed && (collapsed.from || 0) == pos) {
          buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos, collapsed.marker, collapsed.from == null);

          if (collapsed.to == null) {
            return;
          }

          if (collapsed.to == pos) {
            collapsed = false;
          }
        }
      }

      if (pos >= len) {
        break;
      }

      var upto = Math.min(len, nextChange);

      while (true) {
        if (text) {
          var end = pos + text.length;

          if (!collapsed) {
            var tokenText = end > upto ? text.slice(0, upto - pos) : text;
            builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle, spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", css, attributes);
          }

          if (end >= upto) {
            text = text.slice(upto - pos);
            pos = upto;
            break;
          }

          pos = end;
          spanStartStyle = "";
        }

        text = allText.slice(at, at = styles[i++]);
        style = interpretTokenStyle(styles[i++], builder.cm.options);
      }
    }
  } // These objects are used to represent the visible (currently drawn)
  // part of the document. A LineView may correspond to multiple
  // logical lines, if those are connected by collapsed ranges.


  function LineView(doc, line, lineN) {
    // The starting line
    this.line = line; // Continuing lines, if any

    this.rest = visualLineContinued(line); // Number of logical lines in this visual line

    this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;
    this.node = this.text = null;
    this.hidden = lineIsHidden(doc, line);
  } // Create a range of LineView objects for the given lines.


  function buildViewArray(cm, from, to) {
    var array = [],
        nextPos;

    for (var pos = from; pos < to; pos = nextPos) {
      var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);
      nextPos = pos + view.size;
      array.push(view);
    }

    return array;
  }

  var operationGroup = null;

  function pushOperation(op) {
    if (operationGroup) {
      operationGroup.ops.push(op);
    } else {
      op.ownsGroup = operationGroup = {
        ops: [op],
        delayedCallbacks: []
      };
    }
  }

  function fireCallbacksForOps(group) {
    // Calls delayed callbacks and cursorActivity handlers until no
    // new ones appear
    var callbacks = group.delayedCallbacks,
        i = 0;

    do {
      for (; i < callbacks.length; i++) {
        callbacks[i].call(null);
      }

      for (var j = 0; j < group.ops.length; j++) {
        var op = group.ops[j];

        if (op.cursorActivityHandlers) {
          while (op.cursorActivityCalled < op.cursorActivityHandlers.length) {
            op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm);
          }
        }
      }
    } while (i < callbacks.length);
  }

  function finishOperation(op, endCb) {
    var group = op.ownsGroup;

    if (!group) {
      return;
    }

    try {
      fireCallbacksForOps(group);
    } finally {
      operationGroup = null;
      endCb(group);
    }
  }

  var orphanDelayedCallbacks = null; // Often, we want to signal events at a point where we are in the
  // middle of some work, but don't want the handler to start calling
  // other methods on the editor, which might be in an inconsistent
  // state or simply not expect any other events to happen.
  // signalLater looks whether there are any handlers, and schedules
  // them to be executed when the last operation ends, or, if no
  // operation is active, when a timeout fires.

  function signalLater(emitter, type
  /*, values...*/
  ) {
    var arr = getHandlers(emitter, type);

    if (!arr.length) {
      return;
    }

    var args = Array.prototype.slice.call(arguments, 2),
        list;

    if (operationGroup) {
      list = operationGroup.delayedCallbacks;
    } else if (orphanDelayedCallbacks) {
      list = orphanDelayedCallbacks;
    } else {
      list = orphanDelayedCallbacks = [];
      setTimeout(fireOrphanDelayed, 0);
    }

    var loop = function loop(i) {
      list.push(function () {
        return arr[i].apply(null, args);
      });
    };

    for (var i = 0; i < arr.length; ++i) {
      loop(i);
    }
  }

  function fireOrphanDelayed() {
    var delayed = orphanDelayedCallbacks;
    orphanDelayedCallbacks = null;

    for (var i = 0; i < delayed.length; ++i) {
      delayed[i]();
    }
  } // When an aspect of a line changes, a string is added to
  // lineView.changes. This updates the relevant part of the line's
  // DOM structure.


  function updateLineForChanges(cm, lineView, lineN, dims) {
    for (var j = 0; j < lineView.changes.length; j++) {
      var type = lineView.changes[j];

      if (type == "text") {
        updateLineText(cm, lineView);
      } else if (type == "gutter") {
        updateLineGutter(cm, lineView, lineN, dims);
      } else if (type == "class") {
        updateLineClasses(cm, lineView);
      } else if (type == "widget") {
        updateLineWidgets(cm, lineView, dims);
      }
    }

    lineView.changes = null;
  } // Lines with gutter elements, widgets or a background class need to
  // be wrapped, and have the extra elements added to the wrapper div


  function ensureLineWrapped(lineView) {
    if (lineView.node == lineView.text) {
      lineView.node = elt("div", null, null, "position: relative");

      if (lineView.text.parentNode) {
        lineView.text.parentNode.replaceChild(lineView.node, lineView.text);
      }

      lineView.node.appendChild(lineView.text);

      if (ie && ie_version < 8) {
        lineView.node.style.zIndex = 2;
      }
    }

    return lineView.node;
  }

  function updateLineBackground(cm, lineView) {
    var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass;

    if (cls) {
      cls += " CodeMirror-linebackground";
    }

    if (lineView.background) {
      if (cls) {
        lineView.background.className = cls;
      } else {
        lineView.background.parentNode.removeChild(lineView.background);
        lineView.background = null;
      }
    } else if (cls) {
      var wrap = ensureLineWrapped(lineView);
      lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild);
      cm.display.input.setUneditable(lineView.background);
    }
  } // Wrapper around buildLineContent which will reuse the structure
  // in display.externalMeasured when possible.


  function getLineContent(cm, lineView) {
    var ext = cm.display.externalMeasured;

    if (ext && ext.line == lineView.line) {
      cm.display.externalMeasured = null;
      lineView.measure = ext.measure;
      return ext.built;
    }

    return buildLineContent(cm, lineView);
  } // Redraw the line's text. Interacts with the background and text
  // classes because the mode may output tokens that influence these
  // classes.


  function updateLineText(cm, lineView) {
    var cls = lineView.text.className;
    var built = getLineContent(cm, lineView);

    if (lineView.text == lineView.node) {
      lineView.node = built.pre;
    }

    lineView.text.parentNode.replaceChild(built.pre, lineView.text);
    lineView.text = built.pre;

    if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {
      lineView.bgClass = built.bgClass;
      lineView.textClass = built.textClass;
      updateLineClasses(cm, lineView);
    } else if (cls) {
      lineView.text.className = cls;
    }
  }

  function updateLineClasses(cm, lineView) {
    updateLineBackground(cm, lineView);

    if (lineView.line.wrapClass) {
      ensureLineWrapped(lineView).className = lineView.line.wrapClass;
    } else if (lineView.node != lineView.text) {
      lineView.node.className = "";
    }

    var textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass;
    lineView.text.className = textClass || "";
  }

  function updateLineGutter(cm, lineView, lineN, dims) {
    if (lineView.gutter) {
      lineView.node.removeChild(lineView.gutter);
      lineView.gutter = null;
    }

    if (lineView.gutterBackground) {
      lineView.node.removeChild(lineView.gutterBackground);
      lineView.gutterBackground = null;
    }

    if (lineView.line.gutterClass) {
      var wrap = ensureLineWrapped(lineView);
      lineView.gutterBackground = elt("div", null, "CodeMirror-gutter-background " + lineView.line.gutterClass, "left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px; width: " + dims.gutterTotalWidth + "px");
      cm.display.input.setUneditable(lineView.gutterBackground);
      wrap.insertBefore(lineView.gutterBackground, lineView.text);
    }

    var markers = lineView.line.gutterMarkers;

    if (cm.options.lineNumbers || markers) {
      var wrap$1 = ensureLineWrapped(lineView);
      var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", "left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px");
      cm.display.input.setUneditable(gutterWrap);
      wrap$1.insertBefore(gutterWrap, lineView.text);

      if (lineView.line.gutterClass) {
        gutterWrap.className += " " + lineView.line.gutterClass;
      }

      if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"])) {
        lineView.lineNumber = gutterWrap.appendChild(elt("div", lineNumberFor(cm.options, lineN), "CodeMirror-linenumber CodeMirror-gutter-elt", "left: " + dims.gutterLeft["CodeMirror-linenumbers"] + "px; width: " + cm.display.lineNumInnerWidth + "px"));
      }

      if (markers) {
        for (var k = 0; k < cm.display.gutterSpecs.length; ++k) {
          var id = cm.display.gutterSpecs[k].className,
              found = markers.hasOwnProperty(id) && markers[id];

          if (found) {
            gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt", "left: " + dims.gutterLeft[id] + "px; width: " + dims.gutterWidth[id] + "px"));
          }
        }
      }
    }
  }

  function updateLineWidgets(cm, lineView, dims) {
    if (lineView.alignable) {
      lineView.alignable = null;
    }

    var isWidget = classTest("CodeMirror-linewidget");

    for (var node = lineView.node.firstChild, next = void 0; node; node = next) {
      next = node.nextSibling;

      if (isWidget.test(node.className)) {
        lineView.node.removeChild(node);
      }
    }

    insertLineWidgets(cm, lineView, dims);
  } // Build a line's DOM representation from scratch


  function buildLineElement(cm, lineView, lineN, dims) {
    var built = getLineContent(cm, lineView);
    lineView.text = lineView.node = built.pre;

    if (built.bgClass) {
      lineView.bgClass = built.bgClass;
    }

    if (built.textClass) {
      lineView.textClass = built.textClass;
    }

    updateLineClasses(cm, lineView);
    updateLineGutter(cm, lineView, lineN, dims);
    insertLineWidgets(cm, lineView, dims);
    return lineView.node;
  } // A lineView may contain multiple logical lines (when merged by
  // collapsed spans). The widgets for all of them need to be drawn.


  function insertLineWidgets(cm, lineView, dims) {
    insertLineWidgetsFor(cm, lineView.line, lineView, dims, true);

    if (lineView.rest) {
      for (var i = 0; i < lineView.rest.length; i++) {
        insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false);
      }
    }
  }

  function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {
    if (!line.widgets) {
      return;
    }

    var wrap = ensureLineWrapped(lineView);

    for (var i = 0, ws = line.widgets; i < ws.length; ++i) {
      var widget = ws[i],
          node = elt("div", [widget.node], "CodeMirror-linewidget" + (widget.className ? " " + widget.className : ""));

      if (!widget.handleMouseEvents) {
        node.setAttribute("cm-ignore-events", "true");
      }

      positionLineWidget(widget, node, lineView, dims);
      cm.display.input.setUneditable(node);

      if (allowAbove && widget.above) {
        wrap.insertBefore(node, lineView.gutter || lineView.text);
      } else {
        wrap.appendChild(node);
      }

      signalLater(widget, "redraw");
    }
  }

  function positionLineWidget(widget, node, lineView, dims) {
    if (widget.noHScroll) {
      (lineView.alignable || (lineView.alignable = [])).push(node);
      var width = dims.wrapperWidth;
      node.style.left = dims.fixedPos + "px";

      if (!widget.coverGutter) {
        width -= dims.gutterTotalWidth;
        node.style.paddingLeft = dims.gutterTotalWidth + "px";
      }

      node.style.width = width + "px";
    }

    if (widget.coverGutter) {
      node.style.zIndex = 5;
      node.style.position = "relative";

      if (!widget.noHScroll) {
        node.style.marginLeft = -dims.gutterTotalWidth + "px";
      }
    }
  }

  function widgetHeight(widget) {
    if (widget.height != null) {
      return widget.height;
    }

    var cm = widget.doc.cm;

    if (!cm) {
      return 0;
    }

    if (!contains(document.body, widget.node)) {
      var parentStyle = "position: relative;";

      if (widget.coverGutter) {
        parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;";
      }

      if (widget.noHScroll) {
        parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;";
      }

      removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle));
    }

    return widget.height = widget.node.parentNode.offsetHeight;
  } // Return true when the given mouse event happened in a widget


  function eventInWidget(display, e) {
    for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {
      if (!n || n.nodeType == 1 && n.getAttribute("cm-ignore-events") == "true" || n.parentNode == display.sizer && n != display.mover) {
        return true;
      }
    }
  } // POSITION MEASUREMENT


  function paddingTop(display) {
    return display.lineSpace.offsetTop;
  }

  function paddingVert(display) {
    return display.mover.offsetHeight - display.lineSpace.offsetHeight;
  }

  function paddingH(display) {
    if (display.cachedPaddingH) {
      return display.cachedPaddingH;
    }

    var e = removeChildrenAndAdd(display.measure, elt("pre", "x", "CodeMirror-line-like"));
    var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;
    var data = {
      left: parseInt(style.paddingLeft),
      right: parseInt(style.paddingRight)
    };

    if (!isNaN(data.left) && !isNaN(data.right)) {
      display.cachedPaddingH = data;
    }

    return data;
  }

  function scrollGap(cm) {
    return scrollerGap - cm.display.nativeBarWidth;
  }

  function displayWidth(cm) {
    return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth;
  }

  function displayHeight(cm) {
    return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight;
  } // Ensure the lineView.wrapping.heights array is populated. This is
  // an array of bottom offsets for the lines that make up a drawn
  // line. When lineWrapping is on, there might be more than one
  // height.


  function ensureLineHeights(cm, lineView, rect) {
    var wrapping = cm.options.lineWrapping;
    var curWidth = wrapping && displayWidth(cm);

    if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {
      var heights = lineView.measure.heights = [];

      if (wrapping) {
        lineView.measure.width = curWidth;
        var rects = lineView.text.firstChild.getClientRects();

        for (var i = 0; i < rects.length - 1; i++) {
          var cur = rects[i],
              next = rects[i + 1];

          if (Math.abs(cur.bottom - next.bottom) > 2) {
            heights.push((cur.bottom + next.top) / 2 - rect.top);
          }
        }
      }

      heights.push(rect.bottom - rect.top);
    }
  } // Find a line map (mapping character offsets to text nodes) and a
  // measurement cache for the given line number. (A line view might
  // contain multiple lines when collapsed ranges are present.)


  function mapFromLineView(lineView, line, lineN) {
    if (lineView.line == line) {
      return {
        map: lineView.measure.map,
        cache: lineView.measure.cache
      };
    }

    for (var i = 0; i < lineView.rest.length; i++) {
      if (lineView.rest[i] == line) {
        return {
          map: lineView.measure.maps[i],
          cache: lineView.measure.caches[i]
        };
      }
    }

    for (var i$1 = 0; i$1 < lineView.rest.length; i$1++) {
      if (lineNo(lineView.rest[i$1]) > lineN) {
        return {
          map: lineView.measure.maps[i$1],
          cache: lineView.measure.caches[i$1],
          before: true
        };
      }
    }
  } // Render a line into the hidden node display.externalMeasured. Used
  // when measurement is needed for a line that's not in the viewport.


  function updateExternalMeasurement(cm, line) {
    line = visualLine(line);
    var lineN = lineNo(line);
    var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);
    view.lineN = lineN;
    var built = view.built = buildLineContent(cm, view);
    view.text = built.pre;
    removeChildrenAndAdd(cm.display.lineMeasure, built.pre);
    return view;
  } // Get a {top, bottom, left, right} box (in line-local coordinates)
  // for a given character.


  function measureChar(cm, line, ch, bias) {
    return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias);
  } // Find a line view that corresponds to the given line number.


  function findViewForLine(cm, lineN) {
    if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo) {
      return cm.display.view[findViewIndex(cm, lineN)];
    }

    var ext = cm.display.externalMeasured;

    if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size) {
      return ext;
    }
  } // Measurement can be split in two steps, the set-up work that
  // applies to the whole line, and the measurement of the actual
  // character. Functions like coordsChar, that need to do a lot of
  // measurements in a row, can thus ensure that the set-up work is
  // only done once.


  function prepareMeasureForLine(cm, line) {
    var lineN = lineNo(line);
    var view = findViewForLine(cm, lineN);

    if (view && !view.text) {
      view = null;
    } else if (view && view.changes) {
      updateLineForChanges(cm, view, lineN, getDimensions(cm));
      cm.curOp.forceUpdate = true;
    }

    if (!view) {
      view = updateExternalMeasurement(cm, line);
    }

    var info = mapFromLineView(view, line, lineN);
    return {
      line: line,
      view: view,
      rect: null,
      map: info.map,
      cache: info.cache,
      before: info.before,
      hasHeights: false
    };
  } // Given a prepared measurement object, measures the position of an
  // actual character (or fetches it from the cache).


  function measureCharPrepared(cm, prepared, ch, bias, varHeight) {
    if (prepared.before) {
      ch = -1;
    }

    var key = ch + (bias || ""),
        found;

    if (prepared.cache.hasOwnProperty(key)) {
      found = prepared.cache[key];
    } else {
      if (!prepared.rect) {
        prepared.rect = prepared.view.text.getBoundingClientRect();
      }

      if (!prepared.hasHeights) {
        ensureLineHeights(cm, prepared.view, prepared.rect);
        prepared.hasHeights = true;
      }

      found = measureCharInner(cm, prepared, ch, bias);

      if (!found.bogus) {
        prepared.cache[key] = found;
      }
    }

    return {
      left: found.left,
      right: found.right,
      top: varHeight ? found.rtop : found.top,
      bottom: varHeight ? found.rbottom : found.bottom
    };
  }

  var nullRect = {
    left: 0,
    right: 0,
    top: 0,
    bottom: 0
  };

  function nodeAndOffsetInLineMap(map, ch, bias) {
    var node, start, end, collapse, mStart, mEnd; // First, search the line map for the text node corresponding to,
    // or closest to, the target character.

    for (var i = 0; i < map.length; i += 3) {
      mStart = map[i];
      mEnd = map[i + 1];

      if (ch < mStart) {
        start = 0;
        end = 1;
        collapse = "left";
      } else if (ch < mEnd) {
        start = ch - mStart;
        end = start + 1;
      } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) {
        end = mEnd - mStart;
        start = end - 1;

        if (ch >= mEnd) {
          collapse = "right";
        }
      }

      if (start != null) {
        node = map[i + 2];

        if (mStart == mEnd && bias == (node.insertLeft ? "left" : "right")) {
          collapse = bias;
        }

        if (bias == "left" && start == 0) {
          while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) {
            node = map[(i -= 3) + 2];
            collapse = "left";
          }
        }

        if (bias == "right" && start == mEnd - mStart) {
          while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) {
            node = map[(i += 3) + 2];
            collapse = "right";
          }
        }

        break;
      }
    }

    return {
      node: node,
      start: start,
      end: end,
      collapse: collapse,
      coverStart: mStart,
      coverEnd: mEnd
    };
  }

  function getUsefulRect(rects, bias) {
    var rect = nullRect;

    if (bias == "left") {
      for (var i = 0; i < rects.length; i++) {
        if ((rect = rects[i]).left != rect.right) {
          break;
        }
      }
    } else {
      for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) {
        if ((rect = rects[i$1]).left != rect.right) {
          break;
        }
      }
    }

    return rect;
  }

  function measureCharInner(cm, prepared, ch, bias) {
    var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);
    var node = place.node,
        start = place.start,
        end = place.end,
        collapse = place.collapse;
    var rect;

    if (node.nodeType == 3) {
      // If it is a text node, use a range to retrieve the coordinates.
      for (var i$1 = 0; i$1 < 4; i$1++) {
        // Retry a maximum of 4 times when nonsense rectangles are returned
        while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) {
          --start;
        }

        while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) {
          ++end;
        }

        if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart) {
          rect = node.parentNode.getBoundingClientRect();
        } else {
          rect = getUsefulRect(range(node, start, end).getClientRects(), bias);
        }

        if (rect.left || rect.right || start == 0) {
          break;
        }

        end = start;
        start = start - 1;
        collapse = "right";
      }

      if (ie && ie_version < 11) {
        rect = maybeUpdateRectForZooming(cm.display.measure, rect);
      }
    } else {
      // If it is a widget, simply get the box for the whole widget.
      if (start > 0) {
        collapse = bias = "right";
      }

      var rects;

      if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1) {
        rect = rects[bias == "right" ? rects.length - 1 : 0];
      } else {
        rect = node.getBoundingClientRect();
      }
    }

    if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {
      var rSpan = node.parentNode.getClientRects()[0];

      if (rSpan) {
        rect = {
          left: rSpan.left,
          right: rSpan.left + charWidth(cm.display),
          top: rSpan.top,
          bottom: rSpan.bottom
        };
      } else {
        rect = nullRect;
      }
    }

    var rtop = rect.top - prepared.rect.top,
        rbot = rect.bottom - prepared.rect.top;
    var mid = (rtop + rbot) / 2;
    var heights = prepared.view.measure.heights;
    var i = 0;

    for (; i < heights.length - 1; i++) {
      if (mid < heights[i]) {
        break;
      }
    }

    var top = i ? heights[i - 1] : 0,
        bot = heights[i];
    var result = {
      left: (collapse == "right" ? rect.right : rect.left) - prepared.rect.left,
      right: (collapse == "left" ? rect.left : rect.right) - prepared.rect.left,
      top: top,
      bottom: bot
    };

    if (!rect.left && !rect.right) {
      result.bogus = true;
    }

    if (!cm.options.singleCursorHeightPerLine) {
      result.rtop = rtop;
      result.rbottom = rbot;
    }

    return result;
  } // Work around problem with bounding client rects on ranges being
  // returned incorrectly when zoomed on IE10 and below.


  function maybeUpdateRectForZooming(measure, rect) {
    if (!window.screen || screen.logicalXDPI == null || screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure)) {
      return rect;
    }

    var scaleX = screen.logicalXDPI / screen.deviceXDPI;
    var scaleY = screen.logicalYDPI / screen.deviceYDPI;
    return {
      left: rect.left * scaleX,
      right: rect.right * scaleX,
      top: rect.top * scaleY,
      bottom: rect.bottom * scaleY
    };
  }

  function clearLineMeasurementCacheFor(lineView) {
    if (lineView.measure) {
      lineView.measure.cache = {};
      lineView.measure.heights = null;

      if (lineView.rest) {
        for (var i = 0; i < lineView.rest.length; i++) {
          lineView.measure.caches[i] = {};
        }
      }
    }
  }

  function clearLineMeasurementCache(cm) {
    cm.display.externalMeasure = null;
    removeChildren(cm.display.lineMeasure);

    for (var i = 0; i < cm.display.view.length; i++) {
      clearLineMeasurementCacheFor(cm.display.view[i]);
    }
  }

  function clearCaches(cm) {
    clearLineMeasurementCache(cm);
    cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;

    if (!cm.options.lineWrapping) {
      cm.display.maxLineChanged = true;
    }

    cm.display.lineNumChars = null;
  }

  function pageScrollX() {
    // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206
    // which causes page_Offset and bounding client rects to use
    // different reference viewports and invalidate our calculations.
    if (chrome && android) {
      return -(document.body.getBoundingClientRect().left - parseInt(getComputedStyle(document.body).marginLeft));
    }

    return window.pageXOffset || (document.documentElement || document.body).scrollLeft;
  }

  function pageScrollY() {
    if (chrome && android) {
      return -(document.body.getBoundingClientRect().top - parseInt(getComputedStyle(document.body).marginTop));
    }

    return window.pageYOffset || (document.documentElement || document.body).scrollTop;
  }

  function widgetTopHeight(lineObj) {
    var height = 0;

    if (lineObj.widgets) {
      for (var i = 0; i < lineObj.widgets.length; ++i) {
        if (lineObj.widgets[i].above) {
          height += widgetHeight(lineObj.widgets[i]);
        }
      }
    }

    return height;
  } // Converts a {top, bottom, left, right} box from line-local
  // coordinates into another coordinate system. Context may be one of
  // "line", "div" (display.lineDiv), "local"./null (editor), "window",
  // or "page".


  function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) {
    if (!includeWidgets) {
      var height = widgetTopHeight(lineObj);
      rect.top += height;
      rect.bottom += height;
    }

    if (context == "line") {
      return rect;
    }

    if (!context) {
      context = "local";
    }

    var yOff = _heightAtLine(lineObj);

    if (context == "local") {
      yOff += paddingTop(cm.display);
    } else {
      yOff -= cm.display.viewOffset;
    }

    if (context == "page" || context == "window") {
      var lOff = cm.display.lineSpace.getBoundingClientRect();
      yOff += lOff.top + (context == "window" ? 0 : pageScrollY());
      var xOff = lOff.left + (context == "window" ? 0 : pageScrollX());
      rect.left += xOff;
      rect.right += xOff;
    }

    rect.top += yOff;
    rect.bottom += yOff;
    return rect;
  } // Coverts a box from "div" coords to another coordinate system.
  // Context may be "window", "page", "div", or "local"./null.


  function fromCoordSystem(cm, coords, context) {
    if (context == "div") {
      return coords;
    }

    var left = coords.left,
        top = coords.top; // First move into "page" coordinate system

    if (context == "page") {
      left -= pageScrollX();
      top -= pageScrollY();
    } else if (context == "local" || !context) {
      var localBox = cm.display.sizer.getBoundingClientRect();
      left += localBox.left;
      top += localBox.top;
    }

    var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();
    return {
      left: left - lineSpaceBox.left,
      top: top - lineSpaceBox.top
    };
  }

  function _charCoords(cm, pos, context, lineObj, bias) {
    if (!lineObj) {
      lineObj = getLine(cm.doc, pos.line);
    }

    return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context);
  } // Returns a box for a given cursor position, which may have an
  // 'other' property containing the position of the secondary cursor
  // on a bidi boundary.
  // A cursor Pos(line, char, "before") is on the same visual line as `char - 1`
  // and after `char - 1` in writing order of `char - 1`
  // A cursor Pos(line, char, "after") is on the same visual line as `char`
  // and before `char` in writing order of `char`
  // Examples (upper-case letters are RTL, lower-case are LTR):
  //     Pos(0, 1, ...)
  //     before   after
  // ab     a|b     a|b
  // aB     a|B     aB|
  // Ab     |Ab     A|b
  // AB     B|A     B|A
  // Every position after the last character on a line is considered to stick
  // to the last character on the line.


  function _cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {
    lineObj = lineObj || getLine(cm.doc, pos.line);

    if (!preparedMeasure) {
      preparedMeasure = prepareMeasureForLine(cm, lineObj);
    }

    function get(ch, right) {
      var m = measureCharPrepared(cm, preparedMeasure, ch, right ? "right" : "left", varHeight);

      if (right) {
        m.left = m.right;
      } else {
        m.right = m.left;
      }

      return intoCoordSystem(cm, lineObj, m, context);
    }

    var order = getOrder(lineObj, cm.doc.direction),
        ch = pos.ch,
        sticky = pos.sticky;

    if (ch >= lineObj.text.length) {
      ch = lineObj.text.length;
      sticky = "before";
    } else if (ch <= 0) {
      ch = 0;
      sticky = "after";
    }

    if (!order) {
      return get(sticky == "before" ? ch - 1 : ch, sticky == "before");
    }

    function getBidi(ch, partPos, invert) {
      var part = order[partPos],
          right = part.level == 1;
      return get(invert ? ch - 1 : ch, right != invert);
    }

    var partPos = getBidiPartAt(order, ch, sticky);
    var other = bidiOther;
    var val = getBidi(ch, partPos, sticky == "before");

    if (other != null) {
      val.other = getBidi(ch, other, sticky != "before");
    }

    return val;
  } // Used to cheaply estimate the coordinates for a position. Used for
  // intermediate scroll updates.


  function estimateCoords(cm, pos) {
    var left = 0;
    pos = _clipPos(cm.doc, pos);

    if (!cm.options.lineWrapping) {
      left = charWidth(cm.display) * pos.ch;
    }

    var lineObj = getLine(cm.doc, pos.line);
    var top = _heightAtLine(lineObj) + paddingTop(cm.display);
    return {
      left: left,
      right: left,
      top: top,
      bottom: top + lineObj.height
    };
  } // Positions returned by coordsChar contain some extra information.
  // xRel is the relative x position of the input coordinates compared
  // to the found position (so xRel > 0 means the coordinates are to
  // the right of the character position, for example). When outside
  // is true, that means the coordinates lie outside the line's
  // vertical range.


  function PosWithInfo(line, ch, sticky, outside, xRel) {
    var pos = Pos(line, ch, sticky);
    pos.xRel = xRel;

    if (outside) {
      pos.outside = outside;
    }

    return pos;
  } // Compute the character position closest to the given coordinates.
  // Input must be lineSpace-local ("div" coordinate system).


  function _coordsChar(cm, x, y) {
    var doc = cm.doc;
    y += cm.display.viewOffset;

    if (y < 0) {
      return PosWithInfo(doc.first, 0, null, -1, -1);
    }

    var lineN = _lineAtHeight(doc, y),
        last = doc.first + doc.size - 1;

    if (lineN > last) {
      return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, 1, 1);
    }

    if (x < 0) {
      x = 0;
    }

    var lineObj = getLine(doc, lineN);

    for (;;) {
      var found = coordsCharInner(cm, lineObj, lineN, x, y);
      var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 || found.outside > 0 ? 1 : 0));

      if (!collapsed) {
        return found;
      }

      var rangeEnd = collapsed.find(1);

      if (rangeEnd.line == lineN) {
        return rangeEnd;
      }

      lineObj = getLine(doc, lineN = rangeEnd.line);
    }
  }

  function wrappedLineExtent(cm, lineObj, preparedMeasure, y) {
    y -= widgetTopHeight(lineObj);
    var end = lineObj.text.length;
    var begin = findFirst(function (ch) {
      return measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y;
    }, end, 0);
    end = findFirst(function (ch) {
      return measureCharPrepared(cm, preparedMeasure, ch).top > y;
    }, begin, end);
    return {
      begin: begin,
      end: end
    };
  }

  function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) {
    if (!preparedMeasure) {
      preparedMeasure = prepareMeasureForLine(cm, lineObj);
    }

    var targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), "line").top;
    return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop);
  } // Returns true if the given side of a box is after the given
  // coordinates, in top-to-bottom, left-to-right order.


  function boxIsAfter(box, x, y, left) {
    return box.bottom <= y ? false : box.top > y ? true : (left ? box.left : box.right) > x;
  }

  function coordsCharInner(cm, lineObj, lineNo, x, y) {
    // Move y into line-local coordinate space
    y -= _heightAtLine(lineObj);
    var preparedMeasure = prepareMeasureForLine(cm, lineObj); // When directly calling `measureCharPrepared`, we have to adjust
    // for the widgets at this line.

    var widgetHeight = widgetTopHeight(lineObj);
    var begin = 0,
        end = lineObj.text.length,
        ltr = true;
    var order = getOrder(lineObj, cm.doc.direction); // If the line isn't plain left-to-right text, first figure out
    // which bidi section the coordinates fall into.

    if (order) {
      var part = (cm.options.lineWrapping ? coordsBidiPartWrapped : coordsBidiPart)(cm, lineObj, lineNo, preparedMeasure, order, x, y);
      ltr = part.level != 1; // The awkward -1 offsets are needed because findFirst (called
      // on these below) will treat its first bound as inclusive,
      // second as exclusive, but we want to actually address the
      // characters in the part's range

      begin = ltr ? part.from : part.to - 1;
      end = ltr ? part.to : part.from - 1;
    } // A binary search to find the first character whose bounding box
    // starts after the coordinates. If we run across any whose box wrap
    // the coordinates, store that.


    var chAround = null,
        boxAround = null;
    var ch = findFirst(function (ch) {
      var box = measureCharPrepared(cm, preparedMeasure, ch);
      box.top += widgetHeight;
      box.bottom += widgetHeight;

      if (!boxIsAfter(box, x, y, false)) {
        return false;
      }

      if (box.top <= y && box.left <= x) {
        chAround = ch;
        boxAround = box;
      }

      return true;
    }, begin, end);
    var baseX,
        sticky,
        outside = false; // If a box around the coordinates was found, use that

    if (boxAround) {
      // Distinguish coordinates nearer to the left or right side of the box
      var atLeft = x - boxAround.left < boxAround.right - x,
          atStart = atLeft == ltr;
      ch = chAround + (atStart ? 0 : 1);
      sticky = atStart ? "after" : "before";
      baseX = atLeft ? boxAround.left : boxAround.right;
    } else {
      // (Adjust for extended bound, if necessary.)
      if (!ltr && (ch == end || ch == begin)) {
        ch++;
      } // To determine which side to associate with, get the box to the
      // left of the character and compare it's vertical position to the
      // coordinates


      sticky = ch == 0 ? "after" : ch == lineObj.text.length ? "before" : measureCharPrepared(cm, preparedMeasure, ch - (ltr ? 1 : 0)).bottom + widgetHeight <= y == ltr ? "after" : "before"; // Now get accurate coordinates for this place, in order to get a
      // base X position

      var coords = _cursorCoords(cm, Pos(lineNo, ch, sticky), "line", lineObj, preparedMeasure);

      baseX = coords.left;
      outside = y < coords.top ? -1 : y >= coords.bottom ? 1 : 0;
    }

    ch = skipExtendingChars(lineObj.text, ch, 1);
    return PosWithInfo(lineNo, ch, sticky, outside, x - baseX);
  }

  function coordsBidiPart(cm, lineObj, lineNo, preparedMeasure, order, x, y) {
    // Bidi parts are sorted left-to-right, and in a non-line-wrapping
    // situation, we can take this ordering to correspond to the visual
    // ordering. This finds the first part whose end is after the given
    // coordinates.
    var index = findFirst(function (i) {
      var part = order[i],
          ltr = part.level != 1;
      return boxIsAfter(_cursorCoords(cm, Pos(lineNo, ltr ? part.to : part.from, ltr ? "before" : "after"), "line", lineObj, preparedMeasure), x, y, true);
    }, 0, order.length - 1);
    var part = order[index]; // If this isn't the first part, the part's start is also after
    // the coordinates, and the coordinates aren't on the same line as
    // that start, move one part back.

    if (index > 0) {
      var ltr = part.level != 1;

      var start = _cursorCoords(cm, Pos(lineNo, ltr ? part.from : part.to, ltr ? "after" : "before"), "line", lineObj, preparedMeasure);

      if (boxIsAfter(start, x, y, true) && start.top > y) {
        part = order[index - 1];
      }
    }

    return part;
  }

  function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) {
    // In a wrapped line, rtl text on wrapping boundaries can do things
    // that don't correspond to the ordering in our `order` array at
    // all, so a binary search doesn't work, and we want to return a
    // part that only spans one line so that the binary search in
    // coordsCharInner is safe. As such, we first find the extent of the
    // wrapped line, and then do a flat search in which we discard any
    // spans that aren't on the line.
    var ref = wrappedLineExtent(cm, lineObj, preparedMeasure, y);
    var begin = ref.begin;
    var end = ref.end;

    if (/\s/.test(lineObj.text.charAt(end - 1))) {
      end--;
    }

    var part = null,
        closestDist = null;

    for (var i = 0; i < order.length; i++) {
      var p = order[i];

      if (p.from >= end || p.to <= begin) {
        continue;
      }

      var ltr = p.level != 1;
      var endX = measureCharPrepared(cm, preparedMeasure, ltr ? Math.min(end, p.to) - 1 : Math.max(begin, p.from)).right; // Weigh against spans ending before this, so that they are only
      // picked if nothing ends after

      var dist = endX < x ? x - endX + 1e9 : endX - x;

      if (!part || closestDist > dist) {
        part = p;
        closestDist = dist;
      }
    }

    if (!part) {
      part = order[order.length - 1];
    } // Clip the part to the wrapped line.


    if (part.from < begin) {
      part = {
        from: begin,
        to: part.to,
        level: part.level
      };
    }

    if (part.to > end) {
      part = {
        from: part.from,
        to: end,
        level: part.level
      };
    }

    return part;
  }

  var measureText; // Compute the default text height.

  function textHeight(display) {
    if (display.cachedTextHeight != null) {
      return display.cachedTextHeight;
    }

    if (measureText == null) {
      measureText = elt("pre", null, "CodeMirror-line-like"); // Measure a bunch of lines, for browsers that compute
      // fractional heights.

      for (var i = 0; i < 49; ++i) {
        measureText.appendChild(document.createTextNode("x"));
        measureText.appendChild(elt("br"));
      }

      measureText.appendChild(document.createTextNode("x"));
    }

    removeChildrenAndAdd(display.measure, measureText);
    var height = measureText.offsetHeight / 50;

    if (height > 3) {
      display.cachedTextHeight = height;
    }

    removeChildren(display.measure);
    return height || 1;
  } // Compute the default character width.


  function charWidth(display) {
    if (display.cachedCharWidth != null) {
      return display.cachedCharWidth;
    }

    var anchor = elt("span", "xxxxxxxxxx");
    var pre = elt("pre", [anchor], "CodeMirror-line-like");
    removeChildrenAndAdd(display.measure, pre);
    var rect = anchor.getBoundingClientRect(),
        width = (rect.right - rect.left) / 10;

    if (width > 2) {
      display.cachedCharWidth = width;
    }

    return width || 10;
  } // Do a bulk-read of the DOM positions and sizes needed to draw the
  // view, so that we don't interleave reading and writing to the DOM.


  function getDimensions(cm) {
    var d = cm.display,
        left = {},
        width = {};
    var gutterLeft = d.gutters.clientLeft;

    for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {
      var id = cm.display.gutterSpecs[i].className;
      left[id] = n.offsetLeft + n.clientLeft + gutterLeft;
      width[id] = n.clientWidth;
    }

    return {
      fixedPos: compensateForHScroll(d),
      gutterTotalWidth: d.gutters.offsetWidth,
      gutterLeft: left,
      gutterWidth: width,
      wrapperWidth: d.wrapper.clientWidth
    };
  } // Computes display.scroller.scrollLeft + display.gutters.offsetWidth,
  // but using getBoundingClientRect to get a sub-pixel-accurate
  // result.


  function compensateForHScroll(display) {
    return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left;
  } // Returns a function that estimates the height of a line, to use as
  // first approximation until the line becomes visible (and is thus
  // properly measurable).


  function estimateHeight(cm) {
    var th = textHeight(cm.display),
        wrapping = cm.options.lineWrapping;
    var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);
    return function (line) {
      if (lineIsHidden(cm.doc, line)) {
        return 0;
      }

      var widgetsHeight = 0;

      if (line.widgets) {
        for (var i = 0; i < line.widgets.length; i++) {
          if (line.widgets[i].height) {
            widgetsHeight += line.widgets[i].height;
          }
        }
      }

      if (wrapping) {
        return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;
      } else {
        return widgetsHeight + th;
      }
    };
  }

  function estimateLineHeights(cm) {
    var doc = cm.doc,
        est = estimateHeight(cm);
    doc.iter(function (line) {
      var estHeight = est(line);

      if (estHeight != line.height) {
        updateLineHeight(line, estHeight);
      }
    });
  } // Given a mouse event, find the corresponding position. If liberal
  // is false, it checks whether a gutter or scrollbar was clicked,
  // and returns null if it was. forRect is used by rectangular
  // selections, and tries to estimate a character position even for
  // coordinates beyond the right of the text.


  function posFromMouse(cm, e, liberal, forRect) {
    var display = cm.display;

    if (!liberal && e_target(e).getAttribute("cm-not-content") == "true") {
      return null;
    }

    var x,
        y,
        space = display.lineSpace.getBoundingClientRect(); // Fails unpredictably on IE[67] when mouse is dragged around quickly.

    try {
      x = e.clientX - space.left;
      y = e.clientY - space.top;
    } catch (e$1) {
      return null;
    }

    var coords = _coordsChar(cm, x, y),
        line;

    if (forRect && coords.xRel > 0 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {
      var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;
      coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));
    }

    return coords;
  } // Find the view element corresponding to a given line. Return null
  // when the line isn't visible.


  function findViewIndex(cm, n) {
    if (n >= cm.display.viewTo) {
      return null;
    }

    n -= cm.display.viewFrom;

    if (n < 0) {
      return null;
    }

    var view = cm.display.view;

    for (var i = 0; i < view.length; i++) {
      n -= view[i].size;

      if (n < 0) {
        return i;
      }
    }
  } // Updates the display.view data structure for a given change to the
  // document. From and to are in pre-change coordinates. Lendiff is
  // the amount of lines added or subtracted by the change. This is
  // used for changes that span multiple lines, or change the way
  // lines are divided into visual lines. regLineChange (below)
  // registers single-line changes.


  function regChange(cm, from, to, lendiff) {
    if (from == null) {
      from = cm.doc.first;
    }

    if (to == null) {
      to = cm.doc.first + cm.doc.size;
    }

    if (!lendiff) {
      lendiff = 0;
    }

    var display = cm.display;

    if (lendiff && to < display.viewTo && (display.updateLineNumbers == null || display.updateLineNumbers > from)) {
      display.updateLineNumbers = from;
    }

    cm.curOp.viewChanged = true;

    if (from >= display.viewTo) {
      // Change after
      if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo) {
        resetView(cm);
      }
    } else if (to <= display.viewFrom) {
      // Change before
      if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {
        resetView(cm);
      } else {
        display.viewFrom += lendiff;
        display.viewTo += lendiff;
      }
    } else if (from <= display.viewFrom && to >= display.viewTo) {
      // Full overlap
      resetView(cm);
    } else if (from <= display.viewFrom) {
      // Top overlap
      var cut = viewCuttingPoint(cm, to, to + lendiff, 1);

      if (cut) {
        display.view = display.view.slice(cut.index);
        display.viewFrom = cut.lineN;
        display.viewTo += lendiff;
      } else {
        resetView(cm);
      }
    } else if (to >= display.viewTo) {
      // Bottom overlap
      var cut$1 = viewCuttingPoint(cm, from, from, -1);

      if (cut$1) {
        display.view = display.view.slice(0, cut$1.index);
        display.viewTo = cut$1.lineN;
      } else {
        resetView(cm);
      }
    } else {
      // Gap in the middle
      var cutTop = viewCuttingPoint(cm, from, from, -1);
      var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1);

      if (cutTop && cutBot) {
        display.view = display.view.slice(0, cutTop.index).concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN)).concat(display.view.slice(cutBot.index));
        display.viewTo += lendiff;
      } else {
        resetView(cm);
      }
    }

    var ext = display.externalMeasured;

    if (ext) {
      if (to < ext.lineN) {
        ext.lineN += lendiff;
      } else if (from < ext.lineN + ext.size) {
        display.externalMeasured = null;
      }
    }
  } // Register a change to a single line. Type must be one of "text",
  // "gutter", "class", "widget"


  function regLineChange(cm, line, type) {
    cm.curOp.viewChanged = true;
    var display = cm.display,
        ext = cm.display.externalMeasured;

    if (ext && line >= ext.lineN && line < ext.lineN + ext.size) {
      display.externalMeasured = null;
    }

    if (line < display.viewFrom || line >= display.viewTo) {
      return;
    }

    var lineView = display.view[findViewIndex(cm, line)];

    if (lineView.node == null) {
      return;
    }

    var arr = lineView.changes || (lineView.changes = []);

    if (indexOf(arr, type) == -1) {
      arr.push(type);
    }
  } // Clear the view.


  function resetView(cm) {
    cm.display.viewFrom = cm.display.viewTo = cm.doc.first;
    cm.display.view = [];
    cm.display.viewOffset = 0;
  }

  function viewCuttingPoint(cm, oldN, newN, dir) {
    var index = findViewIndex(cm, oldN),
        diff,
        view = cm.display.view;

    if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size) {
      return {
        index: index,
        lineN: newN
      };
    }

    var n = cm.display.viewFrom;

    for (var i = 0; i < index; i++) {
      n += view[i].size;
    }

    if (n != oldN) {
      if (dir > 0) {
        if (index == view.length - 1) {
          return null;
        }

        diff = n + view[index].size - oldN;
        index++;
      } else {
        diff = n - oldN;
      }

      oldN += diff;
      newN += diff;
    }

    while (visualLineNo(cm.doc, newN) != newN) {
      if (index == (dir < 0 ? 0 : view.length - 1)) {
        return null;
      }

      newN += dir * view[index - (dir < 0 ? 1 : 0)].size;
      index += dir;
    }

    return {
      index: index,
      lineN: newN
    };
  } // Force the view to cover a given range, adding empty view element
  // or clipping off existing ones as needed.


  function adjustView(cm, from, to) {
    var display = cm.display,
        view = display.view;

    if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) {
      display.view = buildViewArray(cm, from, to);
      display.viewFrom = from;
    } else {
      if (display.viewFrom > from) {
        display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view);
      } else if (display.viewFrom < from) {
        display.view = display.view.slice(findViewIndex(cm, from));
      }

      display.viewFrom = from;

      if (display.viewTo < to) {
        display.view = display.view.concat(buildViewArray(cm, display.viewTo, to));
      } else if (display.viewTo > to) {
        display.view = display.view.slice(0, findViewIndex(cm, to));
      }
    }

    display.viewTo = to;
  } // Count the number of lines in the view whose DOM representation is
  // out of date (or nonexistent).


  function countDirtyView(cm) {
    var view = cm.display.view,
        dirty = 0;

    for (var i = 0; i < view.length; i++) {
      var lineView = view[i];

      if (!lineView.hidden && (!lineView.node || lineView.changes)) {
        ++dirty;
      }
    }

    return dirty;
  }

  function updateSelection(cm) {
    cm.display.input.showSelection(cm.display.input.prepareSelection());
  }

  function prepareSelection(cm, primary) {
    if (primary === void 0) primary = true;
    var doc = cm.doc,
        result = {};
    var curFragment = result.cursors = document.createDocumentFragment();
    var selFragment = result.selection = document.createDocumentFragment();

    for (var i = 0; i < doc.sel.ranges.length; i++) {
      if (!primary && i == doc.sel.primIndex) {
        continue;
      }

      var range = doc.sel.ranges[i];

      if (range.from().line >= cm.display.viewTo || range.to().line < cm.display.viewFrom) {
        continue;
      }

      var collapsed = range.empty();

      if (collapsed || cm.options.showCursorWhenSelecting) {
        drawSelectionCursor(cm, range.head, curFragment);
      }

      if (!collapsed) {
        drawSelectionRange(cm, range, selFragment);
      }
    }

    return result;
  } // Draws a cursor for the given range


  function drawSelectionCursor(cm, head, output) {
    var pos = _cursorCoords(cm, head, "div", null, null, !cm.options.singleCursorHeightPerLine);

    var cursor = output.appendChild(elt("div", "\xA0", "CodeMirror-cursor"));
    cursor.style.left = pos.left + "px";
    cursor.style.top = pos.top + "px";
    cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px";

    if (pos.other) {
      // Secondary cursor, shown when on a 'jump' in bi-directional text
      var otherCursor = output.appendChild(elt("div", "\xA0", "CodeMirror-cursor CodeMirror-secondarycursor"));
      otherCursor.style.display = "";
      otherCursor.style.left = pos.other.left + "px";
      otherCursor.style.top = pos.other.top + "px";
      otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px";
    }
  }

  function cmpCoords(a, b) {
    return a.top - b.top || a.left - b.left;
  } // Draws the given range as a highlighted selection


  function drawSelectionRange(cm, range, output) {
    var display = cm.display,
        doc = cm.doc;
    var fragment = document.createDocumentFragment();
    var padding = paddingH(cm.display),
        leftSide = padding.left;
    var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;
    var docLTR = doc.direction == "ltr";

    function add(left, top, width, bottom) {
      if (top < 0) {
        top = 0;
      }

      top = Math.round(top);
      bottom = Math.round(bottom);
      fragment.appendChild(elt("div", null, "CodeMirror-selected", "position: absolute; left: " + left + "px;\n                             top: " + top + "px; width: " + (width == null ? rightSide - left : width) + "px;\n                             height: " + (bottom - top) + "px"));
    }

    function drawForLine(line, fromArg, toArg) {
      var lineObj = getLine(doc, line);
      var lineLen = lineObj.text.length;
      var start, end;

      function coords(ch, bias) {
        return _charCoords(cm, Pos(line, ch), "div", lineObj, bias);
      }

      function wrapX(pos, dir, side) {
        var extent = wrappedLineExtentChar(cm, lineObj, null, pos);
        var prop = dir == "ltr" == (side == "after") ? "left" : "right";
        var ch = side == "after" ? extent.begin : extent.end - (/\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);
        return coords(ch, prop)[prop];
      }

      var order = getOrder(lineObj, doc.direction);
      iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {
        var ltr = dir == "ltr";
        var fromPos = coords(from, ltr ? "left" : "right");
        var toPos = coords(to - 1, ltr ? "right" : "left");
        var openStart = fromArg == null && from == 0,
            openEnd = toArg == null && to == lineLen;
        var first = i == 0,
            last = !order || i == order.length - 1;

        if (toPos.top - fromPos.top <= 3) {
          // Single line
          var openLeft = (docLTR ? openStart : openEnd) && first;
          var openRight = (docLTR ? openEnd : openStart) && last;
          var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;
          var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;
          add(left, fromPos.top, right - left, fromPos.bottom);
        } else {
          // Multiple lines
          var topLeft, topRight, botLeft, botRight;

          if (ltr) {
            topLeft = docLTR && openStart && first ? leftSide : fromPos.left;
            topRight = docLTR ? rightSide : wrapX(from, dir, "before");
            botLeft = docLTR ? leftSide : wrapX(to, dir, "after");
            botRight = docLTR && openEnd && last ? rightSide : toPos.right;
          } else {
            topLeft = !docLTR ? leftSide : wrapX(from, dir, "before");
            topRight = !docLTR && openStart && first ? rightSide : fromPos.right;
            botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;
            botRight = !docLTR ? rightSide : wrapX(to, dir, "after");
          }

          add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);

          if (fromPos.bottom < toPos.top) {
            add(leftSide, fromPos.bottom, null, toPos.top);
          }

          add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);
        }

        if (!start || cmpCoords(fromPos, start) < 0) {
          start = fromPos;
        }

        if (cmpCoords(toPos, start) < 0) {
          start = toPos;
        }

        if (!end || cmpCoords(fromPos, end) < 0) {
          end = fromPos;
        }

        if (cmpCoords(toPos, end) < 0) {
          end = toPos;
        }
      });
      return {
        start: start,
        end: end
      };
    }

    var sFrom = range.from(),
        sTo = range.to();

    if (sFrom.line == sTo.line) {
      drawForLine(sFrom.line, sFrom.ch, sTo.ch);
    } else {
      var fromLine = getLine(doc, sFrom.line),
          toLine = getLine(doc, sTo.line);
      var singleVLine = visualLine(fromLine) == visualLine(toLine);
      var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;
      var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;

      if (singleVLine) {
        if (leftEnd.top < rightStart.top - 2) {
          add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);
          add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);
        } else {
          add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);
        }
      }

      if (leftEnd.bottom < rightStart.top) {
        add(leftSide, leftEnd.bottom, null, rightStart.top);
      }
    }

    output.appendChild(fragment);
  } // Cursor-blinking


  function restartBlink(cm) {
    if (!cm.state.focused) {
      return;
    }

    var display = cm.display;
    clearInterval(display.blinker);
    var on = true;
    display.cursorDiv.style.visibility = "";

    if (cm.options.cursorBlinkRate > 0) {
      display.blinker = setInterval(function () {
        if (!cm.hasFocus()) {
          onBlur(cm);
        }

        display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden";
      }, cm.options.cursorBlinkRate);
    } else if (cm.options.cursorBlinkRate < 0) {
      display.cursorDiv.style.visibility = "hidden";
    }
  }

  function ensureFocus(cm) {
    if (!cm.hasFocus()) {
      cm.display.input.focus();

      if (!cm.state.focused) {
        onFocus(cm);
      }
    }
  }

  function delayBlurEvent(cm) {
    cm.state.delayingBlurEvent = true;
    setTimeout(function () {
      if (cm.state.delayingBlurEvent) {
        cm.state.delayingBlurEvent = false;

        if (cm.state.focused) {
          onBlur(cm);
        }
      }
    }, 100);
  }

  function onFocus(cm, e) {
    if (cm.state.delayingBlurEvent && !cm.state.draggingText) {
      cm.state.delayingBlurEvent = false;
    }

    if (cm.options.readOnly == "nocursor") {
      return;
    }

    if (!cm.state.focused) {
      signal(cm, "focus", cm, e);
      cm.state.focused = true;
      addClass(cm.display.wrapper, "CodeMirror-focused"); // This test prevents this from firing when a context
      // menu is closed (since the input reset would kill the
      // select-all detection hack)

      if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {
        cm.display.input.reset();

        if (webkit) {
          setTimeout(function () {
            return cm.display.input.reset(true);
          }, 20);
        } // Issue #1730

      }

      cm.display.input.receivedFocus();
    }

    restartBlink(cm);
  }

  function onBlur(cm, e) {
    if (cm.state.delayingBlurEvent) {
      return;
    }

    if (cm.state.focused) {
      signal(cm, "blur", cm, e);
      cm.state.focused = false;
      rmClass(cm.display.wrapper, "CodeMirror-focused");
    }

    clearInterval(cm.display.blinker);
    setTimeout(function () {
      if (!cm.state.focused) {
        cm.display.shift = false;
      }
    }, 150);
  } // Read the actual heights of the rendered lines, and update their
  // stored heights to match.


  function updateHeightsInViewport(cm) {
    var display = cm.display;
    var prevBottom = display.lineDiv.offsetTop;

    for (var i = 0; i < display.view.length; i++) {
      var cur = display.view[i],
          wrapping = cm.options.lineWrapping;
      var height = void 0,
          width = 0;

      if (cur.hidden) {
        continue;
      }

      if (ie && ie_version < 8) {
        var bot = cur.node.offsetTop + cur.node.offsetHeight;
        height = bot - prevBottom;
        prevBottom = bot;
      } else {
        var box = cur.node.getBoundingClientRect();
        height = box.bottom - box.top; // Check that lines don't extend past the right of the current
        // editor width

        if (!wrapping && cur.text.firstChild) {
          width = cur.text.firstChild.getBoundingClientRect().right - box.left - 1;
        }
      }

      var diff = cur.line.height - height;

      if (diff > .005 || diff < -.005) {
        updateLineHeight(cur.line, height);
        updateWidgetHeight(cur.line);

        if (cur.rest) {
          for (var j = 0; j < cur.rest.length; j++) {
            updateWidgetHeight(cur.rest[j]);
          }
        }
      }

      if (width > cm.display.sizerWidth) {
        var chWidth = Math.ceil(width / charWidth(cm.display));

        if (chWidth > cm.display.maxLineLength) {
          cm.display.maxLineLength = chWidth;
          cm.display.maxLine = cur.line;
          cm.display.maxLineChanged = true;
        }
      }
    }
  } // Read and store the height of line widgets associated with the
  // given line.


  function updateWidgetHeight(line) {
    if (line.widgets) {
      for (var i = 0; i < line.widgets.length; ++i) {
        var w = line.widgets[i],
            parent = w.node.parentNode;

        if (parent) {
          w.height = parent.offsetHeight;
        }
      }
    }
  } // Compute the lines that are visible in a given viewport (defaults
  // the the current scroll position). viewport may contain top,
  // height, and ensure (see op.scrollToPos) properties.


  function visibleLines(display, doc, viewport) {
    var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;
    top = Math.floor(top - paddingTop(display));
    var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;

    var from = _lineAtHeight(doc, top),
        to = _lineAtHeight(doc, bottom); // Ensure is a {from: {line, ch}, to: {line, ch}} object, and
    // forces those lines into the viewport (if possible).


    if (viewport && viewport.ensure) {
      var ensureFrom = viewport.ensure.from.line,
          ensureTo = viewport.ensure.to.line;

      if (ensureFrom < from) {
        from = ensureFrom;
        to = _lineAtHeight(doc, _heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight);
      } else if (Math.min(ensureTo, doc.lastLine()) >= to) {
        from = _lineAtHeight(doc, _heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight);
        to = ensureTo;
      }
    }

    return {
      from: from,
      to: Math.max(to, from + 1)
    };
  } // SCROLLING THINGS INTO VIEW
  // If an editor sits on the top or bottom of the window, partially
  // scrolled out of view, this ensures that the cursor is visible.


  function maybeScrollWindow(cm, rect) {
    if (signalDOMEvent(cm, "scrollCursorIntoView")) {
      return;
    }

    var display = cm.display,
        box = display.sizer.getBoundingClientRect(),
        doScroll = null;

    if (rect.top + box.top < 0) {
      doScroll = true;
    } else if (rect.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) {
      doScroll = false;
    }

    if (doScroll != null && !phantom) {
      var scrollNode = elt("div", "\u200B", null, "position: absolute;\n                         top: " + (rect.top - display.viewOffset - paddingTop(cm.display)) + "px;\n                         height: " + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + "px;\n                         left: " + rect.left + "px; width: " + Math.max(2, rect.right - rect.left) + "px;");
      cm.display.lineSpace.appendChild(scrollNode);
      scrollNode.scrollIntoView(doScroll);
      cm.display.lineSpace.removeChild(scrollNode);
    }
  } // Scroll a given position into view (immediately), verifying that
  // it actually became visible (as line heights are accurately
  // measured, the position of something may 'drift' during drawing).


  function scrollPosIntoView(cm, pos, end, margin) {
    if (margin == null) {
      margin = 0;
    }

    var rect;

    if (!cm.options.lineWrapping && pos == end) {
      // Set pos and end to the cursor positions around the character pos sticks to
      // If pos.sticky == "before", that is around pos.ch - 1, otherwise around pos.ch
      // If pos == Pos(_, 0, "before"), pos and end are unchanged
      pos = pos.ch ? Pos(pos.line, pos.sticky == "before" ? pos.ch - 1 : pos.ch, "after") : pos;
      end = pos.sticky == "before" ? Pos(pos.line, pos.ch + 1, "before") : pos;
    }

    for (var limit = 0; limit < 5; limit++) {
      var changed = false;

      var coords = _cursorCoords(cm, pos);

      var endCoords = !end || end == pos ? coords : _cursorCoords(cm, end);
      rect = {
        left: Math.min(coords.left, endCoords.left),
        top: Math.min(coords.top, endCoords.top) - margin,
        right: Math.max(coords.left, endCoords.left),
        bottom: Math.max(coords.bottom, endCoords.bottom) + margin
      };
      var scrollPos = calculateScrollPos(cm, rect);
      var startTop = cm.doc.scrollTop,
          startLeft = cm.doc.scrollLeft;

      if (scrollPos.scrollTop != null) {
        updateScrollTop(cm, scrollPos.scrollTop);

        if (Math.abs(cm.doc.scrollTop - startTop) > 1) {
          changed = true;
        }
      }

      if (scrollPos.scrollLeft != null) {
        setScrollLeft(cm, scrollPos.scrollLeft);

        if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) {
          changed = true;
        }
      }

      if (!changed) {
        break;
      }
    }

    return rect;
  } // Scroll a given set of coordinates into view (immediately).


  function scrollIntoView(cm, rect) {
    var scrollPos = calculateScrollPos(cm, rect);

    if (scrollPos.scrollTop != null) {
      updateScrollTop(cm, scrollPos.scrollTop);
    }

    if (scrollPos.scrollLeft != null) {
      setScrollLeft(cm, scrollPos.scrollLeft);
    }
  } // Calculate a new scroll position needed to scroll the given
  // rectangle into view. Returns an object with scrollTop and
  // scrollLeft properties. When these are undefined, the
  // vertical/horizontal position does not need to be adjusted.


  function calculateScrollPos(cm, rect) {
    var display = cm.display,
        snapMargin = textHeight(cm.display);

    if (rect.top < 0) {
      rect.top = 0;
    }

    var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;
    var screen = displayHeight(cm),
        result = {};

    if (rect.bottom - rect.top > screen) {
      rect.bottom = rect.top + screen;
    }

    var docBottom = cm.doc.height + paddingVert(display);
    var atTop = rect.top < snapMargin,
        atBottom = rect.bottom > docBottom - snapMargin;

    if (rect.top < screentop) {
      result.scrollTop = atTop ? 0 : rect.top;
    } else if (rect.bottom > screentop + screen) {
      var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);

      if (newTop != screentop) {
        result.scrollTop = newTop;
      }
    }

    var gutterSpace = cm.options.fixedGutter ? 0 : display.gutters.offsetWidth;
    var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft - gutterSpace;
    var screenw = displayWidth(cm) - display.gutters.offsetWidth;
    var tooWide = rect.right - rect.left > screenw;

    if (tooWide) {
      rect.right = rect.left + screenw;
    }

    if (rect.left < 10) {
      result.scrollLeft = 0;
    } else if (rect.left < screenleft) {
      result.scrollLeft = Math.max(0, rect.left + gutterSpace - (tooWide ? 0 : 10));
    } else if (rect.right > screenw + screenleft - 3) {
      result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw;
    }

    return result;
  } // Store a relative adjustment to the scroll position in the current
  // operation (to be applied when the operation finishes).


  function addToScrollTop(cm, top) {
    if (top == null) {
      return;
    }

    resolveScrollToPos(cm);
    cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top;
  } // Make sure that at the end of the operation the current cursor is
  // shown.


  function ensureCursorVisible(cm) {
    resolveScrollToPos(cm);
    var cur = cm.getCursor();
    cm.curOp.scrollToPos = {
      from: cur,
      to: cur,
      margin: cm.options.cursorScrollMargin
    };
  }

  function scrollToCoords(cm, x, y) {
    if (x != null || y != null) {
      resolveScrollToPos(cm);
    }

    if (x != null) {
      cm.curOp.scrollLeft = x;
    }

    if (y != null) {
      cm.curOp.scrollTop = y;
    }
  }

  function scrollToRange(cm, range) {
    resolveScrollToPos(cm);
    cm.curOp.scrollToPos = range;
  } // When an operation has its scrollToPos property set, and another
  // scroll action is applied before the end of the operation, this
  // 'simulates' scrolling that position into view in a cheap way, so
  // that the effect of intermediate scroll commands is not ignored.


  function resolveScrollToPos(cm) {
    var range = cm.curOp.scrollToPos;

    if (range) {
      cm.curOp.scrollToPos = null;
      var from = estimateCoords(cm, range.from),
          to = estimateCoords(cm, range.to);
      scrollToCoordsRange(cm, from, to, range.margin);
    }
  }

  function scrollToCoordsRange(cm, from, to, margin) {
    var sPos = calculateScrollPos(cm, {
      left: Math.min(from.left, to.left),
      top: Math.min(from.top, to.top) - margin,
      right: Math.max(from.right, to.right),
      bottom: Math.max(from.bottom, to.bottom) + margin
    });
    scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop);
  } // Sync the scrollable area and scrollbars, ensure the viewport
  // covers the visible area.


  function updateScrollTop(cm, val) {
    if (Math.abs(cm.doc.scrollTop - val) < 2) {
      return;
    }

    if (!gecko) {
      updateDisplaySimple(cm, {
        top: val
      });
    }

    setScrollTop(cm, val, true);

    if (gecko) {
      updateDisplaySimple(cm);
    }

    startWorker(cm, 100);
  }

  function setScrollTop(cm, val, forceScroll) {
    val = Math.max(0, Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val));

    if (cm.display.scroller.scrollTop == val && !forceScroll) {
      return;
    }

    cm.doc.scrollTop = val;
    cm.display.scrollbars.setScrollTop(val);

    if (cm.display.scroller.scrollTop != val) {
      cm.display.scroller.scrollTop = val;
    }
  } // Sync scroller and scrollbar, ensure the gutter elements are
  // aligned.


  function setScrollLeft(cm, val, isScroller, forceScroll) {
    val = Math.max(0, Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth));

    if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) {
      return;
    }

    cm.doc.scrollLeft = val;
    alignHorizontally(cm);

    if (cm.display.scroller.scrollLeft != val) {
      cm.display.scroller.scrollLeft = val;
    }

    cm.display.scrollbars.setScrollLeft(val);
  } // SCROLLBARS
  // Prepare DOM reads needed to update the scrollbars. Done in one
  // shot to minimize update/measure roundtrips.


  function measureForScrollbars(cm) {
    var d = cm.display,
        gutterW = d.gutters.offsetWidth;
    var docH = Math.round(cm.doc.height + paddingVert(cm.display));
    return {
      clientHeight: d.scroller.clientHeight,
      viewHeight: d.wrapper.clientHeight,
      scrollWidth: d.scroller.scrollWidth,
      clientWidth: d.scroller.clientWidth,
      viewWidth: d.wrapper.clientWidth,
      barLeft: cm.options.fixedGutter ? gutterW : 0,
      docHeight: docH,
      scrollHeight: docH + scrollGap(cm) + d.barHeight,
      nativeBarWidth: d.nativeBarWidth,
      gutterWidth: gutterW
    };
  }

  var NativeScrollbars = function NativeScrollbars(place, scroll, cm) {
    this.cm = cm;
    var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar");
    var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar");
    vert.tabIndex = horiz.tabIndex = -1;
    place(vert);
    place(horiz);
    on(vert, "scroll", function () {
      if (vert.clientHeight) {
        scroll(vert.scrollTop, "vertical");
      }
    });
    on(horiz, "scroll", function () {
      if (horiz.clientWidth) {
        scroll(horiz.scrollLeft, "horizontal");
      }
    });
    this.checkedZeroWidth = false; // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).

    if (ie && ie_version < 8) {
      this.horiz.style.minHeight = this.vert.style.minWidth = "18px";
    }
  };

  NativeScrollbars.prototype.update = function (measure) {
    var needsH = measure.scrollWidth > measure.clientWidth + 1;
    var needsV = measure.scrollHeight > measure.clientHeight + 1;
    var sWidth = measure.nativeBarWidth;

    if (needsV) {
      this.vert.style.display = "block";
      this.vert.style.bottom = needsH ? sWidth + "px" : "0";
      var totalHeight = measure.viewHeight - (needsH ? sWidth : 0); // A bug in IE8 can cause this value to be negative, so guard it.

      this.vert.firstChild.style.height = Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px";
    } else {
      this.vert.style.display = "";
      this.vert.firstChild.style.height = "0";
    }

    if (needsH) {
      this.horiz.style.display = "block";
      this.horiz.style.right = needsV ? sWidth + "px" : "0";
      this.horiz.style.left = measure.barLeft + "px";
      var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0);
      this.horiz.firstChild.style.width = Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + "px";
    } else {
      this.horiz.style.display = "";
      this.horiz.firstChild.style.width = "0";
    }

    if (!this.checkedZeroWidth && measure.clientHeight > 0) {
      if (sWidth == 0) {
        this.zeroWidthHack();
      }

      this.checkedZeroWidth = true;
    }

    return {
      right: needsV ? sWidth : 0,
      bottom: needsH ? sWidth : 0
    };
  };

  NativeScrollbars.prototype.setScrollLeft = function (pos) {
    if (this.horiz.scrollLeft != pos) {
      this.horiz.scrollLeft = pos;
    }

    if (this.disableHoriz) {
      this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz");
    }
  };

  NativeScrollbars.prototype.setScrollTop = function (pos) {
    if (this.vert.scrollTop != pos) {
      this.vert.scrollTop = pos;
    }

    if (this.disableVert) {
      this.enableZeroWidthBar(this.vert, this.disableVert, "vert");
    }
  };

  NativeScrollbars.prototype.zeroWidthHack = function () {
    var w = mac && !mac_geMountainLion ? "12px" : "18px";
    this.horiz.style.height = this.vert.style.width = w;
    this.horiz.style.pointerEvents = this.vert.style.pointerEvents = "none";
    this.disableHoriz = new Delayed();
    this.disableVert = new Delayed();
  };

  NativeScrollbars.prototype.enableZeroWidthBar = function (bar, delay, type) {
    bar.style.pointerEvents = "auto";

    function maybeDisable() {
      // To find out whether the scrollbar is still visible, we
      // check whether the element under the pixel in the bottom
      // right corner of the scrollbar box is the scrollbar box
      // itself (when the bar is still visible) or its filler child
      // (when the bar is hidden). If it is still visible, we keep
      // it enabled, if it's hidden, we disable pointer events.
      var box = bar.getBoundingClientRect();
      var elt = type == "vert" ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2) : document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1);

      if (elt != bar) {
        bar.style.pointerEvents = "none";
      } else {
        delay.set(1000, maybeDisable);
      }
    }

    delay.set(1000, maybeDisable);
  };

  NativeScrollbars.prototype.clear = function () {
    var parent = this.horiz.parentNode;
    parent.removeChild(this.horiz);
    parent.removeChild(this.vert);
  };

  var NullScrollbars = function NullScrollbars() {};

  NullScrollbars.prototype.update = function () {
    return {
      bottom: 0,
      right: 0
    };
  };

  NullScrollbars.prototype.setScrollLeft = function () {};

  NullScrollbars.prototype.setScrollTop = function () {};

  NullScrollbars.prototype.clear = function () {};

  function updateScrollbars(cm, measure) {
    if (!measure) {
      measure = measureForScrollbars(cm);
    }

    var startWidth = cm.display.barWidth,
        startHeight = cm.display.barHeight;
    updateScrollbarsInner(cm, measure);

    for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {
      if (startWidth != cm.display.barWidth && cm.options.lineWrapping) {
        updateHeightsInViewport(cm);
      }

      updateScrollbarsInner(cm, measureForScrollbars(cm));
      startWidth = cm.display.barWidth;
      startHeight = cm.display.barHeight;
    }
  } // Re-synchronize the fake scrollbars with the actual size of the
  // content.


  function updateScrollbarsInner(cm, measure) {
    var d = cm.display;
    var sizes = d.scrollbars.update(measure);
    d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px";
    d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px";
    d.heightForcer.style.borderBottom = sizes.bottom + "px solid transparent";

    if (sizes.right && sizes.bottom) {
      d.scrollbarFiller.style.display = "block";
      d.scrollbarFiller.style.height = sizes.bottom + "px";
      d.scrollbarFiller.style.width = sizes.right + "px";
    } else {
      d.scrollbarFiller.style.display = "";
    }

    if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {
      d.gutterFiller.style.display = "block";
      d.gutterFiller.style.height = sizes.bottom + "px";
      d.gutterFiller.style.width = measure.gutterWidth + "px";
    } else {
      d.gutterFiller.style.display = "";
    }
  }

  var scrollbarModel = {
    "native": NativeScrollbars,
    "null": NullScrollbars
  };

  function initScrollbars(cm) {
    if (cm.display.scrollbars) {
      cm.display.scrollbars.clear();

      if (cm.display.scrollbars.addClass) {
        rmClass(cm.display.wrapper, cm.display.scrollbars.addClass);
      }
    }

    cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](function (node) {
      cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller); // Prevent clicks in the scrollbars from killing focus

      on(node, "mousedown", function () {
        if (cm.state.focused) {
          setTimeout(function () {
            return cm.display.input.focus();
          }, 0);
        }
      });
      node.setAttribute("cm-not-content", "true");
    }, function (pos, axis) {
      if (axis == "horizontal") {
        setScrollLeft(cm, pos);
      } else {
        updateScrollTop(cm, pos);
      }
    }, cm);

    if (cm.display.scrollbars.addClass) {
      addClass(cm.display.wrapper, cm.display.scrollbars.addClass);
    }
  } // Operations are used to wrap a series of changes to the editor
  // state in such a way that each change won't have to update the
  // cursor and display (which would be awkward, slow, and
  // error-prone). Instead, display updates are batched and then all
  // combined and executed at once.


  var nextOpId = 0; // Start a new operation.

  function _startOperation(cm) {
    cm.curOp = {
      cm: cm,
      viewChanged: false,
      // Flag that indicates that lines might need to be redrawn
      startHeight: cm.doc.height,
      // Used to detect need to update scrollbar
      forceUpdate: false,
      // Used to force a redraw
      updateInput: 0,
      // Whether to reset the input textarea
      typing: false,
      // Whether this reset should be careful to leave existing text (for compositing)
      changeObjs: null,
      // Accumulated changes, for firing change events
      cursorActivityHandlers: null,
      // Set of handlers to fire cursorActivity on
      cursorActivityCalled: 0,
      // Tracks which cursorActivity handlers have been called already
      selectionChanged: false,
      // Whether the selection needs to be redrawn
      updateMaxLine: false,
      // Set when the widest line needs to be determined anew
      scrollLeft: null,
      scrollTop: null,
      // Intermediate scroll position, not pushed to DOM yet
      scrollToPos: null,
      // Used to scroll to a specific position
      focus: false,
      id: ++nextOpId // Unique ID

    };
    pushOperation(cm.curOp);
  } // Finish an operation, updating the display and signalling delayed events


  function _endOperation(cm) {
    var op = cm.curOp;

    if (op) {
      finishOperation(op, function (group) {
        for (var i = 0; i < group.ops.length; i++) {
          group.ops[i].cm.curOp = null;
        }

        endOperations(group);
      });
    }
  } // The DOM updates done when an operation finishes are batched so
  // that the minimum number of relayouts are required.


  function endOperations(group) {
    var ops = group.ops;

    for (var i = 0; i < ops.length; i++) // Read DOM
    {
      endOperation_R1(ops[i]);
    }

    for (var i$1 = 0; i$1 < ops.length; i$1++) // Write DOM (maybe)
    {
      endOperation_W1(ops[i$1]);
    }

    for (var i$2 = 0; i$2 < ops.length; i$2++) // Read DOM
    {
      endOperation_R2(ops[i$2]);
    }

    for (var i$3 = 0; i$3 < ops.length; i$3++) // Write DOM (maybe)
    {
      endOperation_W2(ops[i$3]);
    }

    for (var i$4 = 0; i$4 < ops.length; i$4++) // Read DOM
    {
      endOperation_finish(ops[i$4]);
    }
  }

  function endOperation_R1(op) {
    var cm = op.cm,
        display = cm.display;
    maybeClipScrollbars(cm);

    if (op.updateMaxLine) {
      findMaxLine(cm);
    }

    op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null || op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom || op.scrollToPos.to.line >= display.viewTo) || display.maxLineChanged && cm.options.lineWrapping;
    op.update = op.mustUpdate && new DisplayUpdate(cm, op.mustUpdate && {
      top: op.scrollTop,
      ensure: op.scrollToPos
    }, op.forceUpdate);
  }

  function endOperation_W1(op) {
    op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update);
  }

  function endOperation_R2(op) {
    var cm = op.cm,
        display = cm.display;

    if (op.updatedDisplay) {
      updateHeightsInViewport(cm);
    }

    op.barMeasure = measureForScrollbars(cm); // If the max line changed since it was last measured, measure it,
    // and ensure the document's width matches it.
    // updateDisplay_W2 will use these properties to do the actual resizing

    if (display.maxLineChanged && !cm.options.lineWrapping) {
      op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;
      cm.display.sizerWidth = op.adjustWidthTo;
      op.barMeasure.scrollWidth = Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);
      op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));
    }

    if (op.updatedDisplay || op.selectionChanged) {
      op.preparedSelection = display.input.prepareSelection();
    }
  }

  function endOperation_W2(op) {
    var cm = op.cm;

    if (op.adjustWidthTo != null) {
      cm.display.sizer.style.minWidth = op.adjustWidthTo + "px";

      if (op.maxScrollLeft < cm.doc.scrollLeft) {
        setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true);
      }

      cm.display.maxLineChanged = false;
    }

    var takeFocus = op.focus && op.focus == activeElt();

    if (op.preparedSelection) {
      cm.display.input.showSelection(op.preparedSelection, takeFocus);
    }

    if (op.updatedDisplay || op.startHeight != cm.doc.height) {
      updateScrollbars(cm, op.barMeasure);
    }

    if (op.updatedDisplay) {
      setDocumentHeight(cm, op.barMeasure);
    }

    if (op.selectionChanged) {
      restartBlink(cm);
    }

    if (cm.state.focused && op.updateInput) {
      cm.display.input.reset(op.typing);
    }

    if (takeFocus) {
      ensureFocus(op.cm);
    }
  }

  function endOperation_finish(op) {
    var cm = op.cm,
        display = cm.display,
        doc = cm.doc;

    if (op.updatedDisplay) {
      postUpdateDisplay(cm, op.update);
    } // Abort mouse wheel delta measurement, when scrolling explicitly


    if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos)) {
      display.wheelStartX = display.wheelStartY = null;
    } // Propagate the scroll position to the actual DOM scroller


    if (op.scrollTop != null) {
      setScrollTop(cm, op.scrollTop, op.forceScroll);
    }

    if (op.scrollLeft != null) {
      setScrollLeft(cm, op.scrollLeft, true, true);
    } // If we need to scroll a specific position into view, do so.


    if (op.scrollToPos) {
      var rect = scrollPosIntoView(cm, _clipPos(doc, op.scrollToPos.from), _clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin);
      maybeScrollWindow(cm, rect);
    } // Fire events for markers that are hidden/unidden by editing or
    // undoing


    var hidden = op.maybeHiddenMarkers,
        unhidden = op.maybeUnhiddenMarkers;

    if (hidden) {
      for (var i = 0; i < hidden.length; ++i) {
        if (!hidden[i].lines.length) {
          signal(hidden[i], "hide");
        }
      }
    }

    if (unhidden) {
      for (var i$1 = 0; i$1 < unhidden.length; ++i$1) {
        if (unhidden[i$1].lines.length) {
          signal(unhidden[i$1], "unhide");
        }
      }
    }

    if (display.wrapper.offsetHeight) {
      doc.scrollTop = cm.display.scroller.scrollTop;
    } // Fire change events, and delayed event handlers


    if (op.changeObjs) {
      signal(cm, "changes", cm, op.changeObjs);
    }

    if (op.update) {
      op.update.finish();
    }
  } // Run the given function in an operation


  function runInOp(cm, f) {
    if (cm.curOp) {
      return f();
    }

    _startOperation(cm);

    try {
      return f();
    } finally {
      _endOperation(cm);
    }
  } // Wraps a function in an operation. Returns the wrapped function.


  function operation(cm, f) {
    return function () {
      if (cm.curOp) {
        return f.apply(cm, arguments);
      }

      _startOperation(cm);

      try {
        return f.apply(cm, arguments);
      } finally {
        _endOperation(cm);
      }
    };
  } // Used to add methods to editor and doc instances, wrapping them in
  // operations.


  function methodOp(f) {
    return function () {
      if (this.curOp) {
        return f.apply(this, arguments);
      }

      _startOperation(this);

      try {
        return f.apply(this, arguments);
      } finally {
        _endOperation(this);
      }
    };
  }

  function docMethodOp(f) {
    return function () {
      var cm = this.cm;

      if (!cm || cm.curOp) {
        return f.apply(this, arguments);
      }

      _startOperation(cm);

      try {
        return f.apply(this, arguments);
      } finally {
        _endOperation(cm);
      }
    };
  } // HIGHLIGHT WORKER


  function startWorker(cm, time) {
    if (cm.doc.highlightFrontier < cm.display.viewTo) {
      cm.state.highlight.set(time, bind(highlightWorker, cm));
    }
  }

  function highlightWorker(cm) {
    var doc = cm.doc;

    if (doc.highlightFrontier >= cm.display.viewTo) {
      return;
    }

    var end = +new Date() + cm.options.workTime;
    var context = getContextBefore(cm, doc.highlightFrontier);
    var changedLines = [];
    doc.iter(context.line, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function (line) {
      if (context.line >= cm.display.viewFrom) {
        // Visible
        var oldStyles = line.styles;
        var resetState = line.text.length > cm.options.maxHighlightLength ? copyState(doc.mode, context.state) : null;
        var highlighted = highlightLine(cm, line, context, true);

        if (resetState) {
          context.state = resetState;
        }

        line.styles = highlighted.styles;
        var oldCls = line.styleClasses,
            newCls = highlighted.classes;

        if (newCls) {
          line.styleClasses = newCls;
        } else if (oldCls) {
          line.styleClasses = null;
        }

        var ischange = !oldStyles || oldStyles.length != line.styles.length || oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass);

        for (var i = 0; !ischange && i < oldStyles.length; ++i) {
          ischange = oldStyles[i] != line.styles[i];
        }

        if (ischange) {
          changedLines.push(context.line);
        }

        line.stateAfter = context.save();
        context.nextLine();
      } else {
        if (line.text.length <= cm.options.maxHighlightLength) {
          processLine(cm, line.text, context);
        }

        line.stateAfter = context.line % 5 == 0 ? context.save() : null;
        context.nextLine();
      }

      if (+new Date() > end) {
        startWorker(cm, cm.options.workDelay);
        return true;
      }
    });
    doc.highlightFrontier = context.line;
    doc.modeFrontier = Math.max(doc.modeFrontier, context.line);

    if (changedLines.length) {
      runInOp(cm, function () {
        for (var i = 0; i < changedLines.length; i++) {
          regLineChange(cm, changedLines[i], "text");
        }
      });
    }
  } // DISPLAY DRAWING


  var DisplayUpdate = function DisplayUpdate(cm, viewport, force) {
    var display = cm.display;
    this.viewport = viewport; // Store some values that we'll need later (but don't want to force a relayout for)

    this.visible = visibleLines(display, cm.doc, viewport);
    this.editorIsHidden = !display.wrapper.offsetWidth;
    this.wrapperHeight = display.wrapper.clientHeight;
    this.wrapperWidth = display.wrapper.clientWidth;
    this.oldDisplayWidth = displayWidth(cm);
    this.force = force;
    this.dims = getDimensions(cm);
    this.events = [];
  };

  DisplayUpdate.prototype.signal = function (emitter, type) {
    if (hasHandler(emitter, type)) {
      this.events.push(arguments);
    }
  };

  DisplayUpdate.prototype.finish = function () {
    for (var i = 0; i < this.events.length; i++) {
      signal.apply(null, this.events[i]);
    }
  };

  function maybeClipScrollbars(cm) {
    var display = cm.display;

    if (!display.scrollbarsClipped && display.scroller.offsetWidth) {
      display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth;
      display.heightForcer.style.height = scrollGap(cm) + "px";
      display.sizer.style.marginBottom = -display.nativeBarWidth + "px";
      display.sizer.style.borderRightWidth = scrollGap(cm) + "px";
      display.scrollbarsClipped = true;
    }
  }

  function selectionSnapshot(cm) {
    if (cm.hasFocus()) {
      return null;
    }

    var active = activeElt();

    if (!active || !contains(cm.display.lineDiv, active)) {
      return null;
    }

    var result = {
      activeElt: active
    };

    if (window.getSelection) {
      var sel = window.getSelection();

      if (sel.anchorNode && sel.extend && contains(cm.display.lineDiv, sel.anchorNode)) {
        result.anchorNode = sel.anchorNode;
        result.anchorOffset = sel.anchorOffset;
        result.focusNode = sel.focusNode;
        result.focusOffset = sel.focusOffset;
      }
    }

    return result;
  }

  function restoreSelection(snapshot) {
    if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt()) {
      return;
    }

    snapshot.activeElt.focus();

    if (!/^(INPUT|TEXTAREA)$/.test(snapshot.activeElt.nodeName) && snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) {
      var sel = window.getSelection(),
          range = document.createRange();
      range.setEnd(snapshot.anchorNode, snapshot.anchorOffset);
      range.collapse(false);
      sel.removeAllRanges();
      sel.addRange(range);
      sel.extend(snapshot.focusNode, snapshot.focusOffset);
    }
  } // Does the actual updating of the line display. Bails out
  // (returning false) when there is nothing to be done and forced is
  // false.


  function updateDisplayIfNeeded(cm, update) {
    var display = cm.display,
        doc = cm.doc;

    if (update.editorIsHidden) {
      resetView(cm);
      return false;
    } // Bail out if the visible area is already rendered and nothing changed.


    if (!update.force && update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo && (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) && display.renderedView == display.view && countDirtyView(cm) == 0) {
      return false;
    }

    if (maybeUpdateLineNumberWidth(cm)) {
      resetView(cm);
      update.dims = getDimensions(cm);
    } // Compute a suitable new viewport (from & to)


    var end = doc.first + doc.size;
    var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first);
    var to = Math.min(end, update.visible.to + cm.options.viewportMargin);

    if (display.viewFrom < from && from - display.viewFrom < 20) {
      from = Math.max(doc.first, display.viewFrom);
    }

    if (display.viewTo > to && display.viewTo - to < 20) {
      to = Math.min(end, display.viewTo);
    }

    if (sawCollapsedSpans) {
      from = visualLineNo(cm.doc, from);
      to = visualLineEndNo(cm.doc, to);
    }

    var different = from != display.viewFrom || to != display.viewTo || display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth;
    adjustView(cm, from, to);
    display.viewOffset = _heightAtLine(getLine(cm.doc, display.viewFrom)); // Position the mover div to align with the current scroll position

    cm.display.mover.style.top = display.viewOffset + "px";
    var toUpdate = countDirtyView(cm);

    if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view && (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo)) {
      return false;
    } // For big changes, we hide the enclosing element during the
    // update, since that speeds up the operations on most browsers.


    var selSnapshot = selectionSnapshot(cm);

    if (toUpdate > 4) {
      display.lineDiv.style.display = "none";
    }

    patchDisplay(cm, display.updateLineNumbers, update.dims);

    if (toUpdate > 4) {
      display.lineDiv.style.display = "";
    }

    display.renderedView = display.view; // There might have been a widget with a focused element that got
    // hidden or updated, if so re-focus it.

    restoreSelection(selSnapshot); // Prevent selection and cursors from interfering with the scroll
    // width and height.

    removeChildren(display.cursorDiv);
    removeChildren(display.selectionDiv);
    display.gutters.style.height = display.sizer.style.minHeight = 0;

    if (different) {
      display.lastWrapHeight = update.wrapperHeight;
      display.lastWrapWidth = update.wrapperWidth;
      startWorker(cm, 400);
    }

    display.updateLineNumbers = null;
    return true;
  }

  function postUpdateDisplay(cm, update) {
    var viewport = update.viewport;

    for (var first = true;; first = false) {
      if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {
        // Clip forced viewport to actual scrollable area.
        if (viewport && viewport.top != null) {
          viewport = {
            top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)
          };
        } // Updated line heights might result in the drawn area not
        // actually covering the viewport. Keep looping until it does.


        update.visible = visibleLines(cm.display, cm.doc, viewport);

        if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo) {
          break;
        }
      } else if (first) {
        update.visible = visibleLines(cm.display, cm.doc, viewport);
      }

      if (!updateDisplayIfNeeded(cm, update)) {
        break;
      }

      updateHeightsInViewport(cm);
      var barMeasure = measureForScrollbars(cm);
      updateSelection(cm);
      updateScrollbars(cm, barMeasure);
      setDocumentHeight(cm, barMeasure);
      update.force = false;
    }

    update.signal(cm, "update", cm);

    if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {
      update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo);
      cm.display.reportedViewFrom = cm.display.viewFrom;
      cm.display.reportedViewTo = cm.display.viewTo;
    }
  }

  function updateDisplaySimple(cm, viewport) {
    var update = new DisplayUpdate(cm, viewport);

    if (updateDisplayIfNeeded(cm, update)) {
      updateHeightsInViewport(cm);
      postUpdateDisplay(cm, update);
      var barMeasure = measureForScrollbars(cm);
      updateSelection(cm);
      updateScrollbars(cm, barMeasure);
      setDocumentHeight(cm, barMeasure);
      update.finish();
    }
  } // Sync the actual display DOM structure with display.view, removing
  // nodes for lines that are no longer in view, and creating the ones
  // that are not there yet, and updating the ones that are out of
  // date.


  function patchDisplay(cm, updateNumbersFrom, dims) {
    var display = cm.display,
        lineNumbers = cm.options.lineNumbers;
    var container = display.lineDiv,
        cur = container.firstChild;

    function rm(node) {
      var next = node.nextSibling; // Works around a throw-scroll bug in OS X Webkit

      if (webkit && mac && cm.display.currentWheelTarget == node) {
        node.style.display = "none";
      } else {
        node.parentNode.removeChild(node);
      }

      return next;
    }

    var view = display.view,
        lineN = display.viewFrom; // Loop over the elements in the view, syncing cur (the DOM nodes
    // in display.lineDiv) with the view as we go.

    for (var i = 0; i < view.length; i++) {
      var lineView = view[i];
      if (lineView.hidden) ;else if (!lineView.node || lineView.node.parentNode != container) {
        // Not drawn yet
        var node = buildLineElement(cm, lineView, lineN, dims);
        container.insertBefore(node, cur);
      } else {
        // Already drawn
        while (cur != lineView.node) {
          cur = rm(cur);
        }

        var updateNumber = lineNumbers && updateNumbersFrom != null && updateNumbersFrom <= lineN && lineView.lineNumber;

        if (lineView.changes) {
          if (indexOf(lineView.changes, "gutter") > -1) {
            updateNumber = false;
          }

          updateLineForChanges(cm, lineView, lineN, dims);
        }

        if (updateNumber) {
          removeChildren(lineView.lineNumber);
          lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));
        }

        cur = lineView.node.nextSibling;
      }
      lineN += lineView.size;
    }

    while (cur) {
      cur = rm(cur);
    }
  }

  function updateGutterSpace(display) {
    var width = display.gutters.offsetWidth;
    display.sizer.style.marginLeft = width + "px";
  }

  function setDocumentHeight(cm, measure) {
    cm.display.sizer.style.minHeight = measure.docHeight + "px";
    cm.display.heightForcer.style.top = measure.docHeight + "px";
    cm.display.gutters.style.height = measure.docHeight + cm.display.barHeight + scrollGap(cm) + "px";
  } // Re-align line numbers and gutter marks to compensate for
  // horizontal scrolling.


  function alignHorizontally(cm) {
    var display = cm.display,
        view = display.view;

    if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) {
      return;
    }

    var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;
    var gutterW = display.gutters.offsetWidth,
        left = comp + "px";

    for (var i = 0; i < view.length; i++) {
      if (!view[i].hidden) {
        if (cm.options.fixedGutter) {
          if (view[i].gutter) {
            view[i].gutter.style.left = left;
          }

          if (view[i].gutterBackground) {
            view[i].gutterBackground.style.left = left;
          }
        }

        var align = view[i].alignable;

        if (align) {
          for (var j = 0; j < align.length; j++) {
            align[j].style.left = left;
          }
        }
      }
    }

    if (cm.options.fixedGutter) {
      display.gutters.style.left = comp + gutterW + "px";
    }
  } // Used to ensure that the line number gutter is still the right
  // size for the current document size. Returns true when an update
  // is needed.


  function maybeUpdateLineNumberWidth(cm) {
    if (!cm.options.lineNumbers) {
      return false;
    }

    var doc = cm.doc,
        last = lineNumberFor(cm.options, doc.first + doc.size - 1),
        display = cm.display;

    if (last.length != display.lineNumChars) {
      var test = display.measure.appendChild(elt("div", [elt("div", last)], "CodeMirror-linenumber CodeMirror-gutter-elt"));
      var innerW = test.firstChild.offsetWidth,
          padding = test.offsetWidth - innerW;
      display.lineGutter.style.width = "";
      display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1;
      display.lineNumWidth = display.lineNumInnerWidth + padding;
      display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;
      display.lineGutter.style.width = display.lineNumWidth + "px";
      updateGutterSpace(cm.display);
      return true;
    }

    return false;
  }

  function getGutters(gutters, lineNumbers) {
    var result = [],
        sawLineNumbers = false;

    for (var i = 0; i < gutters.length; i++) {
      var name = gutters[i],
          style = null;

      if (typeof name != "string") {
        style = name.style;
        name = name.className;
      }

      if (name == "CodeMirror-linenumbers") {
        if (!lineNumbers) {
          continue;
        } else {
          sawLineNumbers = true;
        }
      }

      result.push({
        className: name,
        style: style
      });
    }

    if (lineNumbers && !sawLineNumbers) {
      result.push({
        className: "CodeMirror-linenumbers",
        style: null
      });
    }

    return result;
  } // Rebuild the gutter elements, ensure the margin to the left of the
  // code matches their width.


  function renderGutters(display) {
    var gutters = display.gutters,
        specs = display.gutterSpecs;
    removeChildren(gutters);
    display.lineGutter = null;

    for (var i = 0; i < specs.length; ++i) {
      var ref = specs[i];
      var className = ref.className;
      var style = ref.style;
      var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + className));

      if (style) {
        gElt.style.cssText = style;
      }

      if (className == "CodeMirror-linenumbers") {
        display.lineGutter = gElt;
        gElt.style.width = (display.lineNumWidth || 1) + "px";
      }
    }

    gutters.style.display = specs.length ? "" : "none";
    updateGutterSpace(display);
  }

  function updateGutters(cm) {
    renderGutters(cm.display);
    regChange(cm);
    alignHorizontally(cm);
  } // The display handles the DOM integration, both for input reading
  // and content drawing. It holds references to DOM nodes and
  // display-related state.


  function Display(place, doc, input, options) {
    var d = this;
    this.input = input; // Covers bottom-right square when both scrollbars are present.

    d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler");
    d.scrollbarFiller.setAttribute("cm-not-content", "true"); // Covers bottom of gutter when coverGutterNextToScrollbar is on
    // and h scrollbar is present.

    d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler");
    d.gutterFiller.setAttribute("cm-not-content", "true"); // Will contain the actual code, positioned to cover the viewport.

    d.lineDiv = eltP("div", null, "CodeMirror-code"); // Elements are added to these to represent selection and cursors.

    d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1");
    d.cursorDiv = elt("div", null, "CodeMirror-cursors"); // A visibility: hidden element used to find the size of things.

    d.measure = elt("div", null, "CodeMirror-measure"); // When lines outside of the viewport are measured, they are drawn in this.

    d.lineMeasure = elt("div", null, "CodeMirror-measure"); // Wraps everything that needs to exist inside the vertically-padded coordinate system

    d.lineSpace = eltP("div", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv], null, "position: relative; outline: none");
    var lines = eltP("div", [d.lineSpace], "CodeMirror-lines"); // Moved around its parent to cover visible view.

    d.mover = elt("div", [lines], null, "position: relative"); // Set to the height of the document, allowing scrolling.

    d.sizer = elt("div", [d.mover], "CodeMirror-sizer");
    d.sizerWidth = null; // Behavior of elts with overflow: auto and padding is
    // inconsistent across browsers. This is used to ensure the
    // scrollable area is big enough.

    d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerGap + "px; width: 1px;"); // Will contain the gutters, if any.

    d.gutters = elt("div", null, "CodeMirror-gutters");
    d.lineGutter = null; // Actual scrollable element.

    d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll");
    d.scroller.setAttribute("tabIndex", "-1"); // The element in which the editor lives.

    d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror"); // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)

    if (ie && ie_version < 8) {
      d.gutters.style.zIndex = -1;
      d.scroller.style.paddingRight = 0;
    }

    if (!webkit && !(gecko && mobile)) {
      d.scroller.draggable = true;
    }

    if (place) {
      if (place.appendChild) {
        place.appendChild(d.wrapper);
      } else {
        place(d.wrapper);
      }
    } // Current rendered range (may be bigger than the view window).


    d.viewFrom = d.viewTo = doc.first;
    d.reportedViewFrom = d.reportedViewTo = doc.first; // Information about the rendered lines.

    d.view = [];
    d.renderedView = null; // Holds info about a single rendered line when it was rendered
    // for measurement, while not in view.

    d.externalMeasured = null; // Empty space (in pixels) above the view

    d.viewOffset = 0;
    d.lastWrapHeight = d.lastWrapWidth = 0;
    d.updateLineNumbers = null;
    d.nativeBarWidth = d.barHeight = d.barWidth = 0;
    d.scrollbarsClipped = false; // Used to only resize the line number gutter when necessary (when
    // the amount of lines crosses a boundary that makes its width change)

    d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null; // Set to true when a non-horizontal-scrolling line widget is
    // added. As an optimization, line widget aligning is skipped when
    // this is false.

    d.alignWidgets = false;
    d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null; // Tracks the maximum line length so that the horizontal scrollbar
    // can be kept static when scrolling.

    d.maxLine = null;
    d.maxLineLength = 0;
    d.maxLineChanged = false; // Used for measuring wheel scrolling granularity

    d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null; // True when shift is held down.

    d.shift = false; // Used to track whether anything happened since the context menu
    // was opened.

    d.selForContextMenu = null;
    d.activeTouch = null;
    d.gutterSpecs = getGutters(options.gutters, options.lineNumbers);
    renderGutters(d);
    input.init(d);
  } // Since the delta values reported on mouse wheel events are
  // unstandardized between browsers and even browser versions, and
  // generally horribly unpredictable, this code starts by measuring
  // the scroll effect that the first few mouse wheel events have,
  // and, from that, detects the way it can convert deltas to pixel
  // offsets afterwards.
  //
  // The reason we want to know the amount a wheel event will scroll
  // is that it gives us a chance to update the display before the
  // actual scrolling happens, reducing flickering.


  var wheelSamples = 0,
      wheelPixelsPerUnit = null; // Fill in a browser-detected starting value on browsers where we
  // know one. These don't have to be accurate -- the result of them
  // being wrong would just be a slight flicker on the first wheel
  // scroll (if it is large enough).

  if (ie) {
    wheelPixelsPerUnit = -.53;
  } else if (gecko) {
    wheelPixelsPerUnit = 15;
  } else if (chrome) {
    wheelPixelsPerUnit = -.7;
  } else if (safari) {
    wheelPixelsPerUnit = -1 / 3;
  }

  function wheelEventDelta(e) {
    var dx = e.wheelDeltaX,
        dy = e.wheelDeltaY;

    if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) {
      dx = e.detail;
    }

    if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) {
      dy = e.detail;
    } else if (dy == null) {
      dy = e.wheelDelta;
    }

    return {
      x: dx,
      y: dy
    };
  }

  function wheelEventPixels(e) {
    var delta = wheelEventDelta(e);
    delta.x *= wheelPixelsPerUnit;
    delta.y *= wheelPixelsPerUnit;
    return delta;
  }

  function onScrollWheel(cm, e) {
    var delta = wheelEventDelta(e),
        dx = delta.x,
        dy = delta.y;
    var display = cm.display,
        scroll = display.scroller; // Quit if there's nothing to scroll here

    var canScrollX = scroll.scrollWidth > scroll.clientWidth;
    var canScrollY = scroll.scrollHeight > scroll.clientHeight;

    if (!(dx && canScrollX || dy && canScrollY)) {
      return;
    } // Webkit browsers on OS X abort momentum scrolls when the target
    // of the scroll event is removed from the scrollable element.
    // This hack (see related code in patchDisplay) makes sure the
    // element is kept around.


    if (dy && mac && webkit) {
      outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {
        for (var i = 0; i < view.length; i++) {
          if (view[i].node == cur) {
            cm.display.currentWheelTarget = cur;
            break outer;
          }
        }
      }
    } // On some browsers, horizontal scrolling will cause redraws to
    // happen before the gutter has been realigned, causing it to
    // wriggle around in a most unseemly way. When we have an
    // estimated pixels/delta value, we just handle horizontal
    // scrolling entirely here. It'll be slightly off from native, but
    // better than glitching out.


    if (dx && !gecko && !presto && wheelPixelsPerUnit != null) {
      if (dy && canScrollY) {
        updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * wheelPixelsPerUnit));
      }

      setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * wheelPixelsPerUnit)); // Only prevent default scrolling if vertical scrolling is
      // actually possible. Otherwise, it causes vertical scroll
      // jitter on OSX trackpads when deltaX is small and deltaY
      // is large (issue #3579)

      if (!dy || dy && canScrollY) {
        e_preventDefault(e);
      }

      display.wheelStartX = null; // Abort measurement, if in progress

      return;
    } // 'Project' the visible viewport to cover the area that is being
    // scrolled into view (if we know enough to estimate it).


    if (dy && wheelPixelsPerUnit != null) {
      var pixels = dy * wheelPixelsPerUnit;
      var top = cm.doc.scrollTop,
          bot = top + display.wrapper.clientHeight;

      if (pixels < 0) {
        top = Math.max(0, top + pixels - 50);
      } else {
        bot = Math.min(cm.doc.height, bot + pixels + 50);
      }

      updateDisplaySimple(cm, {
        top: top,
        bottom: bot
      });
    }

    if (wheelSamples < 20) {
      if (display.wheelStartX == null) {
        display.wheelStartX = scroll.scrollLeft;
        display.wheelStartY = scroll.scrollTop;
        display.wheelDX = dx;
        display.wheelDY = dy;
        setTimeout(function () {
          if (display.wheelStartX == null) {
            return;
          }

          var movedX = scroll.scrollLeft - display.wheelStartX;
          var movedY = scroll.scrollTop - display.wheelStartY;
          var sample = movedY && display.wheelDY && movedY / display.wheelDY || movedX && display.wheelDX && movedX / display.wheelDX;
          display.wheelStartX = display.wheelStartY = null;

          if (!sample) {
            return;
          }

          wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);
          ++wheelSamples;
        }, 200);
      } else {
        display.wheelDX += dx;
        display.wheelDY += dy;
      }
    }
  } // Selection objects are immutable. A new one is created every time
  // the selection changes. A selection is one or more non-overlapping
  // (and non-touching) ranges, sorted, and an integer that indicates
  // which one is the primary selection (the one that's scrolled into
  // view, that getCursor returns, etc).


  var Selection = function Selection(ranges, primIndex) {
    this.ranges = ranges;
    this.primIndex = primIndex;
  };

  Selection.prototype.primary = function () {
    return this.ranges[this.primIndex];
  };

  Selection.prototype.equals = function (other) {
    if (other == this) {
      return true;
    }

    if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) {
      return false;
    }

    for (var i = 0; i < this.ranges.length; i++) {
      var here = this.ranges[i],
          there = other.ranges[i];

      if (!equalCursorPos(here.anchor, there.anchor) || !equalCursorPos(here.head, there.head)) {
        return false;
      }
    }

    return true;
  };

  Selection.prototype.deepCopy = function () {
    var out = [];

    for (var i = 0; i < this.ranges.length; i++) {
      out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head));
    }

    return new Selection(out, this.primIndex);
  };

  Selection.prototype.somethingSelected = function () {
    for (var i = 0; i < this.ranges.length; i++) {
      if (!this.ranges[i].empty()) {
        return true;
      }
    }

    return false;
  };

  Selection.prototype.contains = function (pos, end) {
    if (!end) {
      end = pos;
    }

    for (var i = 0; i < this.ranges.length; i++) {
      var range = this.ranges[i];

      if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0) {
        return i;
      }
    }

    return -1;
  };

  var Range = function Range(anchor, head) {
    this.anchor = anchor;
    this.head = head;
  };

  Range.prototype.from = function () {
    return minPos(this.anchor, this.head);
  };

  Range.prototype.to = function () {
    return maxPos(this.anchor, this.head);
  };

  Range.prototype.empty = function () {
    return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch;
  }; // Take an unsorted, potentially overlapping set of ranges, and
  // build a selection out of it. 'Consumes' ranges array (modifying
  // it).


  function normalizeSelection(cm, ranges, primIndex) {
    var mayTouch = cm && cm.options.selectionsMayTouch;
    var prim = ranges[primIndex];
    ranges.sort(function (a, b) {
      return cmp(a.from(), b.from());
    });
    primIndex = indexOf(ranges, prim);

    for (var i = 1; i < ranges.length; i++) {
      var cur = ranges[i],
          prev = ranges[i - 1];
      var diff = cmp(prev.to(), cur.from());

      if (mayTouch && !cur.empty() ? diff > 0 : diff >= 0) {
        var from = minPos(prev.from(), cur.from()),
            to = maxPos(prev.to(), cur.to());
        var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head;

        if (i <= primIndex) {
          --primIndex;
        }

        ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to));
      }
    }

    return new Selection(ranges, primIndex);
  }

  function simpleSelection(anchor, head) {
    return new Selection([new Range(anchor, head || anchor)], 0);
  } // Compute the position of the end of a change (its 'to' property
  // refers to the pre-change end).


  function changeEnd(change) {
    if (!change.text) {
      return change.to;
    }

    return Pos(change.from.line + change.text.length - 1, lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0));
  } // Adjust a position to refer to the post-change position of the
  // same text, or the end of the change if the change covers it.


  function adjustForChange(pos, change) {
    if (cmp(pos, change.from) < 0) {
      return pos;
    }

    if (cmp(pos, change.to) <= 0) {
      return changeEnd(change);
    }

    var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1,
        ch = pos.ch;

    if (pos.line == change.to.line) {
      ch += changeEnd(change).ch - change.to.ch;
    }

    return Pos(line, ch);
  }

  function computeSelAfterChange(doc, change) {
    var out = [];

    for (var i = 0; i < doc.sel.ranges.length; i++) {
      var range = doc.sel.ranges[i];
      out.push(new Range(adjustForChange(range.anchor, change), adjustForChange(range.head, change)));
    }

    return normalizeSelection(doc.cm, out, doc.sel.primIndex);
  }

  function offsetPos(pos, old, nw) {
    if (pos.line == old.line) {
      return Pos(nw.line, pos.ch - old.ch + nw.ch);
    } else {
      return Pos(nw.line + (pos.line - old.line), pos.ch);
    }
  } // Used by replaceSelections to allow moving the selection to the
  // start or around the replaced test. Hint may be "start" or "around".


  function computeReplacedSel(doc, changes, hint) {
    var out = [];
    var oldPrev = Pos(doc.first, 0),
        newPrev = oldPrev;

    for (var i = 0; i < changes.length; i++) {
      var change = changes[i];
      var from = offsetPos(change.from, oldPrev, newPrev);
      var to = offsetPos(changeEnd(change), oldPrev, newPrev);
      oldPrev = change.to;
      newPrev = to;

      if (hint == "around") {
        var range = doc.sel.ranges[i],
            inv = cmp(range.head, range.anchor) < 0;
        out[i] = new Range(inv ? to : from, inv ? from : to);
      } else {
        out[i] = new Range(from, from);
      }
    }

    return new Selection(out, doc.sel.primIndex);
  } // Used to get the editor into a consistent state again when options change.


  function loadMode(cm) {
    cm.doc.mode = getMode(cm.options, cm.doc.modeOption);
    resetModeState(cm);
  }

  function resetModeState(cm) {
    cm.doc.iter(function (line) {
      if (line.stateAfter) {
        line.stateAfter = null;
      }

      if (line.styles) {
        line.styles = null;
      }
    });
    cm.doc.modeFrontier = cm.doc.highlightFrontier = cm.doc.first;
    startWorker(cm, 100);
    cm.state.modeGen++;

    if (cm.curOp) {
      regChange(cm);
    }
  } // DOCUMENT DATA STRUCTURE
  // By default, updates that start and end at the beginning of a line
  // are treated specially, in order to make the association of line
  // widgets and marker elements with the text behave more intuitive.


  function isWholeLineUpdate(doc, change) {
    return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == "" && (!doc.cm || doc.cm.options.wholeLineUpdateBefore);
  } // Perform a change on the document data structure.


  function updateDoc(doc, change, markedSpans, estimateHeight) {
    function spansFor(n) {
      return markedSpans ? markedSpans[n] : null;
    }

    function update(line, text, spans) {
      updateLine(line, text, spans, estimateHeight);
      signalLater(line, "change", line, change);
    }

    function linesFor(start, end) {
      var result = [];

      for (var i = start; i < end; ++i) {
        result.push(new Line(text[i], spansFor(i), estimateHeight));
      }

      return result;
    }

    var from = change.from,
        to = change.to,
        text = change.text;
    var firstLine = getLine(doc, from.line),
        lastLine = getLine(doc, to.line);
    var lastText = lst(text),
        lastSpans = spansFor(text.length - 1),
        nlines = to.line - from.line; // Adjust the line structure

    if (change.full) {
      doc.insert(0, linesFor(0, text.length));
      doc.remove(text.length, doc.size - text.length);
    } else if (isWholeLineUpdate(doc, change)) {
      // This is a whole-line replace. Treated specially to make
      // sure line objects move the way they are supposed to.
      var added = linesFor(0, text.length - 1);
      update(lastLine, lastLine.text, lastSpans);

      if (nlines) {
        doc.remove(from.line, nlines);
      }

      if (added.length) {
        doc.insert(from.line, added);
      }
    } else if (firstLine == lastLine) {
      if (text.length == 1) {
        update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);
      } else {
        var added$1 = linesFor(1, text.length - 1);
        added$1.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight));
        update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
        doc.insert(from.line + 1, added$1);
      }
    } else if (text.length == 1) {
      update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));
      doc.remove(from.line + 1, nlines);
    } else {
      update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
      update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);
      var added$2 = linesFor(1, text.length - 1);

      if (nlines > 1) {
        doc.remove(from.line + 1, nlines - 1);
      }

      doc.insert(from.line + 1, added$2);
    }

    signalLater(doc, "change", doc, change);
  } // Call f for all linked documents.


  function linkedDocs(doc, f, sharedHistOnly) {
    function propagate(doc, skip, sharedHist) {
      if (doc.linked) {
        for (var i = 0; i < doc.linked.length; ++i) {
          var rel = doc.linked[i];

          if (rel.doc == skip) {
            continue;
          }

          var shared = sharedHist && rel.sharedHist;

          if (sharedHistOnly && !shared) {
            continue;
          }

          f(rel.doc, shared);
          propagate(rel.doc, doc, shared);
        }
      }
    }

    propagate(doc, null, true);
  } // Attach a document to an editor.


  function attachDoc(cm, doc) {
    if (doc.cm) {
      throw new Error("This document is already in use.");
    }

    cm.doc = doc;
    doc.cm = cm;
    estimateLineHeights(cm);
    loadMode(cm);
    setDirectionClass(cm);

    if (!cm.options.lineWrapping) {
      findMaxLine(cm);
    }

    cm.options.mode = doc.modeOption;
    regChange(cm);
  }

  function setDirectionClass(cm) {
    (cm.doc.direction == "rtl" ? addClass : rmClass)(cm.display.lineDiv, "CodeMirror-rtl");
  }

  function directionChanged(cm) {
    runInOp(cm, function () {
      setDirectionClass(cm);
      regChange(cm);
    });
  }

  function History(startGen) {
    // Arrays of change events and selections. Doing something adds an
    // event to done and clears undo. Undoing moves events from done
    // to undone, redoing moves them in the other direction.
    this.done = [];
    this.undone = [];
    this.undoDepth = Infinity; // Used to track when changes can be merged into a single undo
    // event

    this.lastModTime = this.lastSelTime = 0;
    this.lastOp = this.lastSelOp = null;
    this.lastOrigin = this.lastSelOrigin = null; // Used by the isClean() method

    this.generation = this.maxGeneration = startGen || 1;
  } // Create a history change event from an updateDoc-style change
  // object.


  function historyChangeFromChange(doc, change) {
    var histChange = {
      from: copyPos(change.from),
      to: changeEnd(change),
      text: getBetween(doc, change.from, change.to)
    };
    attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);
    linkedDocs(doc, function (doc) {
      return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);
    }, true);
    return histChange;
  } // Pop all selection events off the end of a history array. Stop at
  // a change event.


  function clearSelectionEvents(array) {
    while (array.length) {
      var last = lst(array);

      if (last.ranges) {
        array.pop();
      } else {
        break;
      }
    }
  } // Find the top change event in the history. Pop off selection
  // events that are in the way.


  function lastChangeEvent(hist, force) {
    if (force) {
      clearSelectionEvents(hist.done);
      return lst(hist.done);
    } else if (hist.done.length && !lst(hist.done).ranges) {
      return lst(hist.done);
    } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {
      hist.done.pop();
      return lst(hist.done);
    }
  } // Register a change in the history. Merges changes that are within
  // a single operation, or are close together with an origin that
  // allows merging (starting with "+") into a single event.


  function addChangeToHistory(doc, change, selAfter, opId) {
    var hist = doc.history;
    hist.undone.length = 0;
    var time = +new Date(),
        cur;
    var last;

    if ((hist.lastOp == opId || hist.lastOrigin == change.origin && change.origin && (change.origin.charAt(0) == "+" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500) || change.origin.charAt(0) == "*")) && (cur = lastChangeEvent(hist, hist.lastOp == opId))) {
      // Merge this change into the last event
      last = lst(cur.changes);

      if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) {
        // Optimized case for simple insertion -- don't want to add
        // new changesets for every character typed
        last.to = changeEnd(change);
      } else {
        // Add new sub-event
        cur.changes.push(historyChangeFromChange(doc, change));
      }
    } else {
      // Can not be merged, start a new event.
      var before = lst(hist.done);

      if (!before || !before.ranges) {
        pushSelectionToHistory(doc.sel, hist.done);
      }

      cur = {
        changes: [historyChangeFromChange(doc, change)],
        generation: hist.generation
      };
      hist.done.push(cur);

      while (hist.done.length > hist.undoDepth) {
        hist.done.shift();

        if (!hist.done[0].ranges) {
          hist.done.shift();
        }
      }
    }

    hist.done.push(selAfter);
    hist.generation = ++hist.maxGeneration;
    hist.lastModTime = hist.lastSelTime = time;
    hist.lastOp = hist.lastSelOp = opId;
    hist.lastOrigin = hist.lastSelOrigin = change.origin;

    if (!last) {
      signal(doc, "historyAdded");
    }
  }

  function selectionEventCanBeMerged(doc, origin, prev, sel) {
    var ch = origin.charAt(0);
    return ch == "*" || ch == "+" && prev.ranges.length == sel.ranges.length && prev.somethingSelected() == sel.somethingSelected() && new Date() - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500);
  } // Called whenever the selection changes, sets the new selection as
  // the pending selection in the history, and pushes the old pending
  // selection into the 'done' array when it was significantly
  // different (in number of selected ranges, emptiness, or time).


  function addSelectionToHistory(doc, sel, opId, options) {
    var hist = doc.history,
        origin = options && options.origin; // A new event is started when the previous origin does not match
    // the current, or the origins don't allow matching. Origins
    // starting with * are always merged, those starting with + are
    // merged when similar and close together in time.

    if (opId == hist.lastSelOp || origin && hist.lastSelOrigin == origin && (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin || selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))) {
      hist.done[hist.done.length - 1] = sel;
    } else {
      pushSelectionToHistory(sel, hist.done);
    }

    hist.lastSelTime = +new Date();
    hist.lastSelOrigin = origin;
    hist.lastSelOp = opId;

    if (options && options.clearRedo !== false) {
      clearSelectionEvents(hist.undone);
    }
  }

  function pushSelectionToHistory(sel, dest) {
    var top = lst(dest);

    if (!(top && top.ranges && top.equals(sel))) {
      dest.push(sel);
    }
  } // Used to store marked span information in the history.


  function attachLocalSpans(doc, change, from, to) {
    var existing = change["spans_" + doc.id],
        n = 0;
    doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function (line) {
      if (line.markedSpans) {
        (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans;
      }

      ++n;
    });
  } // When un/re-doing restores text containing marked spans, those
  // that have been explicitly cleared should not be restored.


  function removeClearedSpans(spans) {
    if (!spans) {
      return null;
    }

    var out;

    for (var i = 0; i < spans.length; ++i) {
      if (spans[i].marker.explicitlyCleared) {
        if (!out) {
          out = spans.slice(0, i);
        }
      } else if (out) {
        out.push(spans[i]);
      }
    }

    return !out ? spans : out.length ? out : null;
  } // Retrieve and filter the old marked spans stored in a change event.


  function getOldSpans(doc, change) {
    var found = change["spans_" + doc.id];

    if (!found) {
      return null;
    }

    var nw = [];

    for (var i = 0; i < change.text.length; ++i) {
      nw.push(removeClearedSpans(found[i]));
    }

    return nw;
  } // Used for un/re-doing changes from the history. Combines the
  // result of computing the existing spans with the set of spans that
  // existed in the history (so that deleting around a span and then
  // undoing brings back the span).


  function mergeOldSpans(doc, change) {
    var old = getOldSpans(doc, change);
    var stretched = stretchSpansOverChange(doc, change);

    if (!old) {
      return stretched;
    }

    if (!stretched) {
      return old;
    }

    for (var i = 0; i < old.length; ++i) {
      var oldCur = old[i],
          stretchCur = stretched[i];

      if (oldCur && stretchCur) {
        spans: for (var j = 0; j < stretchCur.length; ++j) {
          var span = stretchCur[j];

          for (var k = 0; k < oldCur.length; ++k) {
            if (oldCur[k].marker == span.marker) {
              continue spans;
            }
          }

          oldCur.push(span);
        }
      } else if (stretchCur) {
        old[i] = stretchCur;
      }
    }

    return old;
  } // Used both to provide a JSON-safe object in .getHistory, and, when
  // detaching a document, to split the history in two


  function copyHistoryArray(events, newGroup, instantiateSel) {
    var copy = [];

    for (var i = 0; i < events.length; ++i) {
      var event = events[i];

      if (event.ranges) {
        copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);
        continue;
      }

      var changes = event.changes,
          newChanges = [];
      copy.push({
        changes: newChanges
      });

      for (var j = 0; j < changes.length; ++j) {
        var change = changes[j],
            m = void 0;
        newChanges.push({
          from: change.from,
          to: change.to,
          text: change.text
        });

        if (newGroup) {
          for (var prop in change) {
            if (m = prop.match(/^spans_(\d+)$/)) {
              if (indexOf(newGroup, Number(m[1])) > -1) {
                lst(newChanges)[prop] = change[prop];
                delete change[prop];
              }
            }
          }
        }
      }
    }

    return copy;
  } // The 'scroll' parameter given to many of these indicated whether
  // the new cursor position should be scrolled into view after
  // modifying the selection.
  // If shift is held or the extend flag is set, extends a range to
  // include a given position (and optionally a second position).
  // Otherwise, simply returns the range between the given positions.
  // Used for cursor motion and such.


  function extendRange(range, head, other, extend) {
    if (extend) {
      var anchor = range.anchor;

      if (other) {
        var posBefore = cmp(head, anchor) < 0;

        if (posBefore != cmp(other, anchor) < 0) {
          anchor = head;
          head = other;
        } else if (posBefore != cmp(head, other) < 0) {
          head = other;
        }
      }

      return new Range(anchor, head);
    } else {
      return new Range(other || head, head);
    }
  } // Extend the primary selection range, discard the rest.


  function extendSelection(doc, head, other, options, extend) {
    if (extend == null) {
      extend = doc.cm && (doc.cm.display.shift || doc.extend);
    }

    setSelection(doc, new Selection([extendRange(doc.sel.primary(), head, other, extend)], 0), options);
  } // Extend all selections (pos is an array of selections with length
  // equal the number of selections)


  function extendSelections(doc, heads, options) {
    var out = [];
    var extend = doc.cm && (doc.cm.display.shift || doc.extend);

    for (var i = 0; i < doc.sel.ranges.length; i++) {
      out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend);
    }

    var newSel = normalizeSelection(doc.cm, out, doc.sel.primIndex);
    setSelection(doc, newSel, options);
  } // Updates a single range in the selection.


  function replaceOneSelection(doc, i, range, options) {
    var ranges = doc.sel.ranges.slice(0);
    ranges[i] = range;
    setSelection(doc, normalizeSelection(doc.cm, ranges, doc.sel.primIndex), options);
  } // Reset the selection to a single range.


  function setSimpleSelection(doc, anchor, head, options) {
    setSelection(doc, simpleSelection(anchor, head), options);
  } // Give beforeSelectionChange handlers a change to influence a
  // selection update.


  function filterSelectionChange(doc, sel, options) {
    var obj = {
      ranges: sel.ranges,
      update: function update(ranges) {
        this.ranges = [];

        for (var i = 0; i < ranges.length; i++) {
          this.ranges[i] = new Range(_clipPos(doc, ranges[i].anchor), _clipPos(doc, ranges[i].head));
        }
      },
      origin: options && options.origin
    };
    signal(doc, "beforeSelectionChange", doc, obj);

    if (doc.cm) {
      signal(doc.cm, "beforeSelectionChange", doc.cm, obj);
    }

    if (obj.ranges != sel.ranges) {
      return normalizeSelection(doc.cm, obj.ranges, obj.ranges.length - 1);
    } else {
      return sel;
    }
  }

  function setSelectionReplaceHistory(doc, sel, options) {
    var done = doc.history.done,
        last = lst(done);

    if (last && last.ranges) {
      done[done.length - 1] = sel;
      setSelectionNoUndo(doc, sel, options);
    } else {
      setSelection(doc, sel, options);
    }
  } // Set a new selection.


  function setSelection(doc, sel, options) {
    setSelectionNoUndo(doc, sel, options);
    addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options);
  }

  function setSelectionNoUndo(doc, sel, options) {
    if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange")) {
      sel = filterSelectionChange(doc, sel, options);
    }

    var bias = options && options.bias || (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);
    setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));

    if (!(options && options.scroll === false) && doc.cm) {
      ensureCursorVisible(doc.cm);
    }
  }

  function setSelectionInner(doc, sel) {
    if (sel.equals(doc.sel)) {
      return;
    }

    doc.sel = sel;

    if (doc.cm) {
      doc.cm.curOp.updateInput = 1;
      doc.cm.curOp.selectionChanged = true;
      signalCursorActivity(doc.cm);
    }

    signalLater(doc, "cursorActivity", doc);
  } // Verify that the selection does not partially select any atomic
  // marked ranges.


  function reCheckSelection(doc) {
    setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false));
  } // Return a selection that does not partially select any atomic
  // ranges.


  function skipAtomicInSelection(doc, sel, bias, mayClear) {
    var out;

    for (var i = 0; i < sel.ranges.length; i++) {
      var range = sel.ranges[i];
      var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i];
      var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear);
      var newHead = skipAtomic(doc, range.head, old && old.head, bias, mayClear);

      if (out || newAnchor != range.anchor || newHead != range.head) {
        if (!out) {
          out = sel.ranges.slice(0, i);
        }

        out[i] = new Range(newAnchor, newHead);
      }
    }

    return out ? normalizeSelection(doc.cm, out, sel.primIndex) : sel;
  }

  function skipAtomicInner(doc, pos, oldPos, dir, mayClear) {
    var line = getLine(doc, pos.line);

    if (line.markedSpans) {
      for (var i = 0; i < line.markedSpans.length; ++i) {
        var sp = line.markedSpans[i],
            m = sp.marker; // Determine if we should prevent the cursor being placed to the left/right of an atomic marker
        // Historically this was determined using the inclusiveLeft/Right option, but the new way to control it
        // is with selectLeft/Right

        var preventCursorLeft = "selectLeft" in m ? !m.selectLeft : m.inclusiveLeft;
        var preventCursorRight = "selectRight" in m ? !m.selectRight : m.inclusiveRight;

        if ((sp.from == null || (preventCursorLeft ? sp.from <= pos.ch : sp.from < pos.ch)) && (sp.to == null || (preventCursorRight ? sp.to >= pos.ch : sp.to > pos.ch))) {
          if (mayClear) {
            signal(m, "beforeCursorEnter");

            if (m.explicitlyCleared) {
              if (!line.markedSpans) {
                break;
              } else {
                --i;
                continue;
              }
            }
          }

          if (!m.atomic) {
            continue;
          }

          if (oldPos) {
            var near = m.find(dir < 0 ? 1 : -1),
                diff = void 0;

            if (dir < 0 ? preventCursorRight : preventCursorLeft) {
              near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null);
            }

            if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0)) {
              return skipAtomicInner(doc, near, pos, dir, mayClear);
            }
          }

          var far = m.find(dir < 0 ? -1 : 1);

          if (dir < 0 ? preventCursorLeft : preventCursorRight) {
            far = movePos(doc, far, dir, far.line == pos.line ? line : null);
          }

          return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null;
        }
      }
    }

    return pos;
  } // Ensure a given position is not inside an atomic range.


  function skipAtomic(doc, pos, oldPos, bias, mayClear) {
    var dir = bias || 1;
    var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) || !mayClear && skipAtomicInner(doc, pos, oldPos, dir, true) || skipAtomicInner(doc, pos, oldPos, -dir, mayClear) || !mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true);

    if (!found) {
      doc.cantEdit = true;
      return Pos(doc.first, 0);
    }

    return found;
  }

  function movePos(doc, pos, dir, line) {
    if (dir < 0 && pos.ch == 0) {
      if (pos.line > doc.first) {
        return _clipPos(doc, Pos(pos.line - 1));
      } else {
        return null;
      }
    } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) {
      if (pos.line < doc.first + doc.size - 1) {
        return Pos(pos.line + 1, 0);
      } else {
        return null;
      }
    } else {
      return new Pos(pos.line, pos.ch + dir);
    }
  }

  function selectAll(cm) {
    cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);
  } // UPDATING
  // Allow "beforeChange" event handlers to influence a change


  function filterChange(doc, change, update) {
    var obj = {
      canceled: false,
      from: change.from,
      to: change.to,
      text: change.text,
      origin: change.origin,
      cancel: function cancel() {
        return obj.canceled = true;
      }
    };

    if (update) {
      obj.update = function (from, to, text, origin) {
        if (from) {
          obj.from = _clipPos(doc, from);
        }

        if (to) {
          obj.to = _clipPos(doc, to);
        }

        if (text) {
          obj.text = text;
        }

        if (origin !== undefined) {
          obj.origin = origin;
        }
      };
    }

    signal(doc, "beforeChange", doc, obj);

    if (doc.cm) {
      signal(doc.cm, "beforeChange", doc.cm, obj);
    }

    if (obj.canceled) {
      if (doc.cm) {
        doc.cm.curOp.updateInput = 2;
      }

      return null;
    }

    return {
      from: obj.from,
      to: obj.to,
      text: obj.text,
      origin: obj.origin
    };
  } // Apply a change to a document, and add it to the document's
  // history, and propagating it to all linked documents.


  function makeChange(doc, change, ignoreReadOnly) {
    if (doc.cm) {
      if (!doc.cm.curOp) {
        return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly);
      }

      if (doc.cm.state.suppressEdits) {
        return;
      }
    }

    if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) {
      change = filterChange(doc, change, true);

      if (!change) {
        return;
      }
    } // Possibly split or suppress the update based on the presence
    // of read-only spans in its range.


    var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);

    if (split) {
      for (var i = split.length - 1; i >= 0; --i) {
        makeChangeInner(doc, {
          from: split[i].from,
          to: split[i].to,
          text: i ? [""] : change.text,
          origin: change.origin
        });
      }
    } else {
      makeChangeInner(doc, change);
    }
  }

  function makeChangeInner(doc, change) {
    if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) {
      return;
    }

    var selAfter = computeSelAfterChange(doc, change);
    addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);
    makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));
    var rebased = [];
    linkedDocs(doc, function (doc, sharedHist) {
      if (!sharedHist && indexOf(rebased, doc.history) == -1) {
        rebaseHist(doc.history, change);
        rebased.push(doc.history);
      }

      makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));
    });
  } // Revert a change stored in a document's history.


  function makeChangeFromHistory(doc, type, allowSelectionOnly) {
    var suppress = doc.cm && doc.cm.state.suppressEdits;

    if (suppress && !allowSelectionOnly) {
      return;
    }

    var hist = doc.history,
        event,
        selAfter = doc.sel;
    var source = type == "undo" ? hist.done : hist.undone,
        dest = type == "undo" ? hist.undone : hist.done; // Verify that there is a useable event (so that ctrl-z won't
    // needlessly clear selection events)

    var i = 0;

    for (; i < source.length; i++) {
      event = source[i];

      if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges) {
        break;
      }
    }

    if (i == source.length) {
      return;
    }

    hist.lastOrigin = hist.lastSelOrigin = null;

    for (;;) {
      event = source.pop();

      if (event.ranges) {
        pushSelectionToHistory(event, dest);

        if (allowSelectionOnly && !event.equals(doc.sel)) {
          setSelection(doc, event, {
            clearRedo: false
          });
          return;
        }

        selAfter = event;
      } else if (suppress) {
        source.push(event);
        return;
      } else {
        break;
      }
    } // Build up a reverse change object to add to the opposite history
    // stack (redo when undoing, and vice versa).


    var antiChanges = [];
    pushSelectionToHistory(selAfter, dest);
    dest.push({
      changes: antiChanges,
      generation: hist.generation
    });
    hist.generation = event.generation || ++hist.maxGeneration;
    var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange");

    var loop = function loop(i) {
      var change = event.changes[i];
      change.origin = type;

      if (filter && !filterChange(doc, change, false)) {
        source.length = 0;
        return {};
      }

      antiChanges.push(historyChangeFromChange(doc, change));
      var after = i ? computeSelAfterChange(doc, change) : lst(source);
      makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));

      if (!i && doc.cm) {
        doc.cm.scrollIntoView({
          from: change.from,
          to: changeEnd(change)
        });
      }

      var rebased = []; // Propagate to the linked documents

      linkedDocs(doc, function (doc, sharedHist) {
        if (!sharedHist && indexOf(rebased, doc.history) == -1) {
          rebaseHist(doc.history, change);
          rebased.push(doc.history);
        }

        makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));
      });
    };

    for (var i$1 = event.changes.length - 1; i$1 >= 0; --i$1) {
      var returned = loop(i$1);
      if (returned) return returned.v;
    }
  } // Sub-views need their line numbers shifted when text is added
  // above or below them in the parent document.


  function shiftDoc(doc, distance) {
    if (distance == 0) {
      return;
    }

    doc.first += distance;
    doc.sel = new Selection(map(doc.sel.ranges, function (range) {
      return new Range(Pos(range.anchor.line + distance, range.anchor.ch), Pos(range.head.line + distance, range.head.ch));
    }), doc.sel.primIndex);

    if (doc.cm) {
      regChange(doc.cm, doc.first, doc.first - distance, distance);

      for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++) {
        regLineChange(doc.cm, l, "gutter");
      }
    }
  } // More lower-level change function, handling only a single document
  // (not linked ones).


  function makeChangeSingleDoc(doc, change, selAfter, spans) {
    if (doc.cm && !doc.cm.curOp) {
      return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans);
    }

    if (change.to.line < doc.first) {
      shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));
      return;
    }

    if (change.from.line > doc.lastLine()) {
      return;
    } // Clip the change to the size of this doc


    if (change.from.line < doc.first) {
      var shift = change.text.length - 1 - (doc.first - change.from.line);
      shiftDoc(doc, shift);
      change = {
        from: Pos(doc.first, 0),
        to: Pos(change.to.line + shift, change.to.ch),
        text: [lst(change.text)],
        origin: change.origin
      };
    }

    var last = doc.lastLine();

    if (change.to.line > last) {
      change = {
        from: change.from,
        to: Pos(last, getLine(doc, last).text.length),
        text: [change.text[0]],
        origin: change.origin
      };
    }

    change.removed = getBetween(doc, change.from, change.to);

    if (!selAfter) {
      selAfter = computeSelAfterChange(doc, change);
    }

    if (doc.cm) {
      makeChangeSingleDocInEditor(doc.cm, change, spans);
    } else {
      updateDoc(doc, change, spans);
    }

    setSelectionNoUndo(doc, selAfter, sel_dontScroll);

    if (doc.cantEdit && skipAtomic(doc, Pos(doc.firstLine(), 0))) {
      doc.cantEdit = false;
    }
  } // Handle the interaction of a change to a document with the editor
  // that this document is part of.


  function makeChangeSingleDocInEditor(cm, change, spans) {
    var doc = cm.doc,
        display = cm.display,
        from = change.from,
        to = change.to;
    var recomputeMaxLength = false,
        checkWidthStart = from.line;

    if (!cm.options.lineWrapping) {
      checkWidthStart = lineNo(visualLine(getLine(doc, from.line)));
      doc.iter(checkWidthStart, to.line + 1, function (line) {
        if (line == display.maxLine) {
          recomputeMaxLength = true;
          return true;
        }
      });
    }

    if (doc.sel.contains(change.from, change.to) > -1) {
      signalCursorActivity(cm);
    }

    updateDoc(doc, change, spans, estimateHeight(cm));

    if (!cm.options.lineWrapping) {
      doc.iter(checkWidthStart, from.line + change.text.length, function (line) {
        var len = lineLength(line);

        if (len > display.maxLineLength) {
          display.maxLine = line;
          display.maxLineLength = len;
          display.maxLineChanged = true;
          recomputeMaxLength = false;
        }
      });

      if (recomputeMaxLength) {
        cm.curOp.updateMaxLine = true;
      }
    }

    retreatFrontier(doc, from.line);
    startWorker(cm, 400);
    var lendiff = change.text.length - (to.line - from.line) - 1; // Remember that these lines changed, for updating the display

    if (change.full) {
      regChange(cm);
    } else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change)) {
      regLineChange(cm, from.line, "text");
    } else {
      regChange(cm, from.line, to.line + 1, lendiff);
    }

    var changesHandler = hasHandler(cm, "changes"),
        changeHandler = hasHandler(cm, "change");

    if (changeHandler || changesHandler) {
      var obj = {
        from: from,
        to: to,
        text: change.text,
        removed: change.removed,
        origin: change.origin
      };

      if (changeHandler) {
        signalLater(cm, "change", cm, obj);
      }

      if (changesHandler) {
        (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj);
      }
    }

    cm.display.selForContextMenu = null;
  }

  function _replaceRange(doc, code, from, to, origin) {
    var assign;

    if (!to) {
      to = from;
    }

    if (cmp(to, from) < 0) {
      assign = [to, from], from = assign[0], to = assign[1];
    }

    if (typeof code == "string") {
      code = doc.splitLines(code);
    }

    makeChange(doc, {
      from: from,
      to: to,
      text: code,
      origin: origin
    });
  } // Rebasing/resetting history to deal with externally-sourced changes


  function rebaseHistSelSingle(pos, from, to, diff) {
    if (to < pos.line) {
      pos.line += diff;
    } else if (from < pos.line) {
      pos.line = from;
      pos.ch = 0;
    }
  } // Tries to rebase an array of history events given a change in the
  // document. If the change touches the same lines as the event, the
  // event, and everything 'behind' it, is discarded. If the change is
  // before the event, the event's positions are updated. Uses a
  // copy-on-write scheme for the positions, to avoid having to
  // reallocate them all on every rebase, but also avoid problems with
  // shared position objects being unsafely updated.


  function rebaseHistArray(array, from, to, diff) {
    for (var i = 0; i < array.length; ++i) {
      var sub = array[i],
          ok = true;

      if (sub.ranges) {
        if (!sub.copied) {
          sub = array[i] = sub.deepCopy();
          sub.copied = true;
        }

        for (var j = 0; j < sub.ranges.length; j++) {
          rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff);
          rebaseHistSelSingle(sub.ranges[j].head, from, to, diff);
        }

        continue;
      }

      for (var j$1 = 0; j$1 < sub.changes.length; ++j$1) {
        var cur = sub.changes[j$1];

        if (to < cur.from.line) {
          cur.from = Pos(cur.from.line + diff, cur.from.ch);
          cur.to = Pos(cur.to.line + diff, cur.to.ch);
        } else if (from <= cur.to.line) {
          ok = false;
          break;
        }
      }

      if (!ok) {
        array.splice(0, i + 1);
        i = 0;
      }
    }
  }

  function rebaseHist(hist, change) {
    var from = change.from.line,
        to = change.to.line,
        diff = change.text.length - (to - from) - 1;
    rebaseHistArray(hist.done, from, to, diff);
    rebaseHistArray(hist.undone, from, to, diff);
  } // Utility for applying a change to a line by handle or number,
  // returning the number and optionally registering the line as
  // changed.


  function changeLine(doc, handle, changeType, op) {
    var no = handle,
        line = handle;

    if (typeof handle == "number") {
      line = getLine(doc, clipLine(doc, handle));
    } else {
      no = lineNo(handle);
    }

    if (no == null) {
      return null;
    }

    if (op(line, no) && doc.cm) {
      regLineChange(doc.cm, no, changeType);
    }

    return line;
  } // The document is represented as a BTree consisting of leaves, with
  // chunk of lines in them, and branches, with up to ten leaves or
  // other branch nodes below them. The top node is always a branch
  // node, and is the document object itself (meaning it has
  // additional methods and properties).
  //
  // All nodes have parent links. The tree is used both to go from
  // line numbers to line objects, and to go from objects to numbers.
  // It also indexes by height, and is used to convert between height
  // and line object, and to find the total height of the document.
  //
  // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html


  function LeafChunk(lines) {
    this.lines = lines;
    this.parent = null;
    var height = 0;

    for (var i = 0; i < lines.length; ++i) {
      lines[i].parent = this;
      height += lines[i].height;
    }

    this.height = height;
  }

  LeafChunk.prototype = {
    chunkSize: function chunkSize() {
      return this.lines.length;
    },
    // Remove the n lines at offset 'at'.
    removeInner: function removeInner(at, n) {
      for (var i = at, e = at + n; i < e; ++i) {
        var line = this.lines[i];
        this.height -= line.height;
        cleanUpLine(line);
        signalLater(line, "delete");
      }

      this.lines.splice(at, n);
    },
    // Helper used to collapse a small branch into a single leaf.
    collapse: function collapse(lines) {
      lines.push.apply(lines, this.lines);
    },
    // Insert the given array of lines at offset 'at', count them as
    // having the given height.
    insertInner: function insertInner(at, lines, height) {
      this.height += height;
      this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));

      for (var i = 0; i < lines.length; ++i) {
        lines[i].parent = this;
      }
    },
    // Used to iterate over a part of the tree.
    iterN: function iterN(at, n, op) {
      for (var e = at + n; at < e; ++at) {
        if (op(this.lines[at])) {
          return true;
        }
      }
    }
  };

  function BranchChunk(children) {
    this.children = children;
    var size = 0,
        height = 0;

    for (var i = 0; i < children.length; ++i) {
      var ch = children[i];
      size += ch.chunkSize();
      height += ch.height;
      ch.parent = this;
    }

    this.size = size;
    this.height = height;
    this.parent = null;
  }

  BranchChunk.prototype = {
    chunkSize: function chunkSize() {
      return this.size;
    },
    removeInner: function removeInner(at, n) {
      this.size -= n;

      for (var i = 0; i < this.children.length; ++i) {
        var child = this.children[i],
            sz = child.chunkSize();

        if (at < sz) {
          var rm = Math.min(n, sz - at),
              oldHeight = child.height;
          child.removeInner(at, rm);
          this.height -= oldHeight - child.height;

          if (sz == rm) {
            this.children.splice(i--, 1);
            child.parent = null;
          }

          if ((n -= rm) == 0) {
            break;
          }

          at = 0;
        } else {
          at -= sz;
        }
      } // If the result is smaller than 25 lines, ensure that it is a
      // single leaf node.


      if (this.size - n < 25 && (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) {
        var lines = [];
        this.collapse(lines);
        this.children = [new LeafChunk(lines)];
        this.children[0].parent = this;
      }
    },
    collapse: function collapse(lines) {
      for (var i = 0; i < this.children.length; ++i) {
        this.children[i].collapse(lines);
      }
    },
    insertInner: function insertInner(at, lines, height) {
      this.size += lines.length;
      this.height += height;

      for (var i = 0; i < this.children.length; ++i) {
        var child = this.children[i],
            sz = child.chunkSize();

        if (at <= sz) {
          child.insertInner(at, lines, height);

          if (child.lines && child.lines.length > 50) {
            // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced.
            // Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest.
            var remaining = child.lines.length % 25 + 25;

            for (var pos = remaining; pos < child.lines.length;) {
              var leaf = new LeafChunk(child.lines.slice(pos, pos += 25));
              child.height -= leaf.height;
              this.children.splice(++i, 0, leaf);
              leaf.parent = this;
            }

            child.lines = child.lines.slice(0, remaining);
            this.maybeSpill();
          }

          break;
        }

        at -= sz;
      }
    },
    // When a node has grown, check whether it should be split.
    maybeSpill: function maybeSpill() {
      if (this.children.length <= 10) {
        return;
      }

      var me = this;

      do {
        var spilled = me.children.splice(me.children.length - 5, 5);
        var sibling = new BranchChunk(spilled);

        if (!me.parent) {
          // Become the parent node
          var copy = new BranchChunk(me.children);
          copy.parent = me;
          me.children = [copy, sibling];
          me = copy;
        } else {
          me.size -= sibling.size;
          me.height -= sibling.height;
          var myIndex = indexOf(me.parent.children, me);
          me.parent.children.splice(myIndex + 1, 0, sibling);
        }

        sibling.parent = me.parent;
      } while (me.children.length > 10);

      me.parent.maybeSpill();
    },
    iterN: function iterN(at, n, op) {
      for (var i = 0; i < this.children.length; ++i) {
        var child = this.children[i],
            sz = child.chunkSize();

        if (at < sz) {
          var used = Math.min(n, sz - at);

          if (child.iterN(at, used, op)) {
            return true;
          }

          if ((n -= used) == 0) {
            break;
          }

          at = 0;
        } else {
          at -= sz;
        }
      }
    }
  }; // Line widgets are block elements displayed above or below a line.

  var LineWidget = function LineWidget(doc, node, options) {
    if (options) {
      for (var opt in options) {
        if (options.hasOwnProperty(opt)) {
          this[opt] = options[opt];
        }
      }
    }

    this.doc = doc;
    this.node = node;
  };

  LineWidget.prototype.clear = function () {
    var cm = this.doc.cm,
        ws = this.line.widgets,
        line = this.line,
        no = lineNo(line);

    if (no == null || !ws) {
      return;
    }

    for (var i = 0; i < ws.length; ++i) {
      if (ws[i] == this) {
        ws.splice(i--, 1);
      }
    }

    if (!ws.length) {
      line.widgets = null;
    }

    var height = widgetHeight(this);
    updateLineHeight(line, Math.max(0, line.height - height));

    if (cm) {
      runInOp(cm, function () {
        adjustScrollWhenAboveVisible(cm, line, -height);
        regLineChange(cm, no, "widget");
      });
      signalLater(cm, "lineWidgetCleared", cm, this, no);
    }
  };

  LineWidget.prototype.changed = function () {
    var this$1 = this;
    var oldH = this.height,
        cm = this.doc.cm,
        line = this.line;
    this.height = null;
    var diff = widgetHeight(this) - oldH;

    if (!diff) {
      return;
    }

    if (!lineIsHidden(this.doc, line)) {
      updateLineHeight(line, line.height + diff);
    }

    if (cm) {
      runInOp(cm, function () {
        cm.curOp.forceUpdate = true;
        adjustScrollWhenAboveVisible(cm, line, diff);
        signalLater(cm, "lineWidgetChanged", cm, this$1, lineNo(line));
      });
    }
  };

  eventMixin(LineWidget);

  function adjustScrollWhenAboveVisible(cm, line, diff) {
    if (_heightAtLine(line) < (cm.curOp && cm.curOp.scrollTop || cm.doc.scrollTop)) {
      addToScrollTop(cm, diff);
    }
  }

  function addLineWidget(doc, handle, node, options) {
    var widget = new LineWidget(doc, node, options);
    var cm = doc.cm;

    if (cm && widget.noHScroll) {
      cm.display.alignWidgets = true;
    }

    changeLine(doc, handle, "widget", function (line) {
      var widgets = line.widgets || (line.widgets = []);

      if (widget.insertAt == null) {
        widgets.push(widget);
      } else {
        widgets.splice(Math.min(widgets.length, Math.max(0, widget.insertAt)), 0, widget);
      }

      widget.line = line;

      if (cm && !lineIsHidden(doc, line)) {
        var aboveVisible = _heightAtLine(line) < doc.scrollTop;
        updateLineHeight(line, line.height + widgetHeight(widget));

        if (aboveVisible) {
          addToScrollTop(cm, widget.height);
        }

        cm.curOp.forceUpdate = true;
      }

      return true;
    });

    if (cm) {
      signalLater(cm, "lineWidgetAdded", cm, widget, typeof handle == "number" ? handle : lineNo(handle));
    }

    return widget;
  } // TEXTMARKERS
  // Created with markText and setBookmark methods. A TextMarker is a
  // handle that can be used to clear or find a marked position in the
  // document. Line objects hold arrays (markedSpans) containing
  // {from, to, marker} object pointing to such marker objects, and
  // indicating that such a marker is present on that line. Multiple
  // lines may point to the same marker when it spans across lines.
  // The spans will have null for their from/to properties when the
  // marker continues beyond the start/end of the line. Markers have
  // links back to the lines they currently touch.
  // Collapsed markers have unique ids, in order to be able to order
  // them, which is needed for uniquely determining an outer marker
  // when they overlap (they may nest, but not partially overlap).


  var nextMarkerId = 0;

  var TextMarker = function TextMarker(doc, type) {
    this.lines = [];
    this.type = type;
    this.doc = doc;
    this.id = ++nextMarkerId;
  }; // Clear the marker.


  TextMarker.prototype.clear = function () {
    if (this.explicitlyCleared) {
      return;
    }

    var cm = this.doc.cm,
        withOp = cm && !cm.curOp;

    if (withOp) {
      _startOperation(cm);
    }

    if (hasHandler(this, "clear")) {
      var found = this.find();

      if (found) {
        signalLater(this, "clear", found.from, found.to);
      }
    }

    var min = null,
        max = null;

    for (var i = 0; i < this.lines.length; ++i) {
      var line = this.lines[i];
      var span = getMarkedSpanFor(line.markedSpans, this);

      if (cm && !this.collapsed) {
        regLineChange(cm, lineNo(line), "text");
      } else if (cm) {
        if (span.to != null) {
          max = lineNo(line);
        }

        if (span.from != null) {
          min = lineNo(line);
        }
      }

      line.markedSpans = removeMarkedSpan(line.markedSpans, span);

      if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm) {
        updateLineHeight(line, textHeight(cm.display));
      }
    }

    if (cm && this.collapsed && !cm.options.lineWrapping) {
      for (var i$1 = 0; i$1 < this.lines.length; ++i$1) {
        var visual = visualLine(this.lines[i$1]),
            len = lineLength(visual);

        if (len > cm.display.maxLineLength) {
          cm.display.maxLine = visual;
          cm.display.maxLineLength = len;
          cm.display.maxLineChanged = true;
        }
      }
    }

    if (min != null && cm && this.collapsed) {
      regChange(cm, min, max + 1);
    }

    this.lines.length = 0;
    this.explicitlyCleared = true;

    if (this.atomic && this.doc.cantEdit) {
      this.doc.cantEdit = false;

      if (cm) {
        reCheckSelection(cm.doc);
      }
    }

    if (cm) {
      signalLater(cm, "markerCleared", cm, this, min, max);
    }

    if (withOp) {
      _endOperation(cm);
    }

    if (this.parent) {
      this.parent.clear();
    }
  }; // Find the position of the marker in the document. Returns a {from,
  // to} object by default. Side can be passed to get a specific side
  // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the
  // Pos objects returned contain a line object, rather than a line
  // number (used to prevent looking up the same line twice).


  TextMarker.prototype.find = function (side, lineObj) {
    if (side == null && this.type == "bookmark") {
      side = 1;
    }

    var from, to;

    for (var i = 0; i < this.lines.length; ++i) {
      var line = this.lines[i];
      var span = getMarkedSpanFor(line.markedSpans, this);

      if (span.from != null) {
        from = Pos(lineObj ? line : lineNo(line), span.from);

        if (side == -1) {
          return from;
        }
      }

      if (span.to != null) {
        to = Pos(lineObj ? line : lineNo(line), span.to);

        if (side == 1) {
          return to;
        }
      }
    }

    return from && {
      from: from,
      to: to
    };
  }; // Signals that the marker's widget changed, and surrounding layout
  // should be recomputed.


  TextMarker.prototype.changed = function () {
    var this$1 = this;
    var pos = this.find(-1, true),
        widget = this,
        cm = this.doc.cm;

    if (!pos || !cm) {
      return;
    }

    runInOp(cm, function () {
      var line = pos.line,
          lineN = lineNo(pos.line);
      var view = findViewForLine(cm, lineN);

      if (view) {
        clearLineMeasurementCacheFor(view);
        cm.curOp.selectionChanged = cm.curOp.forceUpdate = true;
      }

      cm.curOp.updateMaxLine = true;

      if (!lineIsHidden(widget.doc, line) && widget.height != null) {
        var oldHeight = widget.height;
        widget.height = null;
        var dHeight = widgetHeight(widget) - oldHeight;

        if (dHeight) {
          updateLineHeight(line, line.height + dHeight);
        }
      }

      signalLater(cm, "markerChanged", cm, this$1);
    });
  };

  TextMarker.prototype.attachLine = function (line) {
    if (!this.lines.length && this.doc.cm) {
      var op = this.doc.cm.curOp;

      if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1) {
        (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this);
      }
    }

    this.lines.push(line);
  };

  TextMarker.prototype.detachLine = function (line) {
    this.lines.splice(indexOf(this.lines, line), 1);

    if (!this.lines.length && this.doc.cm) {
      var op = this.doc.cm.curOp;
      (op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);
    }
  };

  eventMixin(TextMarker); // Create a marker, wire it up to the right lines, and

  function _markText(doc, from, to, options, type) {
    // Shared markers (across linked documents) are handled separately
    // (markTextShared will call out to this again, once per
    // document).
    if (options && options.shared) {
      return markTextShared(doc, from, to, options, type);
    } // Ensure we are in an operation.


    if (doc.cm && !doc.cm.curOp) {
      return operation(doc.cm, _markText)(doc, from, to, options, type);
    }

    var marker = new TextMarker(doc, type),
        diff = cmp(from, to);

    if (options) {
      copyObj(options, marker, false);
    } // Don't connect empty markers unless clearWhenEmpty is false


    if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false) {
      return marker;
    }

    if (marker.replacedWith) {
      // Showing up as a widget implies collapsed (widget replaces text)
      marker.collapsed = true;
      marker.widgetNode = eltP("span", [marker.replacedWith], "CodeMirror-widget");

      if (!options.handleMouseEvents) {
        marker.widgetNode.setAttribute("cm-ignore-events", "true");
      }

      if (options.insertLeft) {
        marker.widgetNode.insertLeft = true;
      }
    }

    if (marker.collapsed) {
      if (conflictingCollapsedRange(doc, from.line, from, to, marker) || from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker)) {
        throw new Error("Inserting collapsed marker partially overlapping an existing one");
      }

      seeCollapsedSpans();
    }

    if (marker.addToHistory) {
      addChangeToHistory(doc, {
        from: from,
        to: to,
        origin: "markText"
      }, doc.sel, NaN);
    }

    var curLine = from.line,
        cm = doc.cm,
        updateMaxLine;
    doc.iter(curLine, to.line + 1, function (line) {
      if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine) {
        updateMaxLine = true;
      }

      if (marker.collapsed && curLine != from.line) {
        updateLineHeight(line, 0);
      }

      addMarkedSpan(line, new MarkedSpan(marker, curLine == from.line ? from.ch : null, curLine == to.line ? to.ch : null));
      ++curLine;
    }); // lineIsHidden depends on the presence of the spans, so needs a second pass

    if (marker.collapsed) {
      doc.iter(from.line, to.line + 1, function (line) {
        if (lineIsHidden(doc, line)) {
          updateLineHeight(line, 0);
        }
      });
    }

    if (marker.clearOnEnter) {
      on(marker, "beforeCursorEnter", function () {
        return marker.clear();
      });
    }

    if (marker.readOnly) {
      seeReadOnlySpans();

      if (doc.history.done.length || doc.history.undone.length) {
        doc.clearHistory();
      }
    }

    if (marker.collapsed) {
      marker.id = ++nextMarkerId;
      marker.atomic = true;
    }

    if (cm) {
      // Sync editor state
      if (updateMaxLine) {
        cm.curOp.updateMaxLine = true;
      }

      if (marker.collapsed) {
        regChange(cm, from.line, to.line + 1);
      } else if (marker.className || marker.startStyle || marker.endStyle || marker.css || marker.attributes || marker.title) {
        for (var i = from.line; i <= to.line; i++) {
          regLineChange(cm, i, "text");
        }
      }

      if (marker.atomic) {
        reCheckSelection(cm.doc);
      }

      signalLater(cm, "markerAdded", cm, marker);
    }

    return marker;
  } // SHARED TEXTMARKERS
  // A shared marker spans multiple linked documents. It is
  // implemented as a meta-marker-object controlling multiple normal
  // markers.


  var SharedTextMarker = function SharedTextMarker(markers, primary) {
    this.markers = markers;
    this.primary = primary;

    for (var i = 0; i < markers.length; ++i) {
      markers[i].parent = this;
    }
  };

  SharedTextMarker.prototype.clear = function () {
    if (this.explicitlyCleared) {
      return;
    }

    this.explicitlyCleared = true;

    for (var i = 0; i < this.markers.length; ++i) {
      this.markers[i].clear();
    }

    signalLater(this, "clear");
  };

  SharedTextMarker.prototype.find = function (side, lineObj) {
    return this.primary.find(side, lineObj);
  };

  eventMixin(SharedTextMarker);

  function markTextShared(doc, from, to, options, type) {
    options = copyObj(options);
    options.shared = false;
    var markers = [_markText(doc, from, to, options, type)],
        primary = markers[0];
    var widget = options.widgetNode;
    linkedDocs(doc, function (doc) {
      if (widget) {
        options.widgetNode = widget.cloneNode(true);
      }

      markers.push(_markText(doc, _clipPos(doc, from), _clipPos(doc, to), options, type));

      for (var i = 0; i < doc.linked.length; ++i) {
        if (doc.linked[i].isParent) {
          return;
        }
      }

      primary = lst(markers);
    });
    return new SharedTextMarker(markers, primary);
  }

  function findSharedMarkers(doc) {
    return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), function (m) {
      return m.parent;
    });
  }

  function copySharedMarkers(doc, markers) {
    for (var i = 0; i < markers.length; i++) {
      var marker = markers[i],
          pos = marker.find();
      var mFrom = doc.clipPos(pos.from),
          mTo = doc.clipPos(pos.to);

      if (cmp(mFrom, mTo)) {
        var subMark = _markText(doc, mFrom, mTo, marker.primary, marker.primary.type);

        marker.markers.push(subMark);
        subMark.parent = marker;
      }
    }
  }

  function detachSharedMarkers(markers) {
    var loop = function loop(i) {
      var marker = markers[i],
          linked = [marker.primary.doc];
      linkedDocs(marker.primary.doc, function (d) {
        return linked.push(d);
      });

      for (var j = 0; j < marker.markers.length; j++) {
        var subMarker = marker.markers[j];

        if (indexOf(linked, subMarker.doc) == -1) {
          subMarker.parent = null;
          marker.markers.splice(j--, 1);
        }
      }
    };

    for (var i = 0; i < markers.length; i++) {
      loop(i);
    }
  }

  var nextDocId = 0;

  var Doc = function Doc(text, mode, firstLine, lineSep, direction) {
    if (!(this instanceof Doc)) {
      return new Doc(text, mode, firstLine, lineSep, direction);
    }

    if (firstLine == null) {
      firstLine = 0;
    }

    BranchChunk.call(this, [new LeafChunk([new Line("", null)])]);
    this.first = firstLine;
    this.scrollTop = this.scrollLeft = 0;
    this.cantEdit = false;
    this.cleanGeneration = 1;
    this.modeFrontier = this.highlightFrontier = firstLine;
    var start = Pos(firstLine, 0);
    this.sel = simpleSelection(start);
    this.history = new History(null);
    this.id = ++nextDocId;
    this.modeOption = mode;
    this.lineSep = lineSep;
    this.direction = direction == "rtl" ? "rtl" : "ltr";
    this.extend = false;

    if (typeof text == "string") {
      text = this.splitLines(text);
    }

    updateDoc(this, {
      from: start,
      to: start,
      text: text
    });
    setSelection(this, simpleSelection(start), sel_dontScroll);
  };

  Doc.prototype = createObj(BranchChunk.prototype, {
    constructor: Doc,
    // Iterate over the document. Supports two forms -- with only one
    // argument, it calls that for each line in the document. With
    // three, it iterates over the range given by the first two (with
    // the second being non-inclusive).
    iter: function iter(from, to, op) {
      if (op) {
        this.iterN(from - this.first, to - from, op);
      } else {
        this.iterN(this.first, this.first + this.size, from);
      }
    },
    // Non-public interface for adding and removing lines.
    insert: function insert(at, lines) {
      var height = 0;

      for (var i = 0; i < lines.length; ++i) {
        height += lines[i].height;
      }

      this.insertInner(at - this.first, lines, height);
    },
    remove: function remove(at, n) {
      this.removeInner(at - this.first, n);
    },
    // From here, the methods are part of the public interface. Most
    // are also available from CodeMirror (editor) instances.
    getValue: function getValue(lineSep) {
      var lines = getLines(this, this.first, this.first + this.size);

      if (lineSep === false) {
        return lines;
      }

      return lines.join(lineSep || this.lineSeparator());
    },
    setValue: docMethodOp(function (code) {
      var top = Pos(this.first, 0),
          last = this.first + this.size - 1;
      makeChange(this, {
        from: top,
        to: Pos(last, getLine(this, last).text.length),
        text: this.splitLines(code),
        origin: "setValue",
        full: true
      }, true);

      if (this.cm) {
        scrollToCoords(this.cm, 0, 0);
      }

      setSelection(this, simpleSelection(top), sel_dontScroll);
    }),
    replaceRange: function replaceRange(code, from, to, origin) {
      from = _clipPos(this, from);
      to = to ? _clipPos(this, to) : from;

      _replaceRange(this, code, from, to, origin);
    },
    getRange: function getRange(from, to, lineSep) {
      var lines = getBetween(this, _clipPos(this, from), _clipPos(this, to));

      if (lineSep === false) {
        return lines;
      }

      return lines.join(lineSep || this.lineSeparator());
    },

    /*修改codemirror代码*/
    newRange: function newRange(anchor, head) {
      return new Range(anchor, head);
    },
    getLine: function getLine(line) {
      var l = this.getLineHandle(line);
      return l && l.text;
    },
    getLineHandle: function getLineHandle(line) {
      if (isLine(this, line)) {
        return getLine(this, line);
      }
    },
    getLineNumber: function getLineNumber(line) {
      return lineNo(line);
    },
    getLineHandleVisualStart: function getLineHandleVisualStart(line) {
      if (typeof line == "number") {
        line = getLine(this, line);
      }

      return visualLine(line);
    },
    lineCount: function lineCount() {
      return this.size;
    },
    firstLine: function firstLine() {
      return this.first;
    },
    lastLine: function lastLine() {
      return this.first + this.size - 1;
    },
    clipPos: function clipPos(pos) {
      return _clipPos(this, pos);
    },
    getCursor: function getCursor(start) {
      var range = this.sel.primary(),
          pos;

      if (start == null || start == "head") {
        pos = range.head;
      } else if (start == "anchor") {
        pos = range.anchor;
      } else if (start == "end" || start == "to" || start === false) {
        pos = range.to();
      } else {
        pos = range.from();
      }

      return pos;
    },
    listSelections: function listSelections() {
      return this.sel.ranges;
    },
    somethingSelected: function somethingSelected() {
      return this.sel.somethingSelected();
    },
    setCursor: docMethodOp(function (line, ch, options) {
      setSimpleSelection(this, _clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line), null, options);
    }),
    setSelection: docMethodOp(function (anchor, head, options) {
      setSimpleSelection(this, _clipPos(this, anchor), _clipPos(this, head || anchor), options);
    }),
    extendSelection: docMethodOp(function (head, other, options) {
      extendSelection(this, _clipPos(this, head), other && _clipPos(this, other), options);
    }),
    extendSelections: docMethodOp(function (heads, options) {
      extendSelections(this, clipPosArray(this, heads), options);
    }),
    extendSelectionsBy: docMethodOp(function (f, options) {
      var heads = map(this.sel.ranges, f);
      extendSelections(this, clipPosArray(this, heads), options);
    }),
    setSelections: docMethodOp(function (ranges, primary, options) {
      if (!ranges.length) {
        return;
      }

      var out = [];

      for (var i = 0; i < ranges.length; i++) {
        out[i] = new Range(_clipPos(this, ranges[i].anchor), _clipPos(this, ranges[i].head));
      }

      if (primary == null) {
        primary = Math.min(ranges.length - 1, this.sel.primIndex);
      }

      setSelection(this, normalizeSelection(this.cm, out, primary), options);
    }),
    addSelection: docMethodOp(function (anchor, head, options) {
      var ranges = this.sel.ranges.slice(0);
      ranges.push(new Range(_clipPos(this, anchor), _clipPos(this, head || anchor)));
      setSelection(this, normalizeSelection(this.cm, ranges, ranges.length - 1), options);
    }),
    getSelection: function getSelection(lineSep) {
      var ranges = this.sel.ranges,
          lines;

      for (var i = 0; i < ranges.length; i++) {
        var sel = getBetween(this, ranges[i].from(), ranges[i].to());
        lines = lines ? lines.concat(sel) : sel;
      }

      if (lineSep === false) {
        return lines;
      } else {
        return lines.join(lineSep || this.lineSeparator());
      }
    },
    getSelections: function getSelections(lineSep) {
      var parts = [],
          ranges = this.sel.ranges;

      for (var i = 0; i < ranges.length; i++) {
        var sel = getBetween(this, ranges[i].from(), ranges[i].to());

        if (lineSep !== false) {
          sel = sel.join(lineSep || this.lineSeparator());
        }

        parts[i] = sel;
      }

      return parts;
    },
    replaceSelection: function replaceSelection(code, collapse, origin) {
      var dup = [];

      for (var i = 0; i < this.sel.ranges.length; i++) {
        dup[i] = code;
      }

      this.replaceSelections(dup, collapse, origin || "+input");
    },
    replaceSelections: docMethodOp(function (code, collapse, origin) {
      var changes = [],
          sel = this.sel;

      for (var i = 0; i < sel.ranges.length; i++) {
        var range = sel.ranges[i];
        changes[i] = {
          from: range.from(),
          to: range.to(),
          text: this.splitLines(code[i]),
          origin: origin
        };
      }

      var newSel = collapse && collapse != "end" && computeReplacedSel(this, changes, collapse);

      for (var i$1 = changes.length - 1; i$1 >= 0; i$1--) {
        makeChange(this, changes[i$1]);
      }

      if (newSel) {
        setSelectionReplaceHistory(this, newSel);
      } else if (this.cm) {
        ensureCursorVisible(this.cm);
      }
    }),
    undo: docMethodOp(function () {
      makeChangeFromHistory(this, "undo");
    }),
    redo: docMethodOp(function () {
      makeChangeFromHistory(this, "redo");
    }),
    undoSelection: docMethodOp(function () {
      makeChangeFromHistory(this, "undo", true);
    }),
    redoSelection: docMethodOp(function () {
      makeChangeFromHistory(this, "redo", true);
    }),
    setExtending: function setExtending(val) {
      this.extend = val;
    },
    getExtending: function getExtending() {
      return this.extend;
    },
    historySize: function historySize() {
      var hist = this.history,
          done = 0,
          undone = 0;

      for (var i = 0; i < hist.done.length; i++) {
        if (!hist.done[i].ranges) {
          ++done;
        }
      }

      for (var i$1 = 0; i$1 < hist.undone.length; i$1++) {
        if (!hist.undone[i$1].ranges) {
          ++undone;
        }
      }

      return {
        undo: done,
        redo: undone
      };
    },
    clearHistory: function clearHistory() {
      var this$1 = this;
      this.history = new History(this.history.maxGeneration);
      linkedDocs(this, function (doc) {
        return doc.history = this$1.history;
      }, true);
    },
    markClean: function markClean() {
      this.cleanGeneration = this.changeGeneration(true);
    },
    changeGeneration: function changeGeneration(forceSplit) {
      if (forceSplit) {
        this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null;
      }

      return this.history.generation;
    },
    isClean: function isClean(gen) {
      return this.history.generation == (gen || this.cleanGeneration);
    },
    getHistory: function getHistory() {
      return {
        done: copyHistoryArray(this.history.done),
        undone: copyHistoryArray(this.history.undone)
      };
    },
    setHistory: function setHistory(histData) {
      var hist = this.history = new History(this.history.maxGeneration);
      hist.done = copyHistoryArray(histData.done.slice(0), null, true);
      hist.undone = copyHistoryArray(histData.undone.slice(0), null, true);
    },
    setGutterMarker: docMethodOp(function (line, gutterID, value) {
      return changeLine(this, line, "gutter", function (line) {
        var markers = line.gutterMarkers || (line.gutterMarkers = {});
        markers[gutterID] = value;

        if (!value && isEmpty(markers)) {
          line.gutterMarkers = null;
        }

        return true;
      });
    }),
    clearGutter: docMethodOp(function (gutterID) {
      var this$1 = this;
      this.iter(function (line) {
        if (line.gutterMarkers && line.gutterMarkers[gutterID]) {
          changeLine(this$1, line, "gutter", function () {
            line.gutterMarkers[gutterID] = null;

            if (isEmpty(line.gutterMarkers)) {
              line.gutterMarkers = null;
            }

            return true;
          });
        }
      });
    }),
    lineInfo: function lineInfo(line) {
      var n;

      if (typeof line == "number") {
        if (!isLine(this, line)) {
          return null;
        }

        n = line;
        line = getLine(this, line);

        if (!line) {
          return null;
        }
      } else {
        n = lineNo(line);

        if (n == null) {
          return null;
        }
      }

      return {
        line: n,
        handle: line,
        text: line.text,
        gutterMarkers: line.gutterMarkers,
        textClass: line.textClass,
        bgClass: line.bgClass,
        wrapClass: line.wrapClass,
        widgets: line.widgets
      };
    },
    addLineClass: docMethodOp(function (handle, where, cls) {
      return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function (line) {
        var prop = where == "text" ? "textClass" : where == "background" ? "bgClass" : where == "gutter" ? "gutterClass" : "wrapClass";

        if (!line[prop]) {
          line[prop] = cls;
        } else if (classTest(cls).test(line[prop])) {
          return false;
        } else {
          line[prop] += " " + cls;
        }

        return true;
      });
    }),
    removeLineClass: docMethodOp(function (handle, where, cls) {
      return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function (line) {
        var prop = where == "text" ? "textClass" : where == "background" ? "bgClass" : where == "gutter" ? "gutterClass" : "wrapClass";
        var cur = line[prop];

        if (!cur) {
          return false;
        } else if (cls == null) {
          line[prop] = null;
        } else {
          var found = cur.match(classTest(cls));

          if (!found) {
            return false;
          }

          var end = found.index + found[0].length;
          line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null;
        }

        return true;
      });
    }),
    addLineWidget: docMethodOp(function (handle, node, options) {
      return addLineWidget(this, handle, node, options);
    }),
    removeLineWidget: function removeLineWidget(widget) {
      widget.clear();
    },
    markText: function markText(from, to, options) {
      return _markText(this, _clipPos(this, from), _clipPos(this, to), options, options && options.type || "range");
    },
    setBookmark: function setBookmark(pos, options) {
      var realOpts = {
        replacedWith: options && (options.nodeType == null ? options.widget : options),
        insertLeft: options && options.insertLeft,
        clearWhenEmpty: false,
        shared: options && options.shared,
        handleMouseEvents: options && options.handleMouseEvents
      };
      pos = _clipPos(this, pos);
      return _markText(this, pos, pos, realOpts, "bookmark");
    },
    findMarksAt: function findMarksAt(pos) {
      pos = _clipPos(this, pos);
      var markers = [],
          spans = getLine(this, pos.line).markedSpans;

      if (spans) {
        for (var i = 0; i < spans.length; ++i) {
          var span = spans[i];

          if ((span.from == null || span.from <= pos.ch) && (span.to == null || span.to >= pos.ch)) {
            markers.push(span.marker.parent || span.marker);
          }
        }
      }

      return markers;
    },
    findMarks: function findMarks(from, to, filter) {
      from = _clipPos(this, from);
      to = _clipPos(this, to);
      var found = [],
          lineNo = from.line;
      this.iter(from.line, to.line + 1, function (line) {
        var spans = line.markedSpans;

        if (spans) {
          for (var i = 0; i < spans.length; i++) {
            var span = spans[i];

            if (!(span.to != null && lineNo == from.line && from.ch >= span.to || span.from == null && lineNo != from.line || span.from != null && lineNo == to.line && span.from >= to.ch) && (!filter || filter(span.marker))) {
              found.push(span.marker.parent || span.marker);
            }
          }
        }

        ++lineNo;
      });
      return found;
    },
    getAllMarks: function getAllMarks() {
      var markers = [];
      this.iter(function (line) {
        var sps = line.markedSpans;

        if (sps) {
          for (var i = 0; i < sps.length; ++i) {
            if (sps[i].from != null) {
              markers.push(sps[i].marker);
            }
          }
        }
      });
      return markers;
    },
    posFromIndex: function posFromIndex(off) {
      var ch,
          lineNo = this.first,
          sepSize = this.lineSeparator().length;
      this.iter(function (line) {
        var sz = line.text.length + sepSize;

        if (sz > off) {
          ch = off;
          return true;
        }

        off -= sz;
        ++lineNo;
      });
      return _clipPos(this, Pos(lineNo, ch));
    },
    indexFromPos: function indexFromPos(coords) {
      coords = _clipPos(this, coords);
      var index = coords.ch;

      if (coords.line < this.first || coords.ch < 0) {
        return 0;
      }

      var sepSize = this.lineSeparator().length;
      this.iter(this.first, coords.line, function (line) {
        // iter aborts when callback returns a truthy value
        index += line.text.length + sepSize;
      });
      return index;
    },
    copy: function copy(copyHistory) {
      var doc = new Doc(getLines(this, this.first, this.first + this.size), this.modeOption, this.first, this.lineSep, this.direction);
      doc.scrollTop = this.scrollTop;
      doc.scrollLeft = this.scrollLeft;
      doc.sel = this.sel;
      doc.extend = false;

      if (copyHistory) {
        doc.history.undoDepth = this.history.undoDepth;
        doc.setHistory(this.getHistory());
      }

      return doc;
    },
    linkedDoc: function linkedDoc(options) {
      if (!options) {
        options = {};
      }

      var from = this.first,
          to = this.first + this.size;

      if (options.from != null && options.from > from) {
        from = options.from;
      }

      if (options.to != null && options.to < to) {
        to = options.to;
      }

      var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep, this.direction);

      if (options.sharedHist) {
        copy.history = this.history;
      }

      (this.linked || (this.linked = [])).push({
        doc: copy,
        sharedHist: options.sharedHist
      });
      copy.linked = [{
        doc: this,
        isParent: true,
        sharedHist: options.sharedHist
      }];
      copySharedMarkers(copy, findSharedMarkers(this));
      return copy;
    },
    unlinkDoc: function unlinkDoc(other) {
      if (other instanceof CodeMirror) {
        other = other.doc;
      }

      if (this.linked) {
        for (var i = 0; i < this.linked.length; ++i) {
          var link = this.linked[i];

          if (link.doc != other) {
            continue;
          }

          this.linked.splice(i, 1);
          other.unlinkDoc(this);
          detachSharedMarkers(findSharedMarkers(this));
          break;
        }
      } // If the histories were shared, split them again


      if (other.history == this.history) {
        var splitIds = [other.id];
        linkedDocs(other, function (doc) {
          return splitIds.push(doc.id);
        }, true);
        other.history = new History(null);
        other.history.done = copyHistoryArray(this.history.done, splitIds);
        other.history.undone = copyHistoryArray(this.history.undone, splitIds);
      }
    },
    iterLinkedDocs: function iterLinkedDocs(f) {
      linkedDocs(this, f);
    },
    getMode: function getMode() {
      return this.mode;
    },
    getEditor: function getEditor() {
      return this.cm;
    },
    splitLines: function splitLines(str) {
      if (this.lineSep) {
        return str.split(this.lineSep);
      }

      return splitLinesAuto(str);
    },
    lineSeparator: function lineSeparator() {
      return this.lineSep || "\n";
    },
    setDirection: docMethodOp(function (dir) {
      if (dir != "rtl") {
        dir = "ltr";
      }

      if (dir == this.direction) {
        return;
      }

      this.direction = dir;
      this.iter(function (line) {
        return line.order = null;
      });

      if (this.cm) {
        directionChanged(this.cm);
      }
    })
  }); // Public alias.

  Doc.prototype.eachLine = Doc.prototype.iter; // Kludge to work around strange IE behavior where it'll sometimes
  // re-fire a series of drag-related events right after the drop (#1551)

  var lastDrop = 0;

  function onDrop(e) {
    var cm = this;
    clearDragCursor(cm);

    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) {
      return;
    }

    e_preventDefault(e);

    if (ie) {
      lastDrop = +new Date();
    }

    var pos = posFromMouse(cm, e, true),
        files = e.dataTransfer.files;

    if (!pos || cm.isReadOnly()) {
      return;
    } // Might be a file drop, in which case we simply extract the text
    // and insert it.


    if (files && files.length && window.FileReader && window.File) {
      var n = files.length,
          text = Array(n),
          read = 0;

      var markAsReadAndPasteIfAllFilesAreRead = function markAsReadAndPasteIfAllFilesAreRead() {
        if (++read == n) {
          operation(cm, function () {
            pos = _clipPos(cm.doc, pos);
            var change = {
              from: pos,
              to: pos,
              text: cm.doc.splitLines(text.filter(function (t) {
                return t != null;
              }).join(cm.doc.lineSeparator())),
              origin: "paste"
            };
            makeChange(cm.doc, change);
            setSelectionReplaceHistory(cm.doc, simpleSelection(_clipPos(cm.doc, pos), _clipPos(cm.doc, changeEnd(change))));
          })();
        }
      };

      var readTextFromFile = function readTextFromFile(file, i) {
        if (cm.options.allowDropFileTypes && indexOf(cm.options.allowDropFileTypes, file.type) == -1) {
          markAsReadAndPasteIfAllFilesAreRead();
          return;
        }

        var reader = new FileReader();

        reader.onerror = function () {
          return markAsReadAndPasteIfAllFilesAreRead();
        };

        reader.onload = function () {
          var content = reader.result;

          if (/[\x00-\x08\x0e-\x1f]{2}/.test(content)) {
            markAsReadAndPasteIfAllFilesAreRead();
            return;
          }

          text[i] = content;
          markAsReadAndPasteIfAllFilesAreRead();
        };

        reader.readAsText(file);
      };

      for (var i = 0; i < files.length; i++) {
        readTextFromFile(files[i], i);
      }
    } else {
      // Normal drop
      // Don't do a replace if the drop happened inside of the selected text.
      if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {
        cm.state.draggingText(e); // Ensure the editor is re-focused

        setTimeout(function () {
          return cm.display.input.focus();
        }, 20);
        return;
      }

      try {
        var text$1 = e.dataTransfer.getData("Text");

        if (text$1) {
          var selected;

          if (cm.state.draggingText && !cm.state.draggingText.copy) {
            selected = cm.listSelections();
          }

          setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));

          if (selected) {
            for (var i$1 = 0; i$1 < selected.length; ++i$1) {
              _replaceRange(cm.doc, "", selected[i$1].anchor, selected[i$1].head, "drag");
            }
          }

          cm.replaceSelection(text$1, "around", "paste");
          cm.display.input.focus();
        }
      } catch (e$1) {}
    }
  }

  function onDragStart(cm, e) {
    if (ie && (!cm.state.draggingText || +new Date() - lastDrop < 100)) {
      e_stop(e);
      return;
    }

    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) {
      return;
    }

    e.dataTransfer.setData("Text", cm.getSelection());
    e.dataTransfer.effectAllowed = "copyMove"; // Use dummy image instead of default browsers image.
    // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.

    if (e.dataTransfer.setDragImage && !safari) {
      var img = elt("img", null, null, "position: fixed; left: 0; top: 0;");
      img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";

      if (presto) {
        img.width = img.height = 1;
        cm.display.wrapper.appendChild(img); // Force a relayout, or Opera won't use our image for some obscure reason

        img._top = img.offsetTop;
      }

      e.dataTransfer.setDragImage(img, 0, 0);

      if (presto) {
        img.parentNode.removeChild(img);
      }
    }
  }

  function onDragOver(cm, e) {
    var pos = posFromMouse(cm, e);

    if (!pos) {
      return;
    }

    var frag = document.createDocumentFragment();
    drawSelectionCursor(cm, pos, frag);

    if (!cm.display.dragCursor) {
      cm.display.dragCursor = elt("div", null, "CodeMirror-cursors CodeMirror-dragcursors");
      cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv);
    }

    removeChildrenAndAdd(cm.display.dragCursor, frag);
  }

  function clearDragCursor(cm) {
    if (cm.display.dragCursor) {
      cm.display.lineSpace.removeChild(cm.display.dragCursor);
      cm.display.dragCursor = null;
    }
  } // These must be handled carefully, because naively registering a
  // handler for each editor will cause the editors to never be
  // garbage collected.


  function forEachCodeMirror(f) {
    if (!document.getElementsByClassName) {
      return;
    }

    var byClass = document.getElementsByClassName("CodeMirror"),
        editors = [];

    for (var i = 0; i < byClass.length; i++) {
      var cm = byClass[i].CodeMirror;

      if (cm) {
        editors.push(cm);
      }
    }

    if (editors.length) {
      editors[0].operation(function () {
        for (var i = 0; i < editors.length; i++) {
          f(editors[i]);
        }
      });
    }
  }

  var globalsRegistered = false;

  function ensureGlobalHandlers() {
    if (globalsRegistered) {
      return;
    }

    registerGlobalHandlers();
    globalsRegistered = true;
  }

  function registerGlobalHandlers() {
    // When the window resizes, we need to refresh active editors.
    var resizeTimer;
    on(window, "resize", function () {
      if (resizeTimer == null) {
        resizeTimer = setTimeout(function () {
          resizeTimer = null;
          forEachCodeMirror(onResize);
        }, 100);
      }
    }); // When the window loses focus, we want to show the editor as blurred

    on(window, "blur", function () {
      return forEachCodeMirror(onBlur);
    });
  } // Called when the window resizes


  function onResize(cm) {
    var d = cm.display; // Might be a text scaling operation, clear size caches.

    d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;
    d.scrollbarsClipped = false;
    cm.setSize();
  }

  var keyNames = {
    3: "Pause",
    8: "Backspace",
    9: "Tab",
    13: "Enter",
    16: "Shift",
    17: "Ctrl",
    18: "Alt",
    19: "Pause",
    20: "CapsLock",
    27: "Esc",
    32: "Space",
    33: "PageUp",
    34: "PageDown",
    35: "End",
    36: "Home",
    37: "Left",
    38: "Up",
    39: "Right",
    40: "Down",
    44: "PrintScrn",
    45: "Insert",
    46: "Delete",
    59: ";",
    61: "=",
    91: "Mod",
    92: "Mod",
    93: "Mod",
    106: "*",
    107: "=",
    109: "-",
    110: ".",
    111: "/",
    145: "ScrollLock",
    173: "-",
    186: ";",
    187: "=",
    188: ",",
    189: "-",
    190: ".",
    191: "/",
    192: "`",
    219: "[",
    220: "\\",
    221: "]",
    222: "'",
    224: "Mod",
    63232: "Up",
    63233: "Down",
    63234: "Left",
    63235: "Right",
    63272: "Delete",
    63273: "Home",
    63275: "End",
    63276: "PageUp",
    63277: "PageDown",
    63302: "Insert"
  }; // Number keys

  for (var i = 0; i < 10; i++) {
    keyNames[i + 48] = keyNames[i + 96] = String(i);
  } // Alphabetic keys


  for (var i$1 = 65; i$1 <= 90; i$1++) {
    keyNames[i$1] = String.fromCharCode(i$1);
  } // Function keys


  for (var i$2 = 1; i$2 <= 12; i$2++) {
    keyNames[i$2 + 111] = keyNames[i$2 + 63235] = "F" + i$2;
  }

  var keyMap = {};
  keyMap.basic = {
    "Left": "goCharLeft",
    "Right": "goCharRight",
    "Up": "goLineUp",
    "Down": "goLineDown",
    "End": "goLineEnd",
    "Home": "goLineStartSmart",
    "PageUp": "goPageUp",
    "PageDown": "goPageDown",
    "Delete": "delCharAfter",
    "Backspace": "delCharBefore",
    "Shift-Backspace": "delCharBefore",
    "Tab": "defaultTab",
    "Shift-Tab": "indentAuto",
    "Enter": "newlineAndIndent",
    "Insert": "toggleOverwrite",
    "Esc": "singleSelection"
  }; // Note that the save and find-related commands aren't defined by
  // default. User code or addons can define them. Unknown commands
  // are simply ignored.

  keyMap.pcDefault = {
    "Ctrl-A": "selectAll",
    "Ctrl-D": "deleteLine",
    "Ctrl-Z": "undo",
    "Shift-Ctrl-Z": "redo",
    "Ctrl-Y": "redo",
    "Ctrl-Home": "goDocStart",
    "Ctrl-End": "goDocEnd",
    "Ctrl-Up": "goLineUp",
    "Ctrl-Down": "goLineDown",
    "Ctrl-Left": "goGroupLeft",
    "Ctrl-Right": "goGroupRight",
    "Alt-Left": "goLineStart",
    "Alt-Right": "goLineEnd",
    "Ctrl-Backspace": "delGroupBefore",
    "Ctrl-Delete": "delGroupAfter",
    "Ctrl-S": "save",
    "Ctrl-F": "find",
    "Ctrl-G": "findNext",
    "Shift-Ctrl-G": "findPrev",
    "Shift-Ctrl-F": "replace",
    "Shift-Ctrl-R": "replaceAll",
    "Ctrl-[": "indentLess",
    "Ctrl-]": "indentMore",
    "Ctrl-U": "undoSelection",
    "Shift-Ctrl-U": "redoSelection",
    "Alt-U": "redoSelection",
    "fallthrough": "basic"
  }; // Very basic readline/emacs-style bindings, which are standard on Mac.

  keyMap.emacsy = {
    "Ctrl-F": "goCharRight",
    "Ctrl-B": "goCharLeft",
    "Ctrl-P": "goLineUp",
    "Ctrl-N": "goLineDown",
    "Alt-F": "goWordRight",
    "Alt-B": "goWordLeft",
    "Ctrl-A": "goLineStart",
    "Ctrl-E": "goLineEnd",
    "Ctrl-V": "goPageDown",
    "Shift-Ctrl-V": "goPageUp",
    "Ctrl-D": "delCharAfter",
    "Ctrl-H": "delCharBefore",
    "Alt-D": "delWordAfter",
    "Alt-Backspace": "delWordBefore",
    "Ctrl-K": "killLine",
    "Ctrl-T": "transposeChars",
    "Ctrl-O": "openLine"
  };
  keyMap.macDefault = {
    "Cmd-A": "selectAll",
    "Cmd-D": "deleteLine",
    "Cmd-Z": "undo",
    "Shift-Cmd-Z": "redo",
    "Cmd-Y": "redo",
    "Cmd-Home": "goDocStart",
    "Cmd-Up": "goDocStart",
    "Cmd-End": "goDocEnd",
    "Cmd-Down": "goDocEnd",
    "Alt-Left": "goGroupLeft",
    "Alt-Right": "goGroupRight",
    "Cmd-Left": "goLineLeft",
    "Cmd-Right": "goLineRight",
    "Alt-Backspace": "delGroupBefore",
    "Ctrl-Alt-Backspace": "delGroupAfter",
    "Alt-Delete": "delGroupAfter",
    "Cmd-S": "save",
    "Cmd-F": "find",
    "Cmd-G": "findNext",
    "Shift-Cmd-G": "findPrev",
    "Cmd-Alt-F": "replace",
    "Shift-Cmd-Alt-F": "replaceAll",
    "Cmd-[": "indentLess",
    "Cmd-]": "indentMore",
    "Cmd-Backspace": "delWrappedLineLeft",
    "Cmd-Delete": "delWrappedLineRight",
    "Cmd-U": "undoSelection",
    "Shift-Cmd-U": "redoSelection",
    "Ctrl-Up": "goDocStart",
    "Ctrl-Down": "goDocEnd",
    "fallthrough": ["basic", "emacsy"]
  };
  keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault; // KEYMAP DISPATCH

  function normalizeKeyName(name) {
    var parts = name.split(/-(?!$)/);
    name = parts[parts.length - 1];
    var alt, ctrl, shift, cmd;

    for (var i = 0; i < parts.length - 1; i++) {
      var mod = parts[i];

      if (/^(cmd|meta|m)$/i.test(mod)) {
        cmd = true;
      } else if (/^a(lt)?$/i.test(mod)) {
        alt = true;
      } else if (/^(c|ctrl|control)$/i.test(mod)) {
        ctrl = true;
      } else if (/^s(hift)?$/i.test(mod)) {
        shift = true;
      } else {
        throw new Error("Unrecognized modifier name: " + mod);
      }
    }

    if (alt) {
      name = "Alt-" + name;
    }

    if (ctrl) {
      name = "Ctrl-" + name;
    }

    if (cmd) {
      name = "Cmd-" + name;
    }

    if (shift) {
      name = "Shift-" + name;
    }

    return name;
  } // This is a kludge to keep keymaps mostly working as raw objects
  // (backwards compatibility) while at the same time support features
  // like normalization and multi-stroke key bindings. It compiles a
  // new normalized keymap, and then updates the old object to reflect
  // this.


  function normalizeKeyMap(keymap) {
    var copy = {};

    for (var keyname in keymap) {
      if (keymap.hasOwnProperty(keyname)) {
        var value = keymap[keyname];

        if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) {
          continue;
        }

        if (value == "...") {
          delete keymap[keyname];
          continue;
        }

        var keys = map(keyname.split(" "), normalizeKeyName);

        for (var i = 0; i < keys.length; i++) {
          var val = void 0,
              name = void 0;

          if (i == keys.length - 1) {
            name = keys.join(" ");
            val = value;
          } else {
            name = keys.slice(0, i + 1).join(" ");
            val = "...";
          }

          var prev = copy[name];

          if (!prev) {
            copy[name] = val;
          } else if (prev != val) {
            throw new Error("Inconsistent bindings for " + name);
          }
        }

        delete keymap[keyname];
      }
    }

    for (var prop in copy) {
      keymap[prop] = copy[prop];
    }

    return keymap;
  }

  function lookupKey(key, map, handle, context) {
    map = getKeyMap(map);
    var found = map.call ? map.call(key, context) : map[key];

    if (found === false) {
      return "nothing";
    }

    if (found === "...") {
      return "multi";
    }

    if (found != null && handle(found)) {
      return "handled";
    }

    if (map.fallthrough) {
      if (Object.prototype.toString.call(map.fallthrough) != "[object Array]") {
        return lookupKey(key, map.fallthrough, handle, context);
      }

      for (var i = 0; i < map.fallthrough.length; i++) {
        var result = lookupKey(key, map.fallthrough[i], handle, context);

        if (result) {
          return result;
        }
      }
    }
  } // Modifier key presses don't count as 'real' key presses for the
  // purpose of keymap fallthrough.


  function isModifierKey(value) {
    var name = typeof value == "string" ? value : keyNames[value.keyCode];
    return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod";
  }

  function addModifierNames(name, event, noShift) {
    var base = name;

    if (event.altKey && base != "Alt") {
      name = "Alt-" + name;
    }

    if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") {
      name = "Ctrl-" + name;
    }

    if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Mod") {
      name = "Cmd-" + name;
    }

    if (!noShift && event.shiftKey && base != "Shift") {
      name = "Shift-" + name;
    }

    return name;
  } // Look up the name of a key as indicated by an event object.


  function keyName(event, noShift) {
    if (presto && event.keyCode == 34 && event["char"]) {
      return false;
    }

    var name = keyNames[event.keyCode];

    if (name == null || event.altGraphKey) {
      return false;
    } // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause,
    // so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+)


    if (event.keyCode == 3 && event.code) {
      name = event.code;
    }

    return addModifierNames(name, event, noShift);
  }

  function getKeyMap(val) {
    return typeof val == "string" ? keyMap[val] : val;
  } // Helper for deleting text near the selection(s), used to implement
  // backspace, delete, and similar functionality.


  function deleteNearSelection(cm, compute) {
    var ranges = cm.doc.sel.ranges,
        kill = []; // Build up a set of ranges to kill first, merging overlapping
    // ranges.

    for (var i = 0; i < ranges.length; i++) {
      var toKill = compute(ranges[i]);

      while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) {
        var replaced = kill.pop();

        if (cmp(replaced.from, toKill.from) < 0) {
          toKill.from = replaced.from;
          break;
        }
      }

      kill.push(toKill);
    } // Next, remove those actual ranges.


    runInOp(cm, function () {
      for (var i = kill.length - 1; i >= 0; i--) {
        _replaceRange(cm.doc, "", kill[i].from, kill[i].to, "+delete");
      }

      ensureCursorVisible(cm);
    });
  }

  function moveCharLogically(line, ch, dir) {
    var target = skipExtendingChars(line.text, ch + dir, dir);
    return target < 0 || target > line.text.length ? null : target;
  }

  function moveLogically(line, start, dir) {
    var ch = moveCharLogically(line, start.ch, dir);
    return ch == null ? null : new Pos(start.line, ch, dir < 0 ? "after" : "before");
  }

  function endOfLine(visually, cm, lineObj, lineNo, dir) {
    if (visually) {
      if (cm.doc.direction == "rtl") {
        dir = -dir;
      }

      var order = getOrder(lineObj, cm.doc.direction);

      if (order) {
        var part = dir < 0 ? lst(order) : order[0];
        var moveInStorageOrder = dir < 0 == (part.level == 1);
        var sticky = moveInStorageOrder ? "after" : "before";
        var ch; // With a wrapped rtl chunk (possibly spanning multiple bidi parts),
        // it could be that the last bidi part is not on the last visual line,
        // since visual lines contain content order-consecutive chunks.
        // Thus, in rtl, we are looking for the first (content-order) character
        // in the rtl chunk that is on the last line (that is, the same line
        // as the last (content-order) character).

        if (part.level > 0 || cm.doc.direction == "rtl") {
          var prep = prepareMeasureForLine(cm, lineObj);
          ch = dir < 0 ? lineObj.text.length - 1 : 0;
          var targetTop = measureCharPrepared(cm, prep, ch).top;
          ch = findFirst(function (ch) {
            return measureCharPrepared(cm, prep, ch).top == targetTop;
          }, dir < 0 == (part.level == 1) ? part.from : part.to - 1, ch);

          if (sticky == "before") {
            ch = moveCharLogically(lineObj, ch, 1);
          }
        } else {
          ch = dir < 0 ? part.to : part.from;
        }

        return new Pos(lineNo, ch, sticky);
      }
    }

    return new Pos(lineNo, dir < 0 ? lineObj.text.length : 0, dir < 0 ? "before" : "after");
  }

  function moveVisually(cm, line, start, dir) {
    var bidi = getOrder(line, cm.doc.direction);

    if (!bidi) {
      return moveLogically(line, start, dir);
    }

    if (start.ch >= line.text.length) {
      start.ch = line.text.length;
      start.sticky = "before";
    } else if (start.ch <= 0) {
      start.ch = 0;
      start.sticky = "after";
    }

    var partPos = getBidiPartAt(bidi, start.ch, start.sticky),
        part = bidi[partPos];

    if (cm.doc.direction == "ltr" && part.level % 2 == 0 && (dir > 0 ? part.to > start.ch : part.from < start.ch)) {
      // Case 1: We move within an ltr part in an ltr editor. Even with wrapped lines,
      // nothing interesting happens.
      return moveLogically(line, start, dir);
    }

    var mv = function mv(pos, dir) {
      return moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir);
    };

    var prep;

    var getWrappedLineExtent = function getWrappedLineExtent(ch) {
      if (!cm.options.lineWrapping) {
        return {
          begin: 0,
          end: line.text.length
        };
      }

      prep = prep || prepareMeasureForLine(cm, line);
      return wrappedLineExtentChar(cm, line, prep, ch);
    };

    var wrappedLineExtent = getWrappedLineExtent(start.sticky == "before" ? mv(start, -1) : start.ch);

    if (cm.doc.direction == "rtl" || part.level == 1) {
      var moveInStorageOrder = part.level == 1 == dir < 0;
      var ch = mv(start, moveInStorageOrder ? 1 : -1);

      if (ch != null && (!moveInStorageOrder ? ch >= part.from && ch >= wrappedLineExtent.begin : ch <= part.to && ch <= wrappedLineExtent.end)) {
        // Case 2: We move within an rtl part or in an rtl editor on the same visual line
        var sticky = moveInStorageOrder ? "before" : "after";
        return new Pos(start.line, ch, sticky);
      }
    } // Case 3: Could not move within this bidi part in this visual line, so leave
    // the current bidi part


    var searchInVisualLine = function searchInVisualLine(partPos, dir, wrappedLineExtent) {
      var getRes = function getRes(ch, moveInStorageOrder) {
        return moveInStorageOrder ? new Pos(start.line, mv(ch, 1), "before") : new Pos(start.line, ch, "after");
      };

      for (; partPos >= 0 && partPos < bidi.length; partPos += dir) {
        var part = bidi[partPos];
        var moveInStorageOrder = dir > 0 == (part.level != 1);
        var ch = moveInStorageOrder ? wrappedLineExtent.begin : mv(wrappedLineExtent.end, -1);

        if (part.from <= ch && ch < part.to) {
          return getRes(ch, moveInStorageOrder);
        }

        ch = moveInStorageOrder ? part.from : mv(part.to, -1);

        if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) {
          return getRes(ch, moveInStorageOrder);
        }
      }
    }; // Case 3a: Look for other bidi parts on the same visual line


    var res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent);

    if (res) {
      return res;
    } // Case 3b: Look for other bidi parts on the next visual line


    var nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1);

    if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) {
      res = searchInVisualLine(dir > 0 ? 0 : bidi.length - 1, dir, getWrappedLineExtent(nextCh));

      if (res) {
        return res;
      }
    } // Case 4: Nowhere to move


    return null;
  } // Commands are parameter-less actions that can be performed on an
  // editor, mostly used for keybindings.


  var commands = {
    selectAll: selectAll,
    singleSelection: function singleSelection(cm) {
      return cm.setSelection(cm.getCursor("anchor"), cm.getCursor("head"), sel_dontScroll);
    },
    killLine: function killLine(cm) {
      return deleteNearSelection(cm, function (range) {
        if (range.empty()) {
          var len = getLine(cm.doc, range.head.line).text.length;

          if (range.head.ch == len && range.head.line < cm.lastLine()) {
            return {
              from: range.head,
              to: Pos(range.head.line + 1, 0)
            };
          } else {
            return {
              from: range.head,
              to: Pos(range.head.line, len)
            };
          }
        } else {
          return {
            from: range.from(),
            to: range.to()
          };
        }
      });
    },
    deleteLine: function deleteLine(cm) {
      return deleteNearSelection(cm, function (range) {
        return {
          from: Pos(range.from().line, 0),
          to: _clipPos(cm.doc, Pos(range.to().line + 1, 0))
        };
      });
    },
    delLineLeft: function delLineLeft(cm) {
      return deleteNearSelection(cm, function (range) {
        return {
          from: Pos(range.from().line, 0),
          to: range.from()
        };
      });
    },
    delWrappedLineLeft: function delWrappedLineLeft(cm) {
      return deleteNearSelection(cm, function (range) {
        var top = cm.charCoords(range.head, "div").top + 5;
        var leftPos = cm.coordsChar({
          left: 0,
          top: top
        }, "div");
        return {
          from: leftPos,
          to: range.from()
        };
      });
    },
    delWrappedLineRight: function delWrappedLineRight(cm) {
      return deleteNearSelection(cm, function (range) {
        var top = cm.charCoords(range.head, "div").top + 5;
        var rightPos = cm.coordsChar({
          left: cm.display.lineDiv.offsetWidth + 100,
          top: top
        }, "div");
        return {
          from: range.from(),
          to: rightPos
        };
      });
    },
    undo: function undo(cm) {
      return cm.undo();
    },
    redo: function redo(cm) {
      return cm.redo();
    },
    undoSelection: function undoSelection(cm) {
      return cm.undoSelection();
    },
    redoSelection: function redoSelection(cm) {
      return cm.redoSelection();
    },
    goDocStart: function goDocStart(cm) {
      return cm.extendSelection(Pos(cm.firstLine(), 0));
    },
    goDocEnd: function goDocEnd(cm) {
      return cm.extendSelection(Pos(cm.lastLine()));
    },
    goLineStart: function goLineStart(cm) {
      return cm.extendSelectionsBy(function (range) {
        return lineStart(cm, range.head.line);
      }, {
        origin: "+move",
        bias: 1
      });
    },
    goLineStartSmart: function goLineStartSmart(cm) {
      return cm.extendSelectionsBy(function (range) {
        return lineStartSmart(cm, range.head);
      }, {
        origin: "+move",
        bias: 1
      });
    },
    goLineEnd: function goLineEnd(cm) {
      return cm.extendSelectionsBy(function (range) {
        return lineEnd(cm, range.head.line);
      }, {
        origin: "+move",
        bias: -1
      });
    },
    goLineRight: function goLineRight(cm) {
      return cm.extendSelectionsBy(function (range) {
        var top = cm.cursorCoords(range.head, "div").top + 5;
        return cm.coordsChar({
          left: cm.display.lineDiv.offsetWidth + 100,
          top: top
        }, "div");
      }, sel_move);
    },
    goLineLeft: function goLineLeft(cm) {
      return cm.extendSelectionsBy(function (range) {
        var top = cm.cursorCoords(range.head, "div").top + 5;
        return cm.coordsChar({
          left: 0,
          top: top
        }, "div");
      }, sel_move);
    },
    goLineLeftSmart: function goLineLeftSmart(cm) {
      return cm.extendSelectionsBy(function (range) {
        var top = cm.cursorCoords(range.head, "div").top + 5;
        var pos = cm.coordsChar({
          left: 0,
          top: top
        }, "div");

        if (pos.ch < cm.getLine(pos.line).search(/\S/)) {
          return lineStartSmart(cm, range.head);
        }

        return pos;
      }, sel_move);
    },
    goLineUp: function goLineUp(cm) {
      return cm.moveV(-1, "line");
    },
    goLineDown: function goLineDown(cm) {
      return cm.moveV(1, "line");
    },
    goPageUp: function goPageUp(cm) {
      return cm.moveV(-1, "page");
    },
    goPageDown: function goPageDown(cm) {
      return cm.moveV(1, "page");
    },
    goCharLeft: function goCharLeft(cm) {
      return cm.moveH(-1, "char");
    },
    goCharRight: function goCharRight(cm) {
      return cm.moveH(1, "char");
    },
    goColumnLeft: function goColumnLeft(cm) {
      return cm.moveH(-1, "column");
    },
    goColumnRight: function goColumnRight(cm) {
      return cm.moveH(1, "column");
    },
    goWordLeft: function goWordLeft(cm) {
      return cm.moveH(-1, "word");
    },
    goGroupRight: function goGroupRight(cm) {
      return cm.moveH(1, "group");
    },
    goGroupLeft: function goGroupLeft(cm) {
      return cm.moveH(-1, "group");
    },
    goWordRight: function goWordRight(cm) {
      return cm.moveH(1, "word");
    },
    delCharBefore: function delCharBefore(cm) {
      return cm.deleteH(-1, "codepoint");
    },
    delCharAfter: function delCharAfter(cm) {
      return cm.deleteH(1, "char");
    },
    delWordBefore: function delWordBefore(cm) {
      return cm.deleteH(-1, "word");
    },
    delWordAfter: function delWordAfter(cm) {
      return cm.deleteH(1, "word");
    },
    delGroupBefore: function delGroupBefore(cm) {
      return cm.deleteH(-1, "group");
    },
    delGroupAfter: function delGroupAfter(cm) {
      return cm.deleteH(1, "group");
    },
    indentAuto: function indentAuto(cm) {
      return cm.indentSelection("smart");
    },
    indentMore: function indentMore(cm) {
      return cm.indentSelection("add");
    },
    indentLess: function indentLess(cm) {
      return cm.indentSelection("subtract");
    },
    insertTab: function insertTab(cm) {
      return cm.replaceSelection("\t");
    },
    insertSoftTab: function insertSoftTab(cm) {
      var spaces = [],
          ranges = cm.listSelections(),
          tabSize = cm.options.tabSize;

      for (var i = 0; i < ranges.length; i++) {
        var pos = ranges[i].from();
        var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);
        spaces.push(spaceStr(tabSize - col % tabSize));
      }

      cm.replaceSelections(spaces);
    },
    defaultTab: function defaultTab(cm) {
      if (cm.somethingSelected()) {
        cm.indentSelection("add");
      } else {
        cm.execCommand("insertTab");
      }
    },
    // Swap the two chars left and right of each selection's head.
    // Move cursor behind the two swapped characters afterwards.
    //
    // Doesn't consider line feeds a character.
    // Doesn't scan more than one line above to find a character.
    // Doesn't do anything on an empty line.
    // Doesn't do anything with non-empty selections.
    transposeChars: function transposeChars(cm) {
      return runInOp(cm, function () {
        var ranges = cm.listSelections(),
            newSel = [];

        for (var i = 0; i < ranges.length; i++) {
          if (!ranges[i].empty()) {
            continue;
          }

          var cur = ranges[i].head,
              line = getLine(cm.doc, cur.line).text;

          if (line) {
            if (cur.ch == line.length) {
              cur = new Pos(cur.line, cur.ch - 1);
            }

            if (cur.ch > 0) {
              cur = new Pos(cur.line, cur.ch + 1);
              cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2), Pos(cur.line, cur.ch - 2), cur, "+transpose");
            } else if (cur.line > cm.doc.first) {
              var prev = getLine(cm.doc, cur.line - 1).text;

              if (prev) {
                cur = new Pos(cur.line, 1);
                cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() + prev.charAt(prev.length - 1), Pos(cur.line - 1, prev.length - 1), cur, "+transpose");
              }
            }
          }

          newSel.push(new Range(cur, cur));
        }

        cm.setSelections(newSel);
      });
    },
    newlineAndIndent: function newlineAndIndent(cm) {
      return runInOp(cm, function () {
        /*修改方法*/
        var selection = cm.getOption("selection");

        if (selection) {
          var ranges = selection.ranges;

          if (ranges != null && ranges != [] && ranges.length != selection.primary) {
            var ofAnchorCh = cm.getRange(Pos(0, 0), cm.getCursor()).length + 1 == ranges[selection.primary].anchor.ch;
            var ofHeadCh = 0;

            if (!ofAnchorCh) {
              ofHeadCh = cm.getRange(Pos(0, 0), cm.getCursor()).length + 1 - ranges[selection.primary].anchor.ch;
            }

            cm.setSelection(Pos(0, ranges[selection.primary].anchor.ch + ofHeadCh), Pos(0, ranges[selection.primary].head.ch + ofHeadCh), {
              scroll: false
            });
            selection.primary++;
            return;
          } else if (ranges.length === selection.primary) {
            cm.setOption("selection", null);
            return cm.extendSelection(Pos(cm.lastLine()));
          }
        } else {
          if (cm.getOption("isSupportReturn") == undefined ? true : cm.getOption("isSupportReturn")) {
            var sels = cm.listSelections();

            for (var i = sels.length - 1; i >= 0; i--) {
              cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, "+input");
            }

            sels = cm.listSelections();

            for (var i$1 = 0; i$1 < sels.length; i$1++) {
              cm.indentLine(sels[i$1].from().line, null, true);
            }

            ensureCursorVisible(cm);
          }
        } // 原始代码
        // var sels = cm.listSelections();
        // for (var i = sels.length - 1; i >= 0; i--)
        //   { cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, "+input"); }
        // sels = cm.listSelections();
        // for (var i$1 = 0; i$1 < sels.length; i$1++)
        //   { cm.indentLine(sels[i$1].from().line, null, true); }
        // ensureCursorVisible(cm);

      });
    },
    openLine: function openLine(cm) {
      return cm.replaceSelection("\n", "start");
    },
    toggleOverwrite: function toggleOverwrite(cm) {
      return cm.toggleOverwrite();
    }
  };

  function lineStart(cm, lineN) {
    var line = getLine(cm.doc, lineN);
    var visual = visualLine(line);

    if (visual != line) {
      lineN = lineNo(visual);
    }

    return endOfLine(true, cm, visual, lineN, 1);
  }

  function lineEnd(cm, lineN) {
    var line = getLine(cm.doc, lineN);
    var visual = visualLineEnd(line);

    if (visual != line) {
      lineN = lineNo(visual);
    }

    return endOfLine(true, cm, line, lineN, -1);
  }

  function lineStartSmart(cm, pos) {
    var start = lineStart(cm, pos.line);
    var line = getLine(cm.doc, start.line);
    var order = getOrder(line, cm.doc.direction);

    if (!order || order[0].level == 0) {
      var firstNonWS = Math.max(start.ch, line.text.search(/\S/));
      var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch;
      return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky);
    }

    return start;
  } // Run a handler that was bound to a key.


  function doHandleBinding(cm, bound, dropShift) {
    if (typeof bound == "string") {
      bound = commands[bound];

      if (!bound) {
        return false;
      }
    } // Ensure previous input has been read, so that the handler sees a
    // consistent view of the document


    cm.display.input.ensurePolled();
    var prevShift = cm.display.shift,
        done = false;

    try {
      if (cm.isReadOnly()) {
        cm.state.suppressEdits = true;
      }

      if (dropShift) {
        cm.display.shift = false;
      }

      done = bound(cm) != Pass;
    } finally {
      cm.display.shift = prevShift;
      cm.state.suppressEdits = false;
    }

    return done;
  }

  function lookupKeyForEditor(cm, name, handle) {
    for (var i = 0; i < cm.state.keyMaps.length; i++) {
      var result = lookupKey(name, cm.state.keyMaps[i], handle, cm);

      if (result) {
        return result;
      }
    }

    return cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm) || lookupKey(name, cm.options.keyMap, handle, cm);
  } // Note that, despite the name, this function is also used to check
  // for bound mouse clicks.


  var stopSeq = new Delayed();

  function dispatchKey(cm, name, e, handle) {
    var seq = cm.state.keySeq;

    if (seq) {
      if (isModifierKey(name)) {
        return "handled";
      }

      if (/\'$/.test(name)) {
        cm.state.keySeq = null;
      } else {
        stopSeq.set(50, function () {
          if (cm.state.keySeq == seq) {
            cm.state.keySeq = null;
            cm.display.input.reset();
          }
        });
      }

      if (dispatchKeyInner(cm, seq + " " + name, e, handle)) {
        return true;
      }
    }

    return dispatchKeyInner(cm, name, e, handle);
  }

  function dispatchKeyInner(cm, name, e, handle) {
    var result = lookupKeyForEditor(cm, name, handle);

    if (result == "multi") {
      cm.state.keySeq = name;
    }

    if (result == "handled") {
      signalLater(cm, "keyHandled", cm, name, e);
    }

    if (result == "handled" || result == "multi") {
      e_preventDefault(e);
      restartBlink(cm);
    }

    return !!result;
  } // Handle a key from the keydown event.


  function handleKeyBinding(cm, e) {
    var name = keyName(e, true);

    if (!name) {
      return false;
    }

    if (e.shiftKey && !cm.state.keySeq) {
      // First try to resolve full name (including 'Shift-'). Failing
      // that, see if there is a cursor-motion command (starting with
      // 'go') bound to the keyname without 'Shift-'.
      return dispatchKey(cm, "Shift-" + name, e, function (b) {
        return doHandleBinding(cm, b, true);
      }) || dispatchKey(cm, name, e, function (b) {
        if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion) {
          return doHandleBinding(cm, b);
        }
      });
    } else {
      return dispatchKey(cm, name, e, function (b) {
        return doHandleBinding(cm, b);
      });
    }
  } // Handle a key from the keypress event


  function handleCharBinding(cm, e, ch) {
    return dispatchKey(cm, "'" + ch + "'", e, function (b) {
      return doHandleBinding(cm, b, true);
    });
  }

  var lastStoppedKey = null;

  function onKeyDown(e) {
    var cm = this;

    if (e.target && e.target != cm.display.input.getField()) {
      return;
    }

    cm.curOp.focus = activeElt();

    if (signalDOMEvent(cm, e)) {
      return;
    } // IE does strange things with escape.


    if (ie && ie_version < 11 && e.keyCode == 27) {
      e.returnValue = false;
    }

    var code = e.keyCode;
    cm.display.shift = code == 16 || e.shiftKey;
    var handled = handleKeyBinding(cm, e);

    if (presto) {
      lastStoppedKey = handled ? code : null; // Opera has no cut event... we try to at least catch the key combo

      if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey)) {
        cm.replaceSelection("", null, "cut");
      }
    }

    if (gecko && !mac && !handled && code == 46 && e.shiftKey && !e.ctrlKey && document.execCommand) {
      document.execCommand("cut");
    } // Turn mouse into crosshair when Alt is held on Mac.


    if (code == 18 && !/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className)) {
      showCrossHair(cm);
    }
  }

  function showCrossHair(cm) {
    var lineDiv = cm.display.lineDiv;
    addClass(lineDiv, "CodeMirror-crosshair");

    function up(e) {
      if (e.keyCode == 18 || !e.altKey) {
        rmClass(lineDiv, "CodeMirror-crosshair");
        off(document, "keyup", up);
        off(document, "mouseover", up);
      }
    }

    on(document, "keyup", up);
    on(document, "mouseover", up);
  }

  function onKeyUp(e) {
    if (e.keyCode == 16) {
      this.doc.sel.shift = false;
    }

    signalDOMEvent(this, e);
  }

  function onKeyPress(e) {
    var cm = this;

    if (e.target && e.target != cm.display.input.getField()) {
      return;
    }

    if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) {
      return;
    }

    var keyCode = e.keyCode,
        charCode = e.charCode;

    if (presto && keyCode == lastStoppedKey) {
      lastStoppedKey = null;
      e_preventDefault(e);
      return;
    }

    if (presto && (!e.which || e.which < 10) && handleKeyBinding(cm, e)) {
      return;
    }

    var ch = String.fromCharCode(charCode == null ? keyCode : charCode); // Some browsers fire keypress events for backspace

    if (ch == "\x08") {
      return;
    }

    if (handleCharBinding(cm, e, ch)) {
      return;
    }

    cm.display.input.onKeyPress(e);
  }

  var DOUBLECLICK_DELAY = 400;

  var PastClick = function PastClick(time, pos, button) {
    this.time = time;
    this.pos = pos;
    this.button = button;
  };

  PastClick.prototype.compare = function (time, pos, button) {
    return this.time + DOUBLECLICK_DELAY > time && cmp(pos, this.pos) == 0 && button == this.button;
  };

  var lastClick, lastDoubleClick;

  function clickRepeat(pos, button) {
    var now = +new Date();

    if (lastDoubleClick && lastDoubleClick.compare(now, pos, button)) {
      lastClick = lastDoubleClick = null;
      return "triple";
    } else if (lastClick && lastClick.compare(now, pos, button)) {
      lastDoubleClick = new PastClick(now, pos, button);
      lastClick = null;
      return "double";
    } else {
      lastClick = new PastClick(now, pos, button);
      lastDoubleClick = null;
      return "single";
    }
  } // A mouse down can be a single click, double click, triple click,
  // start of selection drag, start of text drag, new cursor
  // (ctrl-click), rectangle drag (alt-drag), or xwin
  // middle-click-paste. Or it might be a click on something we should
  // not interfere with, such as a scrollbar or widget.


  function onMouseDown(e) {
    var cm = this,
        display = cm.display;

    if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) {
      return;
    }

    display.input.ensurePolled();
    display.shift = e.shiftKey;

    if (eventInWidget(display, e)) {
      if (!webkit) {
        // Briefly turn off draggability, to allow widgets to do
        // normal dragging things.
        display.scroller.draggable = false;
        setTimeout(function () {
          return display.scroller.draggable = true;
        }, 100);
      }

      return;
    }

    if (clickInGutter(cm, e)) {
      return;
    }

    var pos = posFromMouse(cm, e),
        button = e_button(e),
        repeat = pos ? clickRepeat(pos, button) : "single";
    window.focus(); // #3261: make sure, that we're not starting a second selection

    if (button == 1 && cm.state.selectingText) {
      cm.state.selectingText(e);
    }

    if (pos && handleMappedButton(cm, button, pos, repeat, e)) {
      return;
    }

    if (button == 1) {
      if (pos) {
        leftButtonDown(cm, pos, repeat, e);
      } else if (e_target(e) == display.scroller) {
        e_preventDefault(e);
      }
    } else if (button == 2) {
      if (pos) {
        extendSelection(cm.doc, pos);
      }

      setTimeout(function () {
        return display.input.focus();
      }, 20);
    } else if (button == 3) {
      if (captureRightClick) {
        cm.display.input.onContextMenu(e);
      } else {
        delayBlurEvent(cm);
      }
    }
  }

  function handleMappedButton(cm, button, pos, repeat, event) {
    var name = "Click";

    if (repeat == "double") {
      name = "Double" + name;
    } else if (repeat == "triple") {
      name = "Triple" + name;
    }

    name = (button == 1 ? "Left" : button == 2 ? "Middle" : "Right") + name;
    return dispatchKey(cm, addModifierNames(name, event), event, function (bound) {
      if (typeof bound == "string") {
        bound = commands[bound];
      }

      if (!bound) {
        return false;
      }

      var done = false;

      try {
        if (cm.isReadOnly()) {
          cm.state.suppressEdits = true;
        }

        done = bound(cm, pos) != Pass;
      } finally {
        cm.state.suppressEdits = false;
      }

      return done;
    });
  }

  function configureMouse(cm, repeat, event) {
    var option = cm.getOption("configureMouse");
    var value = option ? option(cm, repeat, event) : {};

    if (value.unit == null) {
      var rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey;
      value.unit = rect ? "rectangle" : repeat == "single" ? "char" : repeat == "double" ? "word" : "line";
    }

    if (value.extend == null || cm.doc.extend) {
      value.extend = cm.doc.extend || event.shiftKey;
    }

    if (value.addNew == null) {
      value.addNew = mac ? event.metaKey : event.ctrlKey;
    }

    if (value.moveOnDrag == null) {
      value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey);
    }

    return value;
  }

  function leftButtonDown(cm, pos, repeat, event) {
    if (ie) {
      setTimeout(bind(ensureFocus, cm), 0);
    } else {
      cm.curOp.focus = activeElt();
    }

    var behavior = configureMouse(cm, repeat, event);
    var sel = cm.doc.sel,
        contained;

    if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() && repeat == "single" && (contained = sel.contains(pos)) > -1 && (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) && (cmp(contained.to(), pos) > 0 || pos.xRel < 0)) {
      leftButtonStartDrag(cm, event, pos, behavior);
    } else {
      leftButtonSelect(cm, event, pos, behavior);
    }
  } // Start a text drag. When it ends, see if any dragging actually
  // happen, and treat as a click if it didn't.


  function leftButtonStartDrag(cm, event, pos, behavior) {
    var display = cm.display,
        moved = false;
    var dragEnd = operation(cm, function (e) {
      if (webkit) {
        display.scroller.draggable = false;
      }

      cm.state.draggingText = false;

      if (cm.state.delayingBlurEvent) {
        if (cm.hasFocus()) {
          cm.state.delayingBlurEvent = false;
        } else {
          delayBlurEvent(cm);
        }
      }

      off(display.wrapper.ownerDocument, "mouseup", dragEnd);
      off(display.wrapper.ownerDocument, "mousemove", mouseMove);
      off(display.scroller, "dragstart", dragStart);
      off(display.scroller, "drop", dragEnd);

      if (!moved) {
        e_preventDefault(e);

        if (!behavior.addNew) {
          extendSelection(cm.doc, pos, null, null, behavior.extend);
        } // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)


        if (webkit && !safari || ie && ie_version == 9) {
          setTimeout(function () {
            display.wrapper.ownerDocument.body.focus({
              preventScroll: true
            });
            display.input.focus();
          }, 20);
        } else {
          display.input.focus();
        }
      }
    });

    var mouseMove = function mouseMove(e2) {
      moved = moved || Math.abs(event.clientX - e2.clientX) + Math.abs(event.clientY - e2.clientY) >= 10;
    };

    var dragStart = function dragStart() {
      return moved = true;
    }; // Let the drag handler handle this.


    if (webkit) {
      display.scroller.draggable = true;
    }

    cm.state.draggingText = dragEnd;
    dragEnd.copy = !behavior.moveOnDrag;
    on(display.wrapper.ownerDocument, "mouseup", dragEnd);
    on(display.wrapper.ownerDocument, "mousemove", mouseMove);
    on(display.scroller, "dragstart", dragStart);
    on(display.scroller, "drop", dragEnd);
    cm.state.delayingBlurEvent = true;
    setTimeout(function () {
      return display.input.focus();
    }, 20); // IE's approach to draggable

    if (display.scroller.dragDrop) {
      display.scroller.dragDrop();
    }
  }

  function rangeForUnit(cm, pos, unit) {
    if (unit == "char") {
      return new Range(pos, pos);
    }

    if (unit == "word") {
      return cm.findWordAt(pos);
    }

    if (unit == "line") {
      return new Range(Pos(pos.line, 0), _clipPos(cm.doc, Pos(pos.line + 1, 0)));
    }

    var result = unit(cm, pos);
    return new Range(result.from, result.to);
  } // Normal selection, as opposed to text dragging.


  function leftButtonSelect(cm, event, start, behavior) {
    if (ie) {
      delayBlurEvent(cm);
    }

    var display = cm.display,
        doc = cm.doc;
    e_preventDefault(event);
    var ourRange,
        ourIndex,
        startSel = doc.sel,
        ranges = startSel.ranges;

    if (behavior.addNew && !behavior.extend) {
      ourIndex = doc.sel.contains(start);

      if (ourIndex > -1) {
        ourRange = ranges[ourIndex];
      } else {
        ourRange = new Range(start, start);
      }
    } else {
      ourRange = doc.sel.primary();
      ourIndex = doc.sel.primIndex;
    }

    if (behavior.unit == "rectangle") {
      if (!behavior.addNew) {
        ourRange = new Range(start, start);
      }

      start = posFromMouse(cm, event, true, true);
      ourIndex = -1;
    } else {
      var range = rangeForUnit(cm, start, behavior.unit);

      if (behavior.extend) {
        ourRange = extendRange(ourRange, range.anchor, range.head, behavior.extend);
      } else {
        ourRange = range;
      }
    }

    if (!behavior.addNew) {
      ourIndex = 0;
      setSelection(doc, new Selection([ourRange], 0), sel_mouse);
      startSel = doc.sel;
    } else if (ourIndex == -1) {
      ourIndex = ranges.length;
      setSelection(doc, normalizeSelection(cm, ranges.concat([ourRange]), ourIndex), {
        scroll: false,
        origin: "*mouse"
      });
    } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == "char" && !behavior.extend) {
      setSelection(doc, normalizeSelection(cm, ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0), {
        scroll: false,
        origin: "*mouse"
      });
      startSel = doc.sel;
    } else {
      replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);
    }

    var lastPos = start;

    function extendTo(pos) {
      if (cmp(lastPos, pos) == 0) {
        return;
      }

      lastPos = pos;

      if (behavior.unit == "rectangle") {
        var ranges = [],
            tabSize = cm.options.tabSize;
        var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);
        var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);
        var left = Math.min(startCol, posCol),
            right = Math.max(startCol, posCol);

        for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line)); line <= end; line++) {
          var text = getLine(doc, line).text,
              leftPos = findColumn(text, left, tabSize);

          if (left == right) {
            ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos)));
          } else if (text.length > leftPos) {
            ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize))));
          }
        }

        if (!ranges.length) {
          ranges.push(new Range(start, start));
        }

        setSelection(doc, normalizeSelection(cm, startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex), {
          origin: "*mouse",
          scroll: false
        });
        cm.scrollIntoView(pos);
      } else {
        var oldRange = ourRange;
        var range = rangeForUnit(cm, pos, behavior.unit);
        var anchor = oldRange.anchor,
            head;

        if (cmp(range.anchor, anchor) > 0) {
          head = range.head;
          anchor = minPos(oldRange.from(), range.anchor);
        } else {
          head = range.anchor;
          anchor = maxPos(oldRange.to(), range.head);
        }

        var ranges$1 = startSel.ranges.slice(0);
        ranges$1[ourIndex] = bidiSimplify(cm, new Range(_clipPos(doc, anchor), head));
        setSelection(doc, normalizeSelection(cm, ranges$1, ourIndex), sel_mouse);
      }
    }

    var editorSize = display.wrapper.getBoundingClientRect(); // Used to ensure timeout re-tries don't fire when another extend
    // happened in the meantime (clearTimeout isn't reliable -- at
    // least on Chrome, the timeouts still happen even when cleared,
    // if the clear happens after their scheduled firing time).

    var counter = 0;

    function extend(e) {
      var curCount = ++counter;
      var cur = posFromMouse(cm, e, true, behavior.unit == "rectangle");

      if (!cur) {
        return;
      }

      if (cmp(cur, lastPos) != 0) {
        cm.curOp.focus = activeElt();
        extendTo(cur);
        var visible = visibleLines(display, doc);

        if (cur.line >= visible.to || cur.line < visible.from) {
          setTimeout(operation(cm, function () {
            if (counter == curCount) {
              extend(e);
            }
          }), 150);
        }
      } else {
        var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;

        if (outside) {
          setTimeout(operation(cm, function () {
            if (counter != curCount) {
              return;
            }

            display.scroller.scrollTop += outside;
            extend(e);
          }), 50);
        }
      }
    }

    function done(e) {
      cm.state.selectingText = false;
      counter = Infinity; // If e is null or undefined we interpret this as someone trying
      // to explicitly cancel the selection rather than the user
      // letting go of the mouse button.

      if (e) {
        e_preventDefault(e);
        display.input.focus();
      }

      off(display.wrapper.ownerDocument, "mousemove", move);
      off(display.wrapper.ownerDocument, "mouseup", up);
      doc.history.lastSelOrigin = null;
    }

    var move = operation(cm, function (e) {
      if (e.buttons === 0 || !e_button(e)) {
        done(e);
      } else {
        extend(e);
      }
    });
    var up = operation(cm, done);
    cm.state.selectingText = up;
    on(display.wrapper.ownerDocument, "mousemove", move);
    on(display.wrapper.ownerDocument, "mouseup", up);
  } // Used when mouse-selecting to adjust the anchor to the proper side
  // of a bidi jump depending on the visual position of the head.


  function bidiSimplify(cm, range) {
    var anchor = range.anchor;
    var head = range.head;
    var anchorLine = getLine(cm.doc, anchor.line);

    if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) {
      return range;
    }

    var order = getOrder(anchorLine);

    if (!order) {
      return range;
    }

    var index = getBidiPartAt(order, anchor.ch, anchor.sticky),
        part = order[index];

    if (part.from != anchor.ch && part.to != anchor.ch) {
      return range;
    }

    var boundary = index + (part.from == anchor.ch == (part.level != 1) ? 0 : 1);

    if (boundary == 0 || boundary == order.length) {
      return range;
    } // Compute the relative visual position of the head compared to the
    // anchor (<0 is to the left, >0 to the right)


    var leftSide;

    if (head.line != anchor.line) {
      leftSide = (head.line - anchor.line) * (cm.doc.direction == "ltr" ? 1 : -1) > 0;
    } else {
      var headIndex = getBidiPartAt(order, head.ch, head.sticky);
      var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);

      if (headIndex == boundary - 1 || headIndex == boundary) {
        leftSide = dir < 0;
      } else {
        leftSide = dir > 0;
      }
    }

    var usePart = order[boundary + (leftSide ? -1 : 0)];
    var from = leftSide == (usePart.level == 1);
    var ch = from ? usePart.from : usePart.to,
        sticky = from ? "after" : "before";
    return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head);
  } // Determines whether an event happened in the gutter, and fires the
  // handlers for the corresponding event.


  function gutterEvent(cm, e, type, prevent) {
    var mX, mY;

    if (e.touches) {
      mX = e.touches[0].clientX;
      mY = e.touches[0].clientY;
    } else {
      try {
        mX = e.clientX;
        mY = e.clientY;
      } catch (e$1) {
        return false;
      }
    }

    if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) {
      return false;
    }

    if (prevent) {
      e_preventDefault(e);
    }

    var display = cm.display;
    var lineBox = display.lineDiv.getBoundingClientRect();

    if (mY > lineBox.bottom || !hasHandler(cm, type)) {
      return e_defaultPrevented(e);
    }

    mY -= lineBox.top - display.viewOffset;

    for (var i = 0; i < cm.display.gutterSpecs.length; ++i) {
      var g = display.gutters.childNodes[i];

      if (g && g.getBoundingClientRect().right >= mX) {
        var line = _lineAtHeight(cm.doc, mY);

        var gutter = cm.display.gutterSpecs[i];
        signal(cm, type, cm, line, gutter.className, e);
        return e_defaultPrevented(e);
      }
    }
  }

  function clickInGutter(cm, e) {
    return gutterEvent(cm, e, "gutterClick", true);
  } // CONTEXT MENU HANDLING
  // To make the context menu work, we need to briefly unhide the
  // textarea (making it as unobtrusive as possible) to let the
  // right-click take effect on it.


  function onContextMenu(cm, e) {
    if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) {
      return;
    }

    if (signalDOMEvent(cm, e, "contextmenu")) {
      return;
    }

    if (!captureRightClick) {
      cm.display.input.onContextMenu(e);
    }
  }

  function contextMenuInGutter(cm, e) {
    if (!hasHandler(cm, "gutterContextMenu")) {
      return false;
    }

    return gutterEvent(cm, e, "gutterContextMenu", false);
  }

  function themeChanged(cm) {
    cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") + cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-");
    clearCaches(cm);
  }

  var Init = {
    toString: function toString() {
      return "CodeMirror.Init";
    }
  };
  var defaults = {};
  var optionHandlers = {};

  function defineOptions(CodeMirror) {
    var optionHandlers = CodeMirror.optionHandlers;

    function option(name, deflt, handle, notOnInit) {
      CodeMirror.defaults[name] = deflt;

      if (handle) {
        optionHandlers[name] = notOnInit ? function (cm, val, old) {
          if (old != Init) {
            handle(cm, val, old);
          }
        } : handle;
      }
    }

    CodeMirror.defineOption = option; // Passed to option handlers when there is no old value.

    CodeMirror.Init = Init; // These two are, on init, called from the constructor because they
    // have to be initialized before the editor can start at all.

    option("value", "", function (cm, val) {
      return cm.setValue(val);
    }, true);
    option("mode", null, function (cm, val) {
      cm.doc.modeOption = val;
      loadMode(cm);
    }, true);
    option("indentUnit", 2, loadMode, true);
    option("indentWithTabs", false);
    option("smartIndent", true);
    option("tabSize", 4, function (cm) {
      resetModeState(cm);
      clearCaches(cm);
      regChange(cm);
    }, true);
    option("lineSeparator", null, function (cm, val) {
      cm.doc.lineSep = val;

      if (!val) {
        return;
      }

      var newBreaks = [],
          lineNo = cm.doc.first;
      cm.doc.iter(function (line) {
        for (var pos = 0;;) {
          var found = line.text.indexOf(val, pos);

          if (found == -1) {
            break;
          }

          pos = found + val.length;
          newBreaks.push(Pos(lineNo, found));
        }

        lineNo++;
      });

      for (var i = newBreaks.length - 1; i >= 0; i--) {
        _replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length));
      }
    });
    option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g, function (cm, val, old) {
      cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g");

      if (old != Init) {
        cm.refresh();
      }
    });
    option("specialCharPlaceholder", defaultSpecialCharPlaceholder, function (cm) {
      return cm.refresh();
    }, true);
    option("electricChars", true);
    option("inputStyle", mobile ? "contenteditable" : "textarea", function () {
      throw new Error("inputStyle can not (yet) be changed in a running editor"); // FIXME
    }, true);
    option("spellcheck", false, function (cm, val) {
      return cm.getInputField().spellcheck = val;
    }, true);
    option("autocorrect", false, function (cm, val) {
      return cm.getInputField().autocorrect = val;
    }, true);
    option("autocapitalize", false, function (cm, val) {
      return cm.getInputField().autocapitalize = val;
    }, true);
    option("rtlMoveVisually", !windows);
    option("wholeLineUpdateBefore", true);
    option("theme", "default", function (cm) {
      themeChanged(cm);
      updateGutters(cm);
    }, true);
    option("keyMap", "default", function (cm, val, old) {
      var next = getKeyMap(val);
      var prev = old != Init && getKeyMap(old);

      if (prev && prev.detach) {
        prev.detach(cm, next);
      }

      if (next.attach) {
        next.attach(cm, prev || null);
      }
    });
    option("extraKeys", null);
    option("configureMouse", null);
    option("lineWrapping", false, wrappingChanged, true);
    option("gutters", [], function (cm, val) {
      cm.display.gutterSpecs = getGutters(val, cm.options.lineNumbers);
      updateGutters(cm);
    }, true);
    option("fixedGutter", true, function (cm, val) {
      cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0";
      cm.refresh();
    }, true);
    option("coverGutterNextToScrollbar", false, function (cm) {
      return updateScrollbars(cm);
    }, true);
    option("scrollbarStyle", "native", function (cm) {
      initScrollbars(cm);
      updateScrollbars(cm);
      cm.display.scrollbars.setScrollTop(cm.doc.scrollTop);
      cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft);
    }, true);
    option("lineNumbers", false, function (cm, val) {
      cm.display.gutterSpecs = getGutters(cm.options.gutters, val);
      updateGutters(cm);
    }, true);
    option("firstLineNumber", 1, updateGutters, true);
    option("lineNumberFormatter", function (integer) {
      return integer;
    }, updateGutters, true);
    option("showCursorWhenSelecting", false, updateSelection, true);
    option("resetSelectionOnContextMenu", true);
    option("lineWiseCopyCut", true);
    option("pasteLinesPerSelection", true);
    option("selectionsMayTouch", false);
    option("readOnly", false, function (cm, val) {
      if (val == "nocursor") {
        onBlur(cm);
        cm.display.input.blur();
      }

      cm.display.input.readOnlyChanged(val);
    });
    option("screenReaderLabel", null, function (cm, val) {
      val = val === '' ? null : val;
      cm.display.input.screenReaderLabelChanged(val);
    });
    option("disableInput", false, function (cm, val) {
      if (!val) {
        cm.display.input.reset();
      }
    }, true);
    option("dragDrop", true, dragDropChanged);
    option("allowDropFileTypes", null);
    option("cursorBlinkRate", 530);
    option("cursorScrollMargin", 0);
    option("cursorHeight", 1, updateSelection, true);
    option("singleCursorHeightPerLine", true, updateSelection, true);
    option("workTime", 100);
    option("workDelay", 100);
    option("flattenSpans", true, resetModeState, true);
    option("addModeClass", false, resetModeState, true);
    option("pollInterval", 100);
    option("undoDepth", 200, function (cm, val) {
      return cm.doc.history.undoDepth = val;
    });
    option("historyEventDelay", 1250);
    option("viewportMargin", 10, function (cm) {
      return cm.refresh();
    }, true);
    option("maxHighlightLength", 10000, resetModeState, true);
    option("moveInputWithCursor", true, function (cm, val) {
      if (!val) {
        cm.display.input.resetPosition();
      }
    });
    option("tabindex", null, function (cm, val) {
      return cm.display.input.getField().tabIndex = val || "";
    });
    option("autofocus", null);
    option("direction", "ltr", function (cm, val) {
      return cm.doc.setDirection(val);
    }, true);
    option("phrases", null);
  }

  function dragDropChanged(cm, value, old) {
    var wasOn = old && old != Init;

    if (!value != !wasOn) {
      var funcs = cm.display.dragFunctions;
      var toggle = value ? on : off;
      toggle(cm.display.scroller, "dragstart", funcs.start);
      toggle(cm.display.scroller, "dragenter", funcs.enter);
      toggle(cm.display.scroller, "dragover", funcs.over);
      toggle(cm.display.scroller, "dragleave", funcs.leave);
      toggle(cm.display.scroller, "drop", funcs.drop);
    }
  }

  function wrappingChanged(cm) {
    if (cm.options.lineWrapping) {
      addClass(cm.display.wrapper, "CodeMirror-wrap");
      cm.display.sizer.style.minWidth = "";
      cm.display.sizerWidth = null;
    } else {
      rmClass(cm.display.wrapper, "CodeMirror-wrap");
      findMaxLine(cm);
    }

    estimateLineHeights(cm);
    regChange(cm);
    clearCaches(cm);
    setTimeout(function () {
      return updateScrollbars(cm);
    }, 100);
  } // A CodeMirror instance represents an editor. This is the object
  // that user code is usually dealing with.


  function CodeMirror(place, options) {
    var this$1 = this;

    if (!(this instanceof CodeMirror)) {
      return new CodeMirror(place, options);
    }

    this.options = options = options ? copyObj(options) : {}; // Determine effective options based on given values and defaults.

    copyObj(defaults, options, false);
    var doc = options.value;

    if (typeof doc == "string") {
      doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction);
    } else if (options.mode) {
      doc.modeOption = options.mode;
    }

    this.doc = doc;
    var input = new CodeMirror.inputStyles[options.inputStyle](this);
    var display = this.display = new Display(place, doc, input, options);
    display.wrapper.CodeMirror = this;
    themeChanged(this);

    if (options.lineWrapping) {
      this.display.wrapper.className += " CodeMirror-wrap";
    }

    initScrollbars(this);
    this.state = {
      keyMaps: [],
      // stores maps added by addKeyMap
      overlays: [],
      // highlighting overlays, as added by addOverlay
      modeGen: 0,
      // bumped when mode/overlay changes, used to invalidate highlighting info
      overwrite: false,
      delayingBlurEvent: false,
      focused: false,
      suppressEdits: false,
      // used to disable editing during key handlers when in readOnly mode
      pasteIncoming: -1,
      cutIncoming: -1,
      // help recognize paste/cut edits in input.poll
      selectingText: false,
      draggingText: false,
      highlight: new Delayed(),
      // stores highlight worker timeout
      keySeq: null,
      // Unfinished key sequence
      specialChars: null
    };

    if (options.autofocus && !mobile) {
      display.input.focus();
    } // Override magic textarea content restore that IE sometimes does
    // on our hidden textarea on reload


    if (ie && ie_version < 11) {
      setTimeout(function () {
        return this$1.display.input.reset(true);
      }, 20);
    }

    registerEventHandlers(this);
    ensureGlobalHandlers();

    _startOperation(this);

    this.curOp.forceUpdate = true;
    attachDoc(this, doc);

    if (options.autofocus && !mobile || this.hasFocus()) {
      setTimeout(function () {
        if (this$1.hasFocus() && !this$1.state.focused) {
          onFocus(this$1);
        }
      }, 20);
    } else {
      onBlur(this);
    }

    for (var opt in optionHandlers) {
      if (optionHandlers.hasOwnProperty(opt)) {
        optionHandlers[opt](this, options[opt], Init);
      }
    }

    maybeUpdateLineNumberWidth(this);

    if (options.finishInit) {
      options.finishInit(this);
    }

    for (var i = 0; i < initHooks.length; ++i) {
      initHooks[i](this);
    }

    _endOperation(this); // Suppress optimizelegibility in Webkit, since it breaks text
    // measuring on line wrapping boundaries.


    if (webkit && options.lineWrapping && getComputedStyle(display.lineDiv).textRendering == "optimizelegibility") {
      display.lineDiv.style.textRendering = "auto";
    }
  } // The default configuration options.


  CodeMirror.defaults = defaults; // Functions to run when options are changed.

  CodeMirror.optionHandlers = optionHandlers; // Attach the necessary event handlers when initializing the editor

  function registerEventHandlers(cm) {
    var d = cm.display;
    on(d.scroller, "mousedown", operation(cm, onMouseDown)); // Older IE's will not fire a second mousedown for a double click

    if (ie && ie_version < 11) {
      on(d.scroller, "dblclick", operation(cm, function (e) {
        if (signalDOMEvent(cm, e)) {
          return;
        }

        var pos = posFromMouse(cm, e);

        if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) {
          return;
        }

        e_preventDefault(e);
        var word = cm.findWordAt(pos);
        extendSelection(cm.doc, word.anchor, word.head);
      }));
    } else {
      on(d.scroller, "dblclick", function (e) {
        return signalDOMEvent(cm, e) || e_preventDefault(e);
      });
    } // Some browsers fire contextmenu *after* opening the menu, at
    // which point we can't mess with it anymore. Context menu is
    // handled in onMouseDown for these browsers.


    on(d.scroller, "contextmenu", function (e) {
      return onContextMenu(cm, e);
    });
    on(d.input.getField(), "contextmenu", function (e) {
      if (!d.scroller.contains(e.target)) {
        onContextMenu(cm, e);
      }
    }); // Used to suppress mouse event handling when a touch happens

    var touchFinished,
        prevTouch = {
      end: 0
    };

    function finishTouch() {
      if (d.activeTouch) {
        touchFinished = setTimeout(function () {
          return d.activeTouch = null;
        }, 1000);
        prevTouch = d.activeTouch;
        prevTouch.end = +new Date();
      }
    }

    function isMouseLikeTouchEvent(e) {
      if (e.touches.length != 1) {
        return false;
      }

      var touch = e.touches[0];
      return touch.radiusX <= 1 && touch.radiusY <= 1;
    }

    function farAway(touch, other) {
      if (other.left == null) {
        return true;
      }

      var dx = other.left - touch.left,
          dy = other.top - touch.top;
      return dx * dx + dy * dy > 20 * 20;
    }

    on(d.scroller, "touchstart", function (e) {
      if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e) && !clickInGutter(cm, e)) {
        d.input.ensurePolled();
        clearTimeout(touchFinished);
        var now = +new Date();
        d.activeTouch = {
          start: now,
          moved: false,
          prev: now - prevTouch.end <= 300 ? prevTouch : null
        };

        if (e.touches.length == 1) {
          d.activeTouch.left = e.touches[0].pageX;
          d.activeTouch.top = e.touches[0].pageY;
        }
      }
    });
    on(d.scroller, "touchmove", function () {
      if (d.activeTouch) {
        d.activeTouch.moved = true;
      }
    });
    on(d.scroller, "touchend", function (e) {
      var touch = d.activeTouch;

      if (touch && !eventInWidget(d, e) && touch.left != null && !touch.moved && new Date() - touch.start < 300) {
        var pos = cm.coordsChar(d.activeTouch, "page"),
            range;

        if (!touch.prev || farAway(touch, touch.prev)) // Single tap
          {
            range = new Range(pos, pos);
          } else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap
          {
            range = cm.findWordAt(pos);
          } else // Triple tap
          {
            range = new Range(Pos(pos.line, 0), _clipPos(cm.doc, Pos(pos.line + 1, 0)));
          }

        cm.setSelection(range.anchor, range.head);
        cm.focus();
        e_preventDefault(e);
      }

      finishTouch();
    });
    on(d.scroller, "touchcancel", finishTouch); // Sync scrolling between fake scrollbars and real scrollable
    // area, ensure viewport is updated when scrolling.

    on(d.scroller, "scroll", function () {
      if (d.scroller.clientHeight) {
        updateScrollTop(cm, d.scroller.scrollTop);
        setScrollLeft(cm, d.scroller.scrollLeft, true);
        signal(cm, "scroll", cm);
      }
    }); // Listen to wheel events in order to try and update the viewport on time.

    on(d.scroller, "mousewheel", function (e) {
      return onScrollWheel(cm, e);
    });
    on(d.scroller, "DOMMouseScroll", function (e) {
      return onScrollWheel(cm, e);
    }); // Prevent wrapper from ever scrolling

    on(d.wrapper, "scroll", function () {
      return d.wrapper.scrollTop = d.wrapper.scrollLeft = 0;
    });
    d.dragFunctions = {
      enter: function enter(e) {
        if (!signalDOMEvent(cm, e)) {
          e_stop(e);
        }
      },
      over: function over(e) {
        if (!signalDOMEvent(cm, e)) {
          onDragOver(cm, e);
          e_stop(e);
        }
      },
      start: function start(e) {
        return onDragStart(cm, e);
      },
      drop: operation(cm, onDrop),
      leave: function leave(e) {
        if (!signalDOMEvent(cm, e)) {
          clearDragCursor(cm);
        }
      }
    };
    var inp = d.input.getField();
    on(inp, "keyup", function (e) {
      return onKeyUp.call(cm, e);
    });
    on(inp, "keydown", operation(cm, onKeyDown));
    on(inp, "keypress", operation(cm, onKeyPress));
    on(inp, "focus", function (e) {
      return onFocus(cm, e);
    });
    on(inp, "blur", function (e) {
      return onBlur(cm, e);
    });
  }

  var initHooks = [];

  CodeMirror.defineInitHook = function (f) {
    return initHooks.push(f);
  }; // Indent the given line. The how parameter can be "smart",
  // "add"/null, "subtract", or "prev". When aggressive is false
  // (typically set to true for forced single-line indents), empty
  // lines are not indented, and places where the mode returns Pass
  // are left alone.


  function indentLine(cm, n, how, aggressive) {
    var doc = cm.doc,
        state;

    if (how == null) {
      how = "add";
    }

    if (how == "smart") {
      // Fall back to "prev" when the mode doesn't have an indentation
      // method.
      if (!doc.mode.indent) {
        how = "prev";
      } else {
        state = getContextBefore(cm, n).state;
      }
    }

    var tabSize = cm.options.tabSize;
    var line = getLine(doc, n),
        curSpace = countColumn(line.text, null, tabSize);

    if (line.stateAfter) {
      line.stateAfter = null;
    }

    var curSpaceString = line.text.match(/^\s*/)[0],
        indentation;

    if (!aggressive && !/\S/.test(line.text)) {
      indentation = 0;
      how = "not";
    } else if (how == "smart") {
      indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);

      if (indentation == Pass || indentation > 150) {
        if (!aggressive) {
          return;
        }

        how = "prev";
      }
    }

    if (how == "prev") {
      if (n > doc.first) {
        indentation = countColumn(getLine(doc, n - 1).text, null, tabSize);
      } else {
        indentation = 0;
      }
    } else if (how == "add") {
      indentation = curSpace + cm.options.indentUnit;
    } else if (how == "subtract") {
      indentation = curSpace - cm.options.indentUnit;
    } else if (typeof how == "number") {
      indentation = curSpace + how;
    }

    indentation = Math.max(0, indentation);
    var indentString = "",
        pos = 0;

    if (cm.options.indentWithTabs) {
      for (var i = Math.floor(indentation / tabSize); i; --i) {
        pos += tabSize;
        indentString += "\t";
      }
    }

    if (pos < indentation) {
      indentString += spaceStr(indentation - pos);
    }

    if (indentString != curSpaceString) {
      _replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input");

      line.stateAfter = null;
      return true;
    } else {
      // Ensure that, if the cursor was in the whitespace at the start
      // of the line, it is moved to the end of that space.
      for (var i$1 = 0; i$1 < doc.sel.ranges.length; i$1++) {
        var range = doc.sel.ranges[i$1];

        if (range.head.line == n && range.head.ch < curSpaceString.length) {
          var pos$1 = Pos(n, curSpaceString.length);
          replaceOneSelection(doc, i$1, new Range(pos$1, pos$1));
          break;
        }
      }
    }
  } // This will be set to a {lineWise: bool, text: [string]} object, so
  // that, when pasting, we know what kind of selections the copied
  // text was made out of.


  var lastCopied = null;

  function setLastCopied(newLastCopied) {
    lastCopied = newLastCopied;
  }

  function applyTextInput(cm, inserted, deleted, sel, origin) {
    var doc = cm.doc;
    cm.display.shift = false;

    if (!sel) {
      sel = doc.sel;
    }

    var recent = +new Date() - 200;
    var paste = origin == "paste" || cm.state.pasteIncoming > recent;
    var textLines = splitLinesAuto(inserted),
        multiPaste = null; // When pasting N lines into N selections, insert one line per selection

    if (paste && sel.ranges.length > 1) {
      if (lastCopied && lastCopied.text.join("\n") == inserted) {
        if (sel.ranges.length % lastCopied.text.length == 0) {
          multiPaste = [];

          for (var i = 0; i < lastCopied.text.length; i++) {
            multiPaste.push(doc.splitLines(lastCopied.text[i]));
          }
        }
      } else if (textLines.length == sel.ranges.length && cm.options.pasteLinesPerSelection) {
        multiPaste = map(textLines, function (l) {
          return [l];
        });
      }
    }

    var updateInput = cm.curOp.updateInput; // Normal behavior is to insert the new text into every selection

    for (var i$1 = sel.ranges.length - 1; i$1 >= 0; i$1--) {
      var range = sel.ranges[i$1];
      var from = range.from(),
          to = range.to();

      if (range.empty()) {
        if (deleted && deleted > 0) // Handle deletion
          {
            from = Pos(from.line, from.ch - deleted);
          } else if (cm.state.overwrite && !paste) // Handle overwrite
          {
            to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length));
          } else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") == textLines.join("\n")) {
          from = to = Pos(from.line, 0);
        }
      }

      var changeEvent = {
        from: from,
        to: to,
        text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines,
        origin: origin || (paste ? "paste" : cm.state.cutIncoming > recent ? "cut" : "+input")
      };
      makeChange(cm.doc, changeEvent);
      signalLater(cm, "inputRead", cm, changeEvent);
    }

    if (inserted && !paste) {
      triggerElectric(cm, inserted);
    }

    ensureCursorVisible(cm);

    if (cm.curOp.updateInput < 2) {
      cm.curOp.updateInput = updateInput;
    }

    cm.curOp.typing = true;
    cm.state.pasteIncoming = cm.state.cutIncoming = -1;
  }

  function handlePaste(e, cm) {
    var pasted = e.clipboardData && e.clipboardData.getData("Text");

    if (pasted) {
      e.preventDefault();

      if (!cm.isReadOnly() && !cm.options.disableInput) {
        runInOp(cm, function () {
          return applyTextInput(cm, pasted, 0, null, "paste");
        });
      }

      return true;
    }
  }

  function triggerElectric(cm, inserted) {
    // When an 'electric' character is inserted, immediately trigger a reindent
    if (!cm.options.electricChars || !cm.options.smartIndent) {
      return;
    }

    var sel = cm.doc.sel;

    for (var i = sel.ranges.length - 1; i >= 0; i--) {
      var range = sel.ranges[i];

      if (range.head.ch > 100 || i && sel.ranges[i - 1].head.line == range.head.line) {
        continue;
      }

      var mode = cm.getModeAt(range.head);
      var indented = false;

      if (mode.electricChars) {
        for (var j = 0; j < mode.electricChars.length; j++) {
          if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {
            indented = indentLine(cm, range.head.line, "smart");
            break;
          }
        }
      } else if (mode.electricInput) {
        if (mode.electricInput.test(getLine(cm.doc, range.head.line).text.slice(0, range.head.ch))) {
          indented = indentLine(cm, range.head.line, "smart");
        }
      }

      if (indented) {
        signalLater(cm, "electricInput", cm, range.head.line);
      }
    }
  }

  function copyableRanges(cm) {
    var text = [],
        ranges = [];

    for (var i = 0; i < cm.doc.sel.ranges.length; i++) {
      var line = cm.doc.sel.ranges[i].head.line;
      var lineRange = {
        anchor: Pos(line, 0),
        head: Pos(line + 1, 0)
      };
      ranges.push(lineRange);
      text.push(cm.getRange(lineRange.anchor, lineRange.head));
    }

    return {
      text: text,
      ranges: ranges
    };
  }

  function disableBrowserMagic(field, spellcheck, autocorrect, autocapitalize) {
    field.setAttribute("autocorrect", autocorrect ? "" : "off");
    field.setAttribute("autocapitalize", autocapitalize ? "" : "off");
    field.setAttribute("spellcheck", !!spellcheck);
  }

  function hiddenTextarea() {
    var te = elt("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none");
    var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;"); // The textarea is kept positioned near the cursor to prevent the
    // fact that it'll be scrolled into view on input from scrolling
    // our fake cursor out of view. On webkit, when wrap=off, paste is
    // very slow. So make the area wide instead.

    if (webkit) {
      te.style.width = "1000px";
    } else {
      te.setAttribute("wrap", "off");
    } // If border: 0; -- iOS fails to open keyboard (issue #1287)


    if (ios) {
      te.style.border = "1px solid black";
    }

    disableBrowserMagic(te);
    return div;
  } // The publicly visible API. Note that methodOp(f) means
  // 'wrap f in an operation, performed on its `this` parameter'.
  // This is not the complete set of editor methods. Most of the
  // methods defined on the Doc type are also injected into
  // CodeMirror.prototype, for backwards compatibility and
  // convenience.


  function addEditorMethods(CodeMirror) {
    var optionHandlers = CodeMirror.optionHandlers;
    var helpers = CodeMirror.helpers = {};
    CodeMirror.prototype = {
      constructor: CodeMirror,
      focus: function focus() {
        window.focus();
        this.display.input.focus();
      },
      setOption: function setOption(option, value) {
        var options = this.options,
            old = options[option];

        if (options[option] == value && option != "mode") {
          return;
        }

        options[option] = value;

        if (optionHandlers.hasOwnProperty(option)) {
          operation(this, optionHandlers[option])(this, value, old);
        }

        signal(this, "optionChange", this, option);
      },
      getOption: function getOption(option) {
        return this.options[option];
      },
      getDoc: function getDoc() {
        return this.doc;
      },
      addKeyMap: function addKeyMap(map, bottom) {
        this.state.keyMaps[bottom ? "push" : "unshift"](getKeyMap(map));
      },
      removeKeyMap: function removeKeyMap(map) {
        var maps = this.state.keyMaps;

        for (var i = 0; i < maps.length; ++i) {
          if (maps[i] == map || maps[i].name == map) {
            maps.splice(i, 1);
            return true;
          }
        }
      },
      addOverlay: methodOp(function (spec, options) {
        var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);

        if (mode.startState) {
          throw new Error("Overlays may not be stateful.");
        }

        insertSorted(this.state.overlays, {
          mode: mode,
          modeSpec: spec,
          opaque: options && options.opaque,
          priority: options && options.priority || 0
        }, function (overlay) {
          return overlay.priority;
        });
        this.state.modeGen++;
        regChange(this);
      }),
      removeOverlay: methodOp(function (spec) {
        var overlays = this.state.overlays;

        for (var i = 0; i < overlays.length; ++i) {
          var cur = overlays[i].modeSpec;

          if (cur == spec || typeof spec == "string" && cur.name == spec) {
            overlays.splice(i, 1);
            this.state.modeGen++;
            regChange(this);
            return;
          }
        }
      }),
      indentLine: methodOp(function (n, dir, aggressive) {
        if (typeof dir != "string" && typeof dir != "number") {
          if (dir == null) {
            dir = this.options.smartIndent ? "smart" : "prev";
          } else {
            dir = dir ? "add" : "subtract";
          }
        }

        if (isLine(this.doc, n)) {
          indentLine(this, n, dir, aggressive);
        }
      }),
      indentSelection: methodOp(function (how) {
        var ranges = this.doc.sel.ranges,
            end = -1;

        for (var i = 0; i < ranges.length; i++) {
          var range = ranges[i];

          if (!range.empty()) {
            var from = range.from(),
                to = range.to();
            var start = Math.max(end, from.line);
            end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1;

            for (var j = start; j < end; ++j) {
              indentLine(this, j, how);
            }

            var newRanges = this.doc.sel.ranges;

            if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0) {
              replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll);
            }
          } else if (range.head.line > end) {
            indentLine(this, range.head.line, how, true);
            end = range.head.line;

            if (i == this.doc.sel.primIndex) {
              ensureCursorVisible(this);
            }
          }
        }
      }),
      // Fetch the parser token for a given character. Useful for hacks
      // that want to inspect the mode state (say, for completion).
      getTokenAt: function getTokenAt(pos, precise) {
        return takeToken(this, pos, precise);
      },
      getLineTokens: function getLineTokens(line, precise) {
        return takeToken(this, Pos(line), precise, true);
      },
      getTokenTypeAt: function getTokenTypeAt(pos) {
        pos = _clipPos(this.doc, pos);
        var styles = getLineStyles(this, getLine(this.doc, pos.line));
        var before = 0,
            after = (styles.length - 1) / 2,
            ch = pos.ch;
        var type;

        if (ch == 0) {
          type = styles[2];
        } else {
          for (;;) {
            var mid = before + after >> 1;

            if ((mid ? styles[mid * 2 - 1] : 0) >= ch) {
              after = mid;
            } else if (styles[mid * 2 + 1] < ch) {
              before = mid + 1;
            } else {
              type = styles[mid * 2 + 2];
              break;
            }
          }
        }

        var cut = type ? type.indexOf("overlay ") : -1;
        return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1);
      },
      getModeAt: function getModeAt(pos) {
        var mode = this.doc.mode;

        if (!mode.innerMode) {
          return mode;
        }

        return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode;
      },
      getHelper: function getHelper(pos, type) {
        return this.getHelpers(pos, type)[0];
      },
      getHelpers: function getHelpers(pos, type) {
        var found = [];

        if (!helpers.hasOwnProperty(type)) {
          return found;
        }

        var help = helpers[type],
            mode = this.getModeAt(pos);

        if (typeof mode[type] == "string") {
          if (help[mode[type]]) {
            found.push(help[mode[type]]);
          }
        } else if (mode[type]) {
          for (var i = 0; i < mode[type].length; i++) {
            var val = help[mode[type][i]];

            if (val) {
              found.push(val);
            }
          }
        } else if (mode.helperType && help[mode.helperType]) {
          found.push(help[mode.helperType]);
        } else if (help[mode.name]) {
          found.push(help[mode.name]);
        }

        for (var i$1 = 0; i$1 < help._global.length; i$1++) {
          var cur = help._global[i$1];

          if (cur.pred(mode, this) && indexOf(found, cur.val) == -1) {
            found.push(cur.val);
          }
        }

        return found;
      },
      getStateAfter: function getStateAfter(line, precise) {
        var doc = this.doc;
        line = clipLine(doc, line == null ? doc.first + doc.size - 1 : line);
        return getContextBefore(this, line + 1, precise).state;
      },
      cursorCoords: function cursorCoords(start, mode) {
        var pos,
            range = this.doc.sel.primary();

        if (start == null) {
          pos = range.head;
        } else if (_typeof(start) == "object") {
          pos = _clipPos(this.doc, start);
        } else {
          pos = start ? range.from() : range.to();
        }

        return _cursorCoords(this, pos, mode || "page");
      },
      charCoords: function charCoords(pos, mode) {
        return _charCoords(this, _clipPos(this.doc, pos), mode || "page");
      },
      coordsChar: function coordsChar(coords, mode) {
        coords = fromCoordSystem(this, coords, mode || "page");
        return _coordsChar(this, coords.left, coords.top);
      },
      lineAtHeight: function lineAtHeight(height, mode) {
        height = fromCoordSystem(this, {
          top: height,
          left: 0
        }, mode || "page").top;
        return _lineAtHeight(this.doc, height + this.display.viewOffset);
      },
      heightAtLine: function heightAtLine(line, mode, includeWidgets) {
        var end = false,
            lineObj;

        if (typeof line == "number") {
          var last = this.doc.first + this.doc.size - 1;

          if (line < this.doc.first) {
            line = this.doc.first;
          } else if (line > last) {
            line = last;
            end = true;
          }

          lineObj = getLine(this.doc, line);
        } else {
          lineObj = line;
        }

        return intoCoordSystem(this, lineObj, {
          top: 0,
          left: 0
        }, mode || "page", includeWidgets || end).top + (end ? this.doc.height - _heightAtLine(lineObj) : 0);
      },
      defaultTextHeight: function defaultTextHeight() {
        return textHeight(this.display);
      },
      defaultCharWidth: function defaultCharWidth() {
        return charWidth(this.display);
      },
      getViewport: function getViewport() {
        return {
          from: this.display.viewFrom,
          to: this.display.viewTo
        };
      },
      addWidget: function addWidget(pos, node, scroll, vert, horiz) {
        var display = this.display;
        pos = _cursorCoords(this, _clipPos(this.doc, pos));
        var top = pos.bottom,
            left = pos.left;
        node.style.position = "absolute";
        node.setAttribute("cm-ignore-events", "true");
        this.display.input.setUneditable(node);
        display.sizer.appendChild(node);

        if (vert == "over") {
          top = pos.top;
        } else if (vert == "above" || vert == "near") {
          var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),
              hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth); // Default to positioning above (if specified and possible); otherwise default to positioning below

          if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight) {
            top = pos.top - node.offsetHeight;
          } else if (pos.bottom + node.offsetHeight <= vspace) {
            top = pos.bottom;
          }

          if (left + node.offsetWidth > hspace) {
            left = hspace - node.offsetWidth;
          }
        }

        node.style.top = top + "px";
        node.style.left = node.style.right = "";

        if (horiz == "right") {
          left = display.sizer.clientWidth - node.offsetWidth;
          node.style.right = "0px";
        } else {
          if (horiz == "left") {
            left = 0;
          } else if (horiz == "middle") {
            left = (display.sizer.clientWidth - node.offsetWidth) / 2;
          }

          node.style.left = left + "px";
        }

        if (scroll) {
          scrollIntoView(this, {
            left: left,
            top: top,
            right: left + node.offsetWidth,
            bottom: top + node.offsetHeight
          });
        }
      },
      triggerOnKeyDown: methodOp(onKeyDown),
      triggerOnKeyPress: methodOp(onKeyPress),
      triggerOnKeyUp: onKeyUp,
      triggerOnMouseDown: methodOp(onMouseDown),
      execCommand: function execCommand(cmd) {
        if (commands.hasOwnProperty(cmd)) {
          return commands[cmd].call(null, this);
        }
      },
      triggerElectric: methodOp(function (text) {
        triggerElectric(this, text);
      }),
      findPosH: function findPosH(from, amount, unit, visually) {
        var dir = 1;

        if (amount < 0) {
          dir = -1;
          amount = -amount;
        }

        var cur = _clipPos(this.doc, from);

        for (var i = 0; i < amount; ++i) {
          cur = _findPosH(this.doc, cur, dir, unit, visually);

          if (cur.hitSide) {
            break;
          }
        }

        return cur;
      },
      moveH: methodOp(function (dir, unit) {
        var this$1 = this;
        this.extendSelectionsBy(function (range) {
          if (this$1.display.shift || this$1.doc.extend || range.empty()) {
            return _findPosH(this$1.doc, range.head, dir, unit, this$1.options.rtlMoveVisually);
          } else {
            return dir < 0 ? range.from() : range.to();
          }
        }, sel_move);
      }),
      deleteH: methodOp(function (dir, unit) {
        var sel = this.doc.sel,
            doc = this.doc;

        if (sel.somethingSelected()) {
          doc.replaceSelection("", null, "+delete");
        } else {
          deleteNearSelection(this, function (range) {
            var other = _findPosH(doc, range.head, dir, unit, false);

            return dir < 0 ? {
              from: other,
              to: range.head
            } : {
              from: range.head,
              to: other
            };
          });
        }
      }),
      findPosV: function findPosV(from, amount, unit, goalColumn) {
        var dir = 1,
            x = goalColumn;

        if (amount < 0) {
          dir = -1;
          amount = -amount;
        }

        var cur = _clipPos(this.doc, from);

        for (var i = 0; i < amount; ++i) {
          var coords = _cursorCoords(this, cur, "div");

          if (x == null) {
            x = coords.left;
          } else {
            coords.left = x;
          }

          cur = _findPosV(this, coords, dir, unit);

          if (cur.hitSide) {
            break;
          }
        }

        return cur;
      },
      moveV: methodOp(function (dir, unit) {
        var this$1 = this;
        var doc = this.doc,
            goals = [];
        var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected();
        doc.extendSelectionsBy(function (range) {
          if (collapse) {
            return dir < 0 ? range.from() : range.to();
          }

          var headPos = _cursorCoords(this$1, range.head, "div");

          if (range.goalColumn != null) {
            headPos.left = range.goalColumn;
          }

          goals.push(headPos.left);

          var pos = _findPosV(this$1, headPos, dir, unit);

          if (unit == "page" && range == doc.sel.primary()) {
            addToScrollTop(this$1, _charCoords(this$1, pos, "div").top - headPos.top);
          }

          return pos;
        }, sel_move);

        if (goals.length) {
          for (var i = 0; i < doc.sel.ranges.length; i++) {
            doc.sel.ranges[i].goalColumn = goals[i];
          }
        }
      }),
      // Find the word at the given position (as returned by coordsChar).
      findWordAt: function findWordAt(pos) {
        var doc = this.doc,
            line = getLine(doc, pos.line).text;
        var start = pos.ch,
            end = pos.ch;

        if (line) {
          var helper = this.getHelper(pos, "wordChars");

          if ((pos.sticky == "before" || end == line.length) && start) {
            --start;
          } else {
            ++end;
          }

          var startChar = line.charAt(start);
          var check = isWordChar(startChar, helper) ? function (ch) {
            return isWordChar(ch, helper);
          } : /\s/.test(startChar) ? function (ch) {
            return /\s/.test(ch);
          } : function (ch) {
            return !/\s/.test(ch) && !isWordChar(ch);
          };

          while (start > 0 && check(line.charAt(start - 1))) {
            --start;
          }

          while (end < line.length && check(line.charAt(end))) {
            ++end;
          }
        }

        return new Range(Pos(pos.line, start), Pos(pos.line, end));
      },
      toggleOverwrite: function toggleOverwrite(value) {
        if (value != null && value == this.state.overwrite) {
          return;
        }

        if (this.state.overwrite = !this.state.overwrite) {
          addClass(this.display.cursorDiv, "CodeMirror-overwrite");
        } else {
          rmClass(this.display.cursorDiv, "CodeMirror-overwrite");
        }

        signal(this, "overwriteToggle", this, this.state.overwrite);
      },
      hasFocus: function hasFocus() {
        return this.display.input.getField() == activeElt();
      },
      isReadOnly: function isReadOnly() {
        return !!(this.options.readOnly || this.doc.cantEdit);
      },
      scrollTo: methodOp(function (x, y) {
        scrollToCoords(this, x, y);
      }),
      getScrollInfo: function getScrollInfo() {
        var scroller = this.display.scroller;
        return {
          left: scroller.scrollLeft,
          top: scroller.scrollTop,
          height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,
          width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,
          clientHeight: displayHeight(this),
          clientWidth: displayWidth(this)
        };
      },
      scrollIntoView: methodOp(function (range, margin) {
        if (range == null) {
          range = {
            from: this.doc.sel.primary().head,
            to: null
          };

          if (margin == null) {
            margin = this.options.cursorScrollMargin;
          }
        } else if (typeof range == "number") {
          range = {
            from: Pos(range, 0),
            to: null
          };
        } else if (range.from == null) {
          range = {
            from: range,
            to: null
          };
        }

        if (!range.to) {
          range.to = range.from;
        }

        range.margin = margin || 0;

        if (range.from.line != null) {
          scrollToRange(this, range);
        } else {
          scrollToCoordsRange(this, range.from, range.to, range.margin);
        }
      }),
      setSize: methodOp(function (width, height) {
        var this$1 = this;

        var interpret = function interpret(val) {
          return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val;
        };

        if (width != null) {
          this.display.wrapper.style.width = interpret(width);
        }

        if (height != null) {
          this.display.wrapper.style.height = interpret(height);
        }

        if (this.options.lineWrapping) {
          clearLineMeasurementCache(this);
        }

        var lineNo = this.display.viewFrom;
        this.doc.iter(lineNo, this.display.viewTo, function (line) {
          if (line.widgets) {
            for (var i = 0; i < line.widgets.length; i++) {
              if (line.widgets[i].noHScroll) {
                regLineChange(this$1, lineNo, "widget");
                break;
              }
            }
          }

          ++lineNo;
        });
        this.curOp.forceUpdate = true;
        signal(this, "refresh", this);
      }),
      operation: function operation(f) {
        return runInOp(this, f);
      },
      startOperation: function startOperation() {
        return _startOperation(this);
      },
      endOperation: function endOperation() {
        return _endOperation(this);
      },
      refresh: methodOp(function () {
        var oldHeight = this.display.cachedTextHeight;
        regChange(this);
        this.curOp.forceUpdate = true;
        clearCaches(this);
        scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop);
        updateGutterSpace(this.display);

        if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5 || this.options.lineWrapping) {
          estimateLineHeights(this);
        }

        signal(this, "refresh", this);
      }),
      swapDoc: methodOp(function (doc) {
        var old = this.doc;
        old.cm = null; // Cancel the current text selection if any (#5821)

        if (this.state.selectingText) {
          this.state.selectingText();
        }

        attachDoc(this, doc);
        clearCaches(this);
        this.display.input.reset();
        scrollToCoords(this, doc.scrollLeft, doc.scrollTop);
        this.curOp.forceScroll = true;
        signalLater(this, "swapDoc", this, old);
        return old;
      }),
      phrase: function phrase(phraseText) {
        var phrases = this.options.phrases;
        return phrases && Object.prototype.hasOwnProperty.call(phrases, phraseText) ? phrases[phraseText] : phraseText;
      },
      getInputField: function getInputField() {
        return this.display.input.getField();
      },
      getWrapperElement: function getWrapperElement() {
        return this.display.wrapper;
      },
      getScrollerElement: function getScrollerElement() {
        return this.display.scroller;
      },
      getGutterElement: function getGutterElement() {
        return this.display.gutters;
      }
    };
    eventMixin(CodeMirror);

    CodeMirror.registerHelper = function (type, name, value) {
      if (!helpers.hasOwnProperty(type)) {
        helpers[type] = CodeMirror[type] = {
          _global: []
        };
      }

      helpers[type][name] = value;
    };

    CodeMirror.registerGlobalHelper = function (type, name, predicate, value) {
      CodeMirror.registerHelper(type, name, value);

      helpers[type]._global.push({
        pred: predicate,
        val: value
      });
    };
  } // Used for horizontal relative motion. Dir is -1 or 1 (left or
  // right), unit can be "codepoint", "char", "column" (like char, but
  // doesn't cross line boundaries), "word" (across next word), or
  // "group" (to the start of next group of word or
  // non-word-non-whitespace chars). The visually param controls
  // whether, in right-to-left text, direction 1 means to move towards
  // the next index in the string, or towards the character to the right
  // of the current position. The resulting position will have a
  // hitSide=true property if it reached the end of the document.


  function _findPosH(doc, pos, dir, unit, visually) {
    var oldPos = pos;
    var origDir = dir;
    var lineObj = getLine(doc, pos.line);
    var lineDir = visually && doc.direction == "rtl" ? -dir : dir;

    function findNextLine() {
      var l = pos.line + lineDir;

      if (l < doc.first || l >= doc.first + doc.size) {
        return false;
      }

      pos = new Pos(l, pos.ch, pos.sticky);
      return lineObj = getLine(doc, l);
    }

    function moveOnce(boundToLine) {
      var next;

      if (unit == "codepoint") {
        var ch = lineObj.text.charCodeAt(pos.ch + (unit > 0 ? 0 : -1));

        if (isNaN(ch)) {
          next = null;
        } else {
          next = new Pos(pos.line, Math.max(0, Math.min(lineObj.text.length, pos.ch + dir * (ch >= 0xD800 && ch < 0xDC00 ? 2 : 1))), -dir);
        }
      } else if (visually) {
        next = moveVisually(doc.cm, lineObj, pos, dir);
      } else {
        next = moveLogically(lineObj, pos, dir);
      }

      if (next == null) {
        if (!boundToLine && findNextLine()) {
          pos = endOfLine(visually, doc.cm, lineObj, pos.line, lineDir);
        } else {
          return false;
        }
      } else {
        pos = next;
      }

      return true;
    }

    if (unit == "char" || unit == "codepoint") {
      moveOnce();
    } else if (unit == "column") {
      moveOnce(true);
    } else if (unit == "word" || unit == "group") {
      var sawType = null,
          group = unit == "group";
      var helper = doc.cm && doc.cm.getHelper(pos, "wordChars");

      for (var first = true;; first = false) {
        if (dir < 0 && !moveOnce(!first)) {
          break;
        }

        var cur = lineObj.text.charAt(pos.ch) || "\n";
        var type = isWordChar(cur, helper) ? "w" : group && cur == "\n" ? "n" : !group || /\s/.test(cur) ? null : "p";

        if (group && !first && !type) {
          type = "s";
        }

        if (sawType && sawType != type) {
          if (dir < 0) {
            dir = 1;
            moveOnce();
            pos.sticky = "after";
          }

          break;
        }

        if (type) {
          sawType = type;
        }

        if (dir > 0 && !moveOnce(!first)) {
          break;
        }
      }
    }

    var result = skipAtomic(doc, pos, oldPos, origDir, true);

    if (equalCursorPos(oldPos, result)) {
      result.hitSide = true;
    }

    return result;
  } // For relative vertical movement. Dir may be -1 or 1. Unit can be
  // "page" or "line". The resulting position will have a hitSide=true
  // property if it reached the end of the document.


  function _findPosV(cm, pos, dir, unit) {
    var doc = cm.doc,
        x = pos.left,
        y;

    if (unit == "page") {
      var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);
      var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3);
      y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount;
    } else if (unit == "line") {
      y = dir > 0 ? pos.bottom + 3 : pos.top - 3;
    }

    var target;

    for (;;) {
      target = _coordsChar(cm, x, y);

      if (!target.outside) {
        break;
      }

      if (dir < 0 ? y <= 0 : y >= doc.height) {
        target.hitSide = true;
        break;
      }

      y += dir * 5;
    }

    return target;
  } // CONTENTEDITABLE INPUT STYLE


  var ContentEditableInput = function ContentEditableInput(cm) {
    this.cm = cm;
    this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null;
    this.polling = new Delayed();
    this.composing = null;
    this.gracePeriod = false;
    this.readDOMTimeout = null;
  };

  ContentEditableInput.prototype.init = function (display) {
    var this$1 = this;
    var input = this,
        cm = input.cm;
    var div = input.div = display.lineDiv;
    disableBrowserMagic(div, cm.options.spellcheck, cm.options.autocorrect, cm.options.autocapitalize);

    function belongsToInput(e) {
      for (var t = e.target; t; t = t.parentNode) {
        if (t == div) {
          return true;
        }

        if (/\bCodeMirror-(?:line)?widget\b/.test(t.className)) {
          break;
        }
      }

      return false;
    }

    on(div, "paste", function (e) {
      if (!belongsToInput(e) || signalDOMEvent(cm, e) || handlePaste(e, cm)) {
        return;
      } // IE doesn't fire input events, so we schedule a read for the pasted content in this way


      if (ie_version <= 11) {
        setTimeout(operation(cm, function () {
          return this$1.updateFromDOM();
        }), 20);
      }
    });
    on(div, "compositionstart", function (e) {
      this$1.composing = {
        data: e.data,
        done: false
      };
    });
    on(div, "compositionupdate", function (e) {
      if (!this$1.composing) {
        this$1.composing = {
          data: e.data,
          done: false
        };
      }
    });
    on(div, "compositionend", function (e) {
      if (this$1.composing) {
        if (e.data != this$1.composing.data) {
          this$1.readFromDOMSoon();
        }

        this$1.composing.done = true;
      }
    });
    on(div, "touchstart", function () {
      return input.forceCompositionEnd();
    });
    on(div, "input", function () {
      if (!this$1.composing) {
        this$1.readFromDOMSoon();
      }
    });

    function onCopyCut(e) {
      if (!belongsToInput(e) || signalDOMEvent(cm, e)) {
        return;
      }

      if (cm.somethingSelected()) {
        setLastCopied({
          lineWise: false,
          text: cm.getSelections()
        });

        if (e.type == "cut") {
          cm.replaceSelection("", null, "cut");
        }
      } else if (!cm.options.lineWiseCopyCut) {
        return;
      } else {
        var ranges = copyableRanges(cm);
        setLastCopied({
          lineWise: true,
          text: ranges.text
        });

        if (e.type == "cut") {
          cm.operation(function () {
            cm.setSelections(ranges.ranges, 0, sel_dontScroll);
            cm.replaceSelection("", null, "cut");
          });
        }
      }

      if (e.clipboardData) {
        e.clipboardData.clearData();
        var content = lastCopied.text.join("\n"); // iOS exposes the clipboard API, but seems to discard content inserted into it

        e.clipboardData.setData("Text", content);

        if (e.clipboardData.getData("Text") == content) {
          e.preventDefault();
          return;
        }
      } // Old-fashioned briefly-focus-a-textarea hack


      var kludge = hiddenTextarea(),
          te = kludge.firstChild;
      cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);
      te.value = lastCopied.text.join("\n");
      var hadFocus = document.activeElement;
      selectInput(te);
      setTimeout(function () {
        cm.display.lineSpace.removeChild(kludge);
        hadFocus.focus();

        if (hadFocus == div) {
          input.showPrimarySelection();
        }
      }, 50);
    }

    on(div, "copy", onCopyCut);
    on(div, "cut", onCopyCut);
  };

  ContentEditableInput.prototype.screenReaderLabelChanged = function (label) {
    // Label for screenreaders, accessibility
    if (label) {
      this.div.setAttribute('aria-label', label);
    } else {
      this.div.removeAttribute('aria-label');
    }
  };

  ContentEditableInput.prototype.prepareSelection = function () {
    var result = prepareSelection(this.cm, false);
    result.focus = document.activeElement == this.div;
    return result;
  };

  ContentEditableInput.prototype.showSelection = function (info, takeFocus) {
    if (!info || !this.cm.display.view.length) {
      return;
    }

    if (info.focus || takeFocus) {
      this.showPrimarySelection();
    }

    this.showMultipleSelections(info);
  };

  ContentEditableInput.prototype.getSelection = function () {
    return this.cm.display.wrapper.ownerDocument.getSelection();
  };

  ContentEditableInput.prototype.showPrimarySelection = function () {
    var sel = this.getSelection(),
        cm = this.cm,
        prim = cm.doc.sel.primary();
    var from = prim.from(),
        to = prim.to();

    if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) {
      sel.removeAllRanges();
      return;
    }

    var curAnchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);
    var curFocus = domToPos(cm, sel.focusNode, sel.focusOffset);

    if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad && cmp(minPos(curAnchor, curFocus), from) == 0 && cmp(maxPos(curAnchor, curFocus), to) == 0) {
      return;
    }

    var view = cm.display.view;
    var start = from.line >= cm.display.viewFrom && posToDOM(cm, from) || {
      node: view[0].measure.map[2],
      offset: 0
    };
    var end = to.line < cm.display.viewTo && posToDOM(cm, to);

    if (!end) {
      var measure = view[view.length - 1].measure;
      var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map;
      end = {
        node: map[map.length - 1],
        offset: map[map.length - 2] - map[map.length - 3]
      };
    }

    if (!start || !end) {
      sel.removeAllRanges();
      return;
    }

    var old = sel.rangeCount && sel.getRangeAt(0),
        rng;

    try {
      rng = range(start.node, start.offset, end.offset, end.node);
    } catch (e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible


    if (rng) {
      if (!gecko && cm.state.focused) {
        sel.collapse(start.node, start.offset);

        if (!rng.collapsed) {
          sel.removeAllRanges();
          sel.addRange(rng);
        }
      } else {
        sel.removeAllRanges();
        sel.addRange(rng);
      }

      if (old && sel.anchorNode == null) {
        sel.addRange(old);
      } else if (gecko) {
        this.startGracePeriod();
      }
    }

    this.rememberSelection();
  };

  ContentEditableInput.prototype.startGracePeriod = function () {
    var this$1 = this;
    clearTimeout(this.gracePeriod);
    this.gracePeriod = setTimeout(function () {
      this$1.gracePeriod = false;

      if (this$1.selectionChanged()) {
        this$1.cm.operation(function () {
          return this$1.cm.curOp.selectionChanged = true;
        });
      }
    }, 20);
  };

  ContentEditableInput.prototype.showMultipleSelections = function (info) {
    removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors);
    removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection);
  };

  ContentEditableInput.prototype.rememberSelection = function () {
    var sel = this.getSelection();
    this.lastAnchorNode = sel.anchorNode;
    this.lastAnchorOffset = sel.anchorOffset;
    this.lastFocusNode = sel.focusNode;
    this.lastFocusOffset = sel.focusOffset;
  };

  ContentEditableInput.prototype.selectionInEditor = function () {
    var sel = this.getSelection();

    if (!sel.rangeCount) {
      return false;
    }

    var node = sel.getRangeAt(0).commonAncestorContainer;
    return contains(this.div, node);
  };

  ContentEditableInput.prototype.focus = function () {
    if (this.cm.options.readOnly != "nocursor") {
      if (!this.selectionInEditor() || document.activeElement != this.div) {
        this.showSelection(this.prepareSelection(), true);
      }

      this.div.focus();
    }
  };

  ContentEditableInput.prototype.blur = function () {
    this.div.blur();
  };

  ContentEditableInput.prototype.getField = function () {
    return this.div;
  };

  ContentEditableInput.prototype.supportsTouch = function () {
    return true;
  };

  ContentEditableInput.prototype.receivedFocus = function () {
    var input = this;

    if (this.selectionInEditor()) {
      this.pollSelection();
    } else {
      runInOp(this.cm, function () {
        return input.cm.curOp.selectionChanged = true;
      });
    }

    function poll() {
      if (input.cm.state.focused) {
        input.pollSelection();
        input.polling.set(input.cm.options.pollInterval, poll);
      }
    }

    this.polling.set(this.cm.options.pollInterval, poll);
  };

  ContentEditableInput.prototype.selectionChanged = function () {
    var sel = this.getSelection();
    return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset || sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset;
  };

  ContentEditableInput.prototype.pollSelection = function () {
    if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) {
      return;
    }

    var sel = this.getSelection(),
        cm = this.cm; // On Android Chrome (version 56, at least), backspacing into an
    // uneditable block element will put the cursor in that element,
    // and then, because it's not editable, hide the virtual keyboard.
    // Because Android doesn't allow us to actually detect backspace
    // presses in a sane way, this code checks for when that happens
    // and simulates a backspace press in this case.

    if (android && chrome && this.cm.display.gutterSpecs.length && isInGutter(sel.anchorNode)) {
      this.cm.triggerOnKeyDown({
        type: "keydown",
        keyCode: 8,
        preventDefault: Math.abs
      });
      this.blur();
      this.focus();
      return;
    }

    if (this.composing) {
      return;
    }

    this.rememberSelection();
    var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);
    var head = domToPos(cm, sel.focusNode, sel.focusOffset);

    if (anchor && head) {
      runInOp(cm, function () {
        setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll);

        if (anchor.bad || head.bad) {
          cm.curOp.selectionChanged = true;
        }
      });
    }
  };

  ContentEditableInput.prototype.pollContent = function () {
    if (this.readDOMTimeout != null) {
      clearTimeout(this.readDOMTimeout);
      this.readDOMTimeout = null;
    }

    var cm = this.cm,
        display = cm.display,
        sel = cm.doc.sel.primary();
    var from = sel.from(),
        to = sel.to();

    if (from.ch == 0 && from.line > cm.firstLine()) {
      from = Pos(from.line - 1, getLine(cm.doc, from.line - 1).length);
    }

    if (to.ch == getLine(cm.doc, to.line).text.length && to.line < cm.lastLine()) {
      to = Pos(to.line + 1, 0);
    }

    if (from.line < display.viewFrom || to.line > display.viewTo - 1) {
      return false;
    }

    var fromIndex, fromLine, fromNode;

    if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {
      fromLine = lineNo(display.view[0].line);
      fromNode = display.view[0].node;
    } else {
      fromLine = lineNo(display.view[fromIndex].line);
      fromNode = display.view[fromIndex - 1].node.nextSibling;
    }

    var toIndex = findViewIndex(cm, to.line);
    var toLine, toNode;

    if (toIndex == display.view.length - 1) {
      toLine = display.viewTo - 1;
      toNode = display.lineDiv.lastChild;
    } else {
      toLine = lineNo(display.view[toIndex + 1].line) - 1;
      toNode = display.view[toIndex + 1].node.previousSibling;
    }

    if (!fromNode) {
      return false;
    }

    var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));
    var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));

    while (newText.length > 1 && oldText.length > 1) {
      if (lst(newText) == lst(oldText)) {
        newText.pop();
        oldText.pop();
        toLine--;
      } else if (newText[0] == oldText[0]) {
        newText.shift();
        oldText.shift();
        fromLine++;
      } else {
        break;
      }
    }

    var cutFront = 0,
        cutEnd = 0;
    var newTop = newText[0],
        oldTop = oldText[0],
        maxCutFront = Math.min(newTop.length, oldTop.length);

    while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront)) {
      ++cutFront;
    }

    var newBot = lst(newText),
        oldBot = lst(oldText);
    var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0), oldBot.length - (oldText.length == 1 ? cutFront : 0));

    while (cutEnd < maxCutEnd && newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) {
      ++cutEnd;
    } // Try to move start of change to start of selection if ambiguous


    if (newText.length == 1 && oldText.length == 1 && fromLine == from.line) {
      while (cutFront && cutFront > from.ch && newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) {
        cutFront--;
        cutEnd++;
      }
    }

    newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd).replace(/^\u200b+/, "");
    newText[0] = newText[0].slice(cutFront).replace(/\u200b+$/, "");
    var chFrom = Pos(fromLine, cutFront);
    var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0);

    if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) {
      _replaceRange(cm.doc, newText, chFrom, chTo, "+input");

      return true;
    }
  };

  ContentEditableInput.prototype.ensurePolled = function () {
    this.forceCompositionEnd();
  };

  ContentEditableInput.prototype.reset = function () {
    this.forceCompositionEnd();
  };

  ContentEditableInput.prototype.forceCompositionEnd = function () {
    if (!this.composing) {
      return;
    }

    clearTimeout(this.readDOMTimeout);
    this.composing = null;
    this.updateFromDOM();
    this.div.blur();
    this.div.focus();
  };

  ContentEditableInput.prototype.readFromDOMSoon = function () {
    var this$1 = this;

    if (this.readDOMTimeout != null) {
      return;
    }

    this.readDOMTimeout = setTimeout(function () {
      this$1.readDOMTimeout = null;

      if (this$1.composing) {
        if (this$1.composing.done) {
          this$1.composing = null;
        } else {
          return;
        }
      }

      this$1.updateFromDOM();
    }, 80);
  };

  ContentEditableInput.prototype.updateFromDOM = function () {
    var this$1 = this;

    if (this.cm.isReadOnly() || !this.pollContent()) {
      runInOp(this.cm, function () {
        return regChange(this$1.cm);
      });
    }
  };

  ContentEditableInput.prototype.setUneditable = function (node) {
    node.contentEditable = "false";
  };

  ContentEditableInput.prototype.onKeyPress = function (e) {
    if (e.charCode == 0 || this.composing) {
      return;
    }

    e.preventDefault();

    if (!this.cm.isReadOnly()) {
      operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0);
    }
  };

  ContentEditableInput.prototype.readOnlyChanged = function (val) {
    this.div.contentEditable = String(val != "nocursor");
  };

  ContentEditableInput.prototype.onContextMenu = function () {};

  ContentEditableInput.prototype.resetPosition = function () {};

  ContentEditableInput.prototype.needsContentAttribute = true;

  function posToDOM(cm, pos) {
    var view = findViewForLine(cm, pos.line);

    if (!view || view.hidden) {
      return null;
    }

    var line = getLine(cm.doc, pos.line);
    var info = mapFromLineView(view, line, pos.line);
    var order = getOrder(line, cm.doc.direction),
        side = "left";

    if (order) {
      var partPos = getBidiPartAt(order, pos.ch);
      side = partPos % 2 ? "right" : "left";
    }

    var result = nodeAndOffsetInLineMap(info.map, pos.ch, side);
    result.offset = result.collapse == "right" ? result.end : result.start;
    return result;
  }

  function isInGutter(node) {
    for (var scan = node; scan; scan = scan.parentNode) {
      if (/CodeMirror-gutter-wrapper/.test(scan.className)) {
        return true;
      }
    }

    return false;
  }

  function badPos(pos, bad) {
    if (bad) {
      pos.bad = true;
    }

    return pos;
  }

  function domTextBetween(cm, from, to, fromLine, toLine) {
    var text = "",
        closing = false,
        lineSep = cm.doc.lineSeparator(),
        extraLinebreak = false;

    function recognizeMarker(id) {
      return function (marker) {
        return marker.id == id;
      };
    }

    function close() {
      if (closing) {
        text += lineSep;

        if (extraLinebreak) {
          text += lineSep;
        }

        closing = extraLinebreak = false;
      }
    }

    function addText(str) {
      if (str) {
        close();
        text += str;
      }
    }

    function walk(node) {
      if (node.nodeType == 1) {
        var cmText = node.getAttribute("cm-text");

        if (cmText) {
          addText(cmText);
          return;
        }

        var markerID = node.getAttribute("cm-marker"),
            range;

        if (markerID) {
          var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));

          if (found.length && (range = found[0].find(0))) {
            addText(getBetween(cm.doc, range.from, range.to).join(lineSep));
          }

          return;
        }

        if (node.getAttribute("contenteditable") == "false") {
          return;
        }

        var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName);

        if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) {
          return;
        }

        if (isBlock) {
          close();
        }

        for (var i = 0; i < node.childNodes.length; i++) {
          walk(node.childNodes[i]);
        }

        if (/^(pre|p)$/i.test(node.nodeName)) {
          extraLinebreak = true;
        }

        if (isBlock) {
          closing = true;
        }
      } else if (node.nodeType == 3) {
        addText(node.nodeValue.replace(/\u200b/g, "").replace(/\u00a0/g, " "));
      }
    }

    for (;;) {
      walk(from);

      if (from == to) {
        break;
      }

      from = from.nextSibling;
      extraLinebreak = false;
    }

    return text;
  }

  function domToPos(cm, node, offset) {
    var lineNode;

    if (node == cm.display.lineDiv) {
      lineNode = cm.display.lineDiv.childNodes[offset];

      if (!lineNode) {
        return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true);
      }

      node = null;
      offset = 0;
    } else {
      for (lineNode = node;; lineNode = lineNode.parentNode) {
        if (!lineNode || lineNode == cm.display.lineDiv) {
          return null;
        }

        if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) {
          break;
        }
      }
    }

    for (var i = 0; i < cm.display.view.length; i++) {
      var lineView = cm.display.view[i];

      if (lineView.node == lineNode) {
        return locateNodeInLineView(lineView, node, offset);
      }
    }
  }

  function locateNodeInLineView(lineView, node, offset) {
    var wrapper = lineView.text.firstChild,
        bad = false;

    if (!node || !contains(wrapper, node)) {
      return badPos(Pos(lineNo(lineView.line), 0), true);
    }

    if (node == wrapper) {
      bad = true;
      node = wrapper.childNodes[offset];
      offset = 0;

      if (!node) {
        var line = lineView.rest ? lst(lineView.rest) : lineView.line;
        return badPos(Pos(lineNo(line), line.text.length), bad);
      }
    }

    var textNode = node.nodeType == 3 ? node : null,
        topNode = node;

    if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {
      textNode = node.firstChild;

      if (offset) {
        offset = textNode.nodeValue.length;
      }
    }

    while (topNode.parentNode != wrapper) {
      topNode = topNode.parentNode;
    }

    var measure = lineView.measure,
        maps = measure.maps;

    function find(textNode, topNode, offset) {
      for (var i = -1; i < (maps ? maps.length : 0); i++) {
        var map = i < 0 ? measure.map : maps[i];

        for (var j = 0; j < map.length; j += 3) {
          var curNode = map[j + 2];

          if (curNode == textNode || curNode == topNode) {
            var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]);
            var ch = map[j] + offset;

            if (offset < 0 || curNode != textNode) {
              ch = map[j + (offset ? 1 : 0)];
            }

            return Pos(line, ch);
          }
        }
      }
    }

    var found = find(textNode, topNode, offset);

    if (found) {
      return badPos(found, bad);
    } // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems


    for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) {
      found = find(after, after.firstChild, 0);

      if (found) {
        return badPos(Pos(found.line, found.ch - dist), bad);
      } else {
        dist += after.textContent.length;
      }
    }

    for (var before = topNode.previousSibling, dist$1 = offset; before; before = before.previousSibling) {
      found = find(before, before.firstChild, -1);

      if (found) {
        return badPos(Pos(found.line, found.ch + dist$1), bad);
      } else {
        dist$1 += before.textContent.length;
      }
    }
  } // TEXTAREA INPUT STYLE


  var TextareaInput = function TextareaInput(cm) {
    this.cm = cm; // See input.poll and input.reset

    this.prevInput = ""; // Flag that indicates whether we expect input to appear real soon
    // now (after some event like 'keypress' or 'input') and are
    // polling intensively.

    this.pollingFast = false; // Self-resetting timeout for the poller

    this.polling = new Delayed(); // Used to work around IE issue with selection being forgotten when focus moves away from textarea

    this.hasSelection = false;
    this.composing = null;
  };

  TextareaInput.prototype.init = function (display) {
    var this$1 = this;
    var input = this,
        cm = this.cm;
    this.createField(display);
    var te = this.textarea;
    display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild); // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)

    if (ios) {
      te.style.width = "0px";
    }

    on(te, "input", function () {
      if (ie && ie_version >= 9 && this$1.hasSelection) {
        this$1.hasSelection = null;
      }

      input.poll();
    });
    on(te, "paste", function (e) {
      if (signalDOMEvent(cm, e) || handlePaste(e, cm)) {
        return;
      }

      cm.state.pasteIncoming = +new Date();
      input.fastPoll();
    });

    function prepareCopyCut(e) {
      if (signalDOMEvent(cm, e)) {
        return;
      }

      if (cm.somethingSelected()) {
        setLastCopied({
          lineWise: false,
          text: cm.getSelections()
        });
      } else if (!cm.options.lineWiseCopyCut) {
        return;
      } else {
        var ranges = copyableRanges(cm);
        setLastCopied({
          lineWise: true,
          text: ranges.text
        });

        if (e.type == "cut") {
          cm.setSelections(ranges.ranges, null, sel_dontScroll);
        } else {
          input.prevInput = "";
          te.value = ranges.text.join("\n");
          selectInput(te);
        }
      }

      if (e.type == "cut") {
        cm.state.cutIncoming = +new Date();
      }
    }

    on(te, "cut", prepareCopyCut);
    on(te, "copy", prepareCopyCut);
    on(display.scroller, "paste", function (e) {
      if (eventInWidget(display, e) || signalDOMEvent(cm, e)) {
        return;
      }

      if (!te.dispatchEvent) {
        cm.state.pasteIncoming = +new Date();
        input.focus();
        return;
      } // Pass the `paste` event to the textarea so it's handled by its event listener.


      var event = new Event("paste");
      event.clipboardData = e.clipboardData;
      te.dispatchEvent(event);
    }); // Prevent normal selection in the editor (we handle our own)

    on(display.lineSpace, "selectstart", function (e) {
      if (!eventInWidget(display, e)) {
        e_preventDefault(e);
      }
    });
    on(te, "compositionstart", function () {
      var start = cm.getCursor("from");

      if (input.composing) {
        input.composing.range.clear();
      }

      input.composing = {
        start: start,
        range: cm.markText(start, cm.getCursor("to"), {
          className: "CodeMirror-composing"
        })
      };
    });
    on(te, "compositionend", function () {
      if (input.composing) {
        input.poll();
        input.composing.range.clear();
        input.composing = null;
      }
    });
  };

  TextareaInput.prototype.createField = function (_display) {
    // Wraps and hides input textarea
    this.wrapper = hiddenTextarea(); // The semihidden textarea that is focused when the editor is
    // focused, and receives input.

    this.textarea = this.wrapper.firstChild;
  };

  TextareaInput.prototype.screenReaderLabelChanged = function (label) {
    // Label for screenreaders, accessibility
    if (label) {
      this.textarea.setAttribute('aria-label', label);
    } else {
      this.textarea.removeAttribute('aria-label');
    }
  };

  TextareaInput.prototype.prepareSelection = function () {
    // Redraw the selection and/or cursor
    var cm = this.cm,
        display = cm.display,
        doc = cm.doc;
    var result = prepareSelection(cm); // Move the hidden textarea near the cursor to prevent scrolling artifacts

    if (cm.options.moveInputWithCursor) {
      var headPos = _cursorCoords(cm, doc.sel.primary().head, "div");

      var wrapOff = display.wrapper.getBoundingClientRect(),
          lineOff = display.lineDiv.getBoundingClientRect();
      result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10, headPos.top + lineOff.top - wrapOff.top));
      result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10, headPos.left + lineOff.left - wrapOff.left));
    }

    return result;
  };

  TextareaInput.prototype.showSelection = function (drawn) {
    var cm = this.cm,
        display = cm.display;
    removeChildrenAndAdd(display.cursorDiv, drawn.cursors);
    removeChildrenAndAdd(display.selectionDiv, drawn.selection);

    if (drawn.teTop != null) {
      this.wrapper.style.top = drawn.teTop + "px";
      this.wrapper.style.left = drawn.teLeft + "px";
    }
  }; // Reset the input to correspond to the selection (or to be empty,
  // when not typing and nothing is selected)


  TextareaInput.prototype.reset = function (typing) {
    if (this.contextMenuPending || this.composing) {
      return;
    }

    var cm = this.cm;

    if (cm.somethingSelected()) {
      this.prevInput = "";
      var content = cm.getSelection();
      this.textarea.value = content;

      if (cm.state.focused) {
        selectInput(this.textarea);
      }

      if (ie && ie_version >= 9) {
        this.hasSelection = content;
      }
    } else if (!typing) {
      this.prevInput = this.textarea.value = "";

      if (ie && ie_version >= 9) {
        this.hasSelection = null;
      }
    }
  };

  TextareaInput.prototype.getField = function () {
    return this.textarea;
  };

  TextareaInput.prototype.supportsTouch = function () {
    return false;
  };

  TextareaInput.prototype.focus = function () {
    if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt() != this.textarea)) {
      try {
        this.textarea.focus();
      } catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM

    }
  };

  TextareaInput.prototype.blur = function () {
    this.textarea.blur();
  };

  TextareaInput.prototype.resetPosition = function () {
    this.wrapper.style.top = this.wrapper.style.left = 0;
  };

  TextareaInput.prototype.receivedFocus = function () {
    this.slowPoll();
  }; // Poll for input changes, using the normal rate of polling. This
  // runs as long as the editor is focused.


  TextareaInput.prototype.slowPoll = function () {
    var this$1 = this;

    if (this.pollingFast) {
      return;
    }

    this.polling.set(this.cm.options.pollInterval, function () {
      this$1.poll();

      if (this$1.cm.state.focused) {
        this$1.slowPoll();
      }
    });
  }; // When an event has just come in that is likely to add or change
  // something in the input textarea, we poll faster, to ensure that
  // the change appears on the screen quickly.


  TextareaInput.prototype.fastPoll = function () {
    var missed = false,
        input = this;
    input.pollingFast = true;

    function p() {
      var changed = input.poll();

      if (!changed && !missed) {
        missed = true;
        input.polling.set(60, p);
      } else {
        input.pollingFast = false;
        input.slowPoll();
      }
    }

    input.polling.set(20, p);
  }; // Read input from the textarea, and update the document to match.
  // When something is selected, it is present in the textarea, and
  // selected (unless it is huge, in which case a placeholder is
  // used). When nothing is selected, the cursor sits after previously
  // seen text (can be empty), which is stored in prevInput (we must
  // not reset the textarea when typing, because that breaks IME).


  TextareaInput.prototype.poll = function () {
    var this$1 = this;
    var cm = this.cm,
        input = this.textarea,
        prevInput = this.prevInput; // Since this is called a *lot*, try to bail out as cheaply as
    // possible when it is clear that nothing happened. hasSelection
    // will be the case when there is a lot of text in the textarea,
    // in which case reading its value would be expensive.

    if (this.contextMenuPending || !cm.state.focused || hasSelection(input) && !prevInput && !this.composing || cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq) {
      return false;
    }

    var text = input.value; // If nothing changed, bail.

    if (text == prevInput && !cm.somethingSelected()) {
      return false;
    } // Work around nonsensical selection resetting in IE9/10, and
    // inexplicable appearance of private area unicode characters on
    // some key combos in Mac (#2689).


    if (ie && ie_version >= 9 && this.hasSelection === text || mac && /[\uf700-\uf7ff]/.test(text)) {
      cm.display.input.reset();
      return false;
    }

    if (cm.doc.sel == cm.display.selForContextMenu) {
      var first = text.charCodeAt(0);

      if (first == 0x200b && !prevInput) {
        prevInput = "\u200B";
      }

      if (first == 0x21da) {
        this.reset();
        return this.cm.execCommand("undo");
      }
    } // Find the part of the input that is actually new


    var same = 0,
        l = Math.min(prevInput.length, text.length);

    while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) {
      ++same;
    }

    runInOp(cm, function () {
      applyTextInput(cm, text.slice(same), prevInput.length - same, null, this$1.composing ? "*compose" : null); // Don't leave long text in the textarea, since it makes further polling slow

      if (text.length > 1000 || text.indexOf("\n") > -1) {
        input.value = this$1.prevInput = "";
      } else {
        this$1.prevInput = text;
      }

      if (this$1.composing) {
        this$1.composing.range.clear();
        this$1.composing.range = cm.markText(this$1.composing.start, cm.getCursor("to"), {
          className: "CodeMirror-composing"
        });
      }
    });
    return true;
  };

  TextareaInput.prototype.ensurePolled = function () {
    if (this.pollingFast && this.poll()) {
      this.pollingFast = false;
    }
  };

  TextareaInput.prototype.onKeyPress = function () {
    if (ie && ie_version >= 9) {
      this.hasSelection = null;
    }

    this.fastPoll();
  };

  TextareaInput.prototype.onContextMenu = function (e) {
    var input = this,
        cm = input.cm,
        display = cm.display,
        te = input.textarea;

    if (input.contextMenuPending) {
      input.contextMenuPending();
    }

    var pos = posFromMouse(cm, e),
        scrollPos = display.scroller.scrollTop;

    if (!pos || presto) {
      return;
    } // Opera is difficult.
    // Reset the current text selection only if the click is done outside of the selection
    // and 'resetSelectionOnContextMenu' option is true.


    var reset = cm.options.resetSelectionOnContextMenu;

    if (reset && cm.doc.sel.contains(pos) == -1) {
      operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll);
    }

    var oldCSS = te.style.cssText,
        oldWrapperCSS = input.wrapper.style.cssText;
    var wrapperBox = input.wrapper.offsetParent.getBoundingClientRect();
    input.wrapper.style.cssText = "position: static";
    te.style.cssText = "position: absolute; width: 30px; height: 30px;\n      top: " + (e.clientY - wrapperBox.top - 5) + "px; left: " + (e.clientX - wrapperBox.left - 5) + "px;\n      z-index: 1000; background: " + (ie ? "rgba(255, 255, 255, .05)" : "transparent") + ";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";
    var oldScrollY;

    if (webkit) {
      oldScrollY = window.scrollY;
    } // Work around Chrome issue (#2712)


    display.input.focus();

    if (webkit) {
      window.scrollTo(null, oldScrollY);
    }

    display.input.reset(); // Adds "Select all" to context menu in FF

    if (!cm.somethingSelected()) {
      te.value = input.prevInput = " ";
    }

    input.contextMenuPending = rehide;
    display.selForContextMenu = cm.doc.sel;
    clearTimeout(display.detectingSelectAll); // Select-all will be greyed out if there's nothing to select, so
    // this adds a zero-width space so that we can later check whether
    // it got selected.

    function prepareSelectAllHack() {
      if (te.selectionStart != null) {
        var selected = cm.somethingSelected();
        var extval = "\u200B" + (selected ? te.value : "");
        te.value = "\u21DA"; // Used to catch context-menu undo

        te.value = extval;
        input.prevInput = selected ? "" : "\u200B";
        te.selectionStart = 1;
        te.selectionEnd = extval.length; // Re-set this, in case some other handler touched the
        // selection in the meantime.

        display.selForContextMenu = cm.doc.sel;
      }
    }

    function rehide() {
      if (input.contextMenuPending != rehide) {
        return;
      }

      input.contextMenuPending = false;
      input.wrapper.style.cssText = oldWrapperCSS;
      te.style.cssText = oldCSS;

      if (ie && ie_version < 9) {
        display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos);
      } // Try to detect the user choosing select-all


      if (te.selectionStart != null) {
        if (!ie || ie && ie_version < 9) {
          prepareSelectAllHack();
        }

        var i = 0,
            poll = function poll() {
          if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 && te.selectionEnd > 0 && input.prevInput == "\u200B") {
            operation(cm, selectAll)(cm);
          } else if (i++ < 10) {
            display.detectingSelectAll = setTimeout(poll, 500);
          } else {
            display.selForContextMenu = null;
            display.input.reset();
          }
        };

        display.detectingSelectAll = setTimeout(poll, 200);
      }
    }

    if (ie && ie_version >= 9) {
      prepareSelectAllHack();
    }

    if (captureRightClick) {
      e_stop(e);

      var mouseup = function mouseup() {
        off(window, "mouseup", mouseup);
        setTimeout(rehide, 20);
      };

      on(window, "mouseup", mouseup);
    } else {
      setTimeout(rehide, 50);
    }
  };

  TextareaInput.prototype.readOnlyChanged = function (val) {
    if (!val) {
      this.reset();
    }

    this.textarea.disabled = val == "nocursor";
    this.textarea.readOnly = !!val;
  };

  TextareaInput.prototype.setUneditable = function () {};

  TextareaInput.prototype.needsContentAttribute = false;

  function fromTextArea(textarea, options) {
    options = options ? copyObj(options) : {};
    options.value = textarea.value;

    if (!options.tabindex && textarea.tabIndex) {
      options.tabindex = textarea.tabIndex;
    }

    if (!options.placeholder && textarea.placeholder) {
      options.placeholder = textarea.placeholder;
    } // Set autofocus to true if this textarea is focused, or if it has
    // autofocus and no other element is focused.


    if (options.autofocus == null) {
      var hasFocus = activeElt();
      options.autofocus = hasFocus == textarea || textarea.getAttribute("autofocus") != null && hasFocus == document.body;
    }

    function save() {
      textarea.value = cm.getValue();
    }

    var realSubmit;

    if (textarea.form) {
      on(textarea.form, "submit", save); // Deplorable hack to make the submit method do the right thing.

      if (!options.leaveSubmitMethodAlone) {
        var form = textarea.form;
        realSubmit = form.submit;

        try {
          var wrappedSubmit = form.submit = function () {
            save();
            form.submit = realSubmit;
            form.submit();
            form.submit = wrappedSubmit;
          };
        } catch (e) {}
      }
    }

    options.finishInit = function (cm) {
      cm.save = save;

      cm.getTextArea = function () {
        return textarea;
      };

      cm.toTextArea = function () {
        cm.toTextArea = isNaN; // Prevent this from being ran twice

        save();
        textarea.parentNode.removeChild(cm.getWrapperElement());
        textarea.style.display = "";

        if (textarea.form) {
          off(textarea.form, "submit", save);

          if (!options.leaveSubmitMethodAlone && typeof textarea.form.submit == "function") {
            textarea.form.submit = realSubmit;
          }
        }
      };
    };

    textarea.style.display = "none";
    var cm = CodeMirror(function (node) {
      return textarea.parentNode.insertBefore(node, textarea.nextSibling);
    }, options);
    return cm;
  }

  function addLegacyProps(CodeMirror) {
    CodeMirror.off = off;
    CodeMirror.on = on;
    CodeMirror.wheelEventPixels = wheelEventPixels;
    CodeMirror.Doc = Doc;
    CodeMirror.splitLines = splitLinesAuto;
    CodeMirror.countColumn = countColumn;
    CodeMirror.findColumn = findColumn;
    CodeMirror.isWordChar = isWordCharBasic;
    CodeMirror.Pass = Pass;
    CodeMirror.signal = signal;
    CodeMirror.Line = Line;
    CodeMirror.changeEnd = changeEnd;
    CodeMirror.scrollbarModel = scrollbarModel;
    CodeMirror.Pos = Pos;
    CodeMirror.cmpPos = cmp;
    CodeMirror.modes = modes;
    CodeMirror.mimeModes = mimeModes;
    CodeMirror.resolveMode = resolveMode;
    CodeMirror.getMode = getMode;
    CodeMirror.modeExtensions = modeExtensions;
    CodeMirror.extendMode = extendMode;
    CodeMirror.copyState = copyState;
    CodeMirror.startState = startState;
    CodeMirror.innerMode = innerMode;
    CodeMirror.commands = commands;
    CodeMirror.keyMap = keyMap;
    CodeMirror.keyName = keyName;
    CodeMirror.isModifierKey = isModifierKey;
    CodeMirror.lookupKey = lookupKey;
    CodeMirror.normalizeKeyMap = normalizeKeyMap;
    CodeMirror.StringStream = StringStream;
    CodeMirror.SharedTextMarker = SharedTextMarker;
    CodeMirror.TextMarker = TextMarker;
    CodeMirror.LineWidget = LineWidget;
    CodeMirror.e_preventDefault = e_preventDefault;
    CodeMirror.e_stopPropagation = e_stopPropagation;
    CodeMirror.e_stop = e_stop;
    CodeMirror.addClass = addClass;
    CodeMirror.contains = contains;
    CodeMirror.rmClass = rmClass;
    CodeMirror.keyNames = keyNames;
  } // EDITOR CONSTRUCTOR


  defineOptions(CodeMirror);
  addEditorMethods(CodeMirror); // Set up methods on CodeMirror's prototype to redirect to the editor's document.

  var dontDelegate = "iter insert remove copy getEditor constructor".split(" ");

  for (var prop in Doc.prototype) {
    if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0) {
      CodeMirror.prototype[prop] = function (method) {
        return function () {
          return method.apply(this.doc, arguments);
        };
      }(Doc.prototype[prop]);
    }
  }

  eventMixin(Doc);
  CodeMirror.inputStyles = {
    "textarea": TextareaInput,
    "contenteditable": ContentEditableInput
  }; // Extra arguments are stored as the mode's dependencies, which is
  // used by (legacy) mechanisms like loadmode.js to automatically
  // load a mode. (Preferred mechanism is the require/define calls.)

  CodeMirror.defineMode = function (name
  /*, mode, …*/
  ) {
    if (!CodeMirror.defaults.mode && name != "null") {
      CodeMirror.defaults.mode = name;
    }

    defineMode.apply(this, arguments);
  };

  CodeMirror.defineMIME = defineMIME; // Minimal default mode.

  CodeMirror.defineMode("null", function () {
    return {
      token: function token(stream) {
        return stream.skipToEnd();
      }
    };
  });
  CodeMirror.defineMIME("text/plain", "null"); // EXTENSIONS

  CodeMirror.defineExtension = function (name, func) {
    CodeMirror.prototype[name] = func;
  };

  CodeMirror.defineDocExtension = function (name, func) {
    Doc.prototype[name] = func;
  };

  CodeMirror.fromTextArea = fromTextArea;
  addLegacyProps(CodeMirror);
  CodeMirror.version = "5.59.0";
  return CodeMirror;
});

/***/ }),

/***/ "f3ad":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("944a");

__webpack_require__("99af");

__webpack_require__("a15b");

__webpack_require__("d81d");

__webpack_require__("fb6a");

__webpack_require__("b0c0");

__webpack_require__("0c47");

__webpack_require__("23dc");

__webpack_require__("a9e3");

__webpack_require__("d3b7");

var _typeof = __webpack_require__("7037");

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

  /******/

  /******/
  // Load entry module and return exports

  /******/

  return __webpack_require__(__webpack_require__.s = 76);
  /******/
}(
/************************************************************************/

/******/
{
  /***/
  0:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";
    /* harmony export (binding) */

    __webpack_require__.d(__webpack_exports__, "a", function () {
      return normalizeComponent;
    });
    /* globals __VUE_SSR_CONTEXT__ */
    // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
    // This module is a runtime utility for cleaner component module output and will
    // be included in the final webpack user bundle.


    function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier,
    /* server only */
    shadowMode
    /* vue-cli only */
    ) {
      // Vue.extend constructor export interop
      var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports; // render functions

      if (render) {
        options.render = render;
        options.staticRenderFns = staticRenderFns;
        options._compiled = true;
      } // functional template


      if (functionalTemplate) {
        options.functional = true;
      } // scopedId


      if (scopeId) {
        options._scopeId = 'data-v-' + scopeId;
      }

      var hook;

      if (moduleIdentifier) {
        // server build
        hook = function hook(context) {
          // 2.3 injection
          context = context || // cached call
          this.$vnode && this.$vnode.ssrContext || // stateful
          this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
          // 2.2 with runInNewContext: true

          if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
            context = __VUE_SSR_CONTEXT__;
          } // inject component styles


          if (injectStyles) {
            injectStyles.call(this, context);
          } // register component module identifier for async chunk inferrence


          if (context && context._registeredComponents) {
            context._registeredComponents.add(moduleIdentifier);
          }
        }; // used by ssr in case component is cached and beforeCreate
        // never gets called


        options._ssrRegister = hook;
      } else if (injectStyles) {
        hook = shadowMode ? function () {
          injectStyles.call(this, this.$root.$options.shadowRoot);
        } : injectStyles;
      }

      if (hook) {
        if (options.functional) {
          // for template-only hot-reload because in that case the render fn doesn't
          // go through the normalizer
          options._injectStyles = hook; // register for functioal component in vue file

          var originalRender = options.render;

          options.render = function renderWithStyleInjection(h, context) {
            hook.call(context);
            return originalRender(h, context);
          };
        } else {
          // inject component registration as beforeCreate hook
          var existing = options.beforeCreate;
          options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
        }
      }

      return {
        exports: scriptExports,
        options: options
      };
    }
    /***/

  },

  /***/
  11:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("2bb5");
    /***/
  },

  /***/
  21:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("d397");
    /***/
  },

  /***/
  4:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("d010");
    /***/
  },

  /***/
  76:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=template&id=343dd774&


    var render = function render() {
      var _vm = this;

      var _h = _vm.$createElement;

      var _c = _vm._self._c || _h;

      return _c("div", {
        class: [_vm.type === "textarea" ? "el-textarea" : "el-input", _vm.inputSize ? "el-input--" + _vm.inputSize : "", {
          "is-disabled": _vm.inputDisabled,
          "is-exceed": _vm.inputExceed,
          "el-input-group": _vm.$slots.prepend || _vm.$slots.append,
          "el-input-group--append": _vm.$slots.append,
          "el-input-group--prepend": _vm.$slots.prepend,
          "el-input--prefix": _vm.$slots.prefix || _vm.prefixIcon,
          "el-input--suffix": _vm.$slots.suffix || _vm.suffixIcon || _vm.clearable || _vm.showPassword
        }],
        on: {
          mouseenter: function mouseenter($event) {
            _vm.hovering = true;
          },
          mouseleave: function mouseleave($event) {
            _vm.hovering = false;
          }
        }
      }, [_vm.type !== "textarea" ? [_vm.$slots.prepend ? _c("div", {
        staticClass: "el-input-group__prepend"
      }, [_vm._t("prepend")], 2) : _vm._e(), _vm.type !== "textarea" ? _c("input", _vm._b({
        ref: "input",
        staticClass: "el-input__inner",
        attrs: {
          tabindex: _vm.tabindex,
          type: _vm.showPassword ? _vm.passwordVisible ? "text" : "password" : _vm.type,
          disabled: _vm.inputDisabled,
          readonly: _vm.readonly,
          autocomplete: _vm.autoComplete || _vm.autocomplete,
          "aria-label": _vm.label
        },
        on: {
          compositionstart: _vm.handleCompositionStart,
          compositionupdate: _vm.handleCompositionUpdate,
          compositionend: _vm.handleCompositionEnd,
          input: _vm.handleInput,
          focus: _vm.handleFocus,
          blur: _vm.handleBlur,
          change: _vm.handleChange
        }
      }, "input", _vm.$attrs, false)) : _vm._e(), _vm.$slots.prefix || _vm.prefixIcon ? _c("span", {
        staticClass: "el-input__prefix"
      }, [_vm._t("prefix"), _vm.prefixIcon ? _c("i", {
        staticClass: "el-input__icon",
        class: _vm.prefixIcon
      }) : _vm._e()], 2) : _vm._e(), _vm.getSuffixVisible() ? _c("span", {
        staticClass: "el-input__suffix"
      }, [_c("span", {
        staticClass: "el-input__suffix-inner"
      }, [!_vm.showClear || !_vm.showPwdVisible || !_vm.isWordLimitVisible ? [_vm._t("suffix"), _vm.suffixIcon ? _c("i", {
        staticClass: "el-input__icon",
        class: _vm.suffixIcon
      }) : _vm._e()] : _vm._e(), _vm.showClear ? _c("i", {
        staticClass: "el-input__icon el-icon-circle-close el-input__clear",
        on: {
          mousedown: function mousedown($event) {
            $event.preventDefault();
          },
          click: _vm.clear
        }
      }) : _vm._e(), _vm.showPwdVisible ? _c("i", {
        staticClass: "el-input__icon el-icon-view el-input__clear",
        on: {
          click: _vm.handlePasswordVisible
        }
      }) : _vm._e(), _vm.isWordLimitVisible ? _c("span", {
        staticClass: "el-input__count"
      }, [_c("span", {
        staticClass: "el-input__count-inner"
      }, [_vm._v("\n            " + _vm._s(_vm.textLength) + "/" + _vm._s(_vm.upperLimit) + "\n          ")])]) : _vm._e()], 2), _vm.validateState ? _c("i", {
        staticClass: "el-input__icon",
        class: ["el-input__validateIcon", _vm.validateIcon]
      }) : _vm._e()]) : _vm._e(), _vm.$slots.append ? _c("div", {
        staticClass: "el-input-group__append"
      }, [_vm._t("append")], 2) : _vm._e()] : _c("textarea", _vm._b({
        ref: "textarea",
        staticClass: "el-textarea__inner",
        style: _vm.textareaStyle,
        attrs: {
          tabindex: _vm.tabindex,
          disabled: _vm.inputDisabled,
          readonly: _vm.readonly,
          autocomplete: _vm.autoComplete || _vm.autocomplete,
          "aria-label": _vm.label
        },
        on: {
          compositionstart: _vm.handleCompositionStart,
          compositionupdate: _vm.handleCompositionUpdate,
          compositionend: _vm.handleCompositionEnd,
          input: _vm.handleInput,
          focus: _vm.handleFocus,
          blur: _vm.handleBlur,
          change: _vm.handleChange
        }
      }, "textarea", _vm.$attrs, false)), _vm.isWordLimitVisible && _vm.type === "textarea" ? _c("span", {
        staticClass: "el-input__count"
      }, [_vm._v(_vm._s(_vm.textLength) + "/" + _vm._s(_vm.upperLimit))]) : _vm._e()], 2);
    };

    var staticRenderFns = [];
    render._withStripped = true; // CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=template&id=343dd774&
    // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"

    var emitter_ = __webpack_require__(4);

    var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_); // EXTERNAL MODULE: external "element-ui/lib/mixins/migrating"


    var migrating_ = __webpack_require__(11);

    var migrating_default = /*#__PURE__*/__webpack_require__.n(migrating_); // CONCATENATED MODULE: ./packages/input/src/calcTextareaHeight.js


    var hiddenTextarea = void 0;
    var HIDDEN_STYLE = '\n  height:0 !important;\n  visibility:hidden !important;\n  overflow:hidden !important;\n  position:absolute !important;\n  z-index:-1000 !important;\n  top:0 !important;\n  right:0 !important\n';
    var CONTEXT_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing'];

    function calculateNodeStyling(targetElement) {
      var style = window.getComputedStyle(targetElement);
      var boxSizing = style.getPropertyValue('box-sizing');
      var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
      var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
      var contextStyle = CONTEXT_STYLE.map(function (name) {
        return name + ':' + style.getPropertyValue(name);
      }).join(';');
      return {
        contextStyle: contextStyle,
        paddingSize: paddingSize,
        borderSize: borderSize,
        boxSizing: boxSizing
      };
    }

    function calcTextareaHeight(targetElement) {
      var minRows = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
      var maxRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;

      if (!hiddenTextarea) {
        hiddenTextarea = document.createElement('textarea');
        document.body.appendChild(hiddenTextarea);
      }

      var _calculateNodeStyling = calculateNodeStyling(targetElement),
          paddingSize = _calculateNodeStyling.paddingSize,
          borderSize = _calculateNodeStyling.borderSize,
          boxSizing = _calculateNodeStyling.boxSizing,
          contextStyle = _calculateNodeStyling.contextStyle;

      hiddenTextarea.setAttribute('style', contextStyle + ';' + HIDDEN_STYLE);
      hiddenTextarea.value = targetElement.value || targetElement.placeholder || '';
      var height = hiddenTextarea.scrollHeight;
      var result = {};

      if (boxSizing === 'border-box') {
        height = height + borderSize;
      } else if (boxSizing === 'content-box') {
        height = height - paddingSize;
      }

      hiddenTextarea.value = '';
      var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;

      if (minRows !== null) {
        var minHeight = singleRowHeight * minRows;

        if (boxSizing === 'border-box') {
          minHeight = minHeight + paddingSize + borderSize;
        }

        height = Math.max(minHeight, height);
        result.minHeight = minHeight + 'px';
      }

      if (maxRows !== null) {
        var maxHeight = singleRowHeight * maxRows;

        if (boxSizing === 'border-box') {
          maxHeight = maxHeight + paddingSize + borderSize;
        }

        height = Math.min(maxHeight, height);
      }

      result.height = height + 'px';
      hiddenTextarea.parentNode && hiddenTextarea.parentNode.removeChild(hiddenTextarea);
      hiddenTextarea = null;
      return result;
    }

    ; // EXTERNAL MODULE: external "element-ui/lib/utils/merge"

    var merge_ = __webpack_require__(9);

    var merge_default = /*#__PURE__*/__webpack_require__.n(merge_); // EXTERNAL MODULE: external "element-ui/lib/utils/shared"


    var shared_ = __webpack_require__(21); // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=script&lang=js&
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //

    /* harmony default export */


    var inputvue_type_script_lang_js_ = {
      name: 'ElInput',
      componentName: 'ElInput',
      mixins: [emitter_default.a, migrating_default.a],
      inheritAttrs: false,
      inject: {
        elForm: {
          default: ''
        },
        elFormItem: {
          default: ''
        }
      },
      data: function data() {
        return {
          textareaCalcStyle: {},
          hovering: false,
          focused: false,
          isComposing: false,
          passwordVisible: false
        };
      },
      props: {
        value: [String, Number],
        size: String,
        resize: String,
        form: String,
        disabled: Boolean,
        readonly: Boolean,
        type: {
          type: String,
          default: 'text'
        },
        autosize: {
          type: [Boolean, Object],
          default: false
        },
        autocomplete: {
          type: String,
          default: 'off'
        },

        /** @Deprecated in next major version */
        autoComplete: {
          type: String,
          validator: function validator(val) {
             false && false;
            return true;
          }
        },
        validateEvent: {
          type: Boolean,
          default: true
        },
        suffixIcon: String,
        prefixIcon: String,
        label: String,
        clearable: {
          type: Boolean,
          default: false
        },
        showPassword: {
          type: Boolean,
          default: false
        },
        showWordLimit: {
          type: Boolean,
          default: false
        },
        tabindex: String
      },
      computed: {
        _elFormItemSize: function _elFormItemSize() {
          return (this.elFormItem || {}).elFormItemSize;
        },
        validateState: function validateState() {
          return this.elFormItem ? this.elFormItem.validateState : '';
        },
        needStatusIcon: function needStatusIcon() {
          return this.elForm ? this.elForm.statusIcon : false;
        },
        validateIcon: function validateIcon() {
          return {
            validating: 'el-icon-loading',
            success: 'el-icon-circle-check',
            error: 'el-icon-circle-close'
          }[this.validateState];
        },
        textareaStyle: function textareaStyle() {
          return merge_default()({}, this.textareaCalcStyle, {
            resize: this.resize
          });
        },
        inputSize: function inputSize() {
          return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
        },
        inputDisabled: function inputDisabled() {
          return this.disabled || (this.elForm || {}).disabled;
        },
        nativeInputValue: function nativeInputValue() {
          return this.value === null || this.value === undefined ? '' : String(this.value);
        },
        showClear: function showClear() {
          return this.clearable && !this.inputDisabled && !this.readonly && this.nativeInputValue && (this.focused || this.hovering);
        },
        showPwdVisible: function showPwdVisible() {
          return this.showPassword && !this.inputDisabled && !this.readonly && (!!this.nativeInputValue || this.focused);
        },
        isWordLimitVisible: function isWordLimitVisible() {
          return this.showWordLimit && this.$attrs.maxlength && (this.type === 'text' || this.type === 'textarea') && !this.inputDisabled && !this.readonly && !this.showPassword;
        },
        upperLimit: function upperLimit() {
          return this.$attrs.maxlength;
        },
        textLength: function textLength() {
          if (typeof this.value === 'number') {
            return String(this.value).length;
          }

          return (this.value || '').length;
        },
        inputExceed: function inputExceed() {
          // show exceed style if length of initial value greater then maxlength
          return this.isWordLimitVisible && this.textLength > this.upperLimit;
        }
      },
      watch: {
        value: function value(val) {
          this.$nextTick(this.resizeTextarea);

          if (this.validateEvent) {
            this.dispatch('ElFormItem', 'el.form.change', [val]);
          }
        },
        // native input value is set explicitly
        // do not use v-model / :value in template
        // see: https://github.com/ElemeFE/element/issues/14521
        nativeInputValue: function nativeInputValue() {
          this.setNativeInputValue();
        },
        // when change between <input> and <textarea>,
        // update DOM dependent value and styles
        // https://github.com/ElemeFE/element/issues/14857
        type: function type() {
          var _this = this;

          this.$nextTick(function () {
            _this.setNativeInputValue();

            _this.resizeTextarea();

            _this.updateIconOffset();
          });
        }
      },
      methods: {
        focus: function focus() {
          this.getInput().focus();
        },
        blur: function blur() {
          this.getInput().blur();
        },
        getMigratingConfig: function getMigratingConfig() {
          return {
            props: {
              'icon': 'icon is removed, use suffix-icon / prefix-icon instead.',
              'on-icon-click': 'on-icon-click is removed.'
            },
            events: {
              'click': 'click is removed.'
            }
          };
        },
        handleBlur: function handleBlur(event) {
          this.focused = false;
          this.$emit('blur', event);

          if (this.validateEvent) {
            this.dispatch('ElFormItem', 'el.form.blur', [this.value]);
          }
        },
        select: function select() {
          this.getInput().select();
        },
        resizeTextarea: function resizeTextarea() {
          if (this.$isServer) return;
          var autosize = this.autosize,
              type = this.type;
          if (type !== 'textarea') return;

          if (!autosize) {
            this.textareaCalcStyle = {
              minHeight: calcTextareaHeight(this.$refs.textarea).minHeight
            };
            return;
          }

          var minRows = autosize.minRows;
          var maxRows = autosize.maxRows;
          this.textareaCalcStyle = calcTextareaHeight(this.$refs.textarea, minRows, maxRows);
        },
        setNativeInputValue: function setNativeInputValue() {
          var input = this.getInput();
          if (!input) return;
          if (input.value === this.nativeInputValue) return;
          input.value = this.nativeInputValue;
        },
        handleFocus: function handleFocus(event) {
          this.focused = true;
          this.$emit('focus', event);
        },
        handleCompositionStart: function handleCompositionStart() {
          this.isComposing = true;
        },
        handleCompositionUpdate: function handleCompositionUpdate(event) {
          var text = event.target.value;
          var lastCharacter = text[text.length - 1] || '';
          this.isComposing = !Object(shared_["isKorean"])(lastCharacter);
        },
        handleCompositionEnd: function handleCompositionEnd(event) {
          if (this.isComposing) {
            this.isComposing = false;
            this.handleInput(event);
          }
        },
        handleInput: function handleInput(event) {
          // should not emit input during composition
          // see: https://github.com/ElemeFE/element/issues/10516
          if (this.isComposing) return; // hack for https://github.com/ElemeFE/element/issues/8548
          // should remove the following line when we don't support IE

          if (event.target.value === this.nativeInputValue) return;
          this.$emit('input', event.target.value); // ensure native input value is controlled
          // see: https://github.com/ElemeFE/element/issues/12850

          this.$nextTick(this.setNativeInputValue);
        },
        handleChange: function handleChange(event) {
          this.$emit('change', event.target.value);
        },
        calcIconOffset: function calcIconOffset(place) {
          var elList = [].slice.call(this.$el.querySelectorAll('.el-input__' + place) || []);
          if (!elList.length) return;
          var el = null;

          for (var i = 0; i < elList.length; i++) {
            if (elList[i].parentNode === this.$el) {
              el = elList[i];
              break;
            }
          }

          if (!el) return;
          var pendantMap = {
            suffix: 'append',
            prefix: 'prepend'
          };
          var pendant = pendantMap[place];

          if (this.$slots[pendant]) {
            el.style.transform = 'translateX(' + (place === 'suffix' ? '-' : '') + this.$el.querySelector('.el-input-group__' + pendant).offsetWidth + 'px)';
          } else {
            el.removeAttribute('style');
          }
        },
        updateIconOffset: function updateIconOffset() {
          this.calcIconOffset('prefix');
          this.calcIconOffset('suffix');
        },
        clear: function clear() {
          this.$emit('input', '');
          this.$emit('change', '');
          this.$emit('clear');
        },
        handlePasswordVisible: function handlePasswordVisible() {
          this.passwordVisible = !this.passwordVisible;
          this.focus();
        },
        getInput: function getInput() {
          return this.$refs.input || this.$refs.textarea;
        },
        getSuffixVisible: function getSuffixVisible() {
          return this.$slots.suffix || this.suffixIcon || this.showClear || this.showPassword || this.isWordLimitVisible || this.validateState && this.needStatusIcon;
        }
      },
      created: function created() {
        this.$on('inputSelect', this.select);
      },
      mounted: function mounted() {
        this.setNativeInputValue();
        this.resizeTextarea();
        this.updateIconOffset();
      },
      updated: function updated() {
        this.$nextTick(this.updateIconOffset);
      }
    }; // CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=script&lang=js&

    /* harmony default export */

    var src_inputvue_type_script_lang_js_ = inputvue_type_script_lang_js_; // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js

    var componentNormalizer = __webpack_require__(0); // CONCATENATED MODULE: ./packages/input/src/input.vue

    /* normalize component */


    var component = Object(componentNormalizer["a"
    /* default */
    ])(src_inputvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null);
    /* hot reload */

    if (false) { var api; }

    component.options.__file = "packages/input/src/input.vue";
    /* harmony default export */

    var input = component.exports; // CONCATENATED MODULE: ./packages/input/index.js

    /* istanbul ignore next */

    input.install = function (Vue) {
      Vue.component(input.name, input);
    };
    /* harmony default export */


    var packages_input = __webpack_exports__["default"] = input;
    /***/
  },

  /***/
  9:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("7f4d");
    /***/
  }
  /******/

});

/***/ }),

/***/ "f3b2":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_address_vue_vue_type_style_index_0_id_e3bef0a4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d757");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_address_vue_vue_type_style_index_0_id_e3bef0a4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_address_vue_vue_type_style_index_0_id_e3bef0a4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_address_vue_vue_type_style_index_0_id_e3bef0a4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "f494":
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__("a4d3");

__webpack_require__("e01a");

__webpack_require__("944a");

__webpack_require__("99af");

__webpack_require__("b0c0");

__webpack_require__("0c47");

__webpack_require__("23dc");

__webpack_require__("d3b7");

var _typeof = __webpack_require__("7037");

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

  /******/

  /******/
  // Load entry module and return exports

  /******/

  return __webpack_require__(__webpack_require__.s = 116);
  /******/
}(
/************************************************************************/

/******/
{
  /***/
  0:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";
    /* harmony export (binding) */

    __webpack_require__.d(__webpack_exports__, "a", function () {
      return normalizeComponent;
    });
    /* globals __VUE_SSR_CONTEXT__ */
    // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
    // This module is a runtime utility for cleaner component module output and will
    // be included in the final webpack user bundle.


    function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier,
    /* server only */
    shadowMode
    /* vue-cli only */
    ) {
      // Vue.extend constructor export interop
      var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports; // render functions

      if (render) {
        options.render = render;
        options.staticRenderFns = staticRenderFns;
        options._compiled = true;
      } // functional template


      if (functionalTemplate) {
        options.functional = true;
      } // scopedId


      if (scopeId) {
        options._scopeId = 'data-v-' + scopeId;
      }

      var hook;

      if (moduleIdentifier) {
        // server build
        hook = function hook(context) {
          // 2.3 injection
          context = context || // cached call
          this.$vnode && this.$vnode.ssrContext || // stateful
          this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
          // 2.2 with runInNewContext: true

          if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
            context = __VUE_SSR_CONTEXT__;
          } // inject component styles


          if (injectStyles) {
            injectStyles.call(this, context);
          } // register component module identifier for async chunk inferrence


          if (context && context._registeredComponents) {
            context._registeredComponents.add(moduleIdentifier);
          }
        }; // used by ssr in case component is cached and beforeCreate
        // never gets called


        options._ssrRegister = hook;
      } else if (injectStyles) {
        hook = shadowMode ? function () {
          injectStyles.call(this, this.$root.$options.shadowRoot);
        } : injectStyles;
      }

      if (hook) {
        if (options.functional) {
          // for template-only hot-reload because in that case the render fn doesn't
          // go through the normalizer
          options._injectStyles = hook; // register for functioal component in vue file

          var originalRender = options.render;

          options.render = function renderWithStyleInjection(h, context) {
            hook.call(context);
            return originalRender(h, context);
          };
        } else {
          // inject component registration as beforeCreate hook
          var existing = options.beforeCreate;
          options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
        }
      }

      return {
        exports: scriptExports,
        options: options
      };
    }
    /***/

  },

  /***/
  116:
  /***/
  function _(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio.vue?vue&type=template&id=69cd6268&


    var render = function render() {
      var _vm = this;

      var _h = _vm.$createElement;

      var _c = _vm._self._c || _h;

      return _c("label", {
        staticClass: "el-radio",
        class: [_vm.border && _vm.radioSize ? "el-radio--" + _vm.radioSize : "", {
          "is-disabled": _vm.isDisabled
        }, {
          "is-focus": _vm.focus
        }, {
          "is-bordered": _vm.border
        }, {
          "is-checked": _vm.model === _vm.label
        }],
        attrs: {
          role: "radio",
          "aria-checked": _vm.model === _vm.label,
          "aria-disabled": _vm.isDisabled,
          tabindex: _vm.tabIndex
        },
        on: {
          keydown: function keydown($event) {
            if (!("button" in $event) && _vm._k($event.keyCode, "space", 32, $event.key, [" ", "Spacebar"])) {
              return null;
            }

            $event.stopPropagation();
            $event.preventDefault();
            _vm.model = _vm.isDisabled ? _vm.model : _vm.label;
          }
        }
      }, [_c("span", {
        staticClass: "el-radio__input",
        class: {
          "is-disabled": _vm.isDisabled,
          "is-checked": _vm.model === _vm.label
        }
      }, [_c("span", {
        staticClass: "el-radio__inner"
      }), _c("input", {
        directives: [{
          name: "model",
          rawName: "v-model",
          value: _vm.model,
          expression: "model"
        }],
        ref: "radio",
        staticClass: "el-radio__original",
        attrs: {
          type: "radio",
          "aria-hidden": "true",
          name: _vm.name,
          disabled: _vm.isDisabled,
          tabindex: "-1"
        },
        domProps: {
          value: _vm.label,
          checked: _vm._q(_vm.model, _vm.label)
        },
        on: {
          focus: function focus($event) {
            _vm.focus = true;
          },
          blur: function blur($event) {
            _vm.focus = false;
          },
          change: [function ($event) {
            _vm.model = _vm.label;
          }, _vm.handleChange]
        }
      })]), _c("span", {
        staticClass: "el-radio__label",
        on: {
          keydown: function keydown($event) {
            $event.stopPropagation();
          }
        }
      }, [_vm._t("default"), !_vm.$slots.default ? [_vm._v(_vm._s(_vm.label))] : _vm._e()], 2)]);
    };

    var staticRenderFns = [];
    render._withStripped = true; // CONCATENATED MODULE: ./packages/radio/src/radio.vue?vue&type=template&id=69cd6268&
    // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"

    var emitter_ = __webpack_require__(4);

    var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_); // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio.vue?vue&type=script&lang=js&
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //

    /* harmony default export */


    var radiovue_type_script_lang_js_ = {
      name: 'ElRadio',
      mixins: [emitter_default.a],
      inject: {
        elForm: {
          default: ''
        },
        elFormItem: {
          default: ''
        }
      },
      componentName: 'ElRadio',
      props: {
        value: {},
        label: {},
        disabled: Boolean,
        name: String,
        border: Boolean,
        size: String
      },
      data: function data() {
        return {
          focus: false
        };
      },
      computed: {
        isGroup: function isGroup() {
          var parent = this.$parent;

          while (parent) {
            if (parent.$options.componentName !== 'ElRadioGroup') {
              parent = parent.$parent;
            } else {
              this._radioGroup = parent;
              return true;
            }
          }

          return false;
        },
        model: {
          get: function get() {
            return this.isGroup ? this._radioGroup.value : this.value;
          },
          set: function set(val) {
            if (this.isGroup) {
              this.dispatch('ElRadioGroup', 'input', [val]);
            } else {
              this.$emit('input', val);
            }

            this.$refs.radio && (this.$refs.radio.checked = this.model === this.label);
          }
        },
        _elFormItemSize: function _elFormItemSize() {
          return (this.elFormItem || {}).elFormItemSize;
        },
        radioSize: function radioSize() {
          var temRadioSize = this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
          return this.isGroup ? this._radioGroup.radioGroupSize || temRadioSize : temRadioSize;
        },
        isDisabled: function isDisabled() {
          return this.isGroup ? this._radioGroup.disabled || this.disabled || (this.elForm || {}).disabled : this.disabled || (this.elForm || {}).disabled;
        },
        tabIndex: function tabIndex() {
          return this.isDisabled || this.isGroup && this.model !== this.label ? -1 : 0;
        }
      },
      methods: {
        handleChange: function handleChange() {
          var _this = this;

          this.$nextTick(function () {
            _this.$emit('change', _this.model);

            _this.isGroup && _this.dispatch('ElRadioGroup', 'handleChange', _this.model);
          });
        }
      }
    }; // CONCATENATED MODULE: ./packages/radio/src/radio.vue?vue&type=script&lang=js&

    /* harmony default export */

    var src_radiovue_type_script_lang_js_ = radiovue_type_script_lang_js_; // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js

    var componentNormalizer = __webpack_require__(0); // CONCATENATED MODULE: ./packages/radio/src/radio.vue

    /* normalize component */


    var component = Object(componentNormalizer["a"
    /* default */
    ])(src_radiovue_type_script_lang_js_, render, staticRenderFns, false, null, null, null);
    /* hot reload */

    if (false) { var api; }

    component.options.__file = "packages/radio/src/radio.vue";
    /* harmony default export */

    var src_radio = component.exports; // CONCATENATED MODULE: ./packages/radio/index.js

    /* istanbul ignore next */

    src_radio.install = function (Vue) {
      Vue.component(src_radio.name, src_radio);
    };
    /* harmony default export */


    var packages_radio = __webpack_exports__["default"] = src_radio;
    /***/
  },

  /***/
  4:
  /***/
  function _(module, exports) {
    module.exports = __webpack_require__("d010");
    /***/
  }
  /******/

});

/***/ }),

/***/ "f5df":
/***/ (function(module, exports, __webpack_require__) {

var TO_STRING_TAG_SUPPORT = __webpack_require__("00ee");
var classofRaw = __webpack_require__("c6b6");
var wellKnownSymbol = __webpack_require__("b622");

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
// ES3 wrong here
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';

// fallback for IE11 Script Access Denied error
var tryGet = function (it, key) {
  try {
    return it[key];
  } catch (error) { /* empty */ }
};

// getting tag from ES6+ `Object.prototype.toString`
module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  var O, tag, result;
  return it === undefined ? 'Undefined' : it === null ? 'Null'
    // @@toStringTag case
    : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
    // builtinTag case
    : CORRECT_ARGUMENTS ? classofRaw(O)
    // ES3 arguments fallback
    : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
};


/***/ }),

/***/ "f6b4":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");

function InterceptorManager() {
  this.handlers = [];
}

/**
 * Add a new interceptor to the stack
 *
 * @param {Function} fulfilled The function to handle `then` for a `Promise`
 * @param {Function} rejected The function to handle `reject` for a `Promise`
 *
 * @return {Number} An ID used to remove interceptor later
 */
InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  this.handlers.push({
    fulfilled: fulfilled,
    rejected: rejected
  });
  return this.handlers.length - 1;
};

/**
 * Remove an interceptor from the stack
 *
 * @param {Number} id The ID that was returned by `use`
 */
InterceptorManager.prototype.eject = function eject(id) {
  if (this.handlers[id]) {
    this.handlers[id] = null;
  }
};

/**
 * Iterate over all the registered interceptors
 *
 * This method is particularly useful for skipping over any
 * interceptors that may have become `null` calling `eject`.
 *
 * @param {Function} fn The function to call for each interceptor
 */
InterceptorManager.prototype.forEach = function forEach(fn) {
  utils.forEach(this.handlers, function forEachHandler(h) {
    if (h !== null) {
      fn(h);
    }
  });
};

module.exports = InterceptorManager;


/***/ }),

/***/ "f6b6":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "f772":
/***/ (function(module, exports, __webpack_require__) {

var shared = __webpack_require__("5692");
var uid = __webpack_require__("90e3");

var keys = shared('keys');

module.exports = function (key) {
  return keys[key] || (keys[key] = uid(key));
};


/***/ }),

/***/ "f893":
/***/ (function(module, exports, __webpack_require__) {

module.exports = { "default": __webpack_require__("8119"), __esModule: true };

/***/ }),

/***/ "f8cd":
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__("a691");

module.exports = function (it) {
  var result = toInteger(it);
  if (result < 0) throw RangeError("The argument can't be less than 0");
  return result;
};


/***/ }),

/***/ "f9d4":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"));
  else {}
})(function(CodeMirror) {
"use strict";

CodeMirror.defineMode("javascript", function(config, parserConfig) {
  var indentUnit = config.indentUnit;
  var statementIndent = parserConfig.statementIndent;
  var jsonldMode = parserConfig.jsonld;
  var jsonMode = parserConfig.json || jsonldMode;
  var isTS = parserConfig.typescript;
  var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/;

  // Tokenizer

  var keywords = function(){
    function kw(type) {return {type: type, style: "keyword"};}
    var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"), D = kw("keyword d");
    var operator = kw("operator"), atom = {type: "atom", style: "atom"};

    return {
      "if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
      "return": D, "break": D, "continue": D, "new": kw("new"), "delete": C, "void": C, "throw": C,
      "debugger": kw("debugger"), "var": kw("var"), "const": kw("var"), "let": kw("var"),
      "function": kw("function"), "catch": kw("catch"),
      "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"),
      "in": operator, "typeof": operator, "instanceof": operator,
      "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom,
      "this": kw("this"), "class": kw("class"), "super": kw("atom"),
      "yield": C, "export": kw("export"), "import": kw("import"), "extends": C,
      "await": C
    };
  }();

  var isOperatorChar = /[+\-*&%=<>!?|~^@]/;
  var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;

  function readRegexp(stream) {
    var escaped = false, next, inSet = false;
    while ((next = stream.next()) != null) {
      if (!escaped) {
        if (next == "/" && !inSet) return;
        if (next == "[") inSet = true;
        else if (inSet && next == "]") inSet = false;
      }
      escaped = !escaped && next == "\\";
    }
  }

  // Used as scratch variables to communicate multiple values without
  // consing up tons of objects.
  var type, content;
  function ret(tp, style, cont) {
    type = tp; content = cont;
    return style;
  }
  function tokenBase(stream, state) {
    var ch = stream.next();
    if (ch == '"' || ch == "'") {
      state.tokenize = tokenString(ch);
      return state.tokenize(stream, state);
    } else if (ch == "." && stream.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/)) {
      return ret("number", "number");
    } else if (ch == "." && stream.match("..")) {
      return ret("spread", "meta");
    } else if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
      return ret(ch);
    } else if (ch == "=" && stream.eat(">")) {
      return ret("=>", "operator");
    } else if (ch == "0" && stream.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/)) {
      return ret("number", "number");
    } else if (/\d/.test(ch)) {
      stream.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/);
      return ret("number", "number");
    } else if (ch == "/") {
      if (stream.eat("*")) {
        state.tokenize = tokenComment;
        return tokenComment(stream, state);
      } else if (stream.eat("/")) {
        stream.skipToEnd();
        return ret("comment", "comment");
      } else if (expressionAllowed(stream, state, 1)) {
        readRegexp(stream);
        stream.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/);
        return ret("regexp", "string-2");
      } else {
        stream.eat("=");
        return ret("operator", "operator", stream.current());
      }
    } else if (ch == "`") {
      state.tokenize = tokenQuasi;
      return tokenQuasi(stream, state);
    } else if (ch == "#" && stream.peek() == "!") {
      stream.skipToEnd();
      return ret("meta", "meta");
    } else if (ch == "#" && stream.eatWhile(wordRE)) {
      return ret("variable", "property")
    } else if (ch == "<" && stream.match("!--") ||
               (ch == "-" && stream.match("->") && !/\S/.test(stream.string.slice(0, stream.start)))) {
      stream.skipToEnd()
      return ret("comment", "comment")
    } else if (isOperatorChar.test(ch)) {
      if (ch != ">" || !state.lexical || state.lexical.type != ">") {
        if (stream.eat("=")) {
          if (ch == "!" || ch == "=") stream.eat("=")
        } else if (/[<>*+\-|&?]/.test(ch)) {
          stream.eat(ch)
          if (ch == ">") stream.eat(ch)
        }
      }
      if (ch == "?" && stream.eat(".")) return ret(".")
      return ret("operator", "operator", stream.current());
    } else if (wordRE.test(ch)) {
      stream.eatWhile(wordRE);
      var word = stream.current()
      if (state.lastType != ".") {
        if (keywords.propertyIsEnumerable(word)) {
          var kw = keywords[word]
          return ret(kw.type, kw.style, word)
        }
        if (word == "async" && stream.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/, false))
          return ret("async", "keyword", word)
      }
      return ret("variable", "variable", word)
    }
  }

  function tokenString(quote) {
    return function(stream, state) {
      var escaped = false, next;
      if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)){
        state.tokenize = tokenBase;
        return ret("jsonld-keyword", "meta");
      }
      while ((next = stream.next()) != null) {
        if (next == quote && !escaped) break;
        escaped = !escaped && next == "\\";
      }
      if (!escaped) state.tokenize = tokenBase;
      return ret("string", "string");
    };
  }

  function tokenComment(stream, state) {
    var maybeEnd = false, ch;
    while (ch = stream.next()) {
      if (ch == "/" && maybeEnd) {
        state.tokenize = tokenBase;
        break;
      }
      maybeEnd = (ch == "*");
    }
    return ret("comment", "comment");
  }

  function tokenQuasi(stream, state) {
    var escaped = false, next;
    while ((next = stream.next()) != null) {
      if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) {
        state.tokenize = tokenBase;
        break;
      }
      escaped = !escaped && next == "\\";
    }
    return ret("quasi", "string-2", stream.current());
  }

  var brackets = "([{}])";
  // This is a crude lookahead trick to try and notice that we're
  // parsing the argument patterns for a fat-arrow function before we
  // actually hit the arrow token. It only works if the arrow is on
  // the same line as the arguments and there's no strange noise
  // (comments) in between. Fallback is to only notice when we hit the
  // arrow, and not declare the arguments as locals for the arrow
  // body.
  function findFatArrow(stream, state) {
    if (state.fatArrowAt) state.fatArrowAt = null;
    var arrow = stream.string.indexOf("=>", stream.start);
    if (arrow < 0) return;

    if (isTS) { // Try to skip TypeScript return type declarations after the arguments
      var m = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(stream.string.slice(stream.start, arrow))
      if (m) arrow = m.index
    }

    var depth = 0, sawSomething = false;
    for (var pos = arrow - 1; pos >= 0; --pos) {
      var ch = stream.string.charAt(pos);
      var bracket = brackets.indexOf(ch);
      if (bracket >= 0 && bracket < 3) {
        if (!depth) { ++pos; break; }
        if (--depth == 0) { if (ch == "(") sawSomething = true; break; }
      } else if (bracket >= 3 && bracket < 6) {
        ++depth;
      } else if (wordRE.test(ch)) {
        sawSomething = true;
      } else if (/["'\/`]/.test(ch)) {
        for (;; --pos) {
          if (pos == 0) return
          var next = stream.string.charAt(pos - 1)
          if (next == ch && stream.string.charAt(pos - 2) != "\\") { pos--; break }
        }
      } else if (sawSomething && !depth) {
        ++pos;
        break;
      }
    }
    if (sawSomething && !depth) state.fatArrowAt = pos;
  }

  // Parser

  var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true, "this": true, "jsonld-keyword": true};

  function JSLexical(indented, column, type, align, prev, info) {
    this.indented = indented;
    this.column = column;
    this.type = type;
    this.prev = prev;
    this.info = info;
    if (align != null) this.align = align;
  }

  function inScope(state, varname) {
    for (var v = state.localVars; v; v = v.next)
      if (v.name == varname) return true;
    for (var cx = state.context; cx; cx = cx.prev) {
      for (var v = cx.vars; v; v = v.next)
        if (v.name == varname) return true;
    }
  }

  function parseJS(state, style, type, content, stream) {
    var cc = state.cc;
    // Communicate our context to the combinators.
    // (Less wasteful than consing up a hundred closures on every call.)
    cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style;

    if (!state.lexical.hasOwnProperty("align"))
      state.lexical.align = true;

    while(true) {
      var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;
      if (combinator(type, content)) {
        while(cc.length && cc[cc.length - 1].lex)
          cc.pop()();
        if (cx.marked) return cx.marked;
        if (type == "variable" && inScope(state, content)) return "variable-2";
        return style;
      }
    }
  }

  // Combinator utils

  var cx = {state: null, column: null, marked: null, cc: null};
  function pass() {
    for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);
  }
  function cont() {
    pass.apply(null, arguments);
    return true;
  }
  function inList(name, list) {
    for (var v = list; v; v = v.next) if (v.name == name) return true
    return false;
  }
  function register(varname) {
    var state = cx.state;
    cx.marked = "def";
    if (state.context) {
      if (state.lexical.info == "var" && state.context && state.context.block) {
        // FIXME function decls are also not block scoped
        var newContext = registerVarScoped(varname, state.context)
        if (newContext != null) {
          state.context = newContext
          return
        }
      } else if (!inList(varname, state.localVars)) {
        state.localVars = new Var(varname, state.localVars)
        return
      }
    }
    // Fall through means this is global
    if (parserConfig.globalVars && !inList(varname, state.globalVars))
      state.globalVars = new Var(varname, state.globalVars)
  }
  function registerVarScoped(varname, context) {
    if (!context) {
      return null
    } else if (context.block) {
      var inner = registerVarScoped(varname, context.prev)
      if (!inner) return null
      if (inner == context.prev) return context
      return new Context(inner, context.vars, true)
    } else if (inList(varname, context.vars)) {
      return context
    } else {
      return new Context(context.prev, new Var(varname, context.vars), false)
    }
  }

  function isModifier(name) {
    return name == "public" || name == "private" || name == "protected" || name == "abstract" || name == "readonly"
  }

  // Combinators

  function Context(prev, vars, block) { this.prev = prev; this.vars = vars; this.block = block }
  function Var(name, next) { this.name = name; this.next = next }

  var defaultVars = new Var("this", new Var("arguments", null))
  function pushcontext() {
    cx.state.context = new Context(cx.state.context, cx.state.localVars, false)
    cx.state.localVars = defaultVars
  }
  function pushblockcontext() {
    cx.state.context = new Context(cx.state.context, cx.state.localVars, true)
    cx.state.localVars = null
  }
  function popcontext() {
    cx.state.localVars = cx.state.context.vars
    cx.state.context = cx.state.context.prev
  }
  popcontext.lex = true
  function pushlex(type, info) {
    var result = function() {
      var state = cx.state, indent = state.indented;
      if (state.lexical.type == "stat") indent = state.lexical.indented;
      else for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev)
        indent = outer.indented;
      state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);
    };
    result.lex = true;
    return result;
  }
  function poplex() {
    var state = cx.state;
    if (state.lexical.prev) {
      if (state.lexical.type == ")")
        state.indented = state.lexical.indented;
      state.lexical = state.lexical.prev;
    }
  }
  poplex.lex = true;

  function expect(wanted) {
    function exp(type) {
      if (type == wanted) return cont();
      else if (wanted == ";" || type == "}" || type == ")" || type == "]") return pass();
      else return cont(exp);
    };
    return exp;
  }

  function statement(type, value) {
    if (type == "var") return cont(pushlex("vardef", value), vardef, expect(";"), poplex);
    if (type == "keyword a") return cont(pushlex("form"), parenExpr, statement, poplex);
    if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
    if (type == "keyword d") return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex);
    if (type == "debugger") return cont(expect(";"));
    if (type == "{") return cont(pushlex("}"), pushblockcontext, block, poplex, popcontext);
    if (type == ";") return cont();
    if (type == "if") {
      if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
        cx.state.cc.pop()();
      return cont(pushlex("form"), parenExpr, statement, poplex, maybeelse);
    }
    if (type == "function") return cont(functiondef);
    if (type == "for") return cont(pushlex("form"), forspec, statement, poplex);
    if (type == "class" || (isTS && value == "interface")) {
      cx.marked = "keyword"
      return cont(pushlex("form", type == "class" ? type : value), className, poplex)
    }
    if (type == "variable") {
      if (isTS && value == "declare") {
        cx.marked = "keyword"
        return cont(statement)
      } else if (isTS && (value == "module" || value == "enum" || value == "type") && cx.stream.match(/^\s*\w/, false)) {
        cx.marked = "keyword"
        if (value == "enum") return cont(enumdef);
        else if (value == "type") return cont(typename, expect("operator"), typeexpr, expect(";"));
        else return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex)
      } else if (isTS && value == "namespace") {
        cx.marked = "keyword"
        return cont(pushlex("form"), expression, statement, poplex)
      } else if (isTS && value == "abstract") {
        cx.marked = "keyword"
        return cont(statement)
      } else {
        return cont(pushlex("stat"), maybelabel);
      }
    }
    if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"), pushblockcontext,
                                      block, poplex, poplex, popcontext);
    if (type == "case") return cont(expression, expect(":"));
    if (type == "default") return cont(expect(":"));
    if (type == "catch") return cont(pushlex("form"), pushcontext, maybeCatchBinding, statement, poplex, popcontext);
    if (type == "export") return cont(pushlex("stat"), afterExport, poplex);
    if (type == "import") return cont(pushlex("stat"), afterImport, poplex);
    if (type == "async") return cont(statement)
    if (value == "@") return cont(expression, statement)
    return pass(pushlex("stat"), expression, expect(";"), poplex);
  }
  function maybeCatchBinding(type) {
    if (type == "(") return cont(funarg, expect(")"))
  }
  function expression(type, value) {
    return expressionInner(type, value, false);
  }
  function expressionNoComma(type, value) {
    return expressionInner(type, value, true);
  }
  function parenExpr(type) {
    if (type != "(") return pass()
    return cont(pushlex(")"), maybeexpression, expect(")"), poplex)
  }
  function expressionInner(type, value, noComma) {
    if (cx.state.fatArrowAt == cx.stream.start) {
      var body = noComma ? arrowBodyNoComma : arrowBody;
      if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext);
      else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext);
    }

    var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
    if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
    if (type == "function") return cont(functiondef, maybeop);
    if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), classExpression, poplex); }
    if (type == "keyword c" || type == "async") return cont(noComma ? expressionNoComma : expression);
    if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);
    if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
    if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop);
    if (type == "{") return contCommasep(objprop, "}", null, maybeop);
    if (type == "quasi") return pass(quasi, maybeop);
    if (type == "new") return cont(maybeTarget(noComma));
    if (type == "import") return cont(expression);
    return cont();
  }
  function maybeexpression(type) {
    if (type.match(/[;\}\)\],]/)) return pass();
    return pass(expression);
  }

  function maybeoperatorComma(type, value) {
    if (type == ",") return cont(maybeexpression);
    return maybeoperatorNoComma(type, value, false);
  }
  function maybeoperatorNoComma(type, value, noComma) {
    var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;
    var expr = noComma == false ? expression : expressionNoComma;
    if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
    if (type == "operator") {
      if (/\+\+|--/.test(value) || isTS && value == "!") return cont(me);
      if (isTS && value == "<" && cx.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/, false))
        return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me);
      if (value == "?") return cont(expression, expect(":"), expr);
      return cont(expr);
    }
    if (type == "quasi") { return pass(quasi, me); }
    if (type == ";") return;
    if (type == "(") return contCommasep(expressionNoComma, ")", "call", me);
    if (type == ".") return cont(property, me);
    if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me);
    if (isTS && value == "as") { cx.marked = "keyword"; return cont(typeexpr, me) }
    if (type == "regexp") {
      cx.state.lastType = cx.marked = "operator"
      cx.stream.backUp(cx.stream.pos - cx.stream.start - 1)
      return cont(expr)
    }
  }
  function quasi(type, value) {
    if (type != "quasi") return pass();
    if (value.slice(value.length - 2) != "${") return cont(quasi);
    return cont(expression, continueQuasi);
  }
  function continueQuasi(type) {
    if (type == "}") {
      cx.marked = "string-2";
      cx.state.tokenize = tokenQuasi;
      return cont(quasi);
    }
  }
  function arrowBody(type) {
    findFatArrow(cx.stream, cx.state);
    return pass(type == "{" ? statement : expression);
  }
  function arrowBodyNoComma(type) {
    findFatArrow(cx.stream, cx.state);
    return pass(type == "{" ? statement : expressionNoComma);
  }
  function maybeTarget(noComma) {
    return function(type) {
      if (type == ".") return cont(noComma ? targetNoComma : target);
      else if (type == "variable" && isTS) return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma)
      else return pass(noComma ? expressionNoComma : expression);
    };
  }
  function target(_, value) {
    if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorComma); }
  }
  function targetNoComma(_, value) {
    if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorNoComma); }
  }
  function maybelabel(type) {
    if (type == ":") return cont(poplex, statement);
    return pass(maybeoperatorComma, expect(";"), poplex);
  }
  function property(type) {
    if (type == "variable") {cx.marked = "property"; return cont();}
  }
  function objprop(type, value) {
    if (type == "async") {
      cx.marked = "property";
      return cont(objprop);
    } else if (type == "variable" || cx.style == "keyword") {
      cx.marked = "property";
      if (value == "get" || value == "set") return cont(getterSetter);
      var m // Work around fat-arrow-detection complication for detecting typescript typed arrow params
      if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\s*:\s*/, false)))
        cx.state.fatArrowAt = cx.stream.pos + m[0].length
      return cont(afterprop);
    } else if (type == "number" || type == "string") {
      cx.marked = jsonldMode ? "property" : (cx.style + " property");
      return cont(afterprop);
    } else if (type == "jsonld-keyword") {
      return cont(afterprop);
    } else if (isTS && isModifier(value)) {
      cx.marked = "keyword"
      return cont(objprop)
    } else if (type == "[") {
      return cont(expression, maybetype, expect("]"), afterprop);
    } else if (type == "spread") {
      return cont(expressionNoComma, afterprop);
    } else if (value == "*") {
      cx.marked = "keyword";
      return cont(objprop);
    } else if (type == ":") {
      return pass(afterprop)
    }
  }
  function getterSetter(type) {
    if (type != "variable") return pass(afterprop);
    cx.marked = "property";
    return cont(functiondef);
  }
  function afterprop(type) {
    if (type == ":") return cont(expressionNoComma);
    if (type == "(") return pass(functiondef);
  }
  function commasep(what, end, sep) {
    function proceed(type, value) {
      if (sep ? sep.indexOf(type) > -1 : type == ",") {
        var lex = cx.state.lexical;
        if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;
        return cont(function(type, value) {
          if (type == end || value == end) return pass()
          return pass(what)
        }, proceed);
      }
      if (type == end || value == end) return cont();
      if (sep && sep.indexOf(";") > -1) return pass(what)
      return cont(expect(end));
    }
    return function(type, value) {
      if (type == end || value == end) return cont();
      return pass(what, proceed);
    };
  }
  function contCommasep(what, end, info) {
    for (var i = 3; i < arguments.length; i++)
      cx.cc.push(arguments[i]);
    return cont(pushlex(end, info), commasep(what, end), poplex);
  }
  function block(type) {
    if (type == "}") return cont();
    return pass(statement, block);
  }
  function maybetype(type, value) {
    if (isTS) {
      if (type == ":") return cont(typeexpr);
      if (value == "?") return cont(maybetype);
    }
  }
  function maybetypeOrIn(type, value) {
    if (isTS && (type == ":" || value == "in")) return cont(typeexpr)
  }
  function mayberettype(type) {
    if (isTS && type == ":") {
      if (cx.stream.match(/^\s*\w+\s+is\b/, false)) return cont(expression, isKW, typeexpr)
      else return cont(typeexpr)
    }
  }
  function isKW(_, value) {
    if (value == "is") {
      cx.marked = "keyword"
      return cont()
    }
  }
  function typeexpr(type, value) {
    if (value == "keyof" || value == "typeof" || value == "infer") {
      cx.marked = "keyword"
      return cont(value == "typeof" ? expressionNoComma : typeexpr)
    }
    if (type == "variable" || value == "void") {
      cx.marked = "type"
      return cont(afterType)
    }
    if (value == "|" || value == "&") return cont(typeexpr)
    if (type == "string" || type == "number" || type == "atom") return cont(afterType);
    if (type == "[") return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType)
    if (type == "{") return cont(pushlex("}"), commasep(typeprop, "}", ",;"), poplex, afterType)
    if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType, afterType)
    if (type == "<") return cont(commasep(typeexpr, ">"), typeexpr)
  }
  function maybeReturnType(type) {
    if (type == "=>") return cont(typeexpr)
  }
  function typeprop(type, value) {
    if (type == "variable" || cx.style == "keyword") {
      cx.marked = "property"
      return cont(typeprop)
    } else if (value == "?" || type == "number" || type == "string") {
      return cont(typeprop)
    } else if (type == ":") {
      return cont(typeexpr)
    } else if (type == "[") {
      return cont(expect("variable"), maybetypeOrIn, expect("]"), typeprop)
    } else if (type == "(") {
      return pass(functiondecl, typeprop)
    }
  }
  function typearg(type, value) {
    if (type == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?") return cont(typearg)
    if (type == ":") return cont(typeexpr)
    if (type == "spread") return cont(typearg)
    return pass(typeexpr)
  }
  function afterType(type, value) {
    if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
    if (value == "|" || type == "." || value == "&") return cont(typeexpr)
    if (type == "[") return cont(typeexpr, expect("]"), afterType)
    if (value == "extends" || value == "implements") { cx.marked = "keyword"; return cont(typeexpr) }
    if (value == "?") return cont(typeexpr, expect(":"), typeexpr)
  }
  function maybeTypeArgs(_, value) {
    if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
  }
  function typeparam() {
    return pass(typeexpr, maybeTypeDefault)
  }
  function maybeTypeDefault(_, value) {
    if (value == "=") return cont(typeexpr)
  }
  function vardef(_, value) {
    if (value == "enum") {cx.marked = "keyword"; return cont(enumdef)}
    return pass(pattern, maybetype, maybeAssign, vardefCont);
  }
  function pattern(type, value) {
    if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(pattern) }
    if (type == "variable") { register(value); return cont(); }
    if (type == "spread") return cont(pattern);
    if (type == "[") return contCommasep(eltpattern, "]");
    if (type == "{") return contCommasep(proppattern, "}");
  }
  function proppattern(type, value) {
    if (type == "variable" && !cx.stream.match(/^\s*:/, false)) {
      register(value);
      return cont(maybeAssign);
    }
    if (type == "variable") cx.marked = "property";
    if (type == "spread") return cont(pattern);
    if (type == "}") return pass();
    if (type == "[") return cont(expression, expect(']'), expect(':'), proppattern);
    return cont(expect(":"), pattern, maybeAssign);
  }
  function eltpattern() {
    return pass(pattern, maybeAssign)
  }
  function maybeAssign(_type, value) {
    if (value == "=") return cont(expressionNoComma);
  }
  function vardefCont(type) {
    if (type == ",") return cont(vardef);
  }
  function maybeelse(type, value) {
    if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex);
  }
  function forspec(type, value) {
    if (value == "await") return cont(forspec);
    if (type == "(") return cont(pushlex(")"), forspec1, poplex);
  }
  function forspec1(type) {
    if (type == "var") return cont(vardef, forspec2);
    if (type == "variable") return cont(forspec2);
    return pass(forspec2)
  }
  function forspec2(type, value) {
    if (type == ")") return cont()
    if (type == ";") return cont(forspec2)
    if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression, forspec2) }
    return pass(expression, forspec2)
  }
  function functiondef(type, value) {
    if (value == "*") {cx.marked = "keyword"; return cont(functiondef);}
    if (type == "variable") {register(value); return cont(functiondef);}
    if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, statement, popcontext);
    if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondef)
  }
  function functiondecl(type, value) {
    if (value == "*") {cx.marked = "keyword"; return cont(functiondecl);}
    if (type == "variable") {register(value); return cont(functiondecl);}
    if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, popcontext);
    if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondecl)
  }
  function typename(type, value) {
    if (type == "keyword" || type == "variable") {
      cx.marked = "type"
      return cont(typename)
    } else if (value == "<") {
      return cont(pushlex(">"), commasep(typeparam, ">"), poplex)
    }
  }
  function funarg(type, value) {
    if (value == "@") cont(expression, funarg)
    if (type == "spread") return cont(funarg);
    if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(funarg); }
    if (isTS && type == "this") return cont(maybetype, maybeAssign)
    return pass(pattern, maybetype, maybeAssign);
  }
  function classExpression(type, value) {
    // Class expressions may have an optional name.
    if (type == "variable") return className(type, value);
    return classNameAfter(type, value);
  }
  function className(type, value) {
    if (type == "variable") {register(value); return cont(classNameAfter);}
  }
  function classNameAfter(type, value) {
    if (value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter)
    if (value == "extends" || value == "implements" || (isTS && type == ",")) {
      if (value == "implements") cx.marked = "keyword";
      return cont(isTS ? typeexpr : expression, classNameAfter);
    }
    if (type == "{") return cont(pushlex("}"), classBody, poplex);
  }
  function classBody(type, value) {
    if (type == "async" ||
        (type == "variable" &&
         (value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) &&
         cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false))) {
      cx.marked = "keyword";
      return cont(classBody);
    }
    if (type == "variable" || cx.style == "keyword") {
      cx.marked = "property";
      return cont(classfield, classBody);
    }
    if (type == "number" || type == "string") return cont(classfield, classBody);
    if (type == "[")
      return cont(expression, maybetype, expect("]"), classfield, classBody)
    if (value == "*") {
      cx.marked = "keyword";
      return cont(classBody);
    }
    if (isTS && type == "(") return pass(functiondecl, classBody)
    if (type == ";" || type == ",") return cont(classBody);
    if (type == "}") return cont();
    if (value == "@") return cont(expression, classBody)
  }
  function classfield(type, value) {
    if (value == "?") return cont(classfield)
    if (type == ":") return cont(typeexpr, maybeAssign)
    if (value == "=") return cont(expressionNoComma)
    var context = cx.state.lexical.prev, isInterface = context && context.info == "interface"
    return pass(isInterface ? functiondecl : functiondef)
  }
  function afterExport(type, value) {
    if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); }
    if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); }
    if (type == "{") return cont(commasep(exportField, "}"), maybeFrom, expect(";"));
    return pass(statement);
  }
  function exportField(type, value) {
    if (value == "as") { cx.marked = "keyword"; return cont(expect("variable")); }
    if (type == "variable") return pass(expressionNoComma, exportField);
  }
  function afterImport(type) {
    if (type == "string") return cont();
    if (type == "(") return pass(expression);
    return pass(importSpec, maybeMoreImports, maybeFrom);
  }
  function importSpec(type, value) {
    if (type == "{") return contCommasep(importSpec, "}");
    if (type == "variable") register(value);
    if (value == "*") cx.marked = "keyword";
    return cont(maybeAs);
  }
  function maybeMoreImports(type) {
    if (type == ",") return cont(importSpec, maybeMoreImports)
  }
  function maybeAs(_type, value) {
    if (value == "as") { cx.marked = "keyword"; return cont(importSpec); }
  }
  function maybeFrom(_type, value) {
    if (value == "from") { cx.marked = "keyword"; return cont(expression); }
  }
  function arrayLiteral(type) {
    if (type == "]") return cont();
    return pass(commasep(expressionNoComma, "]"));
  }
  function enumdef() {
    return pass(pushlex("form"), pattern, expect("{"), pushlex("}"), commasep(enummember, "}"), poplex, poplex)
  }
  function enummember() {
    return pass(pattern, maybeAssign);
  }

  function isContinuedStatement(state, textAfter) {
    return state.lastType == "operator" || state.lastType == "," ||
      isOperatorChar.test(textAfter.charAt(0)) ||
      /[,.]/.test(textAfter.charAt(0));
  }

  function expressionAllowed(stream, state, backUp) {
    return state.tokenize == tokenBase &&
      /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(state.lastType) ||
      (state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0))))
  }

  // Interface

  return {
    startState: function(basecolumn) {
      var state = {
        tokenize: tokenBase,
        lastType: "sof",
        cc: [],
        lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
        localVars: parserConfig.localVars,
        context: parserConfig.localVars && new Context(null, null, false),
        indented: basecolumn || 0
      };
      if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
        state.globalVars = parserConfig.globalVars;
      return state;
    },

    token: function(stream, state) {
      if (stream.sol()) {
        if (!state.lexical.hasOwnProperty("align"))
          state.lexical.align = false;
        state.indented = stream.indentation();
        findFatArrow(stream, state);
      }
      if (state.tokenize != tokenComment && stream.eatSpace()) return null;
      var style = state.tokenize(stream, state);
      if (type == "comment") return style;
      state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type;
      return parseJS(state, style, type, content, stream);
    },

    indent: function(state, textAfter) {
      if (state.tokenize == tokenComment || state.tokenize == tokenQuasi) return CodeMirror.Pass;
      if (state.tokenize != tokenBase) return 0;
      var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top
      // Kludge to prevent 'maybelse' from blocking lexical scope pops
      if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {
        var c = state.cc[i];
        if (c == poplex) lexical = lexical.prev;
        else if (c != maybeelse) break;
      }
      while ((lexical.type == "stat" || lexical.type == "form") &&
             (firstChar == "}" || ((top = state.cc[state.cc.length - 1]) &&
                                   (top == maybeoperatorComma || top == maybeoperatorNoComma) &&
                                   !/^[,\.=+\-*:?[\(]/.test(textAfter))))
        lexical = lexical.prev;
      if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat")
        lexical = lexical.prev;
      var type = lexical.type, closing = firstChar == type;

      if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info.length + 1 : 0);
      else if (type == "form" && firstChar == "{") return lexical.indented;
      else if (type == "form") return lexical.indented + indentUnit;
      else if (type == "stat")
        return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0);
      else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false)
        return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
      else if (lexical.align) return lexical.column + (closing ? 0 : 1);
      else return lexical.indented + (closing ? 0 : indentUnit);
    },

    electricInput: /^\s*(?:case .*?:|default:|\{|\})$/,
    blockCommentStart: jsonMode ? null : "/*",
    blockCommentEnd: jsonMode ? null : "*/",
    blockCommentContinue: jsonMode ? null : " * ",
    lineComment: jsonMode ? null : "//",
    fold: "brace",
    closeBrackets: "()[]{}''\"\"``",

    helperType: jsonMode ? "json" : "javascript",
    jsonldMode: jsonldMode,
    jsonMode: jsonMode,

    expressionAllowed: expressionAllowed,

    skipExpression: function(state) {
      var top = state.cc[state.cc.length - 1]
      if (top == expression || top == expressionNoComma) state.cc.pop()
    }
  };
});

CodeMirror.registerHelper("wordChars", "javascript", /[\w$]/);

CodeMirror.defineMIME("text/javascript", "javascript");
CodeMirror.defineMIME("text/ecmascript", "javascript");
CodeMirror.defineMIME("application/javascript", "javascript");
CodeMirror.defineMIME("application/x-javascript", "javascript");
CodeMirror.defineMIME("application/ecmascript", "javascript");
CodeMirror.defineMIME("application/json", {name: "javascript", json: true});
CodeMirror.defineMIME("application/x-json", {name: "javascript", json: true});
CodeMirror.defineMIME("application/ld+json", {name: "javascript", jsonld: true});
CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true });
CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true });

});


/***/ }),

/***/ "faf5":
/***/ (function(module, exports, __webpack_require__) {

module.exports = !__webpack_require__("0bad") && !__webpack_require__("4b8b")(function () {
  return Object.defineProperty(__webpack_require__("05f5")('div'), 'a', { get: function () { return 7; } }).a != 7;
});


/***/ }),

/***/ "fb15":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXPORTS
__webpack_require__.d(__webpack_exports__, "CodeMirror", function() { return /* reexport */ packages_CodeMirror; });
__webpack_require__.d(__webpack_exports__, "AwsuiCodemirror", function() { return /* reexport */ packages_codemirror; });
__webpack_require__.d(__webpack_exports__, "install", function() { return /* reexport */ packages_install; });
__webpack_require__.d(__webpack_exports__, "element", function() { return /* reexport */ ele; });
__webpack_require__.d(__webpack_exports__, "Row", function() { return /* reexport */ packages_row; });
__webpack_require__.d(__webpack_exports__, "Col", function() { return /* reexport */ packages_col; });
__webpack_require__.d(__webpack_exports__, "Button", function() { return /* reexport */ packages_button; });
__webpack_require__.d(__webpack_exports__, "ButtonGroup", function() { return /* reexport */ packages_button_group; });
__webpack_require__.d(__webpack_exports__, "Radio", function() { return /* reexport */ packages_radio; });
__webpack_require__.d(__webpack_exports__, "Checkbox", function() { return /* reexport */ packages_checkbox; });
__webpack_require__.d(__webpack_exports__, "Input", function() { return /* reexport */ packages_input; });
__webpack_require__.d(__webpack_exports__, "InputNumber", function() { return /* reexport */ packages_input_number; });
__webpack_require__.d(__webpack_exports__, "Select", function() { return /* reexport */ packages_select; });
__webpack_require__.d(__webpack_exports__, "BOMetadataSelect", function() { return /* reexport */ packages_bo_metadata_select; });
__webpack_require__.d(__webpack_exports__, "Cascader", function() { return /* reexport */ packages_cascader; });
__webpack_require__.d(__webpack_exports__, "Switch", function() { return /* reexport */ packages_switch; });
__webpack_require__.d(__webpack_exports__, "Slider", function() { return /* reexport */ packages_slider; });
__webpack_require__.d(__webpack_exports__, "TimePicker", function() { return /* reexport */ packages_time_picker; });
__webpack_require__.d(__webpack_exports__, "ColorPicker", function() { return /* reexport */ packages_color_picker; });
__webpack_require__.d(__webpack_exports__, "IconPicker", function() { return /* reexport */ packages_icon_picker; });
__webpack_require__.d(__webpack_exports__, "Formula", function() { return /* reexport */ packages_formula; });
__webpack_require__.d(__webpack_exports__, "Upload", function() { return /* reexport */ packages_upload; });
__webpack_require__.d(__webpack_exports__, "AwsuiUploadImage", function() { return /* reexport */ packages_upload_image; });
__webpack_require__.d(__webpack_exports__, "Tree", function() { return /* reexport */ packages_tree; });
__webpack_require__.d(__webpack_exports__, "Layout", function() { return /* reexport */ packages_layout; });
__webpack_require__.d(__webpack_exports__, "Header", function() { return /* reexport */ packages_header; });
__webpack_require__.d(__webpack_exports__, "Aside", function() { return /* reexport */ packages_aside; });
__webpack_require__.d(__webpack_exports__, "Main", function() { return /* reexport */ packages_main; });
__webpack_require__.d(__webpack_exports__, "Footer", function() { return /* reexport */ packages_footer; });
__webpack_require__.d(__webpack_exports__, "Form", function() { return /* reexport */ packages_form; });
__webpack_require__.d(__webpack_exports__, "FormItem", function() { return /* reexport */ packages_form_item; });
__webpack_require__.d(__webpack_exports__, "DownSelect", function() { return /* reexport */ packages_down_select; });
__webpack_require__.d(__webpack_exports__, "DownSelectItem", function() { return /* reexport */ packages_down_select_item; });
__webpack_require__.d(__webpack_exports__, "Tabs", function() { return /* reexport */ packages_tabs; });
__webpack_require__.d(__webpack_exports__, "TabPane", function() { return /* reexport */ packages_tab_pane; });
__webpack_require__.d(__webpack_exports__, "Dialog", function() { return /* reexport */ packages_dialog; });
__webpack_require__.d(__webpack_exports__, "Sidebar", function() { return /* reexport */ packages_sidebar; });
__webpack_require__.d(__webpack_exports__, "Backtop", function() { return /* reexport */ packages_backtop; });
__webpack_require__.d(__webpack_exports__, "CodeHelper", function() { return /* reexport */ packages_code_helper; });
__webpack_require__.d(__webpack_exports__, "Address", function() { return /* reexport */ packages_address; });
__webpack_require__.d(__webpack_exports__, "inputIconClick", function() { return /* reexport */ packages_input_icon_click; });
__webpack_require__.d(__webpack_exports__, "AppInfo", function() { return /* reexport */ packages_app_info; });
__webpack_require__.d(__webpack_exports__, "AppSelect", function() { return /* reexport */ packages_app_select; });
__webpack_require__.d(__webpack_exports__, "DDictionary", function() { return /* reexport */ packages_data_dictionary; });
__webpack_require__.d(__webpack_exports__, "tools", function() { return /* reexport */ utils_tools; });
__webpack_require__.d(__webpack_exports__, "Axios", function() { return /* reexport */ axios["a" /* default */]; });

// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
// This file is imported into lib/wc client bundles.

if (typeof window !== 'undefined') {
  var currentScript = window.document.currentScript
  if (true) {
    var getCurrentScript = __webpack_require__("8875")
    currentScript = getCurrentScript()

    // for backward compatibility, because previously we directly included the polyfill
    if (!('currentScript' in document)) {
      Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
    }
  }

  var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
  if (src) {
    __webpack_require__.p = src[1] // eslint-disable-line
  }
}

// Indicate to webpack that this file can be concatenated
/* harmony default export */ var setPublicPath = (null);

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
var es_array_map = __webpack_require__("d81d");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
var es_function_name = __webpack_require__("b0c0");

// EXTERNAL MODULE: ./node_modules/element-ui/lib/element-ui.common.js
var element_ui_common = __webpack_require__("5c96");
var element_ui_common_default = /*#__PURE__*/__webpack_require__.n(element_ui_common);

// EXTERNAL MODULE: ./node_modules/element-ui/lib/theme-chalk/index.css
var theme_chalk = __webpack_require__("0fae");

// CONCATENATED MODULE: ./packages/ele/index.js
// 导入组件


/* harmony default export */ var ele = ({
  Element: element_ui_common_default.a,
  install: function install(Vue) {
    Vue.use(element_ui_common_default.a);
  }
});
// EXTERNAL MODULE: ./static/css/reset.css
var css_reset = __webpack_require__("c7db");

// EXTERNAL MODULE: ./static/css/public.css
var css_public = __webpack_require__("1cfa");

// EXTERNAL MODULE: ./static/css/font/iconfont.css
var iconfont = __webpack_require__("a4c8");

// EXTERNAL MODULE: ./plugins/codemirror/lib/codemirror.js
var codemirror = __webpack_require__("f3a7");
var codemirror_default = /*#__PURE__*/__webpack_require__.n(codemirror);

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/codemirror/src/codemirror.vue?vue&type=template&id=1b9ed00a&scoped=true&
var codemirrorvue_type_template_id_1b9ed00a_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"awsui-codemirror",class:{ merge: _vm.merge }},[(_vm.merge)?_c('div',{ref:"mergeview"}):_c('textarea',{ref:"textarea",attrs:{"name":_vm.name,"placeholder":_vm.placeholder}})])}
var staticRenderFns = []


// CONCATENATED MODULE: ./packages/codemirror/src/codemirror.vue?vue&type=template&id=1b9ed00a&scoped=true&

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
var es_array_concat = __webpack_require__("99af");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
var es_array_filter = __webpack_require__("4de4");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.for-each.js
var es_array_for_each = __webpack_require__("4160");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.assign.js
var es_object_assign = __webpack_require__("cca6");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js
var es_regexp_exec = __webpack_require__("ac1f");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js
var es_string_replace = __webpack_require__("5319");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js
var web_dom_collections_for_each = __webpack_require__("159b");

// EXTERNAL MODULE: ./plugins/codemirror/lib/codemirror.css
var lib_codemirror = __webpack_require__("202b");

// EXTERNAL MODULE: ./plugins/codemirror/addon/display/placeholder.js
var placeholder = __webpack_require__("a9ac");

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/codemirror/src/codemirror.vue?vue&type=script&lang=js&







//
//
//
//
//
//
//
// lib



var CodeMirror = window.CodeMirror || codemirror_default.a; // pollfill

if (typeof Object.assign != 'function') {
  Object.defineProperty(Object, 'assign', {
    value: function value(target, varArgs) {
      if (target == null) {
        throw new TypeError('Cannot convert undefined or null to object');
      }

      var to = Object(target);

      for (var index = 1; index < arguments.length; index++) {
        var nextSource = arguments[index];

        if (nextSource != null) {
          for (var nextKey in nextSource) {
            if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
              to[nextKey] = nextSource[nextKey];
            }
          }
        }
      }

      return to;
    },
    writable: true,
    configurable: true
  });
} // export


/* harmony default export */ var codemirrorvue_type_script_lang_js_ = ({
  name: 'AwsuiCodemirror',
  data: function data() {
    return {
      content: '',
      codemirror: null,
      cminstance: null
    };
  },
  props: {
    code: String,
    value: String,
    marker: Function,
    unseenLines: Array,
    name: {
      type: String,
      default: 'codemirror'
    },
    placeholder: {
      type: String,
      default: '请输入内容'
    },
    merge: {
      type: Boolean,
      default: false
    },
    options: {
      type: Object,
      default: function _default() {
        return {};
      }
    },
    events: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    globalOptions: {
      type: Object,
      default: function _default() {
        return {};
      }
    },
    globalEvents: {
      type: Array,
      default: function _default() {
        return [];
      }
    }
  },
  watch: {
    options: {
      deep: true,
      handler: function handler(options) {
        for (var key in options) {
          this.cminstance.setOption(key, options[key]);
        }
      }
    },
    merge: function merge() {
      this.$nextTick(this.switchMerge);
    },
    code: function code(newVal) {
      this.handerCodeChange(newVal);
    },
    value: function value(newVal) {
      this.handerCodeChange(newVal);
    }
  },
  methods: {
    initialize: function initialize() {
      var _this = this;

      var cmOptions = Object.assign({}, this.globalOptions, this.options);

      if (this.merge) {
        this.codemirror = CodeMirror.MergeView(this.$refs.mergeview, cmOptions);
        this.cminstance = this.codemirror.edit;
      } else {
        this.codemirror = CodeMirror.fromTextArea(this.$refs.textarea, cmOptions);
        this.cminstance = this.codemirror;
        this.cminstance.setValue(this.code || this.value || this.content);
        setTimeout(function () {
          _this.cminstance.refresh();
        }, 100);
      }

      this.cminstance.on('change', function (cm) {
        _this.content = cm.getValue();

        if (_this.$emit) {
          _this.$emit('input', _this.content);
        }
      });
      this.cminstance.on('keyup', function (cm, event) {
        if (!cm.state.completionActive && (event.keyCode >= 65 && event.keyCode <= 90 || event.keyCode === 50 || event.keyCode === 8)) {
          CodeMirror.commands.autocomplete(cm, null, {
            completeSingle: false
          });
        }
      }); // 所有有效事件（驼峰命名）+ 去重

      var tmpEvents = {};
      var allEvents = ['scroll', 'changes', 'beforeChange', 'cursorActivity', 'keyHandled', 'inputRead', 'electricInput', 'beforeSelectionChange', 'viewportChange', 'swapDoc', 'gutterClick', 'gutterContextMenu', 'focus', 'blur', 'refresh', 'optionChange', 'scrollCursorIntoView', 'update'].concat(this.events).concat(this.globalEvents).filter(function (e) {
        return !tmpEvents[e] && (tmpEvents[e] = true);
      }).forEach(function (event) {
        // 循环事件，并兼容 run-time 事件命名
        _this.cminstance.on(event, function () {
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }

          // console.log('当有事件触发了', event, args)
          _this.$emit.apply(_this, [event].concat(args));

          var lowerCaseEvent = event.replace(/([A-Z])/g, '-$1').toLowerCase();

          if (lowerCaseEvent !== event) {
            _this.$emit.apply(_this, [lowerCaseEvent].concat(args));
          }
        });
      });
      this.$emit('ready', this.codemirror);
      this.unseenLineMarkers(); // prevents funky dynamic rendering

      this.refresh();
    },
    refresh: function refresh() {
      var _this2 = this;

      this.$nextTick(function () {
        _this2.cminstance.refresh();
      });
    },
    destroy: function destroy() {
      // garbage cleanup
      var element = this.cminstance.doc.cm.getWrapperElement();
      element && element.remove && element.remove();
    },
    handerCodeChange: function handerCodeChange(newVal) {
      var _this3 = this;

      var cm_value = this.cminstance.getValue();

      if (newVal !== cm_value) {
        var scrollInfo = this.cminstance.getScrollInfo();
        this.cminstance.setValue(newVal);
        setTimeout(function () {
          _this3.cminstance.refresh();
        }, 100);
        this.content = newVal;
        this.cminstance.scrollTo(scrollInfo.left, scrollInfo.top);
      }

      this.unseenLineMarkers();
    },
    unseenLineMarkers: function unseenLineMarkers() {
      var _this4 = this;

      if (this.unseenLines !== undefined && this.marker !== undefined) {
        this.unseenLines.forEach(function (line) {
          var info = _this4.cminstance.lineInfo(line);

          _this4.cminstance.setGutterMarker(line, 'breakpoints', info.gutterMarkers ? null : _this4.marker());
        });
      }
    },
    switchMerge: function switchMerge() {
      // Save current values
      var history = this.cminstance.doc.history;
      var cleanGeneration = this.cminstance.doc.cleanGeneration;
      this.options.value = this.cminstance.getValue();
      this.destroy();
      this.initialize(); // Restore values

      this.cminstance.doc.history = history;
      this.cminstance.doc.cleanGeneration = cleanGeneration;
    }
  },
  mounted: function mounted() {
    this.initialize();
  },
  beforeDestroy: function beforeDestroy() {
    this.destroy();
  }
});
// CONCATENATED MODULE: ./packages/codemirror/src/codemirror.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_codemirrorvue_type_script_lang_js_ = (codemirrorvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__("2877");

// CONCATENATED MODULE: ./packages/codemirror/src/codemirror.vue





/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  src_codemirrorvue_type_script_lang_js_,
  codemirrorvue_type_template_id_1b9ed00a_scoped_true_render,
  staticRenderFns,
  false,
  null,
  "1b9ed00a",
  null
  
)

/* harmony default export */ var src_codemirror = (component.exports);
// CONCATENATED MODULE: ./packages/codemirror/index.js


/*import _CodeMirror from '../../plugins/codemirror/lib/codemirror'
import codemirror from './src/codemirror.vue'

const CodeMirror = window.CodeMirror || _CodeMirror
const install = (Vue, config) => {
  if (config) {
    if (config.options) {
      codemirror.props.globalOptions.default = () => config.options
    }
    if (config.events) {
      codemirror.props.globalEvents.default = () => config.events
    }
  }
  Vue.component(codemirror.name, codemirror)
}

const AwsuiCodemirror = { CodeMirror, codemirror, install }

export default AwsuiCodemirror;
export { CodeMirror, codemirror, install }*/


src_codemirror.install = function (Vue, config) {
  if (config) {
    if (config.options) {
      src_codemirror.props.globalOptions.default = function () {
        return config.options;
      };
    }

    if (config.events) {
      src_codemirror.props.globalEvents.default = function () {
        return config.events;
      };
    }
  }

  Vue.component(src_codemirror.name, src_codemirror);
};

/* harmony default export */ var packages_codemirror = (src_codemirror);
// EXTERNAL MODULE: ./src/api/axios.js
var axios = __webpack_require__("0d5e");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.constructor.js
var es_number_constructor = __webpack_require__("a9e3");

// CONCATENATED MODULE: ./packages/row/src/row.js


/* harmony default export */ var row = ({
  name: 'AwsuiRow',
  componentName: 'AwsuiRow',
  props: {
    tag: {
      type: String,
      default: 'div'
    },
    gutter: Number,
    type: String,
    justify: {
      type: String,
      default: 'start'
    },
    align: {
      type: String,
      default: 'top'
    }
  },
  computed: {
    style: function style() {
      var ret = {};

      if (this.gutter) {
        ret.marginLeft = "-".concat(this.gutter / 2, "px");
        ret.marginRight = ret.marginLeft;
      }

      return ret;
    }
  },
  render: function render(h) {
    var _this = this;

    return h(this.tag, {
      class: ['awsui-row', this.justify !== 'start' ? "is-justify-".concat(this.justify) : '', this.align !== 'top' ? "is-align-".concat(this.align) : '', {
        'awsui-row--flex': this.type === 'flex'
      }],
      style: this.style,
      on: {
        click: function click() {
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }

          _this.$emit.apply(_this, ["click"].concat(args));
        }
      }
    }, this.$slots.default);
  }
});
// CONCATENATED MODULE: ./packages/row/index.js


/* istanbul ignore next */

row.install = function (Vue) {
  Vue.component(row.name, row);
};

/* harmony default export */ var packages_row = (row);
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js
var es_object_keys = __webpack_require__("b64b");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("53ca");

// CONCATENATED MODULE: ./packages/col/src/col.js






/* harmony default export */ var col = ({
  name: 'AwsuiCol',
  props: {
    span: {
      type: Number,
      default: 24
    },
    tag: {
      type: String,
      default: 'div'
    },
    offset: Number,
    pull: Number,
    push: Number,
    xs: [Number, Object],
    sm: [Number, Object],
    md: [Number, Object],
    lg: [Number, Object],
    xl: [Number, Object]
  },
  computed: {
    gutter: function gutter() {
      var parent = this.$parent;

      while (parent && parent.$options.componentName !== 'AwsuiRow') {
        parent = parent.$parent;
      }

      return parent ? parent.gutter : 0;
    }
  },
  render: function render(h) {
    var _this = this;

    var classList = [];
    var style = {};

    if (this.gutter) {
      style.paddingLeft = this.gutter / 2 + 'px';
      style.paddingRight = style.paddingLeft;
    }

    ['span', 'offset', 'pull', 'push'].forEach(function (prop) {
      if (_this[prop] || _this[prop] === 0) {
        classList.push(prop !== 'span' ? "awsui-col-".concat(prop, "-").concat(_this[prop]) : "awsui-col-".concat(_this[prop]));
      }
    });
    ['xs', 'sm', 'md', 'lg', 'xl'].forEach(function (size) {
      if (typeof _this[size] === 'number') {
        classList.push("awsui-col-".concat(size, "-").concat(_this[size]));
      } else if (Object(esm_typeof["a" /* default */])(_this[size]) === 'object') {
        var props = _this[size];
        Object.keys(props).forEach(function (prop) {
          classList.push(prop !== 'span' ? "awsui-col-".concat(size, "-").concat(prop, "-").concat(props[prop]) : "awsui-col-".concat(size, "-").concat(props[prop]));
        });
      }
    });
    return h(this.tag, {
      class: ['awsui-col', classList],
      style: style
    }, this.$slots.default);
  }
});
// CONCATENATED MODULE: ./packages/col/index.js


/* istanbul ignore next */

col.install = function (Vue) {
  Vue.component(col.name, col);
};

/* harmony default export */ var packages_col = (col);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button.vue?vue&type=template&id=d4629d24&scoped=true&
var buttonvue_type_template_id_d4629d24_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',{staticClass:"awsui-button",class:[
        _vm.type ? 'awsui-button--' + _vm.type : '',
        _vm.buttonSize ? 'awsui-button--' + _vm.buttonSize : '',
        {
            'is-disabled': _vm.buttonDisabled,
            'is-loading': _vm.loading,
            'is-plain': _vm.plain,
            'is-round': _vm.round,
            'is-circle': _vm.circle,
            'is-square': _vm.square
        }
    ],attrs:{"disabled":_vm.buttonDisabled,"autofocus":_vm.autofocus,"type":_vm.nativeType},on:{"click":_vm.handleClick}},[_c('span',{staticClass:"awsui-button-content"},[(_vm.$slots.default)?[(_vm.icon!='')?_c('i',{staticClass:"awsui-iconfont",staticStyle:{"margin-right":"4px"},domProps:{"innerHTML":_vm._s(_vm.icon)}}):_vm._e(),(_vm.loading)?_c('i',{staticClass:"awsui-loading",staticStyle:{"margin-right":"4px"}}):_vm._e(),_vm._t("default")]:[(_vm.icon!='')?_c('i',{staticClass:"awsui-iconfont",domProps:{"innerHTML":_vm._s(_vm.icon)}}):_vm._e(),(_vm.loading)?_c('i',{staticClass:"awsui-loading"}):_vm._e()]],2)])}
var buttonvue_type_template_id_d4629d24_scoped_true_staticRenderFns = []


// CONCATENATED MODULE: ./packages/button/src/button.vue?vue&type=template&id=d4629d24&scoped=true&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var buttonvue_type_script_lang_js_ = ({
  name: 'AwsuiButton',
  inject: {
    awsuiForm: {
      default: ''
    }
  },
  props: {
    type: {
      type: String,
      default: 'default'
    },
    size: String,
    icon: {
      type: String,
      default: ''
    },
    nativeType: {
      type: String,
      default: 'button'
    },
    loading: Boolean,
    disabled: Boolean,
    plain: Boolean,
    autofocus: Boolean,
    round: Boolean,
    circle: Boolean,
    square: Boolean
  },
  computed: {
    buttonSize: function buttonSize() {
      return this.size;
    },
    buttonDisabled: function buttonDisabled() {
      return this.disabled || (this.awsuiForm || {}).disabled;
    }
  },
  methods: {
    handleClick: function handleClick(event) {
      this.$emit('click', event);
    }
  }
});
// CONCATENATED MODULE: ./packages/button/src/button.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_buttonvue_type_script_lang_js_ = (buttonvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/button/src/button.vue?vue&type=style&index=0&id=d4629d24&scoped=true&lang=css&
var buttonvue_type_style_index_0_id_d4629d24_scoped_true_lang_css_ = __webpack_require__("9949");

// CONCATENATED MODULE: ./packages/button/src/button.vue






/* normalize component */

var button_component = Object(componentNormalizer["a" /* default */])(
  src_buttonvue_type_script_lang_js_,
  buttonvue_type_template_id_d4629d24_scoped_true_render,
  buttonvue_type_template_id_d4629d24_scoped_true_staticRenderFns,
  false,
  null,
  "d4629d24",
  null
  
)

/* harmony default export */ var src_button = (button_component.exports);
// CONCATENATED MODULE: ./packages/button/index.js

// 导入组件
 // 为组件提供 install 安装方法，供按需引入

src_button.install = function (Vue) {
  Vue.component(src_button.name, src_button);
}; // 默认导出组件,暴露给调用者


/* harmony default export */ var packages_button = (src_button);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button-group.vue?vue&type=template&id=6082fbe8&
var button_groupvue_type_template_id_6082fbe8_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"awsui-button-group"},[_vm._t("default")],2)}
var button_groupvue_type_template_id_6082fbe8_staticRenderFns = []


// CONCATENATED MODULE: ./packages/button/src/button-group.vue?vue&type=template&id=6082fbe8&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button-group.vue?vue&type=script&lang=js&
//
//
//
//
//
/* harmony default export */ var button_groupvue_type_script_lang_js_ = ({
  name: 'AwsuiButtonGroup'
});
// CONCATENATED MODULE: ./packages/button/src/button-group.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_button_groupvue_type_script_lang_js_ = (button_groupvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/button/src/button-group.vue?vue&type=style&index=0&lang=css&
var button_groupvue_type_style_index_0_lang_css_ = __webpack_require__("646a");

// CONCATENATED MODULE: ./packages/button/src/button-group.vue






/* normalize component */

var button_group_component = Object(componentNormalizer["a" /* default */])(
  src_button_groupvue_type_script_lang_js_,
  button_groupvue_type_template_id_6082fbe8_render,
  button_groupvue_type_template_id_6082fbe8_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var button_group = (button_group_component.exports);
// CONCATENATED MODULE: ./packages/button-group/index.js


/* istanbul ignore next */

button_group.install = function (Vue) {
  Vue.component(button_group.name, button_group);
};

/* harmony default export */ var packages_button_group = (button_group);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio.vue?vue&type=template&id=5068c19d&
var radiovue_type_template_id_5068c19d_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"awsui-component"},[[(_vm.group)?_c('el-radio-group',{on:{"change":_vm.change},model:{value:(_vm.radio),callback:function ($$v) {_vm.radio=$$v},expression:"radio"}},_vm._l((_vm.radios),function(item,index){return _c('el-radio',{key:index,staticClass:"awsui-radio",class:[
                            _vm.size ? 'awsui-radio-' + _vm.size : '',
                            _vm.className?_vm.className:''
                       ],attrs:{"label":item.value,"disabled":item.disabled || (_vm.awsuiForm || {}).disabled}},[_vm._v(" "+_vm._s(typeof item.label!='undefined'?item.label:item.value)+" ")])}),1):_c('el-radio',{staticClass:"awsui-radio",class:[
                        _vm.size ? 'awsui-radio-' + _vm.size : '',
                        _vm.className?_vm.className:''
                     ],attrs:{"label":_vm.label,"disabled":_vm.isDisabled},on:{"change":_vm.change},model:{value:(_vm.radio),callback:function ($$v) {_vm.radio=$$v},expression:"radio"}},[(_vm.showText)?_vm._t("default"):_vm._e()],2)]],2)}
var radiovue_type_template_id_5068c19d_staticRenderFns = []


// CONCATENATED MODULE: ./packages/radio/src/radio.vue?vue&type=template&id=5068c19d&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

/* harmony default export */ var radiovue_type_script_lang_js_ = ({
  name: 'AwsuiRadio',
  // 注意这里的name命名，就是你以后封装好后使用的组件名
  components: {
    "el-radio": element_ui_common["Radio"],
    "el-radio-group": element_ui_common["RadioGroup"]
  },
  inject: {
    awsuiForm: {
      default: ''
    }
  },
  props: {
    group: {
      type: Boolean,
      default: false
    },
    handle: {
      type: Boolean,
      default: false
    },
    radios: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    value: {},
    label: {},
    text: String,
    disabled: {
      type: Boolean,
      default: false
    },
    className: String,
    size: {
      type: String,
      default: ''
    },
    showText: {
      type: Boolean,
      default: true
    }
  },
  data: function data() {
    return {};
  },
  computed: {
    radio: {
      get: function get() {
        return this.value;
      },
      set: function set(val) {
        this.$emit('input', val);
      }
    },
    isDisabled: function isDisabled() {
      return this.disabled || (this.awsuiForm || {}).disabled;
    }
  },
  mounted: function mounted() {
    //主要是默认查询（执行）方法
    this.$nextTick(function () {
      if (!this.showText) {
        this.$el.children[0].lastElementChild.innerText = "";
      }
    });
  },
  methods: {
    change: function change(val) {
      this.$emit('change', val);
      this.$emit('input', val);
    }
  }
});
// CONCATENATED MODULE: ./packages/radio/src/radio.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_radiovue_type_script_lang_js_ = (radiovue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/radio/src/radio.vue?vue&type=style&index=0&lang=css&
var radiovue_type_style_index_0_lang_css_ = __webpack_require__("81196");

// CONCATENATED MODULE: ./packages/radio/src/radio.vue






/* normalize component */

var radio_component = Object(componentNormalizer["a" /* default */])(
  src_radiovue_type_script_lang_js_,
  radiovue_type_template_id_5068c19d_render,
  radiovue_type_template_id_5068c19d_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var src_radio = (radio_component.exports);
// CONCATENATED MODULE: ./packages/radio/index.js

// 导入组件
 // 为组件提供 install 安装方法，供按需引入

src_radio.install = function (Vue) {
  Vue.component(src_radio.name, src_radio);
}; // 默认导出组件,暴露给调用者


/* harmony default export */ var packages_radio = (src_radio);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox.vue?vue&type=template&id=e68f5a76&
var checkboxvue_type_template_id_e68f5a76_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"awsui-component"},[(_vm.checkAll)?[_c('el-checkbox',{attrs:{"indeterminate":_vm.isIndeterminate},on:{"change":_vm.handleCheckAllChange},model:{value:(_vm.isCheckAll),callback:function ($$v) {_vm.isCheckAll=$$v},expression:"isCheckAll"}},[_vm._v(" 全选 ")]),_c('div',{staticStyle:{"margin":"15px 0"}}),_c('el-checkbox-group',{on:{"change":_vm.handleCheckedListChange},model:{value:(_vm.checkList),callback:function ($$v) {_vm.checkList=$$v},expression:"checkList"}},_vm._l((_vm.list),function(item,index){return _c('el-checkbox',{key:index,staticClass:"awsui-checkbox",class:[
                            _vm.checkboxSize ? 'awsui-checkbox-' + _vm.checkboxSize : '',
                            _vm.className?_vm.className:''
                         ],attrs:{"label":item.value,"disabled":item.disabled || (_vm.awsuiForm || {}).disabled}},[_vm._v(" "+_vm._s(typeof item.label!='undefined'?item.label:item.value)+" ")])}),1)]:[(_vm.group)?_c('el-checkbox-group',{on:{"change":_vm.changeList},model:{value:(_vm.checkList),callback:function ($$v) {_vm.checkList=$$v},expression:"checkList"}},_vm._l((_vm.list),function(item,index){return _c('el-checkbox',{key:index,staticClass:"awsui-checkbox",class:[
                            _vm.checkboxSize ? 'awsui-checkbox-' + _vm.checkboxSize : '',
                            _vm.className?_vm.className:''
                         ],attrs:{"label":item.value,"disabled":item.disabled || (_vm.awsuiForm || {}).disabled}},[_vm._v(" "+_vm._s(typeof item.label!='undefined'?item.label:item.value)+" ")])}),1):_c('el-checkbox',_vm._b({staticClass:"awsui-checkbox",class:[
                        _vm.checkboxSize ? 'awsui-checkbox-' + _vm.checkboxSize : '',
                        _vm.className?_vm.className:''
                     ],attrs:{"label":_vm.label!==undefined?_vm.label:'',"disabled":_vm.isDisabled},on:{"change":_vm.change},model:{value:(_vm.checked),callback:function ($$v) {_vm.checked=$$v},expression:"checked"}},'el-checkbox',_vm.$attrs,false),[_vm._t("default")],2)]],2)}
var checkboxvue_type_template_id_e68f5a76_staticRenderFns = []


// CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue?vue&type=template&id=e68f5a76&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox.vue?vue&type=script&lang=js&


//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

/* harmony default export */ var checkboxvue_type_script_lang_js_ = ({
  name: 'AwsuiCheckbox',
  // 注意这里的name命名，就是你以后封装好后使用的组件名
  components: {
    "el-checkbox": element_ui_common["Checkbox"],
    "el-checkbox-group": element_ui_common["CheckboxGroup"]
  },
  inject: {
    awsuiForm: {
      default: ''
    }
  },
  props: {
    checkAll: {
      type: Boolean,
      default: false
    },
    group: {
      type: Boolean,
      default: false
    },
    disabled: {
      type: Boolean,
      default: false
    },
    className: String,
    size: {
      type: String,
      default: ''
    },
    list: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    checkedList: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    label: {}
  },
  data: function data() {
    return {
      isCheckAll: false,
      isIndeterminate: true,
      clist: this.list,
      checkList: this.checkedList
    };
  },
  computed: {
    checked: {
      get: function get() {
        return this.$attrs.value || false;
      },
      set: function set(val) {
        this.$emit('input', val);
      }
    },
    checkboxSize: function checkboxSize() {
      return this.size;
    },
    isDisabled: function isDisabled() {
      return this.disabled || (this.awsuiForm || {}).disabled;
    }
  },
  mounted: function mounted() {},
  methods: {
    change: function change(val) {
      this.$emit('change', val);
      this.$emit('input', val);
    },
    changeList: function changeList(data) {
      this.checkList = data;
      this.$emit('change', this.checkList);
      this.$emit('input', this.checkList);
    },
    handleCheckAllChange: function handleCheckAllChange(val) {
      var list = [];
      this.list.forEach(function (item) {
        list.push(item.value);
      });
      this.checkList = val ? list : [];
      this.isIndeterminate = false;
      this.$emit('change', this.checkList);
      this.$emit('input', this.checkList);
    },
    handleCheckedListChange: function handleCheckedListChange(value) {
      var checkedCount = value.length;
      this.isCheckAll = checkedCount === this.list.length;
      this.isIndeterminate = checkedCount > 0 && checkedCount < this.list.length;
    }
  },
  watch: {
    checked: function checked(val) {
      this.checked = val;
    },
    checkedList: function checkedList(val) {
      this.checkList = val;
    }
  }
});
// CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_checkboxvue_type_script_lang_js_ = (checkboxvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/checkbox/src/checkbox.vue?vue&type=style&index=0&lang=css&
var checkboxvue_type_style_index_0_lang_css_ = __webpack_require__("a2c5");

// CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue






/* normalize component */

var checkbox_component = Object(componentNormalizer["a" /* default */])(
  src_checkboxvue_type_script_lang_js_,
  checkboxvue_type_template_id_e68f5a76_render,
  checkboxvue_type_template_id_e68f5a76_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var src_checkbox = (checkbox_component.exports);
// CONCATENATED MODULE: ./packages/checkbox/index.js


/* istanbul ignore next */

src_checkbox.install = function (Vue) {
  Vue.component(src_checkbox.name, src_checkbox);
};

/* harmony default export */ var packages_checkbox = (src_checkbox);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=template&id=8434a23e&scoped=true&
var inputvue_type_template_id_8434a23e_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"wrapper",class:[
            {
              'awsui-input-group': _vm.$slots.prepend || _vm.$slots.append,
              'awsui-input--prefix': _vm.prefixIcon,
              'awsui-input--suffix': _vm.suffixIcon || _vm.clearable
            }
         ],on:{"mouseenter":function($event){_vm.hovering = true},"mouseleave":function($event){_vm.hovering = false}}},[(_vm.type ==='textarea')?[(typeof _vm.required !== 'boolean'&&_vm.required !== undefined)?[_c('label',{ref:"awsuiLabel",staticClass:"awsui-label",style:(_vm.styleLabel),attrs:{"for":_vm.required.id}},[_vm._v(_vm._s(_vm.required.label))])]:_vm._e(),_c('span',{class:_vm.required===true?'awsui-required':''},[_c('textarea',{ref:"textarea",staticClass:"awsui-input",class:[
							  _vm.className?_vm.className:'',
							  {
								   'is-disabled': _vm.inputDisabled
							  }
						  ],style:(_vm.style),attrs:{"type":"textarea","disabled":_vm.inputDisabled,"readonly":_vm.readonly,"placeholder":_vm.placeholder,"id":typeof _vm.required !== 'boolean'? _vm.required !== undefined?_vm.required.id:'':'',"maxlength":_vm.maxLength,"autocomplete":_vm.autocomplete},on:{"keydown":_vm.keydown,"input":_vm.handleInput,"focus":_vm.handleFocus,"blur":_vm.handleBlur,"change":_vm.handleChange}})])]:[(_vm.$slots.prepend)?_c('div',{staticClass:"awsui-input-group__prepend"},[_vm._t("prepend")],2):_vm._e(),(_vm.prefixIcon)?_c('i',{staticClass:"awsui-iconfont awsui-input-prefix",domProps:{"innerHTML":_vm._s(_vm.prefixIcon)}}):_vm._e(),(typeof _vm.required !== 'boolean'&&_vm.required !== undefined)?[_c('label',{ref:"awsuiLabel",staticClass:"awsui-label",style:(_vm.styleLabel),attrs:{"for":_vm.required.id}},[_vm._v(_vm._s(_vm.required.label))])]:_vm._e(),_c('span',{class:_vm.required===true?'awsui-required':''},[_c('input',{ref:"input",staticClass:"awsui-input",class:[
                        _vm.inputSize ? 'awsui-input--' + _vm.inputSize : '',
                        _vm.className?_vm.className:'',
                        {
                            'is-disabled': _vm.inputDisabled
                        }
                   ],style:(_vm.style),attrs:{"type":_vm.type?(_vm.showPassword ? (_vm.passwordVisible ? 'text': 'password') : _vm.type):'text',"placeholder":_vm.placeholder,"disabled":_vm.inputDisabled,"maxlength":_vm.maxLength,"readonly":_vm.readonly,"id":typeof _vm.required !== 'boolean'? _vm.required !== undefined?_vm.required.id:null:null,"autocomplete":_vm.autocomplete},on:{"keydown":_vm.keydown,"input":_vm.handleInput,"focus":_vm.handleFocus,"blur":_vm.handleBlur,"change":_vm.handleChange}})]),(_vm.suffixIcon)?_c('i',{staticClass:"awsui-iconfont awsui-input-suffix",domProps:{"innerHTML":_vm._s(_vm.suffixIcon)}}):_vm._e(),(_vm.showClear)?_c('i',{staticClass:"awsui-iconfont awsui-input-suffix awsui-input-clear",on:{"click":_vm.clear}},[_vm._v("  ")]):_vm._e(),(_vm.showPwdVisible)?_c('i',{staticClass:"awsui-iconfont awsui-input-suffix",staticStyle:{"font-size":"12px","cursor":"pointer"},on:{"click":_vm.handlePasswordVisible}},[_vm._v("")]):_vm._e(),(_vm.$slots.append)?_c('div',{staticClass:"awsui-input-group__append"},[_vm._t("append")],2):_vm._e()]],2)}
var inputvue_type_template_id_8434a23e_scoped_true_staticRenderFns = []


// CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=template&id=8434a23e&scoped=true&

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.index-of.js
var es_array_index_of = __webpack_require__("c975");

// CONCATENATED MODULE: ./node_modules/element-ui/src/mixins/emitter.js




function _broadcast(componentName, eventName, params) {
  this.$children.forEach(function (child) {
    var name = child.$options.componentName;

    if (name === componentName) {
      child.$emit.apply(child, [eventName].concat(params));
    } else {
      _broadcast.apply(child, [componentName, eventName].concat([params]));
    }
  });
}

/* harmony default export */ var emitter = ({
  methods: {
    dispatch: function dispatch(componentName, eventName, params) {
      var parent = this.$parent || this.$root;
      var name = parent.$options.componentName;

      while (parent && (!name || name !== componentName)) {
        parent = parent.$parent;

        if (parent) {
          name = parent.$options.componentName;
        }
      }

      if (parent) {
        parent.$emit.apply(parent, [eventName].concat(params));
      }
    },
    broadcast: function broadcast(componentName, eventName, params) {
      _broadcast.call(this, componentName, eventName, params);
    }
  }
});
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.slice.js
var es_array_slice = __webpack_require__("fb6a");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js
var es_object_to_string = __webpack_require__("d3b7");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.to-string.js
var es_regexp_to_string = __webpack_require__("25f0");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.match.js
var es_string_match = __webpack_require__("466d");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.split.js
var es_string_split = __webpack_require__("1276");

// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);

// CONCATENATED MODULE: ./node_modules/element-ui/src/utils/types.js


function isString(obj) {
  return Object.prototype.toString.call(obj) === '[object String]';
}
function isObject(obj) {
  return Object.prototype.toString.call(obj) === '[object Object]';
}
function isHtmlElement(node) {
  return node && node.nodeType === Node.ELEMENT_NODE;
}
var isFunction = function isFunction(functionToCheck) {
  var getType = {};
  return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
};
var isUndefined = function isUndefined(val) {
  return val === void 0;
};
var isDefined = function isDefined(val) {
  return val !== undefined && val !== null;
};
// CONCATENATED MODULE: ./node_modules/element-ui/src/utils/util.js














var util_hasOwnProperty = Object.prototype.hasOwnProperty;
function noop() {}
;
function hasOwn(obj, key) {
  return util_hasOwnProperty.call(obj, key);
}
;

function extend(to, _from) {
  for (var key in _from) {
    to[key] = _from[key];
  }

  return to;
}

;
function toObject(arr) {
  var res = {};

  for (var i = 0; i < arr.length; i++) {
    if (arr[i]) {
      extend(res, arr[i]);
    }
  }

  return res;
}
;
var getValueByPath = function getValueByPath(object, prop) {
  prop = prop || '';
  var paths = prop.split('.');
  var current = object;
  var result = null;

  for (var i = 0, j = paths.length; i < j; i++) {
    var path = paths[i];
    if (!current) break;

    if (i === j - 1) {
      result = current[path];
      break;
    }

    current = current[path];
  }

  return result;
};
function getPropByPath(obj, path, strict) {
  var tempObj = obj;
  path = path.replace(/\[(\w+)\]/g, '.$1');
  path = path.replace(/^\./, '');
  var keyArr = path.split('.');
  var i = 0;

  for (var len = keyArr.length; i < len - 1; ++i) {
    if (!tempObj && !strict) break;
    var key = keyArr[i];

    if (key in tempObj) {
      tempObj = tempObj[key];
    } else {
      if (strict) {
        throw new Error('please transfer a valid prop path to form item!');
      }

      break;
    }
  }

  return {
    o: tempObj,
    k: keyArr[i],
    v: tempObj ? tempObj[keyArr[i]] : null
  };
}
;
var generateId = function generateId() {
  return Math.floor(Math.random() * 10000);
};
var valueEquals = function valueEquals(a, b) {
  // see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
  if (a === b) return true;
  if (!(a instanceof Array)) return false;
  if (!(b instanceof Array)) return false;
  if (a.length !== b.length) return false;

  for (var i = 0; i !== a.length; ++i) {
    if (a[i] !== b[i]) return false;
  }

  return true;
};
var escapeRegexpString = function escapeRegexpString() {
  var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  return String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
}; // TODO: use native Array.find, Array.findIndex when IE support is dropped

var arrayFindIndex = function arrayFindIndex(arr, pred) {
  for (var i = 0; i !== arr.length; ++i) {
    if (pred(arr[i])) {
      return i;
    }
  }

  return -1;
};
var arrayFind = function arrayFind(arr, pred) {
  var idx = arrayFindIndex(arr, pred);
  return idx !== -1 ? arr[idx] : undefined;
}; // coerce truthy value to array

var coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
  if (Array.isArray(val)) {
    return val;
  } else if (val) {
    return [val];
  } else {
    return [];
  }
};
var util_isIE = function isIE() {
  return !external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
};
var util_isEdge = function isEdge() {
  return !external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
};
var util_isFirefox = function isFirefox() {
  return !external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
};
var util_autoprefixer = function autoprefixer(style) {
  if (Object(esm_typeof["a" /* default */])(style) !== 'object') return style;
  var rules = ['transform', 'transition', 'animation'];
  var prefixes = ['ms-', 'webkit-'];
  rules.forEach(function (rule) {
    var value = style[rule];

    if (rule && value) {
      prefixes.forEach(function (prefix) {
        style[prefix + rule] = value;
      });
    }
  });
  return style;
};
var kebabCase = function kebabCase(str) {
  var hyphenateRE = /([^-])([A-Z])/g;
  return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase();
};
var util_capitalize = function capitalize(str) {
  if (!isString(str)) return str;
  return str.charAt(0).toUpperCase() + str.slice(1);
};
var util_looseEqual = function looseEqual(a, b) {
  var isObjectA = isObject(a);
  var isObjectB = isObject(b);

  if (isObjectA && isObjectB) {
    return JSON.stringify(a) === JSON.stringify(b);
  } else if (!isObjectA && !isObjectB) {
    return String(a) === String(b);
  } else {
    return false;
  }
};
var arrayEquals = function arrayEquals(arrayA, arrayB) {
  arrayA = arrayA || [];
  arrayB = arrayB || [];

  if (arrayA.length !== arrayB.length) {
    return false;
  }

  for (var i = 0; i < arrayA.length; i++) {
    if (!util_looseEqual(arrayA[i], arrayB[i])) {
      return false;
    }
  }

  return true;
};
var isEqual = function isEqual(value1, value2) {
  if (Array.isArray(value1) && Array.isArray(value2)) {
    return arrayEquals(value1, value2);
  }

  return util_looseEqual(value1, value2);
};
var isEmpty = function isEmpty(val) {
  // null or undefined
  if (val == null) return true;
  if (typeof val === 'boolean') return false;
  if (typeof val === 'number') return !val;
  if (val instanceof Error) return val.message === '';

  switch (Object.prototype.toString.call(val)) {
    // String or Array
    case '[object String]':
    case '[object Array]':
      return !val.length;
    // Map or Set or File

    case '[object File]':
    case '[object Map]':
    case '[object Set]':
      {
        return !val.size;
      }
    // Plain Object

    case '[object Object]':
      {
        return !Object.keys(val).length;
      }
  }

  return false;
};
function rafThrottle(fn) {
  var locked = false;
  return function () {
    var _this = this;

    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    if (locked) return;
    locked = true;
    window.requestAnimationFrame(function (_) {
      fn.apply(_this, args);
      locked = false;
    });
  };
}
function objToArray(obj) {
  if (Array.isArray(obj)) {
    return obj;
  }

  return isEmpty(obj) ? [] : [obj];
}
// CONCATENATED MODULE: ./node_modules/element-ui/src/mixins/migrating.js



/**
 * Show migrating guide in browser console.
 *
 * Usage:
 * import Migrating from 'element-ui/src/mixins/migrating';
 *
 * mixins: [Migrating]
 *
 * add getMigratingConfig method for your component.
 *  getMigratingConfig() {
 *    return {
 *      props: {
 *        'allow-no-selection': 'allow-no-selection is removed.',
 *        'selection-mode': 'selection-mode is removed.'
 *      },
 *      events: {
 *        selectionchange: 'selectionchange is renamed to selection-change.'
 *      }
 *    };
 *  },
 */

/* harmony default export */ var migrating = ({
  mounted: function mounted() {
    if (true) return;
    if (!this.$vnode) return;

    var _this$getMigratingCon = this.getMigratingConfig(),
        _this$getMigratingCon2 = _this$getMigratingCon.props,
        props = _this$getMigratingCon2 === void 0 ? {} : _this$getMigratingCon2,
        _this$getMigratingCon3 = _this$getMigratingCon.events,
        events = _this$getMigratingCon3 === void 0 ? {} : _this$getMigratingCon3;

    var _this$$vnode = this.$vnode,
        data = _this$$vnode.data,
        componentOptions = _this$$vnode.componentOptions;
    var definedProps = data.attrs || {};
    var definedEvents = componentOptions.listeners || {};

    for (var propName in definedProps) {
      propName = kebabCase(propName); // compatible with camel case

      if (props[propName]) {
        console.warn("[Element Migrating][".concat(this.$options.name, "][Attribute]: ").concat(props[propName]));
      }
    }

    for (var eventName in definedEvents) {
      eventName = kebabCase(eventName); // compatible with camel case

      if (events[eventName]) {
        console.warn("[Element Migrating][".concat(this.$options.name, "][Event]: ").concat(events[eventName]));
      }
    }
  },
  methods: {
    getMigratingConfig: function getMigratingConfig() {
      return {
        props: {},
        events: {}
      };
    }
  }
});
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=script&lang=js&


//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


/* harmony default export */ var inputvue_type_script_lang_js_ = ({
  name: "AwsuiInput",
  // 注意这里的name命名，就是你以后封装好后使用的组件名
  mixins: [emitter, migrating],
  inject: {
    awsuiForm: {
      default: ''
    },
    awsuiFormItem: {
      default: ''
    }
  },
  props: {
    value: [String, Number],
    placeholder: {
      type: String,
      default: "请输入内容"
    },
    type: {
      type: String,
      default: "text"
    },
    // 禁用状态
    disabled: {
      type: Boolean,
      default: false
    },
    // 只读
    readonly: {
      type: Boolean,
      default: false
    },
    clearable: {
      type: Boolean,
      default: false
    },
    showPassword: {
      type: Boolean,
      default: false
    },
    size: {
      type: String,
      default: ""
    },
    maxLength: Number,
    className: String,
    suffixIcon: String,
    prefixIcon: String,
    prepend: String,
    append: String,
    validateEvent: {
      type: Boolean,
      default: true
    },
    autocomplete: {
      type: String,
      default: "off"
    },
    required: {
      type: [Boolean, Object],
      default: false
    }
  },
  data: function data() {
    return {
      hovering: false,
      focused: false,
      passwordVisible: false,
      labelWidth: typeof this.required.labelWidth !== 'undefined' ? this.required.labelWidth : ''
    };
  },
  computed: {
    inputSize: function inputSize() {
      return this.size || this._awsuiFormItemSize || (this.$Awsui || {}).size;
    },
    inputDisabled: function inputDisabled() {
      return this.disabled || (this.awsuiForm || {}).disabled;
    },
    validateState: function validateState() {
      return this.awsuiFormItem ? this.awsuiFormItem.validateState : "";
    },
    nativeInputValue: function nativeInputValue() {
      return this.value === null || this.value === undefined ? "" : String(this.value);
    },
    showClear: function showClear() {
      return this.clearable && !this.inputDisabled && !this.readonly && this.nativeInputValue && (this.focused || this.hovering);
    },
    showPwdVisible: function showPwdVisible() {
      return this.showPassword && !this.inputDisabled && !this.readonly && (!!this.nativeInputValue || this.focused);
    },
    styleLabel: function styleLabel() {
      var style = {};

      if (typeof this.required !== 'boolean' && this.required !== undefined) {
        if (this.labelWidth.indexOf("%") != -1) {
          style.width = this.labelWidth;
        } else {
          style.width = this.labelWidth;
        }
      }

      return style;
    },
    style: function style() {
      var style = {};

      if (typeof this.required !== 'boolean' && this.required !== undefined) {
        if (this.labelWidth.indexOf("%") != -1) {
          style.width = "calc(100% - ".concat(this.labelWidth, ")");
        } else {
          style.width = "calc(100% - ".concat(this.labelWidth, ")");
        }
      }

      return style;
    }
  },
  created: function created() {
    this.$on("inputSelect", this.select);
  },
  mounted: function mounted() {
    this.setNativeInputValue();
  },
  methods: {
    focus: function focus() {
      this.getInput().focus();
    },
    blur: function blur() {
      this.getInput().blur();
    },
    keydown: function keydown(event) {
      this.$emit("keydown", event);
    },
    //监听输入框事件
    handleInput: function handleInput(event) {
      if (this.isComposing) return;
      if (event.target.value === this.nativeInputValue) return;
      this.$emit("input", event.target.value);
      this.$nextTick(this.setNativeInputValue);
    },
    clear: function clear() {
      this.$emit("input", "");
      this.$emit("change", "");
      this.$emit("clear");
    },
    handleFocus: function handleFocus(event) {
      this.focused = true;
      this.$emit("focus", event);
    },
    handleBlur: function handleBlur(event) {
      this.focused = false;
      this.$emit("blur", event);

      if (this.validateEvent) {
        this.dispatch("AwsuiFormItem", "awsui.form.blur", [this.value]);
      }
    },
    handleChange: function handleChange(event) {
      this.$emit("change", event.target.value);
    },
    setNativeInputValue: function setNativeInputValue() {
      var input = this.getInput();
      if (!input) return;
      if (input.value === this.nativeInputValue) return;
      input.value = this.nativeInputValue;
    },
    select: function select() {
      this.getInput().select();
    },
    handlePasswordVisible: function handlePasswordVisible() {
      this.passwordVisible = !this.passwordVisible;
      this.focus();
    },
    getInput: function getInput() {
      return this.$refs.input || this.$refs.textarea;
    }
  },
  watch: {
    value: function value(val) {
      //this.input = this.value;
      if (this.validateEvent) {
        this.dispatch("AwsuiFormItem", "awsui.form.change", [val]);
      }
    },
    nativeInputValue: function nativeInputValue() {
      this.setNativeInputValue();
    }
  }
});
// CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_inputvue_type_script_lang_js_ = (inputvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/input/src/input.vue?vue&type=style&index=0&id=8434a23e&scoped=true&lang=css&
var inputvue_type_style_index_0_id_8434a23e_scoped_true_lang_css_ = __webpack_require__("8942");

// CONCATENATED MODULE: ./packages/input/src/input.vue






/* normalize component */

var input_component = Object(componentNormalizer["a" /* default */])(
  src_inputvue_type_script_lang_js_,
  inputvue_type_template_id_8434a23e_scoped_true_render,
  inputvue_type_template_id_8434a23e_scoped_true_staticRenderFns,
  false,
  null,
  "8434a23e",
  null
  
)

/* harmony default export */ var input = (input_component.exports);
// CONCATENATED MODULE: ./packages/input/index.js

// 导入组件
 // 为组件提供 install 安装方法，供按需引入

input.install = function (Vue) {
  Vue.component(input.name, input);
}; // 默认导出组件,暴露给调用者


/* harmony default export */ var packages_input = (input);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/input-number/src/input-number.vue?vue&type=template&id=e0a0c7e8&scoped=true&
var input_numbervue_type_template_id_e0a0c7e8_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"awsui-box-component"},[((_vm.symbol!==''?'text':'number')==='checkbox')?_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.inputValue),expression:"inputValue"}],staticClass:"awsui-input-number",class:[
                _vm.inputSize ? 'awsui-input-number--' + _vm.inputSize : '',
                _vm.className?_vm.className:'',
                {
                    'awsui-disabled': _vm.disabled
                }
           ],attrs:{"max":_vm.max,"min":_vm.min,"readonly":_vm.readonly,"disabled":_vm.inputNumberDisabled,"onkeypress":"return(/[\\d]/.test(String.fromCharCode(event.keyCode)))","type":"checkbox"},domProps:{"checked":Array.isArray(_vm.inputValue)?_vm._i(_vm.inputValue,null)>-1:(_vm.inputValue)},on:{"blur":_vm.handleBlur,"focus":_vm.handleFocus,"input":_vm.handleInput,"change":[function($event){var $$a=_vm.inputValue,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.inputValue=$$a.concat([$$v]))}else{$$i>-1&&(_vm.inputValue=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.inputValue=$$c}},_vm.onChange]}}):((_vm.symbol!==''?'text':'number')==='radio')?_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.inputValue),expression:"inputValue"}],staticClass:"awsui-input-number",class:[
                _vm.inputSize ? 'awsui-input-number--' + _vm.inputSize : '',
                _vm.className?_vm.className:'',
                {
                    'awsui-disabled': _vm.disabled
                }
           ],attrs:{"max":_vm.max,"min":_vm.min,"readonly":_vm.readonly,"disabled":_vm.inputNumberDisabled,"onkeypress":"return(/[\\d]/.test(String.fromCharCode(event.keyCode)))","type":"radio"},domProps:{"checked":_vm._q(_vm.inputValue,null)},on:{"blur":_vm.handleBlur,"focus":_vm.handleFocus,"input":_vm.handleInput,"change":[function($event){_vm.inputValue=null},_vm.onChange]}}):_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.inputValue),expression:"inputValue"}],staticClass:"awsui-input-number",class:[
                _vm.inputSize ? 'awsui-input-number--' + _vm.inputSize : '',
                _vm.className?_vm.className:'',
                {
                    'awsui-disabled': _vm.disabled
                }
           ],attrs:{"max":_vm.max,"min":_vm.min,"readonly":_vm.readonly,"disabled":_vm.inputNumberDisabled,"onkeypress":"return(/[\\d]/.test(String.fromCharCode(event.keyCode)))","type":_vm.symbol!==''?'text':'number'},domProps:{"value":(_vm.inputValue)},on:{"blur":_vm.handleBlur,"focus":_vm.handleFocus,"input":[function($event){if($event.target.composing){ return; }_vm.inputValue=$event.target.value},_vm.handleInput],"change":_vm.onChange}}),_c('span',{staticClass:"awsui-input-number-arrow",class:[
              _vm.inputSize ? 'awsui-input-number-arrow--' + _vm.inputSize : '',
              {
                  'awsui-disabled': _vm.disabled
              }
          ],style:({'display':_vm.showOpt?'block':'none'})},[_c('span',{staticClass:"awsui-iconfont",class:[
                  {
                      'awsui-disabled': _vm.maxDisabled
                  }
              ],on:{"click":function($event){return _vm.changeCount(_vm.count,1,_vm.uplength)}}},[_vm._v("  ")]),_c('span',{staticClass:"awsui-iconfont",class:[
                  {
                      'awsui-disabled': _vm.minDisabled
                  }
            ],on:{"click":function($event){return _vm.changeCount(_vm.count,-1,_vm.uplength)}}},[_vm._v("  ")])])])}
var input_numbervue_type_template_id_e0a0c7e8_scoped_true_staticRenderFns = []


// CONCATENATED MODULE: ./packages/input-number/src/input-number.vue?vue&type=template&id=e0a0c7e8&scoped=true&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/input-number/src/input-number.vue?vue&type=script&lang=js&



//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var input_numbervue_type_script_lang_js_ = ({
  name: "AwsuiInputNumber",
  // 注意这里的name命名，就是你以后封装好后使用的组件名
  inject: {
    awsuiForm: {
      default: ''
    }
  },
  props: {
    className: String,
    value: {
      type: [String, Number],
      default: 0
    },
    disabled: {
      type: Boolean,
      default: false
    },
    max: {
      type: Number,
      default: Infinity
    },
    min: {
      type: Number,
      default: 0
    },
    uplength: {
      type: Number,
      default: 0
    },
    symbol: {
      type: String,
      default: ""
    },
    size: {
      type: String,
      default: ""
    },
    inputStyle: {
      type: Object,
      default: function _default() {}
    },
    readonly: {
      type: Boolean,
      default: false
    }
  },
  data: function data() {
    return {
      count: 0,
      svalue: '',
      maxDisabled: this.disabled ? true : false,
      minDisabled: this.disabled ? true : false,
      focused: false,
      showOpt: true
    };
  },
  mounted: function mounted() {
    //初始话下拉框的值
    //this.svalue = this.value + this.symbol;
    var newVal = this.value === '' || this.value === null ? undefined : Number(this.value);

    if (!isNaN(newVal)) {
      this.svalue = newVal + this.symbol;

      if (typeof this.min === 'number') {
        if (newVal < this.min) {
          this.count = this.min;
          this.svalue = this.min + this.symbol;
          this.minDisabled = true;
        } else {
          this.count = newVal;
        }
      } else {
        this.$message({
          message: '请检查传入的max和min类型，确保为number类型',
          type: 'error'
        });
      }
    } else {
      this.count = 0;
      this.showOpt = false;
    }

    if (this.count === 0) {
      this.minDisabled = true;
    }
  },
  methods: {
    setStyle: function setStyle() {
      return this.inputStyle;
    },
    changeCount: function changeCount(count, status, uplength) {
      if (this.disabled) {
        return;
      }

      if (status > 0) {
        if (parseFloat(uplength) > 0) {
          this.count += parseFloat(uplength);
        } else {
          this.count++;
        }
      } else {
        if (parseFloat(uplength) > 0) {
          this.count -= parseFloat(uplength);
        } else {
          this.count--;
        }
      }

      this.setCurrentCount();
    },
    onChange: function onChange(e) {
      var val = Number(e.target.value.replace(/[^0-9]/ig, ''));
      this.$emit("input", val); //将值放在自定义的事件函数中作为参数

      this.$emit("change", val); //将值放在自定义的事件函数中作为参数
    },
    handleBlur: function handleBlur(event) {
      this.focused = false;
      this.$emit('blur', event);
    },
    handleFocus: function handleFocus(event) {
      this.focused = true;
      this.$emit('focus', event);
    },
    setCurrentCount: function setCurrentCount() {
      this.maxDisabled = false;
      this.minDisabled = false;

      if (this.count >= this.max) {
        this.count = this.max;
        this.maxDisabled = true;
      }

      if (this.count <= this.min) {
        this.count = this.min;
        this.minDisabled = true;
      }

      this.$emit("input", this.count); //将值放在自定义的事件函数中作为参数

      this.$emit("change", this.count); //将值放在自定义的事件函数中作为参数

      this.svalue = this.count + this.symbol;
    },
    //监听输入框事件
    handleInput: function handleInput(e) {
      var val = e.target.value.replace(/[^0-9]/ig, '');

      if (val !== '') {
        this.count = Number(val);
        this.showOpt = true;
        this.setCurrentCount();
      }
    }
  },
  computed: {
    classObject: function classObject() {
      return {};
    },
    inputSize: function inputSize() {
      return this.size;
    },
    inputNumberDisabled: function inputNumberDisabled() {
      return this.disabled || (this.awsuiForm || {}).disabled;
    },
    inputValue: {
      get: function get() {
        var that = this;
        var result = '';
        var newVal = this.value === '' || this.value === null ? 0 : Number(this.value);

        if (!isNaN(newVal)) {
          var count = Number(newVal);
          that.maxDisabled = false;
          that.minDisabled = false;

          if (count >= this.max) {
            count = this.max;
            that.maxDisabled = true;
          }

          if (count <= this.min) {
            count = this.min;
            that.minDisabled = true;
          }

          that.count = count;
          result = count + this.symbol;
        }

        return result;
      },
      set: function set(val) {
        var result = val.replace(/[^0-9]/ig, '');

        if (result !== '') {
          this.count = Number(result);
          this.setCurrentCount();
        }
      }
    }
  },
  watch: {}
});
// CONCATENATED MODULE: ./packages/input-number/src/input-number.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_input_numbervue_type_script_lang_js_ = (input_numbervue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/input-number/src/input-number.vue?vue&type=style&index=0&id=e0a0c7e8&scoped=true&lang=css&
var input_numbervue_type_style_index_0_id_e0a0c7e8_scoped_true_lang_css_ = __webpack_require__("6325");

// CONCATENATED MODULE: ./packages/input-number/src/input-number.vue






/* normalize component */

var input_number_component = Object(componentNormalizer["a" /* default */])(
  src_input_numbervue_type_script_lang_js_,
  input_numbervue_type_template_id_e0a0c7e8_scoped_true_render,
  input_numbervue_type_template_id_e0a0c7e8_scoped_true_staticRenderFns,
  false,
  null,
  "e0a0c7e8",
  null
  
)

/* harmony default export */ var input_number = (input_number_component.exports);
// CONCATENATED MODULE: ./packages/input-number/index.js

// 导入组件
 // 为组件提供 install 安装方法，供按需引入

input_number.install = function (Vue) {
  Vue.component(input_number.name, input_number);
}; // 默认导出组件,暴露给调用者


/* harmony default export */ var packages_input_number = (input_number);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select.vue?vue&type=template&id=13fe1c71&
var selectvue_type_template_id_13fe1c71_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"awsui-box-component"},[(_vm.custom)?_c('span',{ref:"span",staticClass:"awsui-select-label",style:({'color':_vm.changeColor?'#666':'#c0c4cc','display':_vm.isFiterable || _vm.multiple?'none':''}),domProps:{"innerHTML":_vm._s(_vm.setLabel)},on:{"click":_vm.switchTab}}):_vm._e(),_c('el-select',_vm._b({ref:"awsuiSelect",staticClass:"awsui-select",class:[
                    _vm.selectSize ? 'awsui-select--' + _vm.selectSize : '',
                    _vm.className?_vm.className:'',
                    _vm.changeHeight?'awsui-select-multiple':''
               ],staticStyle:{"width":"100%"},attrs:{"placeholder":_vm.placeholder,"reserve-keyword":"","disabled":_vm.selectDisabled,"clearable":_vm.clearable,"multiple":_vm.multiple,"filterable":_vm.filterable,"remote":_vm.remote,"allow-create":_vm.allowCreate,"default-first-option":_vm.defaultFirstOption,"popper-append-to-body":_vm.popperAppendToBody,"remote-method":_vm.remoteMethod,"loading":_vm.loading,"loading-text":_vm.loadingText},on:{"focus":_vm.setWidth,"change":_vm.change,"clear":_vm.handleClearClick,"remove-tag":_vm.deleteTag},nativeOn:{"click":function($event){return _vm.handleClick($event)}},model:{value:(_vm.selectValue),callback:function ($$v) {_vm.selectValue=$$v},expression:"selectValue"}},'el-select',_vm.$attrs,false),[(_vm.group)?_vm._l((_vm.options),function(group){return _c('el-option-group',{key:group.label,attrs:{"label":_vm.custom?'':group.label}},[(_vm.custom)?_c('li',{staticClass:"el-select-group__title",style:({'margin-top':_vm.custom?'-5px':'0px'}),domProps:{"innerHTML":_vm._s(group.label)}}):_vm._e(),_vm._l((group.options),function(item){return _c('el-option',{key:item.value,style:({'width': _vm.width + 'px'}),attrs:{"label":_vm.custom?_vm.delHtmlTag(item.label):item.label,"value":item.value,"disabled":item.disabled},nativeOn:{"click":function($event){return _vm.getItem(item)},"keyup":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.getItem(item)}}},[(_vm.custom)?[_c('div',{staticClass:"awsui-select-option-item-label awsui-ellipsis",domProps:{"innerHTML":_vm._s(item.label)}})]:_vm._e()],2)})],2)}):_vm._l((_vm.options),function(item){return _c('el-option',{key:item.value,style:({'width': _vm.width + 'px'}),attrs:{"label":_vm.custom?_vm.delHtmlTag(item.label):item.label,"value":item.value,"disabled":item.disabled},nativeOn:{"click":function($event){return _vm.getItem(item)}}},[(_vm.custom)?[_c('div',{staticClass:"awsui-select-option-item-label awsui-ellipsis",domProps:{"innerHTML":_vm._s(item.label)}})]:_vm._e()],2)})],2)],1)}
var selectvue_type_template_id_13fe1c71_staticRenderFns = []


// CONCATENATED MODULE: ./packages/select/src/select.vue?vue&type=template&id=13fe1c71&

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.includes.js
var es_array_includes = __webpack_require__("caad");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.join.js
var es_array_join = __webpack_require__("a15b");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.constructor.js
var es_regexp_constructor = __webpack_require__("4d63");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.includes.js
var es_string_includes = __webpack_require__("2532");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.trim.js
var es_string_trim = __webpack_require__("498a");

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select.vue?vue&type=script&lang=js&













//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

/* harmony default export */ var selectvue_type_script_lang_js_ = ({
  name: 'AwsuiSelect',
  // 注意这里的name命名，就是你以后封装好后使用的组件名
  components: {
    "el-select": element_ui_common["Select"],
    "el-option": element_ui_common["Option"],
    "el-option-group": element_ui_common["OptionGroup"]
  },
  inject: {
    awsuiForm: {
      default: ''
    }
  },
  data: function data() {
    return {
      list: [],
      label: this.$attrs.placeholder || '请选择',
      changeColor: false,
      isFiterable: this.custom && this.filterable ? true : false,
      selected: this.multiple ? [] : {},
      changeHeight: false,
      width: 0
    };
  },
  props: {
    value: {},
    group: {
      type: Boolean,
      default: false
    },
    className: String,
    size: {
      type: String,
      default: ''
    },
    loading: {
      type: Boolean,
      default: false
    },
    loadingText: {
      type: String,
      default: '加载中'
    },
    disabled: {
      type: Boolean,
      default: false
    },
    clearable: {
      type: Boolean,
      default: false
    },
    multiple: {
      type: Boolean,
      default: false
    },
    custom: {
      type: Boolean,
      default: false
    },
    filterable: {
      type: Boolean,
      default: false
    },
    remote: {
      type: Boolean,
      default: false
    },
    remoteMethod: {
      type: Function,
      default: function _default() {
        console.log('默认');
      }
    },
    allowCreate: {
      type: Boolean,
      default: false
    },
    defaultFirstOption: {
      type: Boolean,
      default: false
    },
    popperAppendToBody: {
      type: Boolean,
      default: true
    },
    searchList: {
      default: function _default() {
        return [];
      },
      type: Array
    }
  },
  computed: {
    selectValue: {
      get: function get() {
        return this.value;
      },
      set: function set(val) {
        this.$emit('input', val);
      }
    },
    setLabel: function setLabel() {
      this.initLabel();
      return this.label;
    },
    selectDisabled: function selectDisabled() {
      return this.disabled || (this.awsuiForm || {}).disabled;
    },
    options: function options() {
      return this.$attrs.options;
    },
    selectSize: function selectSize() {
      return this.size;
    },
    placeholder: function placeholder() {
      return this.$attrs.placeholder || '请选择';
    }
  },
  mounted: function mounted() {
    var _this2 = this;

    var _this = this; //初始话下拉框的值


    _this.initLabel();

    this.$nextTick(function () {
      if (_this2.$refs.awsuiSelect !== undefined) {
        if (_this2.$refs.awsuiSelect.$el.getElementsByClassName('el-input__inner')[0] !== undefined) {
          var inputInner = _this2.$refs.awsuiSelect.$el.getElementsByClassName('el-input__inner')[0];

          if (!_this2.filterable && inputInner.getAttribute('readonly')) {
            //inputInner.setAttribute('onfocus','this.blur()')
            inputInner.setAttribute('unselectable', 'no');
          }
        }
      }

      _this.setSelectHeight();
    });
    window.addEventListener('resize', function () {
      _this.setSelectHeight();

      _this.setWidth();
    });
  },
  methods: {
    initLabel: function initLabel() {
      var _this3 = this;

      if (this.custom) {
        if (this.options.length > 0) {
          this.options.forEach(function (item, index) {
            //item 就是当日按循环到的对象
            //index是循环的索引，从0开始
            if (item.options !== undefined && item.options.length > 0) {
              item.options.forEach(function (el, i) {
                if (el.value === _this3.value) {
                  if (el.label !== undefined) {
                    _this3.getItem(el);
                  }
                }
              });
            } else {
              if (item.value === _this3.value) {
                if (item.label !== undefined) {
                  _this3.getItem(item);
                }
              }
            }
          });
        }
      }
    },
    //去掉html字符串中的所有标签元素
    delHtmlTag: function delHtmlTag(str) {
      var result = '';

      if (str.indexOf('<span class="awsui-select-right">') !== -1) {
        result = str.split('<span class="awsui-select-right">')[0];
      } else if (str.indexOf("<span class='awsui-select-right'>") !== -1) {
        result = str.split("<span class='awsui-select-right'>")[0];
      } else {
        result = str;
      }

      result = result.replace(/<[^>]+>/g, "").replace(/&#[^;]+;/g, "").replace(/[^\u4e00-\u9fa5a-zA-Z0-9\w]/g, '').trim();
      return result;
    },
    con: function con(label) {
      var reg = /[\u4e00-\u9fa5]/g;
      label = label.match(reg);
      return label.join("");
    },
    switchTab: function switchTab() {
      if (this.custom && this.filterable) {
        this.isFiterable = true;
      }

      this.$refs['awsuiSelect'].$el.click();
    },
    change: function change(val) {
      this.setWidth();
      this.$emit('input', val);
      this.$emit('change', val);
      this.$refs.awsuiSelect.query = '';
      this.$forceUpdate();
    },
    handleClick: function handleClick() {
      this.setWidth();
      this.$emit('click');
    },
    handleClearClick: function handleClearClick() {
      this.deleteSelected();
    },
    deleteSelected: function deleteSelected() {
      var value = this.multiple ? [] : '';
      this.label = "";

      if (this.label === '') {
        this.isFiterable = true;
      }

      this.change(value);
      this.$emit('clear');
    },
    deleteTag: function deleteTag(val) {
      this.$emit('remove-tag', val);
      this.setSelectHeight();
    },
    getItem: function getItem(item) {
      this.label = item.label;
      this.changeColor = true;

      if (this.custom) {
        if (this.filterable) {
          this.isFiterable = false;
        }

        if (item.type !== undefined) {
          if (item.label.includes('awsui-select-right')) {
            var reg = new RegExp('awsui-select-right', 'g'); //g代表全部

            this.label = item.label.replace(reg, item.type);
          }
        }
      }

      if (this.multiple) {
        this.deleteTag(item.value);
      }
    },
    setSelectHeight: function setSelectHeight() {
      var _this4 = this;

      this.$nextTick(function () {
        if (_this4.$refs.awsuiSelect !== undefined) {
          if (_this4.$refs.awsuiSelect.$el.getElementsByClassName('el-select__tags')[0] !== undefined) {
            var height = parseInt(_this4.$refs.awsuiSelect.$el.getElementsByClassName('el-select__tags')[0].clientHeight);

            if (_this4.$refs.awsuiSelect.$el.getElementsByClassName('el-input__inner')[0] !== undefined) {
              var inputInner = _this4.$refs.awsuiSelect.$el.getElementsByClassName('el-input__inner')[0];

              if (height > 40) {
                _this4.changeHeight = false;
                inputInner.style.height = height + 'px!important';
              } else {
                _this4.changeHeight = true;
                inputInner.style.height = '28px!important';
              }
            }
          }
        }
      });
    },
    setWidth: function setWidth() {
      var _this5 = this;

      this.$nextTick(function () {
        if (_this5.$refs.awsuiSelect !== undefined) {
          _this5.width = _this5.$refs.awsuiSelect.$el.clientWidth;
        }
      });
    }
  },
  watch: {
    width: function width(val) {
      // 为了避免频繁触发resize函数导致页面卡顿，使用定时器
      if (!this.timer) {
        // 一旦监听到的selectWidth值改变，就将其重新赋给data里的selectWidth
        this.width = val;
        this.timer = true;
        var that = this;
        setTimeout(function () {
          // 打印width变化的值
          console.log(that.width);
          that.timer = false;
        }, 100);
      }
    }
  }
});
// CONCATENATED MODULE: ./packages/select/src/select.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_selectvue_type_script_lang_js_ = (selectvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/select/src/select.vue?vue&type=style&index=0&lang=css&
var selectvue_type_style_index_0_lang_css_ = __webpack_require__("6b03");

// CONCATENATED MODULE: ./packages/select/src/select.vue






/* normalize component */

var select_component = Object(componentNormalizer["a" /* default */])(
  src_selectvue_type_script_lang_js_,
  selectvue_type_template_id_13fe1c71_render,
  selectvue_type_template_id_13fe1c71_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var src_select = (select_component.exports);
// CONCATENATED MODULE: ./packages/select/index.js

// 导入组件
 // 为组件提供 install 安装方法，供按需引入

src_select.install = function (Vue) {
  Vue.component(src_select.name, src_select);
}; // 默认导出组件,暴露给调用者


/* harmony default export */ var packages_select = (src_select);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/bo-metadata-select/src/bo-metadata-select.vue?vue&type=template&id=1912764a&
var bo_metadata_selectvue_type_template_id_1912764a_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('awsui-select',{attrs:{"options":_vm.options,"filterable":"","custom":"","clearable":"","multiple":_vm.defaults.multiple},model:{value:(_vm.BOvalue),callback:function ($$v) {_vm.BOvalue=$$v},expression:"BOvalue"}})],1)}
var bo_metadata_selectvue_type_template_id_1912764a_staticRenderFns = []


// CONCATENATED MODULE: ./packages/bo-metadata-select/src/bo-metadata-select.vue?vue&type=template&id=1912764a&

// EXTERNAL MODULE: ./node_modules/regenerator-runtime/runtime.js
var runtime = __webpack_require__("96cf");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.js
var es_promise = __webpack_require__("e6cf");

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



function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  try {
    var info = gen[key](arg);
    var value = info.value;
  } catch (error) {
    reject(error);
    return;
  }

  if (info.done) {
    resolve(value);
  } else {
    Promise.resolve(value).then(_next, _throw);
  }
}

function _asyncToGenerator(fn) {
  return function () {
    var self = this,
        args = arguments;
    return new Promise(function (resolve, reject) {
      var gen = fn.apply(self, args);

      function _next(value) {
        asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
      }

      function _throw(err) {
        asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
      }

      _next(undefined);
    });
  };
}
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/bo-metadata-select/src/bo-metadata-select.vue?vue&type=script&lang=js&



//
//
//
//
//
/* harmony default export */ var bo_metadata_selectvue_type_script_lang_js_ = ({
  name: "BOMetadataSelect",
  data: function data() {
    return {
      BOvalue: "",
      options: []
    };
  },
  props: {
    defaults: {
      type: Object
    },
    value: {
      type: [String, Array]
    }
  },
  watch: {
    defaults: {
      handler: function handler(val) {
        if (val.data && val.data.length > 0) {
          this.localData(val.data);
        } else {
          this.requestData(val);
        }
      },
      immediate: true,
      deep: true
    },
    value: {
      handler: function handler(newVal) {
        this.BOvalue = newVal;
      },
      immediate: true
    },
    BOvalue: function BOvalue(newVal) {
      this.$emit("input", newVal);
      this.$emit("change", newVal);
    }
  },
  methods: {
    requestData: function requestData(def) {
      var _this = this;

      return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
        var res, arr, i, obj, _obj, _obj2;

        return regeneratorRuntime.wrap(function _callee$(_context) {
          while (1) {
            switch (_context.prev = _context.next) {
              case 0:
                _context.next = 2;
                return _this.awsuiaxios.post({
                  url: "jd",
                  data: {
                    cmd: def.cmd,
                    boDefId: def.boDefId,
                    showBOFieldName: def.showBOFieldName,
                    typeFilter: def.typeFilter,
                    valueField: def.valueField,
                    boItemType: def.boItemType,
                    multiple: def.multiple
                  }
                });

              case 2:
                res = _context.sent;

                if (res.result == "ok") {
                  arr = res.data.data; // console.log(arr)

                  for (i = 0; i < arr.length; i++) {
                    if (arr[i].id) {
                      if (arr[i].columnType == "TEXT" || arr[i].columnType == "BIGTEXT") {
                        obj = {
                          value: arr[i].id,
                          type: "text",
                          label: "<i class=\"awsui-iconfont awsui-margin-right-5\" style=\"color:#3383da;\">".concat(arr[i].iconFontCode, "</i>").concat(arr[i].text + (def.showBOFieldName ? '(' + arr[i].fieldName + ')' : ''), "<span class=\"awsui-select-right\"><i class=\"awsui-iconfont awsui-margin-left-5\" style=\"color:#a8caef;\">&#xe88c;</i></span>") // label: `<i class="awsui-iconfont awsui-margin-right-5" style="color:#3383da;">${arr[i].iconFontCode}</i>${arr[i].text}<span class="awsui-select-right"><i class="mdTypeIcon awsui-margin-left-5">文本</i></span>`

                        };

                        _this.options.push(obj);
                      } else if (arr[i].columnType == "NUMBER") {
                        _obj = {
                          value: arr[i].id,
                          type: "number",
                          label: "<i class=\"awsui-iconfont awsui-margin-right-5\" style=\"color:#3383da;\">".concat(arr[i].iconFontCode, "</i>").concat(arr[i].text + (def.showBOFieldName ? '(' + arr[i].fieldName + ')' : ''), "<span class=\"awsui-select-right\"><i class=\"awsui-iconfont awsui-margin-left-5\" style=\"color:#a8caef;\">&#xe88e;</i></span>")
                        };

                        _this.options.push(_obj);
                      } else if (arr[i].columnType == "DATE") {
                        _obj2 = {
                          value: arr[i].id,
                          type: "date",
                          label: "<i class=\"awsui-iconfont awsui-margin-right-5\" style=\"color:#3383da;\">".concat(arr[i].iconFontCode, "</i>").concat(arr[i].text + (def.showBOFieldName ? '(' + arr[i].fieldName + ')' : ''), "<span class=\"awsui-select-right\"><i class=\"awsui-iconfont awsui-margin-left-5\" style=\"color:#a8caef;\">&#xe88d;</i></span>")
                        };

                        _this.options.push(_obj2);
                      }
                    }
                  }
                }

              case 4:
              case "end":
                return _context.stop();
            }
          }
        }, _callee);
      }))();
    },
    localData: function localData(val) {
      var arr = val; // console.log(arr)

      for (var i = 0; i < arr.length; i++) {
        if (arr[i].id) {
          if (arr[i].columnType == "TEXT" || arr[i].columnType == "BIGTEXT") {
            var obj = {
              value: arr[i].id,
              type: "text",
              label: "<i class=\"awsui-iconfont awsui-margin-right-5\" style=\"color:#3383da;\">".concat(arr[i].iconFontCode, "</i>").concat(arr[i].text, "<span class=\"awsui-select-right\"><i class=\"awsui-iconfont awsui-margin-left-5\" style=\"color:#a8caef;\">&#xe88c;</i></span>")
            };
            this.options.push(obj);
          } else if (arr[i].columnType == "NUMBER") {
            var _obj3 = {
              value: arr[i].id,
              type: "number",
              label: "<i class=\"awsui-iconfont awsui-margin-right-5\" style=\"color:#3383da;\">".concat(arr[i].iconFontCode, "</i>").concat(arr[i].text, "<span class=\"awsui-select-right\"><i class=\"awsui-iconfont awsui-margin-left-5\" style=\"color:#a8caef;\">&#xe88e;</i></span>")
            };
            this.options.push(_obj3);
          } else if (arr[i].columnType == "DATE") {
            var _obj4 = {
              value: arr[i].id,
              type: "date",
              label: "<i class=\"awsui-iconfont awsui-margin-right-5\" style=\"color:#3383da;\">".concat(arr[i].iconFontCode, "</i>").concat(arr[i].text, "<span class=\"awsui-select-right\"><i class=\"awsui-iconfont awsui-margin-left-5\" style=\"color:#a8caef;\">&#xe88d;</i></span>")
            };
            this.options.push(_obj4);
          }
        }
      }
    }
  }
});
// CONCATENATED MODULE: ./packages/bo-metadata-select/src/bo-metadata-select.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_bo_metadata_selectvue_type_script_lang_js_ = (bo_metadata_selectvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/bo-metadata-select/src/bo-metadata-select.vue?vue&type=style&index=0&lang=css&
var bo_metadata_selectvue_type_style_index_0_lang_css_ = __webpack_require__("820c");

// CONCATENATED MODULE: ./packages/bo-metadata-select/src/bo-metadata-select.vue






/* normalize component */

var bo_metadata_select_component = Object(componentNormalizer["a" /* default */])(
  src_bo_metadata_selectvue_type_script_lang_js_,
  bo_metadata_selectvue_type_template_id_1912764a_render,
  bo_metadata_selectvue_type_template_id_1912764a_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var bo_metadata_select = (bo_metadata_select_component.exports);
// CONCATENATED MODULE: ./packages/bo-metadata-select/index.js

// 导入组件
 // 为组件提供 install 安装方法，供按需引入

bo_metadata_select.install = function (Vue) {
  Vue.component(bo_metadata_select.name, bo_metadata_select);
}; // 默认导出组件


/* harmony default export */ var packages_bo_metadata_select = (bo_metadata_select);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader/src/cascader.vue?vue&type=template&id=e43fb6fe&
var cascadervue_type_template_id_e43fb6fe_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.panel)?_c('el-cascader-panel',{attrs:{"options":_vm.options,"props":{
                    expandTrigger: _vm.event==='click'?'click':'hover',
                    multiple: _vm.multiple,
                    checkStrictly:_vm.checkStrictly,
                    lazy: _vm.lazy,
                    lazyLoad:_vm.lazyLoad
               }},on:{"change":_vm.handleChange},model:{value:(_vm.currentValue),callback:function ($$v) {_vm.currentValue=$$v},expression:"currentValue"}}):_c('el-cascader',{staticClass:"awsui-cascader",class:[
                    _vm.cascaderSize ? 'awsui-cascader--' + _vm.cascaderSize : '',
                    _vm.multiple?'awsui-cascader--multiple':''
                ],attrs:{"placeholder":_vm.placeholder,"options":_vm.options,"props":{
                    expandTrigger: _vm.event==='click'?'click':'hover',
                    multiple: _vm.multiple,
                    checkStrictly:_vm.checkStrictly,
                    lazy: _vm.lazy,
                    lazyLoad:_vm.lazyLoad
                },"clearable":_vm.clearable,"disabled":_vm.isDisabled,"show-all-levels":_vm.showAllLevels?true:false,"collapse-tags":_vm.collapseTags,"filterable":_vm.filterable,"filterMethod":_vm.filterMethod},on:{"change":_vm.handleChange},model:{value:(_vm.currentValue),callback:function ($$v) {_vm.currentValue=$$v},expression:"currentValue"}})],1)}
var cascadervue_type_template_id_e43fb6fe_staticRenderFns = []


// CONCATENATED MODULE: ./packages/cascader/src/cascader.vue?vue&type=template&id=e43fb6fe&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader/src/cascader.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

/* harmony default export */ var cascadervue_type_script_lang_js_ = ({
  name: 'AwsuiCascader',
  components: {
    "el-cascader": element_ui_common["Cascader"],
    "el-cascader-panel": element_ui_common["CascaderPanel"]
  },
  inject: {
    awsuiForm: {
      default: ''
    }
  },
  props: {
    value: {},
    options: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    placeholder: String,
    event: String,
    size: String,
    disabled: {
      type: Boolean,
      default: false
    },
    clearable: {
      type: Boolean,
      default: false
    },
    showAllLevels: {
      type: Boolean,
      default: true
    },
    multiple: {
      type: Boolean,
      default: false
    },
    collapseTags: {
      type: Boolean,
      default: false
    },
    checkStrictly: {
      type: Boolean,
      default: false
    },
    lazy: {
      type: Boolean,
      default: false
    },
    lazyLoad: Function,
    filterable: {
      type: Boolean,
      default: false
    },
    panel: {
      type: Boolean,
      default: false
    },
    filterMethod: Function
  },
  data: function data() {
    return {
      currentValue: this.value
    };
  },
  computed: {
    cascaderSize: function cascaderSize() {
      return this.size;
    },
    isDisabled: function isDisabled() {
      return this.disabled || (this.awsuiForm || {}).disabled;
    }
  },
  mounted: function mounted() {},
  watch: {
    value: function value(val) {
      this.currentValue = val;
    }
  },
  methods: {
    handleChange: function handleChange(value) {
      this.$emit('change', value);
      this.$emit('input', value);
    }
  }
});
// CONCATENATED MODULE: ./packages/cascader/src/cascader.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_cascadervue_type_script_lang_js_ = (cascadervue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/cascader/src/cascader.vue?vue&type=style&index=0&lang=css&
var cascadervue_type_style_index_0_lang_css_ = __webpack_require__("e470");

// CONCATENATED MODULE: ./packages/cascader/src/cascader.vue






/* normalize component */

var cascader_component = Object(componentNormalizer["a" /* default */])(
  src_cascadervue_type_script_lang_js_,
  cascadervue_type_template_id_e43fb6fe_render,
  cascadervue_type_template_id_e43fb6fe_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var cascader = (cascader_component.exports);
// CONCATENATED MODULE: ./packages/cascader/index.js


/* istanbul ignore next */

cascader.install = function (Vue) {
  Vue.component(cascader.name, cascader);
};

/* harmony default export */ var packages_cascader = (cascader);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/switch/src/switch.vue?vue&type=template&id=257fa082&
var switchvue_type_template_id_257fa082_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"awsui-component"},[(_vm.extend)?_c('el-tooltip',{attrs:{"content":'Switch value: ' + _vm.value,"placement":"top"}},[_c('el-switch',_vm._b({staticClass:"awsui-switch",class:[
                        _vm.switchSize ? 'awsui-switch-' + _vm.switchSize : '',
                        _vm.className?_vm.className:'',
                        {
                            'inner':_vm.inner,
                            'left':_vm.left,
                            'right':_vm.right,
                            'switchery':_vm.switchery
                        }
                   ],attrs:{"width":Number(_vm.width),"active-color":_vm.activeColor,"inactive-color":_vm.inactiveColor,"active-text":_vm.right||_vm.inner?(_vm.inner?(_vm.value?' ':_vm.inactiveText):(_vm.value?_vm.activeText:_vm.inactiveText)):'',"inactive-text":_vm.left||_vm.inner?(_vm.inner?(_vm.value?_vm.activeText:' '):(_vm.value?_vm.activeText:_vm.inactiveText)):'',"disabled":_vm.switchDisabled,"active-value":_vm.activeValue,"inactive-value":_vm.inactiveValue},on:{"change":_vm.change},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:"value"}},'el-switch',_vm.$attrs,false))],1):_c('el-switch',_vm._b({staticClass:"awsui-switch",class:[
                    _vm.switchSize ? 'awsui-switch-' + _vm.switchSize : '',
                    _vm.className?'awsui-switch-custom '+_vm.className:'',
                    {
                        'inner':_vm.inner,
                        'left':_vm.left,
                        'right':_vm.right,
                        'switchery':_vm.switchery
                    }
               ],attrs:{"width":Number(_vm.width),"active-color":_vm.activeColor,"inactive-color":_vm.inactiveColor,"active-text":_vm.right||_vm.inner?(_vm.inner?(_vm.value?' ':_vm.inactiveText):(_vm.value?_vm.activeText:_vm.inactiveText)):'',"inactive-text":_vm.left||_vm.inner?(_vm.inner?(_vm.value?_vm.activeText:' '):(_vm.value?_vm.activeText:_vm.inactiveText)):'',"disabled":_vm.switchDisabled},on:{"change":_vm.change},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:"value"}},'el-switch',_vm.$attrs,false))],1)}
var switchvue_type_template_id_257fa082_staticRenderFns = []


// CONCATENATED MODULE: ./packages/switch/src/switch.vue?vue&type=template&id=257fa082&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/switch/src/switch.vue?vue&type=script&lang=js&

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

/* harmony default export */ var switchvue_type_script_lang_js_ = ({
  name: 'AwsuiSwitch',
  // 注意这里的name命名，就是你以后封装好后使用的组件名
  components: {
    "el-tooltip": element_ui_common["Tooltip"],
    "el-switch": element_ui_common["Switch"]
  },
  inject: {
    awsuiForm: {
      default: ''
    }
  },
  props: {
    width: {
      type: [String, Number],
      default: 40
    },
    left: {
      type: Boolean,
      default: false
    },
    right: {
      type: Boolean,
      default: false
    },
    inner: {
      type: Boolean,
      default: false
    },
    switchery: {
      type: Boolean,
      default: false
    },
    activeColor: {
      type: String,
      default: '#409EFF'
    },
    inactiveColor: {
      type: String,
      default: '#C0CCDA'
    },
    activeText: {
      type: String,
      default: ''
    },
    inactiveText: {
      type: String,
      default: ''
    },
    activeValue: {
      type: [String, Number, Boolean],
      default: true
    },
    inactiveValue: {
      type: [String, Number, Boolean],
      default: false
    },
    disabled: {
      type: Boolean,
      default: false
    },
    extend: {
      type: Boolean,
      default: false
    },
    className: {
      type: String,
      default: ""
    },
    size: {
      type: String,
      default: ''
    }
  },
  data: function data() {
    return {};
  },
  computed: {
    value: {
      get: function get() {
        return this.$attrs.value || false;
      },
      set: function set() {}
    },
    switchDisabled: function switchDisabled() {
      return this.disabled || (this.awsuiForm || {}).disabled;
    },
    switchSize: function switchSize() {
      return this.size;
    }
  },
  created: function created() {},
  mounted: function mounted() {
    //主要是默认查询（执行）方法
    this.$nextTick(function () {});
  },
  methods: {
    change: function change(val) {
      this.$emit('input', val);
      this.$emit('change', val);
    }
  }
});
// CONCATENATED MODULE: ./packages/switch/src/switch.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_switchvue_type_script_lang_js_ = (switchvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/switch/src/switch.vue?vue&type=style&index=0&lang=css&
var switchvue_type_style_index_0_lang_css_ = __webpack_require__("72cd");

// CONCATENATED MODULE: ./packages/switch/src/switch.vue






/* normalize component */

var switch_component = Object(componentNormalizer["a" /* default */])(
  src_switchvue_type_script_lang_js_,
  switchvue_type_template_id_257fa082_render,
  switchvue_type_template_id_257fa082_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var src_switch = (switch_component.exports);
// CONCATENATED MODULE: ./packages/switch/index.js


/* istanbul ignore next */

src_switch.install = function (Vue) {
  Vue.component(src_switch.name, src_switch);
};

/* harmony default export */ var packages_switch = (src_switch);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/slider/src/slider.vue?vue&type=template&id=cf074398&
var slidervue_type_template_id_cf074398_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"awsui-box-component",class:{'awsui-slider':_vm.text}},[_c('el-slider',{class:_vm.sliderClass,attrs:{"show-tooltip":_vm.showTooltip,"format-tooltip":_vm.formatTooltip,"disabled":_vm.sliderDisabled,"step":_vm.stepVal,"show-stops":_vm.showStops,"show-input":_vm.showInput,"range":_vm.range,"max":_vm.max,"min":_vm.min,"vertical":_vm.vertical,"height":_vm.height,"marks":_vm.marks},on:{"change":_vm.sendValue},model:{value:(_vm.sValue),callback:function ($$v) {_vm.sValue=$$v},expression:"sValue"}}),(_vm.text)?_c('span',{staticClass:"text"},[_vm._v(_vm._s(_vm.format?_vm.formatTooltip(_vm.sValue):_vm.sValue)+_vm._s(_vm.unit))]):_vm._e()],1)}
var slidervue_type_template_id_cf074398_staticRenderFns = []


// CONCATENATED MODULE: ./packages/slider/src/slider.vue?vue&type=template&id=cf074398&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/slider/src/slider.vue?vue&type=script&lang=js&

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

/* harmony default export */ var slidervue_type_script_lang_js_ = ({
  name: 'AwsuiSlider',
  // 注意这里的name命名，就是你以后封装好后使用的组件名
  components: {
    "el-slider": element_ui_common["Slider"]
  },
  inject: {
    awsuiForm: {
      default: ''
    }
  },
  props: {
    text: {
      type: Boolean,
      default: false
    },
    unit: {
      type: String,
      default: ''
    },
    value: {
      type: [String, Number, Array]
    },
    showTooltip: {
      type: Boolean,
      default: true
    },
    format: {
      type: Boolean,
      default: false
    },
    disabled: {
      type: Boolean,
      default: false
    },
    sliderClass: {
      type: String,
      default: ''
    },
    step: {
      type: [String, Number],
      default: 1
    },
    showStops: {
      type: Boolean,
      default: false
    },
    showInput: {
      type: Boolean,
      default: false
    },
    range: {
      type: Boolean,
      default: false
    },
    max: {
      type: Number,
      default: 100
    },
    min: {
      type: Number,
      default: 0
    },
    vertical: {
      type: Boolean,
      default: false
    },
    height: {
      type: [String, Number],
      default: ''
    },
    marks: {
      type: Object,
      default: function _default() {
        return {};
      }
    }
  },
  data: function data() {
    return {
      sValue: 0,
      stepVal: 0
    };
  },
  computed: {
    changeStep: function changeStep() {
      return parseFloat(this.stepValue); //子组件所发送过来的数据
    },
    changeMax: function changeMax() {
      return parseFloat(this.maxValue); //子组件所发送过来的数据
    },
    changeHeight: function changeHeight() {
      return this.height; //子组件所发送过来的数据
    },
    changeMarks: function changeMarks() {
      return this.marks; //子组件所发送过来的数据
    },
    sliderDisabled: function sliderDisabled() {
      return this.disabled || (this.awsuiForm || {}).disabled;
    }
  },
  mounted: function mounted() {
    //主要是默认查询（执行）方法
    this.$nextTick(function () {
      if (typeof this.value == 'string' || typeof this.value == 'number') {
        this.sValue = parseFloat(this.value);
      } else {
        this.sValue = this.value;
      }

      this.stepVal = parseInt(this.step);
    });
  },
  methods: {
    formatTooltip: function formatTooltip(val) {
      if (this.format) {
        return val / 100;
      }
    },
    sendValue: function sendValue() {
      //两个参数 参数1：key（自定义，父级里当成自定义事件实现）   参数2：传递到父级的数据
      this.$emit("input", this.sValue);
      this.$emit("change", this.sValue);
    }
  }
});
// CONCATENATED MODULE: ./packages/slider/src/slider.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_slidervue_type_script_lang_js_ = (slidervue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/slider/src/slider.vue?vue&type=style&index=0&lang=css&
var slidervue_type_style_index_0_lang_css_ = __webpack_require__("45fb");

// CONCATENATED MODULE: ./packages/slider/src/slider.vue






/* normalize component */

var slider_component = Object(componentNormalizer["a" /* default */])(
  src_slidervue_type_script_lang_js_,
  slidervue_type_template_id_cf074398_render,
  slidervue_type_template_id_cf074398_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var slider = (slider_component.exports);
// CONCATENATED MODULE: ./packages/slider/index.js


/* istanbul ignore next */

slider.install = function (Vue) {
  Vue.component(slider.name, slider);
};

/* harmony default export */ var packages_slider = (slider);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/time-picker/src/time-picker.vue?vue&type=template&id=1fa188e4&
var time_pickervue_type_template_id_1fa188e4_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.fixed)?_c('el-time-select',{attrs:{"picker-options":{
                start: '08:30',
                step: '00:15',
                end: '18:30'
            },"placeholder":"选择时间"},model:{value:(_vm.sValue),callback:function ($$v) {_vm.sValue=$$v},expression:"sValue"}}):_vm._e(),_c('el-time-picker',{attrs:{"picker-options":{
                selectableRange: '18:30:00 - 20:30:00'
            },"placeholder":"任意时间点"},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:"value"}})],1)}
var time_pickervue_type_template_id_1fa188e4_staticRenderFns = []


// CONCATENATED MODULE: ./packages/time-picker/src/time-picker.vue?vue&type=template&id=1fa188e4&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/time-picker/src/time-picker.vue?vue&type=script&lang=js&

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


/* harmony default export */ var time_pickervue_type_script_lang_js_ = ({
  name: 'AwsuiTimePicker',
  // 注意这里的name命名，就是你以后封装好后使用的组件名
  components: {
    "el-time-select": element_ui_common["TimeSelect"],
    "el-time-picker": element_ui_common["TimePicker"]
  },
  props: {
    value: {
      type: [String, Date]
    },
    fixed: {
      type: Boolean,
      default: false
    },
    format: {
      type: Boolean,
      default: false
    },
    disabled: {
      type: Boolean,
      default: false
    },
    sliderClass: {
      type: String,
      default: ''
    },
    step: {
      type: [String, Number],
      default: 1
    },
    showStops: {
      type: Boolean,
      default: false
    },
    showInput: {
      type: Boolean,
      default: false
    },
    range: {
      type: Boolean,
      default: false
    },
    max: {
      type: Number,
      default: 100
    },
    min: {
      type: Number,
      default: 0
    },
    vertical: {
      type: Boolean,
      default: false
    },
    height: {
      type: [String, Number],
      default: ''
    },
    marks: {
      type: Object,
      default: function _default() {
        return {};
      }
    }
  },
  data: function data() {
    return {
      sValue: ''
    };
  },
  computed: {},
  mounted: function mounted() {
    //主要是默认查询（执行）方法
    this.$nextTick(function () {
      this.sValue = this.value;
    });
  },
  methods: {
    sendValue: function sendValue() {
      //两个参数 参数1：key（自定义，父级里当成自定义事件实现）   参数2：传递到父级的数据
      this.$emit("change", this.sValue);
    }
  }
});
// CONCATENATED MODULE: ./packages/time-picker/src/time-picker.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_time_pickervue_type_script_lang_js_ = (time_pickervue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/time-picker/src/time-picker.vue?vue&type=style&index=0&lang=css&
var time_pickervue_type_style_index_0_lang_css_ = __webpack_require__("9fcc");

// CONCATENATED MODULE: ./packages/time-picker/src/time-picker.vue






/* normalize component */

var time_picker_component = Object(componentNormalizer["a" /* default */])(
  src_time_pickervue_type_script_lang_js_,
  time_pickervue_type_template_id_1fa188e4_render,
  time_pickervue_type_template_id_1fa188e4_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var time_picker = (time_picker_component.exports);
// CONCATENATED MODULE: ./packages/time-picker/index.js

// 导入组件
 // 为组件提供 install 安装方法，供按需引入

time_picker.install = function (Vue) {
  Vue.component(time_picker.name, time_picker);
}; // 默认导出组件


/* harmony default export */ var packages_time_picker = (time_picker);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/color-picker.vue?vue&type=template&id=d6ca73fa&scoped=true&lang=html&
var color_pickervue_type_template_id_d6ca73fa_scoped_true_lang_html_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-popover',{attrs:{"popper-class":"awsui-colorPicker","placement":_vm.placement,"trigger":"click","append-to-body":_vm.appendToBody},model:{value:(_vm.openStatus),callback:function ($$v) {_vm.openStatus=$$v},expression:"openStatus"}},[_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.html5Color),expression:"html5Color"}],ref:"html5Color",attrs:{"type":"color"},domProps:{"value":(_vm.html5Color)},on:{"change":function($event){return _vm.updataValue(_vm.html5Color)},"input":function($event){if($event.target.composing){ return; }_vm.html5Color=$event.target.value}}}),_c('div',{staticClass:"awsui-colorPicker-box"},[_c('div',{staticClass:"hd"},[_c('div',{staticClass:"colorView"},[_c('span',{staticClass:"background",style:(("background-color: " + _vm.showPanelColor))}),_c('awsui-input',{attrs:{"readonly":"","className":"awsui-color-input","placeholder":""},model:{value:(_vm.showPanelColor),callback:function ($$v) {_vm.showPanelColor=$$v},expression:"showPanelColor"}})],1),_c('div',{staticClass:"defaultColor",on:{"click":_vm.handleDefaultColor,"mouseover":function($event){_vm.hoveColor = _vm.value},"mouseout":function($event){_vm.hoveColor = null}}},[_vm._v("清空 ")])]),_c('div',{staticClass:"bd"},[_c('h3',[_vm._v("主题颜色")]),_c('ul',{staticClass:"tColor"},_vm._l((_vm.tColor),function(color,index){return _c('li',{key:index,staticClass:"tColor_li",style:({ backgroundColor: color }),on:{"mouseover":function($event){_vm.hoveColor = color},"mouseout":function($event){_vm.hoveColor = null},"click":function($event){return _vm.updataValue(color)}}})}),0),_c('ul',{staticClass:"bColor"},_vm._l((_vm.colorPanel),function(item,index){return _c('li',{key:index,staticClass:"bColor_li"},[_c('ul',_vm._l((item),function(color,cindex){return _c('li',{key:cindex,staticClass:"bColor_li_li",style:({ backgroundColor: color }),on:{"mouseover":function($event){_vm.hoveColor = color},"mouseout":function($event){_vm.hoveColor = null},"click":function($event){return _vm.updataValue(color)}}})}),0)])}),0),_c('h3',[_vm._v("标准颜色")]),_c('ul',{staticClass:"tColor"},_vm._l((_vm.bColor),function(color,index){return _c('li',{key:index,staticClass:"tColor_li",style:({ backgroundColor: color }),on:{"mouseover":function($event){_vm.hoveColor = color},"mouseout":function($event){_vm.hoveColor = null},"click":function($event){return _vm.updataValue(color)}}})}),0),(_vm.more)?_c('h3',{staticStyle:{"cursor":"pointer"},on:{"click":_vm.triggerHtml5Color}},[_vm._v("更多颜色...")]):_vm._e()])]),_c('div',{staticClass:"colorBtn",class:[
             {
                 disabled: _vm.disabled,
             },
            _vm.colorSize ? 'awsui-colorPicker--' + _vm.colorSize : '',
            _vm.className ? _vm.className:''
         ],style:(("background-color: " + _vm.showColor)),attrs:{"slot":"reference"},slot:"reference"},[_vm._t("default")],2)])}
var color_pickervue_type_template_id_d6ca73fa_scoped_true_lang_html_staticRenderFns = []


// CONCATENATED MODULE: ./packages/color-picker/src/color-picker.vue?vue&type=template&id=d6ca73fa&scoped=true&lang=html&

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.js
var es_symbol = __webpack_require__("a4d3");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.description.js
var es_symbol_description = __webpack_require__("e01a");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.iterator.js
var es_symbol_iterator = __webpack_require__("d28b");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
var es_array_iterator = __webpack_require__("e260");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.iterator.js
var es_string_iterator = __webpack_require__("3ca3");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.iterator.js
var web_dom_collections_iterator = __webpack_require__("ddb0");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
var unsupportedIterableToArray = __webpack_require__("06c5");

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








function _createForOfIteratorHelper(o) {
  if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
    if (Array.isArray(o) || (o = Object(unsupportedIterableToArray["a" /* default */])(o))) {
      var i = 0;

      var F = function F() {};

      return {
        s: F,
        n: function n() {
          if (i >= o.length) return {
            done: true
          };
          return {
            done: false,
            value: o[i++]
          };
        },
        e: function e(_e) {
          throw _e;
        },
        f: F
      };
    }

    throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  }

  var it,
      normalCompletion = true,
      didErr = false,
      err;
  return {
    s: function s() {
      it = o[Symbol.iterator]();
    },
    n: function n() {
      var step = it.next();
      normalCompletion = step.done;
      return step;
    },
    e: function e(_e2) {
      didErr = true;
      err = _e2;
    },
    f: function f() {
      try {
        if (!normalCompletion && it["return"] != null) it["return"]();
      } finally {
        if (didErr) throw err;
      }
    }
  };
}
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/color-picker.vue?vue&type=script&lang=js&





//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var color_pickervue_type_script_lang_js_ = ({
  name: "AwsuiColorPicker",
  props: {
    // 当前颜色值
    value: String,
    // 默认颜色
    defaultColor: {
      type: String,
      default: ""
    },
    // 追加到body
    appendToBody: {
      type: Boolean,
      default: true
    },
    // 禁用状态
    disabled: {
      type: Boolean,
      default: false
    },
    size: {
      type: String,
      default: ""
    },
    className: String,
    more: {
      type: Boolean,
      default: true
    },
    placement: {
      type: String,
      default: "bottom"
    },
    callback: null
  },
  data: function data() {
    return {
      // 面板打开状态
      openStatus: false,
      // 鼠标经过的颜色块
      hoveColor: null,
      // 主题颜色
      tColor: ["#000000", "#ffffff", "#eeece1", "#1e497b", "#4e81bb", "#e2534d", "#9aba60", "#8165a0", "#47acc5", "#f9974c"],
      // 颜色面板
      colorConfig: [["#0d0d0d", "#808080"], ["#7f7f7f", "#f0f0f0"], ["#1c1a10", "#ddd8c3"], ["#0e243d", "#c6d9f0"], ["#233f5e", "#dae5f0"], ["#632623", "#f2dbdb"], ["#4d602c", "#eaf1de"], ["#3f3150", "#e6e0ec"], ["#1e5867", "#d9eef3"], ["#99490f", "#fee9da"]],
      // 标准颜色
      bColor: ["#c21401", "#ff1e02", "#ffc12a", "#ffff3a", "#90cf5b", "#00af57", "#00afee", "#0071be", "#00215f", "#72349d"],
      html5Color: this.value
    };
  },
  computed: {
    // 显示面板颜色
    showPanelColor: function showPanelColor() {
      if (this.hoveColor) {
        return this.hoveColor;
      } else {
        return this.showColor;
      }
    },
    // 显示颜色
    showColor: function showColor() {
      if (this.value) {
        return this.value;
      } else {
        return this.defaultColor;
      }
    },
    // 颜色面板
    colorPanel: function colorPanel() {
      var colorArr = [];

      var _iterator = _createForOfIteratorHelper(this.colorConfig),
          _step;

      try {
        for (_iterator.s(); !(_step = _iterator.n()).done;) {
          var color = _step.value;
          colorArr.push(this.gradient(color[1], color[0], 5));
        }
      } catch (err) {
        _iterator.e(err);
      } finally {
        _iterator.f();
      }

      return colorArr;
    },
    colorSize: function colorSize() {
      return this.size;
    }
  },
  methods: {
    closePanel: function closePanel() {
      var _this = this;

      this.openStatus = false;
      setTimeout(function () {
        if (typeof _this.callback === 'function') {
          _this.callback();
        }
      });
    },
    close: function close() {
      this.openStatus = false;
    },
    triggerHtml5Color: function triggerHtml5Color() {
      this.$refs.html5Color.click();
    },
    // 更新组件的值 value
    updataValue: function updataValue(value) {
      this.$emit("input", value);
      this.$emit("change", value);
      this.closePanel();
    },
    // 设置默认颜色
    handleDefaultColor: function handleDefaultColor() {
      this.updataValue(this.defaultColor);
    },
    // 格式化 hex 颜色值
    parseColor: function parseColor(hexStr) {
      if (hexStr.length === 4) {
        hexStr = "#" + hexStr[1] + hexStr[1] + hexStr[2] + hexStr[2] + hexStr[3] + hexStr[3];
      } else {
        return hexStr;
      }
    },
    // RGB 颜色 转 HEX 颜色
    rgbToHex: function rgbToHex(r, g, b) {
      var hex = (r << 16 | g << 8 | b).toString(16);
      return "#" + new Array(Math.abs(hex.length - 7)).join("0") + hex;
    },
    // HEX 转 RGB 颜色
    hexToRgb: function hexToRgb(hex) {
      hex = this.parseColor(hex);
      var rgb = [];

      for (var i = 1; i < 7; i += 2) {
        rgb.push(parseInt("0x" + hex.slice(i, i + 2)));
      }

      return rgb;
    },
    // 计算渐变过渡颜色
    gradient: function gradient(startColor, endColor, step) {
      // 讲 hex 转换为 rgb
      var sColor = this.hexToRgb(startColor);
      var eColor = this.hexToRgb(endColor); // 计算R\G\B每一步的差值

      var rStep = (eColor[0] - sColor[0]) / step;
      var gStep = (eColor[1] - sColor[1]) / step;
      var bStep = (eColor[2] - sColor[2]) / step;
      var gradientColorArr = []; // 计算每一步的hex值

      for (var i = 0; i < step; i++) {
        gradientColorArr.push(this.rgbToHex(parseInt(rStep * i + sColor[0]), parseInt(gStep * i + sColor[1]), parseInt(bStep * i + sColor[2])));
      }

      return gradientColorArr;
    }
  },
  watch: {
    /*close() {
        this.openStatus = false;
    }*/
  },
  mounted: function mounted() {
    var _this2 = this;

    // 点击页面上其他地方，关闭弹窗
    document.addEventListener('click', function (e) {
      if (!_this2.$el.contains(e.target)) {
        _this2.closePanel(); //this.openStatus=false //这句话的意思是点击其他区域关闭

      }
    });
  }
});
// CONCATENATED MODULE: ./packages/color-picker/src/color-picker.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_color_pickervue_type_script_lang_js_ = (color_pickervue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/color-picker/src/color-picker.vue?vue&type=style&index=0&id=d6ca73fa&scoped=true&lang=css&
var color_pickervue_type_style_index_0_id_d6ca73fa_scoped_true_lang_css_ = __webpack_require__("c7a6");

// EXTERNAL MODULE: ./packages/color-picker/src/color-picker.vue?vue&type=style&index=1&lang=css&
var color_pickervue_type_style_index_1_lang_css_ = __webpack_require__("22c0");

// CONCATENATED MODULE: ./packages/color-picker/src/color-picker.vue







/* normalize component */

var color_picker_component = Object(componentNormalizer["a" /* default */])(
  src_color_pickervue_type_script_lang_js_,
  color_pickervue_type_template_id_d6ca73fa_scoped_true_lang_html_render,
  color_pickervue_type_template_id_d6ca73fa_scoped_true_lang_html_staticRenderFns,
  false,
  null,
  "d6ca73fa",
  null
  
)

/* harmony default export */ var color_picker = (color_picker_component.exports);
// CONCATENATED MODULE: ./packages/color-picker/index.js

// 导入组件
 // 为组件提供 install 安装方法，供按需引入

color_picker.install = function (Vue) {
  Vue.component(color_picker.name, color_picker);
}; // 默认导出组件


/* harmony default export */ var packages_color_picker = (color_picker);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/icon-picker/src/icon-picker.vue?vue&type=template&id=d232a082&scoped=true&
var icon_pickervue_type_template_id_d232a082_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"awsui-icon-picker",style:({width: _vm.defaultOptions.fatherWidth ? _vm.defaultOptions.fatherWidth : (_vm.defaultOptions.type === 'background' ? '80px' : '30px')})},[_c('el-popover',{attrs:{"popper-class":"icon_picker_popover","placement":"bottom-start","trigger":"click"}},[(_vm.defaultOptions.type === 'background')?_c('div',{staticClass:"picker-box"},[_c('p',{staticClass:"picker-title"},[_vm._v("设计图标")]),_c('div',{staticClass:"color-region"},_vm._l((_vm.colorList),function(item,index){return _c('span',{key:index,staticClass:"color-item",style:({backgroundColor: item}),on:{"click":function($event){return _vm.colorActivefun(item)}}},[_c('i',{directives:[{name:"show",rawName:"v-show",value:(item === _vm.colorActive || item === _vm.colorValue),expression:"item === colorActive || item === colorValue"}],staticClass:"awsui-iconfont sign-c"},[_vm._v("")])])}),0),_c('div',{staticClass:"icon-region"},_vm._l((_vm.defaultOptions.iconfontArray),function(item,index){return _c('span',{key:index,staticClass:"icon-item",style:({backgroundColor: index == _vm.hoverBackIndex || item[1] === _vm.iconValue ? _vm.colorValue : '#fff'}),on:{"mouseover":function($event){return _vm.mouseoverBack(index)},"click":function($event){return _vm.iconActivefun(item[1])},"mouseleave":_vm.mouseleaveBack}},[_c('i',{staticClass:"awsui-iconfont sign-i",style:({color: index == _vm.hoverBackIndex || item[1] === _vm.iconValue ? (_vm.colorValue === '#e6e8ea' ? '#202124' : '#fff') : (_vm.colorValue === '#e6e8ea' ? '#202124' : '#666')}),domProps:{"innerHTML":_vm._s(item[1])}})])}),0)]):(_vm.defaultOptions.type === 'icon')?_c('div',{staticClass:"picker-box"},[_c('p',{staticClass:"picker-title"},[_vm._v("设计图标")]),_c('div',{staticClass:"color-region"},_vm._l((_vm.colorList),function(item,index){return _c('span',{key:index,staticClass:"color-item",style:({backgroundColor: item}),on:{"click":function($event){return _vm.colorActivefun(item)}}},[_c('i',{directives:[{name:"show",rawName:"v-show",value:(item === _vm.colorActive || item === _vm.colorValue),expression:"item === colorActive || item === colorValue"}],staticClass:"awsui-iconfont sign-c"},[_vm._v("")])])}),0),_c('div',{staticClass:"icon-region"},_vm._l((_vm.defaultOptions.iconfontArray),function(item,index){return _c('span',{key:index,staticClass:"icon-item",style:({backgroundColor: index == _vm.hoverBackIndex || item[1] === _vm.iconValue ? (_vm.colorValue === '#e6e8ea' ? '#666666' : '#f8f8f8') : (_vm.colorValue === '#e6e8ea' ? '#95a3b3' : '#fff'), border: index == _vm.hoverBackIndex || item[1] === _vm.iconValue ? (_vm.colorValue === '#e6e8ea' ? '1px solid #666666' : '1px solid #e9e9e9') : 'none'}),on:{"mouseover":function($event){return _vm.mouseoverBack(index)},"click":function($event){return _vm.iconActivefun(item[1])},"mouseleave":_vm.mouseleaveBack}},[_c('i',{staticClass:"awsui-iconfont sign-i",style:({color: _vm.colorValue}),domProps:{"innerHTML":_vm._s(item[1])}})])}),0)]):_vm._e(),(_vm.defaultOptions.type === 'background')?_c('div',{staticClass:"awsui-icon-picker-box1",style:({backgroundColor: _vm.colorValue, width: _vm.defaultOptions.fatherWidth ? _vm.defaultOptions.fatherWidth + 'px' : '80px', height: _vm.defaultOptions.fatherWidth ? _vm.defaultOptions.fatherWidth + 'px' : '80px'}),attrs:{"slot":"reference"},slot:"reference"},[_c('i',{staticClass:"awsui-iconfont",style:({color: _vm.colorValue === '#e6e8ea' ? '#202124' : '#fff', fontSize: _vm.defaultOptions.iconFontSize ? _vm.defaultOptions.iconFontSize + 'px' : '30px'}),domProps:{"innerHTML":_vm._s(_vm.iconValue)}})]):(_vm.defaultOptions.type === 'icon')?_c('div',{staticClass:"awsui-icon-picker-box2",style:({backgroundColor: _vm.colorValue === '#e6e8ea' ? '#666666' : '#f8f8f8', width: _vm.defaultOptions.fatherWidth ? _vm.defaultOptions.fatherWidth + 'px' : '30px', height: _vm.defaultOptions.fatherWidth ? _vm.defaultOptions.fatherWidth + 'px' : '30px'}),attrs:{"slot":"reference"},slot:"reference"},[_c('i',{staticClass:"awsui-iconfont",style:({fontSize: _vm.defaultOptions.iconFontSize ? _vm.defaultOptions.iconFontSize + 'px' : '16px',color: _vm.colorValue}),domProps:{"innerHTML":_vm._s(_vm.iconValue)}})]):_vm._e()])],1)}
var icon_pickervue_type_template_id_d232a082_scoped_true_staticRenderFns = []


// CONCATENATED MODULE: ./packages/icon-picker/src/icon-picker.vue?vue&type=template&id=d232a082&scoped=true&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/icon-picker/src/icon-picker.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var icon_pickervue_type_script_lang_js_ = ({
  name: "AwsuiIconPicker",
  props: {
    defaultOptions: {
      type: Object,
      default: function _default() {
        return {
          type: "background",
          // width: 305,
          // fatherWidth: 80,
          // iconFontSize: 30,
          // color: "",
          // icon: "",
          iconfontArray: []
        };
      }
    },
    colorList: {
      type: Array,
      default: function _default() {
        return ["#dc4f39", "#ff9421", "#009b52", "#3383da", "#009688", "#6600d5", "#0b0e7b", "#666666", "#e6e8ea"];
      }
    },
    value: {
      type: Object,
      default: function _default() {
        return {
          icon: "&#xe68c;",
          color: "#dc4f39"
        };
      }
    }
  },
  computed: {},
  data: function data() {
    return {
      colorActive: null,
      hoverBackIndex: null,
      iconValue: this.defaultOptions.icon ? this.defaultOptions.icon : this.defaultOptions.iconfontArray[0][1],
      colorValue: this.defaultOptions.color ? this.defaultOptions.color : this.colorList[0]
    };
  },
  watch: {
    value: {
      handler: function handler(val) {
        this.iconValue = val.icon;
        this.colorValue = val.color;
      },
      immediate: true
    },
    iconValue: function iconValue() {
      this.$emit("change", {
        icon: this.iconValue,
        color: this.colorValue
      });
      this.$emit("input", {
        icon: this.iconValue,
        color: this.colorValue
      });
    },
    colorValue: function colorValue() {
      this.$emit("change", {
        icon: this.iconValue,
        color: this.colorValue
      });
      this.$emit("input", {
        icon: this.iconValue,
        color: this.colorValue
      });
    }
  },
  methods: {
    colorActivefun: function colorActivefun(color) {
      this.colorActive = color;
      this.colorValue = color;
    },
    iconActivefun: function iconActivefun(icon) {
      this.iconValue = icon;
    },
    mouseoverBack: function mouseoverBack(index) {
      // console.log(index)
      this.hoverBackIndex = index;
    },
    mouseleaveBack: function mouseleaveBack() {
      this.hoverBackIndex = null;
    }
  },
  mounted: function mounted() {}
});
// CONCATENATED MODULE: ./packages/icon-picker/src/icon-picker.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_icon_pickervue_type_script_lang_js_ = (icon_pickervue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/icon-picker/src/icon-picker.vue?vue&type=style&index=0&lang=css&
var icon_pickervue_type_style_index_0_lang_css_ = __webpack_require__("8773");

// EXTERNAL MODULE: ./packages/icon-picker/src/icon-picker.vue?vue&type=style&index=1&id=d232a082&scoped=true&lang=css&
var icon_pickervue_type_style_index_1_id_d232a082_scoped_true_lang_css_ = __webpack_require__("43e3");

// CONCATENATED MODULE: ./packages/icon-picker/src/icon-picker.vue







/* normalize component */

var icon_picker_component = Object(componentNormalizer["a" /* default */])(
  src_icon_pickervue_type_script_lang_js_,
  icon_pickervue_type_template_id_d232a082_scoped_true_render,
  icon_pickervue_type_template_id_d232a082_scoped_true_staticRenderFns,
  false,
  null,
  "d232a082",
  null
  
)

/* harmony default export */ var icon_picker = (icon_picker_component.exports);
// CONCATENATED MODULE: ./packages/icon-picker/index.js

// 导入组件
 // 为组件提供 install 安装方法，供按需引入

icon_picker.install = function (Vue) {
  Vue.component(icon_picker.name, icon_picker);
}; // 默认导出组件


/* harmony default export */ var packages_icon_picker = (icon_picker);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/formula/src/formula.vue?vue&type=template&id=e1e83226&scoped=true&
var formulavue_type_template_id_e1e83226_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"awsui-formula-component"},[_c('div',{staticClass:"awsui-formula",class:{'awsui-disabled':_vm.option.disabled}},[_c('awsui-codemirror',{ref:"codemirror",class:{'awsui-codemirroe-disabled':_vm.option.disabled},attrs:{"placeholder":_vm.placeholder,"options":_vm.options},on:{"ready":_vm.onCmReady},model:{value:(_vm.currentContent),callback:function ($$v) {_vm.currentContent=$$v},expression:"currentContent"}}),_c('i',{staticClass:"awsui-iconfont",class:{'awsui-formula-btn-readonly':_vm.option.readonly||_vm.option.disabled},on:{"click":function($event){return _vm.openDialog()}}},[_vm._v("")])],1),(_vm.dialogOnce)?_c('awsui-dialog',{ref:"awsuiDialog",attrs:{"name":"AWS-Formula-Dialog","iframeOption":_vm.iframeOption,"title":"公式编辑器","width":_vm.width,"height":_vm.height,"visible":_vm.dialogVisible,"append-to-body":""},on:{"update:visible":function($event){_vm.dialogVisible=$event}}},[_c('span',{staticClass:"dialog-footer",attrs:{"slot":"footer"},slot:"footer"},[_c('awsui-button',{attrs:{"id":"confirmBtn","type":"primary"},on:{"click":function($event){return _vm.dialogConfirm()}}},[_vm._v("确定")]),_c('awsui-button',{on:{"click":_vm.dialogCancel}},[_vm._v("取消")])],1)]):_vm._e()],1)}
var formulavue_type_template_id_e1e83226_scoped_true_staticRenderFns = []


// CONCATENATED MODULE: ./packages/formula/src/formula.vue?vue&type=template&id=e1e83226&scoped=true&

// EXTERNAL MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/formula/src/formula.vue?vue&type=script&lang=js&
var formulavue_type_script_lang_js_ = __webpack_require__("74d3");

// CONCATENATED MODULE: ./packages/formula/src/formula.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_formulavue_type_script_lang_js_ = (formulavue_type_script_lang_js_["a" /* default */]); 
// EXTERNAL MODULE: ./packages/formula/src/formula.vue?vue&type=style&index=0&id=e1e83226&scoped=true&lang=css&
var formulavue_type_style_index_0_id_e1e83226_scoped_true_lang_css_ = __webpack_require__("1350");

// EXTERNAL MODULE: ./packages/formula/src/formula.vue?vue&type=style&index=1&lang=css&
var formulavue_type_style_index_1_lang_css_ = __webpack_require__("9115");

// CONCATENATED MODULE: ./packages/formula/src/formula.vue







/* normalize component */

var formula_component = Object(componentNormalizer["a" /* default */])(
  src_formulavue_type_script_lang_js_,
  formulavue_type_template_id_e1e83226_scoped_true_render,
  formulavue_type_template_id_e1e83226_scoped_true_staticRenderFns,
  false,
  null,
  "e1e83226",
  null
  
)

/* harmony default export */ var formula = (formula_component.exports);
// CONCATENATED MODULE: ./packages/formula/index.js


/* istanbul ignore next */

formula.install = function (Vue) {
  Vue.component(formula.name, formula);
};

/* harmony default export */ var packages_formula = (formula);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/upload.vue?vue&type=template&id=7dde4dbe&scoped=true&
var uploadvue_type_template_id_7dde4dbe_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('awsui-dialog',{staticClass:"awsui-upload",attrs:{"title":"修改头像","visible":_vm.value,"width":"auto","border":false,"show-close":false},on:{"update:visible":function($event){_vm.value=$event}}},[_c('button',{staticClass:"vicp-close",attrs:{"type":"button"},on:{"click":_vm.off}},[_c('i',{staticClass:"awsui-iconfont"},[_vm._v("  ")])]),_c('div',{staticClass:"vicp-wrap"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.step == 1),expression:"step == 1"}],staticClass:"vicp-step1"},[(_vm.step == 1)?_c('input',{directives:[{name:"show",rawName:"v-show",value:(false),expression:"false"}],ref:"fileinput",attrs:{"type":"file"},on:{"change":_vm.handleChange}}):_vm._e(),_c('div',{staticClass:"vicp-crop"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(true),expression:"true"}],staticClass:"vicp-crop-left"},[_c('div',{staticClass:"vicp-img-container"},[_c('div',{staticClass:"vicp-img-default",on:{"click":_vm.handleClick}},[_c('i',{staticClass:"awsui-iconfont"},[_vm._v("  ")])])]),_c('div',{staticClass:"vicp-img-info"},[_vm._v("根据您的需要裁剪和调整图片的位置")])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(true),expression:"true"}],staticClass:"vicp-crop-right"},[_c('div',{staticClass:"vicp-preview"},[_c('span',[_vm._v(_vm._s(_vm.lang.preview))]),(!_vm.noSquare)?_c('div',{staticClass:"vicp-preview-item"}):_vm._e(),(!_vm.noCircle)?_c('div',{staticClass:"vicp-preview-item vicp-preview-item-circle"}):_vm._e()])])])]),(_vm.step == 2)?_c('div',{staticClass:"vicp-step2"},[_c('div',{staticClass:"vicp-crop"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(true),expression:"true"}],staticClass:"vicp-crop-left"},[_c('div',{staticClass:"vicp-img-container"},[_c('img',{ref:"img",staticClass:"vicp-img",style:(_vm.sourceImgStyle),attrs:{"src":_vm.sourceImgUrl,"draggable":"false"},on:{"drag":_vm.preventDefault,"dragstart":_vm.preventDefault,"dragend":_vm.preventDefault,"dragleave":_vm.preventDefault,"dragover":_vm.preventDefault,"dragenter":_vm.preventDefault,"drop":_vm.preventDefault,"touchstart":_vm.imgStartMove,"touchmove":_vm.imgMove,"touchend":_vm.createImg,"touchcancel":_vm.createImg,"mousedown":_vm.imgStartMove,"mousemove":_vm.imgMove,"mouseup":_vm.createImg,"mouseout":_vm.createImg}}),_c('div',{staticClass:"vicp-img-shade vicp-img-shade-1",style:(_vm.sourceImgShadeStyle)}),_c('div',{staticClass:"vicp-img-shade vicp-img-shade-2",style:(_vm.sourceImgShadeStyle)})]),_c('div',{staticClass:"vicp-range"},[_c('input',{attrs:{"type":"range","step":"1","min":"0","max":"100"},domProps:{"value":_vm.scale.range},on:{"input":_vm.zoomChange}}),_c('i',{staticClass:"vicp-icon5",on:{"mousedown":_vm.startZoomSub,"mouseout":_vm.endZoomSub,"mouseup":_vm.endZoomSub}}),_c('i',{staticClass:"vicp-icon6",on:{"mousedown":_vm.startZoomAdd,"mouseout":_vm.endZoomAdd,"mouseup":_vm.endZoomAdd}})]),(!_vm.noRotate)?_c('div',{staticClass:"vicp-rotate"},[_c('i',{on:{"mousedown":_vm.startRotateLeft,"mouseout":_vm.endRotate,"mouseup":_vm.endRotate}},[_vm._v("↺")]),_c('i',{on:{"mousedown":_vm.startRotateRight,"mouseout":_vm.endRotate,"mouseup":_vm.endRotate}},[_vm._v("↻")])]):_vm._e()]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(true),expression:"true"}],staticClass:"vicp-crop-right"},[_c('div',{staticClass:"vicp-preview"},[_c('span',[_vm._v(_vm._s(_vm.lang.preview))]),(!_vm.noSquare)?_c('div',{staticClass:"vicp-preview-item"},[_c('img',{style:(_vm.previewStyle),attrs:{"src":_vm.createImgUrl}})]):_vm._e(),(!_vm.noCircle)?_c('div',{staticClass:"vicp-preview-item vicp-preview-item-circle"},[_c('img',{style:(_vm.previewStyle),attrs:{"src":_vm.createImgUrl}})]):_vm._e()])])])]):_vm._e(),(_vm.step == 3)?_c('div',{staticClass:"vicp-step3"},[_c('div',{staticClass:"vicp-upload"},[_c('span',{directives:[{name:"show",rawName:"v-show",value:(_vm.loading === 1),expression:"loading === 1"}],staticClass:"vicp-loading"},[_vm._v(_vm._s(_vm.lang.loading))]),_c('div',{staticClass:"vicp-progress-wrap"},[_c('span',{directives:[{name:"show",rawName:"v-show",value:(_vm.loading === 1),expression:"loading === 1"}],staticClass:"vicp-progress",style:(_vm.progressStyle)})]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.hasError),expression:"hasError"}],staticClass:"vicp-error"},[_c('i',{staticClass:"vicp-icon2"}),_vm._v(" "+_vm._s(_vm.errorMsg)+" ")]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.loading === 2),expression:"loading === 2"}],staticClass:"vicp-success"},[_c('i',{staticClass:"vicp-icon3"}),_vm._v(" "+_vm._s(_vm.lang.success)+" ")])]),_c('div',{staticClass:"vicp-operate"},[_c('a',{on:{"click":function($event){return _vm.setStep(2)},"mousedown":_vm.ripple}},[_vm._v(_vm._s(_vm.lang.btn.back))]),_c('a',{on:{"click":_vm.off,"mousedown":_vm.ripple}},[_vm._v(_vm._s(_vm.lang.btn.close))])])]):_vm._e(),_c('canvas',{directives:[{name:"show",rawName:"v-show",value:(false),expression:"false"}],ref:"canvas",attrs:{"width":_vm.width,"height":_vm.height}})]),_c('span',{staticClass:"dialog-footer",attrs:{"slot":"footer"},slot:"footer"},[_c('awsui-button',{staticClass:"awsui-left",on:{"click":_vm.handleClick}},[_vm._v("选择图片")]),_c('awsui-button',{attrs:{"type":"primary"},on:{"click":_vm.prepareUpload,"mousedown":_vm.ripple}},[_vm._v("确 定")]),_c('awsui-button',{on:{"click":_vm.off}},[_vm._v("取 消")])],1)])}
var uploadvue_type_template_id_7dde4dbe_scoped_true_staticRenderFns = []


// CONCATENATED MODULE: ./packages/upload/src/upload.vue?vue&type=template&id=7dde4dbe&scoped=true&

// CONCATENATED MODULE: ./packages/upload/utils/language.js
/* harmony default export */ var language = ({
  zh: {
    hint: '点击，或拖动图片至此处',
    loading: '正在上传……',
    noSupported: '浏览器不支持该功能，请使用IE10以上或其他现在浏览器！',
    success: '上传成功',
    fail: '图片上传失败',
    preview: '头像预览',
    btn: {
      off: '取消',
      close: '关闭',
      back: '上一步',
      save: '保存'
    },
    error: {
      onlyImg: '仅限图片格式',
      outOfSize: '单文件大小不能超过 ',
      lowestPx: '图片最低像素为（宽*高）：'
    }
  },
  en: {
    hint: 'Click or drag the file here to upload',
    loading: 'Uploading…',
    noSupported: 'Browser is not supported, please use IE10+ or other browsers',
    success: 'Upload success',
    fail: 'Upload failed',
    preview: 'Preview',
    btn: {
      off: 'Cancel',
      close: 'Close',
      back: 'Back',
      save: 'Save'
    },
    error: {
      onlyImg: 'Image only',
      outOfSize: 'Image exceeds size limit: ',
      lowestPx: 'Image\'s size is too low. Expected at least: '
    }
  },
  ro: {
    hint: 'Atinge sau trage fișierul aici',
    loading: 'Se încarcă',
    noSupported: 'Browser-ul tău nu suportă acest feature. Te rugăm încearcă cu alt browser.',
    success: 'S-a încărcat cu succes',
    fail: 'A apărut o problemă la încărcare',
    preview: 'Previzualizează',
    btn: {
      off: 'Anulează',
      close: 'Închide',
      back: 'Înapoi',
      save: 'Salvează'
    },
    error: {
      onlyImg: 'Doar imagini',
      outOfSize: 'Imaginea depășește limita de: ',
      loewstPx: 'Imaginea este prea mică; Minim: '
    }
  },
  ru: {
    hint: 'Нажмите, или перетащите файл в это окно',
    loading: 'Загружаю……',
    noSupported: 'Ваш браузер не поддерживается, пожалуйста, используйте IE10 + или другие браузеры',
    success: 'Загрузка выполнена успешно',
    fail: 'Ошибка загрузки',
    preview: 'Предпросмотр',
    btn: {
      off: 'Отменить',
      close: 'Закрыть',
      back: 'Назад',
      save: 'Сохранить'
    },
    error: {
      onlyImg: 'Только изображения',
      outOfSize: 'Изображение превышает предельный размер: ',
      lowestPx: 'Минимальный размер изображения: '
    }
  },
  'pt-br': {
    hint: 'Clique ou arraste o arquivo aqui para carregar',
    loading: 'Carregando…',
    noSupported: 'Browser não suportado, use o IE10+ ou outro browser',
    success: 'Sucesso ao carregar imagem',
    fail: 'Falha ao carregar imagem',
    preview: 'Pré-visualizar',
    btn: {
      off: 'Cancelar',
      close: 'Fechar',
      back: 'Voltar',
      save: 'Salvar'
    },
    error: {
      onlyImg: 'Apenas imagens',
      outOfSize: 'A imagem excede o limite de tamanho: ',
      lowestPx: 'O tamanho da imagem é muito pequeno. Tamanho mínimo: '
    }
  },
  fr: {
    hint: 'Cliquez ou glissez le fichier ici.',
    loading: 'Téléchargement…',
    noSupported: 'Votre navigateur n\'est pas supporté. Utilisez IE10 + ou un autre navigateur s\'il vous plaît.',
    success: 'Téléchargement réussit',
    fail: 'Téléchargement echoué',
    preview: 'Aperçu',
    btn: {
      off: 'Annuler',
      close: 'Fermer',
      back: 'Retour',
      save: 'Enregistrer'
    },
    error: {
      onlyImg: 'Image uniquement',
      outOfSize: 'L\'image sélectionnée dépasse la taille maximum: ',
      lowestPx: 'L\'image sélectionnée est trop petite. Dimensions attendues: '
    }
  },
  nl: {
    hint: 'Klik hier of sleep een afbeelding in dit vlak',
    loading: 'Uploaden…',
    noSupported: 'Je browser wordt helaas niet ondersteund. Gebruik IE10+ of een andere browser.',
    success: 'Upload succesvol',
    fail: 'Upload mislukt',
    preview: 'Voorbeeld',
    btn: {
      off: 'Annuleren',
      close: 'Sluiten',
      back: 'Terug',
      save: 'Opslaan'
    },
    error: {
      onlyImg: 'Alleen afbeeldingen',
      outOfSize: 'De afbeelding is groter dan: ',
      lowestPx: 'De afbeelding is te klein! Minimale afmetingen: '
    }
  },
  tr: {
    hint: 'Tıkla veya yüklemek istediğini buraya sürükle',
    loading: 'Yükleniyor…',
    noSupported: 'Tarayıcı desteklenmiyor, lütfen IE10+ veya farklı tarayıcı kullanın',
    success: 'Yükleme başarılı',
    fail: 'Yüklemede hata oluştu',
    preview: 'Önizle',
    btn: {
      off: 'İptal',
      close: 'Kapat',
      back: 'Geri',
      save: 'Kaydet'
    },
    error: {
      onlyImg: 'Sadece resim',
      outOfSize: 'Resim yükleme limitini aşıyor: ',
      lowestPx: 'Resmin boyutu çok küçük. En az olması gereken: '
    }
  },
  'es-MX': {
    hint: 'Selecciona o arrastra una imagen',
    loading: 'Subiendo...',
    noSupported: 'Tu navegador no es soportado, porfavor usa IE10+ u otros navegadores mas recientes',
    success: 'Subido exitosamente',
    fail: 'Sucedió un error',
    preview: 'Vista previa',
    btn: {
      off: 'Cancelar',
      close: 'Cerrar',
      back: 'Atras',
      save: 'Guardar'
    },
    error: {
      onlyImg: 'Unicamente imagenes',
      outOfSize: 'La imagen excede el tamaño maximo:',
      lowestPx: 'La imagen es demasiado pequeño. Se espera por lo menos:'
    }
  }
});
// CONCATENATED MODULE: ./packages/upload/utils/mimes.js
/* harmony default export */ var mimes = ({
  'jpg': 'image/jpeg',
  'png': 'image/png',
  'gif': 'image/gif',
  'svg': 'image/svg+xml',
  'psd': 'image/photoshop'
});
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array-buffer.slice.js
var es_array_buffer_slice = __webpack_require__("ace42");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.uint8-array.js
var es_typed_array_uint8_array = __webpack_require__("5cc6");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.copy-within.js
var es_typed_array_copy_within = __webpack_require__("9a8c");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.every.js
var es_typed_array_every = __webpack_require__("a975");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.fill.js
var es_typed_array_fill = __webpack_require__("735e");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.filter.js
var es_typed_array_filter = __webpack_require__("c1ac");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.find.js
var es_typed_array_find = __webpack_require__("d139");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.find-index.js
var es_typed_array_find_index = __webpack_require__("3a7b");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.for-each.js
var es_typed_array_for_each = __webpack_require__("d5d6");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.includes.js
var es_typed_array_includes = __webpack_require__("82f8");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.index-of.js
var es_typed_array_index_of = __webpack_require__("e91f");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.iterator.js
var es_typed_array_iterator = __webpack_require__("60bd");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.join.js
var es_typed_array_join = __webpack_require__("5f96");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.last-index-of.js
var es_typed_array_last_index_of = __webpack_require__("3280");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.map.js
var es_typed_array_map = __webpack_require__("3fcc");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reduce.js
var es_typed_array_reduce = __webpack_require__("ca91");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reduce-right.js
var es_typed_array_reduce_right = __webpack_require__("25a1");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reverse.js
var es_typed_array_reverse = __webpack_require__("cd26");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.set.js
var es_typed_array_set = __webpack_require__("3c5d");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.slice.js
var es_typed_array_slice = __webpack_require__("2954");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.some.js
var es_typed_array_some = __webpack_require__("649e");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.sort.js
var es_typed_array_sort = __webpack_require__("219c");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.subarray.js
var es_typed_array_subarray = __webpack_require__("170b");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-locale-string.js
var es_typed_array_to_locale_string = __webpack_require__("b39a");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-string.js
var es_typed_array_to_string = __webpack_require__("72f7");

// CONCATENATED MODULE: ./packages/upload/utils/data2blob.js






























/**
 * database64文件格式转换为2进制
 *
 * @param  {[String]} data dataURL 的格式为 “data:image/png;base64,****”,逗号之前都是一些说明性的文字，我们只需要逗号之后的就行了
 * @param  {[String]} mime [description]
 * @return {[blob]}      [description]
 */
/* harmony default export */ var data2blob = (function (data, mime) {
  data = data.split(',')[1];
  data = window.atob(data);
  var ia = new Uint8Array(data.length);

  for (var i = 0; i < data.length; i++) {
    ia[i] = data.charCodeAt(i);
  } // canvas.toDataURL 返回的默认格式就是 image/png


  return new Blob([ia], {
    type: mime
  });
});
// CONCATENATED MODULE: ./packages/upload/utils/effectRipple.js


/**
 * 点击波纹效果
 *
 * @param  {[event]} e        [description]
 * @param  {[Object]} arg_opts [description]
 * @return {[bollean]}          [description]
 */
/* harmony default export */ var effectRipple = (function (e, arg_opts) {
  var opts = Object.assign({
    ele: e.target,
    // 波纹作用元素
    type: 'hit',
    // hit点击位置扩散,center中心点扩展
    bgc: 'rgba(0, 0, 0, 0.15)' // 波纹颜色

  }, arg_opts),
      target = opts.ele;

  if (target) {
    var rect = target.getBoundingClientRect(),
        ripple = target.querySelector('.e-ripple');

    if (!ripple) {
      ripple = document.createElement('span');
      ripple.className = 'e-ripple';
      ripple.style.height = ripple.style.width = Math.max(rect.width, rect.height) + 'px';
      target.appendChild(ripple);
    } else {
      ripple.className = 'e-ripple';
    }

    switch (opts.type) {
      case 'center':
        ripple.style.top = rect.height / 2 - ripple.offsetHeight / 2 + 'px';
        ripple.style.left = rect.width / 2 - ripple.offsetWidth / 2 + 'px';
        break;

      default:
        ripple.style.top = e.pageY - rect.top - ripple.offsetHeight / 2 - document.body.scrollTop + 'px';
        ripple.style.left = e.pageX - rect.left - ripple.offsetWidth / 2 - document.body.scrollLeft + 'px';
    }

    ripple.style.backgroundColor = opts.bgc;
    ripple.className = 'e-ripple z-active';
    return false;
  }
});
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/upload.vue?vue&type=script&lang=js&









//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//




/* harmony default export */ var uploadvue_type_script_lang_js_ = ({
  name: "AwsuiUpload",
  props: {
    // 域，上传文件name，触发事件会带上（如果一个页面多个图片上传控件，可以做区分
    field: {
      type: String,
      'default': 'avatar'
    },
    // 原名key，类似于id，触发事件会带上（如果一个页面多个图片上传控件，可以做区分
    ki: {
      'default': 0
    },
    // 显示该控件与否
    value: {
      'default': true
    },
    // 上传地址
    url: {
      type: String,
      'default': ''
    },
    // 其他要上传文件附带的数据，对象格式
    params: {
      type: Object,
      'default': null
    },
    //Add custom headers
    headers: {
      type: Object,
      'default': null
    },
    // 剪裁图片的宽
    width: {
      type: Number,
      default: 200
    },
    // 剪裁图片的高
    height: {
      type: Number,
      default: 200
    },
    // 不显示旋转功能
    noRotate: {
      type: Boolean,
      default: true
    },
    // 不预览圆形图片
    noCircle: {
      type: Boolean,
      default: false
    },
    // 不预览方形图片
    noSquare: {
      type: Boolean,
      default: false
    },
    // 单文件大小限制
    maxSize: {
      type: Number,
      'default': 10240
    },
    // 语言类型
    langType: {
      type: String,
      'default': 'zh'
    },
    // 语言包
    langExt: {
      type: Object,
      'default': null
    },
    // 图片上传格式
    imgFormat: {
      type: String,
      'default': 'png'
    }
  },
  data: function data() {
    var that = this,
        imgFormat = that.imgFormat,
        langType = that.langType,
        langExt = that.langExt,
        width = that.width,
        height = that.height,
        isSupported = true,
        allowImgFormat = ['jpg', 'png'],
        tempImgFormat = allowImgFormat.indexOf(imgFormat) === -1 ? 'jpg' : imgFormat,
        lang = language[langType] ? language[langType] : language['en'],
        mime = mimes[tempImgFormat]; // 规范图片格式

    that.imgFormat = tempImgFormat;

    if (langExt) {
      Object.assign(lang, langExt);
    }

    if (typeof FormData != 'function') {
      isSupported = false;
    }

    return {
      // 图片的mime
      mime: mime,
      // 语言包
      lang: lang,
      // 浏览器是否支持该控件
      isSupported: isSupported,
      // 浏览器是否支持触屏事件
      //isSupportTouch: document.hasOwnProperty('ontouchstart'),
      // 步骤
      step: 1,
      //1选择文件 2剪裁 3上传
      // 上传状态及进度
      loading: 0,
      //0未开始 1正在 2成功 3错误
      progress: 0,
      // 是否有错误及错误信息
      hasError: false,
      errorMsg: '',
      // 需求图宽高比
      ratio: width / height,
      // 原图地址、生成图片地址
      sourceImg: null,
      sourceImgUrl: '',
      createImgUrl: '',
      // 原图片拖动事件初始值
      sourceImgMouseDown: {
        on: false,
        mX: 0,
        //鼠标按下的坐标
        mY: 0,
        x: 0,
        //scale原图坐标
        y: 0
      },
      // 生成图片预览的容器大小
      previewContainer: {
        width: 100,
        height: 100
      },
      // 原图容器宽高
      sourceImgContainer: {
        // sic
        width: 240,
        height: 184 // 如果生成图比例与此一致会出现bug，先改成特殊的格式吧，哈哈哈

      },
      // 原图展示属性
      scale: {
        zoomAddOn: false,
        //按钮缩放事件开启
        zoomSubOn: false,
        //按钮缩放事件开启
        range: 1,
        //最大100
        rotateLeft: false,
        //按钮向左旋转事件开启
        rotateRight: false,
        //按钮向右旋转事件开启
        degree: 0,
        // 旋转度数
        x: 0,
        y: 0,
        width: 0,
        height: 0,
        maxWidth: 0,
        maxHeight: 0,
        minWidth: 0,
        //最宽
        minHeight: 0,
        naturalWidth: 0,
        //原宽
        naturalHeight: 0
      }
    };
  },
  computed: {
    // 进度条样式
    progressStyle: function progressStyle() {
      var progress = this.progress;
      return {
        width: progress + '%'
      };
    },
    // 原图样式
    sourceImgStyle: function sourceImgStyle() {
      var scale = this.scale,
          sourceImgMasking = this.sourceImgMasking,
          top = scale.y + sourceImgMasking.y + 'px',
          left = scale.x + sourceImgMasking.x + 'px';
      return {
        top: top,
        left: left,
        width: scale.width + 'px',
        height: scale.height + 'px',
        transform: 'rotate(' + scale.degree + 'deg)',
        // 旋转时 左侧原始图旋转样式
        '-ms-transform': 'rotate(' + scale.degree + 'deg)',
        // 兼容IE9
        '-moz-transform': 'rotate(' + scale.degree + 'deg)',
        // 兼容FireFox
        '-webkit-transform': 'rotate(' + scale.degree + 'deg)',
        // 兼容Safari 和 chrome
        '-o-transform': 'rotate(' + scale.degree + 'deg)' // 兼容 Opera

      };
    },
    // 原图蒙版属性
    sourceImgMasking: function sourceImgMasking() {
      var width = this.width,
          height = this.height,
          ratio = this.ratio,
          sourceImgContainer = this.sourceImgContainer,
          sic = sourceImgContainer,
          sicRatio = sic.width / sic.height,
          x = 0,
          y = 0,
          w = sic.width,
          h = sic.height,
          scale = 1;

      if (ratio < sicRatio) {
        scale = sic.height / height;
        w = sic.height * ratio;
        x = (sic.width - w) / 2;
      }

      if (ratio > sicRatio) {
        scale = sic.width / width;
        h = sic.width / ratio;
        y = (sic.height - h) / 2;
      }

      return {
        scale: scale,
        // 蒙版相对需求宽高的缩放
        x: x,
        y: y,
        width: w,
        height: h
      };
    },
    // 原图遮罩样式
    sourceImgShadeStyle: function sourceImgShadeStyle() {
      var sourceImgMasking = this.sourceImgMasking,
          sourceImgContainer = this.sourceImgContainer,
          sic = sourceImgContainer,
          sim = sourceImgMasking,
          w = sim.width == sic.width ? sim.width : (sic.width - sim.width) / 2,
          h = sim.height == sic.height ? sim.height : (sic.height - sim.height) / 2;
      return {
        width: w + 'px',
        height: h + 'px'
      };
    },
    previewStyle: function previewStyle() {
      var width = this.width,
          height = this.height,
          ratio = this.ratio,
          previewContainer = this.previewContainer,
          pc = previewContainer,
          w = pc.width,
          h = pc.height,
          pcRatio = w / h;

      if (ratio < pcRatio) {
        w = pc.height * ratio;
      }

      if (ratio > pcRatio) {
        h = pc.width / ratio;
      }

      return {
        width: w + 'px',
        height: h + 'px'
      };
    }
  },
  watch: {
    value: function value(newValue) {
      if (newValue && this.loading != 1) {
        this.reset();
      } else {
        this.off();
      }
    }
  },
  methods: {
    // 点击波纹效果
    ripple: function ripple(e) {
      effectRipple(e);
    },
    // 关闭控件
    off: function off() {
      var _this = this;

      setTimeout(function () {
        _this.$emit('input', false);

        if (_this.step == 3 && _this.loading == 2) {
          _this.setStep(1);
        }
      }, 200);
    },
    // 设置步骤
    setStep: function setStep(no) {
      var _this2 = this;

      // 延时是为了显示动画效果呢，哈哈哈
      setTimeout(function () {
        _this2.step = no;
      }, 200);
    },

    /* 图片选择区域函数绑定
     ---------------------------------------------------------------*/
    preventDefault: function preventDefault(e) {
      e.preventDefault();
      return false;
    },
    handleClick: function handleClick(e) {
      if (this.loading !== 1) {
        if (e.target !== this.$refs.fileinput) {
          e.preventDefault();

          if (document.activeElement !== this.$refs) {
            this.$refs.fileinput.click();
          }
        }
      }
    },
    handleChange: function handleChange(e) {
      e.preventDefault();

      if (this.loading !== 1) {
        var files = e.target.files || e.dataTransfer.files;
        this.reset();

        if (this.checkFile(files[0])) {
          this.setSourceImg(files[0]);
        }
      }
    },

    /* ---------------------------------------------------------------*/
    // 检测选择的文件是否合适
    checkFile: function checkFile(file) {
      var that = this,
          lang = that.lang,
          maxSize = that.maxSize; // 仅限图片

      if (file.type.indexOf('image') === -1) {
        that.hasError = true;
        that.errorMsg = lang.error.onlyImg;
        return false;
      } // 超出大小


      if (file.size / 1024 > maxSize) {
        that.hasError = true;
        that.errorMsg = lang.error.outOfSize + maxSize + 'kb';
        return false;
      }

      return true;
    },
    // 重置控件
    reset: function reset() {
      var that = this;
      that.loading = 0;
      that.hasError = false;
      that.errorMsg = '';
      that.progress = 0;
    },
    // 设置图片源
    setSourceImg: function setSourceImg(file) {
      var that = this,
          fr = new FileReader();

      fr.onload = function (e) {
        that.sourceImgUrl = fr.result;
        that.startCrop();
      };

      fr.readAsDataURL(file);
    },
    // 剪裁前准备工作
    startCrop: function startCrop() {
      var that = this,
          width = that.width,
          height = that.height,
          ratio = that.ratio,
          scale = that.scale,
          sourceImgUrl = that.sourceImgUrl,
          sourceImgMasking = that.sourceImgMasking,
          lang = that.lang,
          sim = sourceImgMasking,
          img = new Image();
      img.src = sourceImgUrl;

      img.onload = function () {
        var nWidth = img.naturalWidth,
            nHeight = img.naturalHeight,
            nRatio = nWidth / nHeight,
            w = sim.width,
            h = sim.height,
            x = 0,
            y = 0; // 图片像素不达标

        if (nWidth < width || nHeight < height) {
          that.hasError = true;
          that.errorMsg = lang.error.lowestPx + width + '*' + height;
          return false;
        }

        if (ratio > nRatio) {
          h = w / nRatio;
          y = (sim.height - h) / 2;
        }

        if (ratio < nRatio) {
          w = h * nRatio;
          x = (sim.width - w) / 2;
        }

        scale.range = 0;
        scale.x = x;
        scale.y = y;
        scale.width = w;
        scale.height = h;
        scale.degree = 0;
        scale.minWidth = w;
        scale.minHeight = h;
        scale.maxWidth = nWidth * sim.scale;
        scale.maxHeight = nHeight * sim.scale;
        scale.naturalWidth = nWidth;
        scale.naturalHeight = nHeight;
        that.sourceImg = img;
        that.createImg();
        that.setStep(2);
      };
    },
    // 鼠标按下图片准备移动
    imgStartMove: function imgStartMove(e) {
      e.preventDefault(); // 支持触摸事件，则鼠标事件无效

      if (this.isSupportTouch && !e.targetTouches) {
        return false;
      }

      var et = e.targetTouches ? e.targetTouches[0] : e,
          sourceImgMouseDown = this.sourceImgMouseDown,
          scale = this.scale,
          simd = sourceImgMouseDown;
      simd.mX = et.screenX;
      simd.mY = et.screenY;
      simd.x = scale.x;
      simd.y = scale.y;
      simd.on = true;
    },
    // 鼠标按下状态下移动，图片移动
    imgMove: function imgMove(e) {
      e.preventDefault(); // 支持触摸事件，则鼠标事件无效

      if (this.isSupportTouch && !e.targetTouches) {
        return false;
      }

      var et = e.targetTouches ? e.targetTouches[0] : e,
          _this$sourceImgMouseD = this.sourceImgMouseDown,
          on = _this$sourceImgMouseD.on,
          mX = _this$sourceImgMouseD.mX,
          mY = _this$sourceImgMouseD.mY,
          x = _this$sourceImgMouseD.x,
          y = _this$sourceImgMouseD.y,
          scale = this.scale,
          sourceImgMasking = this.sourceImgMasking,
          sim = sourceImgMasking,
          nX = et.screenX,
          nY = et.screenY,
          dX = nX - mX,
          dY = nY - mY,
          rX = x + dX,
          rY = y + dY;
      if (!on) return;

      if (rX > 0) {
        rX = 0;
      }

      if (rY > 0) {
        rY = 0;
      }

      if (rX < sim.width - scale.width) {
        rX = sim.width - scale.width;
      }

      if (rY < sim.height - scale.height) {
        rY = sim.height - scale.height;
      }

      scale.x = rX;
      scale.y = rY;
    },
    // 按钮按下开始向右旋转
    startRotateRight: function startRotateRight(e) {
      var that = this,
          scale = that.scale;
      scale.rotateRight = true;

      function rotate() {
        if (scale.rotateRight) {
          var degree = ++scale.degree;
          that.createImg(degree);
          setTimeout(function () {
            rotate();
          }, 60);
        }
      }

      rotate();
    },
    // 按钮按下开始向右旋转
    startRotateLeft: function startRotateLeft(e) {
      var that = this,
          scale = that.scale;
      scale.rotateLeft = true;

      function rotate() {
        if (scale.rotateLeft) {
          var degree = --scale.degree;
          that.createImg(degree);
          setTimeout(function () {
            rotate();
          }, 60);
        }
      }

      rotate();
    },
    // 停止旋转
    endRotate: function endRotate() {
      var scale = this.scale;
      scale.rotateLeft = false;
      scale.rotateRight = false;
    },
    // 按钮按下开始放大
    startZoomAdd: function startZoomAdd(e) {
      var that = this,
          scale = that.scale;
      scale.zoomAddOn = true;

      function zoom() {
        if (scale.zoomAddOn) {
          var range = scale.range >= 100 ? 100 : ++scale.range;
          that.zoomImg(range);
          setTimeout(function () {
            zoom();
          }, 60);
        }
      }

      zoom();
    },
    // 按钮松开或移开取消放大
    endZoomAdd: function endZoomAdd(e) {
      this.scale.zoomAddOn = false;
    },
    // 按钮按下开始缩小
    startZoomSub: function startZoomSub(e) {
      var that = this,
          scale = that.scale;
      scale.zoomSubOn = true;

      function zoom() {
        if (scale.zoomSubOn) {
          var range = scale.range <= 0 ? 0 : --scale.range;
          that.zoomImg(range);
          setTimeout(function () {
            zoom();
          }, 60);
        }
      }

      zoom();
    },
    // 按钮松开或移开取消缩小
    endZoomSub: function endZoomSub(e) {
      var scale = this.scale;
      scale.zoomSubOn = false;
    },
    zoomChange: function zoomChange(e) {
      this.zoomImg(e.target.value);
    },
    // 缩放原图
    zoomImg: function zoomImg(newRange) {
      var that = this,
          sourceImgMasking = this.sourceImgMasking,
          sourceImgMouseDown = this.sourceImgMouseDown,
          scale = this.scale,
          maxWidth = scale.maxWidth,
          maxHeight = scale.maxHeight,
          minWidth = scale.minWidth,
          minHeight = scale.minHeight,
          width = scale.width,
          height = scale.height,
          x = scale.x,
          y = scale.y,
          range = scale.range,
          sim = sourceImgMasking,
          sWidth = sim.width,
          sHeight = sim.height,
          nWidth = minWidth + (maxWidth - minWidth) * newRange / 100,
          nHeight = minHeight + (maxHeight - minHeight) * newRange / 100,
          nX = sWidth / 2 - nWidth / width * (sWidth / 2 - x),
          nY = sHeight / 2 - nHeight / height * (sHeight / 2 - y); // 判断新坐标是否超过蒙版限制

      if (nX > 0) {
        nX = 0;
      }

      if (nY > 0) {
        nY = 0;
      }

      if (nX < sWidth - nWidth) {
        nX = sWidth - nWidth;
      }

      if (nY < sHeight - nHeight) {
        nY = sHeight - nHeight;
      } // 赋值处理


      scale.x = nX;
      scale.y = nY;
      scale.width = nWidth;
      scale.height = nHeight;
      scale.range = newRange;
      setTimeout(function () {
        if (scale.range == newRange) {
          that.createImg();
        }
      }, 300);
    },
    // 生成需求图片
    createImg: function createImg(e) {
      var that = this,
          mime = that.mime,
          sourceImg = that.sourceImg,
          _that$scale = that.scale,
          x = _that$scale.x,
          y = _that$scale.y,
          width = _that$scale.width,
          height = _that$scale.height,
          degree = _that$scale.degree,
          scale = that.sourceImgMasking.scale,
          canvas = that.$refs.canvas,
          ctx = canvas.getContext('2d');

      if (e) {
        // 取消鼠标按下移动状态
        that.sourceImgMouseDown.on = false;
      }

      canvas.width = that.width;
      canvas.height = that.height;
      ctx.clearRect(0, 0, that.width, that.height); // 将透明区域设置为白色底边

      ctx.fillStyle = "#fff";
      ctx.fillRect(0, 0, that.width, that.height);
      ctx.translate(that.width * 0.5, that.height * 0.5);
      ctx.rotate(Math.PI * degree / 180);
      ctx.translate(-that.width * 0.5, -that.height * 0.5);
      ctx.drawImage(sourceImg, x / scale, y / scale, width / scale, height / scale);
      that.createImgUrl = canvas.toDataURL(mime);
    },
    prepareUpload: function prepareUpload() {
      var url = this.url,
          createImgUrl = this.createImgUrl,
          field = this.field,
          ki = this.ki;
      this.$emit('crop-success', createImgUrl, field, ki);

      if (typeof url == 'string' && url) {
        this.upload();
      } else {
        this.off();
      }
    },
    // 上传图片
    upload: function upload() {
      var that = this,
          lang = this.lang,
          imgFormat = this.imgFormat,
          mime = this.mime,
          url = this.url,
          params = this.params,
          headers = this.headers,
          field = this.field,
          ki = this.ki,
          createImgUrl = this.createImgUrl,
          fmData = new FormData();
      fmData.append(field, data2blob(createImgUrl, mime), field + '.' + imgFormat); // 添加其他参数

      if (Object(esm_typeof["a" /* default */])(params) == 'object' && params) {
        Object.keys(params).forEach(function (k) {
          fmData.append(k, params[k]);
        });
      } // 监听进度回调


      var uploadProgress = function uploadProgress(event) {
        if (event.lengthComputable) {
          that.progress = 100 * Math.round(event.loaded) / event.total;
        }
      }; // 上传文件


      that.reset();
      that.loading = 1;
      that.setStep(3);
      new Promise(function (resolve, reject) {
        var client = new XMLHttpRequest();
        client.open('POST', url, true);

        client.onreadystatechange = function () {
          if (this.readyState !== 4) {
            return;
          }

          if (this.status === 200 || this.status === 201) {
            resolve(JSON.parse(this.responseText));
          } else {
            reject(this.status);
          }
        };

        client.upload.addEventListener("progress", uploadProgress, false); //监听进度
        // 设置header

        if (Object(esm_typeof["a" /* default */])(headers) == 'object' && headers) {
          Object.keys(headers).forEach(function (k) {
            client.setRequestHeader(k, headers[k]);
          });
        }

        client.send(fmData);
      }).then( // 上传成功
      function (resData) {
        if (that.value) {
          that.loading = 2;
          that.$emit('crop-upload-success', resData, field, ki);
        }
      }, // 上传失败
      function (sts) {
        if (that.value) {
          that.loading = 3;
          that.hasError = true;
          that.errorMsg = lang.fail;
          that.$emit('crop-upload-fail', sts, field, ki);
        }
      });
    }
  },
  created: function created() {
    var _this3 = this;

    // 绑定按键esc隐藏此插件事件
    document.addEventListener('keyup', function (e) {
      if (_this3.value && (e.key == 'Escape' || e.keyCode == 27)) {
        _this3.off();
      }
    });
  }
});
// CONCATENATED MODULE: ./packages/upload/src/upload.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_uploadvue_type_script_lang_js_ = (uploadvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/upload/src/upload.vue?vue&type=style&index=0&id=7dde4dbe&scoped=true&lang=css&
var uploadvue_type_style_index_0_id_7dde4dbe_scoped_true_lang_css_ = __webpack_require__("8888");

// CONCATENATED MODULE: ./packages/upload/src/upload.vue






/* normalize component */

var upload_component = Object(componentNormalizer["a" /* default */])(
  src_uploadvue_type_script_lang_js_,
  uploadvue_type_template_id_7dde4dbe_scoped_true_render,
  uploadvue_type_template_id_7dde4dbe_scoped_true_staticRenderFns,
  false,
  null,
  "7dde4dbe",
  null
  
)

/* harmony default export */ var src_upload = (upload_component.exports);
// CONCATENATED MODULE: ./packages/upload/index.js

// 导入组件
 // 为组件提供 install 安装方法，供按需引入

src_upload.install = function (Vue) {
  Vue.component(src_upload.name, src_upload);
}; // 默认导出组件


/* harmony default export */ var packages_upload = (src_upload);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload-image/src/upload-image.vue?vue&type=template&id=2344d3a1&scoped=true&
var upload_imagevue_type_template_id_2344d3a1_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('awsui-dialog',{staticClass:"awsui-upload",attrs:{"title":"修改头像","visible":_vm.value,"width":"auto","border":false,"show-close":false},on:{"update:visible":function($event){_vm.value=$event}}},[_c('button',{staticClass:"vicp-close",attrs:{"type":"button"},on:{"click":_vm.off}},[_c('i',{staticClass:"awsui-iconfont"},[_vm._v("  ")])]),_c('input',{directives:[{name:"show",rawName:"v-show",value:(false),expression:"false"}],ref:"fileinput",attrs:{"type":"file"},on:{"change":_vm.handleChange}}),_c('div',{staticClass:"vicp-wrap"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.step == 1),expression:"step == 1"}],staticClass:"vicp-step1"},[_c('div',{staticClass:"vicp-crop"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(true),expression:"true"}],staticClass:"vicp-crop-left"},[_c('div',{staticClass:"vicp-img-container"},[_c('div',{staticClass:"vicp-img-default",on:{"click":_vm.handleClick}},[_c('i',{staticClass:"awsui-iconfont"},[_vm._v("  ")])])]),_c('div',{staticClass:"vicp-img-info"},[_vm._v("根据您的需要裁剪和调整图片的位置")])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(true),expression:"true"}],staticClass:"vicp-crop-right"},[_c('div',{staticClass:"vicp-preview"},[_c('span',[_vm._v(_vm._s(_vm.lang.preview))]),(!_vm.noSquare)?_c('div',{staticClass:"vicp-preview-item"}):_vm._e(),(!_vm.noCircle)?_c('div',{staticClass:"vicp-preview-item vicp-preview-item-circle"}):_vm._e()])])])]),(_vm.step == 2)?_c('div',{staticClass:"vicp-step2"},[_c('div',{staticClass:"vicp-crop"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(true),expression:"true"}],staticClass:"vicp-crop-left"},[_c('div',{staticClass:"vicp-img-container"},[_c('img',{ref:"img",staticClass:"vicp-img",style:(_vm.sourceImgStyle),attrs:{"src":_vm.sourceImgUrl,"draggable":"false"},on:{"drag":_vm.preventDefault,"dragstart":_vm.preventDefault,"dragend":_vm.preventDefault,"dragleave":_vm.preventDefault,"dragover":_vm.preventDefault,"dragenter":_vm.preventDefault,"drop":_vm.preventDefault,"touchstart":_vm.imgStartMove,"touchmove":_vm.imgMove,"touchend":_vm.createImg,"touchcancel":_vm.createImg,"mousedown":_vm.imgStartMove,"mousemove":_vm.imgMove,"mouseup":_vm.createImg,"mouseout":_vm.createImg}}),_c('div',{staticClass:"vicp-img-shade vicp-img-shade-1",style:(_vm.sourceImgShadeStyle)}),_c('div',{staticClass:"vicp-img-shade vicp-img-shade-2",style:(_vm.sourceImgShadeStyle)})]),_c('div',{staticClass:"vicp-range"},[_c('input',{attrs:{"type":"range","step":"1","min":"0","max":"100"},domProps:{"value":_vm.scale.range},on:{"input":_vm.zoomChange}}),_c('i',{staticClass:"vicp-icon5",on:{"mousedown":_vm.startZoomSub,"mouseout":_vm.endZoomSub,"mouseup":_vm.endZoomSub}}),_c('i',{staticClass:"vicp-icon6",on:{"mousedown":_vm.startZoomAdd,"mouseout":_vm.endZoomAdd,"mouseup":_vm.endZoomAdd}})]),(!_vm.noRotate)?_c('div',{staticClass:"vicp-rotate"},[_c('i',{on:{"mousedown":_vm.startRotateLeft,"mouseout":_vm.endRotate,"mouseup":_vm.endRotate}},[_vm._v("↺")]),_c('i',{on:{"mousedown":_vm.startRotateRight,"mouseout":_vm.endRotate,"mouseup":_vm.endRotate}},[_vm._v("↻")])]):_vm._e()]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(true),expression:"true"}],staticClass:"vicp-crop-right"},[_c('div',{staticClass:"vicp-preview"},[_c('span',[_vm._v(_vm._s(_vm.lang.preview))]),(!_vm.noSquare)?_c('div',{staticClass:"vicp-preview-item"},[_c('img',{style:(_vm.previewStyle),attrs:{"src":_vm.createImgUrl}})]):_vm._e(),(!_vm.noCircle)?_c('div',{staticClass:"vicp-preview-item vicp-preview-item-circle"},[_c('img',{style:(_vm.previewStyle),attrs:{"src":_vm.createImgUrl}})]):_vm._e()])])])]):_vm._e(),(_vm.step == 3)?_c('div',{staticClass:"vicp-step3"},[_c('div',{staticClass:"vicp-upload"},[_c('span',{directives:[{name:"show",rawName:"v-show",value:(_vm.loading === 1),expression:"loading === 1"}],staticClass:"vicp-loading"},[_vm._v(_vm._s(_vm.lang.loading))]),_c('div',{staticClass:"vicp-progress-wrap"},[_c('span',{directives:[{name:"show",rawName:"v-show",value:(_vm.loading === 1),expression:"loading === 1"}],staticClass:"vicp-progress",style:(_vm.progressStyle)})]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.hasError),expression:"hasError"}],staticClass:"vicp-error"},[_c('i',{staticClass:"vicp-icon2"}),_vm._v(" "+_vm._s(_vm.errorMsg)+" ")]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.loading === 2),expression:"loading === 2"}],staticClass:"vicp-success"},[_c('i',{staticClass:"vicp-icon3"}),_vm._v(" "+_vm._s(_vm.lang.success)+" ")])])]):_vm._e(),_c('canvas',{directives:[{name:"show",rawName:"v-show",value:(false),expression:"false"}],ref:"canvas",attrs:{"width":_vm.width,"height":_vm.height}})]),_c('span',{staticClass:"dialog-footer",attrs:{"slot":"footer"},slot:"footer"},[_c('awsui-button',{staticClass:"awsui-left",on:{"click":_vm.handleClick}},[_vm._v("选择图片")]),_c('awsui-button',{attrs:{"type":"primary"},on:{"click":_vm.prepareUpload,"mousedown":_vm.ripple}},[_vm._v("确 定")]),_c('awsui-button',{on:{"click":_vm.off}},[_vm._v("取 消")])],1)])}
var upload_imagevue_type_template_id_2344d3a1_scoped_true_staticRenderFns = []


// CONCATENATED MODULE: ./packages/upload-image/src/upload-image.vue?vue&type=template&id=2344d3a1&scoped=true&

// CONCATENATED MODULE: ./packages/upload-image/utils/language.js
/* harmony default export */ var utils_language = ({
  zh: {
    hint: '点击，或拖动图片至此处',
    loading: '正在上传……',
    noSupported: '浏览器不支持该功能，请使用IE10以上或其他现在浏览器！',
    success: '上传成功',
    fail: '图片上传失败',
    preview: '头像预览',
    btn: {
      off: '取消',
      close: '关闭',
      back: '上一步',
      save: '保存'
    },
    error: {
      onlyImg: '仅限图片格式',
      outOfSize: '单文件大小不能超过 ',
      lowestPx: '图片最低像素为（宽*高）：'
    }
  },
  en: {
    hint: 'Click or drag the file here to upload',
    loading: 'Uploading…',
    noSupported: 'Browser is not supported, please use IE10+ or other browsers',
    success: 'Upload success',
    fail: 'Upload failed',
    preview: 'Preview',
    btn: {
      off: 'Cancel',
      close: 'Close',
      back: 'Back',
      save: 'Save'
    },
    error: {
      onlyImg: 'Image only',
      outOfSize: 'Image exceeds size limit: ',
      lowestPx: 'Image\'s size is too low. Expected at least: '
    }
  },
  ro: {
    hint: 'Atinge sau trage fișierul aici',
    loading: 'Se încarcă',
    noSupported: 'Browser-ul tău nu suportă acest feature. Te rugăm încearcă cu alt browser.',
    success: 'S-a încărcat cu succes',
    fail: 'A apărut o problemă la încărcare',
    preview: 'Previzualizează',
    btn: {
      off: 'Anulează',
      close: 'Închide',
      back: 'Înapoi',
      save: 'Salvează'
    },
    error: {
      onlyImg: 'Doar imagini',
      outOfSize: 'Imaginea depășește limita de: ',
      loewstPx: 'Imaginea este prea mică; Minim: '
    }
  },
  ru: {
    hint: 'Нажмите, или перетащите файл в это окно',
    loading: 'Загружаю……',
    noSupported: 'Ваш браузер не поддерживается, пожалуйста, используйте IE10 + или другие браузеры',
    success: 'Загрузка выполнена успешно',
    fail: 'Ошибка загрузки',
    preview: 'Предпросмотр',
    btn: {
      off: 'Отменить',
      close: 'Закрыть',
      back: 'Назад',
      save: 'Сохранить'
    },
    error: {
      onlyImg: 'Только изображения',
      outOfSize: 'Изображение превышает предельный размер: ',
      lowestPx: 'Минимальный размер изображения: '
    }
  },
  'pt-br': {
    hint: 'Clique ou arraste o arquivo aqui para carregar',
    loading: 'Carregando…',
    noSupported: 'Browser não suportado, use o IE10+ ou outro browser',
    success: 'Sucesso ao carregar imagem',
    fail: 'Falha ao carregar imagem',
    preview: 'Pré-visualizar',
    btn: {
      off: 'Cancelar',
      close: 'Fechar',
      back: 'Voltar',
      save: 'Salvar'
    },
    error: {
      onlyImg: 'Apenas imagens',
      outOfSize: 'A imagem excede o limite de tamanho: ',
      lowestPx: 'O tamanho da imagem é muito pequeno. Tamanho mínimo: '
    }
  },
  fr: {
    hint: 'Cliquez ou glissez le fichier ici.',
    loading: 'Téléchargement…',
    noSupported: 'Votre navigateur n\'est pas supporté. Utilisez IE10 + ou un autre navigateur s\'il vous plaît.',
    success: 'Téléchargement réussit',
    fail: 'Téléchargement echoué',
    preview: 'Aperçu',
    btn: {
      off: 'Annuler',
      close: 'Fermer',
      back: 'Retour',
      save: 'Enregistrer'
    },
    error: {
      onlyImg: 'Image uniquement',
      outOfSize: 'L\'image sélectionnée dépasse la taille maximum: ',
      lowestPx: 'L\'image sélectionnée est trop petite. Dimensions attendues: '
    }
  },
  nl: {
    hint: 'Klik hier of sleep een afbeelding in dit vlak',
    loading: 'Uploaden…',
    noSupported: 'Je browser wordt helaas niet ondersteund. Gebruik IE10+ of een andere browser.',
    success: 'Upload succesvol',
    fail: 'Upload mislukt',
    preview: 'Voorbeeld',
    btn: {
      off: 'Annuleren',
      close: 'Sluiten',
      back: 'Terug',
      save: 'Opslaan'
    },
    error: {
      onlyImg: 'Alleen afbeeldingen',
      outOfSize: 'De afbeelding is groter dan: ',
      lowestPx: 'De afbeelding is te klein! Minimale afmetingen: '
    }
  },
  tr: {
    hint: 'Tıkla veya yüklemek istediğini buraya sürükle',
    loading: 'Yükleniyor…',
    noSupported: 'Tarayıcı desteklenmiyor, lütfen IE10+ veya farklı tarayıcı kullanın',
    success: 'Yükleme başarılı',
    fail: 'Yüklemede hata oluştu',
    preview: 'Önizle',
    btn: {
      off: 'İptal',
      close: 'Kapat',
      back: 'Geri',
      save: 'Kaydet'
    },
    error: {
      onlyImg: 'Sadece resim',
      outOfSize: 'Resim yükleme limitini aşıyor: ',
      lowestPx: 'Resmin boyutu çok küçük. En az olması gereken: '
    }
  },
  'es-MX': {
    hint: 'Selecciona o arrastra una imagen',
    loading: 'Subiendo...',
    noSupported: 'Tu navegador no es soportado, porfavor usa IE10+ u otros navegadores mas recientes',
    success: 'Subido exitosamente',
    fail: 'Sucedió un error',
    preview: 'Vista previa',
    btn: {
      off: 'Cancelar',
      close: 'Cerrar',
      back: 'Atras',
      save: 'Guardar'
    },
    error: {
      onlyImg: 'Unicamente imagenes',
      outOfSize: 'La imagen excede el tamaño maximo:',
      lowestPx: 'La imagen es demasiado pequeño. Se espera por lo menos:'
    }
  }
});
// CONCATENATED MODULE: ./packages/upload-image/utils/mimes.js
/* harmony default export */ var utils_mimes = ({
  'jpg': 'image/jpeg',
  'png': 'image/png',
  'gif': 'image/gif',
  'svg': 'image/svg+xml',
  'psd': 'image/photoshop'
});
// CONCATENATED MODULE: ./packages/upload-image/utils/data2blob.js






























/**
 * database64文件格式转换为2进制
 *
 * @param  {[String]} data dataURL 的格式为 “data:image/png;base64,****”,逗号之前都是一些说明性的文字，我们只需要逗号之后的就行了
 * @param  {[String]} mime [description]
 * @return {[blob]}      [description]
 */
/* harmony default export */ var utils_data2blob = (function (data, mime) {
  data = data.split(',')[1];
  data = window.atob(data);
  var ia = new Uint8Array(data.length);

  for (var i = 0; i < data.length; i++) {
    ia[i] = data.charCodeAt(i);
  }

  ; // canvas.toDataURL 返回的默认格式就是 image/png

  return new Blob([ia], {
    type: mime
  });
});
;
// CONCATENATED MODULE: ./packages/upload-image/utils/effectRipple.js


/**
 * 点击波纹效果
 *
 * @param  {[event]} e        [description]
 * @param  {[Object]} arg_opts [description]
 * @return {[bollean]}          [description]
 */
/* harmony default export */ var utils_effectRipple = (function (e, arg_opts) {
  var opts = Object.assign({
    ele: e.target,
    // 波纹作用元素
    type: 'hit',
    // hit点击位置扩散　center中心点扩展
    bgc: 'rgba(0, 0, 0, 0.15)' // 波纹颜色

  }, arg_opts),
      target = opts.ele;

  if (target) {
    var rect = target.getBoundingClientRect(),
        ripple = target.querySelector('.e-ripple');

    if (!ripple) {
      ripple = document.createElement('span');
      ripple.className = 'e-ripple';
      ripple.style.height = ripple.style.width = Math.max(rect.width, rect.height) + 'px';
      target.appendChild(ripple);
    } else {
      ripple.className = 'e-ripple';
    }

    switch (opts.type) {
      case 'center':
        ripple.style.top = rect.height / 2 - ripple.offsetHeight / 2 + 'px';
        ripple.style.left = rect.width / 2 - ripple.offsetWidth / 2 + 'px';
        break;

      default:
        ripple.style.top = e.pageY - rect.top - ripple.offsetHeight / 2 - document.body.scrollTop + 'px';
        ripple.style.left = e.pageX - rect.left - ripple.offsetWidth / 2 - document.body.scrollLeft + 'px';
    }

    ripple.style.backgroundColor = opts.bgc;
    ripple.className = 'e-ripple z-active';
    return false;
  }
});
;
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload-image/src/upload-image.vue?vue&type=script&lang=js&









//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//




/* harmony default export */ var upload_imagevue_type_script_lang_js_ = ({
  name: "AwsuiUploadImage",
  props: {
    // 域，上传文件name，触发事件会带上（如果一个页面多个图片上传控件，可以做区分
    field: {
      type: String,
      'default': 'avatar'
    },
    // 原名key，类似于id，触发事件会带上（如果一个页面多个图片上传控件，可以做区分
    ki: {
      'default': 0
    },
    // 显示该控件与否
    value: {
      'default': true
    },
    // 上传地址
    url: {
      type: String,
      'default': ''
    },
    // 其他要上传文件附带的数据，对象格式
    params: {
      type: Object,
      'default': null
    },
    //Add custom headers
    headers: {
      type: Object,
      'default': null
    },
    // 剪裁图片的宽
    width: {
      type: Number,
      default: 200
    },
    // 剪裁图片的高
    height: {
      type: Number,
      default: 200
    },
    // 不显示旋转功能
    noRotate: {
      type: Boolean,
      default: true
    },
    // 不预览圆形图片
    noCircle: {
      type: Boolean,
      default: false
    },
    // 不预览方形图片
    noSquare: {
      type: Boolean,
      default: false
    },
    // 单文件大小限制
    maxSize: {
      type: Number,
      'default': 10240
    },
    // 语言类型
    langType: {
      type: String,
      'default': 'zh'
    },
    // 语言包
    langExt: {
      type: Object,
      'default': null
    },
    // 图片上传格式
    imgFormat: {
      type: String,
      'default': 'png'
    },
    imgUrl: {
      type: String,
      'default': ''
    }
  },
  data: function data() {
    var that = this,
        imgFormat = that.imgFormat,
        imgUrl = that.imgUrl,
        langType = that.langType,
        langExt = that.langExt,
        width = that.width,
        height = that.height,
        isSupported = true,
        allowImgFormat = ['jpg', 'png'],
        sourceImgUrl = imgUrl !== '' || imgUrl !== null ? imgUrl : '',
        createImgUrl = imgUrl !== '' || imgUrl !== null ? imgUrl : '',
        step = imgUrl !== '' || imgUrl !== null ? 2 : 1,
        tempImgFormat = allowImgFormat.indexOf(imgFormat) === -1 ? 'jpg' : imgFormat,
        lang = utils_language[langType] ? utils_language[langType] : utils_language['en'],
        mime = utils_mimes[tempImgFormat]; // 规范图片格式

    that.imgFormat = tempImgFormat;

    if (langExt) {
      Object.assign(lang, langExt);
    }

    if (typeof FormData != 'function') {
      isSupported = false;
    }

    return {
      // 图片的mime
      mime: mime,
      // 语言包
      lang: lang,
      // 浏览器是否支持该控件
      isSupported: isSupported,
      // 浏览器是否支持触屏事件
      //isSupportTouch: document.hasOwnProperty('ontouchstart'),
      // 步骤
      step: step,
      //1选择文件 2剪裁 3上传
      // 上传状态及进度
      loading: 0,
      //0未开始 1正在 2成功 3错误
      progress: 0,
      // 是否有错误及错误信息
      hasError: false,
      errorMsg: '',
      // 需求图宽高比
      ratio: width / height,
      // 原图地址、生成图片地址
      sourceImg: null,
      sourceImgUrl: sourceImgUrl,
      createImgUrl: createImgUrl,
      // 原图片拖动事件初始值
      sourceImgMouseDown: {
        on: false,
        mX: 0,
        //鼠标按下的坐标
        mY: 0,
        x: 0,
        //scale原图坐标
        y: 0
      },
      // 生成图片预览的容器大小
      previewContainer: {
        width: 100,
        height: 100
      },
      // 原图容器宽高
      sourceImgContainer: {
        // sic
        width: 240,
        height: 184 // 如果生成图比例与此一致会出现bug，先改成特殊的格式吧，哈哈哈

      },
      // 原图展示属性
      scale: {
        zoomAddOn: false,
        //按钮缩放事件开启
        zoomSubOn: false,
        //按钮缩放事件开启
        range: 1,
        //最大100
        rotateLeft: false,
        //按钮向左旋转事件开启
        rotateRight: false,
        //按钮向右旋转事件开启
        degree: 0,
        // 旋转度数
        x: 0,
        y: 0,
        width: 0,
        height: 0,
        maxWidth: 0,
        maxHeight: 0,
        minWidth: 0,
        //最宽
        minHeight: 0,
        naturalWidth: 0,
        //原宽
        naturalHeight: 0
      }
    };
  },
  computed: {
    // 进度条样式
    progressStyle: function progressStyle() {
      var progress = this.progress;
      return {
        width: progress + '%'
      };
    },
    // 原图样式
    sourceImgStyle: function sourceImgStyle() {
      var scale = this.scale,
          sourceImgMasking = this.sourceImgMasking;
      return {
        top: scale.y + sourceImgMasking.y + 'px',
        left: scale.x + sourceImgMasking.x + 'px',
        width: scale.width + 'px',
        height: scale.height + 'px',
        transform: 'rotate(' + scale.degree + 'deg)',
        // 旋转时 左侧原始图旋转样式
        '-ms-transform': 'rotate(' + scale.degree + 'deg)',
        // 兼容IE9
        '-moz-transform': 'rotate(' + scale.degree + 'deg)',
        // 兼容FireFox
        '-webkit-transform': 'rotate(' + scale.degree + 'deg)',
        // 兼容Safari 和 chrome
        '-o-transform': 'rotate(' + scale.degree + 'deg)' // 兼容 Opera

      };
    },
    // 原图蒙版属性
    sourceImgMasking: function sourceImgMasking() {
      var width = this.width,
          height = this.height,
          ratio = this.ratio,
          sourceImgContainer = this.sourceImgContainer,
          sic = sourceImgContainer,
          sicRatio = sic.width / sic.height,
          x = 0,
          y = 0,
          w = sic.width,
          h = sic.height,
          scale = 1;

      if (ratio < sicRatio) {
        scale = sic.height / height;
        w = sic.height * ratio;
        x = (sic.width - w) / 2;
      }

      if (ratio > sicRatio) {
        scale = sic.width / width;
        h = sic.width / ratio;
        y = (sic.height - h) / 2;
      }

      return {
        scale: scale,
        // 蒙版相对需求宽高的缩放
        x: x,
        y: y,
        width: w,
        height: h
      };
    },
    // 原图遮罩样式
    sourceImgShadeStyle: function sourceImgShadeStyle() {
      var sourceImgMasking = this.sourceImgMasking,
          sourceImgContainer = this.sourceImgContainer,
          sic = sourceImgContainer,
          sim = sourceImgMasking,
          w = sim.width == sic.width ? sim.width : (sic.width - sim.width) / 2,
          h = sim.height == sic.height ? sim.height : (sic.height - sim.height) / 2;
      return {
        width: w + 'px',
        height: h + 'px'
      };
    },
    previewStyle: function previewStyle() {
      var width = this.width,
          height = this.height,
          ratio = this.ratio,
          previewContainer = this.previewContainer,
          pc = previewContainer,
          w = pc.width,
          h = pc.height,
          pcRatio = w / h;

      if (ratio < pcRatio) {
        w = pc.height * ratio;
      }

      if (ratio > pcRatio) {
        h = pc.width / ratio;
      }

      return {
        width: w + 'px',
        height: h + 'px'
      };
    }
  },
  watch: {
    value: function value(newValue) {
      var that = this;

      if (newValue && this.loading != 1) {
        this.initDataImg();
      } else {
        this.off();
      }
    }
  },
  methods: {
    getBase64: function getBase64(imgUrl, callback) {
      // 一定要设置为let，不然图片不显示
      var image = new Image(); // 解决跨域问题

      image.setAttribute("crossOrigin", "anonymous");
      var imageUrl = imgUrl;
      image.src = imageUrl;

      image.onload = function () {
        var canvas = document.createElement("canvas");
        canvas.width = image.width;
        canvas.height = image.height;
        var context = canvas.getContext("2d"); // 将透明区域设置为白色底边

        context.fillStyle = "#fff";
        context.fillRect(0, 0, image.width, image.height); // eslint-disable-next-line no-undef

        context.drawImage(image, 0, 0, image.width, image.height);
        var quality = 0.8; // 这里的dataurl就是base64类型
        // 使用toDataUrl将图片转换成jpeg的格式,不要把图片压缩成png，因为压缩成png后base64的字符串可能比不转换前的长！

        var dataurl = canvas.toDataURL("image/jpeg", quality);
        callback ? callback(dataurl) : null; //调用回调函数
      };
    },
    // 点击波纹效果
    ripple: function ripple(e) {
      utils_effectRipple(e);
    },
    // 关闭控件
    off: function off() {
      var _this = this;

      setTimeout(function () {
        _this.$emit('input', false);

        if (_this.step == 3 && _this.loading == 2) {
          _this.setStep(1);
        }
      }, 200);
    },
    //初始化显示图片
    initDataImg: function initDataImg() {
      var _this2 = this;

      this.reset();

      if (this.sourceImgUrl !== '') {
        if (this.sourceImgUrl.indexOf('data:image') !== -1) {
          this.createImg();
          this.setStep(2);
        } else {
          this.getBase64(this.sourceImgUrl, function (dataURL) {
            _this2.sourceImgUrl = dataURL;

            _this2.startCrop();
          });
        }
      } else {
        this.setStep(1);
      }
    },
    // 设置步骤
    setStep: function setStep(no) {
      var _this3 = this;

      // 延时是为了显示动画效果呢，哈哈哈
      setTimeout(function () {
        _this3.step = no;
      }, 200);
    },

    /* 图片选择区域函数绑定
     ---------------------------------------------------------------*/
    preventDefault: function preventDefault(e) {
      e.preventDefault();
      return false;
    },
    handleClick: function handleClick(e) {
      if (this.loading !== 1) {
        if (e.target !== this.$refs.fileinput) {
          e.preventDefault();

          if (document.activeElement !== this.$refs) {
            this.$refs.fileinput.dispatchEvent(new MouseEvent('click')); //this.$refs.fileinput.click();
          }
        }
      }
    },
    handleChange: function handleChange(e) {
      e.preventDefault();

      if (this.loading !== 1) {
        var files = e.target.files || e.dataTransfer.files;
        this.reset();

        if (this.checkFile(files[0])) {
          this.setSourceImg(files[0]);
        }
      }
    },

    /* ---------------------------------------------------------------*/
    // 检测选择的文件是否合适
    checkFile: function checkFile(file) {
      var that = this,
          lang = that.lang,
          maxSize = that.maxSize; // 仅限图片

      if (file.type.indexOf('image') === -1) {
        that.hasError = true;
        that.errorMsg = lang.error.onlyImg;
        return false;
      } // 超出大小


      if (file.size / 1024 > maxSize) {
        that.hasError = true;
        that.errorMsg = lang.error.outOfSize + maxSize + 'kb';
        return false;
      }

      return true;
    },
    // 重置控件
    reset: function reset() {
      this.loading = 0;
      this.progress = 0;
      this.hasError = false;
      this.errorMsg = '';
    },
    // 设置图片源
    setSourceImg: function setSourceImg(file) {
      var that = this,
          fr = new FileReader();

      fr.onload = function (e) {
        that.sourceImgUrl = fr.result;
        that.startCrop();
      };

      fr.readAsDataURL(file);
    },
    // 剪裁前准备工作
    startCrop: function startCrop() {
      var that = this,
          width = that.width,
          height = that.height,
          ratio = that.ratio,
          scale = that.scale,
          sourceImgUrl = that.sourceImgUrl,
          sourceImgMasking = that.sourceImgMasking,
          lang = that.lang,
          sim = sourceImgMasking,
          img = new Image();
      img.src = sourceImgUrl;

      img.onload = function () {
        var nWidth = img.naturalWidth,
            nHeight = img.naturalHeight,
            nRatio = nWidth / nHeight,
            w = sim.width,
            h = sim.height,
            x = 0,
            y = 0; // 图片像素不达标

        /*if (nWidth < width || nHeight < height) {
            that.hasError = true;
            that.errorMsg = lang.error.lowestPx + width + '*' + height;
            //return false;
        }*/

        if (ratio > nRatio) {
          h = w / nRatio;
          y = (sim.height - h) / 2;
        }

        if (ratio < nRatio) {
          w = h * nRatio;
          x = (sim.width - w) / 2;
        }

        scale.range = 0;
        scale.x = x;
        scale.y = y;
        scale.width = w;
        scale.height = h;
        scale.degree = 0;
        scale.minWidth = w;
        scale.minHeight = h;
        scale.maxWidth = nWidth * sim.scale;
        scale.maxHeight = nHeight * sim.scale;
        scale.naturalWidth = nWidth;
        scale.naturalHeight = nHeight;
        that.sourceImg = img;
        that.createImg();
        that.setStep(2);
      };
    },
    // 鼠标按下图片准备移动
    imgStartMove: function imgStartMove(e) {
      e.preventDefault(); // 支持触摸事件，则鼠标事件无效

      if (this.isSupportTouch && !e.targetTouches) {
        return false;
      }

      var et = e.targetTouches ? e.targetTouches[0] : e,
          sourceImgMouseDown = this.sourceImgMouseDown,
          scale = this.scale,
          simd = sourceImgMouseDown;
      simd.mX = et.screenX;
      simd.mY = et.screenY;
      simd.x = scale.x;
      simd.y = scale.y;
      simd.on = true;
    },
    // 鼠标按下状态下移动，图片移动
    imgMove: function imgMove(e) {
      e.preventDefault(); // 支持触摸事件，则鼠标事件无效

      if (this.isSupportTouch && !e.targetTouches) {
        return false;
      }

      var et = e.targetTouches ? e.targetTouches[0] : e,
          _this$sourceImgMouseD = this.sourceImgMouseDown,
          on = _this$sourceImgMouseD.on,
          mX = _this$sourceImgMouseD.mX,
          mY = _this$sourceImgMouseD.mY,
          x = _this$sourceImgMouseD.x,
          y = _this$sourceImgMouseD.y,
          scale = this.scale,
          sourceImgMasking = this.sourceImgMasking,
          sim = sourceImgMasking,
          nX = et.screenX,
          nY = et.screenY,
          dX = nX - mX,
          dY = nY - mY,
          rX = x + dX,
          rY = y + dY;
      if (!on) return;

      if (rX > 0) {
        rX = 0;
      }

      if (rY > 0) {
        rY = 0;
      }

      if (rX < sim.width - scale.width) {
        rX = sim.width - scale.width;
      }

      if (rY < sim.height - scale.height) {
        rY = sim.height - scale.height;
      }

      scale.x = rX;
      scale.y = rY;
    },
    // 按钮按下开始向右旋转
    startRotateRight: function startRotateRight(e) {
      var that = this,
          scale = that.scale;
      scale.rotateRight = true;

      function rotate() {
        if (scale.rotateRight) {
          var degree = ++scale.degree;
          that.createImg(degree);
          setTimeout(function () {
            rotate();
          }, 60);
        }
      }

      rotate();
    },
    // 按钮按下开始向右旋转
    startRotateLeft: function startRotateLeft(e) {
      var that = this,
          scale = that.scale;
      scale.rotateLeft = true;

      function rotate() {
        if (scale.rotateLeft) {
          var degree = --scale.degree;
          that.createImg(degree);
          setTimeout(function () {
            rotate();
          }, 60);
        }
      }

      rotate();
    },
    // 停止旋转
    endRotate: function endRotate() {
      var scale = this.scale;
      scale.rotateLeft = false;
      scale.rotateRight = false;
    },
    // 按钮按下开始放大
    startZoomAdd: function startZoomAdd(e) {
      var that = this,
          scale = that.scale;
      scale.zoomAddOn = true;

      function zoom() {
        if (scale.zoomAddOn) {
          var range = scale.range >= 100 ? 100 : ++scale.range;
          that.zoomImg(range);
          setTimeout(function () {
            zoom();
          }, 60);
        }
      }

      zoom();
    },
    // 按钮松开或移开取消放大
    endZoomAdd: function endZoomAdd(e) {
      this.scale.zoomAddOn = false;
    },
    // 按钮按下开始缩小
    startZoomSub: function startZoomSub(e) {
      var that = this,
          scale = that.scale;
      scale.zoomSubOn = true;

      function zoom() {
        if (scale.zoomSubOn) {
          var range = scale.range <= 0 ? 0 : --scale.range;
          that.zoomImg(range);
          setTimeout(function () {
            zoom();
          }, 60);
        }
      }

      zoom();
    },
    // 按钮松开或移开取消缩小
    endZoomSub: function endZoomSub(e) {
      var scale = this.scale;
      scale.zoomSubOn = false;
    },
    zoomChange: function zoomChange(e) {
      this.zoomImg(e.target.value);
    },
    // 缩放原图
    zoomImg: function zoomImg(newRange) {
      var that = this,
          sourceImgMasking = this.sourceImgMasking,
          sourceImgMouseDown = this.sourceImgMouseDown,
          scale = this.scale,
          maxWidth = scale.maxWidth,
          maxHeight = scale.maxHeight,
          minWidth = scale.minWidth,
          minHeight = scale.minHeight,
          width = scale.width,
          height = scale.height,
          x = scale.x,
          y = scale.y,
          range = scale.range,
          sim = sourceImgMasking,
          sWidth = sim.width,
          sHeight = sim.height,
          nWidth = minWidth + (maxWidth - minWidth) * newRange / 100,
          nHeight = minHeight + (maxHeight - minHeight) * newRange / 100,
          nX = sWidth / 2 - nWidth / width * (sWidth / 2 - x),
          nY = sHeight / 2 - nHeight / height * (sHeight / 2 - y); // 判断新坐标是否超过蒙版限制

      if (nX > 0) {
        nX = 0;
      }

      if (nY > 0) {
        nY = 0;
      }

      if (nX < sWidth - nWidth) {
        nX = sWidth - nWidth;
      }

      if (nY < sHeight - nHeight) {
        nY = sHeight - nHeight;
      } // 赋值处理


      scale.x = nX;
      scale.y = nY;
      scale.width = nWidth;
      scale.height = nHeight;
      scale.range = newRange;
      setTimeout(function () {
        if (scale.range == newRange) {
          that.createImg();
        }
      }, 300);
    },
    // 生成需求图片
    createImg: function createImg(e) {
      var that = this,
          mime = that.mime,
          sourceImg = that.sourceImg,
          _that$scale = that.scale,
          x = _that$scale.x,
          y = _that$scale.y,
          width = _that$scale.width,
          height = _that$scale.height,
          degree = _that$scale.degree,
          scale = that.sourceImgMasking.scale;

      if (that.$refs.canvas !== undefined) {
        var canvas = that.$refs.canvas;
        var ctx = canvas.getContext('2d');

        if (e) {
          // 取消鼠标按下移动状态
          that.sourceImgMouseDown.on = false;
        }

        canvas.width = that.width;
        canvas.height = that.height;
        ctx.clearRect(0, 0, that.width, that.height); // 将透明区域设置为白色底边

        ctx.fillStyle = "#fff";
        ctx.fillRect(0, 0, that.width, that.height);
        ctx.translate(that.width * 0.5, that.height * 0.5);
        ctx.rotate(Math.PI * degree / 180);
        ctx.translate(-that.width * 0.5, -that.height * 0.5);
        ctx.drawImage(sourceImg, x / scale, y / scale, width / scale, height / scale);
        that.createImgUrl = canvas.toDataURL(mime);
      }
    },
    prepareUpload: function prepareUpload() {
      var url = this.url,
          createImgUrl = this.createImgUrl,
          field = this.field,
          ki = this.ki;
      this.$emit('crop-success', createImgUrl, field, ki);

      if (typeof url == 'string' && url) {
        this.upload();
      } else {
        this.off();
      }
    },
    // 上传图片
    upload: function upload() {
      var that = this,
          lang = this.lang,
          imgFormat = this.imgFormat,
          mime = this.mime,
          url = this.url,
          params = this.params,
          headers = this.headers,
          field = this.field,
          ki = this.ki,
          createImgUrl = this.createImgUrl,
          fmData = new FormData();
      fmData.append(field, utils_data2blob(createImgUrl, mime), field + '.' + imgFormat); // 添加其他参数

      if (Object(esm_typeof["a" /* default */])(params) == 'object' && params) {
        Object.keys(params).forEach(function (k) {
          fmData.append(k, params[k]);
        });
      } // 监听进度回调


      var uploadProgress = function uploadProgress(event) {
        if (event.lengthComputable) {
          that.progress = 100 * Math.round(event.loaded) / event.total;
        }
      }; // 上传文件


      that.reset();
      that.loading = 1;
      that.setStep(3);
      new Promise(function (resolve, reject) {
        var client = new XMLHttpRequest();
        client.open('POST', url, true);

        client.onreadystatechange = function () {
          if (this.readyState !== 4) {
            return;
          }

          if (this.status === 200 || this.status === 201) {
            resolve(JSON.parse(this.responseText));
          } else {
            reject(this.status);
          }
        };

        client.upload.addEventListener("progress", uploadProgress, false); //监听进度
        // 设置header

        if (Object(esm_typeof["a" /* default */])(headers) == 'object' && headers) {
          Object.keys(headers).forEach(function (k) {
            client.setRequestHeader(k, headers[k]);
          });
        }

        client.send(fmData);
      }).then( // 上传成功
      function (resData) {
        if (that.value) {
          that.loading = 2;
          that.$emit('crop-upload-success', resData, field, ki);
          that.off();
        }
      }, // 上传失败
      function (sts) {
        if (that.value) {
          that.loading = 3;
          that.hasError = true;
          that.errorMsg = lang.fail;
          that.$emit('crop-upload-fail', sts, field, ki);
        }
      });
    }
  },
  mounted: function mounted() {
    var _this4 = this;

    this.$nextTick(function () {
      _this4.initDataImg();
    }, 200);
  },
  created: function created() {
    var _this5 = this;

    // 绑定按键esc隐藏此插件事件
    document.addEventListener('keyup', function (e) {
      if (_this5.value && (e.key == 'Escape' || e.keyCode == 27)) {
        _this5.off();
      }
    });
  }
});
// CONCATENATED MODULE: ./packages/upload-image/src/upload-image.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_upload_imagevue_type_script_lang_js_ = (upload_imagevue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/upload-image/src/upload-image.vue?vue&type=style&index=0&id=2344d3a1&scoped=true&lang=css&
var upload_imagevue_type_style_index_0_id_2344d3a1_scoped_true_lang_css_ = __webpack_require__("b577");

// CONCATENATED MODULE: ./packages/upload-image/src/upload-image.vue






/* normalize component */

var upload_image_component = Object(componentNormalizer["a" /* default */])(
  src_upload_imagevue_type_script_lang_js_,
  upload_imagevue_type_template_id_2344d3a1_scoped_true_render,
  upload_imagevue_type_template_id_2344d3a1_scoped_true_staticRenderFns,
  false,
  null,
  "2344d3a1",
  null
  
)

/* harmony default export */ var upload_image = (upload_image_component.exports);
// CONCATENATED MODULE: ./packages/upload-image/index.js

// 导入组件
 // 为组件提供 install 安装方法，供按需引入

upload_image.install = function (Vue) {
  Vue.component(upload_image.name, upload_image);
}; // 默认导出组件


/* harmony default export */ var packages_upload_image = (upload_image);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/tree.vue?vue&type=template&id=287ee182&
var treevue_type_template_id_287ee182_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"awsui-tree",class:{
  'awsui-tree--highlight-current': _vm.highlightCurrent,
  'is-dragging': !!_vm.dragState.draggingNode,
  'is-drop-not-allow': !_vm.dragState.allowDrop,
  'is-drop-inner': _vm.dragState.dropType === 'inner'
},attrs:{"role":"tree"}},[(_vm.height)?_c('virtual-list',{style:({ height: _vm.height + 'px', 'overflow-y': 'auto' }),attrs:{"data-key":_vm.getNodeKey,"data-sources":_vm.visibleList,"data-component":_vm.itemComponent,"keeps":Math.ceil(_vm.height / 22) + _vm.extraLine,"extra-props":{
    renderAfterExpand: _vm.renderAfterExpand,
    showCheckbox: _vm.showCheckbox,
    renderContent: _vm.renderContent,
    onNodeExpand: _vm.handleNodeExpand
  }}}):_vm._l((_vm.root.childNodes),function(child){return _c('awsui-tree-node',{key:_vm.getNodeKey(child),attrs:{"node":child,"props":_vm.props,"render-after-expand":_vm.renderAfterExpand,"show-checkbox":_vm.showCheckbox,"render-content":_vm.renderContent},on:{"node-expand":_vm.handleNodeExpand}})}),(_vm.isEmpty)?_c('div',{staticClass:"awsui-tree__empty-block"},[_c('span',{staticClass:"awsui-tree__empty-text"},[_vm._v(_vm._s(_vm.emptyText))])]):_vm._e(),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.dragState.showDropIndicator),expression:"dragState.showDropIndicator"}],ref:"dropIndicator",staticClass:"awsui-tree__drop-indicator"})],2)}
var treevue_type_template_id_287ee182_staticRenderFns = []


// CONCATENATED MODULE: ./packages/tree/src/tree.vue?vue&type=template&id=287ee182&

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.every.js
var es_array_every = __webpack_require__("a623");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.reduce.js
var es_array_reduce = __webpack_require__("13d5");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 3 modules
var toConsumableArray = __webpack_require__("2909");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.some.js
var es_array_some = __webpack_require__("45fc");

// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
function _classCallCheck(instance, Constructor) {
  if (!(instance instanceof Constructor)) {
    throw new TypeError("Cannot call a class as a function");
  }
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
function _defineProperties(target, props) {
  for (var i = 0; i < props.length; i++) {
    var descriptor = props[i];
    descriptor.enumerable = descriptor.enumerable || false;
    descriptor.configurable = true;
    if ("value" in descriptor) descriptor.writable = true;
    Object.defineProperty(target, descriptor.key, descriptor);
  }
}

function _createClass(Constructor, protoProps, staticProps) {
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  if (staticProps) _defineProperties(Constructor, staticProps);
  return Constructor;
}
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.splice.js
var es_array_splice = __webpack_require__("a434");

// CONCATENATED MODULE: ./node_modules/element-ui/src/utils/merge.js
/* harmony default export */ var merge = (function (target) {
  for (var i = 1, j = arguments.length; i < j; i++) {
    var source = arguments[i] || {};

    for (var prop in source) {
      if (source.hasOwnProperty(prop)) {
        var value = source[prop];

        if (value !== undefined) {
          target[prop] = value;
        }
      }
    }
  }

  return target;
});
;
// CONCATENATED MODULE: ./packages/tree/src/model/util.js

var NODE_KEY = '$treeNodeId';
var markNodeData = function markNodeData(node, data) {
  if (!data || data[NODE_KEY]) return;
  Object.defineProperty(data, NODE_KEY, {
    value: node.id,
    enumerable: false,
    configurable: false,
    writable: false
  });
};
var util_getNodeKey = function getNodeKey(key, data) {
  if (!key) return data[NODE_KEY];
  return data[key];
};
var findNearestComponent = function findNearestComponent(element, componentName) {
  var target = element;

  while (target && target.tagName !== 'BODY') {
    if (target.__vue__ && target.__vue__.$options.name === componentName) {
      return target.__vue__;
    }

    target = target.parentNode;
  }

  return null;
};
// CONCATENATED MODULE: ./packages/tree/src/model/node.js











var getChildState = function getChildState(node) {
  var all = true;
  var none = true;
  var allWithoutDisable = true;

  for (var i = 0, j = node.length; i < j; i++) {
    var n = node[i];

    if (n.checked !== true || n.indeterminate) {
      all = false;

      if (!n.disabled) {
        allWithoutDisable = false;
      }
    }

    if (n.checked !== false || n.indeterminate) {
      none = false;
    }
  }

  return {
    all: all,
    none: none,
    allWithoutDisable: allWithoutDisable,
    half: !all && !none
  };
};

var reInitChecked = function reInitChecked(node) {
  if (node.childNodes.length === 0) return;

  var _getChildState = getChildState(node.childNodes),
      all = _getChildState.all,
      none = _getChildState.none,
      half = _getChildState.half;

  if (all) {
    node.checked = true;
    node.indeterminate = false;
  } else if (half) {
    node.checked = false;
    node.indeterminate = true;
  } else if (none) {
    node.checked = false;
    node.indeterminate = false;
  }

  var parent = node.parent;
  if (!parent || parent.level === 0) return;

  if (!node.store.checkStrictly) {
    reInitChecked(parent);
  }
};

var getPropertyFromData = function getPropertyFromData(node, prop) {
  var props = node.store.props;
  var data = node.data || {};
  var config = props[prop];

  if (typeof config === 'function') {
    return config(data, node);
  } else if (typeof config === 'string') {
    return data[config];
  } else if (typeof config === 'undefined') {
    var dataProp = data[prop];
    return dataProp === undefined ? '' : dataProp;
  }
};

var nodeIdSeed = 0;

var node_Node = /*#__PURE__*/function () {
  function Node(options) {
    _classCallCheck(this, Node);

    this.id = nodeIdSeed++;
    this.text = null;
    this.checked = false;
    this.indeterminate = false;
    this.data = null;
    this.expanded = false;
    this.parent = null;
    this.visible = true;
    this.isCurrent = false;

    for (var name in options) {
      if (options.hasOwnProperty(name)) {
        this[name] = options[name];
      }
    } // internal


    this.level = 0;
    this.loaded = false;
    this.childNodes = [];
    this.loading = false;

    if (this.parent) {
      this.level = this.parent.level + 1;
    }

    var store = this.store;

    if (!store) {
      throw new Error('[Node]store is required!');
    }

    store.registerNode(this);
    var props = store.props;

    if (props && typeof props.isLeaf !== 'undefined') {
      var isLeaf = getPropertyFromData(this, 'isLeaf');

      if (typeof isLeaf === 'boolean') {
        this.isLeafByUser = isLeaf;
      }
    }

    if (store.lazy !== true && this.data) {
      this.setData(this.data);

      if (store.defaultExpandAll) {
        this.expanded = true;
      }
    } else if (this.level > 0 && store.lazy && store.defaultExpandAll) {
      this.expand();
    }

    if (!Array.isArray(this.data)) {
      markNodeData(this, this.data);
    }

    if (!this.data) return;
    var defaultExpandedKeys = store.defaultExpandedKeys;
    var key = store.key;

    if (key && defaultExpandedKeys && defaultExpandedKeys.indexOf(this.key) !== -1) {
      this.expand(null, store.autoExpandParent);
    }

    if (key && store.currentNodeKey !== undefined && this.key === store.currentNodeKey) {
      store.currentNode = this;
      store.currentNode.isCurrent = true;
    }

    if (store.lazy) {
      store._initDefaultCheckedNode(this);
    }

    this.updateLeafState();
  }

  _createClass(Node, [{
    key: "setData",
    value: function setData(data) {
      if (!Array.isArray(data)) {
        markNodeData(this, data);
      }

      this.data = data;
      this.childNodes = [];
      var children;

      if (this.level === 0 && this.data instanceof Array) {
        children = this.data;
      } else {
        children = getPropertyFromData(this, 'children') || [];
      }

      for (var i = 0, j = children.length; i < j; i++) {
        this.insertChild({
          data: children[i]
        });
      }
    }
  }, {
    key: "contains",
    value: function contains(target) {
      var deep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;

      var walk = function walk(parent) {
        var children = parent.childNodes || [];
        var result = false;

        for (var i = 0, j = children.length; i < j; i++) {
          var child = children[i];

          if (child === target || deep && walk(child)) {
            result = true;
            break;
          }
        }

        return result;
      };

      return walk(this);
    }
  }, {
    key: "remove",
    value: function remove() {
      var parent = this.parent;

      if (parent) {
        parent.removeChild(this);
      }
    }
  }, {
    key: "insertChild",
    value: function insertChild(child, index, batch) {
      if (!child) throw new Error('insertChild error: child is required.');

      if (!(child instanceof Node)) {
        if (!batch) {
          var children = this.getChildren(true);

          if (children.indexOf(child.data) === -1) {
            if (typeof index === 'undefined' || index < 0) {
              children.push(child.data);
            } else {
              children.splice(index, 0, child.data);
            }
          }
        }

        merge(child, {
          parent: this,
          store: this.store
        });
        child = new Node(child);
      }

      child.level = this.level + 1;

      if (typeof index === 'undefined' || index < 0) {
        this.childNodes.push(child);
      } else {
        this.childNodes.splice(index, 0, child);
      }

      this.updateLeafState();
    }
  }, {
    key: "insertBefore",
    value: function insertBefore(child, ref) {
      var index;

      if (ref) {
        index = this.childNodes.indexOf(ref);
      }

      this.insertChild(child, index);
    }
  }, {
    key: "insertAfter",
    value: function insertAfter(child, ref) {
      var index;

      if (ref) {
        index = this.childNodes.indexOf(ref);
        if (index !== -1) index += 1;
      }

      this.insertChild(child, index);
    }
  }, {
    key: "removeChild",
    value: function removeChild(child) {
      var children = this.getChildren() || [];
      var dataIndex = children.indexOf(child.data);

      if (dataIndex > -1) {
        children.splice(dataIndex, 1);
      }

      var index = this.childNodes.indexOf(child);

      if (index > -1) {
        this.store && this.store.deregisterNode(child);
        child.parent = null;
        this.childNodes.splice(index, 1);
      }

      this.updateLeafState();
    }
  }, {
    key: "removeChildByData",
    value: function removeChildByData(data) {
      var targetNode = null;

      for (var i = 0; i < this.childNodes.length; i++) {
        if (this.childNodes[i].data === data) {
          targetNode = this.childNodes[i];
          break;
        }
      }

      if (targetNode) {
        this.removeChild(targetNode);
      }
    }
  }, {
    key: "expand",
    value: function expand(callback, expandParent) {
      var _this = this;

      var done = function done() {
        if (expandParent) {
          var parent = _this.parent;

          while (parent.level > 0) {
            parent.expanded = true;
            parent = parent.parent;
          }
        }

        _this.expanded = true;
        if (callback) callback();
      };

      if (this.shouldLoadData()) {
        this.loadData(function (data) {
          if (data instanceof Array) {
            if (_this.checked) {
              _this.setChecked(true, true);
            } else if (!_this.store.checkStrictly) {
              reInitChecked(_this);
            }

            done();
          }
        });
      } else {
        done();
      }
    }
  }, {
    key: "doCreateChildren",
    value: function doCreateChildren(array) {
      var _this2 = this;

      var defaultProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      array.forEach(function (item) {
        _this2.insertChild(merge({
          data: item
        }, defaultProps), undefined, true);
      });
    }
  }, {
    key: "collapse",
    value: function collapse() {
      this.expanded = false;
    }
  }, {
    key: "shouldLoadData",
    value: function shouldLoadData() {
      return this.store.lazy === true && this.store.load && !this.loaded;
    }
  }, {
    key: "updateLeafState",
    value: function updateLeafState() {
      if (this.store.lazy === true && this.loaded !== true && typeof this.isLeafByUser !== 'undefined') {
        this.isLeaf = this.isLeafByUser;
        return;
      }

      var childNodes = this.childNodes;

      if (!this.store.lazy || this.store.lazy === true && this.loaded === true) {
        this.isLeaf = !childNodes || childNodes.length === 0;
        return;
      }

      this.isLeaf = false;
    }
  }, {
    key: "setChecked",
    value: function setChecked(value, deep, recursion, passValue) {
      var _this3 = this;

      this.indeterminate = value === 'half';
      this.checked = value === true;
      if (this.store.checkStrictly) return;

      if (!(this.shouldLoadData() && !this.store.checkDescendants)) {
        var _getChildState2 = getChildState(this.childNodes),
            all = _getChildState2.all,
            allWithoutDisable = _getChildState2.allWithoutDisable;

        if (!this.isLeaf && !all && allWithoutDisable) {
          this.checked = false;
          value = false;
        }

        var handleDescendants = function handleDescendants() {
          if (deep) {
            var childNodes = _this3.childNodes;

            for (var i = 0, j = childNodes.length; i < j; i++) {
              var child = childNodes[i];
              passValue = passValue || value !== false;
              var isCheck = child.disabled ? child.checked : passValue;
              child.setChecked(isCheck, deep, true, passValue);
            }

            var _getChildState3 = getChildState(childNodes),
                half = _getChildState3.half,
                _all = _getChildState3.all;

            if (!_all) {
              _this3.checked = _all;
              _this3.indeterminate = half;
            }
          }
        };

        if (this.shouldLoadData()) {
          // Only work on lazy load data.
          this.loadData(function () {
            handleDescendants();
            reInitChecked(_this3);
          }, {
            checked: value !== false
          });
          return;
        } else {
          handleDescendants();
        }
      }

      var parent = this.parent;
      if (!parent || parent.level === 0) return;

      if (!recursion) {
        reInitChecked(parent);
      }
    }
  }, {
    key: "getChildren",
    value: function getChildren() {
      var forceInit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
      // this is data
      if (this.level === 0) return this.data;
      var data = this.data;
      if (!data) return null;
      var props = this.store.props;
      var children = 'children';

      if (props) {
        children = props.children || 'children';
      }

      if (data[children] === undefined) {
        data[children] = null;
      }

      if (forceInit && !data[children]) {
        data[children] = [];
      }

      return data[children];
    }
  }, {
    key: "updateChildren",
    value: function updateChildren() {
      var _this4 = this;

      var newData = this.getChildren() || [];
      var oldData = this.childNodes.map(function (node) {
        return node.data;
      });
      var newDataMap = {};
      var newNodes = [];
      newData.forEach(function (item, index) {
        var key = item[NODE_KEY];
        var isNodeExists = !!key && arrayFindIndex(oldData, function (data) {
          return data[NODE_KEY] === key;
        }) >= 0;

        if (isNodeExists) {
          newDataMap[key] = {
            index: index,
            data: item
          };
        } else {
          newNodes.push({
            index: index,
            data: item
          });
        }
      });

      if (!this.store.lazy) {
        oldData.forEach(function (item) {
          if (!newDataMap[item[NODE_KEY]]) _this4.removeChildByData(item);
        });
      }

      newNodes.forEach(function (_ref) {
        var index = _ref.index,
            data = _ref.data;

        _this4.insertChild({
          data: data
        }, index);
      });
      this.updateLeafState();
    }
  }, {
    key: "loadData",
    value: function loadData(callback) {
      var _this5 = this;

      var defaultProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

      if (this.store.lazy === true && this.store.load && !this.loaded && (!this.loading || Object.keys(defaultProps).length)) {
        this.loading = true;

        var resolve = function resolve(children) {
          _this5.loaded = true;
          _this5.loading = false;
          _this5.childNodes = [];

          _this5.doCreateChildren(children, defaultProps);

          _this5.updateLeafState();

          if (callback) {
            callback.call(_this5, children);
          }
        };

        this.store.load(this, resolve);
      } else {
        if (callback) {
          callback.call(this);
        }
      }
    }
  }, {
    key: "label",
    get: function get() {
      return getPropertyFromData(this, 'label');
    }
  }, {
    key: "key",
    get: function get() {
      var nodeKey = this.store.key;
      if (this.data) return this.data[nodeKey];
      return null;
    }
  }, {
    key: "disabled",
    get: function get() {
      return getPropertyFromData(this, 'disabled');
    }
  }, {
    key: "nextSibling",
    get: function get() {
      var parent = this.parent;

      if (parent) {
        var index = parent.childNodes.indexOf(this);

        if (index > -1) {
          return parent.childNodes[index + 1];
        }
      }

      return null;
    }
  }, {
    key: "previousSibling",
    get: function get() {
      var parent = this.parent;

      if (parent) {
        var index = parent.childNodes.indexOf(this);

        if (index > -1) {
          return index > 0 ? parent.childNodes[index - 1] : null;
        }
      }

      return null;
    }
  }]);

  return Node;
}();


// CONCATENATED MODULE: ./packages/tree/src/model/tree-store.js














var tree_store_TreeStore = /*#__PURE__*/function () {
  function TreeStore(options) {
    var _this = this;

    _classCallCheck(this, TreeStore);

    this.currentNode = null;
    this.currentNodeKey = null;

    for (var option in options) {
      if (options.hasOwnProperty(option)) {
        this[option] = options[option];
      }
    }

    this.nodesMap = {};
    this.root = new node_Node({
      data: this.data,
      store: this
    });

    if (this.lazy && this.load) {
      var loadFn = this.load;
      loadFn(this.root, function (data) {
        _this.root.doCreateChildren(data);

        _this._initDefaultCheckedNodes();
      });
    } else {
      this._initDefaultCheckedNodes();
    }
  }

  _createClass(TreeStore, [{
    key: "filter",
    value: function filter(value) {
      var filterNodeMethod = this.filterNodeMethod;
      var lazy = this.lazy;

      var traverse = function traverse(node) {
        var childNodes = node.root ? node.root.childNodes : node.childNodes;
        childNodes.forEach(function (child) {
          child.visible = filterNodeMethod.call(child, value, child.data, child);
          traverse(child);
        });

        if (!node.visible && childNodes.length) {
          var allHidden = true;
          allHidden = !childNodes.some(function (child) {
            return child.visible;
          });

          if (node.root) {
            node.root.visible = allHidden === false;
          } else {
            node.visible = allHidden === false;
          }
        }

        if (!value) return;
        if (node.visible && !node.isLeaf && !lazy) node.expand();
      };

      traverse(this);
    }
  }, {
    key: "setData",
    value: function setData(newVal) {
      var instanceChanged = newVal !== this.root.data;

      if (instanceChanged) {
        this.root.setData(newVal);

        this._initDefaultCheckedNodes();
      } else {
        this.root.updateChildren();
      }
    }
  }, {
    key: "getNode",
    value: function getNode(data) {
      if (data instanceof node_Node) return data;
      var key = Object(esm_typeof["a" /* default */])(data) !== 'object' ? data : util_getNodeKey(this.key, data);
      return this.nodesMap[key] || null;
    }
  }, {
    key: "insertBefore",
    value: function insertBefore(data, refData) {
      var refNode = this.getNode(refData);
      refNode.parent.insertBefore({
        data: data
      }, refNode);
    }
  }, {
    key: "insertAfter",
    value: function insertAfter(data, refData) {
      var refNode = this.getNode(refData);
      refNode.parent.insertAfter({
        data: data
      }, refNode);
    }
  }, {
    key: "remove",
    value: function remove(data) {
      var node = this.getNode(data);

      if (node && node.parent) {
        if (node === this.currentNode) {
          this.currentNode = null;
        }

        node.parent.removeChild(node);
      }
    }
  }, {
    key: "append",
    value: function append(data, parentData) {
      var parentNode = parentData ? this.getNode(parentData) : this.root;

      if (parentNode) {
        parentNode.insertChild({
          data: data
        });
      }
    }
  }, {
    key: "_initDefaultCheckedNodes",
    value: function _initDefaultCheckedNodes() {
      var _this2 = this;

      var defaultCheckedKeys = this.defaultCheckedKeys || [];
      var nodesMap = this.nodesMap;
      defaultCheckedKeys.forEach(function (checkedKey) {
        var node = nodesMap[checkedKey];

        if (node) {
          node.setChecked(true, !_this2.checkStrictly);
        }
      });
    }
  }, {
    key: "_initDefaultCheckedNode",
    value: function _initDefaultCheckedNode(node) {
      var defaultCheckedKeys = this.defaultCheckedKeys || [];

      if (defaultCheckedKeys.indexOf(node.key) !== -1) {
        node.setChecked(true, !this.checkStrictly);
      }
    }
  }, {
    key: "setDefaultCheckedKey",
    value: function setDefaultCheckedKey(newVal) {
      if (newVal !== this.defaultCheckedKeys) {
        this.defaultCheckedKeys = newVal;

        this._initDefaultCheckedNodes();
      }
    }
  }, {
    key: "registerNode",
    value: function registerNode(node) {
      var key = this.key;
      if (!key || !node || !node.data) return;
      var nodeKey = node.key;
      if (nodeKey !== undefined) this.nodesMap[node.key] = node;
    }
  }, {
    key: "deregisterNode",
    value: function deregisterNode(node) {
      var _this3 = this;

      var key = this.key;
      if (!key || !node || !node.data) return;
      node.childNodes.forEach(function (child) {
        _this3.deregisterNode(child);
      });
      delete this.nodesMap[node.key];
    }
  }, {
    key: "getCheckedNodes",
    value: function getCheckedNodes() {
      var leafOnly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
      var includeHalfChecked = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
      var checkedNodes = [];

      var traverse = function traverse(node) {
        var childNodes = node.root ? node.root.childNodes : node.childNodes;
        childNodes.forEach(function (child) {
          if ((child.checked || includeHalfChecked && child.indeterminate) && (!leafOnly || leafOnly && child.isLeaf)) {
            checkedNodes.push(child.data);
          }

          traverse(child);
        });
      };

      traverse(this);
      return checkedNodes;
    }
  }, {
    key: "getCheckedKeys",
    value: function getCheckedKeys() {
      var _this4 = this;

      var leafOnly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
      return this.getCheckedNodes(leafOnly).map(function (data) {
        return (data || {})[_this4.key];
      });
    }
  }, {
    key: "getHalfCheckedNodes",
    value: function getHalfCheckedNodes() {
      var nodes = [];

      var traverse = function traverse(node) {
        var childNodes = node.root ? node.root.childNodes : node.childNodes;
        childNodes.forEach(function (child) {
          if (child.indeterminate) {
            nodes.push(child.data);
          }

          traverse(child);
        });
      };

      traverse(this);
      return nodes;
    }
  }, {
    key: "getHalfCheckedKeys",
    value: function getHalfCheckedKeys() {
      var _this5 = this;

      return this.getHalfCheckedNodes().map(function (data) {
        return (data || {})[_this5.key];
      });
    }
  }, {
    key: "_getAllNodes",
    value: function _getAllNodes() {
      var allNodes = [];
      var nodesMap = this.nodesMap;

      for (var nodeKey in nodesMap) {
        if (nodesMap.hasOwnProperty(nodeKey)) {
          allNodes.push(nodesMap[nodeKey]);
        }
      }

      return allNodes;
    }
  }, {
    key: "updateChildren",
    value: function updateChildren(key, data) {
      var node = this.nodesMap[key];
      if (!node) return;
      var childNodes = node.childNodes;

      for (var i = childNodes.length - 1; i >= 0; i--) {
        var child = childNodes[i];
        this.remove(child.data);
      }

      for (var _i = 0, j = data.length; _i < j; _i++) {
        var _child = data[_i];
        this.append(_child, node.data);
      }
    }
  }, {
    key: "_setCheckedKeys",
    value: function _setCheckedKeys(key) {
      var leafOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
      var checkedKeys = arguments.length > 2 ? arguments[2] : undefined;

      var allNodes = this._getAllNodes().sort(function (a, b) {
        return b.level - a.level;
      });

      var cache = Object.create(null);
      var keys = Object.keys(checkedKeys);
      allNodes.forEach(function (node) {
        return node.setChecked(false, false);
      });

      for (var i = 0, j = allNodes.length; i < j; i++) {
        var node = allNodes[i];
        var nodeKey = node.data[key].toString();
        var checked = keys.indexOf(nodeKey) > -1;

        if (!checked) {
          if (node.checked && !cache[nodeKey]) {
            node.setChecked(false, false);
          }

          continue;
        }

        var parent = node.parent;

        while (parent && parent.level > 0) {
          cache[parent.data[key]] = true;
          parent = parent.parent;
        }

        if (node.isLeaf || this.checkStrictly) {
          node.setChecked(true, false);
          continue;
        }

        node.setChecked(true, true);

        if (leafOnly) {
          (function () {
            node.setChecked(false, false);

            var traverse = function traverse(node) {
              var childNodes = node.childNodes;
              childNodes.forEach(function (child) {
                if (!child.isLeaf) {
                  child.setChecked(false, false);
                }

                traverse(child);
              });
            };

            traverse(node);
          })();
        }
      }
    }
  }, {
    key: "setCheckedNodes",
    value: function setCheckedNodes(array) {
      var leafOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
      var key = this.key;
      var checkedKeys = {};
      array.forEach(function (item) {
        checkedKeys[(item || {})[key]] = true;
      });

      this._setCheckedKeys(key, leafOnly, checkedKeys);
    }
  }, {
    key: "setCheckedKeys",
    value: function setCheckedKeys(keys) {
      var leafOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
      this.defaultCheckedKeys = keys;
      var key = this.key;
      var checkedKeys = {};
      keys.forEach(function (key) {
        checkedKeys[key] = true;
      });

      this._setCheckedKeys(key, leafOnly, checkedKeys);
    }
  }, {
    key: "setDefaultExpandedKeys",
    value: function setDefaultExpandedKeys(keys) {
      var _this6 = this;

      keys = keys || [];
      this.defaultExpandedKeys = keys;
      keys.forEach(function (key) {
        var node = _this6.getNode(key);

        if (node) node.expand(null, _this6.autoExpandParent);
      });
    }
  }, {
    key: "setChecked",
    value: function setChecked(data, checked, deep) {
      var node = this.getNode(data);

      if (node) {
        node.setChecked(!!checked, deep);
      }
    }
  }, {
    key: "getCurrentNode",
    value: function getCurrentNode() {
      return this.currentNode;
    }
  }, {
    key: "setCurrentNode",
    value: function setCurrentNode(currentNode) {
      var prevCurrentNode = this.currentNode;

      if (prevCurrentNode) {
        prevCurrentNode.isCurrent = false;
      }

      this.currentNode = currentNode;
      this.currentNode.isCurrent = true;
    }
  }, {
    key: "setUserCurrentNode",
    value: function setUserCurrentNode(node) {
      var key = node[this.key];
      var currNode = this.nodesMap[key];
      this.setCurrentNode(currNode);
    }
  }, {
    key: "setCurrentNodeKey",
    value: function setCurrentNodeKey(key) {
      if (key === null || key === undefined) {
        this.currentNode && (this.currentNode.isCurrent = false);
        this.currentNode = null;
        return;
      }

      var node = this.getNode(key);

      if (node) {
        this.setCurrentNode(node);
      }
    }
  }]);

  return TreeStore;
}();


;
// EXTERNAL MODULE: ./node_modules/vue-virtual-scroll-list/dist/index.js
var dist = __webpack_require__("89c1");
var dist_default = /*#__PURE__*/__webpack_require__.n(dist);

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/tree-node.vue?vue&type=template&id=45c041e2&
var tree_nodevue_type_template_id_45c041e2_render = function () {
var this$1 = this;
var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.node.visible),expression:"node.visible"}],ref:"node",staticClass:"awsui-tree-node",class:{
  'is-expanded': _vm.expanded,
  'is-current': _vm.node.isCurrent,
  'is-hidden': !_vm.node.visible,
  'is-focusable': !_vm.node.disabled,
  'is-checked': !_vm.node.disabled && _vm.node.checked
},attrs:{"role":"treeitem","tabindex":"-1","aria-expanded":_vm.expanded,"aria-disabled":_vm.node.disabled,"aria-checked":_vm.node.checked,"draggable":_vm.tree.draggable},on:{"click":function($event){$event.stopPropagation();return _vm.handleClick($event)},"contextmenu":function ($event) { return this$1.handleContextMenu($event); },"dragstart":function($event){$event.stopPropagation();return _vm.handleDragStart($event)},"dragover":function($event){$event.stopPropagation();return _vm.handleDragOver($event)},"dragend":function($event){$event.stopPropagation();return _vm.handleDragEnd($event)},"drop":function($event){$event.stopPropagation();return _vm.handleDrop($event)}}},[_c('div',{staticClass:"awsui-tree-node__content",style:({ 'padding-left': (_vm.node.level - 1) * _vm.tree.indent + 'px' })},[_c('span',{class:[
      { 'is-leaf': _vm.node.isLeaf, expanded: !_vm.node.isLeaf && _vm.expanded },
      'awsui-tree-node__expand-icon awsui-iconfont',
      _vm.tree.iconClass ? _vm.tree.iconClass : ''
    ],domProps:{"innerHTML":_vm._s(_vm.tree.icon ? _vm.tree.icon : '&#xe606;')},on:{"click":function($event){$event.stopPropagation();return _vm.handleExpandIconClick($event)}}}),(_vm.showCheckbox)?_c('awsui-checkbox',{attrs:{"indeterminate":_vm.node.indeterminate,"disabled":!!_vm.node.disabled},on:{"change":_vm.handleCheckChange},nativeOn:{"click":function($event){$event.stopPropagation();}},model:{value:(_vm.node.checked),callback:function ($$v) {_vm.$set(_vm.node, "checked", $$v)},expression:"node.checked"}}):_vm._e(),(_vm.node.loading)?_c('span',{staticClass:"awsui-tree-node__loading-icon el-icon-loading"}):_vm._e(),_c('node-content',{attrs:{"node":_vm.node}})],1),_c('awsui-collapse-transition',[(!_vm.renderAfterExpand || _vm.childNodeRendered)?_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.expanded),expression:"expanded"}],staticClass:"awsui-tree-node__children",attrs:{"role":"group","aria-expanded":_vm.expanded}},_vm._l((_vm.node.childNodes),function(child){return _c('awsui-tree-node',{key:_vm.getNodeKey(child),attrs:{"render-content":_vm.renderContent,"render-after-expand":_vm.renderAfterExpand,"show-checkbox":_vm.showCheckbox,"node":child},on:{"node-expand":_vm.handleChildNodeExpand}})}),1):_vm._e()])],1)}
var tree_nodevue_type_template_id_45c041e2_staticRenderFns = []


// CONCATENATED MODULE: ./packages/tree/src/tree-node.vue?vue&type=template&id=45c041e2&

// CONCATENATED MODULE: ./node_modules/element-ui/src/utils/dom.js











/* istanbul ignore next */

var isServer = external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer;
var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
var MOZ_HACK_REGEXP = /^moz([A-Z])/;
var ieVersion = isServer ? 0 : Number(document.documentMode);
/* istanbul ignore next */

var trim = function trim(string) {
  return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
};
/* istanbul ignore next */


var camelCase = function camelCase(name) {
  return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
    return offset ? letter.toUpperCase() : letter;
  }).replace(MOZ_HACK_REGEXP, 'Moz$1');
};
/* istanbul ignore next */


var on = function () {
  if (!isServer && document.addEventListener) {
    return function (element, event, handler) {
      if (element && event && handler) {
        element.addEventListener(event, handler, false);
      }
    };
  } else {
    return function (element, event, handler) {
      if (element && event && handler) {
        element.attachEvent('on' + event, handler);
      }
    };
  }
}();
/* istanbul ignore next */

var off = function () {
  if (!isServer && document.removeEventListener) {
    return function (element, event, handler) {
      if (element && event) {
        element.removeEventListener(event, handler, false);
      }
    };
  } else {
    return function (element, event, handler) {
      if (element && event) {
        element.detachEvent('on' + event, handler);
      }
    };
  }
}();
/* istanbul ignore next */

var once = function once(el, event, fn) {
  var listener = function listener() {
    if (fn) {
      fn.apply(this, arguments);
    }

    off(el, event, listener);
  };

  on(el, event, listener);
};
/* istanbul ignore next */

function hasClass(el, cls) {
  if (!el || !cls) return false;
  if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');

  if (el.classList) {
    return el.classList.contains(cls);
  } else {
    return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
  }
}
;
/* istanbul ignore next */

function addClass(el, cls) {
  if (!el) return;
  var curClass = el.className;
  var classes = (cls || '').split(' ');

  for (var i = 0, j = classes.length; i < j; i++) {
    var clsName = classes[i];
    if (!clsName) continue;

    if (el.classList) {
      el.classList.add(clsName);
    } else if (!hasClass(el, clsName)) {
      curClass += ' ' + clsName;
    }
  }

  if (!el.classList) {
    el.className = curClass;
  }
}
;
/* istanbul ignore next */

function removeClass(el, cls) {
  if (!el || !cls) return;
  var classes = cls.split(' ');
  var curClass = ' ' + el.className + ' ';

  for (var i = 0, j = classes.length; i < j; i++) {
    var clsName = classes[i];
    if (!clsName) continue;

    if (el.classList) {
      el.classList.remove(clsName);
    } else if (hasClass(el, clsName)) {
      curClass = curClass.replace(' ' + clsName + ' ', ' ');
    }
  }

  if (!el.classList) {
    el.className = trim(curClass);
  }
}
;
/* istanbul ignore next */

var getStyle = ieVersion < 9 ? function (element, styleName) {
  if (isServer) return;
  if (!element || !styleName) return null;
  styleName = camelCase(styleName);

  if (styleName === 'float') {
    styleName = 'styleFloat';
  }

  try {
    switch (styleName) {
      case 'opacity':
        try {
          return element.filters.item('alpha').opacity / 100;
        } catch (e) {
          return 1.0;
        }

      default:
        return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
    }
  } catch (e) {
    return element.style[styleName];
  }
} : function (element, styleName) {
  if (isServer) return;
  if (!element || !styleName) return null;
  styleName = camelCase(styleName);

  if (styleName === 'float') {
    styleName = 'cssFloat';
  }

  try {
    var computed = document.defaultView.getComputedStyle(element, '');
    return element.style[styleName] || computed ? computed[styleName] : null;
  } catch (e) {
    return element.style[styleName];
  }
};
/* istanbul ignore next */

function setStyle(element, styleName, value) {
  if (!element || !styleName) return;

  if (Object(esm_typeof["a" /* default */])(styleName) === 'object') {
    for (var prop in styleName) {
      if (styleName.hasOwnProperty(prop)) {
        setStyle(element, prop, styleName[prop]);
      }
    }
  } else {
    styleName = camelCase(styleName);

    if (styleName === 'opacity' && ieVersion < 9) {
      element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
    } else {
      element.style[styleName] = value;
    }
  }
}
;
var isScroll = function isScroll(el, vertical) {
  if (isServer) return;
  var determinedDirection = vertical !== null || vertical !== undefined;
  var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
  return overflow.match(/(scroll|auto)/);
};
var getScrollContainer = function getScrollContainer(el, vertical) {
  if (isServer) return;
  var parent = el;

  while (parent) {
    if ([window, document, document.documentElement].includes(parent)) {
      return window;
    }

    if (isScroll(parent, vertical)) {
      return parent;
    }

    parent = parent.parentNode;
  }

  return parent;
};
var isInContainer = function isInContainer(el, container) {
  if (isServer || !el || !container) return false;
  var elRect = el.getBoundingClientRect();
  var containerRect;

  if ([window, document, document.documentElement, null, undefined].includes(container)) {
    containerRect = {
      top: 0,
      right: window.innerWidth,
      bottom: window.innerHeight,
      left: 0
    };
  } else {
    containerRect = container.getBoundingClientRect();
  }

  return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
};
// CONCATENATED MODULE: ./node_modules/element-ui/src/transitions/collapse-transition.js




var collapse_transition_Transition = /*#__PURE__*/function () {
  function Transition() {
    _classCallCheck(this, Transition);
  }

  _createClass(Transition, [{
    key: "beforeEnter",
    value: function beforeEnter(el) {
      addClass(el, 'collapse-transition');
      if (!el.dataset) el.dataset = {};
      el.dataset.oldPaddingTop = el.style.paddingTop;
      el.dataset.oldPaddingBottom = el.style.paddingBottom;
      el.style.height = '0';
      el.style.paddingTop = 0;
      el.style.paddingBottom = 0;
    }
  }, {
    key: "enter",
    value: function enter(el) {
      el.dataset.oldOverflow = el.style.overflow;

      if (el.scrollHeight !== 0) {
        el.style.height = el.scrollHeight + 'px';
        el.style.paddingTop = el.dataset.oldPaddingTop;
        el.style.paddingBottom = el.dataset.oldPaddingBottom;
      } else {
        el.style.height = '';
        el.style.paddingTop = el.dataset.oldPaddingTop;
        el.style.paddingBottom = el.dataset.oldPaddingBottom;
      }

      el.style.overflow = 'hidden';
    }
  }, {
    key: "afterEnter",
    value: function afterEnter(el) {
      // for safari: remove class then reset height is necessary
      removeClass(el, 'collapse-transition');
      el.style.height = '';
      el.style.overflow = el.dataset.oldOverflow;
    }
  }, {
    key: "beforeLeave",
    value: function beforeLeave(el) {
      if (!el.dataset) el.dataset = {};
      el.dataset.oldPaddingTop = el.style.paddingTop;
      el.dataset.oldPaddingBottom = el.style.paddingBottom;
      el.dataset.oldOverflow = el.style.overflow;
      el.style.height = el.scrollHeight + 'px';
      el.style.overflow = 'hidden';
    }
  }, {
    key: "leave",
    value: function leave(el) {
      if (el.scrollHeight !== 0) {
        // for safari: add class after set height, or it will jump to zero height suddenly, weired
        addClass(el, 'collapse-transition');
        el.style.height = 0;
        el.style.paddingTop = 0;
        el.style.paddingBottom = 0;
      }
    }
  }, {
    key: "afterLeave",
    value: function afterLeave(el) {
      removeClass(el, 'collapse-transition');
      el.style.height = '';
      el.style.overflow = el.dataset.oldOverflow;
      el.style.paddingTop = el.dataset.oldPaddingTop;
      el.style.paddingBottom = el.dataset.oldPaddingBottom;
    }
  }]);

  return Transition;
}();

/* harmony default export */ var collapse_transition = ({
  name: 'ElCollapseTransition',
  functional: true,
  render: function render(h, _ref) {
    var children = _ref.children;
    var data = {
      on: new collapse_transition_Transition()
    };
    return h('transition', data, children);
  }
});
// CONCATENATED MODULE: ./packages/tree/src/mixin/node.js


/* harmony default export */ var mixin_node = ({
  methods: {
    creator: function creator(parent, nodeTag) {
      var node = this[nodeTag];

      if (parent.isTree) {
        this.tree = parent;
      } else {
        this.tree = parent.tree;
      }

      var tree = this.tree;

      if (!tree) {
        console.warn('Can not find node\'s tree.');
      }

      var props = tree.props || {};
      var childrenKey = props['children'] || 'children';
      this.$watch("".concat(nodeTag, ".data.").concat(childrenKey), function () {
        node.updateChildren();
      });

      if (node.expanded) {
        this.expanded = true;
        this.childNodeRendered = true;
      }

      if (this.tree.accordion) {
        this.$on('tree-node-expand', function (currentNode) {
          if (node !== currentNode) {
            node.collapse();
          }
        });
      }
    },
    getNodeKey: function getNodeKey(node) {
      return util_getNodeKey(this.tree.nodeKey, node.data);
    },
    handleSelectChange: function handleSelectChange(checked, indeterminate) {
      var node = this.node || this.source;

      if (this.oldChecked !== checked && this.oldIndeterminate !== indeterminate) {
        this.tree.$emit('check-change', node.data, checked, indeterminate);
      }

      this.oldChecked = checked;
      this.indeterminate = indeterminate;
    },
    handleClick: function handleClick() {
      var node = this.node || this.source;
      var store = this.tree.store;
      store.setCurrentNode(node);
      this.tree.$emit('current-change', store.currentNode ? store.currentNode.data : null, store.currentNode);
      this.tree.currentNode = this;

      if (this.tree.expandOnClickNode) {
        this.handleExpandIconClick();
      }

      if (this.tree.checkOnClickNode && !node.disabled) {
        this.handleCheckChange(null, {
          target: {
            checked: !node.checked
          }
        });
      }

      this.tree.$emit('node-click', node.data, node, this);
    },
    handleContextMenu: function handleContextMenu(event) {
      var node = this.node || this.source;

      if (this.tree._events['node-contextmenu'] && this.tree._events['node-contextmenu'].length > 0) {
        event.stopPropagation();
        event.preventDefault();
      }

      this.tree.$emit('node-contextmenu', event, node.data, node, this);
    },
    handleExpandIconClick: function handleExpandIconClick() {
      var node = this.node || this.source;
      if (node.isLeaf) return;

      if (this.expanded) {
        this.tree.$emit('node-collapse', node.data, node, this);
        node.collapse();
      } else {
        node.expand();
        this.$emit('node-expand', node.data, node, this);
      }
    },
    handleCheckChange: function handleCheckChange(_, ev) {
      var _this = this;

      var node = this.node || this.source;
      node.setChecked(ev.target.checked, !this.tree.checkStrictly);
      this.$nextTick(function () {
        var store = _this.tree.store;

        _this.tree.$emit('check', node.data, {
          checkedNodes: store.getCheckedNodes(),
          checkedKeys: store.getCheckedKeys(),
          halfCheckedNodes: store.getHalfCheckedNodes(),
          halfCheckedKeys: store.getHalfCheckedKeys()
        });
      });
    },
    handleChildNodeExpand: function handleChildNodeExpand(nodeData, node, instance) {
      this.broadcast('ElTreeNode', 'tree-node-expand', node);
      this.tree.$emit('node-expand', nodeData, node, instance);
    }
  }
});
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/tree-node.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//




/* harmony default export */ var tree_nodevue_type_script_lang_js_ = ({
  name: 'AwsuiTreeNode',
  componentName: 'AwsuiTreeNode',
  mixins: [emitter, mixin_node],
  props: {
    node: {
      default: function _default() {
        return {};
      }
    },
    props: {},
    renderContent: Function,
    renderAfterExpand: {
      type: Boolean,
      default: true
    },
    showCheckbox: {
      type: Boolean,
      default: false
    }
  },
  components: {
    AwsuiCollapseTransition: collapse_transition,
    NodeContent: {
      props: {
        node: {
          required: true
        }
      },
      render: function render(h) {
        var parent = this.$parent;
        var tree = parent.tree;
        var node = this.node;
        var data = node.data,
            store = node.store;
        return parent.renderContent ? parent.renderContent.call(parent._renderProxy, h, {
          _self: tree.$vnode.context,
          node: node,
          data: data,
          store: store
        }) : tree.$scopedSlots.default ? tree.$scopedSlots.default({
          node: node,
          data: data
        }) : h("span", {
          "class": "awsui-tree-node__label"
        }, [node.label]);
      }
    }
  },
  data: function data() {
    return {
      tree: null,
      expanded: false,
      childNodeRendered: false,
      oldChecked: null,
      oldIndeterminate: null
    };
  },
  watch: {
    'node.indeterminate': function nodeIndeterminate(val) {
      this.handleSelectChange(this.node.checked, val);
    },
    'node.checked': function nodeChecked(val) {
      this.handleSelectChange(val, this.node.indeterminate);
    },
    'node.expanded': function nodeExpanded(val) {
      var _this = this;

      this.$nextTick(function () {
        return _this.expanded = val;
      });

      if (val) {
        this.childNodeRendered = true;
      }
    }
  },
  methods: {
    handleDragStart: function handleDragStart(event) {
      if (!this.tree.draggable) return;
      this.tree.$emit('tree-node-drag-start', event, this);
    },
    handleDragOver: function handleDragOver(event) {
      if (!this.tree.draggable) return;
      this.tree.$emit('tree-node-drag-over', event, this);
      event.preventDefault();
    },
    handleDrop: function handleDrop(event) {
      event.preventDefault();
    },
    handleDragEnd: function handleDragEnd(event) {
      if (!this.tree.draggable) return;
      this.tree.$emit('tree-node-drag-end', event, this);
    }
  },
  created: function created() {
    var parent = this.$parent;
    this.creator(parent, 'node');
  }
});
// CONCATENATED MODULE: ./packages/tree/src/tree-node.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_tree_nodevue_type_script_lang_js_ = (tree_nodevue_type_script_lang_js_); 
// CONCATENATED MODULE: ./packages/tree/src/tree-node.vue





/* normalize component */

var tree_node_component = Object(componentNormalizer["a" /* default */])(
  src_tree_nodevue_type_script_lang_js_,
  tree_nodevue_type_template_id_45c041e2_render,
  tree_nodevue_type_template_id_45c041e2_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var tree_node = (tree_node_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/tree-virtual-node.vue?vue&type=template&id=842154e6&
var tree_virtual_nodevue_type_template_id_842154e6_render = function () {
var this$1 = this;
var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.source.visible),expression:"source.visible"}],ref:"node",staticClass:"awsui-tree-node",class:{
    'is-expanded': _vm.expanded,
    'is-current': _vm.source.isCurrent,
    'is-hidden': !_vm.source.visible,
    'is-focusable': !_vm.source.disabled,
    'is-checked': !_vm.source.disabled && _vm.source.checked
  },attrs:{"role":"treeitem","tabindex":"-1","aria-expanded":_vm.expanded,"aria-disabled":_vm.source.disabled,"aria-checked":_vm.source.checked},on:{"click":function($event){$event.stopPropagation();return _vm.handleClick($event)},"contextmenu":function ($event) { return this$1.handleContextMenu($event); }}},[_c('div',{staticClass:"awsui-tree-node__content"},[_c('span',{style:({ 'width': (_vm.source.level - 1) * _vm.tree.indent + 'px' }),attrs:{"aria-hidden":"true"}}),_c('span',{class:[
        { 'is-leaf': _vm.source.isLeaf, expanded: !_vm.source.isLeaf && _vm.expanded },
        'awsui-tree-node__expand-icon awsui-iconfont',
        _vm.tree.iconClass ? _vm.tree.iconClass : ''
      ],domProps:{"innerHTML":_vm._s(_vm.tree.icon ? _vm.tree.icon : '&#xe606;')},on:{"click":function($event){$event.stopPropagation();return _vm.handleExpandIconClick($event)}}}),(_vm.showCheckbox)?_c('awsui-checkbox',{attrs:{"indeterminate":_vm.source.indeterminate,"disabled":!!_vm.source.disabled},on:{"change":_vm.handleCheckChange},nativeOn:{"click":function($event){$event.stopPropagation();}},model:{value:(_vm.source.checked),callback:function ($$v) {_vm.$set(_vm.source, "checked", $$v)},expression:"source.checked"}}):_vm._e(),(_vm.source.loading)?_c('span',{staticClass:"awsui-tree-node__loading-icon el-icon-loading"}):_vm._e(),_c('node-content',{attrs:{"node":_vm.source}})],1)])}
var tree_virtual_nodevue_type_template_id_842154e6_staticRenderFns = []


// CONCATENATED MODULE: ./packages/tree/src/tree-virtual-node.vue?vue&type=template&id=842154e6&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/tree-virtual-node.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//



/* harmony default export */ var tree_virtual_nodevue_type_script_lang_js_ = ({
  name: 'AwsuiTreeVirtualNode',
  componentName: 'AwsuiTreeVirtualNode',
  mixins: [emitter, mixin_node],
  props: {
    source: {
      default: function _default() {
        return {};
      }
    },
    renderContent: Function,
    showCheckbox: {
      type: Boolean,
      default: false
    }
  },
  components: {
    NodeContent: {
      props: {
        node: {
          required: true
        }
      },
      render: function render(h) {
        var parent = this.$parent;
        var tree = parent.tree;
        var node = this.node;
        var data = node.data,
            store = node.store;
        return parent.renderContent ? parent.renderContent.call(parent._renderProxy, h, {
          _self: tree.$vnode.context,
          node: node,
          data: data,
          store: store
        }) : tree.$scopedSlots.default ? tree.$scopedSlots.default({
          node: node,
          data: data
        }) : h("span", {
          "class": "awsui-tree-node__label"
        }, [node.label]);
      }
    }
  },
  data: function data() {
    return {
      tree: null,
      expanded: false,
      childNodeRendered: false,
      oldChecked: null,
      oldIndeterminate: null
    };
  },
  watch: {
    'source.indeterminate': function sourceIndeterminate(val) {
      this.handleSelectChange(this.source.checked, val);
    },
    'source.checked': function sourceChecked(val) {
      this.handleSelectChange(val, this.source.indeterminate);
    },
    'source.expanded': function sourceExpanded(val) {
      var _this = this;

      this.$nextTick(function () {
        return _this.expanded = val;
      });

      if (val) {
        this.childNodeRendered = true;
      }
    }
  },
  created: function created() {
    var parent = this.$parent.$parent.$parent;
    this.creator(parent, 'source');
  }
});
// CONCATENATED MODULE: ./packages/tree/src/tree-virtual-node.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_tree_virtual_nodevue_type_script_lang_js_ = (tree_virtual_nodevue_type_script_lang_js_); 
// CONCATENATED MODULE: ./packages/tree/src/tree-virtual-node.vue





/* normalize component */

var tree_virtual_node_component = Object(componentNormalizer["a" /* default */])(
  src_tree_virtual_nodevue_type_script_lang_js_,
  tree_virtual_nodevue_type_template_id_842154e6_render,
  tree_virtual_nodevue_type_template_id_842154e6_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var tree_virtual_node = (tree_virtual_node_component.exports);
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-prototype-of.js
var es_object_get_prototype_of = __webpack_require__("3410");

// CONCATENATED MODULE: ./node_modules/element-ui/src/locale/lang/zh-CN.js
/* harmony default export */ var zh_CN = ({
  el: {
    colorpicker: {
      confirm: '确定',
      clear: '清空'
    },
    datepicker: {
      now: '此刻',
      today: '今天',
      cancel: '取消',
      clear: '清空',
      confirm: '确定',
      selectDate: '选择日期',
      selectTime: '选择时间',
      startDate: '开始日期',
      startTime: '开始时间',
      endDate: '结束日期',
      endTime: '结束时间',
      prevYear: '前一年',
      nextYear: '后一年',
      prevMonth: '上个月',
      nextMonth: '下个月',
      year: '年',
      month1: '1 月',
      month2: '2 月',
      month3: '3 月',
      month4: '4 月',
      month5: '5 月',
      month6: '6 月',
      month7: '7 月',
      month8: '8 月',
      month9: '9 月',
      month10: '10 月',
      month11: '11 月',
      month12: '12 月',
      // week: '周次',
      weeks: {
        sun: '日',
        mon: '一',
        tue: '二',
        wed: '三',
        thu: '四',
        fri: '五',
        sat: '六'
      },
      months: {
        jan: '一月',
        feb: '二月',
        mar: '三月',
        apr: '四月',
        may: '五月',
        jun: '六月',
        jul: '七月',
        aug: '八月',
        sep: '九月',
        oct: '十月',
        nov: '十一月',
        dec: '十二月'
      }
    },
    select: {
      loading: '加载中',
      noMatch: '无匹配数据',
      noData: '无数据',
      placeholder: '请选择'
    },
    cascader: {
      noMatch: '无匹配数据',
      loading: '加载中',
      placeholder: '请选择',
      noData: '暂无数据'
    },
    pagination: {
      goto: '前往',
      pagesize: '条/页',
      total: '共 {total} 条',
      pageClassifier: '页'
    },
    messagebox: {
      title: '提示',
      confirm: '确定',
      cancel: '取消',
      error: '输入的数据不合法!'
    },
    upload: {
      deleteTip: '按 delete 键可删除',
      delete: '删除',
      preview: '查看图片',
      continue: '继续上传'
    },
    table: {
      emptyText: '暂无数据',
      confirmFilter: '筛选',
      resetFilter: '重置',
      clearFilter: '全部',
      sumText: '合计'
    },
    tree: {
      emptyText: '暂无数据'
    },
    transfer: {
      noMatch: '无匹配数据',
      noData: '无数据',
      titles: ['列表 1', '列表 2'],
      filterPlaceholder: '请输入搜索内容',
      noCheckedFormat: '共 {total} 项',
      hasCheckedFormat: '已选 {checked}/{total} 项'
    },
    image: {
      error: '加载失败'
    },
    pageHeader: {
      title: '返回'
    },
    popconfirm: {
      confirmButtonText: '确定',
      cancelButtonText: '取消'
    }
  }
});
// EXTERNAL MODULE: ./node_modules/deepmerge/dist/cjs.js
var cjs = __webpack_require__("3c4e");
var cjs_default = /*#__PURE__*/__webpack_require__.n(cjs);

// CONCATENATED MODULE: ./node_modules/element-ui/src/locale/format.js




var RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
/**
 *  String format template
 *  - Inspired:
 *    https://github.com/Matt-Esch/string-template/index.js
 */

/* harmony default export */ var format = (function (Vue) {
  /**
   * template
   *
   * @param {String} string
   * @param {Array} ...args
   * @return {String}
   */
  function template(string) {
    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
      args[_key - 1] = arguments[_key];
    }

    if (args.length === 1 && Object(esm_typeof["a" /* default */])(args[0]) === 'object') {
      args = args[0];
    }

    if (!args || !args.hasOwnProperty) {
      args = {};
    }

    return string.replace(RE_NARGS, function (match, prefix, i, index) {
      var result;

      if (string[index - 1] === '{' && string[index + match.length] === '}') {
        return i;
      } else {
        result = hasOwn(args, i) ? args[i] : null;

        if (result === null || result === undefined) {
          return '';
        }

        return result;
      }
    });
  }

  return template;
});
// CONCATENATED MODULE: ./node_modules/element-ui/src/locale/index.js







var locale_format = format(external_commonjs_vue_commonjs2_vue_root_Vue_default.a);
var locale_lang = zh_CN;
var merged = false;

var locale_i18nHandler = function i18nHandler() {
  var vuei18n = Object.getPrototypeOf(this || external_commonjs_vue_commonjs2_vue_root_Vue_default.a).$t;

  if (typeof vuei18n === 'function' && !!external_commonjs_vue_commonjs2_vue_root_Vue_default.a.locale) {
    if (!merged) {
      merged = true;
      external_commonjs_vue_commonjs2_vue_root_Vue_default.a.locale(external_commonjs_vue_commonjs2_vue_root_Vue_default.a.config.lang, cjs_default()(locale_lang, external_commonjs_vue_commonjs2_vue_root_Vue_default.a.locale(external_commonjs_vue_commonjs2_vue_root_Vue_default.a.config.lang) || {}, {
        clone: true
      }));
    }

    return vuei18n.apply(this, arguments);
  }
};

var locale_t = function t(path, options) {
  var value = locale_i18nHandler.apply(this, arguments);
  if (value !== null && value !== undefined) return value;
  var array = path.split('.');
  var current = locale_lang;

  for (var i = 0, j = array.length; i < j; i++) {
    var property = array[i];
    value = current[property];
    if (i === j - 1) return locale_format(value, options);
    if (!value) return '';
    current = value;
  }

  return '';
};
var use = function use(l) {
  locale_lang = l || locale_lang;
};
var i18n = function i18n(fn) {
  locale_i18nHandler = fn || locale_i18nHandler;
};
/* harmony default export */ var locale = ({
  use: use,
  t: locale_t,
  i18n: i18n
});
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/tree.vue?vue&type=script&lang=js&









//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//








/* harmony default export */ var treevue_type_script_lang_js_ = ({
  name: 'AwsuiTree',
  mixins: [emitter],
  components: {
    VirtualList: dist_default.a,
    AwsuiTreeNode: tree_node
  },
  data: function data() {
    return {
      store: null,
      root: null,
      currentNode: null,
      treeItems: null,
      checkboxItems: [],
      dragState: {
        showDropIndicator: false,
        draggingNode: null,
        dropNode: null,
        allowDrop: true
      },
      itemComponent: tree_virtual_node
    };
  },
  props: {
    data: {
      type: Array
    },
    emptyText: {
      type: String,
      default: function _default() {
        return locale_t('awsui.tree.emptyText');
      }
    },
    renderAfterExpand: {
      type: Boolean,
      default: true
    },
    nodeKey: String,
    checkStrictly: Boolean,
    defaultExpandAll: Boolean,
    expandOnClickNode: {
      type: Boolean,
      default: true
    },
    checkOnClickNode: Boolean,
    checkDescendants: {
      type: Boolean,
      default: false
    },
    autoExpandParent: {
      type: Boolean,
      default: true
    },
    defaultCheckedKeys: Array,
    defaultExpandedKeys: Array,
    currentNodeKey: [String, Number],
    renderContent: Function,
    showCheckbox: {
      type: Boolean,
      default: false
    },
    draggable: {
      type: Boolean,
      default: false
    },
    allowDrag: Function,
    allowDrop: Function,
    props: {
      default: function _default() {
        return {
          children: 'children',
          label: 'label',
          disabled: 'disabled'
        };
      }
    },
    lazy: {
      type: Boolean,
      default: false
    },
    highlightCurrent: Boolean,
    load: Function,
    filterNodeMethod: Function,
    accordion: Boolean,
    indent: {
      type: Number,
      default: 18
    },
    icon: String,
    iconClass: String,
    height: {
      type: Number,
      default: 0
    },
    extraLine: {
      type: Number,
      default: 8
    }
  },
  computed: {
    children: {
      set: function set(value) {
        this.data = value;
      },
      get: function get() {
        return this.data;
      }
    },
    treeItemArray: function treeItemArray() {
      return Array.prototype.slice.call(this.treeItems);
    },
    isEmpty: function isEmpty() {
      var childNodes = this.root.childNodes;
      return !childNodes || childNodes.length === 0 || childNodes.every(function (_ref) {
        var visible = _ref.visible;
        return !visible;
      });
    },
    visibleList: function visibleList() {
      return this.flattenTree(this.root.childNodes);
    }
  },
  watch: {
    defaultCheckedKeys: function defaultCheckedKeys(newVal) {
      this.store.setDefaultCheckedKey(newVal);
    },
    defaultExpandedKeys: function defaultExpandedKeys(newVal) {
      this.store.defaultExpandedKeys = newVal;
      this.store.setDefaultExpandedKeys(newVal);
    },
    data: function data(newVal) {
      this.store.setData(newVal);
    },
    checkboxItems: function checkboxItems(val) {
      Array.prototype.forEach.call(val, function (checkbox) {
        checkbox.setAttribute('tabindex', -1);
      });
    },
    checkStrictly: function checkStrictly(newVal) {
      this.store.checkStrictly = newVal;
    }
  },
  methods: {
    flattenTree: function flattenTree(datas) {
      var _this = this;

      return datas.reduce(function (conn, data) {
        conn.push(data);

        if (data.expanded && data.childNodes.length) {
          conn.push.apply(conn, Object(toConsumableArray["a" /* default */])(_this.flattenTree(data.childNodes)));
        }

        return conn;
      }, []);
    },
    filter: function filter(value) {
      if (!this.filterNodeMethod) throw new Error('[Tree] filterNodeMethod is required when filter');
      this.store.filter(value);
    },
    getNodeKey: function getNodeKey(node) {
      return util_getNodeKey(this.nodeKey, node.data);
    },
    getNodePath: function getNodePath(data) {
      if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in getNodePath');
      var node = this.store.getNode(data);
      if (!node) return [];
      var path = [node.data];
      var parent = node.parent;

      while (parent && parent !== this.root) {
        path.push(parent.data);
        parent = parent.parent;
      }

      return path.reverse();
    },
    getCheckedNodes: function getCheckedNodes(leafOnly, includeHalfChecked) {
      return this.store.getCheckedNodes(leafOnly, includeHalfChecked);
    },
    getCheckedKeys: function getCheckedKeys(leafOnly) {
      return this.store.getCheckedKeys(leafOnly);
    },
    getCurrentNode: function getCurrentNode() {
      var currentNode = this.store.getCurrentNode();
      return currentNode ? currentNode.data : null;
    },
    getCurrentKey: function getCurrentKey() {
      if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in getCurrentKey');
      var currentNode = this.getCurrentNode();
      return currentNode ? currentNode[this.nodeKey] : null;
    },
    setCheckedNodes: function setCheckedNodes(nodes, leafOnly) {
      if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCheckedNodes');
      this.store.setCheckedNodes(nodes, leafOnly);
    },
    setCheckedKeys: function setCheckedKeys(keys, leafOnly) {
      if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCheckedKeys');
      this.store.setCheckedKeys(keys, leafOnly);
    },
    setChecked: function setChecked(data, checked, deep) {
      this.store.setChecked(data, checked, deep);
    },
    getHalfCheckedNodes: function getHalfCheckedNodes() {
      return this.store.getHalfCheckedNodes();
    },
    getHalfCheckedKeys: function getHalfCheckedKeys() {
      return this.store.getHalfCheckedKeys();
    },
    setCurrentNode: function setCurrentNode(node) {
      if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCurrentNode');
      this.store.setUserCurrentNode(node);
    },
    setCurrentKey: function setCurrentKey(key) {
      if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCurrentKey');
      this.store.setCurrentNodeKey(key);
    },
    getNode: function getNode(data) {
      return this.store.getNode(data);
    },
    remove: function remove(data) {
      this.store.remove(data);
    },
    append: function append(data, parentNode) {
      this.store.append(data, parentNode);
    },
    insertBefore: function insertBefore(data, refNode) {
      this.store.insertBefore(data, refNode);
    },
    insertAfter: function insertAfter(data, refNode) {
      this.store.insertAfter(data, refNode);
    },
    handleNodeExpand: function handleNodeExpand(nodeData, node, instance) {
      this.broadcast('ElTreeNode', 'tree-node-expand', node);
      this.$emit('node-expand', nodeData, node, instance);
    },
    updateKeyChildren: function updateKeyChildren(key, data) {
      if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in updateKeyChild');
      this.store.updateChildren(key, data);
    },
    initTabIndex: function initTabIndex() {
      this.treeItems = this.$el.querySelectorAll('.is-focusable[role=treeitem]');
      this.checkboxItems = this.$el.querySelectorAll('input[type=checkbox]');
      var checkedItem = this.$el.querySelectorAll('.is-checked[role=treeitem]');

      if (checkedItem.length) {
        checkedItem[0].setAttribute('tabindex', 0);
        return;
      }

      this.treeItems[0] && this.treeItems[0].setAttribute('tabindex', 0);
    },
    handleKeydown: function handleKeydown(ev) {
      var currentItem = ev.target;
      if (currentItem.className.indexOf('awsui-tree-node') === -1) return;
      var keyCode = ev.keyCode;
      this.treeItems = this.$el.querySelectorAll('.is-focusable[role=treeitem]');
      var currentIndex = this.treeItemArray.indexOf(currentItem);
      var nextIndex;

      if ([38, 40].indexOf(keyCode) > -1) {
        // up、down
        ev.preventDefault();

        if (keyCode === 38) {
          // up
          nextIndex = currentIndex !== 0 ? currentIndex - 1 : 0;
        } else {
          nextIndex = currentIndex < this.treeItemArray.length - 1 ? currentIndex + 1 : 0;
        }

        this.treeItemArray[nextIndex].focus(); // 选中
      }

      if ([37, 39].indexOf(keyCode) > -1) {
        // left、right 展开
        ev.preventDefault();
        currentItem.click(); // 选中
      }

      var hasInput = currentItem.querySelector('[type="checkbox"]');

      if ([13, 32].indexOf(keyCode) > -1 && hasInput) {
        // space enter选中checkbox
        ev.preventDefault();
        hasInput.click();
      }
    }
  },
  created: function created() {
    var _this2 = this;

    this.isTree = true;
    this.store = new tree_store_TreeStore({
      key: this.nodeKey,
      data: this.data,
      lazy: this.lazy,
      props: this.props,
      load: this.load,
      currentNodeKey: this.currentNodeKey,
      checkStrictly: this.checkStrictly,
      checkDescendants: this.checkDescendants,
      defaultCheckedKeys: this.defaultCheckedKeys,
      defaultExpandedKeys: this.defaultExpandedKeys,
      autoExpandParent: this.autoExpandParent,
      defaultExpandAll: this.defaultExpandAll,
      filterNodeMethod: this.filterNodeMethod
    });
    this.root = this.store.root;
    var dragState = this.dragState;
    this.$on('tree-node-drag-start', function (event, treeNode) {
      if (typeof _this2.allowDrag === 'function' && !_this2.allowDrag(treeNode.node)) {
        event.preventDefault();
        return false;
      }

      event.dataTransfer.effectAllowed = 'move'; // wrap in try catch to address IE's error when first param is 'text/plain'

      try {
        // setData is required for draggable to work in FireFox
        // the content has to be '' so dragging a node out of the tree won't open a new tab in FireFox
        event.dataTransfer.setData('text/plain', '');
      } catch (e) {
        console.log(e);
      }

      dragState.draggingNode = treeNode;

      _this2.$emit('node-drag-start', treeNode.node, event);
    });
    this.$on('tree-node-drag-over', function (event, treeNode) {
      var dropNode = findNearestComponent(event.target, 'ElTreeNode');
      var oldDropNode = dragState.dropNode;

      if (oldDropNode && oldDropNode !== dropNode) {
        removeClass(oldDropNode.$el, 'is-drop-inner');
      }

      var draggingNode = dragState.draggingNode;
      if (!draggingNode || !dropNode) return;
      var dropPrev = true;
      var dropInner = true;
      var dropNext = true;
      var userAllowDropInner = true;

      if (typeof _this2.allowDrop === 'function') {
        dropPrev = _this2.allowDrop(draggingNode.node, dropNode.node, 'prev');
        userAllowDropInner = dropInner = _this2.allowDrop(draggingNode.node, dropNode.node, 'inner');
        dropNext = _this2.allowDrop(draggingNode.node, dropNode.node, 'next');
      }

      event.dataTransfer.dropEffect = dropInner ? 'move' : 'none';

      if ((dropPrev || dropInner || dropNext) && oldDropNode !== dropNode) {
        if (oldDropNode) {
          _this2.$emit('node-drag-leave', draggingNode.node, oldDropNode.node, event);
        }

        _this2.$emit('node-drag-enter', draggingNode.node, dropNode.node, event);
      }

      if (dropPrev || dropInner || dropNext) {
        dragState.dropNode = dropNode;
      }

      if (dropNode.node.nextSibling === draggingNode.node) {
        dropNext = false;
      }

      if (dropNode.node.previousSibling === draggingNode.node) {
        dropPrev = false;
      }

      if (dropNode.node.contains(draggingNode.node, false)) {
        dropInner = false;
      }

      if (draggingNode.node === dropNode.node || draggingNode.node.contains(dropNode.node)) {
        dropPrev = false;
        dropInner = false;
        dropNext = false;
      }

      var targetPosition = dropNode.$el.getBoundingClientRect();

      var treePosition = _this2.$el.getBoundingClientRect();

      var dropType;
      var prevPercent = dropPrev ? dropInner ? 0.25 : dropNext ? 0.45 : 1 : -1;
      var nextPercent = dropNext ? dropInner ? 0.75 : dropPrev ? 0.55 : 0 : 1;
      var indicatorTop = -9999;
      var distance = event.clientY - targetPosition.top;

      if (distance < targetPosition.height * prevPercent) {
        dropType = 'before';
      } else if (distance > targetPosition.height * nextPercent) {
        dropType = 'after';
      } else if (dropInner) {
        dropType = 'inner';
      } else {
        dropType = 'none';
      }

      var iconPosition = dropNode.$el.querySelector('.awsui-tree-node__expand-icon').getBoundingClientRect();
      var dropIndicator = _this2.$refs.dropIndicator;

      if (dropType === 'before') {
        indicatorTop = iconPosition.top - treePosition.top;
      } else if (dropType === 'after') {
        indicatorTop = iconPosition.bottom - treePosition.top;
      }

      dropIndicator.style.top = indicatorTop + 'px';
      dropIndicator.style.left = iconPosition.right - treePosition.left + 'px';

      if (dropType === 'inner') {
        addClass(dropNode.$el, 'is-drop-inner');
      } else {
        removeClass(dropNode.$el, 'is-drop-inner');
      }

      dragState.showDropIndicator = dropType === 'before' || dropType === 'after';
      dragState.allowDrop = dragState.showDropIndicator || userAllowDropInner;
      dragState.dropType = dropType;

      _this2.$emit('node-drag-over', draggingNode.node, dropNode.node, event);
    });
    this.$on('tree-node-drag-end', function (event) {
      var draggingNode = dragState.draggingNode,
          dropType = dragState.dropType,
          dropNode = dragState.dropNode;
      event.preventDefault();
      event.dataTransfer.dropEffect = 'move';

      if (draggingNode && dropNode) {
        var draggingNodeCopy = {
          data: draggingNode.node.data
        };

        if (dropType !== 'none') {
          draggingNode.node.remove();
        }

        if (dropType === 'before') {
          dropNode.node.parent.insertBefore(draggingNodeCopy, dropNode.node);
        } else if (dropType === 'after') {
          dropNode.node.parent.insertAfter(draggingNodeCopy, dropNode.node);
        } else if (dropType === 'inner') {
          dropNode.node.insertChild(draggingNodeCopy);
        }

        if (dropType !== 'none') {
          _this2.store.registerNode(draggingNodeCopy);
        }

        removeClass(dropNode.$el, 'is-drop-inner');

        _this2.$emit('node-drag-end', draggingNode.node, dropNode.node, dropType, event);

        if (dropType !== 'none') {
          _this2.$emit('node-drop', draggingNode.node, dropNode.node, dropType, event);
        }
      }

      if (draggingNode && !dropNode) {
        _this2.$emit('node-drag-end', draggingNode.node, null, dropType, event);
      }

      dragState.showDropIndicator = false;
      dragState.draggingNode = null;
      dragState.dropNode = null;
      dragState.allowDrop = true;
    });
  },
  mounted: function mounted() {
    this.initTabIndex();
    this.$el.addEventListener('keydown', this.handleKeydown);
  },
  updated: function updated() {
    this.treeItems = this.$el.querySelectorAll('[role=treeitem]');
    this.checkboxItems = this.$el.querySelectorAll('input[type=checkbox]');
  }
});
// CONCATENATED MODULE: ./packages/tree/src/tree.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_treevue_type_script_lang_js_ = (treevue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/tree/src/tree.vue?vue&type=style&index=0&lang=css&
var treevue_type_style_index_0_lang_css_ = __webpack_require__("69d2");

// CONCATENATED MODULE: ./packages/tree/src/tree.vue






/* normalize component */

var tree_component = Object(componentNormalizer["a" /* default */])(
  src_treevue_type_script_lang_js_,
  treevue_type_template_id_287ee182_render,
  treevue_type_template_id_287ee182_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var tree = (tree_component.exports);
// CONCATENATED MODULE: ./packages/tree/index.js


/* istanbul ignore next */

tree.install = function (Vue) {
  Vue.component(tree.name, tree);
};

/* harmony default export */ var packages_tree = (tree);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/layout/src/layout.vue?vue&type=template&id=18e3bb25&
var layoutvue_type_template_id_18e3bb25_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:"awsui-layout",class:{ 'is-vertical': _vm.isVertical }},[_vm._t("default")],2)}
var layoutvue_type_template_id_18e3bb25_staticRenderFns = []


// CONCATENATED MODULE: ./packages/layout/src/layout.vue?vue&type=template&id=18e3bb25&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/layout/src/layout.vue?vue&type=script&lang=js&

//
//
//
//
//
//
/* harmony default export */ var layoutvue_type_script_lang_js_ = ({
  name: 'AwsuiLayout',
  componentName: 'AwsuiLayout',
  props: {
    direction: String
  },
  computed: {
    isVertical: function isVertical() {
      if (this.direction === 'vertical') {
        return true;
      } else if (this.direction === 'horizontal') {
        return false;
      }

      return this.$slots && this.$slots.default ? this.$slots.default.some(function (vnode) {
        var tag = vnode.componentOptions && vnode.componentOptions.tag;
        return tag === 'awsui-header' || tag === 'awsui-footer';
      }) : false;
    }
  }
});
// CONCATENATED MODULE: ./packages/layout/src/layout.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_layoutvue_type_script_lang_js_ = (layoutvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/layout/src/layout.vue?vue&type=style&index=0&scope=true&lang=css&
var layoutvue_type_style_index_0_scope_true_lang_css_ = __webpack_require__("e2ae");

// CONCATENATED MODULE: ./packages/layout/src/layout.vue






/* normalize component */

var layout_component = Object(componentNormalizer["a" /* default */])(
  src_layoutvue_type_script_lang_js_,
  layoutvue_type_template_id_18e3bb25_render,
  layoutvue_type_template_id_18e3bb25_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var layout = (layout_component.exports);
// CONCATENATED MODULE: ./packages/layout/index.js


/* istanbul ignore next */

layout.install = function (Vue) {
  Vue.component(layout.name, layout);
};

/* harmony default export */ var packages_layout = (layout);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/header/src/header.vue?vue&type=template&id=5555ed76&scoped=true&
var headervue_type_template_id_5555ed76_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('header',{staticClass:"awsui-header",style:({ height: _vm.height })},[_vm._t("default")],2)}
var headervue_type_template_id_5555ed76_scoped_true_staticRenderFns = []


// CONCATENATED MODULE: ./packages/header/src/header.vue?vue&type=template&id=5555ed76&scoped=true&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/header/src/header.vue?vue&type=script&lang=js&
//
//
//
//
//
//
/* harmony default export */ var headervue_type_script_lang_js_ = ({
  name: 'AwsuiHeader',
  componentName: 'AwsuiHeader',
  props: {
    height: {
      type: String,
      default: '60px'
    }
  }
});
// CONCATENATED MODULE: ./packages/header/src/header.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_headervue_type_script_lang_js_ = (headervue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/header/src/header.vue?vue&type=style&index=0&id=5555ed76&scoped=true&lang=css&
var headervue_type_style_index_0_id_5555ed76_scoped_true_lang_css_ = __webpack_require__("e501");

// CONCATENATED MODULE: ./packages/header/src/header.vue






/* normalize component */

var header_component = Object(componentNormalizer["a" /* default */])(
  src_headervue_type_script_lang_js_,
  headervue_type_template_id_5555ed76_scoped_true_render,
  headervue_type_template_id_5555ed76_scoped_true_staticRenderFns,
  false,
  null,
  "5555ed76",
  null
  
)

/* harmony default export */ var src_header = (header_component.exports);
// CONCATENATED MODULE: ./packages/header/index.js


/* istanbul ignore next */

src_header.install = function (Vue) {
  Vue.component(src_header.name, src_header);
};

/* harmony default export */ var packages_header = (src_header);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/aside/src/aside.vue?vue&type=template&id=2c81d596&scoped=true&
var asidevue_type_template_id_2c81d596_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('aside',{staticClass:"awsui-aside",style:({ width: _vm.width })},[_vm._t("default")],2)}
var asidevue_type_template_id_2c81d596_scoped_true_staticRenderFns = []


// CONCATENATED MODULE: ./packages/aside/src/aside.vue?vue&type=template&id=2c81d596&scoped=true&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/aside/src/aside.vue?vue&type=script&lang=js&
//
//
//
//
//
//
/* harmony default export */ var asidevue_type_script_lang_js_ = ({
  name: 'AwsuiAside',
  componentName: 'AwsuiAside',
  props: {
    width: {
      type: String,
      default: '300px'
    }
  }
});
// CONCATENATED MODULE: ./packages/aside/src/aside.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_asidevue_type_script_lang_js_ = (asidevue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/aside/src/aside.vue?vue&type=style&index=0&id=2c81d596&scoped=true&lang=css&
var asidevue_type_style_index_0_id_2c81d596_scoped_true_lang_css_ = __webpack_require__("606f");

// CONCATENATED MODULE: ./packages/aside/src/aside.vue






/* normalize component */

var aside_component = Object(componentNormalizer["a" /* default */])(
  src_asidevue_type_script_lang_js_,
  asidevue_type_template_id_2c81d596_scoped_true_render,
  asidevue_type_template_id_2c81d596_scoped_true_staticRenderFns,
  false,
  null,
  "2c81d596",
  null
  
)

/* harmony default export */ var aside = (aside_component.exports);
// CONCATENATED MODULE: ./packages/aside/index.js


/* istanbul ignore next */

aside.install = function (Vue) {
  Vue.component(aside.name, aside);
};

/* harmony default export */ var packages_aside = (aside);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/main.vue?vue&type=template&id=2a6a0f7c&scoped=true&
var mainvue_type_template_id_2a6a0f7c_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('main',{staticClass:"awsui-main"},[_vm._t("default")],2)}
var mainvue_type_template_id_2a6a0f7c_scoped_true_staticRenderFns = []


// CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=2a6a0f7c&scoped=true&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
/* harmony default export */ var mainvue_type_script_lang_js_ = ({
  name: 'AwsuiMain',
  componentName: 'AwsuiMain'
});
// CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/main/src/main.vue?vue&type=style&index=0&id=2a6a0f7c&scoped=true&lang=css&
var mainvue_type_style_index_0_id_2a6a0f7c_scoped_true_lang_css_ = __webpack_require__("05d3");

// CONCATENATED MODULE: ./packages/main/src/main.vue






/* normalize component */

var main_component = Object(componentNormalizer["a" /* default */])(
  src_mainvue_type_script_lang_js_,
  mainvue_type_template_id_2a6a0f7c_scoped_true_render,
  mainvue_type_template_id_2a6a0f7c_scoped_true_staticRenderFns,
  false,
  null,
  "2a6a0f7c",
  null
  
)

/* harmony default export */ var main = (main_component.exports);
// CONCATENATED MODULE: ./packages/main/index.js


/* istanbul ignore next */

main.install = function (Vue) {
  Vue.component(main.name, main);
};

/* harmony default export */ var packages_main = (main);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/footer/src/footer.vue?vue&type=template&id=49a58776&scoped=true&
var footervue_type_template_id_49a58776_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('footer',{staticClass:"awsui-footer",style:({ height: _vm.height })},[_vm._t("default")],2)}
var footervue_type_template_id_49a58776_scoped_true_staticRenderFns = []


// CONCATENATED MODULE: ./packages/footer/src/footer.vue?vue&type=template&id=49a58776&scoped=true&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/footer/src/footer.vue?vue&type=script&lang=js&
//
//
//
//
//
//
/* harmony default export */ var footervue_type_script_lang_js_ = ({
  name: 'AwsuiFooter',
  componentName: 'AwsuiFooter',
  props: {
    height: {
      type: String,
      default: '60px'
    }
  }
});
// CONCATENATED MODULE: ./packages/footer/src/footer.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_footervue_type_script_lang_js_ = (footervue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/footer/src/footer.vue?vue&type=style&index=0&id=49a58776&scoped=true&lang=css&
var footervue_type_style_index_0_id_49a58776_scoped_true_lang_css_ = __webpack_require__("c682");

// CONCATENATED MODULE: ./packages/footer/src/footer.vue






/* normalize component */

var footer_component = Object(componentNormalizer["a" /* default */])(
  src_footervue_type_script_lang_js_,
  footervue_type_template_id_49a58776_scoped_true_render,
  footervue_type_template_id_49a58776_scoped_true_staticRenderFns,
  false,
  null,
  "49a58776",
  null
  
)

/* harmony default export */ var footer = (footer_component.exports);
// CONCATENATED MODULE: ./packages/footer/index.js


/* istanbul ignore next */

footer.install = function (Vue) {
  Vue.component(footer.name, footer);
};

/* harmony default export */ var packages_footer = (footer);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/form.vue?vue&type=template&id=76b492e6&
var formvue_type_template_id_76b492e6_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('form',{staticClass:"awsui-form",class:[
  _vm.labelPosition ? 'awsui-form--label-' + _vm.labelPosition : '',
  { 'awsui-form--inline': _vm.inline }
],attrs:{"disabled":_vm.disabled}},[_vm._t("default")],2)}
var formvue_type_template_id_76b492e6_staticRenderFns = []


// CONCATENATED MODULE: ./packages/form/src/form.vue?vue&type=template&id=76b492e6&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/form.vue?vue&type=script&lang=js&









//
//
//
//
//
//
//
//
//

/* harmony default export */ var formvue_type_script_lang_js_ = ({
  name: "AwsuiForm",
  componentName: "AwsuiForm",
  provide: function provide() {
    return {
      awsuiForm: this
    };
  },
  props: {
    model: Object,
    rules: Object,
    labelPosition: String,
    labelWidth: String,
    labelSuffix: {
      type: String,
      default: ""
    },
    inline: Boolean,
    inlineMessage: Boolean,
    statusIcon: Boolean,
    showMessage: {
      type: Boolean,
      default: true
    },
    size: String,
    disabled: {
      type: Boolean,
      default: false
    },
    validateOnRuleChange: {
      type: Boolean,
      default: true
    },
    hideRequiredAsterisk: {
      type: Boolean,
      default: false
    }
  },
  watch: {
    rules: function rules() {
      // remove then add event listeners on form-item after form rules change
      this.fields.forEach(function (field) {
        field.removeValidateEvents();
        field.addValidateEvents();
      });

      if (this.validateOnRuleChange) {
        this.validate(function () {});
      }
    }
  },
  computed: {
    autoLabelWidth: function autoLabelWidth() {
      if (!this.potentialLabelWidthArr.length) return 0;
      var max = Math.max.apply(Math, Object(toConsumableArray["a" /* default */])(this.potentialLabelWidthArr));
      return max ? "".concat(max, "px") : "";
    }
  },
  data: function data() {
    return {
      fields: [],
      potentialLabelWidthArr: [] // use this array to calculate auto width

    };
  },
  created: function created() {
    var _this = this;

    this.$on("awsui.form.addField", function (field) {
      if (field) {
        _this.fields.push(field);
      }
    });
    /* istanbul ignore next */

    this.$on("awsui.form.removeField", function (field) {
      if (field.prop) {
        _this.fields.splice(_this.fields.indexOf(field), 1);
      }
    });
  },
  methods: {
    resetFields: function resetFields() {
      if (!this.model) {
        console.warn("[Awsui Warn][Form]model is required for resetFields to work.");
        return;
      }

      this.fields.forEach(function (field) {
        field.resetField();
      });
    },
    clearValidate: function clearValidate() {
      var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
      var fields = props.length ? typeof props === "string" ? this.fields.filter(function (field) {
        return props === field.prop;
      }) : this.fields.filter(function (field) {
        return props.indexOf(field.prop) > -1;
      }) : this.fields;
      fields.forEach(function (field) {
        field.clearValidate();
      });
    },
    validate: function validate(callback) {
      var _this2 = this;

      if (!this.model) {
        console.warn("[Awsui Warn][Form]model is required for validate to work!");
        return;
      }

      var promise; // if no callback, return promise

      if (typeof callback !== "function" && window.Promise) {
        promise = new window.Promise(function (resolve, reject) {
          callback = function callback(valid) {
            valid ? resolve(valid) : reject(valid);
          };
        });
      }

      var valid = true;
      var count = 0; // 如果需要验证的fields为空，调用验证时立刻返回callback

      if (this.fields.length === 0 && callback) {
        callback(true);
      }

      var invalidFields = {};
      this.fields.forEach(function (field) {
        field.validate("", function (message, field) {
          if (message) {
            valid = false;
          }

          invalidFields = merge({}, invalidFields, field);

          if (typeof callback === "function" && ++count === _this2.fields.length) {
            callback(valid, invalidFields);
          }
        });
      });

      if (promise) {
        return promise;
      }
    },
    validateField: function validateField(props, cb) {
      props = [].concat(props);
      var fields = this.fields.filter(function (field) {
        return props.indexOf(field.prop) !== -1;
      });

      if (!fields.length) {
        console.warn("[Awsui Warn]please pass correct props!");
        return;
      }

      fields.forEach(function (field) {
        field.validate("", cb);
      });
    },
    getLabelWidthIndex: function getLabelWidthIndex(width) {
      var index = this.potentialLabelWidthArr.indexOf(width); // it's impossible

      if (index === -1) {
        throw new Error("[AwsuiForm]unpected width ", width);
      }

      return index;
    },
    registerLabelWidth: function registerLabelWidth(val, oldVal) {
      if (val && oldVal) {
        var index = this.getLabelWidthIndex(oldVal);
        this.potentialLabelWidthArr.splice(index, 1, val);
      } else if (val) {
        this.potentialLabelWidthArr.push(val);
      }
    },
    deregisterLabelWidth: function deregisterLabelWidth(val) {
      var index = this.getLabelWidthIndex(val);
      this.potentialLabelWidthArr.splice(index, 1);
    }
  }
});
// CONCATENATED MODULE: ./packages/form/src/form.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_formvue_type_script_lang_js_ = (formvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/form/src/form.vue?vue&type=style&index=0&lang=css&
var formvue_type_style_index_0_lang_css_ = __webpack_require__("eb50");

// CONCATENATED MODULE: ./packages/form/src/form.vue






/* normalize component */

var form_component = Object(componentNormalizer["a" /* default */])(
  src_formvue_type_script_lang_js_,
  formvue_type_template_id_76b492e6_render,
  formvue_type_template_id_76b492e6_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var src_form = (form_component.exports);
// CONCATENATED MODULE: ./packages/form/index.js


/* istanbul ignore next */

src_form.install = function (Vue) {
  Vue.component(src_form.name, src_form);
};

/* harmony default export */ var packages_form = (src_form);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/form-item.vue?vue&type=template&id=629a2022&
var form_itemvue_type_template_id_629a2022_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"awsui-form-item",class:[{
      'awsui-form-item--feedback': _vm.awsuiForm && _vm.awsuiForm.statusIcon,
      'is-error': _vm.validateState === 'error',
      'is-validating': _vm.validateState === 'validating',
      'is-success': _vm.validateState === 'success',
      'is-required': _vm.isRequired || _vm.required,
      'is-no-asterisk': _vm.awsuiForm && _vm.awsuiForm.hideRequiredAsterisk
    },
    _vm.sizeClass ? 'awsui-form-item--' + _vm.sizeClass : ''
  ]},[_c('label-wrap',{attrs:{"is-auto-width":_vm.labelStyle && _vm.labelStyle.width === 'auto',"update-all":_vm.form.labelWidth === 'auto'}},[(_vm.label || _vm.$slots.label)?_c('label',{class:{'awsui-form-item__label' : true,'awsui-form-item__positionTop':this.labelPosition === 'top'},style:(_vm.labelStyle),attrs:{"for":_vm.labelFor}},[_vm._t("label",[_vm._v(_vm._s(_vm.label + _vm.form.labelSuffix))])],2):_vm._e()]),_c('div',{staticClass:"awsui-form-item__content",style:(_vm.contentStyle)},[_vm._t("default"),_c('transition',{attrs:{"name":"awsui-zoom-in-top"}},[(_vm.validateState === 'error' && _vm.showMessage && _vm.form.showMessage)?_vm._t("error",[_c('div',{staticClass:"awsui-form-item__error",class:{
              'awsui-form-item__error--inline': typeof _vm.inlineMessage === 'boolean'
                ? _vm.inlineMessage
                : (_vm.awsuiForm && _vm.awsuiForm.inlineMessage || false)
            }},[_vm._v(" "+_vm._s(_vm.validateMessage)+" ")])],{"error":_vm.validateMessage}):_vm._e()],2)],2)],1)}
var form_itemvue_type_template_id_629a2022_staticRenderFns = []


// CONCATENATED MODULE: ./packages/form/src/form-item.vue?vue&type=template&id=629a2022&

// EXTERNAL MODULE: ./node_modules/async-validator/dist-web/index.js
var dist_web = __webpack_require__("2a95");

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/label-wrap.vue?vue&type=script&lang=js&
/* harmony default export */ var label_wrapvue_type_script_lang_js_ = ({
  props: {
    isAutoWidth: Boolean,
    updateAll: Boolean
  },
  inject: ['awsuiForm', 'awsuiFormItem'],
  render: function render() {
    var h = arguments[0];
    var slots = this.$slots.default;
    if (!slots) return null;

    if (this.isAutoWidth) {
      var autoLabelWidth = this.elForm.autoLabelWidth;
      var style = {};

      if (autoLabelWidth && autoLabelWidth !== 'auto') {
        var marginLeft = parseInt(autoLabelWidth, 10) - this.computedWidth;

        if (marginLeft) {
          style.marginLeft = marginLeft + 'px';
        }
      }

      return h("div", {
        "class": "awsui-form-item__labawsui-wrap",
        "style": style
      }, [slots]);
    } else {
      return slots[0];
    }
  },
  methods: {
    getLabelWidth: function getLabelWidth() {
      if (this.$el && this.$el.firstElementChild) {
        var computedWidth = window.getComputedStyle(this.$el.firstElementChild).width;
        return Math.ceil(parseFloat(computedWidth));
      } else {
        return 0;
      }
    },
    updateLabelWidth: function updateLabelWidth() {
      var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'update';

      if (this.$slots.default && this.isAutoWidth && this.$el.firstElementChild) {
        if (action === 'update') {
          this.computedWidth = this.getLabelWidth();
        } else if (action === 'remove') {
          this.elForm.deregisterLabelWidth(this.computedWidth);
        }
      }
    }
  },
  watch: {
    computedWidth: function computedWidth(val, oldVal) {
      if (this.updateAll) {
        this.elForm.registerLabelWidth(val, oldVal);
        this.elFormItem.updateComputedLabelWidth(val);
      }
    }
  },
  data: function data() {
    return {
      computedWidth: 0
    };
  },
  mounted: function mounted() {
    this.updateLabelWidth('update');
  },
  updated: function updated() {
    this.updateLabelWidth('update');
  },
  beforeDestroy: function beforeDestroy() {
    this.updateLabelWidth('remove');
  }
});
// CONCATENATED MODULE: ./packages/form/src/label-wrap.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_label_wrapvue_type_script_lang_js_ = (label_wrapvue_type_script_lang_js_); 
// CONCATENATED MODULE: ./packages/form/src/label-wrap.vue
var label_wrap_render, label_wrap_staticRenderFns




/* normalize component */

var label_wrap_component = Object(componentNormalizer["a" /* default */])(
  src_label_wrapvue_type_script_lang_js_,
  label_wrap_render,
  label_wrap_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var label_wrap = (label_wrap_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/form-item.vue?vue&type=script&lang=js&









//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//





/* harmony default export */ var form_itemvue_type_script_lang_js_ = ({
  name: 'AwsuiFormItem',
  componentName: 'AwsuiFormItem',
  mixins: [emitter],
  provide: function provide() {
    return {
      awsuiFormItem: this
    };
  },
  inject: ['awsuiForm'],
  props: {
    label: String,
    labelWidth: String,
    prop: String,
    required: {
      type: Boolean,
      default: undefined
    },
    rules: [Object, Array],
    error: String,
    labelPosition: String,
    validateStatus: String,
    for: String,
    inlineMessage: {
      type: [String, Boolean],
      default: ''
    },
    showMessage: {
      type: Boolean,
      default: true
    },
    size: String
  },
  components: {
    LabelWrap: label_wrap
  },
  watch: {
    error: {
      immediate: true,
      handler: function handler(value) {
        this.validateMessage = value;
        this.validateState = value ? 'error' : '';
      }
    },
    validateStatus: function validateStatus(value) {
      this.validateState = value;
    }
  },
  computed: {
    labelFor: function labelFor() {
      return this.for || this.prop;
    },
    labelStyle: function labelStyle() {
      var ret = {};
      if (this.form.labelPosition === 'top' || this.labelPosition === 'top') return ret;
      var labelWidth = this.labelWidth || this.form.labelWidth;

      if (labelWidth) {
        ret.width = labelWidth;
      }

      return ret;
    },
    contentStyle: function contentStyle() {
      var ret = {};
      var label = this.label;

      if (this.labelPosition === 'top') {
        return ret;
      }

      if (this.form.labelPosition === 'top' || this.form.inline) return ret;
      if (!label && !this.labelWidth && this.isNested) return ret;
      var labelWidth = this.labelWidth || this.form.labelWidth;

      if (labelWidth === 'auto') {
        if (this.labelWidth === 'auto') {
          ret.marginLeft = this.computedLabelWidth;
        } else if (this.form.labelWidth === 'auto') {
          ret.marginLeft = this.awsuiForm.autoLabelWidth;
        }
      } else {
        ret.marginLeft = labelWidth;
      }

      return ret;
    },
    form: function form() {
      var parent = this.$parent;
      var parentName = parent.$options.componentName;
      var that = this;

      while (parentName !== 'AwsuiForm') {
        if (parentName === 'AwsuiFormItem') {
          that.isNested = true;
        }

        parent = parent.$parent;
        parentName = parent.$options.componentName;
      }

      return parent;
    },
    fieldValue: function fieldValue() {
      var model = this.form.model;

      if (!model || !this.prop) {
        return;
      }

      var path = this.prop;

      if (path.indexOf(':') !== -1) {
        path = path.replace(/:/, '.');
      }

      return getPropByPath(model, path, true).v;
    },
    isRequired: function isRequired() {
      var rules = this.getRules();
      var isRequired = false;

      if (rules && rules.length) {
        rules.every(function (rule) {
          if (rule.required) {
            isRequired = true;
            return false;
          }

          return true;
        });
      }

      return isRequired;
    },
    _formSize: function _formSize() {
      return this.awsuiForm.size;
    },
    awsuiFormItemSize: function awsuiFormItemSize() {
      return this.size || this._formSize;
    },
    sizeClass: function sizeClass() {
      return this.awsuiFormItemSize || (this.$Awsui || {}).size;
    }
  },
  data: function data() {
    return {
      validateState: '',
      validateMessage: '',
      validateDisabled: false,
      validator: {},
      isNested: false,
      computedLabelWidth: ''
    };
  },
  methods: {
    validate: function validate(trigger) {
      var _this = this;

      var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
      this.validateDisabled = false;
      var rules = this.getFilteredRule(trigger);

      if ((!rules || rules.length === 0) && this.required === undefined) {
        callback();
        return true;
      }

      this.validateState = 'validating';
      var descriptor = {};

      if (rules && rules.length > 0) {
        rules.forEach(function (rule) {
          delete rule.trigger;
        });
      }

      descriptor[this.prop] = rules;
      var validator = new dist_web["a" /* default */](descriptor);
      validator.messages({
        required: function required(name) {
          return "必填";
        }
      });
      var model = {};
      model[this.prop] = this.fieldValue;
      validator.validate(model, {
        firstFields: true
      }, function (errors, invalidFields) {
        _this.validateState = !errors ? 'success' : 'error';
        _this.validateMessage = errors ? errors[0].message : '';
        callback(_this.validateMessage, invalidFields);
        _this.awsuiForm && _this.awsuiForm.$emit('validate', _this.prop, !errors, _this.validateMessage || null);
      });
    },
    clearValidate: function clearValidate() {
      this.validateState = '';
      this.validateMessage = '';
      this.validateDisabled = false;
    },
    resetField: function resetField() {
      var _this2 = this;

      this.validateState = '';
      this.validateMessage = '';
      var model = this.form.model;
      var value = this.fieldValue;
      var path = this.prop;

      if (path.indexOf(':') !== -1) {
        path = path.replace(/:/, '.');
      }

      var prop = getPropByPath(model, path, true);
      this.validateDisabled = true;

      if (Array.isArray(value)) {
        prop.o[prop.k] = [].concat(this.initialValue);
      } else {
        prop.o[prop.k] = this.initialValue;
      } // reset validateDisabled after onFieldChange triggered


      this.$nextTick(function () {
        _this2.validateDisabled = false;
      });
      this.broadcast('AwsuiTimeSelect', 'fieldReset', this.initialValue);
    },
    getRules: function getRules() {
      var formRules = this.form.rules;
      var selfRules = this.rules;
      var requiredRule = this.required !== undefined ? {
        required: !!this.required
      } : [];
      var prop = getPropByPath(formRules, this.prop || '');
      formRules = formRules ? prop.o[this.prop || ''] || prop.v : [];
      return [].concat(selfRules || formRules || []).concat(requiredRule);
    },
    getFilteredRule: function getFilteredRule(trigger) {
      var rules = this.getRules();
      return rules.filter(function (rule) {
        if (!rule.trigger || trigger === '') return true;

        if (Array.isArray(rule.trigger)) {
          return rule.trigger.indexOf(trigger) > -1;
        } else {
          return rule.trigger === trigger;
        }
      }).map(function (rule) {
        return merge({}, rule);
      });
    },
    onFieldBlur: function onFieldBlur() {
      this.validate('blur');
    },
    onFieldChange: function onFieldChange() {
      if (this.validateDisabled) {
        this.validateDisabled = false;
        return;
      }

      this.validate('change');
    },
    updateComputedLabelWidth: function updateComputedLabelWidth(width) {
      this.computedLabelWidth = width ? "".concat(width, "px") : '';
    },
    addValidateEvents: function addValidateEvents() {
      var rules = this.getRules();

      if (rules.length || this.required !== undefined) {
        this.$on('awsui.form.blur', this.onFieldBlur);
        this.$on('awsui.form.change', this.onFieldChange);
      }
    },
    removeValidateEvents: function removeValidateEvents() {
      this.$off();
    }
  },
  mounted: function mounted() {
    if (this.prop) {
      this.dispatch('AwsuiForm', 'awsui.form.addField', [this]);
      var initialValue = this.fieldValue;

      if (Array.isArray(initialValue)) {
        initialValue = [].concat(initialValue);
      }

      Object.defineProperty(this, 'initialValue', {
        value: initialValue
      });
      this.addValidateEvents();
    }
  },
  beforeDestroy: function beforeDestroy() {
    this.dispatch('AwsuiForm', 'awsui.form.removeField', [this]);
  }
});
// CONCATENATED MODULE: ./packages/form/src/form-item.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_form_itemvue_type_script_lang_js_ = (form_itemvue_type_script_lang_js_); 
// CONCATENATED MODULE: ./packages/form/src/form-item.vue





/* normalize component */

var form_item_component = Object(componentNormalizer["a" /* default */])(
  src_form_itemvue_type_script_lang_js_,
  form_itemvue_type_template_id_629a2022_render,
  form_itemvue_type_template_id_629a2022_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var form_item = (form_item_component.exports);
// CONCATENATED MODULE: ./packages/form-item/index.js


/* istanbul ignore next */

form_item.install = function (Vue) {
  Vue.component(form_item.name, form_item);
};

/* harmony default export */ var packages_form_item = (form_item);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/down-select-item/src/down-select.vue?vue&type=template&id=95f8b1a4&
var down_selectvue_type_template_id_95f8b1a4_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"downselect",staticClass:"awsui-down-select",style:(_vm.style)},[_vm._t("default"),(_vm.tips)?_c('div',{staticStyle:{"color":"#F56C6C","padding-left":"5px","font-size":"12px","line-height":"1"}},[_vm._v(_vm._s(_vm.tips)+" ")]):_vm._e()],2)}
var down_selectvue_type_template_id_95f8b1a4_staticRenderFns = []


// CONCATENATED MODULE: ./packages/down-select-item/src/down-select.vue?vue&type=template&id=95f8b1a4&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/down-select-item/src/down-select.vue?vue&type=script&lang=js&

//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var down_selectvue_type_script_lang_js_ = ({
  name: "AwsuiDownSelect",
  props: {
    width: {
      type: String,
      default: "350"
    },
    direction: {
      type: String,
      default: "right"
    },
    tips: {
      type: String,
      default: ""
    }
  },
  watch: {
    tips: {
      deep: true,
      handler: function handler(newVal) {
        console.log(newVal);
      }
    }
  },
  computed: {
    style: function style() {
      var style = {};

      if (this.width) {
        if (this.width.indexOf("%") != -1) {
          style.width = this.width;
        } else {
          style.width = this.width + "px";
        }
      }

      return style;
    }
  },
  mounted: function mounted() {
    this.getinit();
  },
  methods: {
    getinit: function getinit() {
      //				let width = 100 / this.$slots.default.length + '%';
      //				let select_width = document.getElementById(this.idname).querySelectorAll(".btn_selectWrap");
      var select_width = this.$refs.downselect.querySelectorAll(".awsui-down-select-item__wrap");

      for (var i = 0; i < select_width.length; i++) {
        //					select_width[i].style.width = width;
        if (this.direction == "right") {
          select_width[i].style.zIndex = -i + 100;
          select_width[i].style.marginLeft = "-14px";
          select_width[0].style.marginLeft = "0";

          if (i != select_width.length - 1) {
            select_width[i].classList.add("awsui-down-select-bg-right");
          }

          if (i != 0) {
            select_width[i].classList.add("awsui-down-select-border-left");
          }
        }

        if (this.direction == "left") {
          select_width[i].style.zIndex = i;
          select_width[i].style.marginRight = "-14px";

          if (i != 0) {
            select_width[i].classList.add("awsui-down-select-bg-left");
          }

          if (i != select_width.length - 1) {
            select_width[i].classList.add("awsui-down-select-border-right");
          }
        }
      }
    }
  }
});
// CONCATENATED MODULE: ./packages/down-select-item/src/down-select.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_down_selectvue_type_script_lang_js_ = (down_selectvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/down-select-item/src/down-select.vue?vue&type=style&index=0&lang=css&
var down_selectvue_type_style_index_0_lang_css_ = __webpack_require__("0ade");

// CONCATENATED MODULE: ./packages/down-select-item/src/down-select.vue






/* normalize component */

var down_select_component = Object(componentNormalizer["a" /* default */])(
  src_down_selectvue_type_script_lang_js_,
  down_selectvue_type_template_id_95f8b1a4_render,
  down_selectvue_type_template_id_95f8b1a4_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var down_select = (down_select_component.exports);
// CONCATENATED MODULE: ./packages/down-select/index.js


/* istanbul ignore next */

down_select.install = function (Vue) {
  Vue.component(down_select.name, down_select);
};

/* harmony default export */ var packages_down_select = (down_select);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/down-select-item/src/down-select-item.vue?vue&type=template&id=44774112&
var down_select_itemvue_type_template_id_44774112_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"pronbit",staticClass:"awsui-down-select-item__wrap",class:{prohibits:_vm.prohibit},style:(_vm.itemstyle)},[_c('span',{staticClass:"awsui-down-select-item__select",on:{"mouseover":_vm.triggerOption,"mouseleave":_vm.leaveOption}},[_c('div',{staticClass:"awsui-down-select-item__select-content"},[_vm._v(_vm._s(_vm.sCon)+" "),(!(_vm.sCon==='--'))?_c('i',{staticClass:"awsui-iconfont",staticStyle:{"font-size":"12px","position":"absolute","right":"10px"}},[_vm._v("")]):_vm._e()])]),_c('transition',{attrs:{"name":"fade"}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.optionwrapper),expression:"optionwrapper"}],ref:"wrapper",staticClass:"awsui-down-select-item__list",style:(_vm.style),on:{"mouseover":_vm.triggerOption,"mouseleave":_vm.leaveOption}},[_vm._t("default"),(_vm.ShowNotes)?_c('p',{staticStyle:{"text-align":"center","color":"#999","font-size":"14px","margin":"0","padding":"10px 0"}},[_vm._v("无数据")]):_vm._e(),(_vm.type == 'checkbox')?_c('div',[_c('div',{staticClass:"awsui-down-select-title"},[_vm._v(_vm._s(_vm.title))]),_c('el-checkbox-group',{on:{"change":_vm.change},model:{value:(_vm.checkList),callback:function ($$v) {_vm.checkList=$$v},expression:"checkList"}},_vm._l((_vm.options),function(item){return _c('el-checkbox',{key:item.label,attrs:{"label":item.value,"checked":item.checked,"disabled":item.disabled}},[_vm._v(_vm._s(item.label)+" ")])}),1)],1):(_vm.type == 'radio')?_c('div',_vm._l((_vm.options),function(item,index){return _c('div',{key:index,staticClass:"awsui-down-select-item_option-item",class:{hover:index===_vm.selectindex},on:{"click":function($event){return _vm.choose(item,$event,index)}}},[_c('span',{domProps:{"innerHTML":_vm._s(item.label)}}),_c('i',{directives:[{name:"show",rawName:"v-show",value:(_vm.selectindex===index),expression:"selectindex===index"}],staticClass:"awsui-iconfont",staticStyle:{"font-size":"12px","position":"absolute","right":"8px"}},[_vm._v("")])])}),0):_vm._e()],2)])],1)}
var down_select_itemvue_type_template_id_44774112_staticRenderFns = []


// CONCATENATED MODULE: ./packages/down-select-item/src/down-select-item.vue?vue&type=template&id=44774112&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/down-select-item/src/down-select-item.vue?vue&type=script&lang=js&




//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var down_select_itemvue_type_script_lang_js_ = ({
  name: "AwsuiDownSelectItem",
  props: {
    value: [String, Boolean, Number, Array],
    type: {
      type: String,
      default: "default"
    },
    prohibit: {
      type: Boolean,
      default: false
    },
    width: {
      type: String,
      default: "200"
    },
    itemwidth: {
      type: String,
      default: "120"
    },
    height: {
      type: String
    },
    maxheight: {
      type: String
    },
    title: {
      type: String,
      default: "勾选跳转范围"
    },
    options: {
      type: Array
    },
    selectContent: {
      type: String,
      default: "请选择"
    }
  },
  data: function data() {
    return {
      wrapperheight: "",
      selectindex: -1,
      ShowNotes: false,
      optionwrapper: true,
      checkList: [],
      sCon: ""
    };
  },
  watch: {
    value: function value() {
      this.init();
    },
    options: function options() {
      if (this.options.length == 0) {
        this.ShowNotes = true;
      } else {
        this.ShowNotes = false;
      }
    }
  },
  mounted: function mounted() {
    var _this = this;

    this.wrapperheight = this.$refs.wrapper.offsetHeight;
    this.optionwrapper = false;
    this.init();
    this.$nextTick(function () {
      var body = document.querySelector("body");

      if (body.append) {
        body.append(_this.$refs.wrapper);
      } else {
        body.appendChild(_this.$refs.wrapper);
      }
    });
  },
  computed: {
    style: function style() {
      var style = {};

      if (this.width) {
        style.width = this.width + "px";
      }

      if (this.height) {
        style.height = this.height + "px";
      }

      if (this.maxheight) {
        style.maxHeight = this.maxheight + "px";
      }

      return style;
    },
    itemstyle: function itemstyle() {
      var itemstyle = {};

      if (this.itemwidth) {
        if (this.itemwidth.indexOf("%") != -1) {
          itemstyle.width = this.itemwidth;
        } else {
          itemstyle.width = this.itemwidth + "px";
        }
      }

      return itemstyle;
    }
  },
  methods: {
    init: function init() {
      var _this2 = this;

      if (this.type === "radio") {
        if (this.options.length == 0) {
          this.ShowNotes = true;
        } else {
          this.ShowNotes = false;
        }

        if (this.value !== "" || this.value === false || this.value === true) {
          this.options.filter(function (item, index) {
            if (item.value == _this2.value) {
              _this2.selectindex = index;
              _this2.sCon = item.label;

              _this2.$emit("input", _this2.value);
            }
          });
          return false;
        }

        if (this.value == "") {
          this.selectindex = -1;
          this.sCon = this.selectContent;
          this.$emit("input", this.value);
        }
      }

      if (this.type === "checkbox") {
        if (this.options.length == 0) {
          this.ShowNotes = true;
        } else {
          this.ShowNotes = false;
        }

        this.checkList = this.value;
        var conarr = [];
        this.options.filter(function (item) {
          _this2.checkList.filter(function (val) {
            if (item.value == val) {
              conarr.push(item.label);
            }
          });
        });

        if (conarr.length == 0) {
          this.sCon = this.selectContent;
        } else {
          this.sCon = conarr.join(",");
        }

        this.$emit("input", this.checkList);
      }
    },
    triggerOption: function triggerOption() {
      if (this.prohibit == true) {
        return false;
      }

      this.optionwrapper = true;
      var autoHeight = document.querySelector("body").offsetHeight - (document.querySelector("body").offsetHeight - this.$refs.pronbit.getBoundingClientRect().top);

      if (autoHeight - this.wrapperheight > 0) {
        this.$refs.wrapper.style.left = this.$refs.pronbit.getBoundingClientRect().left + "px";
        this.$refs.wrapper.style.bottom = document.querySelector("body").offsetHeight - this.$refs.pronbit.getBoundingClientRect().top + "px";
        this.$refs.wrapper.style.top = "initial";
      } else {
        this.$refs.wrapper.style.left = this.$refs.pronbit.getBoundingClientRect().left + "px";
        this.$refs.wrapper.style.top = autoHeight + 24 + "px";
        this.$refs.wrapper.style.bottom = "initial";
      }
    },
    change: function change(value) {
      var conarr = [];
      this.options.filter(function (item) {
        value.filter(function (val) {
          if (item.value == val) {
            conarr.push(item.label);
          }
        });
      });

      if (value.length > 0) {
        this.sCon = conarr.join();
      } else {
        this.sCon = this.selectContent;
      }

      this.$emit("input", value);
      this.$emit("click", value);
    },
    choose: function choose(item, event, index) {
      this.selectindex = index;
      this.sCon = item.label;
      this.$emit("input", item.value);
      this.$emit("click", item.value);
      this.optionwrapper = false;
    },
    leaveOption: function leaveOption() {
      this.optionwrapper = false;
    }
  }
});
// CONCATENATED MODULE: ./packages/down-select-item/src/down-select-item.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_down_select_itemvue_type_script_lang_js_ = (down_select_itemvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/down-select-item/src/down-select-item.vue?vue&type=style&index=0&lang=css&
var down_select_itemvue_type_style_index_0_lang_css_ = __webpack_require__("fc21");

// EXTERNAL MODULE: ./packages/down-select-item/src/down-select-item.vue?vue&type=style&index=1&lang=less&
var down_select_itemvue_type_style_index_1_lang_less_ = __webpack_require__("a4f7");

// CONCATENATED MODULE: ./packages/down-select-item/src/down-select-item.vue







/* normalize component */

var down_select_item_component = Object(componentNormalizer["a" /* default */])(
  src_down_select_itemvue_type_script_lang_js_,
  down_select_itemvue_type_template_id_44774112_render,
  down_select_itemvue_type_template_id_44774112_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var down_select_item = (down_select_item_component.exports);
// CONCATENATED MODULE: ./packages/down-select-item/index.js

// 导入组件
 // 为组件提供 install 安装方法，供按需引入

down_select_item.install = function (Vue) {
  Vue.component(down_select_item.name, down_select_item);
}; // 默认导出组件,暴露给调用者


/* harmony default export */ var packages_down_select_item = (down_select_item);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
function _defineProperty(obj, key, value) {
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }

  return obj;
}
// EXTERNAL MODULE: ./node_modules/@vue/babel-helper-vue-jsx-merge-props/dist/helper.js
var helper = __webpack_require__("2638");
var helper_default = /*#__PURE__*/__webpack_require__.n(helper);

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/tabs/src/tab-bar.vue?vue&type=template&id=5321d00a&
var tab_barvue_type_template_id_5321d00a_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"awsui-tabs__active-bar",class:("is-" + (_vm.rootTabs.tabPosition)),style:(_vm.barStyle)})}
var tab_barvue_type_template_id_5321d00a_staticRenderFns = []


// CONCATENATED MODULE: ./packages/tabs/src/tab-bar.vue?vue&type=template&id=5321d00a&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/tabs/src/tab-bar.vue?vue&type=script&lang=js&





//
//
//

/* harmony default export */ var tab_barvue_type_script_lang_js_ = ({
  name: 'TabBar',
  props: {
    tabs: Array
  },
  inject: ['rootTabs'],
  computed: {
    barStyle: {
      get: function get() {
        var _this = this;

        var style = {};
        var offset = 0;
        var tabSize = 0;
        var sizeName = ['top', 'bottom'].indexOf(this.rootTabs.tabPosition) !== -1 ? 'width' : 'height';
        var sizeDir = sizeName === 'width' ? 'x' : 'y';

        var firstUpperCase = function firstUpperCase(str) {
          return str.toLowerCase().replace(/( |^)[a-z]/g, function (L) {
            return L.toUpperCase();
          });
        };

        this.tabs.every(function (tab, index) {
          var $el = arrayFind(_this.$parent.$refs.tabs || [], function (t) {
            return t.id.replace('tab-', '') === tab.paneName;
          });

          if (!$el) {
            return false;
          }

          if (!tab.active) {
            offset += $el["client".concat(firstUpperCase(sizeName))];
            return true;
          } else {
            tabSize = $el["client".concat(firstUpperCase(sizeName))];
            var tabStyles = window.getComputedStyle($el);

            if (sizeName === 'width' && _this.tabs.length > 1) {
              tabSize -= parseFloat(tabStyles.paddingLeft) + parseFloat(tabStyles.paddingRight);
            }

            if (sizeName === 'width') {
              offset += parseFloat(tabStyles.paddingLeft);
            }

            return false;
          }
        });
        var transform = "translate".concat(firstUpperCase(sizeDir), "(").concat(offset, "px)");
        style[sizeName] = tabSize + 'px';
        style.transform = transform;
        style.msTransform = transform;
        style.webkitTransform = transform;
        return style;
      }
    }
  }
});
// CONCATENATED MODULE: ./packages/tabs/src/tab-bar.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_tab_barvue_type_script_lang_js_ = (tab_barvue_type_script_lang_js_); 
// CONCATENATED MODULE: ./packages/tabs/src/tab-bar.vue





/* normalize component */

var tab_bar_component = Object(componentNormalizer["a" /* default */])(
  src_tab_barvue_type_script_lang_js_,
  tab_barvue_type_template_id_5321d00a_render,
  tab_barvue_type_template_id_5321d00a_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var tab_bar = (tab_bar_component.exports);
// EXTERNAL MODULE: ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
var ResizeObserver_es = __webpack_require__("6dd8");

// CONCATENATED MODULE: ./node_modules/element-ui/src/utils/resize-event.js






var resize_event_isServer = typeof window === 'undefined';
/* istanbul ignore next */

var resize_event_resizeHandler = function resizeHandler(entries) {
  var _iterator = _createForOfIteratorHelper(entries),
      _step;

  try {
    for (_iterator.s(); !(_step = _iterator.n()).done;) {
      var entry = _step.value;
      var listeners = entry.target.__resizeListeners__ || [];

      if (listeners.length) {
        listeners.forEach(function (fn) {
          fn();
        });
      }
    }
  } catch (err) {
    _iterator.e(err);
  } finally {
    _iterator.f();
  }
};
/* istanbul ignore next */


var resize_event_addResizeListener = function addResizeListener(element, fn) {
  if (resize_event_isServer) return;

  if (!element.__resizeListeners__) {
    element.__resizeListeners__ = [];
    element.__ro__ = new ResizeObserver_es["default"](resize_event_resizeHandler);

    element.__ro__.observe(element);
  }

  element.__resizeListeners__.push(fn);
};
/* istanbul ignore next */

var removeResizeListener = function removeResizeListener(element, fn) {
  if (!element || !element.__resizeListeners__) return;

  element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);

  if (!element.__resizeListeners__.length) {
    element.__ro__.disconnect();
  }
};
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/tabs/src/tab-nav.vue?vue&type=script&lang=js&









function tab_navvue_type_script_lang_js_noop() {}

var tab_navvue_type_script_lang_js_firstUpperCase = function firstUpperCase(str) {
  return str.toLowerCase().replace(/( |^)[a-z]/g, function (L) {
    return L.toUpperCase();
  });
};

/* harmony default export */ var tab_navvue_type_script_lang_js_ = ({
  name: 'TabNav',
  components: {
    TabBar: tab_bar
  },
  inject: ['rootTabs'],
  props: {
    panes: Array,
    currentName: String,
    editable: Boolean,
    onTabClick: {
      type: Function,
      default: tab_navvue_type_script_lang_js_noop
    },
    onTabRemove: {
      type: Function,
      default: tab_navvue_type_script_lang_js_noop
    },
    type: String,
    stretch: Boolean
  },
  data: function data() {
    return {
      scrollable: false,
      navOffset: 0,
      isFocus: false,
      focusable: true
    };
  },
  computed: {
    navStyle: function navStyle() {
      var dir = ['top', 'bottom'].indexOf(this.rootTabs.tabPosition) !== -1 ? 'X' : 'Y';
      return {
        transform: "translate".concat(dir, "(-").concat(this.navOffset, "px)")
      };
    },
    sizeName: function sizeName() {
      return ['top', 'bottom'].indexOf(this.rootTabs.tabPosition) !== -1 ? 'width' : 'height';
    }
  },
  methods: {
    scrollPrev: function scrollPrev() {
      var containerSize = this.$refs.navScroll["offset".concat(tab_navvue_type_script_lang_js_firstUpperCase(this.sizeName))];
      var currentOffset = this.navOffset;
      if (!currentOffset) return;
      var newOffset = currentOffset > containerSize ? currentOffset - containerSize : 0;
      this.navOffset = newOffset;
    },
    scrollNext: function scrollNext() {
      var navSize = this.$refs.nav["offset".concat(tab_navvue_type_script_lang_js_firstUpperCase(this.sizeName))];
      var containerSize = this.$refs.navScroll["offset".concat(tab_navvue_type_script_lang_js_firstUpperCase(this.sizeName))];
      var currentOffset = this.navOffset;
      if (navSize - currentOffset <= containerSize) return;
      var newOffset = navSize - currentOffset > containerSize * 2 ? currentOffset + containerSize : navSize - containerSize;
      this.navOffset = newOffset;
    },
    scrollToActiveTab: function scrollToActiveTab() {
      if (!this.scrollable) return;
      var nav = this.$refs.nav;
      var activeTab = this.$el.querySelector('.is-active');
      if (!activeTab) return;
      var navScroll = this.$refs.navScroll;
      var isHorizontal = ['top', 'bottom'].indexOf(this.rootTabs.tabPosition) !== -1;
      var activeTabBounding = activeTab.getBoundingClientRect();
      var navScrollBounding = navScroll.getBoundingClientRect();
      var maxOffset = isHorizontal ? nav.offsetWidth - navScrollBounding.width : nav.offsetHeight - navScrollBounding.height;
      var currentOffset = this.navOffset;
      var newOffset = currentOffset;

      if (isHorizontal) {
        if (activeTabBounding.left < navScrollBounding.left) {
          newOffset = currentOffset - (navScrollBounding.left - activeTabBounding.left);
        }

        if (activeTabBounding.right > navScrollBounding.right) {
          newOffset = currentOffset + activeTabBounding.right - navScrollBounding.right;
        }
      } else {
        if (activeTabBounding.top < navScrollBounding.top) {
          newOffset = currentOffset - (navScrollBounding.top - activeTabBounding.top);
        }

        if (activeTabBounding.bottom > navScrollBounding.bottom) {
          newOffset = currentOffset + (activeTabBounding.bottom - navScrollBounding.bottom);
        }
      }

      newOffset = Math.max(newOffset, 0);
      this.navOffset = Math.min(newOffset, maxOffset);
    },
    update: function update() {
      if (!this.$refs.nav) return;
      var sizeName = this.sizeName;
      var navSize = this.$refs.nav["offset".concat(tab_navvue_type_script_lang_js_firstUpperCase(sizeName))];
      var containerSize = this.$refs.navScroll["offset".concat(tab_navvue_type_script_lang_js_firstUpperCase(sizeName))];
      var currentOffset = this.navOffset;

      if (containerSize < navSize) {
        var _currentOffset = this.navOffset;
        this.scrollable = this.scrollable || {};
        this.scrollable.prev = _currentOffset;
        this.scrollable.next = _currentOffset + containerSize < navSize;

        if (navSize - _currentOffset < containerSize) {
          this.navOffset = navSize - containerSize;
        }
      } else {
        this.scrollable = false;

        if (currentOffset > 0) {
          this.navOffset = 0;
        }
      }
    },
    changeTab: function changeTab(e) {
      var keyCode = e.keyCode;
      var nextIndex;
      var currentIndex, tabList;

      if ([37, 38, 39, 40].indexOf(keyCode) !== -1) {
        // 左右上下键更换tab
        tabList = e.currentTarget.querySelectorAll('[role=tab]');
        currentIndex = Array.prototype.indexOf.call(tabList, e.target);
      } else {
        return;
      }

      if (keyCode === 37 || keyCode === 38) {
        // left
        if (currentIndex === 0) {
          // first
          nextIndex = tabList.length - 1;
        } else {
          nextIndex = currentIndex - 1;
        }
      } else {
        // right
        if (currentIndex < tabList.length - 1) {
          // not last
          nextIndex = currentIndex + 1;
        } else {
          nextIndex = 0;
        }
      }

      tabList[nextIndex].focus(); // 改变焦点元素

      tabList[nextIndex].click(); // 选中下一个tab

      this.setFocus();
    },
    setFocus: function setFocus() {
      if (this.focusable) {
        this.isFocus = true;
      }
    },
    removeFocus: function removeFocus() {
      this.isFocus = false;
    },
    visibilityChangeHandler: function visibilityChangeHandler() {
      var _this = this;

      var visibility = document.visibilityState;

      if (visibility === 'hidden') {
        this.focusable = false;
      } else if (visibility === 'visible') {
        setTimeout(function () {
          _this.focusable = true;
        }, 50);
      }
    },
    windowBlurHandler: function windowBlurHandler() {
      this.focusable = false;
    },
    windowFocusHandler: function windowFocusHandler() {
      var _this2 = this;

      setTimeout(function () {
        _this2.focusable = true;
      }, 50);
    }
  },
  updated: function updated() {
    this.update();
  },
  render: function render(h) {
    var _this3 = this;

    var type = this.type,
        panes = this.panes,
        editable = this.editable,
        stretch = this.stretch,
        onTabClick = this.onTabClick,
        onTabRemove = this.onTabRemove,
        navStyle = this.navStyle,
        scrollable = this.scrollable,
        scrollNext = this.scrollNext,
        scrollPrev = this.scrollPrev,
        changeTab = this.changeTab,
        setFocus = this.setFocus,
        removeFocus = this.removeFocus;
    var scrollBtn = scrollable ? [h("span", {
      "class": ['awsui-tabs__nav-prev', scrollable.prev ? '' : 'is-disabled'],
      "on": {
        "click": scrollPrev
      }
    }, [h("i", {
      "class": "awsui-icon-arrow-left"
    })]), h("span", {
      "class": ['awsui-tabs__nav-next', scrollable.next ? '' : 'is-disabled'],
      "on": {
        "click": scrollNext
      }
    }, [h("i", {
      "class": "awsui-icon-arrow-right"
    })])] : null;

    var tabs = this._l(panes, function (pane, index) {
      var _class;

      var tabName = pane.name || pane.index || index;
      var closable = pane.isClosable || editable;
      pane.index = "".concat(index);
      var btnClose = closable ? h("span", {
        "class": "awsui-iconfont awsui-icon-close",
        "on": {
          "click": function click(ev) {
            onTabRemove(pane, ev);
          }
        }
      }, ["\uE6FE"]) : null;
      var tabLabelContent = pane.$slots.label || pane.label;
      var tabindex = pane.active ? 0 : -1;
      return h("div", {
        "class": (_class = {
          'awsui-tabs__item': true
        }, _defineProperty(_class, "is-".concat(_this3.rootTabs.tabPosition), true), _defineProperty(_class, 'is-active', pane.active), _defineProperty(_class, 'is-disabled', pane.disabled), _defineProperty(_class, 'is-closable', closable), _defineProperty(_class, 'is-focus', _this3.isFocus), _class),
        "attrs": {
          "id": "tab-".concat(tabName),
          "aria-controls": "pane-".concat(tabName),
          "role": "tab",
          "aria-selected": pane.active,
          "tabindex": tabindex
        },
        "key": "tab-".concat(tabName),
        "ref": "tabs",
        "refInFor": true,
        "on": {
          "focus": function focus() {
            setFocus();
          },
          "blur": function blur() {
            removeFocus();
          },
          "click": function click(ev) {
            removeFocus();
            onTabClick(pane, tabName, ev);
          },
          "keydown": function keydown(ev) {
            if (closable && (ev.keyCode === 46 || ev.keyCode === 8)) {
              onTabRemove(pane, ev);
            }
          }
        }
      }, [tabLabelContent, btnClose]);
    });

    return h("div", {
      "class": ['awsui-tabs__nav-wrap', scrollable ? 'is-scrollable' : '', "is-".concat(this.rootTabs.tabPosition)]
    }, [scrollBtn, h("div", {
      "class": ['awsui-tabs__nav-scroll'],
      "ref": "navScroll"
    }, [h("div", {
      "class": ['awsui-tabs__nav', "is-".concat(this.rootTabs.tabPosition), stretch && ['top', 'bottom'].indexOf(this.rootTabs.tabPosition) !== -1 ? 'is-stretch' : ''],
      "ref": "nav",
      "style": navStyle,
      "attrs": {
        "role": "tablist"
      },
      "on": {
        "keydown": changeTab
      }
    }, [!type ? h("tab-bar", {
      "attrs": {
        "tabs": panes
      }
    }) : null, tabs])])]);
  },
  mounted: function mounted() {
    var _this4 = this;

    resize_event_addResizeListener(this.$el, this.update);
    document.addEventListener('visibilitychange', this.visibilityChangeHandler);
    window.addEventListener('blur', this.windowBlurHandler);
    window.addEventListener('focus', this.windowFocusHandler);
    setTimeout(function () {
      _this4.scrollToActiveTab();
    }, 0);
  },
  beforeDestroy: function beforeDestroy() {
    if (this.$el && this.update) removeResizeListener(this.$el, this.update);
    document.removeEventListener('visibilitychange', this.visibilityChangeHandler);
    window.removeEventListener('blur', this.windowBlurHandler);
    window.removeEventListener('focus', this.windowFocusHandler);
  }
});
// CONCATENATED MODULE: ./packages/tabs/src/tab-nav.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_tab_navvue_type_script_lang_js_ = (tab_navvue_type_script_lang_js_); 
// CONCATENATED MODULE: ./packages/tabs/src/tab-nav.vue
var tab_nav_render, tab_nav_staticRenderFns




/* normalize component */

var tab_nav_component = Object(componentNormalizer["a" /* default */])(
  src_tab_navvue_type_script_lang_js_,
  tab_nav_render,
  tab_nav_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var tab_nav = (tab_nav_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/tabs/src/tabs.vue?vue&type=script&lang=js&







/* harmony default export */ var tabsvue_type_script_lang_js_ = ({
  name: 'AwsuiTabs',
  components: {
    TabNav: tab_nav
  },
  props: {
    type: String,
    activeName: String,
    closable: Boolean,
    addable: Boolean,
    value: {},
    editable: Boolean,
    tabPosition: {
      type: String,
      default: 'top'
    },
    beforeLeave: Function,
    stretch: Boolean
  },
  provide: function provide() {
    return {
      rootTabs: this
    };
  },
  data: function data() {
    return {
      currentName: this.value || this.activeName,
      panes: []
    };
  },
  watch: {
    activeName: function activeName(value) {
      this.setCurrentName(value);
    },
    value: function value(_value) {
      this.setCurrentName(_value);
    },
    currentName: function currentName(value) {
      var _this = this;

      if (this.$refs.nav) {
        this.$nextTick(function () {
          _this.$refs.nav.$nextTick(function (_) {
            _this.$refs.nav.scrollToActiveTab();
          });
        });
      }
    }
  },
  methods: {
    calcPaneInstances: function calcPaneInstances() {
      var _this2 = this;

      var isForceUpdate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;

      if (this.$slots.default) {
        var paneSlots = this.$slots.default.filter(function (vnode) {
          return vnode.tag && vnode.componentOptions && vnode.componentOptions.Ctor.options.name === 'AwsuiTabPane';
        }); // update indeed

        var panes = paneSlots.map(function (_ref) {
          var componentInstance = _ref.componentInstance;
          return componentInstance;
        });
        var panesChanged = !(panes.length === this.panes.length && panes.every(function (pane, index) {
          return pane === _this2.panes[index];
        }));

        if (isForceUpdate || panesChanged) {
          this.panes = panes;
        }
      } else if (this.panes.length !== 0) {
        this.panes = [];
      }
    },
    handleTabClick: function handleTabClick(tab, tabName, event) {
      if (tab.disabled) return;
      this.setCurrentName(tabName);
      this.$emit('tab-click', tab, event);
    },
    handleTabRemove: function handleTabRemove(pane, ev) {
      if (pane.disabled) return;
      ev.stopPropagation();
      this.$emit('edit', pane.name, 'remove');
      this.$emit('tab-remove', pane.name);
    },
    handleTabAdd: function handleTabAdd() {
      this.$emit('edit', null, 'add');
      this.$emit('tab-add');
    },
    setCurrentName: function setCurrentName(value) {
      var _this3 = this;

      var changeCurrentName = function changeCurrentName() {
        _this3.currentName = value;

        _this3.$emit('input', value);
      };

      if (this.currentName !== value && this.beforeLeave) {
        var before = this.beforeLeave(value, this.currentName);

        if (before && before.then) {
          before.then(function () {
            changeCurrentName();
            _this3.$refs.nav && _this3.$refs.nav.removeFocus();
          }, function () {// https://github.com/ElemeFE/element/pull/14816
            // ignore promise rejection in `before-leave` hook
          });
        } else if (before !== false) {
          changeCurrentName();
        }
      } else {
        changeCurrentName();
      }
    }
  },
  render: function render(h) {
    var _class;

    var type = this.type,
        handleTabClick = this.handleTabClick,
        handleTabRemove = this.handleTabRemove,
        handleTabAdd = this.handleTabAdd,
        currentName = this.currentName,
        panes = this.panes,
        editable = this.editable,
        addable = this.addable,
        tabPosition = this.tabPosition,
        stretch = this.stretch;
    var newButton = editable || addable ? h("span", {
      "class": "awsui-tabs__new-tab",
      "on": {
        "click": handleTabAdd,
        "keydown": function keydown(ev) {
          if (ev.keyCode === 13) {
            handleTabAdd();
          }
        }
      },
      "attrs": {
        "tabindex": "0"
      }
    }, [h("i", {
      "class": "awsui-iconfont"
    }, ["\uEB9A"])]) : null;
    var navData = {
      props: {
        currentName: currentName,
        onTabClick: handleTabClick,
        onTabRemove: handleTabRemove,
        editable: editable,
        type: type,
        panes: panes,
        stretch: stretch
      },
      ref: 'nav'
    };
    var header = h("div", {
      "class": ['awsui-tabs__header', "is-".concat(tabPosition)]
    }, [newButton, h("tab-nav", helper_default()([{}, navData]))]);
    var panels = h("div", {
      "class": "awsui-tabs__content"
    }, [this.$slots.default]);
    return h("div", {
      "class": (_class = {
        'awsui-tabs': true,
        'awsui-tabs--card': type === 'card'
      }, _defineProperty(_class, "awsui-tabs--".concat(tabPosition), true), _defineProperty(_class, 'awsui-tabs--border-card', type === 'border-card'), _class)
    }, [tabPosition !== 'bottom' ? [header, panels] : [panels, header]]);
  },
  created: function created() {
    if (!this.currentName) {
      this.setCurrentName('0');
    }

    this.$on('tab-nav-update', this.calcPaneInstances.bind(null, true));
  },
  mounted: function mounted() {
    this.calcPaneInstances();
  },
  updated: function updated() {
    this.calcPaneInstances();
  }
});
// CONCATENATED MODULE: ./packages/tabs/src/tabs.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_tabsvue_type_script_lang_js_ = (tabsvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/tabs/src/tabs.vue?vue&type=style&index=0&lang=css&
var tabsvue_type_style_index_0_lang_css_ = __webpack_require__("37bc");

// CONCATENATED MODULE: ./packages/tabs/src/tabs.vue
var tabs_render, tabs_staticRenderFns





/* normalize component */

var tabs_component = Object(componentNormalizer["a" /* default */])(
  src_tabsvue_type_script_lang_js_,
  tabs_render,
  tabs_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var src_tabs = (tabs_component.exports);
// CONCATENATED MODULE: ./packages/tabs/index.js


/* istanbul ignore next */

src_tabs.install = function (Vue) {
  Vue.component(src_tabs.name, src_tabs);
};

/* harmony default export */ var packages_tabs = (src_tabs);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/tab-pane/src/tab-pane.vue?vue&type=template&id=d6234f52&
var tab_panevue_type_template_id_d6234f52_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return ((!_vm.lazy || _vm.loaded) || _vm.active)?_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.active),expression:"active"}],staticClass:"awsui-tab-pane",attrs:{"role":"tabpanel","aria-hidden":!_vm.active,"id":("pane-" + _vm.paneName),"aria-labelledby":("tab-" + _vm.paneName)}},[_vm._t("default")],2):_vm._e()}
var tab_panevue_type_template_id_d6234f52_staticRenderFns = []


// CONCATENATED MODULE: ./packages/tab-pane/src/tab-pane.vue?vue&type=template&id=d6234f52&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/tab-pane/src/tab-pane.vue?vue&type=script&lang=js&

//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var tab_panevue_type_script_lang_js_ = ({
  name: 'AwsuiTabPane',
  componentName: 'AwsuiTabPane',
  props: {
    label: String,
    labelContent: Function,
    name: String,
    closable: Boolean,
    disabled: Boolean,
    lazy: Boolean
  },
  data: function data() {
    return {
      index: null,
      loaded: false
    };
  },
  computed: {
    isClosable: function isClosable() {
      return this.closable || this.$parent.closable;
    },
    active: function active() {
      var $this = this;
      var active = this.$parent.currentName === (this.name || this.index);

      if (active) {
        $this.loaded = true;
      }

      return active;
    },
    paneName: function paneName() {
      return this.name || this.index;
    }
  },
  updated: function updated() {
    this.$parent.$emit('tab-nav-update');
  }
});
// CONCATENATED MODULE: ./packages/tab-pane/src/tab-pane.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_tab_panevue_type_script_lang_js_ = (tab_panevue_type_script_lang_js_); 
// CONCATENATED MODULE: ./packages/tab-pane/src/tab-pane.vue





/* normalize component */

var tab_pane_component = Object(componentNormalizer["a" /* default */])(
  src_tab_panevue_type_script_lang_js_,
  tab_panevue_type_template_id_d6234f52_render,
  tab_panevue_type_template_id_d6234f52_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var tab_pane = (tab_pane_component.exports);
// CONCATENATED MODULE: ./packages/tab-pane/index.js


/* istanbul ignore next */

tab_pane.install = function (Vue) {
  Vue.component(tab_pane.name, tab_pane);
};

/* harmony default export */ var packages_tab_pane = (tab_pane);
// EXTERNAL MODULE: ./packages/message/index.js + 6 modules
var packages_message = __webpack_require__("d2d7");

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/message-box/src/message-box.vue?vue&type=template&id=ed5b8260&scoped=true&
var message_boxvue_type_template_id_ed5b8260_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{"name":"msgbox-fade"}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.visible),expression:"visible"}],staticClass:"awsui-message-box__wrapper",attrs:{"tabindex":"-1","role":"dialog","aria-modal":"true","aria-label":_vm.title || 'dialog'},on:{"click":function($event){if($event.target !== $event.currentTarget){ return null; }return _vm.handleWrapperClick($event)}}},[_c('div',{staticClass:"awsui-message-box",class:[_vm.customClass, _vm.center && 'awsui-message-box--center']},[(_vm.title !== null)?_c('div',{staticClass:"awsui-message-box__header"},[_c('div',{staticClass:"awsui-message-box__title"},[(_vm.icon && _vm.center)?_c('div',{class:['awsui-message-box__status', _vm.icon]}):_vm._e(),_c('span',[_vm._v(_vm._s(_vm.title))])]),(_vm.showClose)?_c('button',{staticClass:"awsui-message-box__headerbtn",attrs:{"type":"button","aria-label":"Close"},on:{"click":function($event){return _vm.handleAction(_vm.distinguishCancelAndClose ? 'close' : 'cancel')},"keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.handleAction(_vm.distinguishCancelAndClose ? 'close' : 'cancel')}}},[_c('i',{staticClass:"awsui-iconfont awsui-message-box__close awsui-icon-close"},[_vm._v("  ")])]):_vm._e()]):_vm._e(),_c('div',{staticClass:"awsui-message-box__content"},[_c('div',{staticClass:"awsui-message-box__container"},[(_vm.icon && !_vm.center && _vm.message !== '')?_c('div',{class:['awsui-message-box__status', _vm.icon]}):_vm._e(),(_vm.message !== '')?_c('div',{staticClass:"awsui-message-box__message"},[_vm._t("default",[(!_vm.dangerouslyUseHTMLString)?_c('p',[_vm._v(_vm._s(_vm.message))]):_c('p',{domProps:{"innerHTML":_vm._s(_vm.message)}})])],2):_vm._e()]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.showInput),expression:"showInput"}],staticClass:"awsui-message-box__input"},[_c('awsui-input',{ref:"input",attrs:{"type":_vm.inputType,"placeholder":_vm.inputPlaceholder},nativeOn:{"keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.handleInputEnter($event)}},model:{value:(_vm.inputValue),callback:function ($$v) {_vm.inputValue=$$v},expression:"inputValue"}}),_c('div',{staticClass:"awsui-message-box__errormsg",style:({ visibility: !!_vm.editorErrorMessage ? 'visible' : 'hidden' })},[_vm._v(_vm._s(_vm.editorErrorMessage)+" ")])],1)]),_c('div',{staticClass:"awsui-message-box__btns"},[_c('awsui-button',{directives:[{name:"show",rawName:"v-show",value:(_vm.showConfirmButton),expression:"showConfirmButton"}],ref:"confirm",attrs:{"type":"primary","loading":_vm.confirmButtonLoading,"round":_vm.roundButton},on:{"keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.handleAction('confirm')}},nativeOn:{"click":function($event){return _vm.handleAction('confirm')}}},[_vm._v(" "+_vm._s(_vm.confirmButtonText || _vm.t('awsui.messagebox.confirm'))+" ")]),(_vm.showCancelButton)?_c('awsui-button',{attrs:{"loading":_vm.cancelButtonLoading,"round":_vm.roundButton},on:{"keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.handleAction('cancel')}},nativeOn:{"click":function($event){return _vm.handleAction('cancel')}}},[_vm._v(" "+_vm._s(_vm.cancelButtonText || _vm.t('awsui.messagebox.cancel'))+" ")]):_vm._e()],1)])])])}
var message_boxvue_type_template_id_ed5b8260_scoped_true_staticRenderFns = []


// CONCATENATED MODULE: ./packages/message-box/src/message-box.vue?vue&type=template&id=ed5b8260&scoped=true&

// CONCATENATED MODULE: ./node_modules/element-ui/src/utils/popup/popup-manager.js








var hasModal = false;
var hasInitZIndex = false;
var popup_manager_zIndex;

var popup_manager_getModal = function getModal() {
  if (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer) return;
  var modalDom = PopupManager.modalDom;

  if (modalDom) {
    hasModal = true;
  } else {
    hasModal = false;
    modalDom = document.createElement('div');
    PopupManager.modalDom = modalDom;
    modalDom.addEventListener('touchmove', function (event) {
      event.preventDefault();
      event.stopPropagation();
    });
    modalDom.addEventListener('click', function () {
      PopupManager.doOnModalClick && PopupManager.doOnModalClick();
    });
  }

  return modalDom;
};

var instances = {};
var PopupManager = {
  modalFade: true,
  getInstance: function getInstance(id) {
    return instances[id];
  },
  register: function register(id, instance) {
    if (id && instance) {
      instances[id] = instance;
    }
  },
  deregister: function deregister(id) {
    if (id) {
      instances[id] = null;
      delete instances[id];
    }
  },
  nextZIndex: function nextZIndex() {
    return PopupManager.zIndex++;
  },
  modalStack: [],
  doOnModalClick: function doOnModalClick() {
    var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
    if (!topItem) return;
    var instance = PopupManager.getInstance(topItem.id);

    if (instance && instance.closeOnClickModal) {
      instance.close();
    }
  },
  openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
    if (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer) return;
    if (!id || zIndex === undefined) return;
    this.modalFade = modalFade;
    var modalStack = this.modalStack;

    for (var i = 0, j = modalStack.length; i < j; i++) {
      var item = modalStack[i];

      if (item.id === id) {
        return;
      }
    }

    var modalDom = popup_manager_getModal();
    addClass(modalDom, 'v-modal');

    if (this.modalFade && !hasModal) {
      addClass(modalDom, 'v-modal-enter');
    }

    if (modalClass) {
      var classArr = modalClass.trim().split(/\s+/);
      classArr.forEach(function (item) {
        return addClass(modalDom, item);
      });
    }

    setTimeout(function () {
      removeClass(modalDom, 'v-modal-enter');
    }, 200);

    if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
      dom.parentNode.appendChild(modalDom);
    } else {
      document.body.appendChild(modalDom);
    }

    if (zIndex) {
      modalDom.style.zIndex = zIndex;
    }

    modalDom.tabIndex = 0;
    modalDom.style.display = '';
    this.modalStack.push({
      id: id,
      zIndex: zIndex,
      modalClass: modalClass
    });
  },
  closeModal: function closeModal(id) {
    var modalStack = this.modalStack;
    var modalDom = popup_manager_getModal();

    if (modalStack.length > 0) {
      var topItem = modalStack[modalStack.length - 1];

      if (topItem.id === id) {
        if (topItem.modalClass) {
          var classArr = topItem.modalClass.trim().split(/\s+/);
          classArr.forEach(function (item) {
            return removeClass(modalDom, item);
          });
        }

        modalStack.pop();

        if (modalStack.length > 0) {
          modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
        }
      } else {
        for (var i = modalStack.length - 1; i >= 0; i--) {
          if (modalStack[i].id === id) {
            modalStack.splice(i, 1);
            break;
          }
        }
      }
    }

    if (modalStack.length === 0) {
      if (this.modalFade) {
        addClass(modalDom, 'v-modal-leave');
      }

      setTimeout(function () {
        if (modalStack.length === 0) {
          if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
          modalDom.style.display = 'none';
          PopupManager.modalDom = undefined;
        }

        removeClass(modalDom, 'v-modal-leave');
      }, 200);
    }
  }
};
Object.defineProperty(PopupManager, 'zIndex', {
  configurable: true,
  get: function get() {
    if (!hasInitZIndex) {
      popup_manager_zIndex = popup_manager_zIndex || (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
      hasInitZIndex = true;
    }

    return popup_manager_zIndex;
  },
  set: function set(value) {
    popup_manager_zIndex = value;
  }
});

var popup_manager_getTopPopup = function getTopPopup() {
  if (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer) return;

  if (PopupManager.modalStack.length > 0) {
    var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
    if (!topPopup) return;
    var instance = PopupManager.getInstance(topPopup.id);
    return instance;
  }
};

if (!external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer) {
  // handle `esc` key when the popup is shown
  window.addEventListener('keydown', function (event) {
    if (event.keyCode === 27) {
      var topPopup = popup_manager_getTopPopup();

      if (topPopup && topPopup.closeOnPressEscape) {
        topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
      }
    }
  });
}

/* harmony default export */ var popup_manager = (PopupManager);
// CONCATENATED MODULE: ./node_modules/element-ui/src/utils/scrollbar-width.js

var scrollBarWidth;
/* harmony default export */ var scrollbar_width = (function () {
  if (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer) return 0;
  if (scrollBarWidth !== undefined) return scrollBarWidth;
  var outer = document.createElement('div');
  outer.className = 'el-scrollbar__wrap';
  outer.style.visibility = 'hidden';
  outer.style.width = '100px';
  outer.style.position = 'absolute';
  outer.style.top = '-9999px';
  document.body.appendChild(outer);
  var widthNoScroll = outer.offsetWidth;
  outer.style.overflow = 'scroll';
  var inner = document.createElement('div');
  inner.style.width = '100%';
  outer.appendChild(inner);
  var widthWithScroll = inner.offsetWidth;
  outer.parentNode.removeChild(outer);
  scrollBarWidth = widthNoScroll - widthWithScroll;
  return scrollBarWidth;
});
;
// CONCATENATED MODULE: ./node_modules/element-ui/src/utils/popup/index.js






var idSeed = 1;
var popup_scrollBarWidth;
/* harmony default export */ var popup = ({
  props: {
    visible: {
      type: Boolean,
      default: false
    },
    openDelay: {},
    closeDelay: {},
    zIndex: {},
    modal: {
      type: Boolean,
      default: false
    },
    modalFade: {
      type: Boolean,
      default: true
    },
    modalClass: {},
    modalAppendToBody: {
      type: Boolean,
      default: false
    },
    lockScroll: {
      type: Boolean,
      default: true
    },
    closeOnPressEscape: {
      type: Boolean,
      default: false
    },
    closeOnClickModal: {
      type: Boolean,
      default: false
    }
  },
  beforeMount: function beforeMount() {
    this._popupId = 'popup-' + idSeed++;
    popup_manager.register(this._popupId, this);
  },
  beforeDestroy: function beforeDestroy() {
    popup_manager.deregister(this._popupId);
    popup_manager.closeModal(this._popupId);
    this.restoreBodyStyle();
  },
  data: function data() {
    return {
      opened: false,
      bodyPaddingRight: null,
      computedBodyPaddingRight: 0,
      withoutHiddenClass: true,
      rendered: false
    };
  },
  watch: {
    visible: function visible(val) {
      var _this = this;

      if (val) {
        if (this._opening) return;

        if (!this.rendered) {
          this.rendered = true;
          external_commonjs_vue_commonjs2_vue_root_Vue_default.a.nextTick(function () {
            _this.open();
          });
        } else {
          this.open();
        }
      } else {
        this.close();
      }
    }
  },
  methods: {
    open: function open(options) {
      var _this2 = this;

      if (!this.rendered) {
        this.rendered = true;
      }

      var props = merge({}, this.$props || this, options);

      if (this._closeTimer) {
        clearTimeout(this._closeTimer);
        this._closeTimer = null;
      }

      clearTimeout(this._openTimer);
      var openDelay = Number(props.openDelay);

      if (openDelay > 0) {
        this._openTimer = setTimeout(function () {
          _this2._openTimer = null;

          _this2.doOpen(props);
        }, openDelay);
      } else {
        this.doOpen(props);
      }
    },
    doOpen: function doOpen(props) {
      if (this.$isServer) return;
      if (this.willOpen && !this.willOpen()) return;
      if (this.opened) return;
      this._opening = true;
      var dom = this.$el;
      var modal = props.modal;
      var zIndex = props.zIndex;

      if (zIndex) {
        popup_manager.zIndex = zIndex;
      }

      if (modal) {
        if (this._closing) {
          popup_manager.closeModal(this._popupId);
          this._closing = false;
        }

        popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);

        if (props.lockScroll) {
          this.withoutHiddenClass = !hasClass(document.body, 'el-popup-parent--hidden');

          if (this.withoutHiddenClass) {
            this.bodyPaddingRight = document.body.style.paddingRight;
            this.computedBodyPaddingRight = parseInt(getStyle(document.body, 'paddingRight'), 10);
          }

          popup_scrollBarWidth = scrollbar_width();
          var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
          var bodyOverflowY = getStyle(document.body, 'overflowY');

          if (popup_scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
            document.body.style.paddingRight = this.computedBodyPaddingRight + popup_scrollBarWidth + 'px';
          }

          addClass(document.body, 'el-popup-parent--hidden');
        }
      }

      if (getComputedStyle(dom).position === 'static') {
        dom.style.position = 'absolute';
      }

      dom.style.zIndex = popup_manager.nextZIndex();
      this.opened = true;
      this.onOpen && this.onOpen();
      this.doAfterOpen();
    },
    doAfterOpen: function doAfterOpen() {
      this._opening = false;
    },
    close: function close() {
      var _this3 = this;

      if (this.willClose && !this.willClose()) return;

      if (this._openTimer !== null) {
        clearTimeout(this._openTimer);
        this._openTimer = null;
      }

      clearTimeout(this._closeTimer);
      var closeDelay = Number(this.closeDelay);

      if (closeDelay > 0) {
        this._closeTimer = setTimeout(function () {
          _this3._closeTimer = null;

          _this3.doClose();
        }, closeDelay);
      } else {
        this.doClose();
      }
    },
    doClose: function doClose() {
      this._closing = true;
      this.onClose && this.onClose();

      if (this.lockScroll) {
        setTimeout(this.restoreBodyStyle, 200);
      }

      this.opened = false;
      this.doAfterClose();
    },
    doAfterClose: function doAfterClose() {
      popup_manager.closeModal(this._popupId);
      this._closing = false;
    },
    restoreBodyStyle: function restoreBodyStyle() {
      if (this.modal && this.withoutHiddenClass) {
        document.body.style.paddingRight = this.bodyPaddingRight;
        removeClass(document.body, 'el-popup-parent--hidden');
      }

      this.withoutHiddenClass = true;
    }
  }
});

// CONCATENATED MODULE: ./node_modules/element-ui/src/mixins/locale.js

/* harmony default export */ var mixins_locale = ({
  methods: {
    t: function t() {
      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }

      return locale_t.apply(this, args);
    }
  }
});
// CONCATENATED MODULE: ./node_modules/element-ui/src/utils/aria-utils.js




var aria = aria || {};
aria.Utils = aria.Utils || {};
/**
 * @desc Set focus on descendant nodes until the first focusable element is
 *       found.
 * @param element
 *          DOM node for which to find the first focusable descendant.
 * @returns
 *  true if a focusable element is found and focus is set.
 */

aria.Utils.focusFirstDescendant = function (element) {
  for (var i = 0; i < element.childNodes.length; i++) {
    var child = element.childNodes[i];

    if (aria.Utils.attemptFocus(child) || aria.Utils.focusFirstDescendant(child)) {
      return true;
    }
  }

  return false;
};
/**
 * @desc Find the last descendant node that is focusable.
 * @param element
 *          DOM node for which to find the last focusable descendant.
 * @returns
 *  true if a focusable element is found and focus is set.
 */


aria.Utils.focusLastDescendant = function (element) {
  for (var i = element.childNodes.length - 1; i >= 0; i--) {
    var child = element.childNodes[i];

    if (aria.Utils.attemptFocus(child) || aria.Utils.focusLastDescendant(child)) {
      return true;
    }
  }

  return false;
};
/**
 * @desc Set Attempt to set focus on the current node.
 * @param element
 *          The node to attempt to focus on.
 * @returns
 *  true if element is focused.
 */


aria.Utils.attemptFocus = function (element) {
  if (!aria.Utils.isFocusable(element)) {
    return false;
  }

  aria.Utils.IgnoreUtilFocusChanges = true;

  try {
    element.focus();
  } catch (e) {}

  aria.Utils.IgnoreUtilFocusChanges = false;
  return document.activeElement === element;
};

aria.Utils.isFocusable = function (element) {
  if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute('tabIndex') !== null) {
    return true;
  }

  if (element.disabled) {
    return false;
  }

  switch (element.nodeName) {
    case 'A':
      return !!element.href && element.rel !== 'ignore';

    case 'INPUT':
      return element.type !== 'hidden' && element.type !== 'file';

    case 'BUTTON':
    case 'SELECT':
    case 'TEXTAREA':
      return true;

    default:
      return false;
  }
};
/**
 * 触发一个事件
 * mouseenter, mouseleave, mouseover, keyup, change, click 等
 * @param  {Element} elm
 * @param  {String} name
 * @param  {*} opts
 */


aria.Utils.triggerEvent = function (elm, name) {
  var eventName;

  if (/^mouse|click/.test(name)) {
    eventName = 'MouseEvents';
  } else if (/^key/.test(name)) {
    eventName = 'KeyboardEvent';
  } else {
    eventName = 'HTMLEvents';
  }

  var evt = document.createEvent(eventName);

  for (var _len = arguments.length, opts = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
    opts[_key - 2] = arguments[_key];
  }

  evt.initEvent.apply(evt, [name].concat(opts));
  elm.dispatchEvent ? elm.dispatchEvent(evt) : elm.fireEvent('on' + name, evt);
  return elm;
};

aria.Utils.keys = {
  tab: 9,
  enter: 13,
  space: 32,
  left: 37,
  up: 38,
  right: 39,
  down: 40,
  esc: 27
};
/* harmony default export */ var aria_utils = (aria.Utils);
// CONCATENATED MODULE: ./node_modules/element-ui/src/utils/aria-dialog.js


/**
 * @constructor
 * @desc Dialog object providing modal focus management.
 *
 * Assumptions: The element serving as the dialog container is present in the
 * DOM and hidden. The dialog container has role='dialog'.
 *
 * @param dialogId
 *          The ID of the element serving as the dialog container.
 * @param focusAfterClosed
 *          Either the DOM node or the ID of the DOM node to focus when the
 *          dialog closes.
 * @param focusFirst
 *          Optional parameter containing either the DOM node or the ID of the
 *          DOM node to focus when the dialog opens. If not specified, the
 *          first focusable element in the dialog will receive focus.
 */

var aria_dialog_aria = aria_dialog_aria || {};
var tabEvent;

aria_dialog_aria.Dialog = function (dialog, focusAfterClosed, focusFirst) {
  var _this = this;

  this.dialogNode = dialog;

  if (this.dialogNode === null || this.dialogNode.getAttribute('role') !== 'dialog') {
    throw new Error('Dialog() requires a DOM element with ARIA role of dialog.');
  }

  if (typeof focusAfterClosed === 'string') {
    this.focusAfterClosed = document.getElementById(focusAfterClosed);
  } else if (Object(esm_typeof["a" /* default */])(focusAfterClosed) === 'object') {
    this.focusAfterClosed = focusAfterClosed;
  } else {
    this.focusAfterClosed = null;
  }

  if (typeof focusFirst === 'string') {
    this.focusFirst = document.getElementById(focusFirst);
  } else if (Object(esm_typeof["a" /* default */])(focusFirst) === 'object') {
    this.focusFirst = focusFirst;
  } else {
    this.focusFirst = null;
  }

  if (this.focusFirst) {
    this.focusFirst.focus();
  } else {
    aria_utils.focusFirstDescendant(this.dialogNode);
  }

  this.lastFocus = document.activeElement;

  tabEvent = function tabEvent(e) {
    _this.trapFocus(e);
  };

  this.addListeners();
};

aria_dialog_aria.Dialog.prototype.addListeners = function () {
  document.addEventListener('focus', tabEvent, true);
};

aria_dialog_aria.Dialog.prototype.removeListeners = function () {
  document.removeEventListener('focus', tabEvent, true);
};

aria_dialog_aria.Dialog.prototype.closeDialog = function () {
  var _this2 = this;

  this.removeListeners();

  if (this.focusAfterClosed) {
    setTimeout(function () {
      _this2.focusAfterClosed.focus();
    });
  }
};

aria_dialog_aria.Dialog.prototype.trapFocus = function (event) {
  if (aria_utils.IgnoreUtilFocusChanges) {
    return;
  }

  if (this.dialogNode.contains(event.target)) {
    this.lastFocus = event.target;
  } else {
    aria_utils.focusFirstDescendant(this.dialogNode);

    if (this.lastFocus === document.activeElement) {
      aria_utils.focusLastDescendant(this.dialogNode);
    }

    this.lastFocus = document.activeElement;
  }
};

/* harmony default export */ var aria_dialog = (aria_dialog_aria.Dialog);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/message-box/src/message-box.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//







var messageBox;
var typeMap = {
  success: 'success',
  info: 'info',
  warning: 'warning',
  error: 'error'
};
/* harmony default export */ var message_boxvue_type_script_lang_js_ = ({
  name: 'AwsuiMessageBox',
  mixins: [popup, mixins_locale],
  props: {
    modal: {
      default: true
    },
    lockScroll: {
      default: true
    },
    showClose: {
      type: Boolean,
      default: true
    },
    closeOnClickModal: {
      default: true
    },
    closeOnPressEscape: {
      default: true
    },
    closeOnHashChange: {
      default: true
    },
    center: {
      default: false,
      type: Boolean
    },
    roundButton: {
      default: false,
      type: Boolean
    }
  },
  components: {
    AwsuiInput: packages_input,
    AwsuiButton: packages_button
  },
  computed: {
    icon: function icon() {
      var type = this.type,
          iconClass = this.iconClass;
      return iconClass !== '' ? "awsui-iconfont ".concat(iconClass) :  false || (type && typeMap[type] ? "awsui-iconfont awsui-icon-".concat(typeMap[type]) : '');
    },
    confirmButtonClasses: function confirmButtonClasses() {
      return "".concat(this.confirmButtonClass);
    },
    cancelButtonClasses: function cancelButtonClasses() {
      return "".concat(this.cancelButtonClass);
    }
  },
  methods: {
    getSafeClose: function getSafeClose() {
      var _this = this;

      var currentId = this.uid;
      return function () {
        _this.$nextTick(function () {
          if (currentId === _this.uid) _this.doClose();
        });
      };
    },
    doClose: function doClose() {
      var _this2 = this;

      if (!this.visible) return;
      this.visible = false;
      this._closing = true;
      this.onClose && this.onClose();
      messageBox.closeDialog(); // 解绑

      if (this.lockScroll) {
        setTimeout(this.restoreBodyStyle, 200);
      }

      this.opened = false;
      this.doAfterClose();
      setTimeout(function () {
        if (_this2.action) _this2.callback(_this2.action, _this2);
      });
    },
    handleWrapperClick: function handleWrapperClick() {
      if (this.closeOnClickModal) {
        this.handleAction(this.distinguishCancelAndClose ? 'close' : 'cancel');
      }
    },
    handleInputEnter: function handleInputEnter() {
      if (this.inputType !== 'textarea') {
        return this.handleAction('confirm');
      }
    },
    handleAction: function handleAction(action) {
      if (this.$type === 'prompt' && action === 'confirm' && !this.validate()) {
        return;
      }

      this.action = action;

      if (typeof this.beforeClose === 'function') {
        this.close = this.getSafeClose();
        this.beforeClose(action, this, this.close);
      } else {
        this.doClose();
      }
    },
    validate: function validate() {
      if (this.$type === 'prompt') {
        var inputPattern = this.inputPattern;

        if (inputPattern && !inputPattern.test(this.inputValue || '')) {
          this.editorErrorMessage = this.inputErrorMessage;
          addClass(this.getInputElement(), 'invalid');
          return false;
        }

        var inputValidator = this.inputValidator;

        if (typeof inputValidator === 'function') {
          var validateResult = inputValidator(this.inputValue);

          if (validateResult === false) {
            this.editorErrorMessage = this.inputErrorMessage;
            addClass(this.getInputElement(), 'invalid');
            return false;
          }

          if (typeof validateResult === 'string') {
            this.editorErrorMessage = validateResult;
            addClass(this.getInputElement(), 'invalid');
            return false;
          }
        }
      }

      this.editorErrorMessage = '';
      removeClass(this.getInputElement(), 'invalid');
      return true;
    },
    getFirstFocus: function getFirstFocus() {
      var btn = this.$el.querySelector('.awsui-message-box__btns .awsui-button');
      var title = this.$el.querySelector('.awsui-message-box__btns .awsui-message-box__title');
      return btn || title;
    },
    getInputElement: function getInputElement() {
      var inputRefs = this.$refs.input.$refs;
      return inputRefs.input || inputRefs.textarea;
    },
    handleClose: function handleClose() {
      this.handleAction('close');
    }
  },
  watch: {
    inputValue: {
      immediate: true,
      handler: function handler(val) {
        var _this3 = this;

        this.$nextTick(function () {
          if (_this3.$type === 'prompt' && val !== null) {
            _this3.validate();
          }
        });
      }
    },
    visible: function visible(val) {
      var _this4 = this;

      if (val) {
        this.uid++;

        if (this.$type === 'alert' || this.$type === 'confirm') {
          this.$nextTick(function () {//this.$refs.confirm.$el.focus();
          });
        }

        this.focusAfterClosed = document.activeElement;
        messageBox = new aria_dialog(this.$el, this.focusAfterClosed, this.getFirstFocus());
      } // prompt


      if (this.$type !== 'prompt') return;

      if (val) {
        setTimeout(function () {
          if (_this4.$refs.input && _this4.$refs.input.$el) {
            _this4.getInputElement().focus();
          }
        }, 500);
      } else {
        this.editorErrorMessage = '';
        removeClass(this.getInputElement(), 'invalid');
      }
    }
  },
  mounted: function mounted() {
    var _this5 = this;

    this.$nextTick(function () {
      if (_this5.closeOnHashChange) {
        window.addEventListener('hashchange', _this5.close);
      }
    });
  },
  beforeDestroy: function beforeDestroy() {
    if (this.closeOnHashChange) {
      window.removeEventListener('hashchange', this.close);
    }

    setTimeout(function () {
      messageBox.closeDialog();
    });
  },
  data: function data() {
    return {
      uid: 1,
      title: undefined,
      message: '',
      type: '',
      iconClass: '',
      customClass: '',
      showInput: false,
      inputValue: null,
      inputPlaceholder: '',
      inputType: 'text',
      inputPattern: null,
      inputValidator: null,
      inputErrorMessage: '',
      showConfirmButton: true,
      showCancelButton: false,
      action: '',
      confirmButtonText: '确定',
      cancelButtonText: '取消',
      confirmButtonLoading: false,
      cancelButtonLoading: false,
      confirmButtonClass: '',
      confirmButtonDisabled: false,
      cancelButtonClass: '',
      editorErrorMessage: null,
      callback: null,
      dangerouslyUseHTMLString: false,
      focusAfterClosed: null,
      isOnComposition: false,
      distinguishCancelAndClose: false
    };
  }
});
// CONCATENATED MODULE: ./packages/message-box/src/message-box.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_message_boxvue_type_script_lang_js_ = (message_boxvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/message-box/src/message-box.vue?vue&type=style&index=0&id=ed5b8260&scoped=true&lang=css&
var message_boxvue_type_style_index_0_id_ed5b8260_scoped_true_lang_css_ = __webpack_require__("76f2");

// CONCATENATED MODULE: ./packages/message-box/src/message-box.vue






/* normalize component */

var message_box_component = Object(componentNormalizer["a" /* default */])(
  src_message_boxvue_type_script_lang_js_,
  message_boxvue_type_template_id_ed5b8260_scoped_true_render,
  message_boxvue_type_template_id_ed5b8260_scoped_true_staticRenderFns,
  false,
  null,
  "ed5b8260",
  null
  
)

/* harmony default export */ var message_box = (message_box_component.exports);
// CONCATENATED MODULE: ./node_modules/element-ui/src/utils/vdom.js


function isVNode(node) {
  return node !== null && Object(esm_typeof["a" /* default */])(node) === 'object' && hasOwn(node, 'componentOptions');
}
;
// CONCATENATED MODULE: ./packages/message-box/src/main.js




var defaults = {
  title: null,
  message: '',
  type: '',
  iconClass: '',
  showInput: false,
  showClose: true,
  modalFade: true,
  lockScroll: true,
  closeOnClickModal: true,
  closeOnPressEscape: true,
  closeOnHashChange: true,
  inputValue: null,
  inputPlaceholder: '',
  inputType: 'text',
  inputPattern: null,
  inputValidator: null,
  inputErrorMessage: '',
  showConfirmButton: true,
  showCancelButton: false,
  confirmButtonPosition: 'right',
  confirmButtonHighlight: false,
  cancelButtonHighlight: false,
  confirmButtonText: '确定',
  cancelButtonText: '取消',
  confirmButtonClass: '',
  cancelButtonClass: '',
  customClass: '',
  beforeClose: null,
  dangerouslyUseHTMLString: false,
  center: false,
  roundButton: false,
  distinguishCancelAndClose: false,
  appendTarget: null
};




var MessageBoxConstructor = external_commonjs_vue_commonjs2_vue_root_Vue_default.a.extend(message_box);
var currentMsg, main_instance;
var msgQueue = [];

var getAppendTarget = function getAppendTarget(target) {
  if (!target) {
    return document.body;
  }

  if (typeof target === 'string') {
    return document.querySelector(target);
  }

  if (target instanceof HTMLElement) {
    return target;
  }
};

var defaultCallback = function defaultCallback(action) {
  if (currentMsg) {
    var callback = currentMsg.callback;

    if (typeof callback === 'function') {
      if (main_instance.showInput) {
        callback(main_instance.inputValue, action);
      } else {
        callback(action);
      }
    }

    if (currentMsg.resolve) {
      if (action === 'confirm') {
        if (main_instance.showInput) {
          currentMsg.resolve({
            value: main_instance.inputValue,
            action: action
          });
        } else {
          currentMsg.resolve(action);
        }
      } else if (currentMsg.reject && (action === 'cancel' || action === 'close')) {
        currentMsg.reject(action);
      }
    }
  }
};

var initInstance = function initInstance() {
  main_instance = new MessageBoxConstructor({
    el: document.createElement('div')
  });
  main_instance.callback = defaultCallback;
};

var main_showNextMsg = function showNextMsg() {
  if (!main_instance) {
    initInstance();
  }

  main_instance.action = '';

  if (!main_instance.visible || main_instance.closeTimer) {
    if (msgQueue.length > 0) {
      currentMsg = msgQueue.shift();
      var options = currentMsg.options;

      for (var prop in options) {
        if (Object.prototype.hasOwnProperty.call(options, prop)) {
          main_instance[prop] = options[prop];
        }
      }

      if (options.callback === undefined) {
        main_instance.callback = defaultCallback;
      }

      var oldCb = main_instance.callback;

      main_instance.callback = function (action, instance) {
        oldCb(action, instance);
        showNextMsg();
      };

      if (isVNode(main_instance.message)) {
        main_instance.$slots.default = [main_instance.message];
        main_instance.message = null;
      } else {
        delete main_instance.$slots.default;
      }

      ['modal', 'showClose', 'closeOnClickModal', 'closeOnPressEscape', 'closeOnHashChange'].forEach(function (prop) {
        if (main_instance[prop] === undefined) {
          main_instance[prop] = true;
        }
      });
      getAppendTarget(options.appendTarget).appendChild(main_instance.$el);
      external_commonjs_vue_commonjs2_vue_root_Vue_default.a.nextTick(function () {
        main_instance.visible = true;
      });
    }
  }
};

var main_MessageBox = function MessageBox(options, callback) {
  if (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer) return;

  if (typeof options === 'string' || isVNode(options)) {
    options = {
      message: options
    };

    if (typeof arguments[1] === 'string') {
      options.title = arguments[1];
    }
  } else if (options.callback && !callback) {
    callback = options.callback;
  }

  if (typeof Promise !== 'undefined') {
    return new Promise(function (resolve, reject) {
      // eslint-disable-line
      msgQueue.push({
        options: merge({}, defaults, MessageBox.defaults, options),
        callback: callback,
        resolve: resolve,
        reject: reject
      });
      main_showNextMsg();
    });
  } else {
    msgQueue.push({
      options: merge({}, defaults, MessageBox.defaults, options),
      callback: callback
    });
    main_showNextMsg();
  }
};

main_MessageBox.setDefaults = function (defaults) {
  main_MessageBox.defaults = defaults;
};

main_MessageBox.alert = function (message, title, options) {
  if (Object(esm_typeof["a" /* default */])(title) === 'object') {
    options = title;
    title = '';
  } else if (title === undefined) {
    title = '';
  }

  return main_MessageBox(merge({
    title: title,
    message: message,
    $type: 'alert',
    closeOnPressEscape: false,
    closeOnClickModal: false
  }, options));
};

main_MessageBox.confirm = function (message, title, options) {
  if (Object(esm_typeof["a" /* default */])(title) === 'object') {
    options = title;
    title = '';
  } else if (title === undefined) {
    title = '';
  }

  return main_MessageBox(merge({
    title: title,
    message: message,
    $type: 'confirm',
    showCancelButton: true
  }, options));
};

main_MessageBox.prompt = function (message, title, options) {
  if (Object(esm_typeof["a" /* default */])(title) === 'object') {
    options = title;
    title = '';
  } else if (title === undefined) {
    title = '';
  }

  return main_MessageBox(merge({
    title: title,
    message: message,
    showCancelButton: true,
    showInput: true,
    $type: 'prompt'
  }, options));
};

main_MessageBox.close = function () {
  main_instance.doClose();
  main_instance.visible = false;
  msgQueue = [];
  currentMsg = null;
};

/* harmony default export */ var src_main = (main_MessageBox);

// CONCATENATED MODULE: ./packages/message-box/index.js

/* harmony default export */ var packages_message_box = (src_main);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/dialog/src/dialog.vue?vue&type=template&id=a8aa50ee&scoped=true&
var dialogvue_type_template_id_a8aa50ee_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{"name":"dialog-fade"},on:{"after-enter":_vm.afterEnter,"after-leave":_vm.afterLeave}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.visible),expression:"visible"}],staticClass:"awsui-dialog__wrapper",on:{"click":function($event){if($event.target !== $event.currentTarget){ return null; }return _vm.handleWrapperClick($event)}}},[_c('div',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.loading),expression:"loading"}],key:_vm.key,ref:"dialog",class:['awsui-dialog', { 'is-fullscreen': _vm.fullscreen, 'awsui-dialog--center': _vm.center }, _vm.customClass],style:(_vm.style),attrs:{"role":"dialog","id":_vm.id,"aria-modal":"true","aria-label":_vm.title || 'dialog'}},[_c('div',{staticClass:"awsui-dialog__header"},[_vm._t("title",[_c('span',{staticClass:"awsui-dialog__title"},[_vm._v(_vm._s(_vm.title))])]),(_vm.showClose)?_c('button',{staticClass:"awsui-dialog__headerbtn",attrs:{"type":"button","aria-label":"Close"},on:{"click":_vm.handleClose}},[_c('i',{staticClass:"awsui-dialog__close awsui-iconfont awsui-icon-close"},[_vm._v("  ")])]):_vm._e()],2),(_vm.rendered)?_c('div',{staticClass:"awsui-dialog__body",style:({ height: _vm.height,'border':_vm.border?'':'0','padding':_vm.border?'':'0'})},[(_vm.iframeOption != null)?[_c('iframe',{ref:"toIframe",attrs:{"frameborder":"0","name":'awsui-dialog-iframe-'+ _vm.index,"width":_vm.iframeOption.width ? _vm.iframeOption.width : '100%',"height":_vm.iframeOption.height ? _vm.iframeOption.height : '99%',"scrolling":_vm.iframeOption.scrolling ? _vm.iframeOption.scrolling : 'auto'}}),(_vm.iframeOption != null)?_c('form',{ref:"iframeTargetForm",staticStyle:{"display":"none"},attrs:{"name":'awsui-dialog-iframe-form-'+_vm.index,"target":'awsui-dialog-iframe-' + _vm.index,"action":_vm.iframeOption.url}},_vm._l((_vm.iframeOption.data),function(value,key){return _c('textarea',{key:key,attrs:{"name":key},domProps:{"value":value}})}),0):_vm._e()]:_vm._t("default")],2):_vm._e(),(_vm.$slots.footer)?_c('div',{staticClass:"awsui-dialog__footer"},[_vm._t("footer")],2):_vm._e()])])])}
var dialogvue_type_template_id_a8aa50ee_scoped_true_staticRenderFns = []


// CONCATENATED MODULE: ./packages/dialog/src/dialog.vue?vue&type=template&id=a8aa50ee&scoped=true&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/dialog/src/dialog.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


/* harmony default export */ var dialogvue_type_script_lang_js_ = ({
  name: "AwsuiDialog",
  mixins: [popup, emitter],
  props: {
    id: {
      type: String,
      default: ""
    },
    title: {
      type: String,
      default: ""
    },
    modal: {
      type: Boolean,
      default: true
    },
    border: {
      type: Boolean,
      default: true
    },
    modalAppendToBody: {
      type: Boolean,
      default: true
    },
    appendToBody: {
      type: Boolean,
      default: false
    },
    lockScroll: {
      type: Boolean,
      default: true
    },
    closeOnClickModal: {
      type: Boolean,
      default: false
    },
    closeOnPressEscape: {
      type: Boolean,
      default: true
    },
    showClose: {
      type: Boolean,
      default: true
    },
    width: String,
    height: String,
    fullscreen: Boolean,
    customClass: {
      type: String,
      default: ""
    },
    top: {
      type: String,
      default: "15vh"
    },
    beforeClose: Function,
    center: {
      type: Boolean,
      default: false
    },
    iframeOption: {
      type: Object
    },
    dialogLoading: {
      type: Boolean,
      default: false
    },
    destroyOnClose: Boolean
  },
  data: function data() {
    return {
      index: this.toolCustom.getCountIndex(),
      closed: false,
      loading: false,
      key: 0
    };
  },
  watch: {
    dialogLoading: function dialogLoading(val) {
      this.loading = val;
    },
    loading: function loading(val) {
      this.$emit("update:dialogLoading", val);
    },
    visible: function visible(val) {
      var _this = this;

      if (val) {
        this.closed = false;
        this.$emit("open");
        this.$el.addEventListener("scroll", this.updatePopper);
        this.$nextTick(function () {
          _this.$refs.dialog.scrollTop = 0;
        });

        if (this.appendToBody) {
          document.body.appendChild(this.$el);
        } //iframe


        this.loadIframe();
      } else {
        this.$el.removeEventListener("scroll", this.updatePopper);
        if (!this.closed) this.$emit("close");

        if (this.destroyOnClose) {
          this.$nextTick(function () {
            _this.key++;
          });
        }
      }
    }
  },
  computed: {
    style: function style() {
      var style = {};

      if (!this.fullscreen) {
        style.marginTop = this.top;

        if (this.width) {
          style.width = this.width;
        }
      }

      return style;
    }
  },
  methods: {
    getWin: function getWin() {
      return this.$refs.toIframe.contentWindow;
    },
    loadIframe: function loadIframe() {
      var _this2 = this;

      if (this.iframeOption == null) {
        return;
      }

      this.$nextTick(function () {
        var form = _this2.$refs.iframeTargetForm;
        var iframe = _this2.$refs.toIframe;
        _this2.loading = true;

        if (iframe.attachEvent) {
          iframe.attachEvent("onload", function () {
            _this2.loading = false;
          });
        } else {
          iframe.onload = function () {
            _this2.loading = false;
          };
        }

        form.submit();
      });
    },
    getCountIndex: function getCountIndex() {
      return this.toolCustom.getCountIndex();
    },
    getMigratingConfig: function getMigratingConfig() {
      return {
        props: {
          "size": "size is removed."
        }
      };
    },
    handleWrapperClick: function handleWrapperClick() {
      if (!this.closeOnClickModal) return;
      this.handleClose();
    },
    handleClose: function handleClose() {
      if (typeof this.beforeClose === "function") {
        this.beforeClose(this.hide);
      } else {
        this.hide();
      }
    },
    hide: function hide(cancel) {
      if (cancel !== false) {
        this.$emit("update:visible", false);
        this.$emit("close");
        this.closed = true;
      }
    },
    updatePopper: function updatePopper() {
      this.broadcast("AwsuiSelectDropdown", "updatePopper");
      this.broadcast("AwsuiDropdownMenu", "updatePopper");
    },
    afterEnter: function afterEnter() {
      this.$emit("opened");
    },
    afterLeave: function afterLeave() {
      this.$emit("closed");
    }
  },
  mounted: function mounted() {
    if (this.visible) {
      this.rendered = true;
      this.open();

      if (this.appendToBody) {
        document.body.appendChild(this.$el);
      }
    }
  },
  destroyed: function destroyed() {
    // if appendToBody is true, remove DOM node after destroy
    if (this.appendToBody && this.$el && this.$el.parentNode) {
      this.$el.parentNode.removeChild(this.$el);
    }
  }
});
// CONCATENATED MODULE: ./packages/dialog/src/dialog.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_dialogvue_type_script_lang_js_ = (dialogvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/dialog/src/dialog.vue?vue&type=style&index=0&id=a8aa50ee&scoped=true&lang=css&
var dialogvue_type_style_index_0_id_a8aa50ee_scoped_true_lang_css_ = __webpack_require__("6bc3");

// EXTERNAL MODULE: ./packages/dialog/src/dialog.vue?vue&type=style&index=1&lang=css&
var dialogvue_type_style_index_1_lang_css_ = __webpack_require__("2c98");

// CONCATENATED MODULE: ./packages/dialog/src/dialog.vue







/* normalize component */

var dialog_component = Object(componentNormalizer["a" /* default */])(
  src_dialogvue_type_script_lang_js_,
  dialogvue_type_template_id_a8aa50ee_scoped_true_render,
  dialogvue_type_template_id_a8aa50ee_scoped_true_staticRenderFns,
  false,
  null,
  "a8aa50ee",
  null
  
)

/* harmony default export */ var src_dialog = (dialog_component.exports);
// CONCATENATED MODULE: ./packages/dialog/index.js


/* istanbul ignore next */

src_dialog.install = function (Vue) {
  Vue.component(src_dialog.name, src_dialog);
};

/* harmony default export */ var packages_dialog = (src_dialog);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/sidebar/src/sidebar.vue?vue&type=template&id=6e5ea5c2&scoped=true&
var sidebarvue_type_template_id_6e5ea5c2_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{"name":"awsui-sidebar-fade"},on:{"after-enter":_vm.afterEnter,"after-leave":_vm.afterLeave}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.visible),expression:"visible"}],staticClass:"awsui-sidebar__wrapper",attrs:{"tabindex":"-1"}},[_c('div',{staticClass:"awsui-sidebar__container",class:_vm.visible && 'awsui-sidebar__open',attrs:{"role":"document","tabindex":"-1"},on:{"click":function($event){if($event.target !== $event.currentTarget){ return null; }return _vm.handleWrapperClick($event)}}},[_c('div',{ref:"sidebar",staticClass:"awsui-sidebar",class:[_vm.direction, _vm.customClass],style:(_vm.isHorizontal ? ("width: " + _vm.size) : ("height: " + _vm.size)),attrs:{"aria-modal":"true","aria-labelledby":"awsui-sidebar__title","aria-label":_vm.title,"role":"dialog","tabindex":"-1"}},[(_vm.withHeader)?_c('header',{staticClass:"awsui-sidebar__header",attrs:{"id":"awsui-sidebar__title"}},[_vm._t("title",[_c('span',{attrs:{"role":"heading","tabindex":"0","title":_vm.title}},[_vm._v(_vm._s(_vm.title))])]),(_vm.showClose)?_c('button',{staticClass:"awsui-sidebar__close-btn",attrs:{"aria-label":("close " + (_vm.title || 'sidebar')),"type":"button"},on:{"click":_vm.closeSidebar}},[_c('i',{staticClass:"el-dialog__close el-icon el-icon-close"})]):_vm._e()],2):_vm._e(),(_vm.rendered)?_c('section',{staticClass:"awsui-sidebar__body"},[_vm._t("default")],2):_vm._e()])])])])}
var sidebarvue_type_template_id_6e5ea5c2_scoped_true_staticRenderFns = []


// CONCATENATED MODULE: ./packages/sidebar/src/sidebar.vue?vue&type=template&id=6e5ea5c2&scoped=true&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/sidebar/src/sidebar.vue?vue&type=script&lang=js&

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//



/* harmony default export */ var sidebarvue_type_script_lang_js_ = ({
  name: 'AwsuiSidebar',
  mixins: [popup, emitter, aria_utils],
  props: {
    appendToBody: {
      type: Boolean,
      default: false
    },
    beforeClose: {
      type: Function
    },
    customClass: {
      type: String,
      default: ''
    },
    closeOnPressEscape: {
      type: Boolean,
      default: true
    },
    destroyOnClose: {
      type: Boolean,
      default: false
    },
    modal: {
      type: Boolean,
      default: true
    },
    direction: {
      type: String,
      default: 'rtl',
      validator: function validator(val) {
        return ['ltr', 'rtl', 'ttb', 'btt'].indexOf(val) !== -1;
      }
    },
    modalAppendToBody: {
      type: Boolean,
      default: true
    },
    showClose: {
      type: Boolean,
      default: true
    },
    size: {
      type: String,
      default: '30%'
    },
    title: {
      type: String,
      default: ''
    },
    visible: {
      type: Boolean
    },
    wrapperClosable: {
      type: Boolean,
      default: true
    },
    withHeader: {
      type: Boolean,
      default: true
    }
  },
  computed: {
    isHorizontal: function isHorizontal() {
      return this.direction === 'rtl' || this.direction === 'ltr';
    }
  },
  data: function data() {
    return {
      closed: false,
      prevActiveElement: null
    };
  },
  watch: {
    visible: function visible(val) {
      var _this = this;

      if (val) {
        this.closed = false;
        this.$emit('open');

        if (this.appendToBody) {
          document.body.appendChild(this.$el);
        }

        this.prevActiveElement = document.activeElement;
        this.$nextTick(function () {
          aria_utils.focusFirstDescendant(_this.$refs.sidebar);
        });
      } else {
        if (!this.closed) this.$emit('close');
        this.$nextTick(function () {
          if (_this.prevActiveElement) {
            _this.prevActiveElement.focus();
          }
        });
      }
    }
  },
  methods: {
    afterEnter: function afterEnter() {
      this.$emit('opened');
    },
    afterLeave: function afterLeave() {
      this.$emit('closed');
    },
    hide: function hide(cancel) {
      if (cancel !== false) {
        this.$emit('update:visible', false);
        this.$emit('close');

        if (this.destroyOnClose === true) {
          this.rendered = false;
        }

        this.closed = true;
      }
    },
    handleWrapperClick: function handleWrapperClick() {
      if (this.wrapperClosable) {
        this.closeSidebar();
      }
    },
    closeSidebar: function closeSidebar() {
      if (typeof this.beforeClose === 'function') {
        this.beforeClose(this.hide);
      } else {
        this.hide();
      }
    },
    handleClose: function handleClose() {
      // This method here will be called by PopupManger, when the `closeOnPressEscape` was set to true
      // pressing `ESC` will call this method, and also close the sidebar.
      // This method also calls `beforeClose` if there was one.
      this.closeSidebar();
    }
  },
  mounted: function mounted() {
    if (this.visible) {
      this.rendered = true;
      this.open();
    }
  },
  destroyed: function destroyed() {
    // if appendToBody is true, remove DOM node after destroy
    if (this.appendToBody && this.$el && this.$el.parentNode) {
      this.$el.parentNode.removeChild(this.$el);
    }
  }
});
// CONCATENATED MODULE: ./packages/sidebar/src/sidebar.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_sidebarvue_type_script_lang_js_ = (sidebarvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/sidebar/src/sidebar.vue?vue&type=style&index=0&id=6e5ea5c2&scoped=true&lang=css&
var sidebarvue_type_style_index_0_id_6e5ea5c2_scoped_true_lang_css_ = __webpack_require__("545f");

// CONCATENATED MODULE: ./packages/sidebar/src/sidebar.vue






/* normalize component */

var sidebar_component = Object(componentNormalizer["a" /* default */])(
  src_sidebarvue_type_script_lang_js_,
  sidebarvue_type_template_id_6e5ea5c2_scoped_true_render,
  sidebarvue_type_template_id_6e5ea5c2_scoped_true_staticRenderFns,
  false,
  null,
  "6e5ea5c2",
  null
  
)

/* harmony default export */ var sidebar = (sidebar_component.exports);
// CONCATENATED MODULE: ./packages/sidebar/index.js


/* istanbul ignore next */

sidebar.install = function (Vue) {
  Vue.component(sidebar.name, sidebar);
};

/* harmony default export */ var packages_sidebar = (sidebar);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/backtop/src/backtop.vue?vue&type=template&id=80867440&scoped=true&
var backtopvue_type_template_id_80867440_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',[(_vm.visible)?_c('div',{staticClass:"awsui-backtop",class:_vm.className,style:({'right': _vm.styleRight,'bottom': _vm.styleBottom}),on:{"click":function($event){$event.stopPropagation();return _vm.handleClick($event)}}},[_vm._t("default",[_c('i',{staticClass:"awsui-iconfont",staticStyle:{"color":"#3383da"}},[_vm._v("")])])],2):_vm._e()])}
var backtopvue_type_template_id_80867440_scoped_true_staticRenderFns = []


// CONCATENATED MODULE: ./packages/backtop/src/backtop.vue?vue&type=template&id=80867440&scoped=true&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/backtop/src/backtop.vue?vue&type=script&lang=js&


//
//
//
//
//
//
//
//
//
//import throttle from 'throttle-debounce/throttle';
var cubic = function cubic(value) {
  return Math.pow(value, 3);
};

var easeInOutCubic = function easeInOutCubic(value) {
  return value < 0.5 ? cubic(value * 2) / 2 : 1 - cubic((1 - value) * 2) / 2;
};

/* harmony default export */ var backtopvue_type_script_lang_js_ = ({
  name: 'AwsuiBacktop',
  props: {
    visibilityHeight: {
      type: Number,
      default: 200
    },
    target: [String],
    right: {
      type: Number,
      default: 40
    },
    bottom: {
      type: Number,
      default: 40
    },
    className: [String]
  },
  data: function data() {
    return {
      el: null,
      container: null,
      visible: false
    };
  },
  computed: {
    styleBottom: function styleBottom() {
      return "".concat(this.bottom, "px");
    },
    styleRight: function styleRight() {
      return "".concat(this.right, "px");
    }
  },
  mounted: function mounted() {
    this.init();
    this.container.addEventListener('scroll', this.onScroll);
  },
  methods: {
    init: function init() {
      this.container = document;
      this.el = document.documentElement;

      if (this.target) {
        this.el = document.querySelector(this.target);

        if (!this.el) {
          throw new Error("target is not existed: ".concat(this.target));
        }

        this.container = this.el;
      }
    },
    onScroll: function onScroll() {
      var scrollTop = this.el.scrollTop;
      this.visible = scrollTop >= this.visibilityHeight;
    },
    handleClick: function handleClick(e) {
      this.scrollToTop();
      this.$emit('click', e);
    },
    scrollToTop: function scrollToTop() {
      var el = this.el;
      var beginTime = Date.now();
      var beginValue = el.scrollTop;

      var rAF = window.requestAnimationFrame || function (func) {
        return setTimeout(func, 16);
      };

      var frameFunc = function frameFunc() {
        var progress = (Date.now() - beginTime) / 500;

        if (progress < 1) {
          el.scrollTop = beginValue * (1 - easeInOutCubic(progress));
          rAF(frameFunc);
        } else {
          el.scrollTop = 0;
        }
      };

      rAF(frameFunc);
    }
  }
});
// CONCATENATED MODULE: ./packages/backtop/src/backtop.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_backtopvue_type_script_lang_js_ = (backtopvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/backtop/src/backtop.vue?vue&type=style&index=0&id=80867440&scoped=true&lang=css&
var backtopvue_type_style_index_0_id_80867440_scoped_true_lang_css_ = __webpack_require__("b4b6");

// CONCATENATED MODULE: ./packages/backtop/src/backtop.vue






/* normalize component */

var backtop_component = Object(componentNormalizer["a" /* default */])(
  src_backtopvue_type_script_lang_js_,
  backtopvue_type_template_id_80867440_scoped_true_render,
  backtopvue_type_template_id_80867440_scoped_true_staticRenderFns,
  false,
  null,
  "80867440",
  null
  
)

/* harmony default export */ var backtop = (backtop_component.exports);
// CONCATENATED MODULE: ./packages/backtop/index.js



backtop.install = function (Vue) {
  Vue.component(backtop.name, backtop);
};

/* harmony default export */ var packages_backtop = (backtop);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/code-helper/src/code-helper.vue?vue&type=template&id=d8359e1e&scoped=true&
var code_helpervue_type_template_id_d8359e1e_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('awsui-layout',[(_vm.headerShow)?_c('awsui-header',{style:(_vm.setHeaderStyle())},[_vm._t("default")],2):_vm._e(),_c('awsui-layout',[_c('awsui-main',{staticStyle:{"position":"relative"}},[_c('codemirror',{ref:"codemirr",staticClass:"customCode",attrs:{"options":_vm.cmoptions,"placeholder":_vm.mirrorPlaceholder},on:{"blur":_vm.getTextAreaPostion},model:{value:(_vm.svalue),callback:function ($$v) {_vm.svalue=$$v},expression:"svalue"}}),_c('el-collapse',{directives:[{name:"show",rawName:"v-show",value:(_vm.show),expression:"show"}],attrs:{"accordion":""},model:{value:(_vm.activeName),callback:function ($$v) {_vm.activeName=$$v},expression:"activeName"}},_vm._l((_vm.codeHelpInfo),function(categoryitem){return _c('el-collapse-item',{key:categoryitem.index,attrs:{"title":categoryitem.category,"name":categoryitem.id}},_vm._l((categoryitem.content),function(item){return _c('div',{key:item.index,staticClass:"collapse-item",class:{'active': item.title === _vm.activeTitle},on:{"click":function($event){return _vm.insert(item.insertCode,item)}}},[_c('span',{staticClass:"spot",class:{'activespot': item.title === _vm.activeTitle}}),_vm._v(_vm._s(item.title)+" "),(item.desc)?_c('i',{staticClass:"awsui-iconfont help",on:{"click":function($event){$event.stopPropagation();return _vm.helpMsg(item.desc)}}},[_vm._v("")]):_vm._e()])}),0)}),1)],1),_c('awsui-aside',{staticStyle:{"position":"relative"},attrs:{"width":"26px"}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.codeHelpInfo),expression:"codeHelpInfo"}]},[(_vm.show)?_c('i',{staticClass:"awsui-iconfont topDiv",on:{"click":_vm.collapseShow}},[_vm._v("")]):_c('i',{staticClass:"awsui-iconfont topDiv",on:{"click":_vm.collapseShow}},[_vm._v("")])]),_c('el-tooltip',{attrs:{"content":"全屏","placement":"bottom"}},[_c('i',{staticClass:"awsui-iconfont enlarge",on:{"click":_vm.fullSreen}},[_vm._v("")])])],1)],1)],1)}
var code_helpervue_type_template_id_d8359e1e_scoped_true_staticRenderFns = []


// CONCATENATED MODULE: ./packages/code-helper/src/code-helper.vue?vue&type=template&id=d8359e1e&scoped=true&

// EXTERNAL MODULE: ./node_modules/vue-codemirror/dist/vue-codemirror.js
var vue_codemirror = __webpack_require__("8f94");

// EXTERNAL MODULE: ./node_modules/codemirror/lib/codemirror.css
var codemirror_lib_codemirror = __webpack_require__("a7be");

// EXTERNAL MODULE: ./node_modules/codemirror/theme/dracula.css
var dracula = __webpack_require__("0109");

// EXTERNAL MODULE: ./node_modules/codemirror/addon/display/placeholder.js
var display_placeholder = __webpack_require__("d7d5");

// EXTERNAL MODULE: ./node_modules/codemirror/addon/display/fullscreen.css
var fullscreen = __webpack_require__("6a70");

// EXTERNAL MODULE: ./node_modules/codemirror/addon/display/fullscreen.js
var display_fullscreen = __webpack_require__("6d78");

// EXTERNAL MODULE: ./node_modules/codemirror/mode/javascript/javascript.js
var javascript = __webpack_require__("f9d4");

// EXTERNAL MODULE: ./node_modules/codemirror/mode/css/css.js
var css = __webpack_require__("7b00");

// EXTERNAL MODULE: ./node_modules/codemirror/mode/xml/xml.js
var xml = __webpack_require__("d5e0");

// EXTERNAL MODULE: ./node_modules/codemirror/mode/clike/clike.js
var clike = __webpack_require__("4ba6");

// EXTERNAL MODULE: ./node_modules/codemirror/mode/markdown/markdown.js
var markdown = __webpack_require__("959b");

// EXTERNAL MODULE: ./node_modules/codemirror/mode/python/python.js
var python = __webpack_require__("db91");

// EXTERNAL MODULE: ./node_modules/codemirror/mode/r/r.js
var r = __webpack_require__("903e");

// EXTERNAL MODULE: ./node_modules/codemirror/mode/shell/shell.js
var shell = __webpack_require__("02f0");

// EXTERNAL MODULE: ./node_modules/codemirror/mode/sql/sql.js
var sql = __webpack_require__("ffda");

// EXTERNAL MODULE: ./node_modules/codemirror/mode/swift/swift.js
var swift = __webpack_require__("c0e2");

// EXTERNAL MODULE: ./node_modules/codemirror/mode/vue/vue.js
var vue = __webpack_require__("693d8");

// EXTERNAL MODULE: ./node_modules/codemirror/addon/hint/show-hint.css
var show_hint = __webpack_require__("f6b6");

// EXTERNAL MODULE: ./node_modules/codemirror/addon/hint/sql-hint.js
var sql_hint = __webpack_require__("991c");

// EXTERNAL MODULE: ./node_modules/codemirror/addon/hint/show-hint.js
var hint_show_hint = __webpack_require__("9b74");

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/code-helper/src/code-helper.vue?vue&type=script&lang=js&



//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

 // 引入主题后还需要在 options 中指定主题才会生效



 // 全屏显示编辑器

 // 全屏显示编辑器











 // 引入代码自动提示插件




/* harmony default export */ var code_helpervue_type_script_lang_js_ = ({
  name: "AwsuiCodeHelper",
  components: {
    codemirror: vue_codemirror["codemirror"]
  },
  props: {
    cmoptions: {
      type: Object,
      default: function _default() {
        return {
          tabSize: 4,
          mode: "text/javascript",
          theme: "dracula",
          lineNumbers: true,
          line: true
        };
      }
    },
    headerStyle: {
      type: Object,
      default: function _default() {
        return {
          height: '30px'
        };
      }
    },
    placeholder: {
      type: String
    },
    codeHelpInfo: {
      type: Array
    },
    height: {
      type: Number
    },
    value: {
      type: String
    },
    headerShow: {
      type: Boolean,
      default: false
    }
  },
  data: function data() {
    return {
      show: false,
      activeName: "1",
      activeTitle: "",
      svalue: "",
      mirrorPlaceholder: "",
      lineCh: {
        line: 0,
        ch: 0
      }
    };
  },
  watch: {
    value: {
      handler: function handler(newVal) {
        this.svalue = newVal;
        this.mirrorPlaceholder = this.svalue ? "" : this.placeholder;
      },
      immediate: true
    },
    svalue: function svalue(newVal) {
      this.$emit("input", newVal);
      this.$emit("change", newVal);
    }
  },
  computed: {},
  methods: {
    setHeaderStyle: function setHeaderStyle() {
      return this.headerStyle;
    },
    fullSreen: function fullSreen() {
      var _this = this;

      var winHeight = window.screen.availHeight - 400;
      var winWidth = window.screen.availWidth - 400;

      if (window.top.FrmDialog) {
        var dlg = window.top.FrmDialog.open({
          width: winWidth,
          height: winHeight,
          id: "aws_sql_fullscreen_dlg",
          closable: false,
          url: "./w",
          data: {
            sid: this.$store.state.sessionId,
            cmd: "CONSOLE_COMMON_SQL_FULLSCREEN",
            sqlVal: this.svalue,
            appId: ""
          },
          onClose: function onClose() {
            _this.svalue = window.top.FrmDialog.win().$("#full_sql_dlg").val(); //tempFullSql.val($(dlg.wrap).find('iframe').contents().find('#full_sql_dlg').val());
            //sqlfulleditor.setValue($(dlg.wrap).find('iframe').contents().find('#full_sql_dlg').val());
          }
        });
        this.dlgx = dlg;
      }
    },
    getTextAreaPostion: function getTextAreaPostion() {
      this.lineCh = this.$refs.codemirr.codemirror.getCursor();
    },
    replaceHTML: function replaceHTML(val) {
      return val.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/\\n/g, "\n");
    },
    insert: function insert(val, item) {
      // this.svalue = this.svalue + this.replaceHTML(val);
      var str = this.replaceHTML(val);
      this.$refs.codemirr.codemirror.replaceRange(str, this.lineCh, this.lineCh);
      this.$refs.codemirr.codemirror.focus();
      this.$refs.codemirr.codemirror.setCursor({
        line: this.lineCh.line,
        ch: this.lineCh.ch + str.length
      });
      this.svalue = this.$refs.codemirr.codemirror.getValue();
      this.activeTitle = item.title;
    },
    collapseShow: function collapseShow() {
      this.show = !this.show;
    },
    helpMsg: function helpMsg(val) {
      this.$alert(val, "帮助信息", {
        customClass: "el-message-box_custom",
        dangerouslyUseHTMLString: true,
        closeOnClickModal: true,
        callback: function callback() {}
      });
    },
    setCodeMirrorSize: function setCodeMirrorSize() {
      var that = this;
      that.$refs.codemirr.codemirror.setSize(null, that.height);
      that.$refs.codemirr.codemirror.focus();
    },
    setHeight: function setHeight(h) {
      var that = this;
      that.$refs.codemirr.codemirror.setSize(null, h);
    },
    getCodeMirror: function getCodeMirror() {
      return this.$refs.codemirr.codemirror;
    }
  },
  mounted: function mounted() {
    this.setCodeMirrorSize();
  },
  created: function created() {// this.mirrorPlaceholder = this.svalue ? "" : this.placeholder
  }
});
// CONCATENATED MODULE: ./packages/code-helper/src/code-helper.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_code_helpervue_type_script_lang_js_ = (code_helpervue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/code-helper/src/code-helper.vue?vue&type=style&index=0&id=d8359e1e&scoped=true&lang=css&
var code_helpervue_type_style_index_0_id_d8359e1e_scoped_true_lang_css_ = __webpack_require__("21cc");

// EXTERNAL MODULE: ./packages/code-helper/src/code-helper.vue?vue&type=style&index=1&lang=css&
var code_helpervue_type_style_index_1_lang_css_ = __webpack_require__("6b4b");

// CONCATENATED MODULE: ./packages/code-helper/src/code-helper.vue







/* normalize component */

var code_helper_component = Object(componentNormalizer["a" /* default */])(
  src_code_helpervue_type_script_lang_js_,
  code_helpervue_type_template_id_d8359e1e_scoped_true_render,
  code_helpervue_type_template_id_d8359e1e_scoped_true_staticRenderFns,
  false,
  null,
  "d8359e1e",
  null
  
)

/* harmony default export */ var code_helper = (code_helper_component.exports);
// CONCATENATED MODULE: ./packages/code-helper/index.js



code_helper.install = function (Vue) {
  Vue.component(code_helper.name, code_helper);
};

/* harmony default export */ var packages_code_helper = (code_helper);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/address/src/address.vue?vue&type=template&id=e3bef0a4&scoped=true&
var addressvue_type_template_id_e3bef0a4_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"awsuiAddress",staticClass:"awsui-address"},[_c('div',{staticClass:"awsui-address-content"},_vm._l((_vm.addressValue),function(item,index){return _c('span',{key:item,staticClass:"awsui-address-item"},[_c('i',{staticClass:"awsui-iconfont awsui-iconfont-ico"},[_vm._v("")]),_c('i',{staticClass:"awsui-item-value"},[_vm._v(_vm._s(item))]),(!_vm.readonly && !_vm.disabled)?_c('i',{staticClass:"awsui-iconfont awsui-iconfont-close",on:{"click":function($event){if($event.target !== $event.currentTarget){ return null; }return _vm.delsingle(item,index)}}},[_vm._v("")]):_vm._e()])}),0),_c('div',{staticClass:"awsui-address-ico"},[(!_vm.readonly && !_vm.disabled)?_c('i',{directives:[{name:"show",rawName:"v-show",value:(_vm.delComputed),expression:"delComputed"}],staticClass:"awsui-iconfont awsui-iconfont-del",on:{"click":_vm.delAll}},[_vm._v("")]):_vm._e(),(!_vm.readonly && !_vm.disabled)?_c('i',{ref:"addIco",staticClass:"awsui-iconfont awsui-iconfont-add-ico",on:{"click":function($event){return _vm.openDialog()}}},[_vm._v("")]):_vm._e()]),(_vm.dialogOnce)?_c('awsui-dialog',{ref:"DialogAddress",attrs:{"iframeOption":_vm.paramsValue,"title":_vm.dialogTitle,"visible":_vm.dialogVisible,"width":"605px","height":"410px","show-close":false,"before-close":_vm.handleClose,"append-to-body":""},on:{"update:visible":function($event){_vm.dialogVisible=$event}}},[_c('span',{staticClass:"dialog-footer",attrs:{"slot":"footer"},slot:"footer"},[_c('awsui-button',{attrs:{"id":"confirmBtn","type":"primary"},on:{"click":function($event){return _vm.diaConfirm()}}},[_vm._v("确定")]),_c('awsui-button',{on:{"click":_vm.diaCancel}},[_vm._v("取消")])],1)]):_vm._e()],1)}
var addressvue_type_template_id_e3bef0a4_scoped_true_staticRenderFns = []


// CONCATENATED MODULE: ./packages/address/src/address.vue?vue&type=template&id=e3bef0a4&scoped=true&

// EXTERNAL MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/address/src/address.vue?vue&type=script&lang=js&
var addressvue_type_script_lang_js_ = __webpack_require__("c72d");

// CONCATENATED MODULE: ./packages/address/src/address.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_addressvue_type_script_lang_js_ = (addressvue_type_script_lang_js_["a" /* default */]); 
// EXTERNAL MODULE: ./packages/address/src/address.vue?vue&type=style&index=0&id=e3bef0a4&scoped=true&lang=css&
var addressvue_type_style_index_0_id_e3bef0a4_scoped_true_lang_css_ = __webpack_require__("f3b2");

// CONCATENATED MODULE: ./packages/address/src/address.vue






/* normalize component */

var address_component = Object(componentNormalizer["a" /* default */])(
  src_addressvue_type_script_lang_js_,
  addressvue_type_template_id_e3bef0a4_scoped_true_render,
  addressvue_type_template_id_e3bef0a4_scoped_true_staticRenderFns,
  false,
  null,
  "e3bef0a4",
  null
  
)

/* harmony default export */ var address = (address_component.exports);
// CONCATENATED MODULE: ./packages/address/index.js



address.install = function (Vue) {
  Vue.component(address.name, address);
};

/* harmony default export */ var packages_address = (address);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/input-icon-click/src/input-icon-click.vue?vue&type=template&id=62d6d0df&
var input_icon_clickvue_type_template_id_62d6d0df_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"inputIconClick"},[_c('awsui-input',{ref:"awsuiInput",attrs:{"placeholder":_vm.placeholderVal,"prefixIcon":_vm.leftIcon,"suffixIcon":_vm.rightIcon,"readonly":_vm.readonlyValue},model:{value:(_vm.inputVal),callback:function ($$v) {_vm.inputVal=$$v},expression:"inputVal"}})],1)}
var input_icon_clickvue_type_template_id_62d6d0df_staticRenderFns = []


// CONCATENATED MODULE: ./packages/input-icon-click/src/input-icon-click.vue?vue&type=template&id=62d6d0df&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/input-icon-click/src/input-icon-click.vue?vue&type=script&lang=js&

//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var input_icon_clickvue_type_script_lang_js_ = ({
  name: "AwsuiIconClick",
  props: {
    // v-model的值
    value: {},
    // 前后图标
    prefixIcon: {
      type: String,
      default: "undefined"
    },
    suffixIcon: {
      type: String,
      default: "undefined"
    },
    // placeholder
    placeholder: {
      type: String,
      default: ""
    },
    readonly: {
      type: Boolean,
      default: false
    }
  },
  data: function data() {
    return {
      inputVal: "",
      leftIcon: "",
      rightIcon: "",
      placeholderVal: "",
      leftIconLength: "",
      rightIconLength: "",
      readonlyValue: ""
    };
  },
  watch: {
    // 处理v-model
    inputVal: function inputVal(newVal) {
      this.$emit("input", newVal);
    },
    value: {
      handler: function handler() {
        this.inputVal = this.value;
      },
      immediate: true
    },
    // 左边的图标
    prefixIcon: {
      handler: function handler() {
        var that = this;

        if (this.prefixIcon !== "undefined") {
          this.leftIcon = this.prefixIcon;
        } else {
          this.leftIcon = "";
        }

        setTimeout(function () {
          if (that.readonlyValue === true) return;

          if (that._events.leftClick !== undefined) {
            if (that.leftIcon !== "") {
              var ary = Object(toConsumableArray["a" /* default */])(that.$refs.awsuiInput.$el.childNodes);

              for (var i = 0; i < ary.length; i++) {
                if (that.$refs.awsuiInput.$el.childNodes[i].nodeName === "I") {
                  if (that.leftIconLength === "") {
                    that.leftIconLength = i;
                  }

                  if (that.leftIconLength !== "") {
                    that.$refs.awsuiInput.$el.childNodes[that.leftIconLength].classList.add("awsui-iconfont-hasClick");

                    that.$refs.awsuiInput.$el.childNodes[that.leftIconLength].onclick = function (e) {
                      that.$emit("leftClick", e);
                    };
                  }
                }
              }
            }
          }
        });
      },
      immediate: true
    },
    // 右边的图标
    suffixIcon: {
      handler: function handler() {
        var that = this;

        if (this.suffixIcon !== "undefined") {
          this.rightIcon = this.suffixIcon;
        } else {
          this.rightIcon = "";
        }

        setTimeout(function () {
          if (that.readonlyValue === true) return;

          if (that._events.click !== undefined) {
            var ary = Object(toConsumableArray["a" /* default */])(that.$refs.awsuiInput.$el.childNodes);

            if (that.leftIconLength === "" && that.leftIcon === "") {
              for (var i = 0; i < ary.length; i++) {
                if (that.$refs.awsuiInput.$el.childNodes[i].nodeName === "I") {
                  that.$refs.awsuiInput.$el.childNodes[i].classList.add("awsui-iconfont-hasClick");

                  that.$refs.awsuiInput.$el.childNodes[i].onclick = function (e) {
                    that.$emit("click", e);
                  };
                }
              }
            }

            if (that.leftIcon !== "") {
              var flag = false;

              for (var _i = 0; _i < ary.length; _i++) {
                if (that.$refs.awsuiInput.$el.childNodes[_i].nodeName === "I") {
                  if (flag) {
                    that.$refs.awsuiInput.$el.childNodes[_i].classList.add("awsui-iconfont-hasClick");

                    that.$refs.awsuiInput.$el.childNodes[_i].onclick = function (e) {
                      that.$emit("click", e);
                    };
                  }

                  flag = true;
                }
              }
            }
          }
        });
      },
      immediate: true
    },
    // 处理placeholder
    placeholder: {
      handler: function handler() {
        this.placeholderVal = this.placeholder;
      },
      immediate: true
    },
    // 处理readonly
    readonly: {
      handler: function handler() {
        this.readonlyValue = this.readonly;
      },
      immediate: true
    }
  }
});
// CONCATENATED MODULE: ./packages/input-icon-click/src/input-icon-click.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_input_icon_clickvue_type_script_lang_js_ = (input_icon_clickvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/input-icon-click/src/input-icon-click.vue?vue&type=style&index=0&lang=css&
var input_icon_clickvue_type_style_index_0_lang_css_ = __webpack_require__("07ea");

// CONCATENATED MODULE: ./packages/input-icon-click/src/input-icon-click.vue






/* normalize component */

var input_icon_click_component = Object(componentNormalizer["a" /* default */])(
  src_input_icon_clickvue_type_script_lang_js_,
  input_icon_clickvue_type_template_id_62d6d0df_render,
  input_icon_clickvue_type_template_id_62d6d0df_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var input_icon_click = (input_icon_click_component.exports);
// CONCATENATED MODULE: ./packages/input-icon-click/index.js



input_icon_click.install = function (Vue) {
  Vue.component(input_icon_click.name, input_icon_click);
};

/* harmony default export */ var packages_input_icon_click = (input_icon_click);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-dictionary/src/data-dictionary.vue?vue&type=template&id=438fe63f&
var data_dictionaryvue_type_template_id_438fe63f_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"awsuiDataDictionary",staticClass:"awsui-data-dictionary"},[_c('awsui-icon-click',{attrs:{"suffixIcon":"&#xe6e9;","readonly":_vm.readonly},on:{"click":function($event){return _vm.DDIconClick()}},model:{value:(_vm.DDValue),callback:function ($$v) {_vm.DDValue=$$v},expression:"DDValue"}}),(_vm.dialogOnce)?_c('awsui-dialog',{ref:"DialogDD",attrs:{"iframeOption":_vm.iframeOption,"title":_vm.dialogTitle,"visible":_vm.dialogVisible,"width":"605px","height":"410px","show-close":true,"before-close":_vm.handleClose,"append-to-body":""},on:{"update:visible":function($event){_vm.dialogVisible=$event}}},[(_vm.isMultiple)?_c('span',{staticClass:"dialog-footer",attrs:{"slot":"footer"},slot:"footer"},[_c('awsui-button',{attrs:{"id":"confirmBtn","type":"primary"},on:{"click":function($event){return _vm.dialogConfirm()}}},[_vm._v("确定")]),_c('awsui-button',{on:{"click":_vm.diaCancel}},[_vm._v("取消")])],1):_vm._e()]):_vm._e()],1)}
var data_dictionaryvue_type_template_id_438fe63f_staticRenderFns = []


// CONCATENATED MODULE: ./packages/data-dictionary/src/data-dictionary.vue?vue&type=template&id=438fe63f&

// EXTERNAL MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-dictionary/src/data-dictionary.vue?vue&type=script&lang=js&
var data_dictionaryvue_type_script_lang_js_ = __webpack_require__("2ad7");

// CONCATENATED MODULE: ./packages/data-dictionary/src/data-dictionary.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_data_dictionaryvue_type_script_lang_js_ = (data_dictionaryvue_type_script_lang_js_["a" /* default */]); 
// CONCATENATED MODULE: ./packages/data-dictionary/src/data-dictionary.vue





/* normalize component */

var data_dictionary_component = Object(componentNormalizer["a" /* default */])(
  src_data_dictionaryvue_type_script_lang_js_,
  data_dictionaryvue_type_template_id_438fe63f_render,
  data_dictionaryvue_type_template_id_438fe63f_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var data_dictionary = (data_dictionary_component.exports);
// CONCATENATED MODULE: ./packages/data-dictionary/index.js

// 导入组件
 // 为组件提供 install 安装方法，供按需引入

data_dictionary.install = function (Vue) {
  Vue.component(data_dictionary.name, data_dictionary);
}; // 默认导出组件,暴露给调用者


/* harmony default export */ var packages_data_dictionary = (data_dictionary);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/app-info/src/app-info.vue?vue&type=template&id=e8df9950&scoped=true&
var app_infovue_type_template_id_e8df9950_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"app-info"},[_c('el-container',[_c('el-header',{attrs:{"height":_vm.headerHeight}},[_c('div',{staticClass:"app-info-title"},[_vm._v("应用信息")])]),_c('el-main',{staticClass:"cc-dev-main-card"},[_c('el-container',[_c('el-aside',{attrs:{"width":_vm.asideWidth}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.appIconFontCode==''),expression:"appIconFontCode==''"}],staticClass:"app-img-div"},[_c('img',{staticClass:"app-img",attrs:{"src":_vm.appIcon}})]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.appIconFontCode!=''),expression:"appIconFontCode!=''"}],staticClass:"app-icon"},[_c('i',{staticClass:"awsui-iconfont",style:(_vm.appIconFontColor),domProps:{"innerHTML":_vm._s(_vm.appIconFontCode)}})])]),_c('el-main',{staticClass:"cc-dev-main"},[_c('el-row',[_c('el-col',{attrs:{"span":12}},[_c('div',{staticClass:"app-name"},[_vm._v(_vm._s(_vm.appName))])]),_c('el-col',{staticStyle:{"height":"25px"},attrs:{"span":12}},[(_vm.isManager)?_c('span',{staticClass:"manageTxt"},[_vm._v("该模型在QAS和PRD环境受管，不允许删除和修改")]):_vm._e(),_c('el-switch',{staticClass:"manageSwitch",attrs:{"active-color":"#d9422f","inactive-color":"#009688","active-text":"受管","inactive-text":"不受管","size":"small","disabled":_vm.isReadOnlyAppAuth},on:{"change":_vm.getSwitchState},model:{value:(_vm.isManager),callback:function ($$v) {_vm.isManager=$$v},expression:"isManager"}})],1)],1),_c('el-divider',{staticClass:"app-info-divider"}),_c('el-row',[_c('el-col',{attrs:{"span":13}},[_c('div',{},[_vm._v("应用ID："+_vm._s(_vm.appId)+"("+_vm._s(_vm.appVersionNo)+")")])]),_c('el-col',{attrs:{"span":11}},[_c('div',{staticClass:"txt-right"},[_vm._v("创建人："+_vm._s(_vm.createTime)+" ("+_vm._s(_vm.createUser)+")")])])],1),_c('el-row',[_c('el-col',{attrs:{"span":13}},[_c('div',{},[_vm._v("开发商："+_vm._s(_vm.appDeveloperName))])]),_c('el-col',{attrs:{"span":11}},[_c('div',{staticClass:"txt-right"},[_vm._v("修改人："+_vm._s(_vm.updateTime)+" ("+_vm._s(_vm.updateUser)+")")])])],1)],1)],1)],1)],1),_c('el-container',[_c('el-header',{attrs:{"height":_vm.headerHeight}},[_c('div',{staticClass:"app-info-title"},[_vm._v("DevOps")])]),_c('el-main',{staticClass:"cc-dev-main"},[_c('el-container',[_c('el-main',{staticClass:"cc-dev-main"},[_c('el-card',{staticClass:"box-card dev-ops",attrs:{"shadow":"never"}},_vm._l((_vm.teamMembers),function(item,index){return _c('el-collapse',{key:index,attrs:{"accordion":""}},[_c('el-collapse-item',[_c('template',{slot:"title"},[_c('div',{staticClass:"dev-collapse-title"},[_c('i',{staticClass:"awsui-iconfont"},[_vm._v("")]),_vm._v(" "+_vm._s(item.teamName)+" "),_c('div',{staticClass:"dev-sec txt-right"},[_vm._v(_vm._s(item.permTxt))])])]),_c('el-card',{staticClass:"box-card dev-card"},[_c('div',{staticClass:"clearfix",attrs:{"slot":"header"},slot:"header"},[_c('span',[_vm._v("成员")])]),_vm._l((item.members),function(user,index){return _c('div',{key:index,staticClass:"text dev-item"},[_c('el-row',[_c('el-col',{attrs:{"span":12}},[_c('div',{},[_vm._v(_vm._s(user.userName)+"/"+_vm._s(user.userId))])]),_c('el-col',{attrs:{"span":12}},[_c('div',{staticClass:"txt-right"},[_vm._v(_vm._s(user.departmentName))])])],1)],1)})],2),_c('el-card',{staticClass:"box-card dev-card",staticStyle:{"margin-top":"20px"},style:({display:_vm.isShowRoleTable})},[_c('div',{staticClass:"clearfix",attrs:{"slot":"header"},slot:"header"},[_c('span',[_vm._v("角色")])]),_vm._l((item.roles),function(user,index){return _c('div',{key:index,staticClass:"text dev-item"},[_c('el-row',[_c('el-col',{attrs:{"span":24}},[_c('div',{},[_vm._v(_vm._s(user.userName))])])],1)],1)})],2)],2)],1)}),1)],1)],1)],1)],1),_c('el-container',{style:({display:_vm.isShowOptHistory})},[_c('el-header',{attrs:{"height":_vm.headerHeight}},[_c('div',{staticClass:"app-info-title"},[_vm._v("最近修改")])]),_c('el-main',[_c('el-table',{staticStyle:{"width":"100%"},attrs:{"data":_vm.optHistory,"show-header":_vm.isShowTableHeader}},[_c('el-table-column',{attrs:{"prop":"updateUser"}}),_c('el-table-column',{attrs:{"prop":"updateTime","width":"160"}})],1)],1),_c('p',{directives:[{name:"show",rawName:"v-show",value:(_vm.optHistoryCopy.length>3&&_vm.optHistory.length<_vm.optHistoryCopy.length),expression:"optHistoryCopy.length>3&&optHistory.length<optHistoryCopy.length"}],staticClass:"show-all",staticStyle:{"cursor":"pointer","text-align":"center"},on:{"mouseover":_vm.showMore}},[_vm._v("加载更多")])],1)],1)}
var app_infovue_type_template_id_e8df9950_scoped_true_staticRenderFns = []


// CONCATENATED MODULE: ./packages/app-info/src/app-info.vue?vue&type=template&id=e8df9950&scoped=true&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/app-info/src/app-info.vue?vue&type=script&lang=js&

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var app_infovue_type_script_lang_js_ = ({
  name: "AwsAppInfo",
  props: ['sid', 'appId', 'id', 'modelType'],
  data: function data() {
    return {
      isManager: false,
      appIcon: '',
      appIconFontCode: '',
      appIconFontColor: '',
      appName: '',
      appVersionNo: '',
      createTime: '',
      createUser: '',
      appDeveloperName: '',
      updateTime: '',
      updateUser: '',
      teamMembers: '',
      isShowRoleTable: 'none',
      isShowOptHistory: 'none',
      asideWidth: '70px',
      headerHeight: '18px',
      isShowTableHeader: false,
      optHistoryCopy: [],
      optHistory: [],
      isReadOnlyAppAuth: false
    };
  },
  mounted: function mounted() {
    this.getAppInfo();
  },
  watch: {
    isManager: {
      handler: function handler() {
        var $this = this;
        var manager = $this.isManager;
        this.$emit('change', manager);
      },
      immediate: true
    }
  },
  methods: {
    getSwitchState: function getSwitchState(data) {
      this.isManager = data;
      this.$emit('change', data);
    },
    showMore: function showMore() {
      this.optHistory = JSON.parse(JSON.stringify(this.optHistoryCopy));
    },
    getAppInfo: function getAppInfo() {
      var that = this;
      var data = {
        url: './jd',
        data: {
          sid: that.sid,
          appId: that.appId,
          id: that.id,
          type: that.modelType,
          cmd: 'CONSOLE_M_METADATA_GET_INFO'
        }
      };
      that.awsuiaxios.post(data).then(function (ro) {
        if (ro.result == 'ok') {
          var _data = ro.data.data;
          that.isManager = _data.managedCheck;
          that.appIcon = _data.appIcon;
          that.appIconFontCode = _data.appIconFontCode;
          that.appIconFontColor = _data.appIconFontColor;
          that.appName = _data.appName;
          that.appId = _data.appId;
          that.appVersionNo = _data.appVersionNo;
          that.createTime = _data.createTime;
          that.createUser = _data.createUser;
          that.appDeveloperName = _data.appDeveloperName;
          that.updateTime = _data.updateTime;
          that.updateUser = _data.updateUser;
          that.teamMembers = _data.teamMembers;

          if (typeof _data.optHistory != 'undefined' && _data.optHistory.length > 0) {
            that.optHistory = JSON.parse(JSON.stringify(_data.optHistory)).splice(0, 3);
            that.optHistoryCopy = JSON.parse(JSON.stringify(_data.optHistory));
          }

          that.isReadOnlyAppAuth = _data.isReadOnlyAppAuth;

          if (!_data.isReadOnlyAppAuth) {
            that.isReadOnlyAppAuth = !_data.managedCheckEdit;
          }

          if (_data.optHistory.length == 0) {
            that.isShowOptHistory = "none";
          } else {
            that.isShowOptHistory = "";
          }
        }
      }).catch(function (error) {
        console.log(error);
      });
    }
  }
});
// CONCATENATED MODULE: ./packages/app-info/src/app-info.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_app_infovue_type_script_lang_js_ = (app_infovue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/app-info/src/app-info.vue?vue&type=style&index=0&id=e8df9950&scoped=true&lang=css&
var app_infovue_type_style_index_0_id_e8df9950_scoped_true_lang_css_ = __webpack_require__("eaf3");

// CONCATENATED MODULE: ./packages/app-info/src/app-info.vue






/* normalize component */

var app_info_component = Object(componentNormalizer["a" /* default */])(
  src_app_infovue_type_script_lang_js_,
  app_infovue_type_template_id_e8df9950_scoped_true_render,
  app_infovue_type_template_id_e8df9950_scoped_true_staticRenderFns,
  false,
  null,
  "e8df9950",
  null
  
)

/* harmony default export */ var app_info = (app_info_component.exports);
// CONCATENATED MODULE: ./packages/app-info/index.js



app_info.install = function (Vue) {
  Vue.component(app_info.name, app_info);
};

/* harmony default export */ var packages_app_info = (app_info);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"479879d1-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/app-select/src/app-select.vue?vue&type=template&id=9d9b4566&scoped=true&
var app_selectvue_type_template_id_9d9b4566_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"aws-select",staticStyle:{"display":"inline-block"},style:({width:_vm.width})},[_c('el-select',{style:({width:_vm.width}),attrs:{"clearable":"","filterable":"","filter-method":_vm.dataFilter,"placeholder":_vm.placeholder,"size":"small","popper-append-to-body":false,"popper-class":"select-option"},on:{"clear":_vm.setValueNull,"change":_vm.getValue},model:{value:(_vm.defaultSelectValue),callback:function ($$v) {_vm.defaultSelectValue=$$v},expression:"defaultSelectValue"}},_vm._l((_vm.options),function(item){return _c('el-option',{key:item.value,attrs:{"label":item.label,"value":item.value}},[_c('span',{staticClass:"select-icon isStart"},[_c('i',{staticClass:"awsui-iconfont",staticStyle:{"font-size":"13px"},domProps:{"innerHTML":_vm._s(item.icon_isStart)}})]),_c('span',{staticClass:"select-icon isMobile"},[_c('i',{staticClass:"awsui-iconfont",staticStyle:{"font-size":"13px"},domProps:{"innerHTML":_vm._s(item.icon_device_type)}})]),_c('span',[_vm._v(_vm._s(item.label))]),_c('span',{directives:[{name:"show",rawName:"v-show",value:(item.isH5),expression:"item.isH5"}],staticClass:"select-icon isH5"},[_c('i',{staticClass:"awsui-iconfont",staticStyle:{"font-size":"13px"},domProps:{"innerHTML":_vm._s(item.icon_os_type)}})])])}),1)],1)}
var app_selectvue_type_template_id_9d9b4566_scoped_true_staticRenderFns = []


// CONCATENATED MODULE: ./packages/app-select/src/app-select.vue?vue&type=template&id=9d9b4566&scoped=true&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/app-select/src/app-select.vue?vue&type=script&lang=js&


//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var app_selectvue_type_script_lang_js_ = ({
  name: "AwsAppSelect",
  props: ['sid', 'width', 'filter', 'placeholder'],
  data: function data() {
    return {
      optionsCopy: [],
      options: [],
      defaultSelectValue: ''
    };
  },
  beforeCreate: function beforeCreate() {},
  created: function created() {},
  beforeMount: function beforeMount() {},
  mounted: function mounted() {
    this.getAppOptions();
  },
  methods: {
    dataFilter: function dataFilter(val) {
      this.defaultSelectValue = val;

      if (val) {
        //val存在
        this.options = this.optionsCopy.filter(function (item) {
          if (item.label.indexOf(val) > -1 || item.appId.toUpperCase().indexOf(val.toUpperCase()) > -1) {
            return true;
          }
        });
      } else {
        //val为空时，还原数组
        this.options = this.optionsCopy;
      }
    },
    getAppOptions: function getAppOptions() {
      var that = this;
      var data = {
        url: './jd',
        data: {
          sid: that.sid,
          param: that.filter,
          cmd: 'CONSOLE_M_METADATA_GET_OPTIONS'
        }
      };
      that.awsuiaxios.post(data).then(function (ro) {
        if (ro.result == 'ok') {
          var _data = ro.data;
          that.options = _data.data;
          that.optionsCopy = _data.data;
        }
      }).catch(function (error) {
        console.log(error);
      });
    },
    getValue: function getValue(data) {
      this.defaultSelectValue = data;
      this.$emit('getResult', data);
      this.$emit('change', data);
    },
    setValueNull: function setValueNull() {
      this.defaultSelectValue = '';
      this.options = this.optionsCopy;
    }
  }
});
// CONCATENATED MODULE: ./packages/app-select/src/app-select.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_app_selectvue_type_script_lang_js_ = (app_selectvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./packages/app-select/src/app-select.vue?vue&type=style&index=0&id=9d9b4566&scoped=true&lang=css&
var app_selectvue_type_style_index_0_id_9d9b4566_scoped_true_lang_css_ = __webpack_require__("3106");

// CONCATENATED MODULE: ./packages/app-select/src/app-select.vue






/* normalize component */

var app_select_component = Object(componentNormalizer["a" /* default */])(
  src_app_selectvue_type_script_lang_js_,
  app_selectvue_type_template_id_9d9b4566_scoped_true_render,
  app_selectvue_type_template_id_9d9b4566_scoped_true_staticRenderFns,
  false,
  null,
  "9d9b4566",
  null
  
)

/* harmony default export */ var app_select = (app_select_component.exports);
// CONCATENATED MODULE: ./packages/app-select/index.js



app_select.install = function (Vue) {
  Vue.component(app_select.name, app_select);
};

/* harmony default export */ var packages_app_select = (app_select);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
function _arrayWithHoles(arr) {
  if (Array.isArray(arr)) return arr;
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js







function _iterableToArrayLimit(arr, i) {
  if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
  var _arr = [];
  var _n = true;
  var _d = false;
  var _e = undefined;

  try {
    for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
      _arr.push(_s.value);

      if (i && _arr.length === i) break;
    }
  } catch (err) {
    _d = true;
    _e = err;
  } finally {
    try {
      if (!_n && _i["return"] != null) _i["return"]();
    } finally {
      if (_d) throw _e;
    }
  }

  return _arr;
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
function _nonIterableRest() {
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js




function _slicedToArray(arr, i) {
  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || _nonIterableRest();
}
// EXTERNAL MODULE: ./node_modules/uuid/v4.js
var v4 = __webpack_require__("c64e");
var v4_default = /*#__PURE__*/__webpack_require__.n(v4);

// CONCATENATED MODULE: ./src/utils/tools.js











/*
 aws 通用工具方法类
 */

var _getCountIndex = 0;
var tools = {
  //获取一个36位的ID字符串
  uuid: function uuid() {
    return "obj_" + v4_default()().replace(/-/g, "");
  },
  getCountIndex: function getCountIndex() {
    return _getCountIndex++;
  },
  //判断字符串是否为空且不是undefined
  isNotNull: function isNotNull(str) {
    return str !== undefined && str != null && str.length > 0;
  },
  //判断字符串是空或者是undefined
  isNull: function isNull(str) {
    return str === undefined || str === null || str.length === 0;
  },
  //判断Object对象是否为空，返回Boolean
  isNotNullObject: function isNotNullObject(obj) {
    return obj !== undefined && Object.keys(obj).length > 0;
  },
  //查询某个Object对象在Array中的索引值
  queryObjectInArrayIndex: function queryObjectInArrayIndex(arr, objKey, filed) {
    if (arr instanceof Array) {
      var _iterator = _createForOfIteratorHelper(arr.entries()),
          _step;

      try {
        for (_iterator.s(); !(_step = _iterator.n()).done;) {
          var _step$value = _slicedToArray(_step.value, 2),
              index = _step$value[0],
              arrElement = _step$value[1];

          if (arrElement[objKey] === filed) {
            return index;
          } else {
            return -1;
          }
        }
      } catch (err) {
        _iterator.e(err);
      } finally {
        _iterator.f();
      }
    }
  },

  /*/!**
   * @Date 2021/1/15 20:22
   * @Author hunter
   * @Description 该方法用于判断浏览器的类型
   * @return Chrome:谷歌浏览器; Firefox:火狐浏览器; Opera:Opera 浏览器; IE:Microsoft Internet Explorer; Edge:Microsoft Edge; Safari:Apple Safari浏览器; unknown:浏览器类型未知;
   *!/
  getBrowserInfo() {
  	let brow = "unknown", agent = window.navigator.userAgent;
  	switch (this.isNotNull(agent)) {
  		case agent.indexOf("Chrome") > -1:
  			brow = "Chrome";
  			break;
  		case agent.indexOf("Firefox") > -1:
  			brow = "Firefox";
  			break;
  		case agent.indexOf("Opera") > -1:
  			brow = "Opera";
  			break;
  		case agent.indexOf("Trident") > -1:
  			brow = "IE";
  			break;
  		case agent.indexOf("Edge") > -1:
  			brow = "Edge";
  			break;
  		case agent.indexOf("Safari") > -1:
  			brow = "Safari";
  			break;
  		default:
  			break;
  	}
  	return brow;
  },*/
  getBrowser: function getBrowser() {
    var ua = navigator.userAgent.toLowerCase();
    return {
      isStrict: document.compatMode == "CSS1Compat",
      isOpera: ua.indexOf("opera") > -1,
      isSafari: ua.indexOf("safari") > -1 && ua.indexOf("chrome") == -1,
      isIE: "ActiveXObject" in window,
      isIE6: !this.isOpera && ua.indexOf("msie 6") > -1,
      isIE7: !this.isOpera && ua.indexOf("msie 7") > -1,
      isIE8: !this.isOpera && ua.indexOf("msie 8") > -1,
      isIE9: !this.isOpera && ua.indexOf("msie 9") > -1,
      isIE10: !this.isOpera && ua.indexOf("msie 10") > -1,
      isIE11: /trident\/7\./.test(ua) && ua.indexOf("rv:11") > -1,
      isGecko: !this.isSafari && ua.indexOf("gecko") > -1,
      isFirefox: !this.isSafari && ua.indexOf("gecko") > -1 && ua.indexOf("firefox") > -1,
      isChrome: ua.indexOf("chrome") !== -1,
      isBorderBox: this.isIE && !this.isStrict,
      isWindows: ua.indexOf("windows") != -1 || ua.indexOf("win32") != -1,
      isMac: ua.indexOf("macintosh") != -1 || ua.indexOf("mac os x") != -1,
      isAir: ua.indexOf("adobeair") != -1,
      isLinux: ua.indexOf("linux") != -1,
      isSecure: window.location.href.toLowerCase().indexOf("https") === 0,
      isIPhone: ua.match(/(iphone\sos)\s([\d_]+)/) != null || ua.match(/(ipad).*os\s([\d_]+)/) != null,
      isIPhoneX: /iphone/gi.test(window.navigator.userAgent) && window.screen.height >= 812,
      //window.screen.width == 375 && window.screen.height == 812, /*判断特定分辨率*/
      isIPad: ua.match(/(ipad).*os\s([\d_]+)/) != null,
      isAWSMobilePortalApp: ua.indexOf("awsmobileportal") > 0,
      //是否为移动门户App，特殊处理，需要于下面这个判断
      isAndroid: ua.indexOf("android") > 0,
      //是否为Android
      isDingtalk: ua.indexOf("alibaba") > 0 || ua.indexOf("dingtalk") > 0 && ua.indexOf("mobile") > 0,
      //钉钉
      isWechat: ua.indexOf("micromessenger") > 0 && ua.indexOf("wxwork") == -1,
      //普通微信
      isWxWork: ua.indexOf("micromessenger") > 0 && ua.indexOf("wxwork") > 0,
      //企业微信
      isFeishu: ua.indexOf("lark") > 0,
      //飞书
      isWeLink: ua.indexOf("welink") > 0 || ua.indexOf("huawei") > 0,
      //WeLink华为云
      isMobile: !!ua.match(/(iphone|ipod|android|ios)/i) //是否为移动终端||!!u.match(/AppleWebKit/)

    };
  }
};
/* harmony default export */ var utils_tools = ({
  install: function install(Vue, options) {
    Vue.prototype.toolCustom = tools;
    Vue.prototype.awsuiTools = tools;
    Vue.prototype.browser = tools.getBrowser();
  }
});
// CONCATENATED MODULE: ./packages/index.js





 //导入codemirror



var packages_CodeMirror = window.CodeMirror || codemirror_default.a;
 // 导入按钮组件
//导入行组件

 //导入列组件



 // 导入单选框组件

 // 导入多选框组件

 // 导入输入框组件

 // 导入input-number组件

 // 导入select组件

 // 导入字段选择组件

 // 导入Cascader 级联选择器组件

 // 导入switch组件

 // 导入Cascader 级联选择器组件

 // 导入时间选择器组件

 // 导入颜色选择器组件

 // 导入图标选择器组件

 // 导入@公式组件

 // 导入上传组件


 // 导入树形结构组件

 //导入布局组件









 //导入导航组件
//导入标签页Tabs组件


 //反馈组件 begin




 // 导入回到顶部组件

 // 导入代码镜像组件

 // 地址簿组件

 // input框左右的图标的点击事件

 // 数据字典组件


/*应用组件 begin*/



/*应用组件 end*/

/*aws通用工具方法 begin*/


/*aws通用工具方法 end*/
// 存储组件列表

var components = [packages_codemirror, packages_row, packages_col, packages_button, packages_button_group, packages_radio, packages_checkbox, packages_input, packages_input_number, packages_select, packages_bo_metadata_select, packages_cascader, packages_switch, packages_slider, packages_time_picker, packages_color_picker, packages_icon_picker, packages_formula, packages_upload, packages_upload_image, packages_tree, packages_layout, packages_header, packages_aside, packages_main, packages_footer, packages_form, packages_form_item, packages_down_select, packages_down_select_item, packages_tabs, packages_tab_pane, packages_dialog, packages_sidebar, packages_backtop, packages_code_helper, packages_address, packages_input_icon_click, //应用组件
packages_app_info, packages_app_select, packages_data_dictionary]; // 定义 install 方法，接收 Vue 作为参数。如果使用 use 注册插件，则所有的组件都将被注册

var packages_install = function install(Vue) {
  // 判断是否可以安装
  if (install.installed) return;
  ele.install(Vue); // 遍历注册全局组件

  components.map(function (component) {
    Vue.component(component.name, component);
  });
  Vue.prototype.awsuiaxios = axios["a" /* default */]; //放入全局

  Vue.prototype.$message = packages_message["a" /* default */];
  Vue.prototype.$msgbox = packages_message_box;
  Vue.prototype.$alert = packages_message_box.alert;
  Vue.prototype.$confirm = packages_message_box.confirm;
  Vue.prototype.$prompt = packages_message_box.prompt;
  utils_tools.install(Vue);

  if (typeof window != "undefined") {
    window.CodeMirror = packages_CodeMirror;
  }
}; // 判断是否是直接引入文件 这里的判断很重要 支持使用标签的方式引入


if (typeof window !== "undefined" && window.Vue) {
  packages_install(window.Vue);
}

 //导出组件库存，暴露给调用者

/* harmony default export */ var packages_0 = ({
  CodeMirror: packages_CodeMirror,
  AwsuiCodemirror: packages_codemirror,
  // 导出的对象必须具有 install，才能被 Vue.use() 方法安装
  install: packages_install,
  element: ele,
  // 以下是具体的组件列表
  Row: packages_row,
  Col: packages_col,
  Button: packages_button,
  ButtonGroup: packages_button_group,
  Radio: packages_radio,
  Checkbox: packages_checkbox,
  Input: packages_input,
  InputNumber: packages_input_number,
  Select: packages_select,
  BOMetadataSelect: packages_bo_metadata_select,
  Cascader: packages_cascader,
  Switch: packages_switch,
  Slider: packages_slider,
  TimePicker: packages_time_picker,
  ColorPicker: packages_color_picker,
  IconPicker: packages_icon_picker,
  Formula: packages_formula,
  Upload: packages_upload,
  AwsuiUploadImage: packages_upload_image,
  Tree: packages_tree,
  Layout: packages_layout,
  Header: packages_header,
  Aside: packages_aside,
  Main: packages_main,
  Footer: packages_footer,
  Form: packages_form,
  FormItem: packages_form_item,
  DownSelect: packages_down_select,
  DownSelectItem: packages_down_select_item,
  Tabs: packages_tabs,
  TabPane: packages_tab_pane,
  Dialog: packages_dialog,
  Sidebar: packages_sidebar,
  Backtop: packages_backtop,
  CodeHelper: packages_code_helper,
  Address: packages_address,
  inputIconClick: packages_input_icon_click,
  //应用组件
  AppInfo: packages_app_info,
  AppSelect: packages_app_select,
  DDictionary: packages_data_dictionary,
  tools: utils_tools,
  Axios: axios["a" /* default */]
});
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js


/* harmony default export */ var entry_lib = __webpack_exports__["default"] = (packages_0);



/***/ }),

/***/ "fb6a":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var isObject = __webpack_require__("861d");
var isArray = __webpack_require__("e8b5");
var toAbsoluteIndex = __webpack_require__("23cb");
var toLength = __webpack_require__("50c4");
var toIndexedObject = __webpack_require__("fc6a");
var createProperty = __webpack_require__("8418");
var wellKnownSymbol = __webpack_require__("b622");
var arrayMethodHasSpeciesSupport = __webpack_require__("1dde");
var arrayMethodUsesToLength = __webpack_require__("ae40");

var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
var USES_TO_LENGTH = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 });

var SPECIES = wellKnownSymbol('species');
var nativeSlice = [].slice;
var max = Math.max;

// `Array.prototype.slice` method
// https://tc39.github.io/ecma262/#sec-array.prototype.slice
// fallback for not array-like ES3 strings and DOM objects
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
  slice: function slice(start, end) {
    var O = toIndexedObject(this);
    var length = toLength(O.length);
    var k = toAbsoluteIndex(start, length);
    var fin = toAbsoluteIndex(end === undefined ? length : end, length);
    // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
    var Constructor, result, n;
    if (isArray(O)) {
      Constructor = O.constructor;
      // cross-realm fallback
      if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
        Constructor = undefined;
      } else if (isObject(Constructor)) {
        Constructor = Constructor[SPECIES];
        if (Constructor === null) Constructor = undefined;
      }
      if (Constructor === Array || Constructor === undefined) {
        return nativeSlice.call(O, k, fin);
      }
    }
    result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));
    for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
    result.length = n;
    return result;
  }
});


/***/ }),

/***/ "fc21":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_down_select_item_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ace4");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_down_select_item_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_down_select_item_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
 /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_down_select_item_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "fc5e":
/***/ (function(module, exports) {

// 7.1.4 ToInteger
var ceil = Math.ceil;
var floor = Math.floor;
module.exports = function (it) {
  return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
};


/***/ }),

/***/ "fc6a":
/***/ (function(module, exports, __webpack_require__) {

// toObject with fallback for non-array-like ES3 strings
var IndexedObject = __webpack_require__("44ad");
var requireObjectCoercible = __webpack_require__("1d80");

module.exports = function (it) {
  return IndexedObject(requireObjectCoercible(it));
};


/***/ }),

/***/ "fcd4":
/***/ (function(module, exports, __webpack_require__) {

exports.f = __webpack_require__("cc15");


/***/ }),

/***/ "fdbc":
/***/ (function(module, exports) {

// iterable DOM collections
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
module.exports = {
  CSSRuleList: 0,
  CSSStyleDeclaration: 0,
  CSSValueList: 0,
  ClientRectList: 0,
  DOMRectList: 0,
  DOMStringList: 0,
  DOMTokenList: 1,
  DataTransferItemList: 0,
  FileList: 0,
  HTMLAllCollection: 0,
  HTMLCollection: 0,
  HTMLFormElement: 0,
  HTMLSelectElement: 0,
  MediaList: 0,
  MimeTypeArray: 0,
  NamedNodeMap: 0,
  NodeList: 1,
  PaintRequestList: 0,
  Plugin: 0,
  PluginArray: 0,
  SVGLengthList: 0,
  SVGNumberList: 0,
  SVGPathSegList: 0,
  SVGPointList: 0,
  SVGStringList: 0,
  SVGTransformList: 0,
  SourceBufferList: 0,
  StyleSheetList: 0,
  TextTrackCueList: 0,
  TextTrackList: 0,
  TouchList: 0
};


/***/ }),

/***/ "fdbf":
/***/ (function(module, exports, __webpack_require__) {

var NATIVE_SYMBOL = __webpack_require__("4930");

module.exports = NATIVE_SYMBOL
  // eslint-disable-next-line no-undef
  && !Symbol.sham
  // eslint-disable-next-line no-undef
  && typeof Symbol.iterator == 'symbol';


/***/ }),

/***/ "fea9":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");

module.exports = global.Promise;


/***/ }),

/***/ "fed5":
/***/ (function(module, exports) {

exports.f = Object.getOwnPropertySymbols;


/***/ }),

/***/ "ffda":
/***/ (function(module, exports, __webpack_require__) {

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE

(function(mod) {
  if (true) // CommonJS
    mod(__webpack_require__("56b3"));
  else {}
})(function(CodeMirror) {
"use strict";

CodeMirror.defineMode("sql", function(config, parserConfig) {
  var client         = parserConfig.client || {},
      atoms          = parserConfig.atoms || {"false": true, "true": true, "null": true},
      builtin        = parserConfig.builtin || set(defaultBuiltin),
      keywords       = parserConfig.keywords || set(sqlKeywords),
      operatorChars  = parserConfig.operatorChars || /^[*+\-%<>!=&|~^\/]/,
      support        = parserConfig.support || {},
      hooks          = parserConfig.hooks || {},
      dateSQL        = parserConfig.dateSQL || {"date" : true, "time" : true, "timestamp" : true},
      backslashStringEscapes = parserConfig.backslashStringEscapes !== false,
      brackets       = parserConfig.brackets || /^[\{}\(\)\[\]]/,
      punctuation    = parserConfig.punctuation || /^[;.,:]/

  function tokenBase(stream, state) {
    var ch = stream.next();

    // call hooks from the mime type
    if (hooks[ch]) {
      var result = hooks[ch](stream, state);
      if (result !== false) return result;
    }

    if (support.hexNumber &&
      ((ch == "0" && stream.match(/^[xX][0-9a-fA-F]+/))
      || (ch == "x" || ch == "X") && stream.match(/^'[0-9a-fA-F]+'/))) {
      // hex
      // ref: http://dev.mysql.com/doc/refman/5.5/en/hexadecimal-literals.html
      return "number";
    } else if (support.binaryNumber &&
      (((ch == "b" || ch == "B") && stream.match(/^'[01]+'/))
      || (ch == "0" && stream.match(/^b[01]+/)))) {
      // bitstring
      // ref: http://dev.mysql.com/doc/refman/5.5/en/bit-field-literals.html
      return "number";
    } else if (ch.charCodeAt(0) > 47 && ch.charCodeAt(0) < 58) {
      // numbers
      // ref: http://dev.mysql.com/doc/refman/5.5/en/number-literals.html
      stream.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/);
      support.decimallessFloat && stream.match(/^\.(?!\.)/);
      return "number";
    } else if (ch == "?" && (stream.eatSpace() || stream.eol() || stream.eat(";"))) {
      // placeholders
      return "variable-3";
    } else if (ch == "'" || (ch == '"' && support.doubleQuote)) {
      // strings
      // ref: http://dev.mysql.com/doc/refman/5.5/en/string-literals.html
      state.tokenize = tokenLiteral(ch);
      return state.tokenize(stream, state);
    } else if ((((support.nCharCast && (ch == "n" || ch == "N"))
        || (support.charsetCast && ch == "_" && stream.match(/[a-z][a-z0-9]*/i)))
        && (stream.peek() == "'" || stream.peek() == '"'))) {
      // charset casting: _utf8'str', N'str', n'str'
      // ref: http://dev.mysql.com/doc/refman/5.5/en/string-literals.html
      return "keyword";
    } else if (support.escapeConstant && (ch == "e" || ch == "E")
        && (stream.peek() == "'" || (stream.peek() == '"' && support.doubleQuote))) {
      // escape constant: E'str', e'str'
      // ref: https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-ESCAPE
      state.tokenize = function(stream, state) {
        return (state.tokenize = tokenLiteral(stream.next(), true))(stream, state);
      }
      return "keyword";
    } else if (support.commentSlashSlash && ch == "/" && stream.eat("/")) {
      // 1-line comment
      stream.skipToEnd();
      return "comment";
    } else if ((support.commentHash && ch == "#")
        || (ch == "-" && stream.eat("-") && (!support.commentSpaceRequired || stream.eat(" ")))) {
      // 1-line comments
      // ref: https://kb.askmonty.org/en/comment-syntax/
      stream.skipToEnd();
      return "comment";
    } else if (ch == "/" && stream.eat("*")) {
      // multi-line comments
      // ref: https://kb.askmonty.org/en/comment-syntax/
      state.tokenize = tokenComment(1);
      return state.tokenize(stream, state);
    } else if (ch == ".") {
      // .1 for 0.1
      if (support.zerolessFloat && stream.match(/^(?:\d+(?:e[+-]?\d+)?)/i))
        return "number";
      if (stream.match(/^\.+/))
        return null
      // .table_name (ODBC)
      // // ref: http://dev.mysql.com/doc/refman/5.6/en/identifier-qualifiers.html
      if (support.ODBCdotTable && stream.match(/^[\w\d_$#]+/))
        return "variable-2";
    } else if (operatorChars.test(ch)) {
      // operators
      stream.eatWhile(operatorChars);
      return "operator";
    } else if (brackets.test(ch)) {
      // brackets
      return "bracket";
    } else if (punctuation.test(ch)) {
      // punctuation
      stream.eatWhile(punctuation);
      return "punctuation";
    } else if (ch == '{' &&
        (stream.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/) || stream.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/))) {
      // dates (weird ODBC syntax)
      // ref: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-literals.html
      return "number";
    } else {
      stream.eatWhile(/^[_\w\d]/);
      var word = stream.current().toLowerCase();
      // dates (standard SQL syntax)
      // ref: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-literals.html
      if (dateSQL.hasOwnProperty(word) && (stream.match(/^( )+'[^']*'/) || stream.match(/^( )+"[^"]*"/)))
        return "number";
      if (atoms.hasOwnProperty(word)) return "atom";
      if (builtin.hasOwnProperty(word)) return "builtin";
      if (keywords.hasOwnProperty(word)) return "keyword";
      if (client.hasOwnProperty(word)) return "string-2";
      return null;
    }
  }

  // 'string', with char specified in quote escaped by '\'
  function tokenLiteral(quote, backslashEscapes) {
    return function(stream, state) {
      var escaped = false, ch;
      while ((ch = stream.next()) != null) {
        if (ch == quote && !escaped) {
          state.tokenize = tokenBase;
          break;
        }
        escaped = (backslashStringEscapes || backslashEscapes) && !escaped && ch == "\\";
      }
      return "string";
    };
  }
  function tokenComment(depth) {
    return function(stream, state) {
      var m = stream.match(/^.*?(\/\*|\*\/)/)
      if (!m) stream.skipToEnd()
      else if (m[1] == "/*") state.tokenize = tokenComment(depth + 1)
      else if (depth > 1) state.tokenize = tokenComment(depth - 1)
      else state.tokenize = tokenBase
      return "comment"
    }
  }

  function pushContext(stream, state, type) {
    state.context = {
      prev: state.context,
      indent: stream.indentation(),
      col: stream.column(),
      type: type
    };
  }

  function popContext(state) {
    state.indent = state.context.indent;
    state.context = state.context.prev;
  }

  return {
    startState: function() {
      return {tokenize: tokenBase, context: null};
    },

    token: function(stream, state) {
      if (stream.sol()) {
        if (state.context && state.context.align == null)
          state.context.align = false;
      }
      if (state.tokenize == tokenBase && stream.eatSpace()) return null;

      var style = state.tokenize(stream, state);
      if (style == "comment") return style;

      if (state.context && state.context.align == null)
        state.context.align = true;

      var tok = stream.current();
      if (tok == "(")
        pushContext(stream, state, ")");
      else if (tok == "[")
        pushContext(stream, state, "]");
      else if (state.context && state.context.type == tok)
        popContext(state);
      return style;
    },

    indent: function(state, textAfter) {
      var cx = state.context;
      if (!cx) return CodeMirror.Pass;
      var closing = textAfter.charAt(0) == cx.type;
      if (cx.align) return cx.col + (closing ? 0 : 1);
      else return cx.indent + (closing ? 0 : config.indentUnit);
    },

    blockCommentStart: "/*",
    blockCommentEnd: "*/",
    lineComment: support.commentSlashSlash ? "//" : support.commentHash ? "#" : "--",
    closeBrackets: "()[]{}''\"\"``"
  };
});

  // `identifier`
  function hookIdentifier(stream) {
    // MySQL/MariaDB identifiers
    // ref: http://dev.mysql.com/doc/refman/5.6/en/identifier-qualifiers.html
    var ch;
    while ((ch = stream.next()) != null) {
      if (ch == "`" && !stream.eat("`")) return "variable-2";
    }
    stream.backUp(stream.current().length - 1);
    return stream.eatWhile(/\w/) ? "variable-2" : null;
  }

  // "identifier"
  function hookIdentifierDoublequote(stream) {
    // Standard SQL /SQLite identifiers
    // ref: http://web.archive.org/web/20160813185132/http://savage.net.au/SQL/sql-99.bnf.html#delimited%20identifier
    // ref: http://sqlite.org/lang_keywords.html
    var ch;
    while ((ch = stream.next()) != null) {
      if (ch == "\"" && !stream.eat("\"")) return "variable-2";
    }
    stream.backUp(stream.current().length - 1);
    return stream.eatWhile(/\w/) ? "variable-2" : null;
  }

  // variable token
  function hookVar(stream) {
    // variables
    // @@prefix.varName @varName
    // varName can be quoted with ` or ' or "
    // ref: http://dev.mysql.com/doc/refman/5.5/en/user-variables.html
    if (stream.eat("@")) {
      stream.match(/^session\./);
      stream.match(/^local\./);
      stream.match(/^global\./);
    }

    if (stream.eat("'")) {
      stream.match(/^.*'/);
      return "variable-2";
    } else if (stream.eat('"')) {
      stream.match(/^.*"/);
      return "variable-2";
    } else if (stream.eat("`")) {
      stream.match(/^.*`/);
      return "variable-2";
    } else if (stream.match(/^[0-9a-zA-Z$\.\_]+/)) {
      return "variable-2";
    }
    return null;
  };

  // short client keyword token
  function hookClient(stream) {
    // \N means NULL
    // ref: http://dev.mysql.com/doc/refman/5.5/en/null-values.html
    if (stream.eat("N")) {
        return "atom";
    }
    // \g, etc
    // ref: http://dev.mysql.com/doc/refman/5.5/en/mysql-commands.html
    return stream.match(/^[a-zA-Z.#!?]/) ? "variable-2" : null;
  }

  // these keywords are used by all SQL dialects (however, a mode can still overwrite it)
  var sqlKeywords = "alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";

  // turn a space-separated list into an array
  function set(str) {
    var obj = {}, words = str.split(" ");
    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
    return obj;
  }

  var defaultBuiltin = "bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric"

  // A generic SQL Mode. It's not a standard, it just try to support what is generally supported
  CodeMirror.defineMIME("text/x-sql", {
    name: "sql",
    keywords: set(sqlKeywords + "begin"),
    builtin: set(defaultBuiltin),
    atoms: set("false true null unknown"),
    dateSQL: set("date time timestamp"),
    support: set("ODBCdotTable doubleQuote binaryNumber hexNumber")
  });

  CodeMirror.defineMIME("text/x-mssql", {
    name: "sql",
    client: set("$partition binary_checksum checksum connectionproperty context_info current_request_id error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big xact_state object_id"),
    keywords: set(sqlKeywords + "begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx updlock with"),
    builtin: set("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),
    atoms: set("is not null like and or in left right between inner outer join all any some cross unpivot pivot exists"),
    operatorChars: /^[*+\-%<>!=^\&|\/]/,
    brackets: /^[\{}\(\)]/,
    punctuation: /^[;.,:/]/,
    backslashStringEscapes: false,
    dateSQL: set("date datetimeoffset datetime2 smalldatetime datetime time"),
    hooks: {
      "@":   hookVar
    }
  });

  CodeMirror.defineMIME("text/x-mysql", {
    name: "sql",
    client: set("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),
    keywords: set(sqlKeywords + "accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),
    builtin: set("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),
    atoms: set("false true null unknown"),
    operatorChars: /^[*+\-%<>!=&|^]/,
    dateSQL: set("date time timestamp"),
    support: set("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),
    hooks: {
      "@":   hookVar,
      "`":   hookIdentifier,
      "\\":  hookClient
    }
  });

  CodeMirror.defineMIME("text/x-mariadb", {
    name: "sql",
    client: set("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),
    keywords: set(sqlKeywords + "accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),
    builtin: set("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),
    atoms: set("false true null unknown"),
    operatorChars: /^[*+\-%<>!=&|^]/,
    dateSQL: set("date time timestamp"),
    support: set("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),
    hooks: {
      "@":   hookVar,
      "`":   hookIdentifier,
      "\\":  hookClient
    }
  });

  // provided by the phpLiteAdmin project - phpliteadmin.org
  CodeMirror.defineMIME("text/x-sqlite", {
    name: "sql",
    // commands of the official SQLite client, ref: https://www.sqlite.org/cli.html#dotcmd
    client: set("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),
    // ref: http://sqlite.org/lang_keywords.html
    keywords: set(sqlKeywords + "abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),
    // SQLite is weakly typed, ref: http://sqlite.org/datatype3.html. This is just a list of some common types.
    builtin: set("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),
    // ref: http://sqlite.org/syntax/literal-value.html
    atoms: set("null current_date current_time current_timestamp"),
    // ref: http://sqlite.org/lang_expr.html#binaryops
    operatorChars: /^[*+\-%<>!=&|/~]/,
    // SQLite is weakly typed, ref: http://sqlite.org/datatype3.html. This is just a list of some common types.
    dateSQL: set("date time timestamp datetime"),
    support: set("decimallessFloat zerolessFloat"),
    identifierQuote: "\"",  //ref: http://sqlite.org/lang_keywords.html
    hooks: {
      // bind-parameters ref:http://sqlite.org/lang_expr.html#varparam
      "@":   hookVar,
      ":":   hookVar,
      "?":   hookVar,
      "$":   hookVar,
      // The preferred way to escape Identifiers is using double quotes, ref: http://sqlite.org/lang_keywords.html
      "\"":   hookIdentifierDoublequote,
      // there is also support for backtics, ref: http://sqlite.org/lang_keywords.html
      "`":   hookIdentifier
    }
  });

  // the query language used by Apache Cassandra is called CQL, but this mime type
  // is called Cassandra to avoid confusion with Contextual Query Language
  CodeMirror.defineMIME("text/x-cassandra", {
    name: "sql",
    client: { },
    keywords: set("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),
    builtin: set("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),
    atoms: set("false true infinity NaN"),
    operatorChars: /^[<>=]/,
    dateSQL: { },
    support: set("commentSlashSlash decimallessFloat"),
    hooks: { }
  });

  // this is based on Peter Raganitsch's 'plsql' mode
  CodeMirror.defineMIME("text/x-plsql", {
    name:       "sql",
    client:     set("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),
    keywords:   set("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),
    builtin:    set("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),
    operatorChars: /^[*\/+\-%<>!=~]/,
    dateSQL:    set("date time timestamp"),
    support:    set("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")
  });

  // Created to support specific hive keywords
  CodeMirror.defineMIME("text/x-hive", {
    name: "sql",
    keywords: set("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),
    builtin: set("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),
    atoms: set("false true null unknown"),
    operatorChars: /^[*+\-%<>!=]/,
    dateSQL: set("date timestamp"),
    support: set("ODBCdotTable doubleQuote binaryNumber hexNumber")
  });

  CodeMirror.defineMIME("text/x-pgsql", {
    name: "sql",
    client: set("source"),
    // For PostgreSQL - https://www.postgresql.org/docs/11/sql-keywords-appendix.html
    // For pl/pgsql lang - https://github.com/postgres/postgres/blob/REL_11_2/src/pl/plpgsql/src/pl_scanner.c
    keywords: set(sqlKeywords + "a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),
    // https://www.postgresql.org/docs/11/datatype.html
    builtin: set("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),
    atoms: set("false true null unknown"),
    operatorChars: /^[*\/+\-%<>!=&|^\/#@?~]/,
    backslashStringEscapes: false,
    dateSQL: set("date time timestamp"),
    support: set("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")
  });

  // Google's SQL-like query language, GQL
  CodeMirror.defineMIME("text/x-gql", {
    name: "sql",
    keywords: set("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),
    atoms: set("false true"),
    builtin: set("blob datetime first key __key__ string integer double boolean null"),
    operatorChars: /^[*+\-%<>!=]/
  });

  // Greenplum
  CodeMirror.defineMIME("text/x-gpsql", {
    name: "sql",
    client: set("source"),
    //https://github.com/greenplum-db/gpdb/blob/master/src/include/parser/kwlist.h
    keywords: set("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),
    builtin: set("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),
    atoms: set("false true null unknown"),
    operatorChars: /^[*+\-%<>!=&|^\/#@?~]/,
    dateSQL: set("date time timestamp"),
    support: set("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")
  });

  // Spark SQL
  CodeMirror.defineMIME("text/x-sparksql", {
    name: "sql",
    keywords: set("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases datata dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),
    builtin: set("tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat"),
    atoms: set("false true null"),
    operatorChars: /^[*\/+\-%<>!=~&|^]/,
    dateSQL: set("date time timestamp"),
    support: set("ODBCdotTable doubleQuote zerolessFloat")
  });

  // Esper
  CodeMirror.defineMIME("text/x-esper", {
    name: "sql",
    client: set("source"),
    // http://www.espertech.com/esper/release-5.5.0/esper-reference/html/appendix_keywords.html
    keywords: set("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),
    builtin: {},
    atoms: set("false true null"),
    operatorChars: /^[*+\-%<>!=&|^\/#@?~]/,
    dateSQL: set("time"),
    support: set("decimallessFloat zerolessFloat binaryNumber hexNumber")
  });
});

/*
  How Properties of Mime Types are used by SQL Mode
  =================================================

  keywords:
    A list of keywords you want to be highlighted.
  builtin:
    A list of builtin types you want to be highlighted (if you want types to be of class "builtin" instead of "keyword").
  operatorChars:
    All characters that must be handled as operators.
  client:
    Commands parsed and executed by the client (not the server).
  support:
    A list of supported syntaxes which are not common, but are supported by more than 1 DBMS.
    * ODBCdotTable: .tableName
    * zerolessFloat: .1
    * doubleQuote
    * nCharCast: N'string'
    * charsetCast: _utf8'string'
    * commentHash: use # char for comments
    * commentSlashSlash: use // for comments
    * commentSpaceRequired: require a space after -- for comments
  atoms:
    Keywords that must be highlighted as atoms,. Some DBMS's support more atoms than others:
    UNKNOWN, INFINITY, UNDERFLOW, NaN...
  dateSQL:
    Used for date/time SQL standard syntax, because not all DBMS's support same temporal types.
*/


/***/ })

/******/ });
});