(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["kr-print-designer"] = factory(require("vue")); else root["kr-print-designer"] = 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]'; /***/ }), /***/ "00fd": /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__("9e69"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. * @returns {string} Returns the raw `toStringTag`. */ function getRawTag(value) { var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; try { value[symToStringTag] = undefined; var unmasked = true; } catch (e) {} var result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { value[symToStringTag] = tag; } else { delete value[symToStringTag]; } } return result; } module.exports = getRawTag; /***/ }), /***/ "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; }; /***/ }), /***/ "03dd": /***/ (function(module, exports, __webpack_require__) { var isPrototype = __webpack_require__("eac5"), nativeKeys = __webpack_require__("57a5"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } var result = []; for (var key in Object(object)) { if (hasOwnProperty.call(object, key) && key != 'constructor') { result.push(key); } } return result; } module.exports = baseKeys; /***/ }), /***/ "049a": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "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)); }; /***/ }), /***/ "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) : {}; }; /***/ }), /***/ "0644": /***/ (function(module, exports, __webpack_require__) { var baseClone = __webpack_require__("3818"); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, CLONE_SYMBOLS_FLAG = 4; /** * This method is like `_.clone` except that it recursively clones `value`. * * @static * @memberOf _ * @since 1.0.0 * @category Lang * @param {*} value The value to recursively clone. * @returns {*} Returns the deep cloned value. * @see _.clone * @example * * var objects = [{ 'a': 1 }, { 'b': 2 }]; * * var deep = _.cloneDeep(objects); * console.log(deep[0] === objects[0]); * // => false */ function cloneDeep(value) { return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); } module.exports = cloneDeep; /***/ }), /***/ "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; /***/ }), /***/ "07c7": /***/ (function(module, exports) { /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } module.exports = stubFalse; /***/ }), /***/ "087d": /***/ (function(module, exports) { /** * Appends the elements of `values` to `array`. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to append. * @returns {Array} Returns `array`. */ function arrayPush(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } module.exports = arrayPush; /***/ }), /***/ "0983": /***/ (function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) var defined = __webpack_require__("c901"); module.exports = function (it) { return Object(defined(it)); }; /***/ }), /***/ "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; }; /***/ }), /***/ "0b07": /***/ (function(module, exports, __webpack_require__) { var baseIsNative = __webpack_require__("34ac"), getValue = __webpack_require__("3698"); /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : undefined; } module.exports = getNative; /***/ }), /***/ "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; }); /***/ }), /***/ "0bf0": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "0cc9": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "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; }); /***/ }), /***/ "0d24": /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__("2b3e"), stubFalse = __webpack_require__("07c7"); /** Detect free variable `exports`. */ var freeExports = true && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer = nativeIsBuffer || stubFalse; module.exports = isBuffer; /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("62e4")(module))) /***/ }), /***/ "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); }; /***/ }), /***/ "0f0f": /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__("8eeb"), keysIn = __webpack_require__("9934"); /** * The base implementation of `_.assignIn` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssignIn(object, source) { return object && copyObject(source, keysIn(source), object); } module.exports = baseAssignIn; /***/ }), /***/ "0f6c": /***/ (function(module, exports) { 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 = 132); /******/ }) /************************************************************************/ /******/ ({ /***/ 132: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./packages/row/src/row.js /* harmony default export */ var 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 */ row.install = function (Vue) { Vue.component(row.name, row); }; /* harmony default export */ var packages_row = __webpack_exports__["default"] = (row); /***/ }) /******/ }); /***/ }), /***/ "1041": /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__("8eeb"), getSymbolsIn = __webpack_require__("a029"); /** * Copies own and inherited symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbolsIn(source, object) { return copyObject(source, getSymbolsIn(source), object); } module.exports = copySymbolsIn; /***/ }), /***/ "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 }; }; /***/ }), /***/ "1290": /***/ (function(module, exports) { /** * Checks if `value` is suitable for use as unique object key. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ function isKeyable(value) { var type = typeof value; return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') ? (value !== '__proto__') : (value === null); } module.exports = isKeyable; /***/ }), /***/ "12ca": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "12f2": /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = function (ref) { return { methods: { focus: function focus() { this.$refs[ref].focus(); } } }; }; ; /***/ }), /***/ "1310": /***/ (function(module, exports) { /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && typeof value == 'object'; } module.exports = isObjectLike; /***/ }), /***/ "1368": /***/ (function(module, exports, __webpack_require__) { var coreJsData = __webpack_require__("da03"); /** Used to detect methods masquerading as native. */ var maskSrcKey = (function() { var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); return uid ? ('Symbol(src)_1.' + uid) : ''; }()); /** * Checks if `func` has its source masked. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ function isMasked(func) { return !!maskSrcKey && (maskSrcKey in func); } module.exports = isMasked; /***/ }), /***/ "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__) { 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"); /***/ }) /******/ }); /***/ }), /***/ "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; }; /***/ }), /***/ "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 }; /***/ }), /***/ "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)); }; /***/ }), /***/ "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; }; /***/ }), /***/ "1a2d": /***/ (function(module, exports, __webpack_require__) { var getTag = __webpack_require__("42a2"), isObjectLike = __webpack_require__("1310"); /** `Object#toString` result references. */ var mapTag = '[object Map]'; /** * The base implementation of `_.isMap` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a map, else `false`. */ function baseIsMap(value) { return isObjectLike(value) && getTag(value) == mapTag; } module.exports = baseIsMap; /***/ }), /***/ "1a8c": /***/ (function(module, exports) { /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } module.exports = isObject; /***/ }), /***/ "1bac": /***/ (function(module, exports, __webpack_require__) { var baseGetAllKeys = __webpack_require__("7d1f"), getSymbolsIn = __webpack_require__("a029"), keysIn = __webpack_require__("9934"); /** * Creates an array of own and inherited enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeysIn(object) { return baseGetAllKeys(object, keysIn, getSymbolsIn); } module.exports = getAllKeysIn; /***/ }), /***/ "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; }; /***/ }), /***/ "1cdc": /***/ (function(module, exports, __webpack_require__) { var userAgent = __webpack_require__("342f"); module.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent); /***/ }), /***/ "1cec": /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__("0b07"), root = __webpack_require__("2b3e"); /* Built-in method references that are verified to be native. */ var Promise = getNative(root, 'Promise'); module.exports = Promise; /***/ }), /***/ "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; }); }; /***/ }), /***/ "1efc": /***/ (function(module, exports) { /** * Removes `key` and its value from the hash. * * @private * @name delete * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function hashDelete(key) { var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } module.exports = hashDelete; /***/ }), /***/ "1fc8": /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__("4245"); /** * Sets the map `key` to `value`. * * @private * @name set * @memberOf MapCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the map cache instance. */ function mapCacheSet(key, value) { var data = getMapData(this, key), size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } module.exports = mapCacheSet; /***/ }), /***/ "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); }; /***/ }), /***/ "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); }; /***/ }), /***/ "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); }; /***/ }), /***/ "2474": /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__("2b3e"); /** Built-in value references. */ var Uint8Array = root.Uint8Array; module.exports = Uint8Array; /***/ }), /***/ "2478": /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__("4245"); /** * Gets the map value for `key`. * * @private * @name get * @memberOf MapCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function mapCacheGet(key) { return getMapData(this, key).get(key); } module.exports = mapCacheGet; /***/ }), /***/ "2510": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAugAAACGAQMAAAC19e3QAAAABlBMVEX///8AAABVwtN+AAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAbJJREFUaIHtmlFqxDAMRAU+QI7kq/tIPoBBlWbktPRnA21T2IwJS2JbT/mRRlbWTON/xuE5Zm+zm3X3sY7R3JdZ3MRKbpjWfMRqzKw0ifl89DLxsG0JMbAGbdsUXXTR/5DuvIkdiQhQoEFPl/C3DvjGhjDETBC76KKLfh89fxH6VvaZCYhudEYfM1dj8kwPjuQhuuiif4vVCr8U2MG4ja1bXcPS26wZ0vkSGbqiiy76PfS161tkgu0vM8Gg8SIduSGFdGYlXCnhZSYQXfQn0XesUjnDWZgZJg2q+1Vp6aDjEAopPq5mAtFFF/2ndGhpdXxQ5SaFN1y18yrf6AEdecy8pKuiiy76r9Cx1rGAoA/hxr7du03HuIaXUveqma/1lkQX/Ul050GyQVeplnyk2CKSYU/b2fdh00UXXfT76Ax6nD8N3zfSH9u0sYclsdWXyjMTbNW90AcWXfTn0KtKZfcHSzGPKpXKmdG7C1IWsLtKFV100W+m48BY9qvuHeIJ4WWXJ797dN8tobabuKKLLvpN9LYNzvMqG7cNku2f/9EZ1ffhCzFJvOz+iC76e9M13m98ACkZcs36ACChAAAAAElFTkSuQmCC" /***/ }), /***/ "2524": /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__("6044"); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Sets the hash `key` to `value`. * * @private * @name set * @memberOf Hash * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the hash instance. */ function hashSet(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; return this; } module.exports = hashSet; /***/ }), /***/ "253c": /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__("3729"), isObjectLike = __webpack_require__("1310"); /** `Object#toString` result references. */ var argsTag = '[object Arguments]'; /** * The base implementation of `_.isArguments`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag; } module.exports = baseIsArguments; /***/ }), /***/ "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; } }); } }; /***/ }), /***/ "269b": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "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'); }; /***/ }), /***/ "282a": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQQAAAEECAAAAADrYxXWAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAAFxEAABcRAcom8z8AAARGSURBVHja7d3RbtwoFIDhb1b75O2L9c2yF0ku3DAYPK7aVf9zE80YE/KJ6AgM+PGm+Od3N+BPiBCEgBAQAkJACAgBISAEhIAQEAL49/jxsXv/bBD6mJR8TL702rX9VtcThIAQEAJCQAh4hvB2Gt+ONzzeY1bLsMjjEB8lh3XOrl1t9RzhL4sQhIAQEAJCwJdR5DGGo7O3yZePyZez8ebbeWULtWy3+jPqCUJACAgBISAEnKTIq7GQ4xamXYcZdjbfejnqCUJACAgBISAE3JYiZ08DX8xjvzI3fkQ9QQgIASEgBISAkxS5nojuSVmzydRjplwouRH1BCEgBISAEPAsO3w/ve/H7274na1+3LM29PEnfNpu9Wf07yAEhIAQEAJCwJcU+Wpt7z9mmevFbR49i/xVEYIQEAJCQAh4NorcHscdbz/G+lDvngU6s5aNb68nCAEhIASEgBDwZbb56tPH7Y0ds/sWNotcXR40rrOeIASEgBAQAkLAldN1bj0zZ5YN17dVrjd3HPUEISAEhIAQEAKejSKHOxqHJddjfRS5nYRnda5M89YThIAQEAJCQAh4tqz36rPI9ceHV2dmj7cPbxg2cJop6wlCQAgIASEgBDxLkVdz4/DTrbG96WNlnraeIASEgBAQAkLAs00f28PA9f0d24tpXnwnyDBarvM1QhACQkAICAHPluts7wQx+nJhSeqLJ5bP5lQX/rDPqCcIASEgBISAELD2po/t3Lg+UtweDS4sJBpGE61nEYIQEAJCQAg4OYBue/WN5ZIv/tr2Rd4eIQgBISAEhICTowO2k9SLZ6Zu7/Z48ZCBz6gnCAEhIASEgBCwdnTAwpPJYSxk0Vkt618Or822gPwU9QQhIASEgBAQAk6OMV8fKa4fnTqsZWFd7D0raJtofRohCAEhIASEgLV9kccvHa49JtcW7hsWsXxtFhuTvvUEISAEhIAQEAK23vRxLHKM9cHdsJara3GulmwU+TVCEAJCQAgIAWtntA6LHGNhpHgsuTAIXT8zZ3sS9qeoJwgBISAEhIAQcOV9kS/G+mPH4TWTIgu/r+U6TyMEISAEhIAQcLJcZ6Oa9x/bLzxemNjd/n37LwqpJwgBISAEhIAQcOV9kccYHvp29Rnm1cNg1986Mo56ghAQAkJACAgBzxDeTuPb8L7He3yU+fh0rPNYcnbtWNmw5OzL2Z+yhPCXRQhCQAgIASFg7YzWY6wfK/c2uX3/dRzLDRw2qWeRZxGCEBACQkAIOEmR67F+AM89zz73z2GdXasnCAEhIASEgBBwW4qcpcHtw9C33zO50LLp4LWeIASEgBAQAkLASYpcT0vbJ4hvL2zdnpltonUvQhACQkAIeJYdvp/e9+N3N/zOeFzdb/gRV7cybr/wav1Qg/XT8z6jfwchIASEgBAQAm7bF/n/jnqCEBACQkAICAEhIASEgBAQAkJACAgB/AcNv7/8P9p8EAAAAABJRU5ErkJggg==" /***/ }), /***/ "28c9": /***/ (function(module, exports) { /** * Removes all key-value entries from the list cache. * * @private * @name clear * @memberOf ListCache */ function listCacheClear() { this.__data__ = []; this.size = 0; } module.exports = listCacheClear; /***/ }), /***/ "29f3": /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** * Converts `value` to a string using `Object.prototype.toString`. * * @private * @param {*} value The value to convert. * @returns {string} Returns the converted string. */ function objectToString(value) { return nativeObjectToString.call(value); } module.exports = objectToString; /***/ }), /***/ "2a5e": /***/ (function(module, exports, __webpack_require__) { "use strict"; 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; } } /***/ }), /***/ "2a63": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "2b1c": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "2b3e": /***/ (function(module, exports, __webpack_require__) { var freeGlobal = __webpack_require__("585a"); /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; /***/ }), /***/ "2bb5": /***/ (function(module, exports, __webpack_require__) { "use strict"; 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: {} }; } } }; /***/ }), /***/ "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; /***/ }), /***/ "2d7c": /***/ (function(module, exports) { /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; } } return result; } module.exports = arrayFilter; /***/ }), /***/ "2dcb": /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__("91e9"); /** Built-in value references. */ var getPrototype = overArg(Object.getPrototypeOf, Object); module.exports = getPrototype; /***/ }), /***/ "2f9a": /***/ (function(module, exports) { module.exports = function () { /* empty */ }; /***/ }), /***/ "2fcc": /***/ (function(module, exports) { /** * Removes `key` and its value from the stack. * * @private * @name delete * @memberOf Stack * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function stackDelete(key) { var data = this.__data__, result = data['delete'](key); this.size = data.size; return result; } module.exports = stackDelete; /***/ }), /***/ "301c": /***/ (function(module, exports, __webpack_require__) { __webpack_require__("e198")('asyncIterator'); /***/ }), /***/ "30c9": /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__("9520"), isLength = __webpack_require__("b218"); /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } module.exports = isArrayLike; /***/ }), /***/ "32b3": /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__("872a"), eq = __webpack_require__("9638"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Assigns `value` to `key` of `object` if the existing value is not equivalent * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } module.exports = assignValue; /***/ }), /***/ "32f4": /***/ (function(module, exports, __webpack_require__) { var arrayFilter = __webpack_require__("2d7c"), stubArray = __webpack_require__("d327"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbols = !nativeGetSymbols ? stubArray : function(object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols(object), function(symbol) { return propertyIsEnumerable.call(object, symbol); }); }; module.exports = getSymbols; /***/ }), /***/ "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"); }; /***/ }), /***/ "342f": /***/ (function(module, exports, __webpack_require__) { var getBuiltIn = __webpack_require__("d066"); module.exports = getBuiltIn('navigator', 'userAgent') || ''; /***/ }), /***/ "34ac": /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__("9520"), isMasked = __webpack_require__("1368"), isObject = __webpack_require__("1a8c"), toSource = __webpack_require__("dc57"); /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); /** * The base implementation of `_.isNative` without bad shim checks. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a native function, * else `false`. */ function baseIsNative(value) { if (!isObject(value) || isMasked(value)) { return false; } var pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } module.exports = baseIsNative; /***/ }), /***/ "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)]; }; /***/ }), /***/ "3698": /***/ (function(module, exports) { /** * Gets the value at `key` of `object`. * * @private * @param {Object} [object] The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function getValue(object, key) { return object == null ? undefined : object[key]; } module.exports = getValue; /***/ }), /***/ "3729": /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__("9e69"), getRawTag = __webpack_require__("00fd"), objectToString = __webpack_require__("29f3"); /** `Object#toString` result references. */ var nullTag = '[object Null]', undefinedTag = '[object Undefined]'; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; } return (symToStringTag && symToStringTag in Object(value)) ? getRawTag(value) : objectToString(value); } module.exports = baseGetTag; /***/ }), /***/ "3787": /***/ (function(module, exports, __webpack_require__) { 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 = 67); /******/ }) /************************************************************************/ /******/ ({ /***/ 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 (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"); /***/ }), /***/ 4: /***/ (function(module, exports) { module.exports = __webpack_require__("d010"); /***/ }), /***/ 48: /***/ (function(module, exports) { module.exports = __webpack_require__("a15e"); /***/ }), /***/ 67: /***/ (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/form/src/form-item.vue?vue&type=template&id=b6f3db6c& var render = function() { 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 staticRenderFns = [] 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__(48); var external_async_validator_default = /*#__PURE__*/__webpack_require__.n(external_async_validator_); // 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/merge" var merge_ = __webpack_require__(9); var merge_default = /*#__PURE__*/__webpack_require__.n(merge_); // 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/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_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); // CONCATENATED MODULE: ./packages/form/src/label-wrap.vue var label_wrap_render, label_wrap_staticRenderFns /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( src_label_wrapvue_type_script_lang_js_, label_wrap_render, label_wrap_staticRenderFns, false, null, null, null ) /* hot reload */ if (false) { var api; } component.options.__file = "packages/form/src/label-wrap.vue" /* harmony default export */ var 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 = Object(componentNormalizer["a" /* default */])( src_form_itemvue_type_script_lang_js_, render, 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 = __webpack_exports__["default"] = (form_item); /***/ }), /***/ 9: /***/ (function(module, exports) { module.exports = __webpack_require__("7f4d"); /***/ }) /******/ }); /***/ }), /***/ "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; }; /***/ }), /***/ "3818": /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__("7e64"), arrayEach = __webpack_require__("8057"), assignValue = __webpack_require__("32b3"), baseAssign = __webpack_require__("5b01"), baseAssignIn = __webpack_require__("0f0f"), cloneBuffer = __webpack_require__("e5383"), copyArray = __webpack_require__("4359"), copySymbols = __webpack_require__("54eb"), copySymbolsIn = __webpack_require__("1041"), getAllKeys = __webpack_require__("a994"), getAllKeysIn = __webpack_require__("1bac"), getTag = __webpack_require__("42a2"), initCloneArray = __webpack_require__("c87c"), initCloneByTag = __webpack_require__("c2b6"), initCloneObject = __webpack_require__("fa21"), isArray = __webpack_require__("6747"), isBuffer = __webpack_require__("0d24"), isMap = __webpack_require__("cc45"), isObject = __webpack_require__("1a8c"), isSet = __webpack_require__("d7ee"), keys = __webpack_require__("ec69"), keysIn = __webpack_require__("9934"); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** Used to identify `toStringTag` values supported by `_.clone`. */ var cloneableTags = {}; cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; /** * The base implementation of `_.clone` and `_.cloneDeep` which tracks * traversed objects. * * @private * @param {*} value The value to clone. * @param {boolean} bitmask The bitmask flags. * 1 - Deep clone * 2 - Flatten inherited properties * 4 - Clone symbols * @param {Function} [customizer] The function to customize cloning. * @param {string} [key] The key of `value`. * @param {Object} [object] The parent object of `value`. * @param {Object} [stack] Tracks traversed objects and their clone counterparts. * @returns {*} Returns the cloned value. */ function baseClone(value, bitmask, customizer, key, object, stack) { var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG; if (customizer) { result = object ? customizer(value, key, object, stack) : customizer(value); } if (result !== undefined) { return result; } if (!isObject(value)) { return value; } var isArr = isArray(value); if (isArr) { result = initCloneArray(value); if (!isDeep) { return copyArray(value, result); } } else { var tag = getTag(value), isFunc = tag == funcTag || tag == genTag; if (isBuffer(value)) { return cloneBuffer(value, isDeep); } if (tag == objectTag || tag == argsTag || (isFunc && !object)) { result = (isFlat || isFunc) ? {} : initCloneObject(value); if (!isDeep) { return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value)); } } else { if (!cloneableTags[tag]) { return object ? value : {}; } result = initCloneByTag(value, tag, isDeep); } } // Check for circular references and return its corresponding clone. stack || (stack = new Stack); var stacked = stack.get(value); if (stacked) { return stacked; } stack.set(value, result); if (isSet(value)) { value.forEach(function(subValue) { result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); }); } else if (isMap(value)) { value.forEach(function(subValue, key) { result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); } var keysFunc = isFull ? (isFlat ? getAllKeysIn : getAllKeys) : (isFlat ? keysIn : keys); var props = isArr ? undefined : keysFunc(value); arrayEach(props || value, function(subValue, key) { if (props) { key = subValue; subValue = value[key]; } // Recursively populate clone (susceptible to call stack limits). assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); return result; } module.exports = baseClone; /***/ }), /***/ "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; }; }; /***/ }), /***/ "39ff": /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__("0b07"), root = __webpack_require__("2b3e"); /* Built-in method references that are verified to be native. */ var WeakMap = getNative(root, 'WeakMap'); module.exports = WeakMap; /***/ }), /***/ "3b4a": /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__("0b07"); var defineProperty = (function() { try { var func = getNative(Object, 'defineProperty'); func({}, '', {}); return func; } catch (e) {} }()); module.exports = defineProperty; /***/ }), /***/ "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; /***/ }), /***/ "3c53": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _node_modules_vue_cli_service_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_index_vue_vue_type_style_index_0_id_13113f32_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b35b"); /* harmony import */ var _node_modules_vue_cli_service_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_index_vue_vue_type_style_index_0_id_13113f32_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_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_index_vue_vue_type_style_index_0_id_13113f32_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__); /* unused harmony reexport * */ /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_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_index_vue_vue_type_style_index_0_id_13113f32_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ "3f6b": /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__("b9c7"), __esModule: true }; /***/ }), /***/ "3f8c": /***/ (function(module, exports) { module.exports = {}; /***/ }), /***/ "4010": /***/ (function(module, exports, __webpack_require__) { "use strict"; 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(); } }; /***/ }), /***/ "4105": /***/ (function(module, exports, __webpack_require__) { 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 = 121); /******/ }) /************************************************************************/ /******/ ({ /***/ 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 (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 } } /***/ }), /***/ 121: /***/ (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/form/src/form.vue?vue&type=template&id=a1b5ff34& var render = function() { 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 staticRenderFns = [] render._withStripped = true // CONCATENATED MODULE: ./packages/form/src/form.vue?vue&type=template&id=a1b5ff34& // EXTERNAL MODULE: external "element-ui/lib/utils/merge" var merge_ = __webpack_require__(9); var merge_default = /*#__PURE__*/__webpack_require__.n(merge_); // 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_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); // CONCATENATED MODULE: ./packages/form/src/form.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( src_formvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null ) /* hot reload */ if (false) { var api; } component.options.__file = "packages/form/src/form.vue" /* harmony default export */ var src_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 = __webpack_exports__["default"] = (src_form); /***/ }), /***/ 9: /***/ (function(module, exports) { module.exports = __webpack_require__("7f4d"); /***/ }) /******/ }); /***/ }), /***/ "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"; 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 *
* ``` */ 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; }; /***/ }), /***/ "41c3": /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__("1a8c"), isPrototype = __webpack_require__("eac5"), nativeKeysIn = __webpack_require__("ec8c"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeysIn(object) { if (!isObject(object)) { return nativeKeysIn(object); } var isProto = isPrototype(object), result = []; for (var key in object) { if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { result.push(key); } } return result; } module.exports = baseKeysIn; /***/ }), /***/ "41f8": /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof 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'); }; /***/ }), /***/ "4245": /***/ (function(module, exports, __webpack_require__) { var isKeyable = __webpack_require__("1290"); /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } module.exports = getMapData; /***/ }), /***/ "428f": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); module.exports = global; /***/ }), /***/ "42a2": /***/ (function(module, exports, __webpack_require__) { var DataView = __webpack_require__("b5a7"), Map = __webpack_require__("79bc"), Promise = __webpack_require__("1cec"), Set = __webpack_require__("c869"), WeakMap = __webpack_require__("39ff"), baseGetTag = __webpack_require__("3729"), toSource = __webpack_require__("dc57"); /** `Object#toString` result references. */ var mapTag = '[object Map]', objectTag = '[object Object]', promiseTag = '[object Promise]', setTag = '[object Set]', weakMapTag = '[object WeakMap]'; var dataViewTag = '[object DataView]'; /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); /** * Gets the `toStringTag` of `value`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result; }; } module.exports = getTag; /***/ }), /***/ "4359": /***/ (function(module, exports) { /** * Copies the values of `source` to `array`. * * @private * @param {Array} source The array to copy values from. * @param {Array} [array=[]] The array to copy values to. * @returns {Array} Returns `array`. */ function copyArray(source, array) { var index = -1, length = source.length; array || (array = Array(length)); while (++index < length) { array[index] = source[index]; } return array; } module.exports = copyArray; /***/ }), /***/ "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); } }; /***/ }), /***/ "44fd": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "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; } ]; }); /***/ }), /***/ "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"; 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()); }); /***/ }), /***/ "49f4": /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__("6044"); /** * Removes all key-value entries from the hash. * * @private * @name clear * @memberOf Hash */ function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; } module.exports = hashClear; /***/ }), /***/ "4b26": /***/ (function(module, exports, __webpack_require__) { "use strict"; 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; } }; /***/ }), /***/ "4c78": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_5047f3cc_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("12ca"); /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_5047f3cc_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_5047f3cc_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__); /* unused harmony reexport * */ /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_5047f3cc_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ "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]); }; /***/ }), /***/ "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); } }); /***/ }), /***/ "4e4b": /***/ (function(module, exports, __webpack_require__) { 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 = 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 (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() { 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($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" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof 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() { 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($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($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($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($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($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($event) { return _vm.debouncedOnInputChange($event) }, mouseenter: function($event) { _vm.inputHovering = true }, mouseleave: function($event) { _vm.inputHovering = false } }, model: { value: _vm.selectedLabel, callback: function($$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() { 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'; }; /***/ }), /***/ "4f1d": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _node_modules_vue_cli_service_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_index_vue_vue_type_style_index_0_id_4a6bd5b4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("750d"); /* harmony import */ var _node_modules_vue_cli_service_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_index_vue_vue_type_style_index_0_id_4a6bd5b4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_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_index_vue_vue_type_style_index_0_id_4a6bd5b4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__); /* unused harmony reexport * */ /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_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_index_vue_vue_type_style_index_0_id_4a6bd5b4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ "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 }; /***/ }), /***/ "50d8": /***/ (function(module, exports) { /** * The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. * * @private * @param {number} n The number of times to invoke `iteratee`. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the array of results. */ function baseTimes(n, iteratee) { var index = -1, result = Array(n); while (++index < n) { result[index] = iteratee(index); } return result; } module.exports = baseTimes; /***/ }), /***/ "50f3": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "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"; 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); }; /***/ }), /***/ "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; }); } }); /***/ }), /***/ "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); } }; /***/ }), /***/ "54eb": /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__("8eeb"), getSymbols = __webpack_require__("32f4"); /** * Copies own symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbols(source, object) { return copyObject(source, getSymbols(source), object); } module.exports = copySymbols; /***/ }), /***/ "5524": /***/ (function(module, exports) { var core = module.exports = { version: '2.6.11' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef /***/ }), /***/ "55a3": /***/ (function(module, exports) { /** * Checks if a stack value for `key` exists. * * @private * @name has * @memberOf Stack * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { return this.__data__.has(key); } module.exports = stackHas; /***/ }), /***/ "564a": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "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)' }); /***/ }), /***/ "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; }; /***/ }), /***/ "57a5": /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__("91e9"); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = overArg(Object.keys, Object); module.exports = nativeKeys; /***/ }), /***/ "585a": /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; module.exports = freeGlobal; /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba"))) /***/ }), /***/ "5924": /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.isInContainer = exports.getScrollContainer = exports.isScroll = exports.getStyle = exports.once = exports.off = exports.on = undefined; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof 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; }; /***/ }), /***/ "5950": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "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; }; /***/ }), /***/ "5986": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "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)); }; /***/ }), /***/ "5b01": /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__("8eeb"), keys = __webpack_require__("ec69"); /** * The base implementation of `_.assign` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssign(object, source) { return object && copyObject(source, keys(source), object); } module.exports = baseAssign; /***/ }), /***/ "5c0b": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("049a"); /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__); /* unused harmony reexport * */ /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ "5c6c": /***/ (function(module, exports) { module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; /***/ }), /***/ "5d89": /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__("f8af"); /** * Creates a clone of `dataView`. * * @private * @param {Object} dataView The data view to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned data view. */ function cloneDataView(dataView, isDeep) { var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); } module.exports = cloneDataView; /***/ }), /***/ "5e2e": /***/ (function(module, exports, __webpack_require__) { var listCacheClear = __webpack_require__("28c9"), listCacheDelete = __webpack_require__("69d5"), listCacheGet = __webpack_require__("b4c0"), listCacheHas = __webpack_require__("fba5"), listCacheSet = __webpack_require__("67ca"); /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; module.exports = ListCache; /***/ }), /***/ "6044": /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__("0b07"); /* Built-in method references that are verified to be native. */ var nativeCreate = getNative(Object, 'create'); module.exports = nativeCreate; /***/ }), /***/ "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__; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof 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; }); /***/ }), /***/ "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; }; /***/ }), /***/ "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); }; /***/ }), /***/ "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); }; /***/ }), /***/ "6747": /***/ (function(module, exports) { /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; module.exports = isArray; /***/ }), /***/ "67ca": /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__("cb5a"); /** * Sets the list cache `key` to `value`. * * @private * @name set * @memberOf ListCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the list cache instance. */ function listCacheSet(key, value) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { ++this.size; data.push([key, value]); } else { data[index][1] = value; } return this; } module.exports = listCacheSet; /***/ }), /***/ "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); /***/ }), /***/ "69d5": /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__("cb5a"); /** Used for built-in method references. */ var arrayProto = Array.prototype; /** Built-in value references. */ var splice = arrayProto.splice; /** * Removes `key` and its value from the list cache. * * @private * @name delete * @memberOf ListCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function listCacheDelete(key) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { return false; } var lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); } else { splice.call(data, index, 1); } --this.size; return true; } module.exports = listCacheDelete; /***/ }), /***/ "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 }; /***/ }), /***/ "6ac5": /***/ (function(module, exports, __webpack_require__) { 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 = 79); /******/ }) /************************************************************************/ /******/ ({ /***/ 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 (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"); /***/ }), /***/ 79: /***/ (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-group.vue?vue&type=template&id=818a704c& var render = function() { 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 staticRenderFns = [] render._withStripped = true // CONCATENATED MODULE: ./packages/radio/src/radio-group.vue?vue&type=template&id=818a704c& // 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-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_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); // CONCATENATED MODULE: ./packages/radio/src/radio-group.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( src_radio_groupvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null ) /* hot reload */ if (false) { var api; } component.options.__file = "packages/radio/src/radio-group.vue" /* harmony default export */ var 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 = __webpack_exports__["default"] = (radio_group); /***/ }) /******/ }); /***/ }), /***/ "6ac9": /***/ (function(module, exports, __webpack_require__) { 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 (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() { 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); /***/ }) /******/ }); /***/ }), /***/ "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); } } }; /***/ }), /***/ "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)); }; /***/ }), /***/ "6db8": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "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} 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} */ 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 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 (). * * @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} */ this.activeObservations_ = []; /** * Registry of the ResizeObservation instances. * * @private {Map} */ 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"))) /***/ }), /***/ "6ed5": /***/ (function(module, exports, __webpack_require__) { 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 = 77); /******/ }) /************************************************************************/ /******/ ({ /***/ 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 (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"); /***/ }), /***/ 13: /***/ (function(module, exports) { module.exports = __webpack_require__("eedf"); /***/ }), /***/ 15: /***/ (function(module, exports) { module.exports = __webpack_require__("5128"); /***/ }), /***/ 19: /***/ (function(module, exports) { module.exports = __webpack_require__("4897"); /***/ }), /***/ 2: /***/ (function(module, exports) { module.exports = __webpack_require__("5924"); /***/ }), /***/ 23: /***/ (function(module, exports) { module.exports = __webpack_require__("41f8"); /***/ }), /***/ 47: /***/ (function(module, exports) { module.exports = __webpack_require__("722f"); /***/ }), /***/ 6: /***/ (function(module, exports) { module.exports = __webpack_require__("6b7c"); /***/ }), /***/ 7: /***/ (function(module, exports) { module.exports = __webpack_require__("8bbf"); /***/ }), /***/ 77: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // EXTERNAL MODULE: external "vue" var external_vue_ = __webpack_require__(7); var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_); // 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 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: "el-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: "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($event) { _vm.handleAction( _vm.distinguishCancelAndClose ? "close" : "cancel" ) }, keydown: function($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($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($$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($event) { if ( !("button" in $event) && _vm._k( $event.keyCode, "enter", 13, $event.key, "Enter" ) ) { return null } _vm.handleAction("cancel") } }, nativeOn: { click: function($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($event) { if ( !("button" in $event) && _vm._k( $event.keyCode, "enter", 13, $event.key, "Enter" ) ) { return null } _vm.handleAction("confirm") } }, nativeOn: { click: function($event) { _vm.handleAction("confirm") } } }, [ _vm._v( "\n " + _vm._s( _vm.confirmButtonText || _vm.t("el.messagebox.confirm") ) + "\n " ) ] ) ], 1 ) ] ) ] ) ]) } var staticRenderFns = [] render._withStripped = true // CONCATENATED MODULE: ./packages/message-box/src/main.vue?vue&type=template&id=6b29b012& // EXTERNAL MODULE: external "element-ui/lib/utils/popup" var popup_ = __webpack_require__(15); var popup_default = /*#__PURE__*/__webpack_require__.n(popup_); // 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_); // EXTERNAL MODULE: external "element-ui/lib/button" var button_ = __webpack_require__(13); var button_default = /*#__PURE__*/__webpack_require__.n(button_); // EXTERNAL MODULE: external "element-ui/lib/utils/dom" var dom_ = __webpack_require__(2); // EXTERNAL MODULE: external "element-ui/lib/locale" var lib_locale_ = __webpack_require__(19); // EXTERNAL MODULE: external "element-ui/lib/utils/aria-dialog" var aria_dialog_ = __webpack_require__(47); 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 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 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/message-box/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/message-box/src/main.vue" /* harmony default export */ var main = (component.exports); // 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/vdom" var vdom_ = __webpack_require__(23); // CONCATENATED MODULE: ./packages/message-box/src/main.js var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 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 }; var MessageBoxConstructor = external_vue_default.a.extend(main); var currentMsg = void 0, instance = void 0; var msgQueue = []; var defaultCallback = function defaultCallback(action) { if (currentMsg) { var callback = currentMsg.callback; if (typeof callback === 'function') { if (instance.showInput) { callback(instance.inputValue, action); } else { callback(action); } } if (currentMsg.resolve) { if (action === 'confirm') { if (instance.showInput) { currentMsg.resolve({ value: instance.inputValue, action: action }); } else { currentMsg.resolve(action); } } else if (currentMsg.reject && (action === 'cancel' || action === 'close')) { currentMsg.reject(action); } } } }; var initInstance = function initInstance() { instance = new MessageBoxConstructor({ el: document.createElement('div') }); instance.callback = defaultCallback; }; var main_showNextMsg = function showNextMsg() { if (!instance) { initInstance(); } instance.action = ''; if (!instance.visible || instance.closeTimer) { if (msgQueue.length > 0) { currentMsg = msgQueue.shift(); var options = currentMsg.options; for (var prop in options) { if (options.hasOwnProperty(prop)) { instance[prop] = options[prop]; } } if (options.callback === undefined) { instance.callback = defaultCallback; } var oldCb = instance.callback; instance.callback = function (action, instance) { oldCb(action, instance); showNextMsg(); }; if (Object(vdom_["isVNode"])(instance.message)) { instance.$slots.default = [instance.message]; instance.message = null; } else { delete instance.$slots.default; } ['modal', 'showClose', 'closeOnClickModal', 'closeOnPressEscape', 'closeOnHashChange'].forEach(function (prop) { if (instance[prop] === undefined) { instance[prop] = true; } }); document.body.appendChild(instance.$el); external_vue_default.a.nextTick(function () { 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()({}, defaults, MessageBox.defaults, options), callback: callback, resolve: resolve, reject: reject }); main_showNextMsg(); }); } else { msgQueue.push({ options: merge_default()({}, 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' : _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' : _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' : _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 () { instance.doClose(); 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 message_box = __webpack_exports__["default"] = (src_main); /***/ }), /***/ 9: /***/ (function(module, exports) { module.exports = __webpack_require__("7f4d"); /***/ }) /******/ }); /***/ }), /***/ "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); }; /***/ }), /***/ "6f6c": /***/ (function(module, exports) { /** Used to match `RegExp` flags from their coerced string values. */ var reFlags = /\w*$/; /** * Creates a clone of `regexp`. * * @private * @param {Object} regexp The regexp to clone. * @returns {Object} Returns the cloned regexp. */ function cloneRegExp(regexp) { var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); result.lastIndex = regexp.lastIndex; return result; } module.exports = cloneRegExp; /***/ }), /***/ "6fcd": /***/ (function(module, exports, __webpack_require__) { var baseTimes = __webpack_require__("50d8"), isArguments = __webpack_require__("d370"), isArray = __webpack_require__("6747"), isBuffer = __webpack_require__("0d24"), isIndex = __webpack_require__("c098"), isTypedArray = __webpack_require__("73ac"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Creates an array of the enumerable property names of the array-like `value`. * * @private * @param {*} value The value to query. * @param {boolean} inherited Specify returning inherited property names. * @returns {Array} Returns the array of property names. */ function arrayLikeKeys(value, inherited) { var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. (isBuff && (key == 'offset' || key == 'parent')) || // PhantomJS 2 has enumerable non-index properties on typed arrays. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || // Skip index properties. isIndex(key, length) ))) { result.push(key); } } return result; } module.exports = arrayLikeKeys; /***/ }), /***/ "71bc": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "722f": /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof 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; /***/ }), /***/ "73ac": /***/ (function(module, exports, __webpack_require__) { var baseIsTypedArray = __webpack_require__("743f"), baseUnary = __webpack_require__("b047"), nodeUtil = __webpack_require__("99d3"); /* Node.js helper references. */ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * Checks if `value` is classified as a typed array. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); * // => true * * _.isTypedArray([]); * // => false */ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; module.exports = isTypedArray; /***/ }), /***/ "7418": /***/ (function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }), /***/ "743f": /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__("3729"), isLength = __webpack_require__("b218"), isObjectLike = __webpack_require__("1310"); /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** Used to identify `toStringTag` values of typed arrays. */ var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** * The base implementation of `_.isTypedArray` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } module.exports = baseIsTypedArray; /***/ }), /***/ "7464": /***/ (function(module, exports, __webpack_require__) { 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 = 54); /******/ }) /************************************************************************/ /******/ ({ /***/ 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 (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"); /***/ }), /***/ 12: /***/ (function(module, exports) { module.exports = __webpack_require__("417f"); /***/ }), /***/ 13: /***/ (function(module, exports) { module.exports = __webpack_require__("eedf"); /***/ }), /***/ 4: /***/ (function(module, exports) { module.exports = __webpack_require__("d010"); /***/ }), /***/ 5: /***/ (function(module, exports) { module.exports = __webpack_require__("e974"); /***/ }), /***/ 54: /***/ (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/color-picker/src/main.vue?vue&type=template&id=55c8ade7& var render = function() { 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($$v) { _vm.showPicker = $$v }, expression: "showPicker" } }) ], 1 ) } var staticRenderFns = [] 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 _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; function _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 // 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) { _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' : _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() { 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($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($$v) { _vm.customInput = $$v }, expression: "customInput" } }) ], 1 ), _c( "el-button", { staticClass: "el-color-dropdown__link-btn", attrs: { size: "mini", type: "text" }, on: { click: function($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() { 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& // EXTERNAL MODULE: external "vue" var external_vue_ = __webpack_require__(7); var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_); // CONCATENATED MODULE: ./packages/color-picker/src/draggable.js var isDragging = false; /* harmony default export */ var draggable = (function (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_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); // CONCATENATED MODULE: ./packages/color-picker/src/components/sv-panel.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( 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 api; } component.options.__file = "packages/color-picker/src/components/sv-panel.vue" /* harmony default export */ var 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() { 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 = Object(componentNormalizer["a" /* default */])( 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() { 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 = Object(componentNormalizer["a" /* default */])( 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() { 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($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 = Object(componentNormalizer["a" /* default */])( 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); // 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/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_); // EXTERNAL MODULE: external "element-ui/lib/button" var button_ = __webpack_require__(13); var button_default = /*#__PURE__*/__webpack_require__.n(button_); // 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 = Object(componentNormalizer["a" /* default */])( 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); // 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/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/color-picker/src/main.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var 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 src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_); // CONCATENATED MODULE: ./packages/color-picker/src/main.vue /* normalize component */ var main_component = Object(componentNormalizer["a" /* default */])( src_mainvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null ) /* hot reload */ if (false) { var main_api; } main_component.options.__file = "packages/color-picker/src/main.vue" /* harmony default export */ var main = (main_component.exports); // CONCATENATED MODULE: ./packages/color-picker/index.js /* istanbul ignore next */ main.install = function (Vue) { Vue.component(main.name, main); }; /* harmony default export */ var color_picker = __webpack_exports__["default"] = (main); /***/ }), /***/ 6: /***/ (function(module, exports) { module.exports = __webpack_require__("6b7c"); /***/ }), /***/ 7: /***/ (function(module, exports) { module.exports = __webpack_require__("8bbf"); /***/ }) /******/ }); /***/ }), /***/ "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) }); }; /***/ }), /***/ "750d": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "7530": /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__("1a8c"); /** Built-in value references. */ var objectCreate = Object.create; /** * The base implementation of `_.create` without support for assigning * properties to the created object. * * @private * @param {Object} proto The object to inherit from. * @returns {Object} Returns the new object. */ var baseCreate = (function() { function object() {} return function(proto) { if (!isObject(proto)) { return {}; } if (objectCreate) { return objectCreate(proto); } object.prototype = proto; var result = new object; object.prototype = undefined; return result; }; }()); module.exports = baseCreate; /***/ }), /***/ "760d": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_style_vue_vue_type_style_index_0_id_2b1dd4fb_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f00f"); /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_style_vue_vue_type_style_index_0_id_2b1dd4fb_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_style_vue_vue_type_style_index_0_id_2b1dd4fb_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__); /* unused harmony reexport * */ /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_style_vue_vue_type_style_index_0_id_2b1dd4fb_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ "77a5": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "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' ]; /***/ }), /***/ "79bc": /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__("0b07"), root = __webpack_require__("2b3e"); /* Built-in method references that are verified to be native. */ var Map = getNative(root, 'Map'); module.exports = Map; /***/ }), /***/ "7a41": /***/ (function(module, exports) { module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }), /***/ "7a48": /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__("6044"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Checks if a hash value for `key` exists. * * @private * @name has * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function hashHas(key) { var data = this.__data__; return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); } module.exports = hashHas; /***/ }), /***/ "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)); }; /***/ }), /***/ "7b54": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMcAAAA5CAIAAAAN/6j4AAABzklEQVR4Ae3SQWrEMBQD0Kb0/ofLhdKA4cu4XQ1avq40HltTHrqe5/nyR6Aq8PO2Xde1d66dzeExuznfn7x5vzZ35nBO1qs5fz8eX03tfme/dpyv+1Oyvp2P69sPnsy/sTcctXNn+o8L//4zf1+9J/Nwqta1OZ9XKxzNx8f9zvHwKDx+bl0+7kzD8Svz9rj/nn/PG4FAS8CqWpJ6ImBVsZBaAlbVktQTAauKhdQSsKqWpJ4IWFUspJaAVbUk9UTAqmIhtQSsqiWpJwJWFQupJWBVLUk9EbCqWEgtAatqSeqJgFXFQmoJWFVLUk8ErCoWUkvAqlqSeiJgVbGQWgJW1ZLUEwGrioXUErCqlqSeCFhVLKSWgFW1JPVEwKpiIbUErKolqScCVhULqSVgVS1JPRGwqlhILQGraknqiYBVxUJqCVhVS1JPBKwqFlJLwKpaknoiYFWxkFoCVtWS1BMBq4qF1BKwqpaknghYVSykloBVtST1RMCqYiG1BKyqJaknAlYVC6klYFUtST0RsKpYSC0Bq2pJ6omAVcVCaglYVUtSTwSsKhZSS8CqWpJ6ImBVsZBaAlbVktQTAauKhdQSsKqWpJ4IXPd955NEoCHwC4UgR+Z0RU3nAAAAAElFTkSuQmCC" /***/ }), /***/ "7b83": /***/ (function(module, exports, __webpack_require__) { var mapCacheClear = __webpack_require__("7c64"), mapCacheDelete = __webpack_require__("93ed"), mapCacheGet = __webpack_require__("2478"), mapCacheHas = __webpack_require__("a524"), mapCacheSet = __webpack_require__("1fc8"); /** * Creates a map cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function MapCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `MapCache`. MapCache.prototype.clear = mapCacheClear; MapCache.prototype['delete'] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; module.exports = MapCache; /***/ }), /***/ "7c64": /***/ (function(module, exports, __webpack_require__) { var Hash = __webpack_require__("e24b"), ListCache = __webpack_require__("5e2e"), Map = __webpack_require__("79bc"); /** * Removes all key-value entries from the map. * * @private * @name clear * @memberOf MapCache */ function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new Hash, 'map': new (Map || ListCache), 'string': new Hash }; } module.exports = mapCacheClear; /***/ }), /***/ "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); }; /***/ }), /***/ "7d1f": /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__("087d"), isArray = __webpack_require__("6747"); /** * The base implementation of `getAllKeys` and `getAllKeysIn` which uses * `keysFunc` and `symbolsFunc` to get the enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @param {Function} keysFunc The function to get the keys of `object`. * @param {Function} symbolsFunc The function to get the symbols of `object`. * @returns {Array} Returns the array of property names and symbols. */ function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } module.exports = baseGetAllKeys; /***/ }), /***/ "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); /***/ }), /***/ "7e64": /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__("5e2e"), stackClear = __webpack_require__("efb6"), stackDelete = __webpack_require__("2fcc"), stackGet = __webpack_require__("802a"), stackHas = __webpack_require__("55a3"), stackSet = __webpack_require__("d02c"); /** * Creates a stack cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } // Add methods to `Stack`. Stack.prototype.clear = stackClear; Stack.prototype['delete'] = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; module.exports = Stack; /***/ }), /***/ "7e95": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_layers_vue_vue_type_style_index_0_id_a1ea05ca_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fc83"); /* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_layers_vue_vue_type_style_index_0_id_a1ea05ca_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_layers_vue_vue_type_style_index_0_id_a1ea05ca_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__); /* unused harmony reexport * */ /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_layers_vue_vue_type_style_index_0_id_a1ea05ca_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), /***/ "7f11": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "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__) { 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 (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() { 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); /***/ }) /******/ }); /***/ }), /***/ "802a": /***/ (function(module, exports) { /** * Gets the stack value for `key`. * * @private * @name get * @memberOf Stack * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function stackGet(key) { return this.__data__.get(key); } module.exports = stackGet; /***/ }), /***/ "8057": /***/ (function(module, exports) { /** * A specialized version of `_.forEach` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEach(array, iteratee) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (iteratee(array[index], index, array) === false) { break; } } return array; } module.exports = arrayEach; /***/ }), /***/ "8119": /***/ (function(module, exports, __webpack_require__) { __webpack_require__("693d"); __webpack_require__("dfe5"); __webpack_require__("301c"); __webpack_require__("4e71"); module.exports = __webpack_require__("5524").Symbol; /***/ }), /***/ "8122": /***/ (function(module, exports, __webpack_require__) { "use strict"; 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" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof 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]; } /***/ }), /***/ "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; }; /***/ }), /***/ "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; }); /***/ }), /***/ "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; }; /***/ }), /***/ "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'; }; /***/ }), /***/ "872a": /***/ (function(module, exports, __webpack_require__) { var defineProperty = __webpack_require__("3b4a"); /** * The base implementation of `assignValue` and `assignMergeValue` without * value checks. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function baseAssignValue(object, key, value) { if (key == '__proto__' && defineProperty) { defineProperty(object, key, { 'configurable': true, 'enumerable': true, 'value': value, 'writable': true }); } else { object[key] = value; } } module.exports = baseAssignValue; /***/ }), /***/ "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 () { var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript') // for chrome if (!descriptor && 'currentScript' in document && document.currentScript) { return document.currentScript } // for other browsers with native support for currentScript if (descriptor && descriptor.get !== getCurrentScript && 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) + '}[^<]*