}\r\n */\r\n this.observations_ = new MapShim();\r\n if (typeof callback !== 'function') {\r\n throw new TypeError('The callback provided as parameter 1 is not a function.');\r\n }\r\n this.callback_ = callback;\r\n this.controller_ = controller;\r\n this.callbackCtx_ = callbackCtx;\r\n }\r\n /**\r\n * Starts observing provided element.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.observe = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is already being observed.\r\n if (observations.has(target)) {\r\n return;\r\n }\r\n observations.set(target, new ResizeObservation(target));\r\n this.controller_.addObserver(this);\r\n // Force the update of observations.\r\n this.controller_.refresh();\r\n };\r\n /**\r\n * Stops observing provided element.\r\n *\r\n * @param {Element} target - Element to stop observing.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.unobserve = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is not being observed.\r\n if (!observations.has(target)) {\r\n return;\r\n }\r\n observations.delete(target);\r\n if (!observations.size) {\r\n this.controller_.removeObserver(this);\r\n }\r\n };\r\n /**\r\n * Stops observing all elements.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.disconnect = function () {\r\n this.clearActive();\r\n this.observations_.clear();\r\n this.controller_.removeObserver(this);\r\n };\r\n /**\r\n * Collects observation instances the associated element of which has changed\r\n * it's content rectangle.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.gatherActive = function () {\r\n var _this = this;\r\n this.clearActive();\r\n this.observations_.forEach(function (observation) {\r\n if (observation.isActive()) {\r\n _this.activeObservations_.push(observation);\r\n }\r\n });\r\n };\r\n /**\r\n * Invokes initial callback function with a list of ResizeObserverEntry\r\n * instances collected from active resize observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.broadcastActive = function () {\r\n // Do nothing if observer doesn't have active observations.\r\n if (!this.hasActive()) {\r\n return;\r\n }\r\n var ctx = this.callbackCtx_;\r\n // Create ResizeObserverEntry instance for every active observation.\r\n var entries = this.activeObservations_.map(function (observation) {\r\n return new ResizeObserverEntry(observation.target, observation.broadcastRect());\r\n });\r\n this.callback_.call(ctx, entries, ctx);\r\n this.clearActive();\r\n };\r\n /**\r\n * Clears the collection of active observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.clearActive = function () {\r\n this.activeObservations_.splice(0);\r\n };\r\n /**\r\n * Tells whether observer has active observations.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObserverSPI.prototype.hasActive = function () {\r\n return this.activeObservations_.length > 0;\r\n };\r\n return ResizeObserverSPI;\r\n}());\n\n// Registry of internal observers. If WeakMap is not available use current shim\r\n// for the Map collection as it has all required methods and because WeakMap\r\n// can't be fully polyfilled anyway.\r\nvar observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();\r\n/**\r\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\r\n * exposing only those methods and properties that are defined in the spec.\r\n */\r\nvar ResizeObserver = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback that is invoked when\r\n * dimensions of the observed elements change.\r\n */\r\n function ResizeObserver(callback) {\r\n if (!(this instanceof ResizeObserver)) {\r\n throw new TypeError('Cannot call a class as a function.');\r\n }\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n var controller = ResizeObserverController.getInstance();\r\n var observer = new ResizeObserverSPI(callback, controller, this);\r\n observers.set(this, observer);\r\n }\r\n return ResizeObserver;\r\n}());\r\n// Expose public methods of ResizeObserver.\r\n[\r\n 'observe',\r\n 'unobserve',\r\n 'disconnect'\r\n].forEach(function (method) {\r\n ResizeObserver.prototype[method] = function () {\r\n var _a;\r\n return (_a = observers.get(this))[method].apply(_a, arguments);\r\n };\r\n});\n\nvar index = (function () {\r\n // Export existing implementation if available.\r\n if (typeof global$1.ResizeObserver !== 'undefined') {\r\n return global$1.ResizeObserver;\r\n }\r\n return ResizeObserver;\r\n})();\n\nexport default index;\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n var state;\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) {\n createNonEnumerableProperty(value, 'name', key);\n }\n state = enforceInternalState(value);\n if (!state.source) {\n state.source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || inspectSource(this);\n});\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","var isObject = require('../internals/is-object');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\n// makes subclassing work correct for wrapped built-ins\nmodule.exports = function ($this, dummy, Wrapper) {\n var NewTarget, NewTargetPrototype;\n if (\n // it can work only with native `setPrototypeOf`\n setPrototypeOf &&\n // we haven't completely correct pre-ES6 way for getting `new.target`, so use this\n typeof (NewTarget = dummy.constructor) == 'function' &&\n NewTarget !== Wrapper &&\n isObject(NewTargetPrototype = NewTarget.prototype) &&\n NewTargetPrototype !== Wrapper.prototype\n ) setPrototypeOf($this, NewTargetPrototype);\n return $this;\n};\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","'use strict';\nvar exportTypedArrayMethod = require('../internals/array-buffer-view-core').exportTypedArrayMethod;\nvar fails = require('../internals/fails');\nvar global = require('../internals/global');\n\nvar Uint8Array = global.Uint8Array;\nvar Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};\nvar arrayToString = [].toString;\nvar arrayJoin = [].join;\n\nif (fails(function () { arrayToString.call({}); })) {\n arrayToString = function toString() {\n return arrayJoin.call(this);\n };\n}\n\nvar IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;\n\n// `%TypedArray%.prototype.toString` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring\nexportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $fill = require('../internals/array-fill');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.fill` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill\n// eslint-disable-next-line no-unused-vars -- required for `.length`\nexportTypedArrayMethod('fill', function fill(value /* , start, end */) {\n return $fill.apply(aTypedArray(this), arguments);\n});\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-array-constructors-require-wrappers');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar ArrayBufferModule = require('../internals/array-buffer');\nvar anInstance = require('../internals/an-instance');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar toLength = require('../internals/to-length');\nvar toIndex = require('../internals/to-index');\nvar toOffset = require('../internals/to-offset');\nvar toPrimitive = require('../internals/to-primitive');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof');\nvar isObject = require('../internals/is-object');\nvar create = require('../internals/object-create');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar typedArrayFrom = require('../internals/typed-array-from');\nvar forEach = require('../internals/array-iteration').forEach;\nvar setSpecies = require('../internals/set-species');\nvar definePropertyModule = require('../internals/object-define-property');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar InternalStateModule = require('../internals/internal-state');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar round = Math.round;\nvar RangeError = global.RangeError;\nvar ArrayBuffer = ArrayBufferModule.ArrayBuffer;\nvar DataView = ArrayBufferModule.DataView;\nvar NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;\nvar TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;\nvar TypedArray = ArrayBufferViewCore.TypedArray;\nvar TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar isTypedArray = ArrayBufferViewCore.isTypedArray;\nvar BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';\nvar WRONG_LENGTH = 'Wrong length';\n\nvar fromList = function (C, list) {\n var index = 0;\n var length = list.length;\n var result = new (aTypedArrayConstructor(C))(length);\n while (length > index) result[index] = list[index++];\n return result;\n};\n\nvar addGetter = function (it, key) {\n nativeDefineProperty(it, key, { get: function () {\n return getInternalState(this)[key];\n } });\n};\n\nvar isArrayBuffer = function (it) {\n var klass;\n return it instanceof ArrayBuffer || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';\n};\n\nvar isTypedArrayIndex = function (target, key) {\n return isTypedArray(target)\n && typeof key != 'symbol'\n && key in target\n && String(+key) == String(key);\n};\n\nvar wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {\n return isTypedArrayIndex(target, key = toPrimitive(key, true))\n ? createPropertyDescriptor(2, target[key])\n : nativeGetOwnPropertyDescriptor(target, key);\n};\n\nvar wrappedDefineProperty = function defineProperty(target, key, descriptor) {\n if (isTypedArrayIndex(target, key = toPrimitive(key, true))\n && isObject(descriptor)\n && has(descriptor, 'value')\n && !has(descriptor, 'get')\n && !has(descriptor, 'set')\n // TODO: add validation descriptor w/o calling accessors\n && !descriptor.configurable\n && (!has(descriptor, 'writable') || descriptor.writable)\n && (!has(descriptor, 'enumerable') || descriptor.enumerable)\n ) {\n target[key] = descriptor.value;\n return target;\n } return nativeDefineProperty(target, key, descriptor);\n};\n\nif (DESCRIPTORS) {\n if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor;\n definePropertyModule.f = wrappedDefineProperty;\n addGetter(TypedArrayPrototype, 'buffer');\n addGetter(TypedArrayPrototype, 'byteOffset');\n addGetter(TypedArrayPrototype, 'byteLength');\n addGetter(TypedArrayPrototype, 'length');\n }\n\n $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {\n getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,\n defineProperty: wrappedDefineProperty\n });\n\n module.exports = function (TYPE, wrapper, CLAMPED) {\n var BYTES = TYPE.match(/\\d+$/)[0] / 8;\n var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';\n var GETTER = 'get' + TYPE;\n var SETTER = 'set' + TYPE;\n var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME];\n var TypedArrayConstructor = NativeTypedArrayConstructor;\n var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;\n var exported = {};\n\n var getter = function (that, index) {\n var data = getInternalState(that);\n return data.view[GETTER](index * BYTES + data.byteOffset, true);\n };\n\n var setter = function (that, index, value) {\n var data = getInternalState(that);\n if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;\n data.view[SETTER](index * BYTES + data.byteOffset, value, true);\n };\n\n var addElement = function (that, index) {\n nativeDefineProperty(that, index, {\n get: function () {\n return getter(this, index);\n },\n set: function (value) {\n return setter(this, index, value);\n },\n enumerable: true\n });\n };\n\n if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n TypedArrayConstructor = wrapper(function (that, data, offset, $length) {\n anInstance(that, TypedArrayConstructor, CONSTRUCTOR_NAME);\n var index = 0;\n var byteOffset = 0;\n var buffer, byteLength, length;\n if (!isObject(data)) {\n length = toIndex(data);\n byteLength = length * BYTES;\n buffer = new ArrayBuffer(byteLength);\n } else if (isArrayBuffer(data)) {\n buffer = data;\n byteOffset = toOffset(offset, BYTES);\n var $len = data.byteLength;\n if ($length === undefined) {\n if ($len % BYTES) throw RangeError(WRONG_LENGTH);\n byteLength = $len - byteOffset;\n if (byteLength < 0) throw RangeError(WRONG_LENGTH);\n } else {\n byteLength = toLength($length) * BYTES;\n if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH);\n }\n length = byteLength / BYTES;\n } else if (isTypedArray(data)) {\n return fromList(TypedArrayConstructor, data);\n } else {\n return typedArrayFrom.call(TypedArrayConstructor, data);\n }\n setInternalState(that, {\n buffer: buffer,\n byteOffset: byteOffset,\n byteLength: byteLength,\n length: length,\n view: new DataView(buffer)\n });\n while (index < length) addElement(that, index++);\n });\n\n if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype);\n } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) {\n TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {\n anInstance(dummy, TypedArrayConstructor, CONSTRUCTOR_NAME);\n return inheritIfRequired(function () {\n if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data));\n if (isArrayBuffer(data)) return $length !== undefined\n ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length)\n : typedArrayOffset !== undefined\n ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))\n : new NativeTypedArrayConstructor(data);\n if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);\n return typedArrayFrom.call(TypedArrayConstructor, data);\n }(), dummy, TypedArrayConstructor);\n });\n\n if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) {\n if (!(key in TypedArrayConstructor)) {\n createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);\n }\n });\n TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;\n }\n\n if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);\n }\n\n if (TYPED_ARRAY_TAG) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);\n }\n\n exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;\n\n $({\n global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS\n }, exported);\n\n if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {\n createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);\n }\n\n if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);\n }\n\n setSpecies(CONSTRUCTOR_NAME);\n };\n} else module.exports = function () { /* empty */ };\n","var Set = require('./_Set'),\n noop = require('./noop'),\n setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","// IEEE754 conversions based on https://github.com/feross/ieee754\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar floor = Math.floor;\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nvar pack = function (number, mantissaLength, bytes) {\n var buffer = new Array(bytes);\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;\n var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;\n var index = 0;\n var exponent, mantissa, c;\n number = abs(number);\n // eslint-disable-next-line no-self-compare -- NaN check\n if (number != number || number === Infinity) {\n // eslint-disable-next-line no-self-compare -- NaN check\n mantissa = number != number ? 1 : 0;\n exponent = eMax;\n } else {\n exponent = floor(log(number) / LN2);\n if (number * (c = pow(2, -exponent)) < 1) {\n exponent--;\n c *= 2;\n }\n if (exponent + eBias >= 1) {\n number += rt / c;\n } else {\n number += rt * pow(2, 1 - eBias);\n }\n if (number * c >= 2) {\n exponent++;\n c /= 2;\n }\n if (exponent + eBias >= eMax) {\n mantissa = 0;\n exponent = eMax;\n } else if (exponent + eBias >= 1) {\n mantissa = (number * c - 1) * pow(2, mantissaLength);\n exponent = exponent + eBias;\n } else {\n mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);\n exponent = 0;\n }\n }\n for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8);\n exponent = exponent << mantissaLength | mantissa;\n exponentLength += mantissaLength;\n for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8);\n buffer[--index] |= sign * 128;\n return buffer;\n};\n\nvar unpack = function (buffer, mantissaLength) {\n var bytes = buffer.length;\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var nBits = exponentLength - 7;\n var index = bytes - 1;\n var sign = buffer[index--];\n var exponent = sign & 127;\n var mantissa;\n sign >>= 7;\n for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8);\n mantissa = exponent & (1 << -nBits) - 1;\n exponent >>= -nBits;\n nBits += mantissaLength;\n for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8);\n if (exponent === 0) {\n exponent = 1 - eBias;\n } else if (exponent === eMax) {\n return mantissa ? NaN : sign ? -Infinity : Infinity;\n } else {\n mantissa = mantissa + pow(2, mantissaLength);\n exponent = exponent - eBias;\n } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);\n};\n\nmodule.exports = {\n pack: pack,\n unpack: unpack\n};\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","var en = {\r\n name: 'en',\r\n el: {\r\n colorpicker: {\r\n confirm: 'OK',\r\n clear: 'Clear',\r\n },\r\n datepicker: {\r\n now: 'Now',\r\n today: 'Today',\r\n cancel: 'Cancel',\r\n clear: 'Clear',\r\n confirm: 'OK',\r\n selectDate: 'Select date',\r\n selectTime: 'Select time',\r\n startDate: 'Start Date',\r\n startTime: 'Start Time',\r\n endDate: 'End Date',\r\n endTime: 'End Time',\r\n prevYear: 'Previous Year',\r\n nextYear: 'Next Year',\r\n prevMonth: 'Previous Month',\r\n nextMonth: 'Next Month',\r\n year: '',\r\n month1: 'January',\r\n month2: 'February',\r\n month3: 'March',\r\n month4: 'April',\r\n month5: 'May',\r\n month6: 'June',\r\n month7: 'July',\r\n month8: 'August',\r\n month9: 'September',\r\n month10: 'October',\r\n month11: 'November',\r\n month12: 'December',\r\n week: 'week',\r\n weeks: {\r\n sun: 'Sun',\r\n mon: 'Mon',\r\n tue: 'Tue',\r\n wed: 'Wed',\r\n thu: 'Thu',\r\n fri: 'Fri',\r\n sat: 'Sat',\r\n },\r\n months: {\r\n jan: 'Jan',\r\n feb: 'Feb',\r\n mar: 'Mar',\r\n apr: 'Apr',\r\n may: 'May',\r\n jun: 'Jun',\r\n jul: 'Jul',\r\n aug: 'Aug',\r\n sep: 'Sep',\r\n oct: 'Oct',\r\n nov: 'Nov',\r\n dec: 'Dec',\r\n },\r\n },\r\n select: {\r\n loading: 'Loading',\r\n noMatch: 'No matching data',\r\n noData: 'No data',\r\n placeholder: 'Select',\r\n },\r\n cascader: {\r\n noMatch: 'No matching data',\r\n loading: 'Loading',\r\n placeholder: 'Select',\r\n noData: 'No data',\r\n },\r\n pagination: {\r\n goto: 'Go to',\r\n pagesize: '/page',\r\n total: 'Total {total}',\r\n pageClassifier: '',\r\n deprecationWarning: 'Deprecated usages detected, please refer to the el-pagination documentation for more details',\r\n },\r\n messagebox: {\r\n title: 'Message',\r\n confirm: 'OK',\r\n cancel: 'Cancel',\r\n error: 'Illegal input',\r\n },\r\n upload: {\r\n deleteTip: 'press delete to remove',\r\n delete: 'Delete',\r\n preview: 'Preview',\r\n continue: 'Continue',\r\n },\r\n table: {\r\n emptyText: 'No Data',\r\n confirmFilter: 'Confirm',\r\n resetFilter: 'Reset',\r\n clearFilter: 'All',\r\n sumText: 'Sum',\r\n },\r\n tree: {\r\n emptyText: 'No Data',\r\n },\r\n transfer: {\r\n noMatch: 'No matching data',\r\n noData: 'No data',\r\n titles: ['List 1', 'List 2'],\r\n filterPlaceholder: 'Enter keyword',\r\n noCheckedFormat: '{total} items',\r\n hasCheckedFormat: '{checked}/{total} checked',\r\n },\r\n image: {\r\n error: 'FAILED',\r\n },\r\n pageHeader: {\r\n title: 'Back',\r\n },\r\n popconfirm: {\r\n confirmButtonText: 'Yes',\r\n cancelButtonText: 'No',\r\n },\r\n },\r\n};\n\nexport default en;\n","import dayjs from 'dayjs';\nimport defaultLang from './lang/en';\n\nlet lang = defaultLang;\r\nlet i18nHandler = null;\r\nconst i18n = (fn) => {\r\n i18nHandler = fn;\r\n};\r\nconst restoreHandler = () => i18nHandler = defaultTranslator;\r\nfunction template(str, option) {\r\n if (!str || !option)\r\n return str;\r\n return str.replace(/\\{(\\w+)\\}/g, (_, key) => {\r\n return option[key];\r\n });\r\n}\r\nconst defaultTranslator = (...args) => {\r\n const [path, option] = args;\r\n let value;\r\n const array = path.split('.');\r\n let current = lang;\r\n for (let i = 0, j = array.length; i < j; i++) {\r\n const property = array[i];\r\n value = current[property];\r\n if (i === j - 1)\r\n return template(value, option);\r\n if (!value)\r\n return '';\r\n current = value;\r\n }\r\n};\r\nconst t = (...args) => {\r\n if (i18nHandler) {\r\n const translation = i18nHandler(...args);\r\n return translation || defaultTranslator(...args);\r\n }\r\n return defaultTranslator(...args);\r\n};\r\nconst use = (l) => {\r\n if (process.env.NODE_ENV !== 'production') {\r\n console.warn(`[deprecation]:\n The previous i18n usage is deprecated please update to\n the new one to get reactive i18n translations, refer to:\n https://element-plus.org/#/en-US/i18n\n `);\r\n }\r\n lang = l || lang;\r\n if (lang.name) {\r\n dayjs.locale(lang.name);\r\n }\r\n};\r\nconst setLocale = use;\n\nexport { i18n, restoreHandler, setLocale, t, use };\n","let $ELEMENT = {};\r\nconst setConfig = (option) => {\r\n $ELEMENT = option;\r\n};\r\nconst getConfig = (key) => {\r\n return $ELEMENT[key];\r\n};\n\nexport { getConfig, setConfig };\n","var isServer = typeof window === 'undefined';\n\nexport default isServer;\n","class ElementPlusError extends Error {\r\n constructor(m) {\r\n super(m);\r\n this.name = 'ElementPlusError';\r\n }\r\n}\r\nvar error = (scope, m) => {\r\n throw new ElementPlusError(`[${scope}] ${m}`);\r\n};\r\nfunction warn(scope, m) {\r\n console.warn(new ElementPlusError(`[${scope}] ${m}`));\r\n}\n\nexport default error;\nexport { warn };\n","import { getCurrentInstance } from 'vue';\nexport { isVNode } from 'vue';\nimport { extend, hyphenate, toRawType, isArray, isObject, isString, isFunction } from '@vue/shared';\nexport { camelize, capitalize, extend, hasOwn, isArray, isObject, isString, looseEqual } from '@vue/shared';\nimport isEqualWith from 'lodash/isEqualWith';\nimport isServer from './isServer';\nimport { warn } from './error';\n\nconst SCOPE = 'Util';\r\nfunction toObject(arr) {\r\n const res = {};\r\n for (let i = 0; i < arr.length; i++) {\r\n if (arr[i]) {\r\n extend(res, arr[i]);\r\n }\r\n }\r\n return res;\r\n}\r\nconst getValueByPath = (obj, paths = '') => {\r\n let ret = obj;\r\n paths.split('.').map(path => {\r\n ret = ret === null || ret === void 0 ? void 0 : ret[path];\r\n });\r\n return ret;\r\n};\r\nfunction getPropByPath(obj, path, strict) {\r\n let tempObj = obj;\r\n path = path.replace(/\\[(\\w+)\\]/g, '.$1');\r\n path = path.replace(/^\\./, '');\r\n const keyArr = path.split('.');\r\n let i = 0;\r\n for (i; i < keyArr.length - 1; i++) {\r\n if (!tempObj && !strict)\r\n break;\r\n const key = keyArr[i];\r\n if (key in tempObj) {\r\n tempObj = tempObj[key];\r\n }\r\n else {\r\n if (strict) {\r\n throw new Error('please transfer a valid prop path to form item!');\r\n }\r\n break;\r\n }\r\n }\r\n return {\r\n o: tempObj,\r\n k: keyArr[i],\r\n v: tempObj === null || tempObj === void 0 ? void 0 : tempObj[keyArr[i]],\r\n };\r\n}\r\nconst generateId = () => Math.floor(Math.random() * 10000);\r\nconst escapeRegexpString = (value = '') => String(value).replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\r\nconst coerceTruthyValueToArray = arr => {\r\n if (!arr && arr !== 0) {\r\n return [];\r\n }\r\n return Array.isArray(arr) ? arr : [arr];\r\n};\r\nconst isIE = function () {\r\n return !isServer && !isNaN(Number(document.documentMode));\r\n};\r\nconst isEdge = function () {\r\n return !isServer && navigator.userAgent.indexOf('Edge') > -1;\r\n};\r\nconst isFirefox = function () {\r\n return !isServer && !!window.navigator.userAgent.match(/firefox/i);\r\n};\r\nconst autoprefixer = function (style) {\r\n const rules = ['transform', 'transition', 'animation'];\r\n const prefixes = ['ms-', 'webkit-'];\r\n rules.forEach(rule => {\r\n const value = style[rule];\r\n if (rule && value) {\r\n prefixes.forEach(prefix => {\r\n style[prefix + rule] = value;\r\n });\r\n }\r\n });\r\n return style;\r\n};\r\nconst kebabCase = hyphenate;\r\nconst isBool = (val) => typeof val === 'boolean';\r\nconst isNumber = (val) => typeof val === 'number';\r\nconst isHTMLElement = (val) => toRawType(val).startsWith('HTML');\r\nfunction rafThrottle(fn) {\r\n let locked = false;\r\n return function (...args) {\r\n if (locked)\r\n return;\r\n locked = true;\r\n window.requestAnimationFrame(() => {\r\n fn.apply(this, args);\r\n locked = false;\r\n });\r\n };\r\n}\r\nconst clearTimer = (timer) => {\r\n clearTimeout(timer.value);\r\n timer.value = null;\r\n};\r\nfunction getRandomInt(max) {\r\n return Math.floor(Math.random() * Math.floor(max));\r\n}\r\nfunction entries(obj) {\r\n return Object\r\n .keys(obj)\r\n .map((key) => ([key, obj[key]]));\r\n}\r\nfunction isUndefined(val) {\r\n return val === void 0;\r\n}\r\nfunction useGlobalConfig() {\r\n const vm = getCurrentInstance();\r\n if ('$ELEMENT' in vm.proxy) {\r\n return vm.proxy.$ELEMENT;\r\n }\r\n return {};\r\n}\r\nconst arrayFindIndex = function (arr, pred) {\r\n return arr.findIndex(pred);\r\n};\r\nconst arrayFind = function (arr, pred) {\r\n return arr.find(pred);\r\n};\r\nfunction isEmpty(val) {\r\n if (!val && val !== 0 ||\r\n isArray(val) && !val.length ||\r\n isObject(val) && !Object.keys(val).length)\r\n return true;\r\n return false;\r\n}\r\nfunction arrayFlat(arr) {\r\n return arr.reduce((acm, item) => {\r\n const val = Array.isArray(item) ? arrayFlat(item) : item;\r\n return acm.concat(val);\r\n }, []);\r\n}\r\nfunction deduplicate(arr) {\r\n return Array.from(new Set(arr));\r\n}\r\nfunction $(ref) {\r\n return ref.value;\r\n}\r\nfunction addUnit(value) {\r\n if (isString(value)) {\r\n return value;\r\n }\r\n else if (isNumber(value)) {\r\n return value + 'px';\r\n }\r\n if (process.env.NODE_ENV === 'development') {\r\n warn(SCOPE, 'binding value must be a string or number');\r\n }\r\n return '';\r\n}\r\nfunction isEqualWithFunction(obj, other) {\r\n return isEqualWith(obj, other, (objVal, otherVal) => {\r\n return isFunction(objVal) && isFunction(otherVal) ? `${objVal}` === `${otherVal}` : undefined;\r\n });\r\n}\r\nconst refAttacher = (ref) => {\r\n return (val) => {\r\n ref.value = val;\r\n };\r\n};\n\nexport { $, SCOPE, addUnit, arrayFind, arrayFindIndex, arrayFlat, autoprefixer, clearTimer, coerceTruthyValueToArray, deduplicate, entries, escapeRegexpString, generateId, getPropByPath, getRandomInt, getValueByPath, isBool, isEdge, isEmpty, isEqualWithFunction, isFirefox, isHTMLElement, isIE, isNumber, isUndefined, kebabCase, rafThrottle, refAttacher, toObject, useGlobalConfig };\n","import isServer from './isServer';\nimport { camelize, isObject } from './util';\n\nconst trim = function (s) {\r\n return (s || '').replace(/^[\\s\\uFEFF]+|[\\s\\uFEFF]+$/g, '');\r\n};\r\nconst on = function (element, event, handler, useCapture = false) {\r\n if (element && event && handler) {\r\n element.addEventListener(event, handler, useCapture);\r\n }\r\n};\r\nconst off = function (element, event, handler, useCapture = false) {\r\n if (element && event && handler) {\r\n element.removeEventListener(event, handler, useCapture);\r\n }\r\n};\r\nconst once = function (el, event, fn) {\r\n const listener = function (...args) {\r\n if (fn) {\r\n fn.apply(this, args);\r\n }\r\n off(el, event, listener);\r\n };\r\n on(el, event, listener);\r\n};\r\nfunction hasClass(el, cls) {\r\n if (!el || !cls)\r\n return false;\r\n if (cls.indexOf(' ') !== -1)\r\n throw new Error('className should not contain space.');\r\n if (el.classList) {\r\n return el.classList.contains(cls);\r\n }\r\n else {\r\n return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;\r\n }\r\n}\r\nfunction addClass(el, cls) {\r\n if (!el)\r\n return;\r\n let curClass = el.className;\r\n const classes = (cls || '').split(' ');\r\n for (let i = 0, j = classes.length; i < j; i++) {\r\n const clsName = classes[i];\r\n if (!clsName)\r\n continue;\r\n if (el.classList) {\r\n el.classList.add(clsName);\r\n }\r\n else if (!hasClass(el, clsName)) {\r\n curClass += ' ' + clsName;\r\n }\r\n }\r\n if (!el.classList) {\r\n el.className = curClass;\r\n }\r\n}\r\nfunction removeClass(el, cls) {\r\n if (!el || !cls)\r\n return;\r\n const classes = cls.split(' ');\r\n let curClass = ' ' + el.className + ' ';\r\n for (let i = 0, j = classes.length; i < j; i++) {\r\n const clsName = classes[i];\r\n if (!clsName)\r\n continue;\r\n if (el.classList) {\r\n el.classList.remove(clsName);\r\n }\r\n else if (hasClass(el, clsName)) {\r\n curClass = curClass.replace(' ' + clsName + ' ', ' ');\r\n }\r\n }\r\n if (!el.classList) {\r\n el.className = trim(curClass);\r\n }\r\n}\r\nconst getStyle = function (element, styleName) {\r\n if (isServer)\r\n return;\r\n if (!element || !styleName)\r\n return null;\r\n styleName = camelize(styleName);\r\n if (styleName === 'float') {\r\n styleName = 'cssFloat';\r\n }\r\n try {\r\n const style = element.style[styleName];\r\n if (style)\r\n return style;\r\n const computed = document.defaultView.getComputedStyle(element, '');\r\n return computed ? computed[styleName] : '';\r\n }\r\n catch (e) {\r\n return element.style[styleName];\r\n }\r\n};\r\nfunction setStyle(element, styleName, value) {\r\n if (!element || !styleName)\r\n return;\r\n if (isObject(styleName)) {\r\n Object.keys(styleName).forEach(prop => {\r\n setStyle(element, prop, styleName[prop]);\r\n });\r\n }\r\n else {\r\n styleName = camelize(styleName);\r\n element.style[styleName] = value;\r\n }\r\n}\r\nfunction removeStyle(element, style) {\r\n if (!element || !style)\r\n return;\r\n if (isObject(style)) {\r\n Object.keys(style).forEach(prop => {\r\n setStyle(element, prop, '');\r\n });\r\n }\r\n else {\r\n setStyle(element, style, '');\r\n }\r\n}\r\nconst isScroll = (el, isVertical) => {\r\n if (isServer)\r\n return;\r\n const determinedDirection = isVertical === null || isVertical === undefined;\r\n const overflow = determinedDirection\r\n ? getStyle(el, 'overflow')\r\n : isVertical\r\n ? getStyle(el, 'overflow-y')\r\n : getStyle(el, 'overflow-x');\r\n return overflow.match(/(scroll|auto|overlay)/);\r\n};\r\nconst getScrollContainer = (el, isVertical) => {\r\n if (isServer)\r\n return;\r\n let parent = el;\r\n while (parent) {\r\n if ([window, document, document.documentElement].includes(parent)) {\r\n return window;\r\n }\r\n if (isScroll(parent, isVertical)) {\r\n return parent;\r\n }\r\n parent = parent.parentNode;\r\n }\r\n return parent;\r\n};\r\nconst isInContainer = (el, container) => {\r\n if (isServer || !el || !container)\r\n return false;\r\n const elRect = el.getBoundingClientRect();\r\n let containerRect;\r\n if ([window, document, document.documentElement, null, undefined].includes(container)) {\r\n containerRect = {\r\n top: 0,\r\n right: window.innerWidth,\r\n bottom: window.innerHeight,\r\n left: 0,\r\n };\r\n }\r\n else {\r\n containerRect = container.getBoundingClientRect();\r\n }\r\n return (elRect.top < containerRect.bottom &&\r\n elRect.bottom > containerRect.top &&\r\n elRect.right > containerRect.left &&\r\n elRect.left < containerRect.right);\r\n};\r\nconst getOffsetTop = (el) => {\r\n let offset = 0;\r\n let parent = el;\r\n while (parent) {\r\n offset += parent.offsetTop;\r\n parent = parent.offsetParent;\r\n }\r\n return offset;\r\n};\r\nconst getOffsetTopDistance = (el, containerEl) => {\r\n return Math.abs(getOffsetTop(el) - getOffsetTop(containerEl));\r\n};\r\nconst stop = (e) => e.stopPropagation();\n\nexport { addClass, getOffsetTop, getOffsetTopDistance, getScrollContainer, getStyle, hasClass, isInContainer, isScroll, off, on, once, removeClass, removeStyle, setStyle, stop };\n","import ResizeObserver from 'resize-observer-polyfill';\nimport isServer from './isServer';\n\nconst resizeHandler = function (entries) {\r\n for (const entry of entries) {\r\n const listeners = entry.target.__resizeListeners__ || [];\r\n if (listeners.length) {\r\n listeners.forEach(fn => {\r\n fn();\r\n });\r\n }\r\n }\r\n};\r\nconst addResizeListener = function (element, fn) {\r\n if (isServer || !element)\r\n return;\r\n if (!element.__resizeListeners__) {\r\n element.__resizeListeners__ = [];\r\n element.__ro__ = new ResizeObserver(resizeHandler);\r\n element.__ro__.observe(element);\r\n }\r\n element.__resizeListeners__.push(fn);\r\n};\r\nconst removeResizeListener = function (element, fn) {\r\n if (!element || !element.__resizeListeners__)\r\n return;\r\n element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);\r\n if (!element.__resizeListeners__.length) {\r\n element.__ro__.disconnect();\r\n }\r\n};\n\nexport { addResizeListener, removeResizeListener };\n","import { defineComponent, ref, reactive, computed, watch, onMounted, onBeforeUnmount, openBlock, createBlock, createVNode, renderSlot } from 'vue';\nimport { getScrollContainer, on, off } from '../utils/dom';\nimport { addResizeListener, removeResizeListener } from '../utils/resize-event';\n\nvar script = defineComponent({\n name: \"ElAffix\",\n props: {\n zIndex: {\n type: Number,\n default: 100\n },\n target: {\n type: String,\n default: \"\"\n },\n offset: {\n type: Number,\n default: 0\n },\n position: {\n type: String,\n default: \"top\"\n }\n },\n emits: [\"scroll\", \"change\"],\n setup(props, { emit }) {\n const target = ref(null);\n const root = ref(null);\n const scrollContainer = ref(null);\n const state = reactive({\n fixed: false,\n height: 0,\n width: 0,\n scrollTop: 0,\n clientHeight: 0,\n transform: 0\n });\n const rootStyle = computed(() => {\n return {\n height: state.fixed ? `${state.height}px` : \"\",\n width: state.fixed ? `${state.width}px` : \"\"\n };\n });\n const affixStyle = computed(() => {\n if (!state.fixed) {\n return;\n }\n const offset = props.offset ? `${props.offset}px` : 0;\n const transform = state.transform ? `translateY(${state.transform}px)` : \"\";\n return {\n height: `${state.height}px`,\n width: `${state.width}px`,\n top: props.position === \"top\" ? offset : \"\",\n bottom: props.position === \"bottom\" ? offset : \"\",\n transform,\n zIndex: props.zIndex\n };\n });\n const update = () => {\n const rootRect = root.value.getBoundingClientRect();\n const targetRect = target.value.getBoundingClientRect();\n state.height = rootRect.height;\n state.width = rootRect.width;\n state.scrollTop = scrollContainer.value === window ? document.documentElement.scrollTop : scrollContainer.value.scrollTop;\n state.clientHeight = document.documentElement.clientHeight;\n if (props.position === \"top\") {\n if (props.target) {\n const difference = targetRect.bottom - props.offset - state.height;\n state.fixed = props.offset > rootRect.top && targetRect.bottom > 0;\n state.transform = difference < 0 ? difference : 0;\n } else {\n state.fixed = props.offset > rootRect.top;\n }\n } else {\n if (props.target) {\n const difference = state.clientHeight - targetRect.top - props.offset - state.height;\n state.fixed = state.clientHeight - props.offset < rootRect.bottom && state.clientHeight > targetRect.top;\n state.transform = difference < 0 ? -difference : 0;\n } else {\n state.fixed = state.clientHeight - props.offset < rootRect.bottom;\n }\n }\n };\n const onScroll = () => {\n update();\n emit(\"scroll\", {\n scrollTop: state.scrollTop,\n fixed: state.fixed\n });\n };\n watch(() => state.fixed, () => {\n emit(\"change\", state.fixed);\n });\n onMounted(() => {\n if (props.target) {\n target.value = document.querySelector(props.target);\n if (!target.value) {\n throw new Error(`target is not existed: ${props.target}`);\n }\n } else {\n target.value = document.documentElement;\n }\n scrollContainer.value = getScrollContainer(root.value);\n on(scrollContainer.value, \"scroll\", onScroll);\n addResizeListener(root.value, update);\n });\n onBeforeUnmount(() => {\n off(scrollContainer.value, \"scroll\", onScroll);\n removeResizeListener(root.value, update);\n });\n return {\n root,\n state,\n rootStyle,\n affixStyle,\n update\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", {\n ref: \"root\",\n class: \"el-affix\",\n style: _ctx.rootStyle\n }, [\n createVNode(\"div\", {\n class: { \"el-affix--fixed\": _ctx.state.fixed },\n style: _ctx.affixStyle\n }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 6)\n ], 4);\n}\n\nscript.render = render;\nscript.__file = \"packages/affix/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Affix = script;\n\nexport default _Affix;\n","import { defineComponent, ref, computed, openBlock, createBlock, Transition, withCtx, withDirectives, createVNode, createCommentVNode, renderSlot, createTextVNode, toDisplayString, vShow } from 'vue';\n\nconst TYPE_CLASSES_MAP = {\n \"success\": \"el-icon-success\",\n \"warning\": \"el-icon-warning\",\n \"error\": \"el-icon-error\"\n};\nvar script = defineComponent({\n name: \"ElAlert\",\n props: {\n title: {\n type: String,\n default: \"\"\n },\n description: {\n type: String,\n default: \"\"\n },\n type: {\n type: String,\n default: \"info\"\n },\n closable: {\n type: Boolean,\n default: true\n },\n closeText: {\n type: String,\n default: \"\"\n },\n showIcon: Boolean,\n center: Boolean,\n effect: {\n type: String,\n default: \"light\",\n validator: (value) => [\"light\", \"dark\"].indexOf(value) > -1\n }\n },\n emits: [\"close\"],\n setup(props, ctx) {\n const visible = ref(true);\n const typeClass = computed(() => `el-alert--${props.type}`);\n const iconClass = computed(() => TYPE_CLASSES_MAP[props.type] || \"el-icon-info\");\n const isBigIcon = computed(() => props.description || ctx.slots.default ? \"is-big\" : \"\");\n const isBoldTitle = computed(() => props.description || ctx.slots.default ? \"is-bold\" : \"\");\n const close = (evt) => {\n visible.value = false;\n ctx.emit(\"close\", evt);\n };\n return {\n visible,\n typeClass,\n iconClass,\n isBigIcon,\n isBoldTitle,\n close\n };\n }\n});\n\nconst _hoisted_1 = { class: \"el-alert__content\" };\nconst _hoisted_2 = {\n key: 1,\n class: \"el-alert__description\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(Transition, { name: \"el-alert-fade\" }, {\n default: withCtx(() => [\n withDirectives(createVNode(\"div\", {\n class: [\"el-alert\", [_ctx.typeClass, _ctx.center ? \"is-center\" : \"\", \"is-\" + _ctx.effect]],\n role: \"alert\"\n }, [\n _ctx.showIcon ? (openBlock(), createBlock(\"i\", {\n key: 0,\n class: [\"el-alert__icon\", [_ctx.iconClass, _ctx.isBigIcon]]\n }, null, 2)) : createCommentVNode(\"v-if\", true),\n createVNode(\"div\", _hoisted_1, [\n _ctx.title || _ctx.$slots.title ? (openBlock(), createBlock(\"span\", {\n key: 0,\n class: [\"el-alert__title\", [_ctx.isBoldTitle]]\n }, [\n renderSlot(_ctx.$slots, \"title\", {}, () => [\n createTextVNode(toDisplayString(_ctx.title), 1)\n ])\n ], 2)) : createCommentVNode(\"v-if\", true),\n _ctx.$slots.default || !!_ctx.description ? (openBlock(), createBlock(\"p\", _hoisted_2, [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n createTextVNode(toDisplayString(_ctx.description), 1)\n ])\n ])) : createCommentVNode(\"v-if\", true),\n _ctx.closable ? (openBlock(), createBlock(\"i\", {\n key: 2,\n class: [\"el-alert__closebtn\", { \"is-customed\": _ctx.closeText !== \"\", \"el-icon-close\": _ctx.closeText === \"\" }],\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.close && _ctx.close(...args))\n }, toDisplayString(_ctx.closeText), 3)) : createCommentVNode(\"v-if\", true)\n ])\n ], 2), [\n [vShow, _ctx.visible]\n ])\n ]),\n _: 3\n });\n}\n\nscript.render = render;\nscript.__file = \"packages/alert/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Alert = script;\n\nexport default _Alert;\n","import { defineComponent, openBlock, createBlock, renderSlot } from 'vue';\n\nvar script = defineComponent({\n name: \"ElAside\",\n props: {\n width: {\n type: String,\n default: null\n }\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"aside\", {\n class: \"el-aside\",\n style: { \"--el-aside-width\": _ctx.width }\n }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 4);\n}\n\nscript.render = render;\nscript.__file = \"packages/container/src/aside.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Aside = script;\n\nexport default _Aside;\n","import isServer from './isServer';\n\nlet scrollBarWidth;\r\nfunction scrollbarWidth () {\r\n if (isServer)\r\n return 0;\r\n if (scrollBarWidth !== undefined)\r\n return scrollBarWidth;\r\n const outer = document.createElement('div');\r\n outer.className = 'el-scrollbar__wrap';\r\n outer.style.visibility = 'hidden';\r\n outer.style.width = '100px';\r\n outer.style.position = 'absolute';\r\n outer.style.top = '-9999px';\r\n document.body.appendChild(outer);\r\n const widthNoScroll = outer.offsetWidth;\r\n outer.style.overflow = 'scroll';\r\n const inner = document.createElement('div');\r\n inner.style.width = '100%';\r\n outer.appendChild(inner);\r\n const widthWithScroll = inner.offsetWidth;\r\n outer.parentNode.removeChild(outer);\r\n scrollBarWidth = widthNoScroll - widthWithScroll;\r\n return scrollBarWidth;\r\n}\n\nexport default scrollbarWidth;\n","const EVENT_CODE = {\r\n tab: 'Tab',\r\n enter: 'Enter',\r\n space: 'Space',\r\n left: 'ArrowLeft',\r\n up: 'ArrowUp',\r\n right: 'ArrowRight',\r\n down: 'ArrowDown',\r\n esc: 'Escape',\r\n delete: 'Delete',\r\n backspace: 'Backspace',\r\n};\r\nconst FOCUSABLE_ELEMENT_SELECTORS = `a[href],button:not([disabled]),button:not([hidden]),:not([tabindex=\"-1\"]),input:not([disabled]),input:not([type=\"hidden\"]),select:not([disabled]),textarea:not([disabled])`;\r\nconst isVisible = (element) => {\r\n if (process.env.NODE_ENV === 'test')\r\n return true;\r\n const computed = getComputedStyle(element);\r\n return computed.position === 'fixed' ? false : element.offsetParent !== null;\r\n};\r\nconst obtainAllFocusableElements = (element) => {\r\n return Array.from(element.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS)).filter(isFocusable)\r\n .filter(isVisible);\r\n};\r\nconst isFocusable = (element) => {\r\n if (element.tabIndex > 0 ||\r\n (element.tabIndex === 0 && element.getAttribute('tabIndex') !== null)) {\r\n return true;\r\n }\r\n if (element.disabled) {\r\n return false;\r\n }\r\n switch (element.nodeName) {\r\n case 'A': {\r\n return !!element.href && element.rel !== 'ignore';\r\n }\r\n case 'INPUT': {\r\n return !(element.type === 'hidden' || element.type === 'file');\r\n }\r\n case 'BUTTON':\r\n case 'SELECT':\r\n case 'TEXTAREA': {\r\n return true;\r\n }\r\n default: {\r\n return false;\r\n }\r\n }\r\n};\r\nconst attemptFocus = (element) => {\r\n var _a;\r\n if (!isFocusable(element)) {\r\n return false;\r\n }\r\n Utils.IgnoreUtilFocusChanges = true;\r\n (_a = element.focus) === null || _a === void 0 ? void 0 : _a.call(element);\r\n Utils.IgnoreUtilFocusChanges = false;\r\n return document.activeElement === element;\r\n};\r\nconst triggerEvent = function (elm, name, ...opts) {\r\n let eventName;\r\n if (name.includes('mouse') || name.includes('click')) {\r\n eventName = 'MouseEvents';\r\n }\r\n else if (name.includes('key')) {\r\n eventName = 'KeyboardEvent';\r\n }\r\n else {\r\n eventName = 'HTMLEvents';\r\n }\r\n const evt = document.createEvent(eventName);\r\n evt.initEvent(name, ...opts);\r\n elm.dispatchEvent(evt);\r\n return elm;\r\n};\r\nconst Utils = {\r\n IgnoreUtilFocusChanges: false,\r\n focusFirstDescendant: function (element) {\r\n for (let i = 0; i < element.childNodes.length; i++) {\r\n const child = element.childNodes[i];\r\n if (attemptFocus(child) ||\r\n this.focusFirstDescendant(child)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n },\r\n focusLastDescendant: function (element) {\r\n for (let i = element.childNodes.length - 1; i >= 0; i--) {\r\n const child = element.childNodes[i];\r\n if (attemptFocus(child) ||\r\n this.focusLastDescendant(child)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n },\r\n};\n\nexport default Utils;\nexport { EVENT_CODE, attemptFocus, isFocusable, isVisible, obtainAllFocusableElements, triggerEvent };\n","import isServer from './isServer';\n\nconst globalNodes = [];\r\nlet target = isServer ? void 0 : document.body;\r\nfunction createGlobalNode(id) {\r\n const el = document.createElement('div');\r\n if (id !== void 0) {\r\n el.id = id;\r\n }\r\n target.appendChild(el);\r\n globalNodes.push(el);\r\n return el;\r\n}\r\nfunction removeGlobalNode(el) {\r\n globalNodes.splice(globalNodes.indexOf(el), 1);\r\n el.remove();\r\n}\r\nfunction changeGlobalNodesTarget(el) {\r\n if (el !== target) {\r\n target = el;\r\n globalNodes.forEach(el => {\r\n if (el.contains(target) === false) {\r\n target.appendChild(el);\r\n }\r\n });\r\n }\r\n}\n\nexport { changeGlobalNodesTarget, createGlobalNode, removeGlobalNode };\n","const UPDATE_MODEL_EVENT = 'update:modelValue';\r\nconst CHANGE_EVENT = 'change';\r\nconst INPUT_EVENT = 'input';\r\nconst VALIDATE_STATE_MAP = {\r\n validating: 'el-icon-loading',\r\n success: 'el-icon-circle-check',\r\n error: 'el-icon-circle-close',\r\n};\n\nexport { CHANGE_EVENT, INPUT_EVENT, UPDATE_MODEL_EVENT, VALIDATE_STATE_MAP };\n","export default function getBoundingClientRect(element) {\n var rect = element.getBoundingClientRect();\n return {\n width: rect.width,\n height: rect.height,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n left: rect.left,\n x: rect.left,\n y: rect.top\n };\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\"; // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(options) {\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","import { top, left, right, bottom } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(round(x * dpr) / dpr) || 0,\n y: round(round(y * dpr) / dpr) || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets;\n\n var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,\n _ref3$x = _ref3.x,\n x = _ref3$x === void 0 ? 0 : _ref3$x,\n _ref3$y = _ref3.y,\n y = _ref3$y === void 0 ? 0 : _ref3$y;\n\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top) {\n sideY = bottom; // $FlowFixMe[prop-missing]\n\n y -= offsetParent[heightProp] - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left) {\n sideX = right; // $FlowFixMe[prop-missing]\n\n x -= offsetParent[widthProp] - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref4) {\n var state = _ref4.state,\n options = _ref4.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\";\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nexport default function getViewportRect(element) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper\n // can be obscured underneath it.\n // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even\n // if it isn't open, so if this isn't available, the popper will be detected\n // to overflow the bottom of the screen too early.\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)\n // In Chrome, it returns a value very close to 0 (+/-) but contains rounding\n // errors due to floating point numbers, so we need to check precision.\n // Safari returns a number <= 0, usually < -1 when pinch-zoomed\n // Feature detection fails in mobile emulation mode in Chrome.\n // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <\n // 0.001\n // Fallback here: \"Not Safari\" userAgent\n\n if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element) {\n var rect = getBoundingClientRect(element);\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var referenceElement = state.elements.reference;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);\n var referenceClientRect = getBoundingClientRect(referenceElement);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport default function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport within from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { max as mathMax, min as mathMin } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis || checkAltAxis) {\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = popperOffsets[mainAxis] + overflow[mainSide];\n var max = popperOffsets[mainAxis] - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;\n var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;\n\n if (checkMainAxis) {\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var _preventedOffset = within(tether ? mathMin(_min, tetherMin) : _min, _offset, tether ? mathMax(_max, tetherMax) : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport within from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import { on, once, off } from '../utils/dom';\nimport isServer from '../utils/isServer';\nimport { nextTick } from 'vue';\nimport { obtainAllFocusableElements, EVENT_CODE } from '../utils/aria';\nimport normalizeWheel from 'normalize-wheel';\nimport { addResizeListener, removeResizeListener } from '../utils/resize-event';\n\nconst nodeList = new Map();\nlet startClick;\nif (!isServer) {\n on(document, \"mousedown\", (e) => startClick = e);\n on(document, \"mouseup\", (e) => {\n for (const handlers of nodeList.values()) {\n for (const { documentHandler } of handlers) {\n documentHandler(e, startClick);\n }\n }\n });\n}\nfunction createDocumentHandler(el, binding) {\n let excludes = [];\n if (Array.isArray(binding.arg)) {\n excludes = binding.arg;\n } else if (binding.arg instanceof HTMLElement) {\n excludes.push(binding.arg);\n }\n return function(mouseup, mousedown) {\n const popperRef = binding.instance.popperRef;\n const mouseUpTarget = mouseup.target;\n const mouseDownTarget = mousedown == null ? void 0 : mousedown.target;\n const isBound = !binding || !binding.instance;\n const isTargetExists = !mouseUpTarget || !mouseDownTarget;\n const isContainedByEl = el.contains(mouseUpTarget) || el.contains(mouseDownTarget);\n const isSelf = el === mouseUpTarget;\n const isTargetExcluded = excludes.length && excludes.some((item) => item == null ? void 0 : item.contains(mouseUpTarget)) || excludes.length && excludes.includes(mouseDownTarget);\n const isContainedByPopper = popperRef && (popperRef.contains(mouseUpTarget) || popperRef.contains(mouseDownTarget));\n if (isBound || isTargetExists || isContainedByEl || isSelf || isTargetExcluded || isContainedByPopper) {\n return;\n }\n binding.value(mouseup, mousedown);\n };\n}\nconst ClickOutside = {\n beforeMount(el, binding) {\n if (!nodeList.has(el)) {\n nodeList.set(el, []);\n }\n nodeList.get(el).push({\n documentHandler: createDocumentHandler(el, binding),\n bindingFn: binding.value\n });\n },\n updated(el, binding) {\n if (!nodeList.has(el)) {\n nodeList.set(el, []);\n }\n const handlers = nodeList.get(el);\n const oldHandlerIndex = handlers.findIndex((item) => item.bindingFn === binding.oldValue);\n const newHandler = {\n documentHandler: createDocumentHandler(el, binding),\n bindingFn: binding.value\n };\n if (oldHandlerIndex >= 0) {\n handlers.splice(oldHandlerIndex, 1, newHandler);\n } else {\n handlers.push(newHandler);\n }\n },\n unmounted(el) {\n nodeList.delete(el);\n }\n};\n\nvar index = {\n beforeMount(el, binding) {\n let interval = null;\n let startTime;\n const handler = () => binding.value && binding.value();\n const clear = () => {\n if (Date.now() - startTime < 100) {\n handler();\n }\n clearInterval(interval);\n interval = null;\n };\n on(el, \"mousedown\", (e) => {\n if (e.button !== 0)\n return;\n startTime = Date.now();\n once(document, \"mouseup\", clear);\n clearInterval(interval);\n interval = setInterval(handler, 100);\n });\n }\n};\n\nconst FOCUSABLE_CHILDREN = \"_trap-focus-children\";\nconst FOCUS_STACK = [];\nconst FOCUS_HANDLER = (e) => {\n var _a;\n if (FOCUS_STACK.length === 0)\n return;\n const focusableElement = FOCUS_STACK[FOCUS_STACK.length - 1][FOCUSABLE_CHILDREN];\n if (focusableElement.length > 0 && e.code === EVENT_CODE.tab) {\n if (focusableElement.length === 1) {\n e.preventDefault();\n if (document.activeElement !== focusableElement[0]) {\n focusableElement[0].focus();\n }\n return;\n }\n const goingBackward = e.shiftKey;\n const isFirst = e.target === focusableElement[0];\n const isLast = e.target === focusableElement[focusableElement.length - 1];\n if (isFirst && goingBackward) {\n e.preventDefault();\n focusableElement[focusableElement.length - 1].focus();\n }\n if (isLast && !goingBackward) {\n e.preventDefault();\n focusableElement[0].focus();\n }\n if (process.env.NODE_ENV === \"test\") {\n const index = focusableElement.findIndex((element) => element === e.target);\n if (index !== -1) {\n (_a = focusableElement[goingBackward ? index - 1 : index + 1]) == null ? void 0 : _a.focus();\n }\n }\n }\n};\nconst TrapFocus = {\n beforeMount(el) {\n el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements(el);\n FOCUS_STACK.push(el);\n if (FOCUS_STACK.length <= 1) {\n on(document, \"keydown\", FOCUS_HANDLER);\n }\n },\n updated(el) {\n nextTick(() => {\n el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements(el);\n });\n },\n unmounted() {\n FOCUS_STACK.shift();\n if (FOCUS_STACK.length === 0) {\n off(document, \"keydown\", FOCUS_HANDLER);\n }\n }\n};\n\nconst isFirefox = typeof navigator !== \"undefined\" && navigator.userAgent.toLowerCase().indexOf(\"firefox\") > -1;\nconst mousewheel = function(element, callback) {\n if (element && element.addEventListener) {\n const fn = function(event) {\n const normalized = normalizeWheel(event);\n callback && callback.apply(this, [event, normalized]);\n };\n if (isFirefox) {\n element.addEventListener(\"DOMMouseScroll\", fn);\n } else {\n element.onmousewheel = fn;\n }\n }\n};\nconst Mousewheel = {\n beforeMount(el, binding) {\n mousewheel(el, binding.value);\n }\n};\n\nconst Resize = {\n beforeMount(el, binding) {\n el._handleResize = () => {\n var _a;\n el && ((_a = binding.value) == null ? void 0 : _a.call(binding));\n };\n addResizeListener(el, el._handleResize);\n },\n beforeUnmount(el) {\n removeResizeListener(el, el._handleResize);\n }\n};\n\nexport { ClickOutside, Mousewheel, index as RepeatClick, Resize, TrapFocus };\n","import { Fragment, Text, Comment, openBlock, createBlock, createCommentVNode, isVNode, camelize } from 'vue';\nimport { hasOwn } from '@vue/shared';\nimport { warn } from './error';\n\nconst TEMPLATE = 'template';\r\nconst SCOPE = 'VNode';\r\nvar PatchFlags;\r\n(function (PatchFlags) {\r\n PatchFlags[PatchFlags[\"TEXT\"] = 1] = \"TEXT\";\r\n PatchFlags[PatchFlags[\"CLASS\"] = 2] = \"CLASS\";\r\n PatchFlags[PatchFlags[\"STYLE\"] = 4] = \"STYLE\";\r\n PatchFlags[PatchFlags[\"PROPS\"] = 8] = \"PROPS\";\r\n PatchFlags[PatchFlags[\"FULL_PROPS\"] = 16] = \"FULL_PROPS\";\r\n PatchFlags[PatchFlags[\"HYDRATE_EVENTS\"] = 32] = \"HYDRATE_EVENTS\";\r\n PatchFlags[PatchFlags[\"STABLE_FRAGMENT\"] = 64] = \"STABLE_FRAGMENT\";\r\n PatchFlags[PatchFlags[\"KEYED_FRAGMENT\"] = 128] = \"KEYED_FRAGMENT\";\r\n PatchFlags[PatchFlags[\"UNKEYED_FRAGMENT\"] = 256] = \"UNKEYED_FRAGMENT\";\r\n PatchFlags[PatchFlags[\"NEED_PATCH\"] = 512] = \"NEED_PATCH\";\r\n PatchFlags[PatchFlags[\"DYNAMIC_SLOTS\"] = 1024] = \"DYNAMIC_SLOTS\";\r\n PatchFlags[PatchFlags[\"HOISTED\"] = -1] = \"HOISTED\";\r\n PatchFlags[PatchFlags[\"BAIL\"] = -2] = \"BAIL\";\r\n})(PatchFlags || (PatchFlags = {}));\r\nconst isFragment = (node) => node.type === Fragment;\r\nconst isText = (node) => node.type === Text;\r\nconst isComment = (node) => node.type === Comment;\r\nconst isTemplate = (node) => node.type === TEMPLATE;\r\nfunction getChildren(node, depth) {\r\n if (isComment(node))\r\n return;\r\n if (isFragment(node) || isTemplate(node)) {\r\n return depth > 0\r\n ? getFirstValidNode(node.children, depth - 1)\r\n : undefined;\r\n }\r\n return node;\r\n}\r\nconst isValidElementNode = (node) => !(isFragment(node) || isComment(node));\r\nconst getFirstValidNode = (nodes, maxDepth = 3) => {\r\n if (Array.isArray(nodes)) {\r\n return getChildren(nodes[0], maxDepth);\r\n }\r\n else {\r\n return getChildren(nodes, maxDepth);\r\n }\r\n};\r\nfunction renderIf(condition, node, props, children, patchFlag, patchProps) {\r\n return (condition\r\n ? renderBlock(node, props, children, patchFlag, patchProps)\r\n : createCommentVNode('v-if', true));\r\n}\r\nfunction renderBlock(node, props, children, patchFlag, patchProps) {\r\n return (openBlock(), createBlock(node, props, children, patchFlag, patchProps));\r\n}\r\nconst getNormalizedProps = (node) => {\r\n var _a;\r\n if (!isVNode(node)) {\r\n warn(SCOPE, 'value must be a VNode');\r\n return;\r\n }\r\n const raw = node.props || {};\r\n const type = ((_a = node.type) === null || _a === void 0 ? void 0 : _a.props) || {};\r\n const props = {};\r\n Object.keys(type).forEach(key => {\r\n if (hasOwn(type[key], 'default')) {\r\n props[key] = type[key].default;\r\n }\r\n });\r\n Object.keys(raw).forEach(key => {\r\n props[camelize(key)] = raw[key];\r\n });\r\n return props;\r\n};\n\nexport { PatchFlags, SCOPE, getFirstValidNode, getNormalizedProps, isComment, isFragment, isTemplate, isText, isValidElementNode, renderBlock, renderIf };\n","import isServer from './isServer';\nimport { getConfig } from './config';\nimport { addClass, removeClass, on } from './dom';\nimport { EVENT_CODE } from './aria';\n\nconst onTouchMove = (e) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n};\r\nconst onModalClick = () => {\r\n PopupManager === null || PopupManager === void 0 ? void 0 : PopupManager.doOnModalClick();\r\n};\r\nlet hasModal = false;\r\nlet zIndex;\r\nconst getModal = function () {\r\n if (isServer)\r\n return;\r\n let modalDom = PopupManager.modalDom;\r\n if (modalDom) {\r\n hasModal = true;\r\n }\r\n else {\r\n hasModal = false;\r\n modalDom = document.createElement('div');\r\n PopupManager.modalDom = modalDom;\r\n on(modalDom, 'touchmove', onTouchMove);\r\n on(modalDom, 'click', onModalClick);\r\n }\r\n return modalDom;\r\n};\r\nconst instances = {};\r\nconst PopupManager = {\r\n modalFade: true,\r\n modalDom: undefined,\r\n zIndex,\r\n getInstance: function (id) {\r\n return instances[id];\r\n },\r\n register: function (id, instance) {\r\n if (id && instance) {\r\n instances[id] = instance;\r\n }\r\n },\r\n deregister: function (id) {\r\n if (id) {\r\n instances[id] = null;\r\n delete instances[id];\r\n }\r\n },\r\n nextZIndex: function () {\r\n return ++PopupManager.zIndex;\r\n },\r\n modalStack: [],\r\n doOnModalClick: function () {\r\n const topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];\r\n if (!topItem)\r\n return;\r\n const instance = PopupManager.getInstance(topItem.id);\r\n if (instance && instance.closeOnClickModal.value) {\r\n instance.close();\r\n }\r\n },\r\n openModal: function (id, zIndex, dom, modalClass, modalFade) {\r\n if (isServer)\r\n return;\r\n if (!id || zIndex === undefined)\r\n return;\r\n this.modalFade = modalFade;\r\n const modalStack = this.modalStack;\r\n for (let i = 0, j = modalStack.length; i < j; i++) {\r\n const item = modalStack[i];\r\n if (item.id === id) {\r\n return;\r\n }\r\n }\r\n const modalDom = getModal();\r\n addClass(modalDom, 'v-modal');\r\n if (this.modalFade && !hasModal) {\r\n addClass(modalDom, 'v-modal-enter');\r\n }\r\n if (modalClass) {\r\n const classArr = modalClass.trim().split(/\\s+/);\r\n classArr.forEach(item => addClass(modalDom, item));\r\n }\r\n setTimeout(() => {\r\n removeClass(modalDom, 'v-modal-enter');\r\n }, 200);\r\n if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {\r\n dom.parentNode.appendChild(modalDom);\r\n }\r\n else {\r\n document.body.appendChild(modalDom);\r\n }\r\n if (zIndex) {\r\n modalDom.style.zIndex = String(zIndex);\r\n }\r\n modalDom.tabIndex = 0;\r\n modalDom.style.display = '';\r\n this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });\r\n },\r\n closeModal: function (id) {\r\n const modalStack = this.modalStack;\r\n const modalDom = getModal();\r\n if (modalStack.length > 0) {\r\n const topItem = modalStack[modalStack.length - 1];\r\n if (topItem.id === id) {\r\n if (topItem.modalClass) {\r\n const classArr = topItem.modalClass.trim().split(/\\s+/);\r\n classArr.forEach(item => removeClass(modalDom, item));\r\n }\r\n modalStack.pop();\r\n if (modalStack.length > 0) {\r\n modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;\r\n }\r\n }\r\n else {\r\n for (let i = modalStack.length - 1; i >= 0; i--) {\r\n if (modalStack[i].id === id) {\r\n modalStack.splice(i, 1);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n if (modalStack.length === 0) {\r\n if (this.modalFade) {\r\n addClass(modalDom, 'v-modal-leave');\r\n }\r\n setTimeout(() => {\r\n if (modalStack.length === 0) {\r\n if (modalDom.parentNode)\r\n modalDom.parentNode.removeChild(modalDom);\r\n modalDom.style.display = 'none';\r\n PopupManager.modalDom = undefined;\r\n }\r\n removeClass(modalDom, 'v-modal-leave');\r\n }, 200);\r\n }\r\n },\r\n};\r\nObject.defineProperty(PopupManager, 'zIndex', {\r\n configurable: true,\r\n get() {\r\n if (zIndex === undefined) {\r\n zIndex = getConfig('zIndex') || 2000;\r\n }\r\n return zIndex;\r\n },\r\n set(value) {\r\n zIndex = value;\r\n },\r\n});\r\nconst getTopPopup = function () {\r\n if (isServer)\r\n return;\r\n if (PopupManager.modalStack.length > 0) {\r\n const topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];\r\n if (!topPopup)\r\n return;\r\n const instance = PopupManager.getInstance(topPopup.id);\r\n return instance;\r\n }\r\n};\r\nif (!isServer) {\r\n on(window, 'keydown', function (event) {\r\n if (event.code === EVENT_CODE.esc) {\r\n const topPopup = getTopPopup();\r\n if (topPopup && topPopup.closeOnPressEscape.value) {\r\n topPopup.handleClose\r\n ? topPopup.handleClose()\r\n : topPopup.handleAction\r\n ? topPopup.handleAction('cancel')\r\n : topPopup.close();\r\n }\r\n }\r\n });\r\n}\n\nexport default PopupManager;\n","import { getCurrentInstance, shallowRef, reactive, watchEffect, watch, isRef, onUnmounted, onMounted, ref, h, Teleport, onBeforeUnmount, computed, toRef, nextTick, Transition, renderSlot, toDisplayString, cloneVNode, Fragment, withDirectives, unref, provide, inject } from 'vue';\nimport { entries, kebabCase, isBool, isArray, generateId, isHTMLElement, refAttacher, isString } from '../utils/util';\nimport { on, off, removeClass, hasClass, getStyle, addClass, stop } from '../utils/dom';\nimport getScrollBarWidth from '../utils/scrollbar-width';\nimport throwError from '../utils/error';\nimport { EVENT_CODE } from '../utils/aria';\nimport isServer from '../utils/isServer';\nimport { createGlobalNode, removeGlobalNode } from '../utils/global-nodes';\nimport { UPDATE_MODEL_EVENT } from '../utils/constants';\nimport { createPopper } from '@popperjs/core';\nimport { ClickOutside } from '../directives';\nimport { getFirstValidNode } from '../utils/vnode';\nimport PopupManager from '../utils/popup-manager';\nimport English from '../locale/lang/en';\n\nconst DEFAULT_EXCLUDE_KEYS = [\"class\", \"style\"];\nconst LISTENER_PREFIX = /^on[A-Z]/;\nvar index = (params = {}) => {\n const { excludeListeners = false, excludeKeys = [] } = params;\n const instance = getCurrentInstance();\n const attrs = shallowRef({});\n const allExcludeKeys = excludeKeys.concat(DEFAULT_EXCLUDE_KEYS);\n instance.attrs = reactive(instance.attrs);\n watchEffect(() => {\n const res = entries(instance.attrs).reduce((acm, [key, val]) => {\n if (!allExcludeKeys.includes(key) && !(excludeListeners && LISTENER_PREFIX.test(key))) {\n acm[key] = val;\n }\n return acm;\n }, {});\n attrs.value = res;\n });\n return attrs;\n};\n\nvar index$1 = (el, events) => {\n watch(el, (val) => {\n if (val) {\n events.forEach(({ name, handler }) => {\n on(el.value, name, handler);\n });\n } else {\n events.forEach(({ name, handler }) => {\n off(el.value, name, handler);\n });\n }\n });\n};\n\nvar index$2 = (trigger) => {\n if (!isRef(trigger)) {\n throwError(\"[useLockScreen]\", \"You need to pass a ref param to this function\");\n }\n let scrollBarWidth = 0;\n let withoutHiddenClass = false;\n let bodyPaddingRight = \"0\";\n let computedBodyPaddingRight = 0;\n onUnmounted(() => {\n cleanup();\n });\n const cleanup = () => {\n removeClass(document.body, \"el-popup-parent--hidden\");\n if (withoutHiddenClass) {\n document.body.style.paddingRight = bodyPaddingRight;\n }\n };\n watch(trigger, (val) => {\n if (val) {\n withoutHiddenClass = !hasClass(document.body, \"el-popup-parent--hidden\");\n if (withoutHiddenClass) {\n bodyPaddingRight = document.body.style.paddingRight;\n computedBodyPaddingRight = parseInt(getStyle(document.body, \"paddingRight\"), 10);\n }\n scrollBarWidth = getScrollBarWidth();\n const bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;\n const bodyOverflowY = getStyle(document.body, \"overflowY\");\n if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === \"scroll\") && withoutHiddenClass) {\n document.body.style.paddingRight = computedBodyPaddingRight + scrollBarWidth + \"px\";\n }\n addClass(document.body, \"el-popup-parent--hidden\");\n } else {\n cleanup();\n }\n });\n};\n\nvar index$3 = (toggle, initialFocus) => {\n let previousActive;\n watch(() => toggle.value, (val) => {\n var _a, _b;\n if (val) {\n previousActive = document.activeElement;\n if (isRef(initialFocus)) {\n (_b = (_a = initialFocus.value).focus) == null ? void 0 : _b.call(_a);\n }\n } else {\n if (process.env.NODE_ENV === \"testing\") {\n previousActive.focus.call(previousActive);\n } else {\n previousActive.focus();\n }\n }\n });\n};\n\nconst modalStack = [];\nconst closeModal = (e) => {\n if (modalStack.length === 0)\n return;\n if (e.code === EVENT_CODE.esc) {\n e.stopPropagation();\n const topModal = modalStack[modalStack.length - 1];\n topModal.handleClose();\n }\n};\nvar index$4 = (instance, visibleRef) => {\n watch(() => visibleRef.value, (val) => {\n if (val) {\n modalStack.push(instance);\n } else {\n modalStack.splice(modalStack.findIndex((modal) => modal === instance), 1);\n }\n });\n};\nif (!isServer) {\n on(document, \"keydown\", closeModal);\n}\n\nconst useMigrating = function() {\n onMounted(() => {\n const instance = getCurrentInstance();\n if (process.env.NODE_ENV === \"production\")\n return;\n if (!instance.vnode)\n return;\n const { props = {} } = getMigratingConfig();\n const { data } = instance;\n const definedProps = data.attrs || {};\n for (let propName in definedProps) {\n propName = kebabCase(propName);\n if (props[propName]) {\n console.warn(`[Element Migrating][${this.$options.name}][Attribute]: ${props[propName]}`);\n }\n }\n });\n const getMigratingConfig = function() {\n return {\n props: {},\n events: {}\n };\n };\n return {\n getMigratingConfig\n };\n};\n\nvar index$5 = (el) => {\n return {\n focus: () => {\n var _a, _b;\n (_b = (_a = el.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);\n }\n };\n};\n\nfunction index$6(loading, throttle = 0) {\n if (throttle === 0)\n return loading;\n const throttled = ref(false);\n let timeoutHandle = 0;\n const dispatchThrottling = () => {\n if (timeoutHandle) {\n clearTimeout(timeoutHandle);\n }\n timeoutHandle = window.setTimeout(() => {\n throttled.value = loading.value;\n }, throttle);\n };\n onMounted(dispatchThrottling);\n watch(() => loading.value, (val) => {\n if (val) {\n dispatchThrottling();\n } else {\n throttled.value = val;\n }\n });\n return throttled;\n}\n\nvar index$7 = (indicator, evt, cb) => {\n const prevent = (e) => {\n if (cb(e)) {\n e.stopImmediatePropagation();\n }\n };\n watch(() => indicator.value, (val) => {\n if (val) {\n on(document, evt, prevent, true);\n } else {\n off(document, evt, prevent, true);\n }\n }, { immediate: true });\n};\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst NOOP = () => { };\r\nconst isFunction = (val) => typeof val === 'function';\n\nvar useTeleport = (contentRenderer, appendToBody) => {\n const isTeleportVisible = ref(false);\n if (isServer) {\n return {\n isTeleportVisible,\n showTeleport: NOOP,\n hideTeleport: NOOP,\n renderTeleport: NOOP\n };\n }\n let $el = null;\n const showTeleport = () => {\n isTeleportVisible.value = true;\n if ($el !== null)\n return;\n $el = createGlobalNode();\n };\n const hideTeleport = () => {\n isTeleportVisible.value = false;\n if ($el !== null) {\n removeGlobalNode($el);\n $el = null;\n }\n };\n const renderTeleport = () => {\n return appendToBody.value !== true ? contentRenderer() : isTeleportVisible.value ? [\n h(Teleport, { to: $el }, contentRenderer())\n ] : void 0;\n };\n onUnmounted(hideTeleport);\n return {\n isTeleportVisible,\n showTeleport,\n hideTeleport,\n renderTeleport\n };\n};\n\nfunction useTimeout() {\n let timeoutHandle;\n onBeforeUnmount(() => {\n clearTimeout(timeoutHandle);\n });\n return {\n registerTimeout: (fn, delay) => {\n clearTimeout(timeoutHandle);\n timeoutHandle = setTimeout(fn, delay);\n },\n cancelTimeout: () => {\n clearTimeout(timeoutHandle);\n }\n };\n}\n\nvar __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nconst useModelToggleProps = {\n modelValue: {\n type: Boolean,\n default: null\n },\n \"onUpdate:modelValue\": Function\n};\nconst useModelToggleEmits = [UPDATE_MODEL_EVENT];\nconst useModelToggle = ({\n indicator,\n shouldHideWhenRouteChanges,\n shouldProceed,\n onShow,\n onHide\n}) => {\n const { appContext, props, proxy, emit } = getCurrentInstance();\n const hasUpdateHandler = computed(() => isFunction(props[\"onUpdate:modelValue\"]));\n const isModelBindingAbsent = computed(() => props.modelValue === null);\n const doShow = () => {\n if (indicator.value === true) {\n return;\n }\n indicator.value = true;\n if (isFunction(onShow)) {\n onShow();\n }\n };\n const doHide = () => {\n if (indicator.value === false) {\n return;\n }\n indicator.value = false;\n if (isFunction(onHide)) {\n onHide();\n }\n };\n const show = () => {\n if (props.disabled === true || isFunction(shouldProceed) && !shouldProceed())\n return;\n const shouldEmit = hasUpdateHandler.value && !isServer;\n if (shouldEmit) {\n emit(UPDATE_MODEL_EVENT, true);\n }\n if (isModelBindingAbsent.value || !shouldEmit) {\n doShow();\n }\n };\n const hide = () => {\n if (props.disabled === true || isServer)\n return;\n const shouldEmit = hasUpdateHandler.value && !isServer;\n if (shouldEmit) {\n emit(UPDATE_MODEL_EVENT, false);\n }\n if (isModelBindingAbsent.value || !shouldEmit) {\n doHide();\n }\n };\n const onChange = (val) => {\n if (!isBool(val))\n return;\n if (props.disabled && val) {\n if (hasUpdateHandler.value) {\n emit(UPDATE_MODEL_EVENT, false);\n }\n } else if (indicator.value !== val) {\n if (val) {\n doShow();\n } else {\n doHide();\n }\n }\n };\n const toggle = () => {\n if (indicator.value) {\n hide();\n } else {\n show();\n }\n };\n watch(() => props.modelValue, onChange);\n if (shouldHideWhenRouteChanges && appContext.config.globalProperties.$route !== void 0) {\n watch(() => __spreadValues({}, proxy.$route), () => {\n if (shouldHideWhenRouteChanges.value && indicator.value) {\n hide();\n }\n });\n }\n onMounted(() => {\n onChange(props.modelValue);\n });\n return {\n hide,\n show,\n toggle\n };\n};\n\nconst AFTER_APPEAR = \"after-appear\";\nconst AFTER_ENTER = \"after-enter\";\nconst AFTER_LEAVE = \"after-leave\";\nconst APPEAR_CANCELLED = \"appear-cancelled\";\nconst BEFORE_ENTER = \"before-enter\";\nconst BEFORE_LEAVE = \"before-leave\";\nconst ENTER = \"enter\";\nconst ENTER_CANCELLED = \"enter-cancelled\";\nconst LEAVE = \"leave\";\nconst LEAVE_CANCELLED = \"leave-cancelled\";\nconst useTransitionFallthrough = () => {\n const { emit } = getCurrentInstance();\n return {\n onAfterAppear: () => {\n emit(AFTER_APPEAR);\n },\n onAfterEnter: () => {\n emit(AFTER_ENTER);\n },\n onAfterLeave: () => {\n emit(AFTER_LEAVE);\n },\n onAppearCancelled: () => {\n emit(APPEAR_CANCELLED);\n },\n onBeforeEnter: () => {\n emit(BEFORE_ENTER);\n },\n onBeforeLeave: () => {\n emit(BEFORE_LEAVE);\n },\n onEnter: () => {\n emit(ENTER);\n },\n onEnterCancelled: () => {\n emit(ENTER_CANCELLED);\n },\n onLeave: () => {\n emit(LEAVE);\n },\n onLeaveCancelled: () => {\n emit(LEAVE_CANCELLED);\n }\n };\n};\n\nconst DEFAULT_FALLBACK_PLACEMENTS = [];\nconst defaultModifiers = [\n {\n name: \"offset\",\n options: {\n offset: [0, 12]\n }\n },\n {\n name: \"preventOverflow\",\n options: {\n padding: {\n top: 2,\n bottom: 2,\n left: 5,\n right: 5\n }\n }\n },\n {\n name: \"flip\",\n options: {\n padding: 5,\n fallbackPlacements: []\n }\n },\n {\n name: \"computeStyles\",\n options: {\n gpuAcceleration: true,\n adaptive: true\n }\n }\n];\nconst defaultPopperOptions = {\n type: Object,\n default: () => {\n return {\n fallbackPlacements: DEFAULT_FALLBACK_PLACEMENTS,\n strategy: \"fixed\",\n modifiers: defaultModifiers\n };\n }\n};\n\nvar __defProp$1 = Object.defineProperty;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nconst DEFAULT_TRIGGER = \"hover\";\nconst useTargetEvents = (onShow, onHide, onToggle) => {\n const { props } = getCurrentInstance();\n let triggerFocused = false;\n const popperEventsHandler = (e) => {\n e.stopPropagation();\n switch (e.type) {\n case \"click\": {\n if (triggerFocused) {\n triggerFocused = false;\n } else {\n onToggle();\n }\n break;\n }\n case \"mouseenter\": {\n onShow();\n break;\n }\n case \"mouseleave\": {\n onHide();\n break;\n }\n case \"focus\": {\n triggerFocused = true;\n onShow();\n break;\n }\n case \"blur\": {\n triggerFocused = false;\n onHide();\n break;\n }\n }\n };\n const triggerEventsMap = {\n click: [\"onClick\"],\n hover: [\"onMouseenter\", \"onMouseleave\"],\n focus: [\"onFocus\", \"onBlur\"]\n };\n const mapEvents = (t) => {\n const events = {};\n triggerEventsMap[t].forEach((event) => {\n events[event] = popperEventsHandler;\n });\n return events;\n };\n return computed(() => {\n if (isArray(props.trigger)) {\n return Object.values(props.trigger).reduce((pre, t) => {\n return __spreadValues$1(__spreadValues$1({}, pre), mapEvents(t));\n }, {});\n } else {\n return mapEvents(props.trigger);\n }\n });\n};\n\nvar __defProp$2 = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nconst DARK_EFFECT = \"dark\";\nconst LIGHT_EFFECT = \"light\";\nconst usePopperControlProps = {\n appendToBody: {\n type: Boolean,\n default: true\n },\n arrowOffset: {\n type: Number\n },\n popperOptions: defaultPopperOptions,\n popperClass: {\n type: String,\n default: \"\"\n }\n};\nconst usePopperProps = __spreadProps(__spreadValues$2({}, usePopperControlProps), {\n autoClose: {\n type: Number,\n default: 0\n },\n content: {\n type: String,\n default: \"\"\n },\n class: String,\n style: Object,\n hideAfter: {\n type: Number,\n default: 200\n },\n disabled: {\n type: Boolean,\n default: false\n },\n effect: {\n type: String,\n default: DARK_EFFECT\n },\n enterable: {\n type: Boolean,\n default: true\n },\n manualMode: {\n type: Boolean,\n default: false\n },\n showAfter: {\n type: Number,\n default: 0\n },\n pure: {\n type: Boolean,\n default: false\n },\n showArrow: {\n type: Boolean,\n default: true\n },\n transition: {\n type: String,\n default: \"el-fade-in-linear\"\n },\n trigger: {\n type: [String, Array],\n default: DEFAULT_TRIGGER\n },\n visible: {\n type: Boolean,\n default: void 0\n },\n stopPopperMouseEvent: {\n type: Boolean,\n default: true\n }\n});\nconst usePopper = () => {\n const vm = getCurrentInstance();\n const props = vm.props;\n const { slots } = vm;\n const arrowRef = ref(null);\n const triggerRef = ref(null);\n const popperRef = ref(null);\n const popperStyle = ref({ zIndex: PopupManager.nextZIndex() });\n const visible = ref(false);\n const isManual = computed(() => props.manualMode || props.trigger === \"manual\");\n const popperId = `el-popper-${generateId()}`;\n let popperInstance = null;\n const {\n renderTeleport,\n showTeleport,\n hideTeleport\n } = useTeleport(popupRenderer, toRef(props, \"appendToBody\"));\n const { show, hide } = useModelToggle({\n indicator: visible,\n onShow,\n onHide\n });\n const { registerTimeout, cancelTimeout } = useTimeout();\n function onShow() {\n popperStyle.value.zIndex = PopupManager.nextZIndex();\n nextTick(initializePopper);\n }\n function onHide() {\n hideTeleport();\n nextTick(detachPopper);\n }\n function delayShow() {\n if (isManual.value || props.disabled)\n return;\n showTeleport();\n registerTimeout(show, props.showAfter);\n }\n function delayHide() {\n if (isManual.value)\n return;\n registerTimeout(hide, props.hideAfter);\n }\n function onToggle() {\n if (visible.value) {\n delayShow();\n } else {\n delayHide();\n }\n }\n function detachPopper() {\n var _a;\n (_a = popperInstance == null ? void 0 : popperInstance.destroy) == null ? void 0 : _a.call(popperInstance);\n popperInstance = null;\n }\n function onPopperMouseEnter() {\n if (props.enterable && props.trigger !== \"click\") {\n cancelTimeout();\n }\n }\n function onPopperMouseLeave() {\n const { trigger } = props;\n const shouldPrevent = isString(trigger) && (trigger === \"click\" || trigger === \"focus\") || trigger.length === 1 && (trigger[0] === \"click\" || trigger[0] === \"focus\");\n if (shouldPrevent)\n return;\n delayHide();\n }\n function initializePopper() {\n if (!visible.value || popperInstance !== null) {\n return;\n }\n const unwrappedTrigger = triggerRef.value;\n const $el = isHTMLElement(unwrappedTrigger) ? unwrappedTrigger : unwrappedTrigger.$el;\n popperInstance = createPopper($el, popperRef.value, buildPopperOptions());\n popperInstance.update();\n }\n function buildPopperOptions() {\n const modifiers = [\n ...defaultModifiers,\n ...props.popperOptions.modifiers\n ];\n if (props.showArrow) {\n modifiers.push({\n name: \"arrow\",\n options: {\n padding: props.arrowOffset || 5,\n element: arrowRef.value\n }\n });\n }\n return __spreadProps(__spreadValues$2({}, props.popperOptions), {\n modifiers\n });\n }\n const {\n onAfterEnter,\n onAfterLeave,\n onBeforeEnter,\n onBeforeLeave\n } = useTransitionFallthrough();\n const events = useTargetEvents(delayShow, delayHide, onToggle);\n const arrowRefAttacher = refAttacher(arrowRef);\n const popperRefAttacher = refAttacher(popperRef);\n const triggerRefAttacher = refAttacher(triggerRef);\n function popupRenderer() {\n const mouseUpAndDown = props.stopPopperMouseEvent ? stop : NOOP;\n return h(Transition, {\n name: props.transition,\n onAfterEnter,\n onAfterLeave,\n onBeforeEnter,\n onBeforeLeave\n }, {\n default: () => () => visible.value ? h(\"div\", {\n \"aria-hidden\": false,\n class: [\n props.popperClass,\n \"el-popper\",\n `is-${props.effect}`,\n props.pure ? \"is-pure\" : \"\"\n ],\n style: popperStyle.value,\n id: popperId,\n ref: popperRefAttacher,\n role: \"tooltip\",\n onMouseenter: onPopperMouseEnter,\n onMouseleave: onPopperMouseLeave,\n onClick: stop,\n onMousedown: mouseUpAndDown,\n onMouseup: mouseUpAndDown\n }, [\n renderSlot(slots, \"default\", {}, () => [toDisplayString(props.content)]),\n arrowRenderer()\n ]) : null\n });\n }\n function arrowRenderer() {\n return props.showArrow ? h(\"div\", {\n ref: arrowRefAttacher,\n class: \"el-popper__arrow\",\n \"data-popper-arrow\": \"\"\n }, null) : null;\n }\n function triggerRenderer(triggerProps) {\n var _a;\n const trigger = (_a = slots.trigger) == null ? void 0 : _a.call(slots);\n const firstElement = getFirstValidNode(trigger, 1);\n if (!firstElement)\n throwError(\"renderTrigger\", \"trigger expects single rooted node\");\n return cloneVNode(firstElement, triggerProps, true);\n }\n function render() {\n const trigger = triggerRenderer(__spreadValues$2({\n \"aria-describedby\": popperId,\n class: props.class,\n style: props.style,\n ref: triggerRefAttacher\n }, events));\n return h(Fragment, null, [\n isManual.value ? trigger : withDirectives(trigger, [[ClickOutside, delayHide]]),\n renderTeleport()\n ]);\n }\n return {\n render\n };\n};\n\nvar __defProp$3 = Object.defineProperty;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nconst VAR_PREFIX = \"--el-\";\nconst setVars = (target, val) => {\n Object.keys(val).forEach((key) => {\n if (key.startsWith(VAR_PREFIX)) {\n target == null ? void 0 : target.style.setProperty(key, val[key]);\n } else {\n target == null ? void 0 : target.style.setProperty(VAR_PREFIX + key, val[key]);\n }\n });\n};\nconst themeVarsKey = \"themeVars\";\nfunction useCssVar(vars, target) {\n let stopWatchCssVar = null;\n const elRef = computed(() => {\n var _a;\n return unref(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n });\n const themeVars = useThemeVars();\n const customVars = __spreadValues$3(__spreadValues$3({}, themeVars), unref(vars));\n provide(themeVarsKey, ref(customVars));\n onMounted(() => {\n isRef(vars) ? stopWatchCssVar = watch(vars, (val) => {\n setVars(elRef.value, __spreadValues$3(__spreadValues$3({}, unref(themeVars)), val));\n }, {\n immediate: true,\n deep: true\n }) : setVars(elRef.value, __spreadValues$3(__spreadValues$3({}, unref(themeVars)), vars));\n });\n onUnmounted(() => stopWatchCssVar && stopWatchCssVar());\n}\nconst useThemeVars = () => {\n const themeVars = inject(themeVarsKey, {});\n return themeVars;\n};\n\nconst useLocaleProps = {\n locale: {\n type: Object\n },\n i18n: {\n type: Function\n }\n};\nconst LocaleInjectionKey = \"ElLocaleInjection\";\nconst useLocale = () => {\n const vm = getCurrentInstance();\n const props = vm.props;\n const locale = computed(() => props.locale || English);\n const lang = computed(() => locale.value.name);\n const _translator = (...args) => {\n const [path, option] = args;\n let value;\n const array = path.split(\".\");\n let current = locale.value;\n for (let i = 0, j = array.length; i < j; i++) {\n const property = array[i];\n value = current[property];\n if (i === j - 1)\n return template(value, option);\n if (!value)\n return \"\";\n current = value;\n }\n };\n const t = (...args) => {\n var _a;\n return ((_a = props.i18n) == null ? void 0 : _a.call(props, ...args)) || _translator(...args);\n };\n provide(LocaleInjectionKey, {\n locale,\n lang,\n t\n });\n};\nfunction template(str, option) {\n if (!str || !option)\n return str;\n return str.replace(/\\{(\\w+)\\}/g, (_, key) => {\n return option[key];\n });\n}\nconst useLocaleInject = () => {\n return inject(LocaleInjectionKey, {\n lang: ref(English.name),\n locale: ref(English),\n t: (...args) => {\n const [path, option] = args;\n let value;\n const array = path.split(\".\");\n let current = English;\n for (let i = 0, j = array.length; i < j; i++) {\n const property = array[i];\n value = current[property];\n if (i === j - 1)\n return template(value, option);\n if (!value)\n return \"\";\n current = value;\n }\n }\n });\n};\n\nexport { DARK_EFFECT, LIGHT_EFFECT, LocaleInjectionKey, themeVarsKey, index as useAttrs, useCssVar, index$1 as useEvents, index$5 as useFocus, useLocale, useLocaleInject, useLocaleProps, index$2 as useLockScreen, useMigrating, index$4 as useModal, useModelToggle, useModelToggleEmits, useModelToggleProps, usePopper, usePopperControlProps, usePopperProps, index$7 as usePreventGlobal, index$3 as useRestoreActive, useTeleport, useThemeVars, index$6 as useThrottleRender, useTimeout };\n","function isKorean(text) {\r\n const reg = /([(\\uAC00-\\uD7AF)|(\\u3130-\\u318F)])+/gi;\r\n return reg.test(text);\r\n}\n\nexport { isKorean };\n","import { isNumber } from './util';\n\nconst isValidWidthUnit = (val) => {\r\n if (isNumber(val)) {\r\n return true;\r\n }\r\n else {\r\n return ['px', 'rem', 'em', 'vw', '%', 'vmin', 'vmax'].some(unit => val.endsWith(unit));\r\n }\r\n};\r\nconst isValidComponentSize = (val) => ['', 'large', 'medium', 'small', 'mini'].includes(val);\r\nconst isValidDatePickType = (val) => [\r\n 'year',\r\n 'month',\r\n 'date',\r\n 'dates',\r\n 'week',\r\n 'datetime',\r\n 'datetimerange',\r\n 'daterange',\r\n 'monthrange',\r\n].includes(val);\n\nexport { isValidComponentSize, isValidDatePickType, isValidWidthUnit };\n","export default function(n){return{all:n=n||new Map,on:function(t,e){var i=n.get(t);i&&i.push(e)||n.set(t,[e])},off:function(t,e){var i=n.get(t);i&&i.splice(i.indexOf(e)>>>0,1)},emit:function(t,e){(n.get(t)||[]).slice().map(function(n){n(e)}),(n.get(\"*\")||[]).slice().map(function(n){n(t,e)})}}}\n//# sourceMappingURL=mitt.es.js.map\n","import { defineComponent, watch, reactive, toRefs, provide, ref, computed, openBlock, createBlock, renderSlot } from 'vue';\nimport mitt from 'mitt';\n\nconst elFormKey = \"elForm\";\nconst elFormItemKey = \"elFormItem\";\nconst elFormEvents = {\n addField: \"el.form.addField\",\n removeField: \"el.form.removeField\"\n};\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction useFormLabelWidth() {\n const potentialLabelWidthArr = ref([]);\n const autoLabelWidth = computed(() => {\n if (!potentialLabelWidthArr.value.length)\n return \"0\";\n const max = Math.max(...potentialLabelWidthArr.value);\n return max ? `${max}px` : \"\";\n });\n function getLabelWidthIndex(width) {\n const index = potentialLabelWidthArr.value.indexOf(width);\n if (index === -1) {\n console.warn(\"[Element Warn][ElementForm]unexpected width \" + width);\n }\n return index;\n }\n function registerLabelWidth(val, oldVal) {\n if (val && oldVal) {\n const index = getLabelWidthIndex(oldVal);\n potentialLabelWidthArr.value.splice(index, 1, val);\n } else if (val) {\n potentialLabelWidthArr.value.push(val);\n }\n }\n function deregisterLabelWidth(val) {\n const index = getLabelWidthIndex(val);\n index > -1 && potentialLabelWidthArr.value.splice(index, 1);\n }\n return {\n autoLabelWidth,\n registerLabelWidth,\n deregisterLabelWidth\n };\n}\nvar script = defineComponent({\n name: \"ElForm\",\n props: {\n model: Object,\n rules: Object,\n labelPosition: String,\n labelWidth: {\n type: [String, Number],\n default: \"\"\n },\n labelSuffix: {\n type: String,\n default: \"\"\n },\n inline: Boolean,\n inlineMessage: Boolean,\n statusIcon: Boolean,\n showMessage: {\n type: Boolean,\n default: true\n },\n size: String,\n disabled: Boolean,\n validateOnRuleChange: {\n type: Boolean,\n default: true\n },\n hideRequiredAsterisk: {\n type: Boolean,\n default: false\n }\n },\n emits: [\"validate\"],\n setup(props, { emit }) {\n const formMitt = mitt();\n const fields = [];\n watch(() => props.rules, () => {\n fields.forEach((field) => {\n field.removeValidateEvents();\n field.addValidateEvents();\n });\n if (props.validateOnRuleChange) {\n validate(() => ({}));\n }\n });\n formMitt.on(elFormEvents.addField, (field) => {\n if (field) {\n fields.push(field);\n }\n });\n formMitt.on(elFormEvents.removeField, (field) => {\n if (field.prop) {\n fields.splice(fields.indexOf(field), 1);\n }\n });\n const resetFields = () => {\n if (!props.model) {\n console.warn(\"[Element Warn][Form]model is required for resetFields to work.\");\n return;\n }\n fields.forEach((field) => {\n field.resetField();\n });\n };\n const clearValidate = (props2 = []) => {\n const fds = props2.length ? typeof props2 === \"string\" ? fields.filter((field) => props2 === field.prop) : fields.filter((field) => props2.indexOf(field.prop) > -1) : fields;\n fds.forEach((field) => {\n field.clearValidate();\n });\n };\n const validate = (callback) => {\n if (!props.model) {\n console.warn(\"[Element Warn][Form]model is required for validate to work!\");\n return;\n }\n let promise;\n if (typeof callback !== \"function\") {\n promise = new Promise((resolve, reject) => {\n callback = function(valid2, invalidFields2) {\n if (valid2) {\n resolve(true);\n } else {\n reject(invalidFields2);\n }\n };\n });\n }\n if (fields.length === 0) {\n callback(true);\n }\n let valid = true;\n let count = 0;\n let invalidFields = {};\n for (const field of fields) {\n field.validate(\"\", (message, field2) => {\n if (message) {\n valid = false;\n }\n invalidFields = __spreadValues(__spreadValues({}, invalidFields), field2);\n if (++count === fields.length) {\n callback(valid, invalidFields);\n }\n });\n }\n return promise;\n };\n const validateField = (props2, cb) => {\n props2 = [].concat(props2);\n const fds = fields.filter((field) => props2.indexOf(field.prop) !== -1);\n if (!fields.length) {\n console.warn(\"[Element Warn]please pass correct props!\");\n return;\n }\n fds.forEach((field) => {\n field.validate(\"\", cb);\n });\n };\n const elForm = reactive(__spreadValues(__spreadProps(__spreadValues({\n formMitt\n }, toRefs(props)), {\n resetFields,\n clearValidate,\n validateField,\n emit\n }), useFormLabelWidth()));\n provide(elFormKey, elForm);\n return {\n validate,\n resetFields,\n clearValidate,\n validateField\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"form\", {\n class: [\"el-form\", [\n _ctx.labelPosition ? \"el-form--label-\" + _ctx.labelPosition : \"\",\n { \"el-form--inline\": _ctx.inline }\n ]]\n }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 2);\n}\n\nscript.render = render;\nscript.__file = \"packages/form/src/form.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Form = script;\n\nexport default _Form;\nexport { elFormEvents, elFormItemKey, elFormKey };\n","import { defineComponent, getCurrentInstance, inject, ref, shallowRef, computed, watch, nextTick, onMounted, onUpdated, openBlock, createBlock, Fragment, createCommentVNode, renderSlot, mergeProps, createVNode, withModifiers, toDisplayString } from 'vue';\nimport { useAttrs } from '../hooks';\nimport { UPDATE_MODEL_EVENT, VALIDATE_STATE_MAP } from '../utils/constants';\nimport { useGlobalConfig, isObject } from '../utils/util';\nimport isServer from '../utils/isServer';\nimport { isKorean } from '../utils/isDef';\nimport { isValidComponentSize } from '../utils/validators';\nimport { elFormKey, elFormItemKey } from '../el-form';\n\nlet hiddenTextarea;\nconst HIDDEN_STYLE = `\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important;\n`;\nconst CONTEXT_STYLE = [\n \"letter-spacing\",\n \"line-height\",\n \"padding-top\",\n \"padding-bottom\",\n \"font-family\",\n \"font-weight\",\n \"font-size\",\n \"text-rendering\",\n \"text-transform\",\n \"width\",\n \"text-indent\",\n \"padding-left\",\n \"padding-right\",\n \"border-width\",\n \"box-sizing\"\n];\nfunction calculateNodeStyling(targetElement) {\n const style = window.getComputedStyle(targetElement);\n const boxSizing = style.getPropertyValue(\"box-sizing\");\n const paddingSize = parseFloat(style.getPropertyValue(\"padding-bottom\")) + parseFloat(style.getPropertyValue(\"padding-top\"));\n const borderSize = parseFloat(style.getPropertyValue(\"border-bottom-width\")) + parseFloat(style.getPropertyValue(\"border-top-width\"));\n const contextStyle = CONTEXT_STYLE.map((name) => `${name}:${style.getPropertyValue(name)}`).join(\";\");\n return { contextStyle, paddingSize, borderSize, boxSizing };\n}\nfunction calcTextareaHeight(targetElement, minRows = 1, maxRows = null) {\n var _a;\n if (!hiddenTextarea) {\n hiddenTextarea = document.createElement(\"textarea\");\n document.body.appendChild(hiddenTextarea);\n }\n const {\n paddingSize,\n borderSize,\n boxSizing,\n contextStyle\n } = calculateNodeStyling(targetElement);\n hiddenTextarea.setAttribute(\"style\", `${contextStyle};${HIDDEN_STYLE}`);\n hiddenTextarea.value = targetElement.value || targetElement.placeholder || \"\";\n let height = hiddenTextarea.scrollHeight;\n const result = {};\n if (boxSizing === \"border-box\") {\n height = height + borderSize;\n } else if (boxSizing === \"content-box\") {\n height = height - paddingSize;\n }\n hiddenTextarea.value = \"\";\n const singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;\n if (minRows !== null) {\n let minHeight = singleRowHeight * minRows;\n if (boxSizing === \"border-box\") {\n minHeight = minHeight + paddingSize + borderSize;\n }\n height = Math.max(minHeight, height);\n result.minHeight = `${minHeight}px`;\n }\n if (maxRows !== null) {\n let maxHeight = singleRowHeight * maxRows;\n if (boxSizing === \"border-box\") {\n maxHeight = maxHeight + paddingSize + borderSize;\n }\n height = Math.min(maxHeight, height);\n }\n result.height = `${height}px`;\n (_a = hiddenTextarea.parentNode) == null ? void 0 : _a.removeChild(hiddenTextarea);\n hiddenTextarea = null;\n return result;\n}\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nconst PENDANT_MAP = {\n suffix: \"append\",\n prefix: \"prepend\"\n};\nvar script = defineComponent({\n name: \"ElInput\",\n inheritAttrs: false,\n props: {\n modelValue: {\n type: [String, Number],\n default: \"\"\n },\n type: {\n type: String,\n default: \"text\"\n },\n size: {\n type: String,\n validator: isValidComponentSize\n },\n resize: {\n type: String,\n validator: (val) => [\"none\", \"both\", \"horizontal\", \"vertical\"].includes(val)\n },\n autosize: {\n type: [Boolean, Object],\n default: false\n },\n autocomplete: {\n type: String,\n default: \"off\",\n validator: (val) => [\"on\", \"off\"].includes(val)\n },\n placeholder: {\n type: String\n },\n form: {\n type: String,\n default: \"\"\n },\n disabled: {\n type: Boolean,\n default: false\n },\n readonly: {\n type: Boolean,\n default: false\n },\n clearable: {\n type: Boolean,\n default: false\n },\n showPassword: {\n type: Boolean,\n default: false\n },\n showWordLimit: {\n type: Boolean,\n default: false\n },\n suffixIcon: {\n type: String,\n default: \"\"\n },\n prefixIcon: {\n type: String,\n default: \"\"\n },\n label: {\n type: String\n },\n tabindex: {\n type: [Number, String]\n },\n validateEvent: {\n type: Boolean,\n default: true\n },\n inputStyle: {\n type: Object,\n default: () => ({})\n },\n maxlength: {\n type: [Number, String]\n }\n },\n emits: [\n UPDATE_MODEL_EVENT,\n \"input\",\n \"change\",\n \"focus\",\n \"blur\",\n \"clear\",\n \"mouseleave\",\n \"mouseenter\",\n \"keydown\"\n ],\n setup(props, ctx) {\n const instance = getCurrentInstance();\n const attrs = useAttrs();\n const $ELEMENT = useGlobalConfig();\n const elForm = inject(elFormKey, {});\n const elFormItem = inject(elFormItemKey, {});\n const input = ref(null);\n const textarea = ref(null);\n const focused = ref(false);\n const hovering = ref(false);\n const isComposing = ref(false);\n const passwordVisible = ref(false);\n const _textareaCalcStyle = shallowRef(props.inputStyle);\n const inputOrTextarea = computed(() => input.value || textarea.value);\n const inputSize = computed(() => props.size || elFormItem.size || $ELEMENT.size);\n const needStatusIcon = computed(() => elForm.statusIcon);\n const validateState = computed(() => elFormItem.validateState || \"\");\n const validateIcon = computed(() => VALIDATE_STATE_MAP[validateState.value]);\n const computedTextareaStyle = computed(() => __spreadProps(__spreadValues({}, _textareaCalcStyle.value), {\n resize: props.resize\n }));\n const inputDisabled = computed(() => props.disabled || elForm.disabled);\n const nativeInputValue = computed(() => props.modelValue === null || props.modelValue === void 0 ? \"\" : String(props.modelValue));\n const showClear = computed(() => {\n return props.clearable && !inputDisabled.value && !props.readonly && nativeInputValue.value && (focused.value || hovering.value);\n });\n const showPwdVisible = computed(() => {\n return props.showPassword && !inputDisabled.value && !props.readonly && (!!nativeInputValue.value || focused.value);\n });\n const isWordLimitVisible = computed(() => {\n return props.showWordLimit && props.maxlength && (props.type === \"text\" || props.type === \"textarea\") && !inputDisabled.value && !props.readonly && !props.showPassword;\n });\n const textLength = computed(() => {\n return Array.from(nativeInputValue.value).length;\n });\n const inputExceed = computed(() => {\n return isWordLimitVisible.value && textLength.value > Number(props.maxlength);\n });\n const resizeTextarea = () => {\n const { type, autosize } = props;\n if (isServer || type !== \"textarea\")\n return;\n if (autosize) {\n const minRows = isObject(autosize) ? autosize.minRows : void 0;\n const maxRows = isObject(autosize) ? autosize.maxRows : void 0;\n _textareaCalcStyle.value = __spreadValues(__spreadValues({}, props.inputStyle), calcTextareaHeight(textarea.value, minRows, maxRows));\n } else {\n _textareaCalcStyle.value = __spreadProps(__spreadValues({}, props.inputStyle), {\n minHeight: calcTextareaHeight(textarea.value).minHeight\n });\n }\n };\n const setNativeInputValue = () => {\n const input2 = inputOrTextarea.value;\n if (!input2 || input2.value === nativeInputValue.value)\n return;\n input2.value = nativeInputValue.value;\n };\n const calcIconOffset = (place) => {\n const { el } = instance.vnode;\n const elList = Array.from(el.querySelectorAll(`.el-input__${place}`));\n const target = elList.find((item) => item.parentNode === el);\n if (!target)\n return;\n const pendant = PENDANT_MAP[place];\n if (ctx.slots[pendant]) {\n target.style.transform = `translateX(${place === \"suffix\" ? \"-\" : \"\"}${el.querySelector(`.el-input-group__${pendant}`).offsetWidth}px)`;\n } else {\n target.removeAttribute(\"style\");\n }\n };\n const updateIconOffset = () => {\n calcIconOffset(\"prefix\");\n calcIconOffset(\"suffix\");\n };\n const handleInput = (event) => {\n let { value } = event.target;\n if (isComposing.value)\n return;\n if (value === nativeInputValue.value)\n return;\n if (props.maxlength) {\n const sliceIndex = inputExceed.value ? textLength.value : props.maxlength;\n value = Array.from(value).slice(0, Number(sliceIndex)).join(\"\");\n }\n ctx.emit(UPDATE_MODEL_EVENT, value);\n ctx.emit(\"input\", value);\n nextTick(setNativeInputValue);\n };\n const handleChange = (event) => {\n ctx.emit(\"change\", event.target.value);\n };\n const focus = () => {\n nextTick(() => {\n inputOrTextarea.value.focus();\n });\n };\n const blur = () => {\n inputOrTextarea.value.blur();\n };\n const handleFocus = (event) => {\n focused.value = true;\n ctx.emit(\"focus\", event);\n };\n const handleBlur = (event) => {\n var _a;\n focused.value = false;\n ctx.emit(\"blur\", event);\n if (props.validateEvent) {\n (_a = elFormItem.formItemMitt) == null ? void 0 : _a.emit(\"el.form.blur\", [props.modelValue]);\n }\n };\n const select = () => {\n inputOrTextarea.value.select();\n };\n const handleCompositionStart = () => {\n isComposing.value = true;\n };\n const handleCompositionUpdate = (event) => {\n const text = event.target.value;\n const lastCharacter = text[text.length - 1] || \"\";\n isComposing.value = !isKorean(lastCharacter);\n };\n const handleCompositionEnd = (event) => {\n if (isComposing.value) {\n isComposing.value = false;\n handleInput(event);\n }\n };\n const clear = () => {\n ctx.emit(UPDATE_MODEL_EVENT, \"\");\n ctx.emit(\"change\", \"\");\n ctx.emit(\"clear\");\n };\n const handlePasswordVisible = () => {\n passwordVisible.value = !passwordVisible.value;\n focus();\n };\n const getSuffixVisible = () => {\n return ctx.slots.suffix || props.suffixIcon || showClear.value || props.showPassword || isWordLimitVisible.value || validateState.value && needStatusIcon.value;\n };\n watch(() => props.modelValue, (val) => {\n var _a;\n nextTick(resizeTextarea);\n if (props.validateEvent) {\n (_a = elFormItem.formItemMitt) == null ? void 0 : _a.emit(\"el.form.change\", [val]);\n }\n });\n watch(nativeInputValue, () => {\n setNativeInputValue();\n });\n watch(() => props.type, () => {\n nextTick(() => {\n setNativeInputValue();\n resizeTextarea();\n updateIconOffset();\n });\n });\n onMounted(() => {\n setNativeInputValue();\n updateIconOffset();\n nextTick(resizeTextarea);\n });\n onUpdated(() => {\n nextTick(updateIconOffset);\n });\n const onMouseLeave = (e) => {\n hovering.value = false;\n ctx.emit(\"mouseleave\", e);\n };\n const onMouseEnter = (e) => {\n hovering.value = true;\n ctx.emit(\"mouseenter\", e);\n };\n const handleKeydown = (e) => {\n ctx.emit(\"keydown\", e);\n };\n return {\n input,\n textarea,\n attrs,\n inputSize,\n validateState,\n validateIcon,\n computedTextareaStyle,\n resizeTextarea,\n inputDisabled,\n showClear,\n showPwdVisible,\n isWordLimitVisible,\n textLength,\n hovering,\n inputExceed,\n passwordVisible,\n inputOrTextarea,\n handleInput,\n handleChange,\n handleFocus,\n handleBlur,\n handleCompositionStart,\n handleCompositionUpdate,\n handleCompositionEnd,\n handlePasswordVisible,\n clear,\n select,\n focus,\n blur,\n getSuffixVisible,\n onMouseLeave,\n onMouseEnter,\n handleKeydown\n };\n }\n});\n\nconst _hoisted_1 = {\n key: 0,\n class: \"el-input-group__prepend\"\n};\nconst _hoisted_2 = {\n key: 2,\n class: \"el-input__prefix\"\n};\nconst _hoisted_3 = {\n key: 3,\n class: \"el-input__suffix\"\n};\nconst _hoisted_4 = { class: \"el-input__suffix-inner\" };\nconst _hoisted_5 = {\n key: 3,\n class: \"el-input__count\"\n};\nconst _hoisted_6 = { class: \"el-input__count-inner\" };\nconst _hoisted_7 = {\n key: 4,\n class: \"el-input-group__append\"\n};\nconst _hoisted_8 = {\n key: 2,\n class: \"el-input__count\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", {\n class: [\n _ctx.type === \"textarea\" ? \"el-textarea\" : \"el-input\",\n _ctx.inputSize ? \"el-input--\" + _ctx.inputSize : \"\",\n {\n \"is-disabled\": _ctx.inputDisabled,\n \"is-exceed\": _ctx.inputExceed,\n \"el-input-group\": _ctx.$slots.prepend || _ctx.$slots.append,\n \"el-input-group--append\": _ctx.$slots.append,\n \"el-input-group--prepend\": _ctx.$slots.prepend,\n \"el-input--prefix\": _ctx.$slots.prefix || _ctx.prefixIcon,\n \"el-input--suffix\": _ctx.$slots.suffix || _ctx.suffixIcon || _ctx.clearable || _ctx.showPassword,\n \"el-input--suffix--password-clear\": _ctx.clearable && _ctx.showPassword\n },\n _ctx.$attrs.class\n ],\n style: _ctx.$attrs.style,\n onMouseenter: _cache[20] || (_cache[20] = (...args) => _ctx.onMouseEnter && _ctx.onMouseEnter(...args)),\n onMouseleave: _cache[21] || (_cache[21] = (...args) => _ctx.onMouseLeave && _ctx.onMouseLeave(...args))\n }, [\n _ctx.type !== \"textarea\" ? (openBlock(), createBlock(Fragment, { key: 0 }, [\n createCommentVNode(\" \\u524D\\u7F6E\\u5143\\u7D20 \"),\n _ctx.$slots.prepend ? (openBlock(), createBlock(\"div\", _hoisted_1, [\n renderSlot(_ctx.$slots, \"prepend\")\n ])) : createCommentVNode(\"v-if\", true),\n _ctx.type !== \"textarea\" ? (openBlock(), createBlock(\"input\", mergeProps({\n key: 1,\n ref: \"input\",\n class: \"el-input__inner\"\n }, _ctx.attrs, {\n type: _ctx.showPassword ? _ctx.passwordVisible ? \"text\" : \"password\" : _ctx.type,\n disabled: _ctx.inputDisabled,\n readonly: _ctx.readonly,\n autocomplete: _ctx.autocomplete,\n tabindex: _ctx.tabindex,\n \"aria-label\": _ctx.label,\n placeholder: _ctx.placeholder,\n style: _ctx.inputStyle,\n onCompositionstart: _cache[1] || (_cache[1] = (...args) => _ctx.handleCompositionStart && _ctx.handleCompositionStart(...args)),\n onCompositionupdate: _cache[2] || (_cache[2] = (...args) => _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate(...args)),\n onCompositionend: _cache[3] || (_cache[3] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args)),\n onInput: _cache[4] || (_cache[4] = (...args) => _ctx.handleInput && _ctx.handleInput(...args)),\n onFocus: _cache[5] || (_cache[5] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),\n onBlur: _cache[6] || (_cache[6] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)),\n onChange: _cache[7] || (_cache[7] = (...args) => _ctx.handleChange && _ctx.handleChange(...args)),\n onKeydown: _cache[8] || (_cache[8] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args))\n }), null, 16, [\"type\", \"disabled\", \"readonly\", \"autocomplete\", \"tabindex\", \"aria-label\", \"placeholder\"])) : createCommentVNode(\"v-if\", true),\n createCommentVNode(\" \\u524D\\u7F6E\\u5185\\u5BB9 \"),\n _ctx.$slots.prefix || _ctx.prefixIcon ? (openBlock(), createBlock(\"span\", _hoisted_2, [\n renderSlot(_ctx.$slots, \"prefix\"),\n _ctx.prefixIcon ? (openBlock(), createBlock(\"i\", {\n key: 0,\n class: [\"el-input__icon\", _ctx.prefixIcon]\n }, null, 2)) : createCommentVNode(\"v-if\", true)\n ])) : createCommentVNode(\"v-if\", true),\n createCommentVNode(\" \\u540E\\u7F6E\\u5185\\u5BB9 \"),\n _ctx.getSuffixVisible() ? (openBlock(), createBlock(\"span\", _hoisted_3, [\n createVNode(\"span\", _hoisted_4, [\n !_ctx.showClear || !_ctx.showPwdVisible || !_ctx.isWordLimitVisible ? (openBlock(), createBlock(Fragment, { key: 0 }, [\n renderSlot(_ctx.$slots, \"suffix\"),\n _ctx.suffixIcon ? (openBlock(), createBlock(\"i\", {\n key: 0,\n class: [\"el-input__icon\", _ctx.suffixIcon]\n }, null, 2)) : createCommentVNode(\"v-if\", true)\n ], 64)) : createCommentVNode(\"v-if\", true),\n _ctx.showClear ? (openBlock(), createBlock(\"i\", {\n key: 1,\n class: \"el-input__icon el-icon-circle-close el-input__clear\",\n onMousedown: _cache[9] || (_cache[9] = withModifiers(() => {\n }, [\"prevent\"])),\n onClick: _cache[10] || (_cache[10] = (...args) => _ctx.clear && _ctx.clear(...args))\n }, null, 32)) : createCommentVNode(\"v-if\", true),\n _ctx.showPwdVisible ? (openBlock(), createBlock(\"i\", {\n key: 2,\n class: \"el-input__icon el-icon-view el-input__clear\",\n onClick: _cache[11] || (_cache[11] = (...args) => _ctx.handlePasswordVisible && _ctx.handlePasswordVisible(...args))\n })) : createCommentVNode(\"v-if\", true),\n _ctx.isWordLimitVisible ? (openBlock(), createBlock(\"span\", _hoisted_5, [\n createVNode(\"span\", _hoisted_6, toDisplayString(_ctx.textLength) + \"/\" + toDisplayString(_ctx.maxlength), 1)\n ])) : createCommentVNode(\"v-if\", true)\n ]),\n _ctx.validateState ? (openBlock(), createBlock(\"i\", {\n key: 0,\n class: [\"el-input__icon\", \"el-input__validateIcon\", _ctx.validateIcon]\n }, null, 2)) : createCommentVNode(\"v-if\", true)\n ])) : createCommentVNode(\"v-if\", true),\n createCommentVNode(\" \\u540E\\u7F6E\\u5143\\u7D20 \"),\n _ctx.$slots.append ? (openBlock(), createBlock(\"div\", _hoisted_7, [\n renderSlot(_ctx.$slots, \"append\")\n ])) : createCommentVNode(\"v-if\", true)\n ], 64)) : (openBlock(), createBlock(\"textarea\", mergeProps({\n key: 1,\n ref: \"textarea\",\n class: \"el-textarea__inner\"\n }, _ctx.attrs, {\n tabindex: _ctx.tabindex,\n disabled: _ctx.inputDisabled,\n readonly: _ctx.readonly,\n autocomplete: _ctx.autocomplete,\n style: _ctx.computedTextareaStyle,\n \"aria-label\": _ctx.label,\n placeholder: _ctx.placeholder,\n onCompositionstart: _cache[12] || (_cache[12] = (...args) => _ctx.handleCompositionStart && _ctx.handleCompositionStart(...args)),\n onCompositionupdate: _cache[13] || (_cache[13] = (...args) => _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate(...args)),\n onCompositionend: _cache[14] || (_cache[14] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args)),\n onInput: _cache[15] || (_cache[15] = (...args) => _ctx.handleInput && _ctx.handleInput(...args)),\n onFocus: _cache[16] || (_cache[16] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),\n onBlur: _cache[17] || (_cache[17] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)),\n onChange: _cache[18] || (_cache[18] = (...args) => _ctx.handleChange && _ctx.handleChange(...args)),\n onKeydown: _cache[19] || (_cache[19] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args))\n }), \"\\n \", 16, [\"tabindex\", \"disabled\", \"readonly\", \"autocomplete\", \"aria-label\", \"placeholder\"])),\n _ctx.isWordLimitVisible && _ctx.type === \"textarea\" ? (openBlock(), createBlock(\"span\", _hoisted_8, toDisplayString(_ctx.textLength) + \"/\" + toDisplayString(_ctx.maxlength), 1)) : createCommentVNode(\"v-if\", true)\n ], 38);\n}\n\nscript.render = render;\nscript.__file = \"packages/input/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Input = script;\n\nexport default _Input;\n","import { addResizeListener, removeResizeListener } from '../utils/resize-event';\nimport { isArray, toObject, addUnit, isString, isNumber } from '../utils/util';\nimport { defineComponent, ref, inject, computed, onMounted, onBeforeUnmount, openBlock, createBlock, Transition, withCtx, withDirectives, createVNode, vShow, provide, nextTick, resolveComponent, resolveDynamicComponent, renderSlot, Fragment, createCommentVNode } from 'vue';\nimport { on, off } from '../utils/dom';\nimport { warn } from '../utils/error';\n\nconst BAR_MAP = {\n vertical: {\n offset: \"offsetHeight\",\n scroll: \"scrollTop\",\n scrollSize: \"scrollHeight\",\n size: \"height\",\n key: \"vertical\",\n axis: \"Y\",\n client: \"clientY\",\n direction: \"top\"\n },\n horizontal: {\n offset: \"offsetWidth\",\n scroll: \"scrollLeft\",\n scrollSize: \"scrollWidth\",\n size: \"width\",\n key: \"horizontal\",\n axis: \"X\",\n client: \"clientX\",\n direction: \"left\"\n }\n};\nfunction renderThumbStyle({ move, size, bar }) {\n const style = {};\n const translate = `translate${bar.axis}(${move}%)`;\n style[bar.size] = size;\n style.transform = translate;\n style.msTransform = translate;\n style.webkitTransform = translate;\n return style;\n}\n\nvar script = defineComponent({\n name: \"Bar\",\n props: {\n vertical: Boolean,\n size: String,\n move: Number,\n always: Boolean\n },\n setup(props) {\n const instance = ref(null);\n const thumb = ref(null);\n const scrollbar = inject(\"scrollbar\", {});\n const wrap = inject(\"scrollbar-wrap\", {});\n const bar = computed(() => BAR_MAP[props.vertical ? \"vertical\" : \"horizontal\"]);\n const barStore = ref({});\n const cursorDown = ref(null);\n const cursorLeave = ref(null);\n const visible = ref(false);\n let onselectstartStore = null;\n const clickThumbHandler = (e) => {\n e.stopPropagation();\n if (e.ctrlKey || [1, 2].includes(e.button)) {\n return;\n }\n window.getSelection().removeAllRanges();\n startDrag(e);\n barStore.value[bar.value.axis] = e.currentTarget[bar.value.offset] - (e[bar.value.client] - e.currentTarget.getBoundingClientRect()[bar.value.direction]);\n };\n const clickTrackHandler = (e) => {\n const offset = Math.abs(e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]);\n const thumbHalf = thumb.value[bar.value.offset] / 2;\n const thumbPositionPercentage = (offset - thumbHalf) * 100 / instance.value[bar.value.offset];\n wrap.value[bar.value.scroll] = thumbPositionPercentage * wrap.value[bar.value.scrollSize] / 100;\n };\n const startDrag = (e) => {\n e.stopImmediatePropagation();\n cursorDown.value = true;\n on(document, \"mousemove\", mouseMoveDocumentHandler);\n on(document, \"mouseup\", mouseUpDocumentHandler);\n onselectstartStore = document.onselectstart;\n document.onselectstart = () => false;\n };\n const mouseMoveDocumentHandler = (e) => {\n if (cursorDown.value === false)\n return;\n const prevPage = barStore.value[bar.value.axis];\n if (!prevPage)\n return;\n const offset = (instance.value.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) * -1;\n const thumbClickPosition = thumb.value[bar.value.offset] - prevPage;\n const thumbPositionPercentage = (offset - thumbClickPosition) * 100 / instance.value[bar.value.offset];\n wrap.value[bar.value.scroll] = thumbPositionPercentage * wrap.value[bar.value.scrollSize] / 100;\n };\n const mouseUpDocumentHandler = () => {\n cursorDown.value = false;\n barStore.value[bar.value.axis] = 0;\n off(document, \"mousemove\", mouseMoveDocumentHandler);\n document.onselectstart = onselectstartStore;\n if (cursorLeave.value) {\n visible.value = false;\n }\n };\n const thumbStyle = computed(() => renderThumbStyle({\n size: props.size,\n move: props.move,\n bar: bar.value\n }));\n const mouseMoveScrollbarHandler = () => {\n cursorLeave.value = false;\n visible.value = !!props.size;\n };\n const mouseLeaveScrollbarHandler = () => {\n cursorLeave.value = true;\n visible.value = cursorDown.value;\n };\n onMounted(() => {\n on(scrollbar.value, \"mousemove\", mouseMoveScrollbarHandler);\n on(scrollbar.value, \"mouseleave\", mouseLeaveScrollbarHandler);\n });\n onBeforeUnmount(() => {\n off(document, \"mouseup\", mouseUpDocumentHandler);\n off(scrollbar.value, \"mousemove\", mouseMoveScrollbarHandler);\n off(scrollbar.value, \"mouseleave\", mouseLeaveScrollbarHandler);\n });\n return {\n instance,\n thumb,\n bar,\n clickTrackHandler,\n clickThumbHandler,\n thumbStyle,\n visible\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(Transition, { name: \"el-scrollbar-fade\" }, {\n default: withCtx(() => [\n withDirectives(createVNode(\"div\", {\n ref: \"instance\",\n class: [\"el-scrollbar__bar\", \"is-\" + _ctx.bar.key],\n onMousedown: _cache[2] || (_cache[2] = (...args) => _ctx.clickTrackHandler && _ctx.clickTrackHandler(...args))\n }, [\n createVNode(\"div\", {\n ref: \"thumb\",\n class: \"el-scrollbar__thumb\",\n style: _ctx.thumbStyle,\n onMousedown: _cache[1] || (_cache[1] = (...args) => _ctx.clickThumbHandler && _ctx.clickThumbHandler(...args))\n }, null, 36)\n ], 34), [\n [vShow, _ctx.always || _ctx.visible]\n ])\n ]),\n _: 1\n });\n}\n\nscript.render = render;\nscript.__file = \"packages/scrollbar/src/bar.vue\";\n\nvar script$1 = defineComponent({\n name: \"ElScrollbar\",\n components: { Bar: script },\n props: {\n height: {\n type: [String, Number],\n default: \"\"\n },\n maxHeight: {\n type: [String, Number],\n default: \"\"\n },\n native: {\n type: Boolean,\n default: false\n },\n wrapStyle: {\n type: [String, Array],\n default: \"\"\n },\n wrapClass: {\n type: [String, Array],\n default: \"\"\n },\n viewClass: {\n type: [String, Array],\n default: \"\"\n },\n viewStyle: {\n type: [String, Array],\n default: \"\"\n },\n noresize: Boolean,\n tag: {\n type: String,\n default: \"div\"\n },\n always: {\n type: Boolean,\n default: false\n }\n },\n emits: [\"scroll\"],\n setup(props, { emit }) {\n const sizeWidth = ref(\"0\");\n const sizeHeight = ref(\"0\");\n const moveX = ref(0);\n const moveY = ref(0);\n const scrollbar = ref(null);\n const wrap = ref(null);\n const resize = ref(null);\n const SCOPE = \"ElScrollbar\";\n provide(\"scrollbar\", scrollbar);\n provide(\"scrollbar-wrap\", wrap);\n const handleScroll = () => {\n if (wrap.value) {\n moveY.value = wrap.value.scrollTop * 100 / wrap.value.clientHeight;\n moveX.value = wrap.value.scrollLeft * 100 / wrap.value.clientWidth;\n emit(\"scroll\", {\n scrollLeft: moveX.value,\n scrollTop: moveY.value\n });\n }\n };\n const setScrollTop = (value) => {\n if (!isNumber(value)) {\n if (process.env.NODE_ENV !== \"production\") {\n warn(SCOPE, \"value must be a number\");\n }\n return;\n }\n wrap.value.scrollTop = value;\n };\n const setScrollLeft = (value) => {\n if (!isNumber(value)) {\n if (process.env.NODE_ENV !== \"production\") {\n warn(SCOPE, \"value must be a number\");\n }\n return;\n }\n wrap.value.scrollLeft = value;\n };\n const update = () => {\n if (!wrap.value)\n return;\n const heightPercentage = wrap.value.clientHeight * 100 / wrap.value.scrollHeight;\n const widthPercentage = wrap.value.clientWidth * 100 / wrap.value.scrollWidth;\n sizeHeight.value = heightPercentage < 100 ? heightPercentage + \"%\" : \"\";\n sizeWidth.value = widthPercentage < 100 ? widthPercentage + \"%\" : \"\";\n };\n const style = computed(() => {\n let style2 = props.wrapStyle;\n if (isArray(style2)) {\n style2 = toObject(style2);\n style2.height = addUnit(props.height);\n style2.maxHeight = addUnit(props.maxHeight);\n } else if (isString(style2)) {\n style2 += addUnit(props.height) ? `height: ${addUnit(props.height)};` : \"\";\n style2 += addUnit(props.maxHeight) ? `max-height: ${addUnit(props.maxHeight)};` : \"\";\n }\n return style2;\n });\n onMounted(() => {\n if (!props.native) {\n nextTick(update);\n }\n if (!props.noresize) {\n addResizeListener(resize.value, update);\n addEventListener(\"resize\", update);\n }\n });\n onBeforeUnmount(() => {\n if (!props.noresize) {\n removeResizeListener(resize.value, update);\n removeEventListener(\"resize\", update);\n }\n });\n return {\n moveX,\n moveY,\n sizeWidth,\n sizeHeight,\n style,\n scrollbar,\n wrap,\n resize,\n update,\n handleScroll,\n setScrollTop,\n setScrollLeft\n };\n }\n});\n\nconst _hoisted_1 = {\n ref: \"scrollbar\",\n class: \"el-scrollbar\"\n};\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_bar = resolveComponent(\"bar\");\n return openBlock(), createBlock(\"div\", _hoisted_1, [\n createVNode(\"div\", {\n ref: \"wrap\",\n class: [\n _ctx.wrapClass,\n \"el-scrollbar__wrap\",\n _ctx.native ? \"\" : \"el-scrollbar__wrap--hidden-default\"\n ],\n style: _ctx.style,\n onScroll: _cache[1] || (_cache[1] = (...args) => _ctx.handleScroll && _ctx.handleScroll(...args))\n }, [\n (openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {\n ref: \"resize\",\n class: [\"el-scrollbar__view\", _ctx.viewClass],\n style: _ctx.viewStyle\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"class\", \"style\"]))\n ], 38),\n !_ctx.native ? (openBlock(), createBlock(Fragment, { key: 0 }, [\n createVNode(_component_bar, {\n move: _ctx.moveX,\n size: _ctx.sizeWidth,\n always: _ctx.always\n }, null, 8, [\"move\", \"size\", \"always\"]),\n createVNode(_component_bar, {\n move: _ctx.moveY,\n size: _ctx.sizeHeight,\n vertical: \"\",\n always: _ctx.always\n }, null, 8, [\"move\", \"size\", \"always\"])\n ], 64)) : createCommentVNode(\"v-if\", true)\n ], 512);\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"packages/scrollbar/src/index.vue\";\n\nscript$1.install = (app) => {\n app.component(script$1.name, script$1);\n};\nconst _Scrollbar = script$1;\n\nexport default _Scrollbar;\n","import { computed, ref, reactive, watch, h, Transition, withCtx, withDirectives, vShow, cloneVNode, Comment, defineComponent, onMounted, onBeforeUnmount, onActivated, onDeactivated, renderSlot, toDisplayString, Fragment, Teleport } from 'vue';\nimport throwError from '../utils/error';\nimport { createPopper } from '@popperjs/core';\nimport { generateId, isBool, isArray, isString, $, isHTMLElement } from '../utils/util';\nimport PopupManager from '../utils/popup-manager';\nimport { stop } from '../utils/dom';\nimport { getFirstValidNode } from '../utils/vnode';\nimport { ClickOutside } from '../directives';\n\nfunction buildModifier(props, externalModifiers = []) {\n const {\n arrow,\n arrowOffset,\n offset,\n gpuAcceleration,\n fallbackPlacements\n } = props;\n const modifiers = [\n {\n name: \"offset\",\n options: {\n offset: [0, offset != null ? offset : 12]\n }\n },\n {\n name: \"preventOverflow\",\n options: {\n padding: {\n top: 2,\n bottom: 2,\n left: 5,\n right: 5\n }\n }\n },\n {\n name: \"flip\",\n options: {\n padding: 5,\n fallbackPlacements: fallbackPlacements != null ? fallbackPlacements : []\n }\n },\n {\n name: \"computeStyles\",\n options: {\n gpuAcceleration,\n adaptive: gpuAcceleration\n }\n }\n ];\n if (arrow) {\n modifiers.push({\n name: \"arrow\",\n options: {\n element: arrow,\n padding: arrowOffset != null ? arrowOffset : 5\n }\n });\n }\n modifiers.push(...externalModifiers);\n return modifiers;\n}\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction usePopperOptions(props, state) {\n return computed(() => {\n var _a;\n return __spreadProps(__spreadValues({\n placement: props.placement\n }, props.popperOptions), {\n modifiers: buildModifier({\n arrow: state.arrow.value,\n arrowOffset: props.arrowOffset,\n offset: props.offset,\n gpuAcceleration: props.gpuAcceleration,\n fallbackPlacements: props.fallbackPlacements\n }, (_a = props.popperOptions) == null ? void 0 : _a.modifiers)\n });\n });\n}\n\nvar Effect;\n(function(Effect2) {\n Effect2[\"DARK\"] = \"dark\";\n Effect2[\"LIGHT\"] = \"light\";\n})(Effect || (Effect = {}));\nconst DEFAULT_TRIGGER = \"hover\";\nconst DEFAULT_FALLBACK_PLACEMENTS = [];\nvar defaultProps = {\n arrowOffset: {\n type: Number,\n default: 5\n },\n appendToBody: {\n type: Boolean,\n default: true\n },\n autoClose: {\n type: Number,\n default: 0\n },\n boundariesPadding: {\n type: Number,\n default: 0\n },\n content: {\n type: String,\n default: \"\"\n },\n class: {\n type: String,\n default: \"\"\n },\n style: Object,\n hideAfter: {\n type: Number,\n default: 200\n },\n cutoff: {\n type: Boolean,\n default: false\n },\n disabled: {\n type: Boolean,\n default: false\n },\n effect: {\n type: String,\n default: Effect.DARK\n },\n enterable: {\n type: Boolean,\n default: true\n },\n manualMode: {\n type: Boolean,\n default: false\n },\n showAfter: {\n type: Number,\n default: 0\n },\n offset: {\n type: Number,\n default: 12\n },\n placement: {\n type: String,\n default: \"bottom\"\n },\n popperClass: {\n type: String,\n default: \"\"\n },\n pure: {\n type: Boolean,\n default: false\n },\n popperOptions: {\n type: Object,\n default: () => null\n },\n showArrow: {\n type: Boolean,\n default: true\n },\n strategy: {\n type: String,\n default: \"fixed\"\n },\n transition: {\n type: String,\n default: \"el-fade-in-linear\"\n },\n trigger: {\n type: [String, Array],\n default: DEFAULT_TRIGGER\n },\n visible: {\n type: Boolean,\n default: void 0\n },\n stopPopperMouseEvent: {\n type: Boolean,\n default: true\n },\n gpuAcceleration: {\n type: Boolean,\n default: true\n },\n fallbackPlacements: {\n type: Array,\n default: DEFAULT_FALLBACK_PLACEMENTS\n }\n};\n\nconst UPDATE_VISIBLE_EVENT = \"update:visible\";\nfunction usePopper(props, { emit }) {\n const arrowRef = ref(null);\n const triggerRef = ref(null);\n const popperRef = ref(null);\n const popperId = `el-popper-${generateId()}`;\n let popperInstance = null;\n let showTimer = null;\n let hideTimer = null;\n let triggerFocused = false;\n const isManualMode = () => props.manualMode || props.trigger === \"manual\";\n const popperStyle = ref({ zIndex: PopupManager.nextZIndex() });\n const popperOptions = usePopperOptions(props, {\n arrow: arrowRef\n });\n const state = reactive({\n visible: !!props.visible\n });\n const visibility = computed({\n get() {\n if (props.disabled) {\n return false;\n } else {\n return isBool(props.visible) ? props.visible : state.visible;\n }\n },\n set(val) {\n if (isManualMode())\n return;\n isBool(props.visible) ? emit(UPDATE_VISIBLE_EVENT, val) : state.visible = val;\n }\n });\n function _show() {\n if (props.autoClose > 0) {\n hideTimer = window.setTimeout(() => {\n _hide();\n }, props.autoClose);\n }\n visibility.value = true;\n }\n function _hide() {\n visibility.value = false;\n }\n function clearTimers() {\n clearTimeout(showTimer);\n clearTimeout(hideTimer);\n }\n const show = () => {\n if (isManualMode() || props.disabled)\n return;\n clearTimers();\n if (props.showAfter === 0) {\n _show();\n } else {\n showTimer = window.setTimeout(() => {\n _show();\n }, props.showAfter);\n }\n };\n const hide = () => {\n if (isManualMode())\n return;\n clearTimers();\n if (props.hideAfter > 0) {\n hideTimer = window.setTimeout(() => {\n close();\n }, props.hideAfter);\n } else {\n close();\n }\n };\n const close = () => {\n _hide();\n if (props.disabled) {\n doDestroy(true);\n }\n };\n function onPopperMouseEnter() {\n if (props.enterable && props.trigger !== \"click\") {\n clearTimeout(hideTimer);\n }\n }\n function onPopperMouseLeave() {\n const { trigger } = props;\n const shouldPrevent = isString(trigger) && (trigger === \"click\" || trigger === \"focus\") || trigger.length === 1 && (trigger[0] === \"click\" || trigger[0] === \"focus\");\n if (shouldPrevent)\n return;\n hide();\n }\n function initializePopper() {\n if (!$(visibility)) {\n return;\n }\n const unwrappedTrigger = $(triggerRef);\n const _trigger = isHTMLElement(unwrappedTrigger) ? unwrappedTrigger : unwrappedTrigger.$el;\n popperInstance = createPopper(_trigger, $(popperRef), $(popperOptions));\n popperInstance.update();\n }\n function doDestroy(forceDestroy) {\n if (!popperInstance || $(visibility) && !forceDestroy)\n return;\n detachPopper();\n }\n function detachPopper() {\n var _a;\n (_a = popperInstance == null ? void 0 : popperInstance.destroy) == null ? void 0 : _a.call(popperInstance);\n popperInstance = null;\n }\n const events = {};\n function update() {\n if (!$(visibility)) {\n return;\n }\n if (popperInstance) {\n popperInstance.update();\n } else {\n initializePopper();\n }\n }\n function onVisibilityChange(toState) {\n if (toState) {\n popperStyle.value.zIndex = PopupManager.nextZIndex();\n initializePopper();\n }\n }\n if (!isManualMode()) {\n const toggleState = () => {\n if ($(visibility)) {\n hide();\n } else {\n show();\n }\n };\n const popperEventsHandler = (e) => {\n e.stopPropagation();\n switch (e.type) {\n case \"click\": {\n if (triggerFocused) {\n triggerFocused = false;\n } else {\n toggleState();\n }\n break;\n }\n case \"mouseenter\": {\n show();\n break;\n }\n case \"mouseleave\": {\n hide();\n break;\n }\n case \"focus\": {\n triggerFocused = true;\n show();\n break;\n }\n case \"blur\": {\n triggerFocused = false;\n hide();\n break;\n }\n }\n };\n const triggerEventsMap = {\n click: [\"onClick\"],\n hover: [\"onMouseenter\", \"onMouseleave\"],\n focus: [\"onFocus\", \"onBlur\"]\n };\n const mapEvents = (t) => {\n triggerEventsMap[t].forEach((event) => {\n events[event] = popperEventsHandler;\n });\n };\n if (isArray(props.trigger)) {\n Object.values(props.trigger).forEach(mapEvents);\n } else {\n mapEvents(props.trigger);\n }\n }\n watch(popperOptions, (val) => {\n if (!popperInstance)\n return;\n popperInstance.setOptions(val);\n popperInstance.update();\n });\n watch(visibility, onVisibilityChange);\n return {\n update,\n doDestroy,\n show,\n hide,\n onPopperMouseEnter,\n onPopperMouseLeave,\n onAfterEnter: () => {\n emit(\"after-enter\");\n },\n onAfterLeave: () => {\n detachPopper();\n emit(\"after-leave\");\n },\n onBeforeEnter: () => {\n emit(\"before-enter\");\n },\n onBeforeLeave: () => {\n emit(\"before-leave\");\n },\n initializePopper,\n isManualMode,\n arrowRef,\n events,\n popperId,\n popperInstance,\n popperRef,\n popperStyle,\n triggerRef,\n visibility\n };\n}\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst NOOP = () => { };\n\nfunction renderPopper(props, children) {\n const {\n effect,\n name,\n stopPopperMouseEvent,\n popperClass,\n popperStyle,\n popperRef,\n pure,\n popperId,\n visibility,\n onMouseenter,\n onMouseleave,\n onAfterEnter,\n onAfterLeave,\n onBeforeEnter,\n onBeforeLeave\n } = props;\n const kls = [\n popperClass,\n \"el-popper\",\n \"is-\" + effect,\n pure ? \"is-pure\" : \"\"\n ];\n const mouseUpAndDown = stopPopperMouseEvent ? stop : NOOP;\n return h(Transition, {\n name,\n \"onAfterEnter\": onAfterEnter,\n \"onAfterLeave\": onAfterLeave,\n \"onBeforeEnter\": onBeforeEnter,\n \"onBeforeLeave\": onBeforeLeave\n }, {\n default: withCtx(() => [withDirectives(h(\"div\", {\n \"aria-hidden\": String(!visibility),\n class: kls,\n style: popperStyle != null ? popperStyle : {},\n id: popperId,\n ref: popperRef != null ? popperRef : \"popperRef\",\n role: \"tooltip\",\n onMouseenter,\n onMouseleave,\n onClick: stop,\n onMousedown: mouseUpAndDown,\n onMouseup: mouseUpAndDown\n }, children), [[vShow, visibility]])])\n });\n}\n\nfunction renderTrigger(trigger, extraProps) {\n const firstElement = getFirstValidNode(trigger, 1);\n if (!firstElement)\n throwError(\"renderTrigger\", \"trigger expects single rooted node\");\n return cloneVNode(firstElement, extraProps, true);\n}\n\nfunction renderArrow(showArrow) {\n return showArrow ? h(\"div\", {\n ref: \"arrowRef\",\n class: \"el-popper__arrow\",\n \"data-popper-arrow\": \"\"\n }, null) : h(Comment, null, \"\");\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nconst compName = \"ElPopper\";\nconst UPDATE_VISIBLE_EVENT$1 = \"update:visible\";\nvar script = defineComponent({\n name: compName,\n props: defaultProps,\n emits: [UPDATE_VISIBLE_EVENT$1, \"after-enter\", \"after-leave\", \"before-enter\", \"before-leave\"],\n setup(props, ctx) {\n if (!ctx.slots.trigger) {\n throwError(compName, \"Trigger must be provided\");\n }\n const popperStates = usePopper(props, ctx);\n const forceDestroy = () => popperStates.doDestroy(true);\n onMounted(popperStates.initializePopper);\n onBeforeUnmount(forceDestroy);\n onActivated(popperStates.initializePopper);\n onDeactivated(forceDestroy);\n return popperStates;\n },\n render() {\n var _a;\n const {\n $slots,\n appendToBody,\n class: kls,\n style,\n effect,\n hide,\n onPopperMouseEnter,\n onPopperMouseLeave,\n onAfterEnter,\n onAfterLeave,\n onBeforeEnter,\n onBeforeLeave,\n popperClass,\n popperId,\n popperStyle,\n pure,\n showArrow,\n transition,\n visibility,\n stopPopperMouseEvent\n } = this;\n const isManual = this.isManualMode();\n const arrow = renderArrow(showArrow);\n const popper = renderPopper({\n effect,\n name: transition,\n popperClass,\n popperId,\n popperStyle,\n pure,\n stopPopperMouseEvent,\n onMouseenter: onPopperMouseEnter,\n onMouseleave: onPopperMouseLeave,\n onAfterEnter,\n onAfterLeave,\n onBeforeEnter,\n onBeforeLeave,\n visibility\n }, [\n renderSlot($slots, \"default\", {}, () => {\n return [toDisplayString(this.content)];\n }),\n arrow\n ]);\n const _t = (_a = $slots.trigger) == null ? void 0 : _a.call($slots);\n const triggerProps = __spreadValues$1({\n \"aria-describedby\": popperId,\n class: kls,\n style,\n ref: \"triggerRef\"\n }, this.events);\n const trigger = isManual ? renderTrigger(_t, triggerProps) : withDirectives(renderTrigger(_t, triggerProps), [[ClickOutside, hide]]);\n return h(Fragment, null, [\n trigger,\n h(Teleport, {\n to: \"body\",\n disabled: !appendToBody\n }, [popper])\n ]);\n }\n});\n\nscript.__file = \"packages/popper/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Popper = script;\n\nexport default _Popper;\nexport { Effect, defaultProps, renderArrow, renderPopper, renderTrigger, usePopper };\n","import { defineComponent, ref, computed, watch, onMounted, onUpdated, nextTick, resolveComponent, resolveDirective, openBlock, createBlock, withCtx, withDirectives, createVNode, mergeProps, withKeys, withModifiers, createSlots, renderSlot, Fragment, renderList, createTextVNode, toDisplayString } from 'vue';\nimport { useAttrs } from '../hooks';\nimport debounce from 'lodash/debounce';\nimport { ClickOutside } from '../directives';\nimport { generateId, isArray } from '../utils/util';\nimport { UPDATE_MODEL_EVENT } from '../utils/constants';\nimport throwError from '../utils/error';\nimport ElInput from '../el-input';\nimport ElScrollbar from '../el-scrollbar';\nimport ElPopper from '../el-popper';\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst NOOP = () => { };\n\nvar script = defineComponent({\n name: \"ElAutocomplete\",\n components: {\n ElPopper,\n ElInput,\n ElScrollbar\n },\n directives: {\n clickoutside: ClickOutside\n },\n inheritAttrs: false,\n props: {\n valueKey: {\n type: String,\n default: \"value\"\n },\n modelValue: {\n type: [String, Number],\n default: \"\"\n },\n debounce: {\n type: Number,\n default: 300\n },\n placement: {\n type: String,\n validator: (val) => {\n return [\"top\", \"top-start\", \"top-end\", \"bottom\", \"bottom-start\", \"bottom-end\"].includes(val);\n },\n default: \"bottom-start\"\n },\n fetchSuggestions: {\n type: Function,\n default: NOOP\n },\n popperClass: {\n type: String,\n default: \"\"\n },\n triggerOnFocus: {\n type: Boolean,\n default: true\n },\n selectWhenUnmatched: {\n type: Boolean,\n default: false\n },\n hideLoading: {\n type: Boolean,\n default: false\n },\n popperAppendToBody: {\n type: Boolean,\n default: true\n },\n highlightFirstItem: {\n type: Boolean,\n default: false\n }\n },\n emits: [UPDATE_MODEL_EVENT, \"input\", \"change\", \"focus\", \"blur\", \"clear\", \"select\"],\n setup(props, ctx) {\n const attrs = useAttrs();\n const suggestions = ref([]);\n const highlightedIndex = ref(-1);\n const dropdownWidth = ref(\"\");\n const activated = ref(false);\n const suggestionDisabled = ref(false);\n const loading = ref(false);\n const inputRef = ref(null);\n const regionRef = ref(null);\n const popper = ref(null);\n const id = computed(() => {\n return `el-autocomplete-${generateId()}`;\n });\n const suggestionVisible = computed(() => {\n const isValidData = isArray(suggestions.value) && suggestions.value.length > 0;\n return (isValidData || loading.value) && activated.value;\n });\n const suggestionLoading = computed(() => {\n return !props.hideLoading && loading.value;\n });\n const updatePopperPosition = () => {\n nextTick(popper.value.update);\n };\n watch(suggestionVisible, () => {\n dropdownWidth.value = `${inputRef.value.$el.offsetWidth}px`;\n });\n onMounted(() => {\n inputRef.value.inputOrTextarea.setAttribute(\"role\", \"textbox\");\n inputRef.value.inputOrTextarea.setAttribute(\"aria-autocomplete\", \"list\");\n inputRef.value.inputOrTextarea.setAttribute(\"aria-controls\", \"id\");\n inputRef.value.inputOrTextarea.setAttribute(\"aria-activedescendant\", `${id.value}-item-${highlightedIndex.value}`);\n const $ul = regionRef.value.querySelector(\".el-autocomplete-suggestion__list\");\n $ul.setAttribute(\"role\", \"listbox\");\n $ul.setAttribute(\"id\", id.value);\n });\n onUpdated(updatePopperPosition);\n const getData = (queryString) => {\n if (suggestionDisabled.value) {\n return;\n }\n loading.value = true;\n updatePopperPosition();\n props.fetchSuggestions(queryString, (suggestionsArg) => {\n loading.value = false;\n if (suggestionDisabled.value) {\n return;\n }\n if (isArray(suggestionsArg)) {\n suggestions.value = suggestionsArg;\n highlightedIndex.value = props.highlightFirstItem ? 0 : -1;\n } else {\n throwError(\"ElAutocomplete\", \"autocomplete suggestions must be an array\");\n }\n });\n };\n const debouncedGetData = debounce(getData, props.debounce);\n const handleInput = (value) => {\n ctx.emit(\"input\", value);\n ctx.emit(UPDATE_MODEL_EVENT, value);\n suggestionDisabled.value = false;\n if (!props.triggerOnFocus && !value) {\n suggestionDisabled.value = true;\n suggestions.value = [];\n return;\n }\n debouncedGetData(value);\n };\n const handleChange = (value) => {\n ctx.emit(\"change\", value);\n };\n const handleFocus = (e) => {\n activated.value = true;\n ctx.emit(\"focus\", e);\n if (props.triggerOnFocus) {\n debouncedGetData(props.modelValue);\n }\n };\n const handleBlur = (e) => {\n ctx.emit(\"blur\", e);\n };\n const handleClear = () => {\n activated.value = false;\n ctx.emit(UPDATE_MODEL_EVENT, \"\");\n ctx.emit(\"clear\");\n };\n const handleKeyEnter = () => {\n if (suggestionVisible.value && highlightedIndex.value >= 0 && highlightedIndex.value < suggestions.value.length) {\n select(suggestions.value[highlightedIndex.value]);\n } else if (props.selectWhenUnmatched) {\n ctx.emit(\"select\", { value: props.modelValue });\n nextTick(() => {\n suggestions.value = [];\n highlightedIndex.value = -1;\n });\n }\n };\n const close = () => {\n activated.value = false;\n };\n const focus = () => {\n inputRef.value.focus();\n };\n const select = (item) => {\n ctx.emit(\"input\", item[props.valueKey]);\n ctx.emit(UPDATE_MODEL_EVENT, item[props.valueKey]);\n ctx.emit(\"select\", item);\n nextTick(() => {\n suggestions.value = [];\n highlightedIndex.value = -1;\n });\n };\n const highlight = (index) => {\n if (!suggestionVisible.value || loading.value) {\n return;\n }\n if (index < 0) {\n highlightedIndex.value = -1;\n return;\n }\n if (index >= suggestions.value.length) {\n index = suggestions.value.length - 1;\n }\n const suggestion = regionRef.value.querySelector(\".el-autocomplete-suggestion__wrap\");\n const suggestionList = suggestion.querySelectorAll(\".el-autocomplete-suggestion__list li\");\n const highlightItem = suggestionList[index];\n const scrollTop = suggestion.scrollTop;\n const { offsetTop, scrollHeight } = highlightItem;\n if (offsetTop + scrollHeight > scrollTop + suggestion.clientHeight) {\n suggestion.scrollTop += scrollHeight;\n }\n if (offsetTop < scrollTop) {\n suggestion.scrollTop -= scrollHeight;\n }\n highlightedIndex.value = index;\n inputRef.value.inputOrTextarea.setAttribute(\"aria-activedescendant\", `${id.value}-item-${highlightedIndex.value}`);\n };\n return {\n attrs,\n suggestions,\n highlightedIndex,\n dropdownWidth,\n activated,\n suggestionDisabled,\n loading,\n inputRef,\n regionRef,\n popper,\n id,\n suggestionVisible,\n suggestionLoading,\n getData,\n handleInput,\n handleChange,\n handleFocus,\n handleBlur,\n handleClear,\n handleKeyEnter,\n close,\n focus,\n select,\n highlight\n };\n }\n});\n\nconst _hoisted_1 = { key: 0 };\nconst _hoisted_2 = /* @__PURE__ */ createVNode(\"i\", { class: \"el-icon-loading\" }, null, -1);\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_input = resolveComponent(\"el-input\");\n const _component_el_scrollbar = resolveComponent(\"el-scrollbar\");\n const _component_el_popper = resolveComponent(\"el-popper\");\n const _directive_clickoutside = resolveDirective(\"clickoutside\");\n return openBlock(), createBlock(_component_el_popper, {\n ref: \"popper\",\n visible: _ctx.suggestionVisible,\n \"onUpdate:visible\": _cache[3] || (_cache[3] = ($event) => _ctx.suggestionVisible = $event),\n placement: _ctx.placement,\n \"popper-class\": `el-autocomplete__popper ${_ctx.popperClass}`,\n \"append-to-body\": _ctx.popperAppendToBody,\n pure: \"\",\n \"manual-mode\": \"\",\n effect: \"light\",\n trigger: \"click\",\n transition: \"el-zoom-in-top\",\n \"gpu-acceleration\": false\n }, {\n trigger: withCtx(() => [\n withDirectives(createVNode(\"div\", {\n class: [\"el-autocomplete\", _ctx.$attrs.class],\n style: _ctx.$attrs.style,\n role: \"combobox\",\n \"aria-haspopup\": \"listbox\",\n \"aria-expanded\": _ctx.suggestionVisible,\n \"aria-owns\": _ctx.id\n }, [\n createVNode(_component_el_input, mergeProps({ ref: \"inputRef\" }, _ctx.attrs, {\n \"model-value\": _ctx.modelValue,\n onInput: _ctx.handleInput,\n onChange: _ctx.handleChange,\n onFocus: _ctx.handleFocus,\n onBlur: _ctx.handleBlur,\n onClear: _ctx.handleClear,\n onKeydown: [\n _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => _ctx.highlight(_ctx.highlightedIndex - 1), [\"prevent\"]), [\"up\"])),\n _cache[2] || (_cache[2] = withKeys(withModifiers(($event) => _ctx.highlight(_ctx.highlightedIndex + 1), [\"prevent\"]), [\"down\"])),\n withKeys(_ctx.handleKeyEnter, [\"enter\"]),\n withKeys(_ctx.close, [\"tab\"])\n ]\n }), createSlots({ _: 2 }, [\n _ctx.$slots.prepend ? {\n name: \"prepend\",\n fn: withCtx(() => [\n renderSlot(_ctx.$slots, \"prepend\")\n ])\n } : void 0,\n _ctx.$slots.append ? {\n name: \"append\",\n fn: withCtx(() => [\n renderSlot(_ctx.$slots, \"append\")\n ])\n } : void 0,\n _ctx.$slots.prefix ? {\n name: \"prefix\",\n fn: withCtx(() => [\n renderSlot(_ctx.$slots, \"prefix\")\n ])\n } : void 0,\n _ctx.$slots.suffix ? {\n name: \"suffix\",\n fn: withCtx(() => [\n renderSlot(_ctx.$slots, \"suffix\")\n ])\n } : void 0\n ]), 1040, [\"model-value\", \"onInput\", \"onChange\", \"onFocus\", \"onBlur\", \"onClear\", \"onKeydown\"])\n ], 14, [\"aria-expanded\", \"aria-owns\"]), [\n [_directive_clickoutside, _ctx.close]\n ])\n ]),\n default: withCtx(() => [\n createVNode(\"div\", {\n ref: \"regionRef\",\n class: [\"el-autocomplete-suggestion\", _ctx.suggestionLoading && \"is-loading\"],\n style: { width: _ctx.dropdownWidth, outline: \"none\" },\n role: \"region\"\n }, [\n createVNode(_component_el_scrollbar, {\n tag: \"ul\",\n \"wrap-class\": \"el-autocomplete-suggestion__wrap\",\n \"view-class\": \"el-autocomplete-suggestion__list\"\n }, {\n default: withCtx(() => [\n _ctx.suggestionLoading ? (openBlock(), createBlock(\"li\", _hoisted_1, [\n _hoisted_2\n ])) : (openBlock(true), createBlock(Fragment, { key: 1 }, renderList(_ctx.suggestions, (item, index) => {\n return openBlock(), createBlock(\"li\", {\n id: `${_ctx.id}-item-${index}`,\n key: index,\n class: { \"highlighted\": _ctx.highlightedIndex === index },\n role: \"option\",\n \"aria-selected\": _ctx.highlightedIndex === index,\n onClick: ($event) => _ctx.select(item)\n }, [\n renderSlot(_ctx.$slots, \"default\", { item }, () => [\n createTextVNode(toDisplayString(item[_ctx.valueKey]), 1)\n ])\n ], 10, [\"id\", \"aria-selected\", \"onClick\"]);\n }), 128))\n ]),\n _: 3\n })\n ], 6)\n ]),\n _: 1\n }, 8, [\"visible\", \"placement\", \"popper-class\", \"append-to-body\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/autocomplete/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Autocomplete = script;\n\nexport default _Autocomplete;\n","import { defineComponent, ref, toRef, watch, computed, openBlock, createBlock, renderSlot } from 'vue';\n\nconst ERROR_EVENT = \"error\";\nvar script = defineComponent({\n name: \"ElAvatar\",\n props: {\n size: {\n type: [Number, String],\n validator(val) {\n if (typeof val === \"string\") {\n return [\"large\", \"medium\", \"small\"].includes(val);\n }\n return typeof val === \"number\";\n },\n default: \"large\"\n },\n shape: {\n type: String,\n default: \"circle\",\n validator(val) {\n return [\"circle\", \"square\"].includes(val);\n }\n },\n icon: String,\n src: {\n type: String,\n default: \"\"\n },\n alt: String,\n srcSet: String,\n fit: {\n type: String,\n default: \"cover\"\n }\n },\n emits: [ERROR_EVENT],\n setup(props, { emit }) {\n const hasLoadError = ref(false);\n const src = toRef(props, \"src\");\n watch(src, () => {\n hasLoadError.value = false;\n });\n const avatarClass = computed(() => {\n const { size, icon, shape } = props;\n const classList = [\"el-avatar\"];\n if (size && typeof size === \"string\") {\n classList.push(`el-avatar--${size}`);\n }\n if (icon) {\n classList.push(\"el-avatar--icon\");\n }\n if (shape) {\n classList.push(`el-avatar--${shape}`);\n }\n return classList;\n });\n const sizeStyle = computed(() => {\n const { size } = props;\n return typeof size === \"number\" ? {\n height: `${size}px`,\n width: `${size}px`,\n lineHeight: `${size}px`\n } : {};\n });\n const fitStyle = computed(() => ({\n objectFit: props.fit\n }));\n function handleError(e) {\n hasLoadError.value = true;\n emit(ERROR_EVENT, e);\n }\n return {\n hasLoadError,\n avatarClass,\n sizeStyle,\n handleError,\n fitStyle\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"span\", {\n class: _ctx.avatarClass,\n style: _ctx.sizeStyle\n }, [\n (_ctx.src || _ctx.srcSet) && !_ctx.hasLoadError ? (openBlock(), createBlock(\"img\", {\n key: 0,\n src: _ctx.src,\n alt: _ctx.alt,\n srcset: _ctx.srcSet,\n style: _ctx.fitStyle,\n onError: _cache[1] || (_cache[1] = (...args) => _ctx.handleError && _ctx.handleError(...args))\n }, null, 44, [\"src\", \"alt\", \"srcset\"])) : _ctx.icon ? (openBlock(), createBlock(\"i\", {\n key: 1,\n class: _ctx.icon\n }, null, 2)) : renderSlot(_ctx.$slots, \"default\", { key: 2 })\n ], 6);\n}\n\nscript.render = render;\nscript.__file = \"packages/avatar/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Avatar = script;\n\nexport default _Avatar;\n","const cubic = (value) => Math.pow(value, 3);\r\nconst easeInOutCubic = (value) => value < 0.5\r\n ? cubic(value * 2) / 2\r\n : 1 - cubic((1 - value) * 2) / 2;\n\nexport { cubic, easeInOutCubic };\n","import { defineComponent, ref, computed, onMounted, onBeforeUnmount, openBlock, createBlock, Transition, withCtx, withModifiers, renderSlot, createCommentVNode, createVNode } from 'vue';\nimport throttle from 'lodash/throttle';\nimport { on, off } from '../utils/dom';\nimport { easeInOutCubic } from '../utils/animation';\nimport throwError from '../utils/error';\n\nvar script = defineComponent({\n name: \"ElBacktop\",\n props: {\n visibilityHeight: {\n type: Number,\n default: 200\n },\n target: {\n type: String,\n default: \"\"\n },\n right: {\n type: Number,\n default: 40\n },\n bottom: {\n type: Number,\n default: 40\n }\n },\n emits: [\"click\"],\n setup(props, ctx) {\n const el = ref(null);\n const container = ref(null);\n const visible = ref(false);\n const styleBottom = computed(() => `${props.bottom}px`);\n const styleRight = computed(() => `${props.right}px`);\n const scope = \"ElBackTop\";\n const scrollToTop = () => {\n const beginTime = Date.now();\n const beginValue = el.value.scrollTop;\n const rAF = window.requestAnimationFrame || ((func) => setTimeout(func, 16));\n const frameFunc = () => {\n const progress = (Date.now() - beginTime) / 500;\n if (progress < 1) {\n el.value.scrollTop = beginValue * (1 - easeInOutCubic(progress));\n rAF(frameFunc);\n } else {\n el.value.scrollTop = 0;\n }\n };\n rAF(frameFunc);\n };\n const onScroll = () => {\n visible.value = el.value.scrollTop >= props.visibilityHeight;\n };\n const handleClick = (event) => {\n scrollToTop();\n ctx.emit(\"click\", event);\n };\n const throttledScrollHandler = throttle(onScroll, 300);\n onMounted(() => {\n container.value = document;\n el.value = document.documentElement;\n if (props.target) {\n el.value = document.querySelector(props.target);\n if (!el.value) {\n throwError(scope, `target is not existed: ${props.target}`);\n }\n container.value = el.value;\n }\n on(container.value, \"scroll\", throttledScrollHandler);\n });\n onBeforeUnmount(() => {\n off(container.value, \"scroll\", throttledScrollHandler);\n });\n return {\n el,\n container,\n visible,\n styleBottom,\n styleRight,\n handleClick\n };\n }\n});\n\nconst _hoisted_1 = /* @__PURE__ */ createVNode(\"i\", { class: \"el-icon-caret-top\" }, null, -1);\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(Transition, { name: \"el-fade-in\" }, {\n default: withCtx(() => [\n _ctx.visible ? (openBlock(), createBlock(\"div\", {\n key: 0,\n style: {\n \"right\": _ctx.styleRight,\n \"bottom\": _ctx.styleBottom\n },\n class: \"el-backtop\",\n onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.handleClick && _ctx.handleClick(...args), [\"stop\"]))\n }, [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n _hoisted_1\n ])\n ], 4)) : createCommentVNode(\"v-if\", true)\n ]),\n _: 3\n });\n}\n\nscript.render = render;\nscript.__file = \"packages/backtop/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Backtop = script;\n\nexport default _Backtop;\n","import { defineComponent, computed, openBlock, createBlock, renderSlot, createVNode, Transition, withCtx, withDirectives, toDisplayString, vShow } from 'vue';\n\nvar script = defineComponent({\n name: \"ElBadge\",\n props: {\n value: {\n type: [String, Number],\n default: \"\"\n },\n max: {\n type: Number,\n default: 99\n },\n isDot: Boolean,\n hidden: Boolean,\n type: {\n type: String,\n default: \"primary\",\n validator: (val) => {\n return [\"primary\", \"success\", \"warning\", \"info\", \"danger\"].includes(val);\n }\n }\n },\n setup(props) {\n const content = computed(() => {\n if (props.isDot) {\n return;\n }\n if (typeof props.value === \"number\" && typeof props.max === \"number\") {\n return props.max < props.value ? `${props.max}+` : props.value;\n }\n return props.value;\n });\n return {\n content\n };\n }\n});\n\nconst _hoisted_1 = { class: \"el-badge\" };\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", _hoisted_1, [\n renderSlot(_ctx.$slots, \"default\"),\n createVNode(Transition, { name: \"el-zoom-in-center\" }, {\n default: withCtx(() => [\n withDirectives(createVNode(\"sup\", {\n class: [\"el-badge__content\", [\n \"el-badge__content--\" + _ctx.type,\n {\n \"is-fixed\": _ctx.$slots.default,\n \"is-dot\": _ctx.isDot\n }\n ]],\n textContent: toDisplayString(_ctx.content)\n }, null, 10, [\"textContent\"]), [\n [vShow, !_ctx.hidden && (_ctx.content || _ctx.content === 0 || _ctx.isDot)]\n ])\n ]),\n _: 1\n })\n ]);\n}\n\nscript.render = render;\nscript.__file = \"packages/badge/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Badge = script;\n\nexport default _Badge;\n","import { defineComponent, ref, provide, onMounted, openBlock, createBlock, renderSlot } from 'vue';\n\nvar script = defineComponent({\n name: \"ElBreadcrumb\",\n props: {\n separator: {\n type: String,\n default: \"/\"\n },\n separatorClass: {\n type: String,\n default: \"\"\n }\n },\n setup(props) {\n const breadcrumb = ref(null);\n provide(\"breadcrumb\", props);\n onMounted(() => {\n const items = breadcrumb.value.querySelectorAll(\".el-breadcrumb__item\");\n if (items.length) {\n items[items.length - 1].setAttribute(\"aria-current\", \"page\");\n }\n });\n return {\n breadcrumb\n };\n }\n});\n\nconst _hoisted_1 = {\n ref: \"breadcrumb\",\n class: \"el-breadcrumb\",\n \"aria-label\": \"Breadcrumb\",\n role: \"navigation\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", _hoisted_1, [\n renderSlot(_ctx.$slots, \"default\")\n ], 512);\n}\n\nscript.render = render;\nscript.__file = \"packages/breadcrumb/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Breadcrumb = script;\n\nexport default _Breadcrumb;\n","import { defineComponent, ref, inject, getCurrentInstance, onMounted, openBlock, createBlock, createVNode, renderSlot, toDisplayString } from 'vue';\n\nvar script = defineComponent({\n name: \"ElBreadcrumbItem\",\n props: {\n to: {\n type: [String, Object],\n default: \"\"\n },\n replace: {\n type: Boolean,\n default: false\n }\n },\n setup(props) {\n const link = ref(null);\n const parent = inject(\"breadcrumb\");\n const instance = getCurrentInstance();\n const router = instance.appContext.config.globalProperties.$router;\n onMounted(() => {\n link.value.setAttribute(\"role\", \"link\");\n link.value.addEventListener(\"click\", () => {\n if (!props.to || !router)\n return;\n props.replace ? router.replace(props.to) : router.push(props.to);\n });\n });\n return {\n link,\n separator: parent == null ? void 0 : parent.separator,\n separatorClass: parent == null ? void 0 : parent.separatorClass\n };\n }\n});\n\nconst _hoisted_1 = { class: \"el-breadcrumb__item\" };\nconst _hoisted_2 = {\n key: 1,\n class: \"el-breadcrumb__separator\",\n role: \"presentation\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"span\", _hoisted_1, [\n createVNode(\"span\", {\n ref: \"link\",\n class: [\"el-breadcrumb__inner\", _ctx.to ? \"is-link\" : \"\"],\n role: \"link\"\n }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 2),\n _ctx.separatorClass ? (openBlock(), createBlock(\"i\", {\n key: 0,\n class: [\"el-breadcrumb__separator\", _ctx.separatorClass]\n }, null, 2)) : (openBlock(), createBlock(\"span\", _hoisted_2, toDisplayString(_ctx.separator), 1))\n ]);\n}\n\nscript.render = render;\nscript.__file = \"packages/breadcrumb/src/item.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _BreadcrumbItem = script;\n\nexport default _BreadcrumbItem;\n","import { defineComponent, inject, computed, openBlock, createBlock, createCommentVNode, renderSlot } from 'vue';\nimport { useGlobalConfig } from '../utils/util';\nimport { isValidComponentSize } from '../utils/validators';\nimport { elFormKey, elFormItemKey } from '../el-form';\n\nvar script = defineComponent({\n name: \"ElButton\",\n props: {\n type: {\n type: String,\n default: \"default\",\n validator: (val) => {\n return [\n \"default\",\n \"primary\",\n \"success\",\n \"warning\",\n \"info\",\n \"danger\",\n \"text\"\n ].includes(val);\n }\n },\n size: {\n type: String,\n validator: isValidComponentSize\n },\n icon: {\n type: String,\n default: \"\"\n },\n nativeType: {\n type: String,\n default: \"button\",\n validator: (val) => {\n return [\"button\", \"submit\", \"reset\"].includes(val);\n }\n },\n loading: Boolean,\n disabled: Boolean,\n plain: Boolean,\n autofocus: Boolean,\n round: Boolean,\n circle: Boolean\n },\n emits: [\"click\"],\n setup(props, { emit }) {\n const $ELEMENT = useGlobalConfig();\n const elForm = inject(elFormKey, {});\n const elFormItem = inject(elFormItemKey, {});\n const buttonSize = computed(() => {\n return props.size || elFormItem.size || $ELEMENT.size;\n });\n const buttonDisabled = computed(() => {\n return props.disabled || elForm.disabled;\n });\n const handleClick = (evt) => {\n emit(\"click\", evt);\n };\n return {\n buttonSize,\n buttonDisabled,\n handleClick\n };\n }\n});\n\nconst _hoisted_1 = {\n key: 0,\n class: \"el-icon-loading\"\n};\nconst _hoisted_2 = { key: 2 };\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"button\", {\n class: [\n \"el-button\",\n _ctx.type ? \"el-button--\" + _ctx.type : \"\",\n _ctx.buttonSize ? \"el-button--\" + _ctx.buttonSize : \"\",\n {\n \"is-disabled\": _ctx.buttonDisabled,\n \"is-loading\": _ctx.loading,\n \"is-plain\": _ctx.plain,\n \"is-round\": _ctx.round,\n \"is-circle\": _ctx.circle\n }\n ],\n disabled: _ctx.buttonDisabled || _ctx.loading,\n autofocus: _ctx.autofocus,\n type: _ctx.nativeType,\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))\n }, [\n _ctx.loading ? (openBlock(), createBlock(\"i\", _hoisted_1)) : createCommentVNode(\"v-if\", true),\n _ctx.icon && !_ctx.loading ? (openBlock(), createBlock(\"i\", {\n key: 1,\n class: _ctx.icon\n }, null, 2)) : createCommentVNode(\"v-if\", true),\n _ctx.$slots.default ? (openBlock(), createBlock(\"span\", _hoisted_2, [\n renderSlot(_ctx.$slots, \"default\")\n ])) : createCommentVNode(\"v-if\", true)\n ], 10, [\"disabled\", \"autofocus\", \"type\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/button/src/button.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Button = script;\n\nexport default _Button;\n","import { defineComponent, openBlock, createBlock, renderSlot } from 'vue';\n\nvar script = defineComponent({\n name: \"ElButtonGroup\"\n});\n\nconst _hoisted_1 = { class: \"el-button-group\" };\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", _hoisted_1, [\n renderSlot(_ctx.$slots, \"default\")\n ]);\n}\n\nscript.render = render;\nscript.__file = \"packages/button/src/button-group.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _ButtonGroup = script;\n\nexport default _ButtonGroup;\n","import { defineComponent, inject, ref, watch, nextTick, computed, provide, resolveComponent, resolveDirective, openBlock, createBlock, mergeProps, withCtx, withDirectives, createVNode, renderSlot, toDisplayString, withModifiers, onMounted, Fragment, renderList, createTextVNode, createCommentVNode, Transition, h } from 'vue';\nimport dayjs from 'dayjs';\nimport customParseFormat from 'dayjs/plugin/customParseFormat';\nimport isEqual from 'lodash/isEqual';\nimport { ClickOutside, RepeatClick } from '../directives';\nimport ElInput from '../el-input';\nimport ElPopper from '../el-popper';\nimport { EVENT_CODE } from '../utils/aria';\nimport { useGlobalConfig, isEmpty } from '../utils/util';\nimport { elFormKey, elFormItemKey } from '../el-form';\nimport { isValidComponentSize } from '../utils/validators';\nimport { useLocaleInject } from '../hooks';\nimport debounce from 'lodash/debounce';\nimport ElScrollbar from '../el-scrollbar';\nimport union from 'lodash/union';\n\nconst DEFAULT_FORMATS_TIME = \"HH:mm:ss\";\nconst DEFAULT_FORMATS_DATE = \"YYYY-MM-DD\";\nconst DEFAULT_FORMATS_DATEPICKER = {\n date: DEFAULT_FORMATS_DATE,\n week: \"gggg[w]ww\",\n year: \"YYYY\",\n month: \"YYYY-MM\",\n datetime: `${DEFAULT_FORMATS_DATE} ${DEFAULT_FORMATS_TIME}`,\n monthrange: \"YYYY-MM\",\n daterange: DEFAULT_FORMATS_DATE,\n datetimerange: `${DEFAULT_FORMATS_DATE} ${DEFAULT_FORMATS_TIME}`\n};\n\nconst defaultProps = {\n name: {\n type: [Array, String],\n default: \"\"\n },\n popperClass: {\n type: String,\n default: \"\"\n },\n format: {\n type: String\n },\n valueFormat: {\n type: String\n },\n type: {\n type: String,\n default: \"\"\n },\n clearable: {\n type: Boolean,\n default: true\n },\n clearIcon: {\n type: String,\n default: \"el-icon-circle-close\"\n },\n editable: {\n type: Boolean,\n default: true\n },\n prefixIcon: {\n type: String,\n default: \"\"\n },\n size: {\n type: String,\n validator: isValidComponentSize\n },\n readonly: {\n type: Boolean,\n default: false\n },\n disabled: {\n type: Boolean,\n default: false\n },\n placeholder: {\n type: String,\n default: \"\"\n },\n popperOptions: {\n type: Object,\n default: () => ({})\n },\n modelValue: {\n type: [Date, Array, String],\n default: \"\"\n },\n rangeSeparator: {\n type: String,\n default: \"-\"\n },\n startPlaceholder: String,\n endPlaceholder: String,\n defaultValue: {\n type: [Date, Array]\n },\n defaultTime: {\n type: [Date, Array]\n },\n isRange: {\n type: Boolean,\n default: false\n },\n disabledHours: {\n type: Function\n },\n disabledMinutes: {\n type: Function\n },\n disabledSeconds: {\n type: Function\n },\n disabledDate: {\n type: Function\n },\n cellClassName: {\n type: Function\n },\n shortcuts: {\n type: Array,\n default: () => []\n },\n arrowControl: {\n type: Boolean,\n default: false\n },\n validateEvent: {\n type: Boolean,\n default: true\n },\n unlinkPanels: Boolean\n};\n\nconst dateEquals = function(a, b) {\n const aIsDate = a instanceof Date;\n const bIsDate = b instanceof Date;\n if (aIsDate && bIsDate) {\n return a.getTime() === b.getTime();\n }\n if (!aIsDate && !bIsDate) {\n return a === b;\n }\n return false;\n};\nconst valueEquals = function(a, b) {\n const aIsArray = a instanceof Array;\n const bIsArray = b instanceof Array;\n if (aIsArray && bIsArray) {\n if (a.length !== b.length) {\n return false;\n }\n return a.every((item, index) => dateEquals(item, b[index]));\n }\n if (!aIsArray && !bIsArray) {\n return dateEquals(a, b);\n }\n return false;\n};\nconst parser = function(date, format) {\n const day = isEmpty(format) ? dayjs(date) : dayjs(date, format);\n return day.isValid() ? day : void 0;\n};\nconst formatter = function(date, format) {\n return isEmpty(format) ? date : dayjs(date).format(format);\n};\nvar script = defineComponent({\n name: \"Picker\",\n components: {\n ElInput,\n ElPopper\n },\n directives: { clickoutside: ClickOutside },\n props: defaultProps,\n emits: [\"update:modelValue\", \"change\", \"focus\", \"blur\"],\n setup(props, ctx) {\n const ELEMENT = useGlobalConfig();\n const elForm = inject(elFormKey, {});\n const elFormItem = inject(elFormItemKey, {});\n const elPopperOptions = inject(\"ElPopperOptions\", {});\n const refPopper = ref(null);\n const pickerVisible = ref(false);\n const pickerActualVisible = ref(false);\n const valueOnOpen = ref(null);\n watch(pickerVisible, (val) => {\n var _a;\n if (!val) {\n userInput.value = null;\n nextTick(() => {\n emitChange(props.modelValue);\n });\n ctx.emit(\"blur\");\n blurInput();\n props.validateEvent && ((_a = elFormItem.formItemMitt) == null ? void 0 : _a.emit(\"el.form.blur\"));\n } else {\n valueOnOpen.value = props.modelValue;\n }\n });\n const emitChange = (val, isClear) => {\n var _a;\n if (isClear || !valueEquals(val, valueOnOpen.value)) {\n ctx.emit(\"change\", val);\n props.validateEvent && ((_a = elFormItem.formItemMitt) == null ? void 0 : _a.emit(\"el.form.change\", val));\n }\n };\n const emitInput = (val) => {\n if (!valueEquals(props.modelValue, val)) {\n let formatValue;\n if (Array.isArray(val)) {\n formatValue = val.map((_) => formatter(_, props.valueFormat));\n } else if (val) {\n formatValue = formatter(val, props.valueFormat);\n }\n ctx.emit(\"update:modelValue\", val ? formatValue : val);\n }\n };\n const refInput = computed(() => {\n if (refPopper.value.triggerRef) {\n const _r = isRangeInput.value ? refPopper.value.triggerRef : refPopper.value.triggerRef.$el;\n return [].slice.call(_r.querySelectorAll(\"input\"));\n }\n return [];\n });\n const setSelectionRange = (start, end, pos) => {\n const _inputs = refInput.value;\n if (!_inputs.length)\n return;\n if (!pos || pos === \"min\") {\n _inputs[0].setSelectionRange(start, end);\n _inputs[0].focus();\n } else if (pos === \"max\") {\n _inputs[1].setSelectionRange(start, end);\n _inputs[1].focus();\n }\n };\n const onPick = (date = \"\", visible = false) => {\n pickerVisible.value = visible;\n let result;\n if (Array.isArray(date)) {\n result = date.map((_) => _.toDate());\n } else {\n result = date ? date.toDate() : date;\n }\n userInput.value = null;\n emitInput(result);\n };\n const handleFocus = (e) => {\n if (props.readonly || pickerDisabled.value || pickerVisible.value)\n return;\n pickerVisible.value = true;\n ctx.emit(\"focus\", e);\n };\n const handleBlur = () => {\n pickerVisible.value = false;\n blurInput();\n };\n const pickerDisabled = computed(() => {\n return props.disabled || elForm.disabled;\n });\n const parsedValue = computed(() => {\n let result;\n if (valueIsEmpty.value) {\n if (pickerOptions.value.getDefaultValue) {\n result = pickerOptions.value.getDefaultValue();\n }\n } else {\n if (Array.isArray(props.modelValue)) {\n result = props.modelValue.map((_) => parser(_, props.valueFormat));\n } else {\n result = parser(props.modelValue, props.valueFormat);\n }\n }\n if (pickerOptions.value.getRangeAvailableTime) {\n const availableResult = pickerOptions.value.getRangeAvailableTime(result);\n if (!isEqual(availableResult, result)) {\n result = availableResult;\n emitInput(Array.isArray(result) ? result.map((_) => _.toDate()) : result.toDate());\n }\n }\n if (Array.isArray(result) && result.some((_) => !_)) {\n result = [];\n }\n return result;\n });\n const displayValue = computed(() => {\n if (!pickerOptions.value.panelReady)\n return;\n const formattedValue = formatDayjsToString(parsedValue.value);\n if (Array.isArray(userInput.value)) {\n return [\n userInput.value[0] || formattedValue && formattedValue[0] || \"\",\n userInput.value[1] || formattedValue && formattedValue[1] || \"\"\n ];\n } else if (userInput.value !== null) {\n return userInput.value;\n }\n if (!isTimePicker.value && valueIsEmpty.value)\n return;\n if (!pickerVisible.value && valueIsEmpty.value)\n return;\n if (formattedValue) {\n return isDatesPicker.value ? formattedValue.join(\", \") : formattedValue;\n }\n return \"\";\n });\n const isTimeLikePicker = computed(() => {\n return props.type.indexOf(\"time\") !== -1;\n });\n const isTimePicker = computed(() => {\n return props.type.indexOf(\"time\") === 0;\n });\n const isDatesPicker = computed(() => {\n return props.type === \"dates\";\n });\n const triggerClass = computed(() => {\n return props.prefixIcon || (isTimeLikePicker.value ? \"el-icon-time\" : \"el-icon-date\");\n });\n const showClose = ref(false);\n const onClearIconClick = (event) => {\n if (props.readonly || pickerDisabled.value)\n return;\n if (showClose.value) {\n event.stopPropagation();\n emitInput(null);\n emitChange(null, true);\n showClose.value = false;\n pickerVisible.value = false;\n pickerOptions.value.handleClear && pickerOptions.value.handleClear();\n }\n };\n const valueIsEmpty = computed(() => {\n return !props.modelValue || Array.isArray(props.modelValue) && !props.modelValue.length;\n });\n const onMouseEnter = () => {\n if (props.readonly || pickerDisabled.value)\n return;\n if (!valueIsEmpty.value && props.clearable) {\n showClose.value = true;\n }\n };\n const onMouseLeave = () => {\n showClose.value = false;\n };\n const isRangeInput = computed(() => {\n return props.type.indexOf(\"range\") > -1;\n });\n const pickerSize = computed(() => {\n return props.size || elFormItem.size || ELEMENT.size;\n });\n const popperPaneRef = computed(() => {\n var _a;\n return (_a = refPopper.value) == null ? void 0 : _a.popperRef;\n });\n const onClickOutside = () => {\n if (!pickerVisible.value)\n return;\n pickerVisible.value = false;\n };\n const userInput = ref(null);\n const handleChange = () => {\n if (userInput.value) {\n const value = parseUserInputToDayjs(displayValue.value);\n if (value) {\n if (isValidValue(value)) {\n emitInput(Array.isArray(value) ? value.map((_) => _.toDate()) : value.toDate());\n userInput.value = null;\n }\n }\n }\n if (userInput.value === \"\") {\n emitInput(null);\n emitChange(null);\n userInput.value = null;\n }\n };\n const blurInput = () => {\n refInput.value.forEach((input) => input.blur());\n };\n const parseUserInputToDayjs = (value) => {\n if (!value)\n return null;\n return pickerOptions.value.parseUserInput(value);\n };\n const formatDayjsToString = (value) => {\n if (!value)\n return null;\n return pickerOptions.value.formatToString(value);\n };\n const isValidValue = (value) => {\n return pickerOptions.value.isValidValue(value);\n };\n const handleKeydown = (event) => {\n const code = event.code;\n if (code === EVENT_CODE.esc) {\n pickerVisible.value = false;\n event.stopPropagation();\n return;\n }\n if (code === EVENT_CODE.tab) {\n if (!isRangeInput.value) {\n handleChange();\n pickerVisible.value = false;\n event.stopPropagation();\n } else {\n setTimeout(() => {\n if (refInput.value.indexOf(document.activeElement) === -1) {\n pickerVisible.value = false;\n blurInput();\n }\n }, 0);\n }\n return;\n }\n if (code === EVENT_CODE.enter) {\n if (userInput.value === \"\" || isValidValue(parseUserInputToDayjs(displayValue.value))) {\n handleChange();\n pickerVisible.value = false;\n }\n event.stopPropagation();\n return;\n }\n if (userInput.value) {\n event.stopPropagation();\n return;\n }\n if (pickerOptions.value.handleKeydown) {\n pickerOptions.value.handleKeydown(event);\n }\n };\n const onUserInput = (e) => {\n userInput.value = e;\n };\n const handleStartInput = (event) => {\n if (userInput.value) {\n userInput.value = [event.target.value, userInput.value[1]];\n } else {\n userInput.value = [event.target.value, null];\n }\n };\n const handleEndInput = (event) => {\n if (userInput.value) {\n userInput.value = [userInput.value[0], event.target.value];\n } else {\n userInput.value = [null, event.target.value];\n }\n };\n const handleStartChange = () => {\n const value = parseUserInputToDayjs(userInput.value && userInput.value[0]);\n if (value && value.isValid()) {\n userInput.value = [formatDayjsToString(value), displayValue.value[1]];\n const newValue = [value, parsedValue.value && parsedValue.value[1]];\n if (isValidValue(newValue)) {\n emitInput(newValue);\n userInput.value = null;\n }\n }\n };\n const handleEndChange = () => {\n const value = parseUserInputToDayjs(userInput.value && userInput.value[1]);\n if (value && value.isValid()) {\n userInput.value = [displayValue.value[0], formatDayjsToString(value)];\n const newValue = [parsedValue.value && parsedValue.value[0], value];\n if (isValidValue(newValue)) {\n emitInput(newValue);\n userInput.value = null;\n }\n }\n };\n const pickerOptions = ref({});\n const onSetPickerOption = (e) => {\n pickerOptions.value[e[0]] = e[1];\n pickerOptions.value.panelReady = true;\n };\n provide(\"EP_PICKER_BASE\", {\n props\n });\n return {\n elPopperOptions,\n isDatesPicker,\n handleEndChange,\n handleStartChange,\n handleStartInput,\n handleEndInput,\n onUserInput,\n handleChange,\n handleKeydown,\n popperPaneRef,\n onClickOutside,\n pickerSize,\n isRangeInput,\n onMouseLeave,\n onMouseEnter,\n onClearIconClick,\n showClose,\n triggerClass,\n onPick,\n handleFocus,\n handleBlur,\n pickerVisible,\n pickerActualVisible,\n displayValue,\n parsedValue,\n setSelectionRange,\n refPopper,\n pickerDisabled,\n onSetPickerOption\n };\n }\n});\n\nconst _hoisted_1 = { class: \"el-range-separator\" };\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_input = resolveComponent(\"el-input\");\n const _component_el_popper = resolveComponent(\"el-popper\");\n const _directive_clickoutside = resolveDirective(\"clickoutside\");\n return openBlock(), createBlock(_component_el_popper, mergeProps({\n ref: \"refPopper\",\n visible: _ctx.pickerVisible,\n \"onUpdate:visible\": _cache[18] || (_cache[18] = ($event) => _ctx.pickerVisible = $event),\n \"manual-mode\": \"\",\n effect: \"light\",\n pure: \"\",\n trigger: \"click\"\n }, _ctx.$attrs, {\n \"popper-class\": `el-picker__popper ${_ctx.popperClass}`,\n \"popper-options\": _ctx.elPopperOptions,\n \"fallback-placements\": [\"bottom\", \"top\", \"right\", \"left\"],\n transition: \"el-zoom-in-top\",\n \"gpu-acceleration\": false,\n \"stop-popper-mouse-event\": false,\n \"append-to-body\": \"\",\n onBeforeEnter: _cache[19] || (_cache[19] = ($event) => _ctx.pickerActualVisible = true),\n onAfterLeave: _cache[20] || (_cache[20] = ($event) => _ctx.pickerActualVisible = false)\n }), {\n trigger: withCtx(() => [\n !_ctx.isRangeInput ? withDirectives((openBlock(), createBlock(_component_el_input, {\n key: 0,\n \"model-value\": _ctx.displayValue,\n name: _ctx.name,\n size: _ctx.pickerSize,\n disabled: _ctx.pickerDisabled,\n placeholder: _ctx.placeholder,\n class: [\"el-date-editor\", \"el-date-editor--\" + _ctx.type],\n readonly: !_ctx.editable || _ctx.readonly || _ctx.isDatesPicker || _ctx.type === \"week\",\n onInput: _ctx.onUserInput,\n onFocus: _ctx.handleFocus,\n onKeydown: _ctx.handleKeydown,\n onChange: _ctx.handleChange,\n onMouseenter: _ctx.onMouseEnter,\n onMouseleave: _ctx.onMouseLeave\n }, {\n prefix: withCtx(() => [\n createVNode(\"i\", {\n class: [\"el-input__icon\", _ctx.triggerClass],\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args))\n }, null, 2)\n ]),\n suffix: withCtx(() => [\n createVNode(\"i\", {\n class: [\"el-input__icon\", [_ctx.showClose ? \"\" + _ctx.clearIcon : \"\"]],\n onClick: _cache[2] || (_cache[2] = (...args) => _ctx.onClearIconClick && _ctx.onClearIconClick(...args))\n }, null, 2)\n ]),\n _: 1\n }, 8, [\"model-value\", \"name\", \"size\", \"disabled\", \"placeholder\", \"class\", \"readonly\", \"onInput\", \"onFocus\", \"onKeydown\", \"onChange\", \"onMouseenter\", \"onMouseleave\"])), [\n [_directive_clickoutside, _ctx.onClickOutside, _ctx.popperPaneRef]\n ]) : withDirectives((openBlock(), createBlock(\"div\", {\n key: 1,\n class: [\"el-date-editor el-range-editor el-input__inner\", [\n \"el-date-editor--\" + _ctx.type,\n _ctx.pickerSize ? `el-range-editor--${_ctx.pickerSize}` : \"\",\n _ctx.pickerDisabled ? \"is-disabled\" : \"\",\n _ctx.pickerVisible ? \"is-active\" : \"\"\n ]],\n onClick: _cache[10] || (_cache[10] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),\n onMouseenter: _cache[11] || (_cache[11] = (...args) => _ctx.onMouseEnter && _ctx.onMouseEnter(...args)),\n onMouseleave: _cache[12] || (_cache[12] = (...args) => _ctx.onMouseLeave && _ctx.onMouseLeave(...args)),\n onKeydown: _cache[13] || (_cache[13] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args))\n }, [\n createVNode(\"i\", {\n class: [\"el-input__icon\", \"el-range__icon\", _ctx.triggerClass]\n }, null, 2),\n createVNode(\"input\", {\n autocomplete: \"off\",\n name: _ctx.name && _ctx.name[0],\n placeholder: _ctx.startPlaceholder,\n value: _ctx.displayValue && _ctx.displayValue[0],\n disabled: _ctx.pickerDisabled,\n readonly: !_ctx.editable || _ctx.readonly,\n class: \"el-range-input\",\n onInput: _cache[3] || (_cache[3] = (...args) => _ctx.handleStartInput && _ctx.handleStartInput(...args)),\n onChange: _cache[4] || (_cache[4] = (...args) => _ctx.handleStartChange && _ctx.handleStartChange(...args)),\n onFocus: _cache[5] || (_cache[5] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args))\n }, null, 40, [\"name\", \"placeholder\", \"value\", \"disabled\", \"readonly\"]),\n renderSlot(_ctx.$slots, \"range-separator\", {}, () => [\n createVNode(\"span\", _hoisted_1, toDisplayString(_ctx.rangeSeparator), 1)\n ]),\n createVNode(\"input\", {\n autocomplete: \"off\",\n name: _ctx.name && _ctx.name[1],\n placeholder: _ctx.endPlaceholder,\n value: _ctx.displayValue && _ctx.displayValue[1],\n disabled: _ctx.pickerDisabled,\n readonly: !_ctx.editable || _ctx.readonly,\n class: \"el-range-input\",\n onFocus: _cache[6] || (_cache[6] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),\n onInput: _cache[7] || (_cache[7] = (...args) => _ctx.handleEndInput && _ctx.handleEndInput(...args)),\n onChange: _cache[8] || (_cache[8] = (...args) => _ctx.handleEndChange && _ctx.handleEndChange(...args))\n }, null, 40, [\"name\", \"placeholder\", \"value\", \"disabled\", \"readonly\"]),\n createVNode(\"i\", {\n class: [[_ctx.showClose ? \"\" + _ctx.clearIcon : \"\"], \"el-input__icon el-range__close-icon\"],\n onClick: _cache[9] || (_cache[9] = (...args) => _ctx.onClearIconClick && _ctx.onClearIconClick(...args))\n }, null, 2)\n ], 34)), [\n [_directive_clickoutside, _ctx.onClickOutside, _ctx.popperPaneRef]\n ])\n ]),\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {\n visible: _ctx.pickerVisible,\n actualVisible: _ctx.pickerActualVisible,\n parsedValue: _ctx.parsedValue,\n format: _ctx.format,\n unlinkPanels: _ctx.unlinkPanels,\n type: _ctx.type,\n defaultValue: _ctx.defaultValue,\n onPick: _cache[14] || (_cache[14] = (...args) => _ctx.onPick && _ctx.onPick(...args)),\n onSelectRange: _cache[15] || (_cache[15] = (...args) => _ctx.setSelectionRange && _ctx.setSelectionRange(...args)),\n onSetPickerOption: _cache[16] || (_cache[16] = (...args) => _ctx.onSetPickerOption && _ctx.onSetPickerOption(...args)),\n onMousedown: _cache[17] || (_cache[17] = withModifiers(() => {\n }, [\"stop\"]))\n })\n ]),\n _: 1\n }, 16, [\"visible\", \"popper-class\", \"popper-options\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/time-picker/src/common/picker.vue\";\n\nconst makeList = (total, method, methodFunc) => {\n const arr = [];\n const disabledArr = method && methodFunc();\n for (let i = 0; i < total; i++) {\n arr[i] = disabledArr ? disabledArr.includes(i) : false;\n }\n return arr;\n};\nconst makeAvailableArr = (list) => {\n return list.map((_, index) => !_ ? index : _).filter((_) => _ !== true);\n};\nconst getTimeLists = (disabledHours, disabledMinutes, disabledSeconds) => {\n const getHoursList = (role, compare) => {\n return makeList(24, disabledHours, () => disabledHours(role, compare));\n };\n const getMinutesList = (hour, role, compare) => {\n return makeList(60, disabledMinutes, () => disabledMinutes(hour, role, compare));\n };\n const getSecondsList = (hour, minute, role, compare) => {\n return makeList(60, disabledSeconds, () => disabledSeconds(hour, minute, role, compare));\n };\n return {\n getHoursList,\n getMinutesList,\n getSecondsList\n };\n};\nconst getAvailableArrs = (disabledHours, disabledMinutes, disabledSeconds) => {\n const {\n getHoursList,\n getMinutesList,\n getSecondsList\n } = getTimeLists(disabledHours, disabledMinutes, disabledSeconds);\n const getAvailableHours = (role, compare) => {\n return makeAvailableArr(getHoursList(role, compare));\n };\n const getAvailableMinutes = (hour, role, compare) => {\n return makeAvailableArr(getMinutesList(hour, role, compare));\n };\n const getAvailableSeconds = (hour, minute, role, compare) => {\n return makeAvailableArr(getSecondsList(hour, minute, role, compare));\n };\n return {\n getAvailableHours,\n getAvailableMinutes,\n getAvailableSeconds\n };\n};\nconst useOldValue = (props) => {\n const oldValue = ref(props.parsedValue);\n watch(() => props.visible, (val) => {\n if (!val) {\n oldValue.value = props.parsedValue;\n }\n });\n return oldValue;\n};\n\nvar script$1 = defineComponent({\n directives: {\n repeatClick: RepeatClick\n },\n components: {\n ElScrollbar\n },\n props: {\n role: {\n type: String,\n required: true\n },\n spinnerDate: {\n type: Object,\n required: true\n },\n showSeconds: {\n type: Boolean,\n default: true\n },\n arrowControl: Boolean,\n amPmMode: {\n type: String,\n default: \"\"\n },\n disabledHours: {\n type: Function\n },\n disabledMinutes: {\n type: Function\n },\n disabledSeconds: {\n type: Function\n }\n },\n emits: [\"change\", \"select-range\", \"set-option\"],\n setup(props, ctx) {\n let isScrolling = false;\n const debouncedResetScroll = debounce((type) => {\n isScrolling = false;\n adjustCurrentSpinner(type);\n }, 200);\n const currentScrollbar = ref(null);\n const listHoursRef = ref(null);\n const listMinutesRef = ref(null);\n const listSecondsRef = ref(null);\n const listRefsMap = {\n hours: listHoursRef,\n minutes: listMinutesRef,\n seconds: listSecondsRef\n };\n const spinnerItems = computed(() => {\n const arr = [\"hours\", \"minutes\", \"seconds\"];\n return props.showSeconds ? arr : arr.slice(0, 2);\n });\n const hours = computed(() => {\n return props.spinnerDate.hour();\n });\n const minutes = computed(() => {\n return props.spinnerDate.minute();\n });\n const seconds = computed(() => {\n return props.spinnerDate.second();\n });\n const timePartsMap = computed(() => ({\n hours,\n minutes,\n seconds\n }));\n const hoursList = computed(() => {\n return getHoursList(props.role);\n });\n const minutesList = computed(() => {\n return getMinutesList(hours.value, props.role);\n });\n const secondsList = computed(() => {\n return getSecondsList(hours.value, minutes.value, props.role);\n });\n const listMap = computed(() => ({\n hours: hoursList,\n minutes: minutesList,\n seconds: secondsList\n }));\n const arrowHourList = computed(() => {\n const hour = hours.value;\n return [\n hour > 0 ? hour - 1 : void 0,\n hour,\n hour < 23 ? hour + 1 : void 0\n ];\n });\n const arrowMinuteList = computed(() => {\n const minute = minutes.value;\n return [\n minute > 0 ? minute - 1 : void 0,\n minute,\n minute < 59 ? minute + 1 : void 0\n ];\n });\n const arrowSecondList = computed(() => {\n const second = seconds.value;\n return [\n second > 0 ? second - 1 : void 0,\n second,\n second < 59 ? second + 1 : void 0\n ];\n });\n const arrowListMap = computed(() => ({\n hours: arrowHourList,\n minutes: arrowMinuteList,\n seconds: arrowSecondList\n }));\n const getAmPmFlag = (hour) => {\n let shouldShowAmPm = !!props.amPmMode;\n if (!shouldShowAmPm)\n return \"\";\n let isCapital = props.amPmMode === \"A\";\n let content = hour < 12 ? \" am\" : \" pm\";\n if (isCapital)\n content = content.toUpperCase();\n return content;\n };\n const emitSelectRange = (type) => {\n if (type === \"hours\") {\n ctx.emit(\"select-range\", 0, 2);\n } else if (type === \"minutes\") {\n ctx.emit(\"select-range\", 3, 5);\n } else if (type === \"seconds\") {\n ctx.emit(\"select-range\", 6, 8);\n }\n currentScrollbar.value = type;\n };\n const adjustCurrentSpinner = (type) => {\n adjustSpinner(type, timePartsMap.value[type].value);\n };\n const adjustSpinners = () => {\n adjustCurrentSpinner(\"hours\");\n adjustCurrentSpinner(\"minutes\");\n adjustCurrentSpinner(\"seconds\");\n };\n const adjustSpinner = (type, value) => {\n if (props.arrowControl)\n return;\n const el = listRefsMap[type];\n if (el.value) {\n el.value.$el.querySelector(\".el-scrollbar__wrap\").scrollTop = Math.max(0, value * typeItemHeight(type));\n }\n };\n const typeItemHeight = (type) => {\n const el = listRefsMap[type];\n return el.value.$el.querySelector(\"li\").offsetHeight;\n };\n const onIncreaseClick = () => {\n scrollDown(1);\n };\n const onDecreaseClick = () => {\n scrollDown(-1);\n };\n const scrollDown = (step) => {\n if (!currentScrollbar.value) {\n emitSelectRange(\"hours\");\n }\n const label = currentScrollbar.value;\n let now = timePartsMap.value[label].value;\n const total = currentScrollbar.value === \"hours\" ? 24 : 60;\n now = (now + step + total) % total;\n modifyDateField(label, now);\n adjustSpinner(label, now);\n nextTick(() => emitSelectRange(currentScrollbar.value));\n };\n const modifyDateField = (type, value) => {\n const list = listMap.value[type].value;\n const isDisabled = list[value];\n if (isDisabled)\n return;\n switch (type) {\n case \"hours\":\n ctx.emit(\"change\", props.spinnerDate.hour(value).minute(minutes.value).second(seconds.value));\n break;\n case \"minutes\":\n ctx.emit(\"change\", props.spinnerDate.hour(hours.value).minute(value).second(seconds.value));\n break;\n case \"seconds\":\n ctx.emit(\"change\", props.spinnerDate.hour(hours.value).minute(minutes.value).second(value));\n break;\n }\n };\n const handleClick = (type, { value, disabled }) => {\n if (!disabled) {\n modifyDateField(type, value);\n emitSelectRange(type);\n adjustSpinner(type, value);\n }\n };\n const handleScroll = (type) => {\n isScrolling = true;\n debouncedResetScroll(type);\n const value = Math.min(Math.round((listRefsMap[type].value.$el.querySelector(\".el-scrollbar__wrap\").scrollTop - (scrollBarHeight(type) * 0.5 - 10) / typeItemHeight(type) + 3) / typeItemHeight(type)), type === \"hours\" ? 23 : 59);\n modifyDateField(type, value);\n };\n const scrollBarHeight = (type) => {\n return listRefsMap[type].value.$el.offsetHeight;\n };\n const bindScrollEvent = () => {\n const bindFuntion = (type) => {\n if (listRefsMap[type].value) {\n listRefsMap[type].value.$el.querySelector(\".el-scrollbar__wrap\").onscroll = () => {\n handleScroll(type);\n };\n }\n };\n bindFuntion(\"hours\");\n bindFuntion(\"minutes\");\n bindFuntion(\"seconds\");\n };\n onMounted(() => {\n nextTick(() => {\n !props.arrowControl && bindScrollEvent();\n adjustSpinners();\n if (props.role === \"start\")\n emitSelectRange(\"hours\");\n });\n });\n const getRefId = (item) => {\n return `list${item.charAt(0).toUpperCase() + item.slice(1)}Ref`;\n };\n ctx.emit(\"set-option\", [`${props.role}_scrollDown`, scrollDown]);\n ctx.emit(\"set-option\", [`${props.role}_emitSelectRange`, emitSelectRange]);\n const {\n getHoursList,\n getMinutesList,\n getSecondsList\n } = getTimeLists(props.disabledHours, props.disabledMinutes, props.disabledSeconds);\n watch(() => props.spinnerDate, () => {\n if (isScrolling)\n return;\n adjustSpinners();\n });\n return {\n getRefId,\n spinnerItems,\n currentScrollbar,\n hours,\n minutes,\n seconds,\n hoursList,\n minutesList,\n arrowHourList,\n arrowMinuteList,\n arrowSecondList,\n getAmPmFlag,\n emitSelectRange,\n adjustCurrentSpinner,\n typeItemHeight,\n listHoursRef,\n listMinutesRef,\n listSecondsRef,\n onIncreaseClick,\n onDecreaseClick,\n handleClick,\n secondsList,\n timePartsMap,\n arrowListMap,\n listMap\n };\n }\n});\n\nconst _hoisted_1$1 = { class: \"el-time-spinner__arrow el-icon-arrow-up\" };\nconst _hoisted_2 = { class: \"el-time-spinner__arrow el-icon-arrow-down\" };\nconst _hoisted_3 = { class: \"el-time-spinner__list\" };\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_scrollbar = resolveComponent(\"el-scrollbar\");\n const _directive_repeat_click = resolveDirective(\"repeat-click\");\n return openBlock(), createBlock(\"div\", {\n class: [\"el-time-spinner\", { \"has-seconds\": _ctx.showSeconds }]\n }, [\n !_ctx.arrowControl ? (openBlock(true), createBlock(Fragment, { key: 0 }, renderList(_ctx.spinnerItems, (item) => {\n return openBlock(), createBlock(_component_el_scrollbar, {\n key: item,\n ref: _ctx.getRefId(item),\n class: \"el-time-spinner__wrapper\",\n \"wrap-style\": \"max-height: inherit;\",\n \"view-class\": \"el-time-spinner__list\",\n noresize: \"\",\n tag: \"ul\",\n onMouseenter: ($event) => _ctx.emitSelectRange(item),\n onMousemove: ($event) => _ctx.adjustCurrentSpinner(item)\n }, {\n default: withCtx(() => [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.listMap[item].value, (disabled, key) => {\n return openBlock(), createBlock(\"li\", {\n key,\n class: [\"el-time-spinner__item\", { \"active\": key === _ctx.timePartsMap[item].value, disabled }],\n onClick: ($event) => _ctx.handleClick(item, { value: key, disabled })\n }, [\n item === \"hours\" ? (openBlock(), createBlock(Fragment, { key: 0 }, [\n createTextVNode(toDisplayString((\"0\" + (_ctx.amPmMode ? key % 12 || 12 : key)).slice(-2)) + toDisplayString(_ctx.getAmPmFlag(key)), 1)\n ], 2112)) : (openBlock(), createBlock(Fragment, { key: 1 }, [\n createTextVNode(toDisplayString((\"0\" + key).slice(-2)), 1)\n ], 2112))\n ], 10, [\"onClick\"]);\n }), 128))\n ]),\n _: 2\n }, 1032, [\"onMouseenter\", \"onMousemove\"]);\n }), 128)) : createCommentVNode(\"v-if\", true),\n _ctx.arrowControl ? (openBlock(true), createBlock(Fragment, { key: 1 }, renderList(_ctx.spinnerItems, (item) => {\n return openBlock(), createBlock(\"div\", {\n key: item,\n class: \"el-time-spinner__wrapper is-arrow\",\n onMouseenter: ($event) => _ctx.emitSelectRange(item)\n }, [\n withDirectives(createVNode(\"i\", _hoisted_1$1, null, 512), [\n [_directive_repeat_click, _ctx.onDecreaseClick]\n ]),\n withDirectives(createVNode(\"i\", _hoisted_2, null, 512), [\n [_directive_repeat_click, _ctx.onIncreaseClick]\n ]),\n createVNode(\"ul\", _hoisted_3, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.arrowListMap[item].value, (time, key) => {\n return openBlock(), createBlock(\"li\", {\n key,\n class: [\"el-time-spinner__item\", { \"active\": time === _ctx.timePartsMap[item].value, \"disabled\": _ctx.listMap[item].value[time] }]\n }, toDisplayString(time === void 0 ? \"\" : (\"0\" + (_ctx.amPmMode ? time % 12 || 12 : time)).slice(-2) + _ctx.getAmPmFlag(time)), 3);\n }), 128))\n ])\n ], 40, [\"onMouseenter\"]);\n }), 128)) : createCommentVNode(\"v-if\", true)\n ], 2);\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"packages/time-picker/src/time-picker-com/basic-time-spinner.vue\";\n\nvar script$2 = defineComponent({\n components: {\n TimeSpinner: script$1\n },\n props: {\n visible: Boolean,\n actualVisible: {\n type: Boolean,\n default: void 0\n },\n datetimeRole: {\n type: String\n },\n parsedValue: {\n type: [Object, String]\n },\n format: {\n type: String,\n default: \"\"\n }\n },\n emits: [\"pick\", \"select-range\", \"set-picker-option\"],\n setup(props, ctx) {\n const { t } = useLocaleInject();\n const selectionRange = ref([0, 2]);\n const oldValue = useOldValue(props);\n const transitionName = computed(() => {\n return props.actualVisible === void 0 ? \"el-zoom-in-top\" : \"\";\n });\n const showSeconds = computed(() => {\n return props.format.includes(\"ss\");\n });\n const amPmMode = computed(() => {\n if (props.format.includes(\"A\"))\n return \"A\";\n if (props.format.includes(\"a\"))\n return \"a\";\n return \"\";\n });\n const isValidValue = (_date) => {\n const parsedDate = dayjs(_date);\n const result = getRangeAvailableTime(parsedDate);\n return parsedDate.isSame(result);\n };\n const handleCancel = () => {\n ctx.emit(\"pick\", oldValue.value, false);\n };\n const handleConfirm = (visible = false, first) => {\n if (first)\n return;\n ctx.emit(\"pick\", props.parsedValue, visible);\n };\n const handleChange = (_date) => {\n if (!props.visible) {\n return;\n }\n const result = getRangeAvailableTime(_date).millisecond(0);\n ctx.emit(\"pick\", result, true);\n };\n const setSelectionRange = (start, end) => {\n ctx.emit(\"select-range\", start, end);\n selectionRange.value = [start, end];\n };\n const changeSelectionRange = (step) => {\n const list = [0, 3].concat(showSeconds.value ? [6] : []);\n const mapping = [\"hours\", \"minutes\"].concat(showSeconds.value ? [\"seconds\"] : []);\n const index = list.indexOf(selectionRange.value[0]);\n const next = (index + step + list.length) % list.length;\n timePickerOptions[\"start_emitSelectRange\"](mapping[next]);\n };\n const handleKeydown = (event) => {\n const code = event.code;\n if (code === EVENT_CODE.left || code === EVENT_CODE.right) {\n const step = code === EVENT_CODE.left ? -1 : 1;\n changeSelectionRange(step);\n event.preventDefault();\n return;\n }\n if (code === EVENT_CODE.up || code === EVENT_CODE.down) {\n const step = code === EVENT_CODE.up ? -1 : 1;\n timePickerOptions[\"start_scrollDown\"](step);\n event.preventDefault();\n return;\n }\n };\n const getRangeAvailableTime = (date) => {\n const availableMap = {\n hour: getAvailableHours,\n minute: getAvailableMinutes,\n second: getAvailableSeconds\n };\n let result = date;\n [\"hour\", \"minute\", \"second\"].forEach((_) => {\n if (availableMap[_]) {\n let availableArr;\n const method = availableMap[_];\n if (_ === \"minute\") {\n availableArr = method(result.hour(), props.datetimeRole);\n } else if (_ === \"second\") {\n availableArr = method(result.hour(), result.minute(), props.datetimeRole);\n } else {\n availableArr = method(props.datetimeRole);\n }\n if (availableArr && availableArr.length && !availableArr.includes(result[_]())) {\n result = result[_](availableArr[0]);\n }\n }\n });\n return result;\n };\n const parseUserInput = (value) => {\n if (!value)\n return null;\n return dayjs(value, props.format);\n };\n const formatToString = (value) => {\n if (!value)\n return null;\n return value.format(props.format);\n };\n const getDefaultValue = () => {\n return dayjs(defaultValue);\n };\n ctx.emit(\"set-picker-option\", [\"isValidValue\", isValidValue]);\n ctx.emit(\"set-picker-option\", [\"formatToString\", formatToString]);\n ctx.emit(\"set-picker-option\", [\"parseUserInput\", parseUserInput]);\n ctx.emit(\"set-picker-option\", [\"handleKeydown\", handleKeydown]);\n ctx.emit(\"set-picker-option\", [\"getRangeAvailableTime\", getRangeAvailableTime]);\n ctx.emit(\"set-picker-option\", [\"getDefaultValue\", getDefaultValue]);\n const timePickerOptions = {};\n const onSetOption = (e) => {\n timePickerOptions[e[0]] = e[1];\n };\n const pickerBase = inject(\"EP_PICKER_BASE\");\n const { arrowControl, disabledHours, disabledMinutes, disabledSeconds, defaultValue } = pickerBase.props;\n const {\n getAvailableHours,\n getAvailableMinutes,\n getAvailableSeconds\n } = getAvailableArrs(disabledHours, disabledMinutes, disabledSeconds);\n return {\n transitionName,\n arrowControl,\n onSetOption,\n t,\n handleConfirm,\n handleChange,\n setSelectionRange,\n amPmMode,\n showSeconds,\n handleCancel,\n disabledHours,\n disabledMinutes,\n disabledSeconds\n };\n }\n});\n\nconst _hoisted_1$2 = {\n key: 0,\n class: \"el-time-panel\"\n};\nconst _hoisted_2$1 = { class: \"el-time-panel__footer\" };\nfunction render$2(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_time_spinner = resolveComponent(\"time-spinner\");\n return openBlock(), createBlock(Transition, { name: _ctx.transitionName }, {\n default: withCtx(() => [\n _ctx.actualVisible || _ctx.visible ? (openBlock(), createBlock(\"div\", _hoisted_1$2, [\n createVNode(\"div\", {\n class: [\"el-time-panel__content\", { \"has-seconds\": _ctx.showSeconds }]\n }, [\n createVNode(_component_time_spinner, {\n ref: \"spinner\",\n role: _ctx.datetimeRole || \"start\",\n \"arrow-control\": _ctx.arrowControl,\n \"show-seconds\": _ctx.showSeconds,\n \"am-pm-mode\": _ctx.amPmMode,\n \"spinner-date\": _ctx.parsedValue,\n \"disabled-hours\": _ctx.disabledHours,\n \"disabled-minutes\": _ctx.disabledMinutes,\n \"disabled-seconds\": _ctx.disabledSeconds,\n onChange: _ctx.handleChange,\n onSetOption: _ctx.onSetOption,\n onSelectRange: _ctx.setSelectionRange\n }, null, 8, [\"role\", \"arrow-control\", \"show-seconds\", \"am-pm-mode\", \"spinner-date\", \"disabled-hours\", \"disabled-minutes\", \"disabled-seconds\", \"onChange\", \"onSetOption\", \"onSelectRange\"])\n ], 2),\n createVNode(\"div\", _hoisted_2$1, [\n createVNode(\"button\", {\n type: \"button\",\n class: \"el-time-panel__btn cancel\",\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleCancel && _ctx.handleCancel(...args))\n }, toDisplayString(_ctx.t(\"el.datepicker.cancel\")), 1),\n createVNode(\"button\", {\n type: \"button\",\n class: \"el-time-panel__btn confirm\",\n onClick: _cache[2] || (_cache[2] = ($event) => _ctx.handleConfirm())\n }, toDisplayString(_ctx.t(\"el.datepicker.confirm\")), 1)\n ])\n ])) : createCommentVNode(\"v-if\", true)\n ]),\n _: 1\n }, 8, [\"name\"]);\n}\n\nscript$2.render = render$2;\nscript$2.__file = \"packages/time-picker/src/time-picker-com/panel-time-pick.vue\";\n\nconst makeSelectRange = (start, end) => {\n const result = [];\n for (let i = start; i <= end; i++) {\n result.push(i);\n }\n return result;\n};\nvar script$3 = defineComponent({\n components: { TimeSpinner: script$1 },\n props: {\n visible: Boolean,\n actualVisible: Boolean,\n parsedValue: {\n type: [Array, String]\n },\n format: {\n type: String,\n default: \"\"\n }\n },\n emits: [\"pick\", \"select-range\", \"set-picker-option\"],\n setup(props, ctx) {\n const { t } = useLocaleInject();\n const minDate = computed(() => props.parsedValue[0]);\n const maxDate = computed(() => props.parsedValue[1]);\n const oldValue = useOldValue(props);\n const handleCancel = () => {\n ctx.emit(\"pick\", oldValue.value, null);\n };\n const showSeconds = computed(() => {\n return props.format.includes(\"ss\");\n });\n const amPmMode = computed(() => {\n if (props.format.includes(\"A\"))\n return \"A\";\n if (props.format.includes(\"a\"))\n return \"a\";\n return \"\";\n });\n const minSelectableRange = ref([]);\n const maxSelectableRange = ref([]);\n const handleConfirm = (visible = false) => {\n ctx.emit(\"pick\", [minDate.value, maxDate.value], visible);\n };\n const handleMinChange = (date) => {\n handleChange(date.millisecond(0), maxDate.value);\n };\n const handleMaxChange = (date) => {\n handleChange(minDate.value, date.millisecond(0));\n };\n const isValidValue = (_date) => {\n const parsedDate = _date.map((_) => dayjs(_));\n const result = getRangeAvailableTime(parsedDate);\n return parsedDate[0].isSame(result[0]) && parsedDate[1].isSame(result[1]);\n };\n const handleChange = (_minDate, _maxDate) => {\n ctx.emit(\"pick\", [_minDate, _maxDate], true);\n };\n const btnConfirmDisabled = computed(() => {\n return minDate.value > maxDate.value;\n });\n const selectionRange = ref([0, 2]);\n const setMinSelectionRange = (start, end) => {\n ctx.emit(\"select-range\", start, end, \"min\");\n selectionRange.value = [start, end];\n };\n const offset = computed(() => showSeconds.value ? 11 : 8);\n const setMaxSelectionRange = (start, end) => {\n ctx.emit(\"select-range\", start, end, \"max\");\n selectionRange.value = [start + offset.value, end + offset.value];\n };\n const changeSelectionRange = (step) => {\n const list = showSeconds.value ? [0, 3, 6, 11, 14, 17] : [0, 3, 8, 11];\n const mapping = [\"hours\", \"minutes\"].concat(showSeconds.value ? [\"seconds\"] : []);\n const index = list.indexOf(selectionRange.value[0]);\n const next = (index + step + list.length) % list.length;\n const half = list.length / 2;\n if (next < half) {\n timePickerOptions[\"start_emitSelectRange\"](mapping[next]);\n } else {\n timePickerOptions[\"end_emitSelectRange\"](mapping[next - half]);\n }\n };\n const handleKeydown = (event) => {\n const code = event.code;\n if (code === EVENT_CODE.left || code === EVENT_CODE.right) {\n const step = code === EVENT_CODE.left ? -1 : 1;\n changeSelectionRange(step);\n event.preventDefault();\n return;\n }\n if (code === EVENT_CODE.up || code === EVENT_CODE.down) {\n const step = code === EVENT_CODE.up ? -1 : 1;\n const role = selectionRange.value[0] < offset.value ? \"start\" : \"end\";\n timePickerOptions[`${role}_scrollDown`](step);\n event.preventDefault();\n return;\n }\n };\n const disabledHours_ = (role, compare) => {\n const defaultDisable = disabledHours ? disabledHours(role) : [];\n const isStart = role === \"start\";\n const compareDate = compare || (isStart ? maxDate.value : minDate.value);\n const compareHour = compareDate.hour();\n const nextDisable = isStart ? makeSelectRange(compareHour + 1, 23) : makeSelectRange(0, compareHour - 1);\n return union(defaultDisable, nextDisable);\n };\n const disabledMinutes_ = (hour, role, compare) => {\n const defaultDisable = disabledMinutes ? disabledMinutes(hour, role) : [];\n const isStart = role === \"start\";\n const compareDate = compare || (isStart ? maxDate.value : minDate.value);\n const compareHour = compareDate.hour();\n if (hour !== compareHour) {\n return defaultDisable;\n }\n const compareMinute = compareDate.minute();\n const nextDisable = isStart ? makeSelectRange(compareMinute + 1, 59) : makeSelectRange(0, compareMinute - 1);\n return union(defaultDisable, nextDisable);\n };\n const disabledSeconds_ = (hour, minute, role, compare) => {\n const defaultDisable = disabledSeconds ? disabledSeconds(hour, minute, role) : [];\n const isStart = role === \"start\";\n const compareDate = compare || (isStart ? maxDate.value : minDate.value);\n const compareHour = compareDate.hour();\n const compareMinute = compareDate.minute();\n if (hour !== compareHour || minute !== compareMinute) {\n return defaultDisable;\n }\n const compareSecond = compareDate.second();\n const nextDisable = isStart ? makeSelectRange(compareSecond + 1, 59) : makeSelectRange(0, compareSecond - 1);\n return union(defaultDisable, nextDisable);\n };\n const getRangeAvailableTime = (dates) => {\n return dates.map((_, index) => getRangeAvailableTimeEach(dates[0], dates[1], index === 0 ? \"start\" : \"end\"));\n };\n const {\n getAvailableHours,\n getAvailableMinutes,\n getAvailableSeconds\n } = getAvailableArrs(disabledHours_, disabledMinutes_, disabledSeconds_);\n const getRangeAvailableTimeEach = (startDate, endDate, role) => {\n const availableMap = {\n hour: getAvailableHours,\n minute: getAvailableMinutes,\n second: getAvailableSeconds\n };\n const isStart = role === \"start\";\n let result = isStart ? startDate : endDate;\n const compareDate = isStart ? endDate : startDate;\n [\"hour\", \"minute\", \"second\"].forEach((_) => {\n if (availableMap[_]) {\n let availableArr;\n const method = availableMap[_];\n if (_ === \"minute\") {\n availableArr = method(result.hour(), role, compareDate);\n } else if (_ === \"second\") {\n availableArr = method(result.hour(), result.minute(), role, compareDate);\n } else {\n availableArr = method(role, compareDate);\n }\n if (availableArr && availableArr.length && !availableArr.includes(result[_]())) {\n const pos = isStart ? 0 : availableArr.length - 1;\n result = result[_](availableArr[pos]);\n }\n }\n });\n return result;\n };\n const parseUserInput = (value) => {\n if (!value)\n return null;\n if (Array.isArray(value)) {\n return value.map((_) => dayjs(_, props.format));\n }\n return dayjs(value, props.format);\n };\n const formatToString = (value) => {\n if (!value)\n return null;\n if (Array.isArray(value)) {\n return value.map((_) => _.format(props.format));\n }\n return value.format(props.format);\n };\n const getDefaultValue = () => {\n if (Array.isArray(defaultValue)) {\n return defaultValue.map((_) => dayjs(_));\n }\n return [\n dayjs(defaultValue),\n dayjs(defaultValue).add(60, \"m\")\n ];\n };\n ctx.emit(\"set-picker-option\", [\"formatToString\", formatToString]);\n ctx.emit(\"set-picker-option\", [\"parseUserInput\", parseUserInput]);\n ctx.emit(\"set-picker-option\", [\"isValidValue\", isValidValue]);\n ctx.emit(\"set-picker-option\", [\"handleKeydown\", handleKeydown]);\n ctx.emit(\"set-picker-option\", [\"getDefaultValue\", getDefaultValue]);\n ctx.emit(\"set-picker-option\", [\"getRangeAvailableTime\", getRangeAvailableTime]);\n const timePickerOptions = {};\n const onSetOption = (e) => {\n timePickerOptions[e[0]] = e[1];\n };\n const pickerBase = inject(\"EP_PICKER_BASE\");\n const { arrowControl, disabledHours, disabledMinutes, disabledSeconds, defaultValue } = pickerBase.props;\n return {\n arrowControl,\n onSetOption,\n setMaxSelectionRange,\n setMinSelectionRange,\n btnConfirmDisabled,\n handleCancel,\n handleConfirm,\n t,\n showSeconds,\n minDate,\n maxDate,\n amPmMode,\n handleMinChange,\n handleMaxChange,\n minSelectableRange,\n maxSelectableRange,\n disabledHours_,\n disabledMinutes_,\n disabledSeconds_\n };\n }\n});\n\nconst _hoisted_1$3 = {\n key: 0,\n class: \"el-time-range-picker el-picker-panel\"\n};\nconst _hoisted_2$2 = { class: \"el-time-range-picker__content\" };\nconst _hoisted_3$1 = { class: \"el-time-range-picker__cell\" };\nconst _hoisted_4 = { class: \"el-time-range-picker__header\" };\nconst _hoisted_5 = { class: \"el-time-range-picker__cell\" };\nconst _hoisted_6 = { class: \"el-time-range-picker__header\" };\nconst _hoisted_7 = { class: \"el-time-panel__footer\" };\nfunction render$3(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_time_spinner = resolveComponent(\"time-spinner\");\n return _ctx.actualVisible ? (openBlock(), createBlock(\"div\", _hoisted_1$3, [\n createVNode(\"div\", _hoisted_2$2, [\n createVNode(\"div\", _hoisted_3$1, [\n createVNode(\"div\", _hoisted_4, toDisplayString(_ctx.t(\"el.datepicker.startTime\")), 1),\n createVNode(\"div\", {\n class: [{ \"has-seconds\": _ctx.showSeconds, \"is-arrow\": _ctx.arrowControl }, \"el-time-range-picker__body el-time-panel__content\"]\n }, [\n createVNode(_component_time_spinner, {\n ref: \"minSpinner\",\n role: \"start\",\n \"show-seconds\": _ctx.showSeconds,\n \"am-pm-mode\": _ctx.amPmMode,\n \"arrow-control\": _ctx.arrowControl,\n \"spinner-date\": _ctx.minDate,\n \"disabled-hours\": _ctx.disabledHours_,\n \"disabled-minutes\": _ctx.disabledMinutes_,\n \"disabled-seconds\": _ctx.disabledSeconds_,\n onChange: _ctx.handleMinChange,\n onSetOption: _ctx.onSetOption,\n onSelectRange: _ctx.setMinSelectionRange\n }, null, 8, [\"show-seconds\", \"am-pm-mode\", \"arrow-control\", \"spinner-date\", \"disabled-hours\", \"disabled-minutes\", \"disabled-seconds\", \"onChange\", \"onSetOption\", \"onSelectRange\"])\n ], 2)\n ]),\n createVNode(\"div\", _hoisted_5, [\n createVNode(\"div\", _hoisted_6, toDisplayString(_ctx.t(\"el.datepicker.endTime\")), 1),\n createVNode(\"div\", {\n class: [{ \"has-seconds\": _ctx.showSeconds, \"is-arrow\": _ctx.arrowControl }, \"el-time-range-picker__body el-time-panel__content\"]\n }, [\n createVNode(_component_time_spinner, {\n ref: \"maxSpinner\",\n role: \"end\",\n \"show-seconds\": _ctx.showSeconds,\n \"am-pm-mode\": _ctx.amPmMode,\n \"arrow-control\": _ctx.arrowControl,\n \"spinner-date\": _ctx.maxDate,\n \"disabled-hours\": _ctx.disabledHours_,\n \"disabled-minutes\": _ctx.disabledMinutes_,\n \"disabled-seconds\": _ctx.disabledSeconds_,\n onChange: _ctx.handleMaxChange,\n onSetOption: _ctx.onSetOption,\n onSelectRange: _ctx.setMaxSelectionRange\n }, null, 8, [\"show-seconds\", \"am-pm-mode\", \"arrow-control\", \"spinner-date\", \"disabled-hours\", \"disabled-minutes\", \"disabled-seconds\", \"onChange\", \"onSetOption\", \"onSelectRange\"])\n ], 2)\n ])\n ]),\n createVNode(\"div\", _hoisted_7, [\n createVNode(\"button\", {\n type: \"button\",\n class: \"el-time-panel__btn cancel\",\n onClick: _cache[1] || (_cache[1] = ($event) => _ctx.handleCancel())\n }, toDisplayString(_ctx.t(\"el.datepicker.cancel\")), 1),\n createVNode(\"button\", {\n type: \"button\",\n class: \"el-time-panel__btn confirm\",\n disabled: _ctx.btnConfirmDisabled,\n onClick: _cache[2] || (_cache[2] = ($event) => _ctx.handleConfirm())\n }, toDisplayString(_ctx.t(\"el.datepicker.confirm\")), 9, [\"disabled\"])\n ])\n ])) : createCommentVNode(\"v-if\", true);\n}\n\nscript$3.render = render$3;\nscript$3.__file = \"packages/time-picker/src/time-picker-com/panel-time-range.vue\";\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\ndayjs.extend(customParseFormat);\nvar TimePicker = defineComponent({\n name: \"ElTimePicker\",\n install: null,\n props: __spreadProps(__spreadValues({}, defaultProps), {\n isRange: {\n type: Boolean,\n default: false\n }\n }),\n emits: [\"update:modelValue\"],\n setup(props, ctx) {\n const commonPicker = ref(null);\n const type = props.isRange ? \"timerange\" : \"time\";\n const panel = props.isRange ? script$3 : script$2;\n const refProps = __spreadProps(__spreadValues({}, props), {\n focus: () => {\n var _a;\n (_a = commonPicker.value) == null ? void 0 : _a.handleFocus();\n },\n blur: () => {\n var _a;\n (_a = commonPicker.value) == null ? void 0 : _a.handleBlur();\n }\n });\n provide(\"ElPopperOptions\", props.popperOptions);\n ctx.expose(refProps);\n return () => {\n var _a;\n const format = (_a = props.format) != null ? _a : DEFAULT_FORMATS_TIME;\n return h(script, __spreadProps(__spreadValues({}, props), {\n format,\n type,\n ref: commonPicker,\n \"onUpdate:modelValue\": (value) => ctx.emit(\"update:modelValue\", value)\n }), {\n default: (scopedProps) => h(panel, scopedProps)\n });\n };\n }\n});\n\nconst rangeArr = (n) => {\n return Array.from(Array(n).keys());\n};\nconst extractDateFormat = (format) => {\n return format.replace(/\\W?m{1,2}|\\W?ZZ/g, \"\").replace(/\\W?h{1,2}|\\W?s{1,3}|\\W?a/gi, \"\").trim();\n};\nconst extractTimeFormat = (format) => {\n return format.replace(/\\W?D{1,2}|\\W?Do|\\W?d{1,4}|\\W?M{1,4}|\\W?Y{2,4}/g, \"\").trim();\n};\n\nconst _TimePicker = TimePicker;\n_TimePicker.install = (app) => {\n app.component(_TimePicker.name, _TimePicker);\n};\n\nexport default _TimePicker;\nexport { script as CommonPicker, DEFAULT_FORMATS_DATE, DEFAULT_FORMATS_DATEPICKER, DEFAULT_FORMATS_TIME, script$2 as TimePickPanel, defaultProps, extractDateFormat, extractTimeFormat, rangeArr };\n","import ElButton from '../el-button';\nimport ElButtonGroup from '../el-button-group';\nimport { useLocaleInject } from '../hooks';\nimport { defineComponent, ref, computed, openBlock, createBlock, Fragment, renderList, toDisplayString, createCommentVNode, createVNode, renderSlot, resolveComponent, withCtx, createTextVNode, createSlots } from 'vue';\nimport dayjs from 'dayjs';\nimport localeData from 'dayjs/plugin/localeData';\nimport { rangeArr } from '../el-time-picker';\n\ndayjs.extend(localeData);\nconst getPrevMonthLastDays = (date, amount) => {\n const lastDay = date.subtract(1, \"month\").endOf(\"month\").date();\n return rangeArr(amount).map((_, index) => lastDay - (amount - index - 1));\n};\nconst getMonthDays = (date) => {\n const days = date.daysInMonth();\n return rangeArr(days).map((_, index) => index + 1);\n};\nvar script = defineComponent({\n props: {\n selectedDay: {\n type: Object\n },\n range: {\n type: Array\n },\n date: {\n type: Object\n },\n hideHeader: {\n type: Boolean\n }\n },\n emits: [\"pick\"],\n setup(props, ctx) {\n const WEEK_DAYS = ref(dayjs().localeData().weekdaysShort());\n const now = dayjs();\n const firstDayOfWeek = now.$locale().weekStart || 0;\n const toNestedArr = (days) => {\n return rangeArr(days.length / 7).map((_, index) => {\n const start = index * 7;\n return days.slice(start, start + 7);\n });\n };\n const getFormattedDate = (day, type) => {\n let result;\n if (type === \"prev\") {\n result = props.date.startOf(\"month\").subtract(1, \"month\").date(day);\n } else if (type === \"next\") {\n result = props.date.startOf(\"month\").add(1, \"month\").date(day);\n } else {\n result = props.date.date(day);\n }\n return result;\n };\n const getCellClass = ({ text, type }) => {\n const classes = [type];\n if (type === \"current\") {\n const date_ = getFormattedDate(text, type);\n if (date_.isSame(props.selectedDay, \"day\")) {\n classes.push(\"is-selected\");\n }\n if (date_.isSame(now, \"day\")) {\n classes.push(\"is-today\");\n }\n }\n return classes;\n };\n const pickDay = ({ text, type }) => {\n const date = getFormattedDate(text, type);\n ctx.emit(\"pick\", date);\n };\n const getSlotData = ({ text, type }) => {\n const day = getFormattedDate(text, type);\n return {\n isSelected: day.isSame(props.selectedDay),\n type: `${type}-month`,\n day: day.format(\"YYYY-MM-DD\"),\n date: day.toDate()\n };\n };\n const isInRange = computed(() => {\n return props.range && props.range.length;\n });\n const rows = computed(() => {\n let days = [];\n if (isInRange.value) {\n const [start, end] = props.range;\n const currentMonthRange = rangeArr(end.date() - start.date() + 1).map((_, index) => ({\n text: start.date() + index,\n type: \"current\"\n }));\n let remaining = currentMonthRange.length % 7;\n remaining = remaining === 0 ? 0 : 7 - remaining;\n const nextMonthRange = rangeArr(remaining).map((_, index) => ({\n text: index + 1,\n type: \"next\"\n }));\n days = currentMonthRange.concat(nextMonthRange);\n } else {\n const firstDay = props.date.startOf(\"month\").day() || 7;\n const prevMonthDays = getPrevMonthLastDays(props.date, firstDay - firstDayOfWeek).map((day) => ({\n text: day,\n type: \"prev\"\n }));\n const currentMonthDays = getMonthDays(props.date).map((day) => ({\n text: day,\n type: \"current\"\n }));\n days = [...prevMonthDays, ...currentMonthDays];\n const nextMonthDays = rangeArr(42 - days.length).map((_, index) => ({\n text: index + 1,\n type: \"next\"\n }));\n days = days.concat(nextMonthDays);\n }\n return toNestedArr(days);\n });\n const weekDays = computed(() => {\n const start = firstDayOfWeek;\n if (start === 0) {\n return WEEK_DAYS.value;\n } else {\n return WEEK_DAYS.value.slice(start).concat(WEEK_DAYS.value.slice(0, start));\n }\n });\n return {\n isInRange,\n weekDays,\n rows,\n getCellClass,\n pickDay,\n getSlotData\n };\n }\n});\n\nconst _hoisted_1 = { key: 0 };\nconst _hoisted_2 = { class: \"el-calendar-day\" };\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"table\", {\n class: {\n \"el-calendar-table\": true,\n \"is-range\": _ctx.isInRange\n },\n cellspacing: \"0\",\n cellpadding: \"0\"\n }, [\n !_ctx.hideHeader ? (openBlock(), createBlock(\"thead\", _hoisted_1, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.weekDays, (day) => {\n return openBlock(), createBlock(\"th\", { key: day }, toDisplayString(day), 1);\n }), 128))\n ])) : createCommentVNode(\"v-if\", true),\n createVNode(\"tbody\", null, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.rows, (row, index) => {\n return openBlock(), createBlock(\"tr\", {\n key: index,\n class: {\n \"el-calendar-table__row\": true,\n \"el-calendar-table__row--hide-border\": index === 0 && _ctx.hideHeader\n }\n }, [\n (openBlock(true), createBlock(Fragment, null, renderList(row, (cell, key) => {\n return openBlock(), createBlock(\"td\", {\n key,\n class: _ctx.getCellClass(cell),\n onClick: ($event) => _ctx.pickDay(cell)\n }, [\n createVNode(\"div\", _hoisted_2, [\n renderSlot(_ctx.$slots, \"dateCell\", {\n data: _ctx.getSlotData(cell)\n }, () => [\n createVNode(\"span\", null, toDisplayString(cell.text), 1)\n ])\n ])\n ], 10, [\"onClick\"]);\n }), 128))\n ], 2);\n }), 128))\n ])\n ], 2);\n}\n\nscript.render = render;\nscript.__file = \"packages/calendar/src/date-table.vue\";\n\nvar script$1 = defineComponent({\n name: \"ElCalendar\",\n components: {\n DateTable: script,\n ElButton,\n ElButtonGroup\n },\n props: {\n modelValue: {\n type: Date\n },\n range: {\n type: Array,\n validator: (range) => {\n if (Array.isArray(range)) {\n return range.length === 2 && range.every((item) => item instanceof Date);\n }\n return false;\n }\n }\n },\n emits: [\"input\", \"update:modelValue\"],\n setup(props, ctx) {\n const { t } = useLocaleInject();\n const selectedDay = ref(null);\n const now = dayjs();\n const prevMonthDayjs = computed(() => {\n return date.value.subtract(1, \"month\");\n });\n const curMonthDatePrefix = computed(() => {\n return dayjs(date.value).format(\"YYYY-MM\");\n });\n const nextMonthDayjs = computed(() => {\n return date.value.add(1, \"month\");\n });\n const i18nDate = computed(() => {\n const pickedMonth = `el.datepicker.month${date.value.format(\"M\")}`;\n return `${date.value.year()} ${t(\"el.datepicker.year\")} ${t(pickedMonth)}`;\n });\n const realSelectedDay = computed({\n get() {\n if (!props.modelValue)\n return selectedDay.value;\n return date.value;\n },\n set(val) {\n selectedDay.value = val;\n const result = val.toDate();\n ctx.emit(\"input\", result);\n ctx.emit(\"update:modelValue\", result);\n }\n });\n const date = computed(() => {\n if (!props.modelValue) {\n if (realSelectedDay.value) {\n return realSelectedDay.value;\n } else if (validatedRange.value.length) {\n return validatedRange.value[0][0];\n }\n return now;\n } else {\n return dayjs(props.modelValue);\n }\n });\n const validatedRange = computed(() => {\n if (!props.range)\n return [];\n const rangeArrDayjs = props.range.map((_) => dayjs(_));\n const [startDayjs, endDayjs] = rangeArrDayjs;\n if (startDayjs.isAfter(endDayjs)) {\n console.warn(\"[ElementCalendar]end time should be greater than start time\");\n return [];\n }\n if (startDayjs.isSame(endDayjs, \"month\")) {\n return [[\n startDayjs.startOf(\"week\"),\n endDayjs.endOf(\"week\")\n ]];\n } else {\n if (startDayjs.add(1, \"month\").month() !== endDayjs.month()) {\n console.warn(\"[ElementCalendar]start time and end time interval must not exceed two months\");\n return [];\n }\n const endMonthFirstDay = endDayjs.startOf(\"month\");\n const endMonthFirstWeekDay = endMonthFirstDay.startOf(\"week\");\n let endMonthStart = endMonthFirstDay;\n if (!endMonthFirstDay.isSame(endMonthFirstWeekDay, \"month\")) {\n endMonthStart = endMonthFirstDay.endOf(\"week\").add(1, \"day\");\n }\n return [\n [\n startDayjs.startOf(\"week\"),\n startDayjs.endOf(\"month\")\n ],\n [\n endMonthStart,\n endDayjs.endOf(\"week\")\n ]\n ];\n }\n });\n const pickDay = (day) => {\n realSelectedDay.value = day;\n };\n const selectDate = (type) => {\n let day;\n if (type === \"prev-month\") {\n day = prevMonthDayjs.value;\n } else if (type === \"next-month\") {\n day = nextMonthDayjs.value;\n } else {\n day = now;\n }\n if (day.isSame(date.value, \"day\"))\n return;\n pickDay(day);\n };\n return {\n selectedDay,\n curMonthDatePrefix,\n i18nDate,\n realSelectedDay,\n date,\n validatedRange,\n pickDay,\n selectDate,\n t\n };\n }\n});\n\nconst _hoisted_1$1 = { class: \"el-calendar\" };\nconst _hoisted_2$1 = { class: \"el-calendar__header\" };\nconst _hoisted_3 = { class: \"el-calendar__title\" };\nconst _hoisted_4 = {\n key: 0,\n class: \"el-calendar__button-group\"\n};\nconst _hoisted_5 = {\n key: 0,\n class: \"el-calendar__body\"\n};\nconst _hoisted_6 = {\n key: 1,\n class: \"el-calendar__body\"\n};\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_button = resolveComponent(\"el-button\");\n const _component_el_button_group = resolveComponent(\"el-button-group\");\n const _component_date_table = resolveComponent(\"date-table\");\n return openBlock(), createBlock(\"div\", _hoisted_1$1, [\n createVNode(\"div\", _hoisted_2$1, [\n createVNode(\"div\", _hoisted_3, toDisplayString(_ctx.i18nDate), 1),\n _ctx.validatedRange.length === 0 ? (openBlock(), createBlock(\"div\", _hoisted_4, [\n createVNode(_component_el_button_group, null, {\n default: withCtx(() => [\n createVNode(_component_el_button, {\n size: \"mini\",\n onClick: _cache[1] || (_cache[1] = ($event) => _ctx.selectDate(\"prev-month\"))\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.t(\"el.datepicker.prevMonth\")), 1)\n ]),\n _: 1\n }),\n createVNode(_component_el_button, {\n size: \"mini\",\n onClick: _cache[2] || (_cache[2] = ($event) => _ctx.selectDate(\"today\"))\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.t(\"el.datepicker.today\")), 1)\n ]),\n _: 1\n }),\n createVNode(_component_el_button, {\n size: \"mini\",\n onClick: _cache[3] || (_cache[3] = ($event) => _ctx.selectDate(\"next-month\"))\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.t(\"el.datepicker.nextMonth\")), 1)\n ]),\n _: 1\n })\n ]),\n _: 1\n })\n ])) : createCommentVNode(\"v-if\", true)\n ]),\n _ctx.validatedRange.length === 0 ? (openBlock(), createBlock(\"div\", _hoisted_5, [\n createVNode(_component_date_table, {\n date: _ctx.date,\n \"selected-day\": _ctx.realSelectedDay,\n onPick: _ctx.pickDay\n }, createSlots({ _: 2 }, [\n _ctx.$slots.dateCell ? {\n name: \"dateCell\",\n fn: withCtx((data) => [\n renderSlot(_ctx.$slots, \"dateCell\", data)\n ])\n } : void 0\n ]), 1032, [\"date\", \"selected-day\", \"onPick\"])\n ])) : (openBlock(), createBlock(\"div\", _hoisted_6, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.validatedRange, (range_, index) => {\n return openBlock(), createBlock(_component_date_table, {\n key: index,\n date: range_[0],\n \"selected-day\": _ctx.realSelectedDay,\n range: range_,\n \"hide-header\": index !== 0,\n onPick: _ctx.pickDay\n }, createSlots({ _: 2 }, [\n _ctx.$slots.dateCell ? {\n name: \"dateCell\",\n fn: withCtx((data) => [\n renderSlot(_ctx.$slots, \"dateCell\", data)\n ])\n } : void 0\n ]), 1032, [\"date\", \"selected-day\", \"range\", \"hide-header\", \"onPick\"]);\n }), 128))\n ]))\n ]);\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"packages/calendar/src/index.vue\";\n\nscript$1.install = (app) => {\n app.component(script$1.name, script$1);\n};\nconst _Calendar = script$1;\n\nexport default _Calendar;\n","import { defineComponent, openBlock, createBlock, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createVNode } from 'vue';\n\nvar script = defineComponent({\n name: \"ElCard\",\n props: {\n header: {\n type: String,\n default: \"\"\n },\n bodyStyle: {\n type: [String, Object, Array],\n default: \"\"\n },\n shadow: {\n type: String,\n default: \"\"\n }\n }\n});\n\nconst _hoisted_1 = {\n key: 0,\n class: \"el-card__header\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", {\n class: [\"el-card\", _ctx.shadow ? \"is-\" + _ctx.shadow + \"-shadow\" : \"is-always-shadow\"]\n }, [\n _ctx.$slots.header || _ctx.header ? (openBlock(), createBlock(\"div\", _hoisted_1, [\n renderSlot(_ctx.$slots, \"header\", {}, () => [\n createTextVNode(toDisplayString(_ctx.header), 1)\n ])\n ])) : createCommentVNode(\"v-if\", true),\n createVNode(\"div\", {\n class: \"el-card__body\",\n style: _ctx.bodyStyle\n }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 4)\n ], 2);\n}\n\nscript.render = render;\nscript.__file = \"packages/card/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Card = script;\n\nexport default _Card;\n","import { defineComponent, reactive, ref, computed, watch, onMounted, nextTick, onBeforeUnmount, provide, openBlock, createBlock, withModifiers, createVNode, Transition, withCtx, withDirectives, vShow, createCommentVNode, renderSlot, Fragment, renderList, toDisplayString } from 'vue';\nimport throttle from 'lodash/throttle';\nimport { addResizeListener, removeResizeListener } from '../utils/resize-event';\n\nvar script = defineComponent({\n name: \"ElCarousel\",\n props: {\n initialIndex: {\n type: Number,\n default: 0\n },\n height: { type: String, default: \"\" },\n trigger: {\n type: String,\n default: \"hover\"\n },\n autoplay: {\n type: Boolean,\n default: true\n },\n interval: {\n type: Number,\n default: 3e3\n },\n indicatorPosition: { type: String, default: \"\" },\n indicator: {\n type: Boolean,\n default: true\n },\n arrow: {\n type: String,\n default: \"hover\"\n },\n type: { type: String, default: \"\" },\n loop: {\n type: Boolean,\n default: true\n },\n direction: {\n type: String,\n default: \"horizontal\",\n validator(val) {\n return [\"horizontal\", \"vertical\"].includes(val);\n }\n },\n pauseOnHover: {\n type: Boolean,\n default: true\n }\n },\n emits: [\"change\"],\n setup(props, { emit }) {\n const data = reactive({\n activeIndex: -1,\n containerWidth: 0,\n timer: null,\n hover: false\n });\n const root = ref(null);\n const items = ref([]);\n const arrowDisplay = computed(() => props.arrow !== \"never\" && props.direction !== \"vertical\");\n const hasLabel = computed(() => {\n return items.value.some((item) => item.label.toString().length > 0);\n });\n const carouselClasses = computed(() => {\n const classes = [\"el-carousel\", \"el-carousel--\" + props.direction];\n if (props.type === \"card\") {\n classes.push(\"el-carousel--card\");\n }\n return classes;\n });\n const indicatorsClasses = computed(() => {\n const classes = [\n \"el-carousel__indicators\",\n \"el-carousel__indicators--\" + props.direction\n ];\n if (hasLabel.value) {\n classes.push(\"el-carousel__indicators--labels\");\n }\n if (props.indicatorPosition === \"outside\" || props.type === \"card\") {\n classes.push(\"el-carousel__indicators--outside\");\n }\n return classes;\n });\n const throttledArrowClick = throttle((index) => {\n setActiveItem(index);\n }, 300, { trailing: true });\n const throttledIndicatorHover = throttle((index) => {\n handleIndicatorHover(index);\n }, 300);\n function pauseTimer() {\n if (data.timer) {\n clearInterval(data.timer);\n data.timer = null;\n }\n }\n function startTimer() {\n if (props.interval <= 0 || !props.autoplay || data.timer)\n return;\n data.timer = setInterval(() => playSlides(), props.interval);\n }\n const playSlides = () => {\n if (data.activeIndex < items.value.length - 1) {\n data.activeIndex = data.activeIndex + 1;\n } else if (props.loop) {\n data.activeIndex = 0;\n }\n };\n function setActiveItem(index) {\n if (typeof index === \"string\") {\n const filteredItems = items.value.filter((item) => item.name === index);\n if (filteredItems.length > 0) {\n index = items.value.indexOf(filteredItems[0]);\n }\n }\n index = Number(index);\n if (isNaN(index) || index !== Math.floor(index)) {\n console.warn(\"[Element Warn][Carousel]index must be an integer.\");\n return;\n }\n let length = items.value.length;\n const oldIndex = data.activeIndex;\n if (index < 0) {\n data.activeIndex = props.loop ? length - 1 : 0;\n } else if (index >= length) {\n data.activeIndex = props.loop ? 0 : length - 1;\n } else {\n data.activeIndex = index;\n }\n if (oldIndex === data.activeIndex) {\n resetItemPosition(oldIndex);\n }\n }\n function resetItemPosition(oldIndex) {\n items.value.forEach((item, index) => {\n item.translateItem(index, data.activeIndex, oldIndex);\n });\n }\n function addItem(item) {\n items.value.push(item);\n }\n function removeItem(uid) {\n const index = items.value.findIndex((item) => item.uid === uid);\n if (index !== -1) {\n items.value.splice(index, 1);\n if (data.activeIndex === index)\n next();\n }\n }\n function itemInStage(item, index) {\n const length = items.value.length;\n if (index === length - 1 && item.inStage && items.value[0].active || item.inStage && items.value[index + 1] && items.value[index + 1].active) {\n return \"left\";\n } else if (index === 0 && item.inStage && items.value[length - 1].active || item.inStage && items.value[index - 1] && items.value[index - 1].active) {\n return \"right\";\n }\n return false;\n }\n function handleMouseEnter() {\n data.hover = true;\n if (props.pauseOnHover) {\n pauseTimer();\n }\n }\n function handleMouseLeave() {\n data.hover = false;\n startTimer();\n }\n function handleButtonEnter(arrow) {\n if (props.direction === \"vertical\")\n return;\n items.value.forEach((item, index) => {\n if (arrow === itemInStage(item, index)) {\n item.hover = true;\n }\n });\n }\n function handleButtonLeave() {\n if (props.direction === \"vertical\")\n return;\n items.value.forEach((item) => {\n item.hover = false;\n });\n }\n function handleIndicatorClick(index) {\n data.activeIndex = index;\n }\n function handleIndicatorHover(index) {\n if (props.trigger === \"hover\" && index !== data.activeIndex) {\n data.activeIndex = index;\n }\n }\n function prev() {\n setActiveItem(data.activeIndex - 1);\n }\n function next() {\n setActiveItem(data.activeIndex + 1);\n }\n watch(() => data.activeIndex, (current, prev2) => {\n resetItemPosition(prev2);\n if (prev2 > -1) {\n emit(\"change\", current, prev2);\n }\n });\n watch(() => props.autoplay, (current) => {\n current ? startTimer() : pauseTimer();\n });\n watch(() => props.loop, () => {\n setActiveItem(data.activeIndex);\n });\n onMounted(() => {\n nextTick(() => {\n addResizeListener(root.value, resetItemPosition);\n if (props.initialIndex < items.value.length && props.initialIndex >= 0) {\n data.activeIndex = props.initialIndex;\n }\n startTimer();\n });\n });\n onBeforeUnmount(() => {\n if (root.value)\n removeResizeListener(root.value, resetItemPosition);\n pauseTimer();\n });\n provide(\"injectCarouselScope\", {\n root,\n direction: props.direction,\n type: props.type,\n items,\n loop: props.loop,\n addItem,\n removeItem,\n setActiveItem\n });\n return {\n data,\n props,\n items,\n arrowDisplay,\n carouselClasses,\n indicatorsClasses,\n hasLabel,\n handleMouseEnter,\n handleMouseLeave,\n handleIndicatorClick,\n throttledArrowClick,\n throttledIndicatorHover,\n handleButtonEnter,\n handleButtonLeave,\n prev,\n next,\n setActiveItem,\n root\n };\n }\n});\n\nconst _hoisted_1 = /* @__PURE__ */ createVNode(\"i\", { class: \"el-icon-arrow-left\" }, null, -1);\nconst _hoisted_2 = /* @__PURE__ */ createVNode(\"i\", { class: \"el-icon-arrow-right\" }, null, -1);\nconst _hoisted_3 = { class: \"el-carousel__button\" };\nconst _hoisted_4 = { key: 0 };\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", {\n ref: \"root\",\n class: _ctx.carouselClasses,\n onMouseenter: _cache[7] || (_cache[7] = withModifiers((...args) => _ctx.handleMouseEnter && _ctx.handleMouseEnter(...args), [\"stop\"])),\n onMouseleave: _cache[8] || (_cache[8] = withModifiers((...args) => _ctx.handleMouseLeave && _ctx.handleMouseLeave(...args), [\"stop\"]))\n }, [\n createVNode(\"div\", {\n class: \"el-carousel__container\",\n style: { height: _ctx.height }\n }, [\n _ctx.arrowDisplay ? (openBlock(), createBlock(Transition, {\n key: 0,\n name: \"carousel-arrow-left\"\n }, {\n default: withCtx(() => [\n withDirectives(createVNode(\"button\", {\n type: \"button\",\n class: \"el-carousel__arrow el-carousel__arrow--left\",\n onMouseenter: _cache[1] || (_cache[1] = ($event) => _ctx.handleButtonEnter(\"left\")),\n onMouseleave: _cache[2] || (_cache[2] = (...args) => _ctx.handleButtonLeave && _ctx.handleButtonLeave(...args)),\n onClick: _cache[3] || (_cache[3] = withModifiers(($event) => _ctx.throttledArrowClick(_ctx.data.activeIndex - 1), [\"stop\"]))\n }, [\n _hoisted_1\n ], 544), [\n [\n vShow,\n (_ctx.arrow === \"always\" || _ctx.data.hover) && (_ctx.props.loop || _ctx.data.activeIndex > 0)\n ]\n ])\n ]),\n _: 1\n })) : createCommentVNode(\"v-if\", true),\n _ctx.arrowDisplay ? (openBlock(), createBlock(Transition, {\n key: 1,\n name: \"carousel-arrow-right\"\n }, {\n default: withCtx(() => [\n withDirectives(createVNode(\"button\", {\n type: \"button\",\n class: \"el-carousel__arrow el-carousel__arrow--right\",\n onMouseenter: _cache[4] || (_cache[4] = ($event) => _ctx.handleButtonEnter(\"right\")),\n onMouseleave: _cache[5] || (_cache[5] = (...args) => _ctx.handleButtonLeave && _ctx.handleButtonLeave(...args)),\n onClick: _cache[6] || (_cache[6] = withModifiers(($event) => _ctx.throttledArrowClick(_ctx.data.activeIndex + 1), [\"stop\"]))\n }, [\n _hoisted_2\n ], 544), [\n [\n vShow,\n (_ctx.arrow === \"always\" || _ctx.data.hover) && (_ctx.props.loop || _ctx.data.activeIndex < _ctx.items.length - 1)\n ]\n ])\n ]),\n _: 1\n })) : createCommentVNode(\"v-if\", true),\n renderSlot(_ctx.$slots, \"default\")\n ], 4),\n _ctx.indicatorPosition !== \"none\" ? (openBlock(), createBlock(\"ul\", {\n key: 0,\n class: _ctx.indicatorsClasses\n }, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.items, (item, index) => {\n return openBlock(), createBlock(\"li\", {\n key: index,\n class: [\n \"el-carousel__indicator\",\n \"el-carousel__indicator--\" + _ctx.direction,\n { \"is-active\": index === _ctx.data.activeIndex }\n ],\n onMouseenter: ($event) => _ctx.throttledIndicatorHover(index),\n onClick: withModifiers(($event) => _ctx.handleIndicatorClick(index), [\"stop\"])\n }, [\n createVNode(\"button\", _hoisted_3, [\n _ctx.hasLabel ? (openBlock(), createBlock(\"span\", _hoisted_4, toDisplayString(item.label), 1)) : createCommentVNode(\"v-if\", true)\n ])\n ], 42, [\"onMouseenter\", \"onClick\"]);\n }), 128))\n ], 2)) : createCommentVNode(\"v-if\", true)\n ], 34);\n}\n\nscript.render = render;\nscript.__file = \"packages/carousel/src/main.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Carousel = script;\n\nexport default _Carousel;\n","import { defineComponent, getCurrentInstance, reactive, inject, computed, onMounted, toRefs, onUnmounted, withDirectives, openBlock, createBlock, vShow, createCommentVNode, renderSlot } from 'vue';\nimport { autoprefixer } from '../utils/util';\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nconst CARD_SCALE = 0.83;\nvar script = defineComponent({\n name: \"ElCarouselItem\",\n props: {\n name: { type: String, default: \"\" },\n label: {\n type: [String, Number],\n default: \"\"\n }\n },\n setup(props) {\n const instance = getCurrentInstance();\n instance.uid;\n const data = reactive({\n hover: false,\n translate: 0,\n scale: 1,\n active: false,\n ready: false,\n inStage: false,\n animating: false\n });\n const injectCarouselScope = inject(\"injectCarouselScope\");\n const parentDirection = computed(() => {\n return injectCarouselScope.direction;\n });\n const itemStyle = computed(() => {\n const translateType = parentDirection.value === \"vertical\" ? \"translateY\" : \"translateX\";\n const value = `${translateType}(${data.translate}px) scale(${data.scale})`;\n const style = {\n transform: value\n };\n return autoprefixer(style);\n });\n function processIndex(index, activeIndex, length) {\n if (activeIndex === 0 && index === length - 1) {\n return -1;\n } else if (activeIndex === length - 1 && index === 0) {\n return length;\n } else if (index < activeIndex - 1 && activeIndex - index >= length / 2) {\n return length + 1;\n } else if (index > activeIndex + 1 && index - activeIndex >= length / 2) {\n return -2;\n }\n return index;\n }\n function calcCardTranslate(index, activeIndex) {\n var _a;\n const parentWidth = ((_a = injectCarouselScope.root.value) == null ? void 0 : _a.offsetWidth) || 0;\n if (data.inStage) {\n return parentWidth * ((2 - CARD_SCALE) * (index - activeIndex) + 1) / 4;\n } else if (index < activeIndex) {\n return -(1 + CARD_SCALE) * parentWidth / 4;\n } else {\n return (3 + CARD_SCALE) * parentWidth / 4;\n }\n }\n function calcTranslate(index, activeIndex, isVertical) {\n var _a, _b;\n const distance = (isVertical ? (_a = injectCarouselScope.root.value) == null ? void 0 : _a.offsetHeight : (_b = injectCarouselScope.root.value) == null ? void 0 : _b.offsetWidth) || 0;\n return distance * (index - activeIndex);\n }\n const translateItem = (index, activeIndex, oldIndex) => {\n const parentType = injectCarouselScope.type;\n const length = injectCarouselScope.items.value.length;\n if (parentType !== \"card\" && oldIndex !== void 0) {\n data.animating = index === activeIndex || index === oldIndex;\n }\n if (index !== activeIndex && length > 2 && injectCarouselScope.loop) {\n index = processIndex(index, activeIndex, length);\n }\n if (parentType === \"card\") {\n if (parentDirection.value === \"vertical\") {\n console.warn(\"[Element Warn][Carousel]vertical direction is not supported in card mode\");\n }\n data.inStage = Math.round(Math.abs(index - activeIndex)) <= 1;\n data.active = index === activeIndex;\n data.translate = calcCardTranslate(index, activeIndex);\n data.scale = data.active ? 1 : CARD_SCALE;\n } else {\n data.active = index === activeIndex;\n const isVertical = parentDirection.value === \"vertical\";\n data.translate = calcTranslate(index, activeIndex, isVertical);\n }\n data.ready = true;\n };\n function handleItemClick() {\n if (injectCarouselScope && injectCarouselScope.type === \"card\") {\n const index = injectCarouselScope.items.value.map((d) => d.uid).indexOf(instance.uid);\n injectCarouselScope.setActiveItem(index);\n }\n }\n onMounted(() => {\n if (injectCarouselScope.addItem) {\n injectCarouselScope.addItem(__spreadProps(__spreadValues(__spreadValues({\n uid: instance.uid\n }, props), toRefs(data)), {\n translateItem\n }));\n }\n });\n onUnmounted(() => {\n if (injectCarouselScope.removeItem) {\n injectCarouselScope.removeItem(instance.uid);\n }\n });\n return {\n data,\n itemStyle,\n translateItem,\n type: injectCarouselScope.type,\n handleItemClick\n };\n }\n});\n\nconst _hoisted_1 = {\n key: 0,\n class: \"el-carousel__mask\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return withDirectives((openBlock(), createBlock(\"div\", {\n class: [\"el-carousel__item\", {\n \"is-active\": _ctx.data.active,\n \"el-carousel__item--card\": _ctx.type === \"card\",\n \"is-in-stage\": _ctx.data.inStage,\n \"is-hover\": _ctx.data.hover,\n \"is-animating\": _ctx.data.animating\n }],\n style: _ctx.itemStyle,\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleItemClick && _ctx.handleItemClick(...args))\n }, [\n _ctx.type === \"card\" ? withDirectives((openBlock(), createBlock(\"div\", _hoisted_1, null, 512)), [\n [vShow, !_ctx.data.active]\n ]) : createCommentVNode(\"v-if\", true),\n renderSlot(_ctx.$slots, \"default\")\n ], 6)), [\n [vShow, _ctx.data.ready]\n ]);\n}\n\nscript.render = render;\nscript.__file = \"packages/carousel/src/item.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _CarouselItem = script;\n\nexport default _CarouselItem;\n","import { ref, getCurrentInstance, computed, watch, inject, defineComponent, openBlock, createBlock, createVNode, withDirectives, vModelCheckbox, renderSlot, Fragment, createTextVNode, toDisplayString, createCommentVNode } from 'vue';\nimport { UPDATE_MODEL_EVENT } from '../utils/constants';\nimport { isValidComponentSize } from '../utils/validators';\nimport { useGlobalConfig } from '../utils/util';\nimport { elFormKey, elFormItemKey } from '../el-form';\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst objectToString = Object.prototype.toString;\r\nconst toTypeString = (value) => objectToString.call(value);\n\nconst useCheckboxGroup = () => {\n const ELEMENT = useGlobalConfig();\n const elForm = inject(elFormKey, {});\n const elFormItem = inject(elFormItemKey, {});\n const checkboxGroup = inject(\"CheckboxGroup\", {});\n const isGroup = computed(() => checkboxGroup && (checkboxGroup == null ? void 0 : checkboxGroup.name) === \"ElCheckboxGroup\");\n const elFormItemSize = computed(() => {\n return elFormItem.size;\n });\n return {\n isGroup,\n checkboxGroup,\n elForm,\n ELEMENT,\n elFormItemSize,\n elFormItem\n };\n};\nconst useModel = (props) => {\n const selfModel = ref(false);\n const { emit } = getCurrentInstance();\n const { isGroup, checkboxGroup } = useCheckboxGroup();\n const isLimitExceeded = ref(false);\n const store = computed(() => {\n var _a;\n return checkboxGroup ? (_a = checkboxGroup.modelValue) == null ? void 0 : _a.value : props.modelValue;\n });\n const model = computed({\n get() {\n var _a;\n return isGroup.value ? store.value : (_a = props.modelValue) != null ? _a : selfModel.value;\n },\n set(val) {\n var _a;\n if (isGroup.value && Array.isArray(val)) {\n isLimitExceeded.value = false;\n if (checkboxGroup.min !== void 0 && val.length < checkboxGroup.min.value) {\n isLimitExceeded.value = true;\n }\n if (checkboxGroup.max !== void 0 && val.length > checkboxGroup.max.value) {\n isLimitExceeded.value = true;\n }\n isLimitExceeded.value === false && ((_a = checkboxGroup == null ? void 0 : checkboxGroup.changeEvent) == null ? void 0 : _a.call(checkboxGroup, val));\n } else {\n emit(UPDATE_MODEL_EVENT, val);\n selfModel.value = val;\n }\n }\n });\n return {\n model,\n isLimitExceeded\n };\n};\nconst useCheckboxStatus = (props, { model }) => {\n const { isGroup, checkboxGroup, elFormItemSize, ELEMENT } = useCheckboxGroup();\n const focus = ref(false);\n const size = computed(() => {\n var _a;\n return ((_a = checkboxGroup == null ? void 0 : checkboxGroup.checkboxGroupSize) == null ? void 0 : _a.value) || elFormItemSize.value || ELEMENT.size;\n });\n const isChecked = computed(() => {\n const value = model.value;\n if (toTypeString(value) === \"[object Boolean]\") {\n return value;\n } else if (Array.isArray(value)) {\n return value.includes(props.label);\n } else if (value !== null && value !== void 0) {\n return value === props.trueLabel;\n }\n });\n const checkboxSize = computed(() => {\n var _a;\n const temCheckboxSize = props.size || elFormItemSize.value || ELEMENT.size;\n return isGroup.value ? ((_a = checkboxGroup == null ? void 0 : checkboxGroup.checkboxGroupSize) == null ? void 0 : _a.value) || temCheckboxSize : temCheckboxSize;\n });\n return {\n isChecked,\n focus,\n size,\n checkboxSize\n };\n};\nconst useDisabled = (props, { model, isChecked }) => {\n const { elForm, isGroup, checkboxGroup } = useCheckboxGroup();\n const isLimitDisabled = computed(() => {\n var _a, _b;\n const max = (_a = checkboxGroup.max) == null ? void 0 : _a.value;\n const min = (_b = checkboxGroup.min) == null ? void 0 : _b.value;\n return !!(max || min) && (model.value.length >= max && !isChecked.value) || model.value.length <= min && isChecked.value;\n });\n const isDisabled = computed(() => {\n var _a;\n const disabled = props.disabled || elForm.disabled;\n return isGroup.value ? ((_a = checkboxGroup.disabled) == null ? void 0 : _a.value) || disabled || isLimitDisabled.value : props.disabled || elForm.disabled;\n });\n return {\n isDisabled,\n isLimitDisabled\n };\n};\nconst setStoreValue = (props, { model }) => {\n function addToStore() {\n if (Array.isArray(model.value) && !model.value.includes(props.label)) {\n model.value.push(props.label);\n } else {\n model.value = props.trueLabel || true;\n }\n }\n props.checked && addToStore();\n};\nconst useEvent = (props, { isLimitExceeded }) => {\n const { elFormItem } = useCheckboxGroup();\n const { emit } = getCurrentInstance();\n function handleChange(e) {\n var _a, _b;\n if (isLimitExceeded.value)\n return;\n const target = e.target;\n const value = target.checked ? (_a = props.trueLabel) != null ? _a : true : (_b = props.falseLabel) != null ? _b : false;\n emit(\"change\", value, e);\n }\n watch(() => props.modelValue, (val) => {\n var _a;\n (_a = elFormItem.formItemMitt) == null ? void 0 : _a.emit(\"el.form.change\", [val]);\n });\n return {\n handleChange\n };\n};\nconst useCheckbox = (props) => {\n const { model, isLimitExceeded } = useModel(props);\n const { focus, size, isChecked, checkboxSize } = useCheckboxStatus(props, { model });\n const { isDisabled } = useDisabled(props, { model, isChecked });\n const { handleChange } = useEvent(props, { isLimitExceeded });\n setStoreValue(props, { model });\n return {\n isChecked,\n isDisabled,\n checkboxSize,\n model,\n handleChange,\n focus,\n size\n };\n};\n\nvar script = defineComponent({\n name: \"ElCheckbox\",\n props: {\n modelValue: {\n type: [Boolean, Number, String],\n default: () => void 0\n },\n label: {\n type: [String, Boolean, Number, Object]\n },\n indeterminate: Boolean,\n disabled: Boolean,\n checked: Boolean,\n name: {\n type: String,\n default: void 0\n },\n trueLabel: {\n type: [String, Number],\n default: void 0\n },\n falseLabel: {\n type: [String, Number],\n default: void 0\n },\n id: {\n type: String,\n default: void 0\n },\n controls: {\n type: String,\n default: void 0\n },\n border: Boolean,\n size: {\n type: String,\n validator: isValidComponentSize\n }\n },\n emits: [UPDATE_MODEL_EVENT, \"change\"],\n setup(props) {\n return useCheckbox(props);\n }\n});\n\nconst _hoisted_1 = /* @__PURE__ */ createVNode(\"span\", { class: \"el-checkbox__inner\" }, null, -1);\nconst _hoisted_2 = {\n key: 0,\n class: \"el-checkbox__label\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"label\", {\n id: _ctx.id,\n class: [\"el-checkbox\", [\n _ctx.border && _ctx.checkboxSize ? \"el-checkbox--\" + _ctx.checkboxSize : \"\",\n { \"is-disabled\": _ctx.isDisabled },\n { \"is-bordered\": _ctx.border },\n { \"is-checked\": _ctx.isChecked }\n ]],\n \"aria-controls\": _ctx.indeterminate ? _ctx.controls : null\n }, [\n createVNode(\"span\", {\n class: [\"el-checkbox__input\", {\n \"is-disabled\": _ctx.isDisabled,\n \"is-checked\": _ctx.isChecked,\n \"is-indeterminate\": _ctx.indeterminate,\n \"is-focus\": _ctx.focus\n }],\n tabindex: _ctx.indeterminate ? 0 : false,\n role: _ctx.indeterminate ? \"checkbox\" : false,\n \"aria-checked\": _ctx.indeterminate ? \"mixed\" : false\n }, [\n _hoisted_1,\n _ctx.trueLabel || _ctx.falseLabel ? withDirectives((openBlock(), createBlock(\"input\", {\n key: 0,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event) => _ctx.model = $event),\n checked: _ctx.isChecked,\n class: \"el-checkbox__original\",\n type: \"checkbox\",\n \"aria-hidden\": _ctx.indeterminate ? \"true\" : \"false\",\n name: _ctx.name,\n disabled: _ctx.isDisabled,\n \"true-value\": _ctx.trueLabel,\n \"false-value\": _ctx.falseLabel,\n onChange: _cache[2] || (_cache[2] = (...args) => _ctx.handleChange && _ctx.handleChange(...args)),\n onFocus: _cache[3] || (_cache[3] = ($event) => _ctx.focus = true),\n onBlur: _cache[4] || (_cache[4] = ($event) => _ctx.focus = false)\n }, null, 40, [\"checked\", \"aria-hidden\", \"name\", \"disabled\", \"true-value\", \"false-value\"])), [\n [vModelCheckbox, _ctx.model]\n ]) : withDirectives((openBlock(), createBlock(\"input\", {\n key: 1,\n \"onUpdate:modelValue\": _cache[5] || (_cache[5] = ($event) => _ctx.model = $event),\n class: \"el-checkbox__original\",\n type: \"checkbox\",\n \"aria-hidden\": _ctx.indeterminate ? \"true\" : \"false\",\n disabled: _ctx.isDisabled,\n value: _ctx.label,\n name: _ctx.name,\n onChange: _cache[6] || (_cache[6] = (...args) => _ctx.handleChange && _ctx.handleChange(...args)),\n onFocus: _cache[7] || (_cache[7] = ($event) => _ctx.focus = true),\n onBlur: _cache[8] || (_cache[8] = ($event) => _ctx.focus = false)\n }, null, 40, [\"aria-hidden\", \"disabled\", \"value\", \"name\"])), [\n [vModelCheckbox, _ctx.model]\n ])\n ], 10, [\"tabindex\", \"role\", \"aria-checked\"]),\n _ctx.$slots.default || _ctx.label ? (openBlock(), createBlock(\"span\", _hoisted_2, [\n renderSlot(_ctx.$slots, \"default\"),\n !_ctx.$slots.default ? (openBlock(), createBlock(Fragment, { key: 0 }, [\n createTextVNode(toDisplayString(_ctx.label), 1)\n ], 2112)) : createCommentVNode(\"v-if\", true)\n ])) : createCommentVNode(\"v-if\", true)\n ], 10, [\"id\", \"aria-controls\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/checkbox/src/checkbox.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Checkbox = script;\n\nexport default _Checkbox;\n","import { inject, ref, computed, defineComponent, nextTick, openBlock, createBlock, withKeys, withModifiers, createVNode, withDirectives, vModelRadio, renderSlot, createTextVNode, toDisplayString } from 'vue';\nimport { UPDATE_MODEL_EVENT } from '../utils/constants';\nimport { isValidComponentSize } from '../utils/validators';\nimport { elFormKey, elFormItemKey } from '../el-form';\nimport { useGlobalConfig } from '../utils/util';\n\nconst radioGroupKey = \"RadioGroup\";\n\nconst useRadio = () => {\n const ELEMENT = useGlobalConfig();\n const elForm = inject(elFormKey, {});\n const elFormItem = inject(elFormItemKey, {});\n const radioGroup = inject(radioGroupKey, {});\n const focus = ref(false);\n const isGroup = computed(() => (radioGroup == null ? void 0 : radioGroup.name) === \"ElRadioGroup\");\n const elFormItemSize = computed(() => elFormItem.size || ELEMENT.size);\n return {\n isGroup,\n focus,\n radioGroup,\n elForm,\n ELEMENT,\n elFormItemSize\n };\n};\nconst useRadioAttrs = (props, {\n isGroup,\n radioGroup,\n elForm,\n model\n}) => {\n const isDisabled = computed(() => {\n return isGroup.value ? radioGroup.disabled || props.disabled || elForm.disabled : props.disabled || elForm.disabled;\n });\n const tabIndex = computed(() => {\n return isDisabled.value || isGroup.value && model.value !== props.label ? -1 : 0;\n });\n return {\n isDisabled,\n tabIndex\n };\n};\n\nvar script = defineComponent({\n name: \"ElRadio\",\n componentName: \"ElRadio\",\n props: {\n modelValue: {\n type: [String, Number, Boolean],\n default: \"\"\n },\n label: {\n type: [String, Number, Boolean],\n default: \"\"\n },\n disabled: Boolean,\n name: {\n type: String,\n default: \"\"\n },\n border: Boolean,\n size: {\n type: String,\n validator: isValidComponentSize\n }\n },\n emits: [UPDATE_MODEL_EVENT, \"change\"],\n setup(props, ctx) {\n const {\n isGroup,\n radioGroup,\n elFormItemSize,\n ELEMENT,\n focus,\n elForm\n } = useRadio();\n const radioRef = ref();\n const model = computed({\n get() {\n return isGroup.value ? radioGroup.modelValue : props.modelValue;\n },\n set(val) {\n if (isGroup.value) {\n radioGroup.changeEvent(val);\n } else {\n ctx.emit(UPDATE_MODEL_EVENT, val);\n }\n radioRef.value.checked = props.modelValue === props.label;\n }\n });\n const {\n tabIndex,\n isDisabled\n } = useRadioAttrs(props, {\n isGroup,\n radioGroup,\n elForm,\n model\n });\n const radioSize = computed(() => {\n const temRadioSize = props.size || elFormItemSize.value || ELEMENT.size;\n return isGroup.value ? radioGroup.radioGroupSize || temRadioSize : temRadioSize;\n });\n function handleChange() {\n nextTick(() => {\n ctx.emit(\"change\", model.value);\n });\n }\n return {\n focus,\n isGroup,\n isDisabled,\n model,\n tabIndex,\n radioSize,\n handleChange,\n radioRef\n };\n }\n});\n\nconst _hoisted_1 = /* @__PURE__ */ createVNode(\"span\", { class: \"el-radio__inner\" }, null, -1);\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"label\", {\n class: [\"el-radio\", {\n [`el-radio--${_ctx.radioSize || \"\"}`]: _ctx.border && _ctx.radioSize,\n \"is-disabled\": _ctx.isDisabled,\n \"is-focus\": _ctx.focus,\n \"is-bordered\": _ctx.border,\n \"is-checked\": _ctx.model === _ctx.label\n }],\n role: \"radio\",\n \"aria-checked\": _ctx.model === _ctx.label,\n \"aria-disabled\": _ctx.isDisabled,\n tabindex: _ctx.tabIndex,\n onKeydown: _cache[6] || (_cache[6] = withKeys(withModifiers(($event) => _ctx.model = _ctx.isDisabled ? _ctx.model : _ctx.label, [\"stop\", \"prevent\"]), [\"space\"]))\n }, [\n createVNode(\"span\", {\n class: [\"el-radio__input\", {\n \"is-disabled\": _ctx.isDisabled,\n \"is-checked\": _ctx.model === _ctx.label\n }]\n }, [\n _hoisted_1,\n withDirectives(createVNode(\"input\", {\n ref: \"radioRef\",\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event) => _ctx.model = $event),\n class: \"el-radio__original\",\n value: _ctx.label,\n type: \"radio\",\n \"aria-hidden\": \"true\",\n name: _ctx.name,\n disabled: _ctx.isDisabled,\n tabindex: \"-1\",\n onFocus: _cache[2] || (_cache[2] = ($event) => _ctx.focus = true),\n onBlur: _cache[3] || (_cache[3] = ($event) => _ctx.focus = false),\n onChange: _cache[4] || (_cache[4] = (...args) => _ctx.handleChange && _ctx.handleChange(...args))\n }, null, 40, [\"value\", \"name\", \"disabled\"]), [\n [vModelRadio, _ctx.model]\n ])\n ], 2),\n createVNode(\"span\", {\n class: \"el-radio__label\",\n onKeydown: _cache[5] || (_cache[5] = withModifiers(() => {\n }, [\"stop\"]))\n }, [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n createTextVNode(toDisplayString(_ctx.label), 1)\n ])\n ], 32)\n ], 42, [\"aria-checked\", \"aria-disabled\", \"tabindex\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/radio/src/radio.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Radio = script;\n\nexport default _Radio;\n","import isServer from './isServer';\n\nfunction scrollIntoView(container, selected) {\r\n if (isServer)\r\n return;\r\n if (!selected) {\r\n container.scrollTop = 0;\r\n return;\r\n }\r\n const offsetParents = [];\r\n let pointer = selected.offsetParent;\r\n while (pointer !== null &&\r\n container !== pointer &&\r\n container.contains(pointer)) {\r\n offsetParents.push(pointer);\r\n pointer = pointer.offsetParent;\r\n }\r\n const top = selected.offsetTop +\r\n offsetParents.reduce((prev, curr) => prev + curr.offsetTop, 0);\r\n const bottom = top + selected.offsetHeight;\r\n const viewRectTop = container.scrollTop;\r\n const viewRectBottom = viewRectTop + container.clientHeight;\r\n if (top < viewRectTop) {\r\n container.scrollTop = top;\r\n }\r\n else if (bottom > viewRectBottom) {\r\n container.scrollTop = bottom - container.clientHeight;\r\n }\r\n}\n\nexport default scrollIntoView;\n","import { defineComponent, h, inject, computed, resolveComponent, openBlock, createBlock, createCommentVNode, withModifiers, withCtx, createVNode, Fragment, getCurrentInstance, ref, renderList, toDisplayString, provide, reactive, watch, onBeforeUpdate, onMounted, nextTick } from 'vue';\nimport ElScrollbar from '../el-scrollbar';\nimport ElCheckbox from '../el-checkbox';\nimport ElRadio from '../el-radio';\nimport { useLocaleInject } from '../hooks';\nimport { generateId, isEmpty, isUndefined, capitalize, isEqualWithFunction, deduplicate, arrayFlat, coerceTruthyValueToArray } from '../utils/util';\nimport isEqual from 'lodash/isEqual';\nimport { EVENT_CODE } from '../utils/aria';\nimport { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../utils/constants';\nimport isServer from '../utils/isServer';\nimport scrollIntoView from '../utils/scroll-into-view';\n\nvar ExpandTrigger;\n(function(ExpandTrigger2) {\n ExpandTrigger2[\"CLICK\"] = \"click\";\n ExpandTrigger2[\"HOVER\"] = \"hover\";\n})(ExpandTrigger || (ExpandTrigger = {}));\nconst CASCADER_PANEL_INJECTION_KEY = Symbol();\n\nvar script = defineComponent({\n name: \"ElCascaderNode\",\n components: {\n ElCheckbox,\n ElRadio,\n NodeContent: {\n render() {\n const { node, panel } = this.$parent;\n const { data, label } = node;\n const { renderLabelFn } = panel;\n return h(\"span\", { class: \"el-cascader-node__label\" }, renderLabelFn ? renderLabelFn({ node, data }) : label);\n }\n }\n },\n props: {\n node: {\n type: Object,\n required: true\n },\n menuId: String\n },\n emits: [\"expand\"],\n setup(props, { emit }) {\n const panel = inject(CASCADER_PANEL_INJECTION_KEY);\n const isHoverMenu = computed(() => panel.isHoverMenu);\n const multiple = computed(() => panel.config.multiple);\n const checkStrictly = computed(() => panel.config.checkStrictly);\n const checkedNodeId = computed(() => {\n var _a;\n return (_a = panel.checkedNodes[0]) == null ? void 0 : _a.uid;\n });\n const isDisabled = computed(() => props.node.isDisabled);\n const isLeaf = computed(() => props.node.isLeaf);\n const expandable = computed(() => checkStrictly.value && !isLeaf.value || !isDisabled.value);\n const inExpandingPath = computed(() => isInPath(panel.expandingNode));\n const inCheckedPath = computed(() => checkStrictly.value && panel.checkedNodes.some(isInPath));\n const isInPath = (node) => {\n var _a;\n const { level, uid } = props.node;\n return ((_a = node == null ? void 0 : node.pathNodes[level - 1]) == null ? void 0 : _a.uid) === uid;\n };\n const doExpand = () => {\n if (inExpandingPath.value)\n return;\n panel.expandNode(props.node);\n };\n const doCheck = (checked) => {\n const { node } = props;\n if (checked === node.checked)\n return;\n panel.handleCheckChange(node, checked);\n };\n const doLoad = () => {\n panel.lazyLoad(props.node, () => {\n if (!isLeaf.value)\n doExpand();\n });\n };\n const handleHoverExpand = (e) => {\n if (!isHoverMenu.value)\n return;\n handleExpand();\n !isLeaf.value && emit(\"expand\", e);\n };\n const handleExpand = () => {\n const { node } = props;\n if (!expandable.value || node.loading)\n return;\n node.loaded ? doExpand() : doLoad();\n };\n const handleClick = () => {\n if (isHoverMenu.value && !isLeaf.value)\n return;\n if (isLeaf.value && !isDisabled.value && !checkStrictly.value && !multiple.value) {\n handleCheck(true);\n } else {\n handleExpand();\n }\n };\n const handleCheck = (checked) => {\n if (!props.node.loaded) {\n doLoad();\n } else {\n doCheck(checked);\n !checkStrictly.value && doExpand();\n }\n };\n return {\n panel,\n isHoverMenu,\n multiple,\n checkStrictly,\n checkedNodeId,\n isDisabled,\n isLeaf,\n expandable,\n inExpandingPath,\n inCheckedPath,\n handleHoverExpand,\n handleExpand,\n handleClick,\n handleCheck\n };\n }\n});\n\nconst _hoisted_1 = /* @__PURE__ */ createVNode(\"span\", null, null, -1);\nconst _hoisted_2 = {\n key: 2,\n class: \"el-icon-check el-cascader-node__prefix\"\n};\nconst _hoisted_3 = {\n key: 0,\n class: \"el-icon-loading el-cascader-node__postfix\"\n};\nconst _hoisted_4 = {\n key: 1,\n class: \"el-icon-arrow-right el-cascader-node__postfix\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_checkbox = resolveComponent(\"el-checkbox\");\n const _component_el_radio = resolveComponent(\"el-radio\");\n const _component_node_content = resolveComponent(\"node-content\");\n return openBlock(), createBlock(\"li\", {\n id: `${_ctx.menuId}-${_ctx.node.uid}`,\n role: \"menuitem\",\n \"aria-haspopup\": !_ctx.isLeaf,\n \"aria-owns\": _ctx.isLeaf ? null : _ctx.menuId,\n \"aria-expanded\": _ctx.inExpandingPath,\n tabindex: _ctx.expandable ? -1 : null,\n class: [\n \"el-cascader-node\",\n _ctx.checkStrictly && \"is-selectable\",\n _ctx.inExpandingPath && \"in-active-path\",\n _ctx.inCheckedPath && \"in-checked-path\",\n _ctx.node.checked && \"is-active\",\n !_ctx.expandable && \"is-disabled\"\n ],\n onMouseenter: _cache[3] || (_cache[3] = (...args) => _ctx.handleHoverExpand && _ctx.handleHoverExpand(...args)),\n onFocus: _cache[4] || (_cache[4] = (...args) => _ctx.handleHoverExpand && _ctx.handleHoverExpand(...args)),\n onClick: _cache[5] || (_cache[5] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))\n }, [\n createCommentVNode(\" prefix \"),\n _ctx.multiple ? (openBlock(), createBlock(_component_el_checkbox, {\n key: 0,\n \"model-value\": _ctx.node.checked,\n indeterminate: _ctx.node.indeterminate,\n disabled: _ctx.isDisabled,\n onClick: _cache[1] || (_cache[1] = withModifiers(() => {\n }, [\"stop\"])),\n \"onUpdate:modelValue\": _ctx.handleCheck\n }, null, 8, [\"model-value\", \"indeterminate\", \"disabled\", \"onUpdate:modelValue\"])) : _ctx.checkStrictly ? (openBlock(), createBlock(_component_el_radio, {\n key: 1,\n \"model-value\": _ctx.checkedNodeId,\n label: _ctx.node.uid,\n disabled: _ctx.isDisabled,\n \"onUpdate:modelValue\": _ctx.handleCheck,\n onClick: _cache[2] || (_cache[2] = withModifiers(() => {\n }, [\"stop\"]))\n }, {\n default: withCtx(() => [\n createCommentVNode(\"\\n Add an empty element to avoid render label,\\n do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485\\n \"),\n _hoisted_1\n ]),\n _: 1\n }, 8, [\"model-value\", \"label\", \"disabled\", \"onUpdate:modelValue\"])) : _ctx.isLeaf && _ctx.node.checked ? (openBlock(), createBlock(\"i\", _hoisted_2)) : createCommentVNode(\"v-if\", true),\n createCommentVNode(\" content \"),\n createVNode(_component_node_content),\n createCommentVNode(\" postfix \"),\n !_ctx.isLeaf ? (openBlock(), createBlock(Fragment, { key: 3 }, [\n _ctx.node.loading ? (openBlock(), createBlock(\"i\", _hoisted_3)) : (openBlock(), createBlock(\"i\", _hoisted_4))\n ], 2112)) : createCommentVNode(\"v-if\", true)\n ], 42, [\"id\", \"aria-haspopup\", \"aria-owns\", \"aria-expanded\", \"tabindex\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/cascader-panel/src/node.vue\";\n\nvar script$1 = defineComponent({\n name: \"ElCascaderMenu\",\n components: {\n ElScrollbar,\n ElCascaderNode: script\n },\n props: {\n nodes: {\n type: Array,\n required: true\n },\n index: {\n type: Number,\n required: true\n }\n },\n setup(props) {\n const instance = getCurrentInstance();\n const { t } = useLocaleInject();\n const id = generateId();\n let activeNode = null;\n let hoverTimer = null;\n const panel = inject(CASCADER_PANEL_INJECTION_KEY);\n const hoverZone = ref(null);\n const isEmpty = computed(() => !props.nodes.length);\n const menuId = computed(() => `cascader-menu-${id}-${props.index}`);\n const handleExpand = (e) => {\n activeNode = e.target;\n };\n const handleMouseMove = (e) => {\n if (!panel.isHoverMenu || !activeNode || !hoverZone.value)\n return;\n if (activeNode.contains(e.target)) {\n clearHoverTimer();\n const el = instance.vnode.el;\n const { left } = el.getBoundingClientRect();\n const { offsetWidth, offsetHeight } = el;\n const startX = e.clientX - left;\n const top = activeNode.offsetTop;\n const bottom = top + activeNode.offsetHeight;\n hoverZone.value.innerHTML = `\n \n \n `;\n } else if (!hoverTimer) {\n hoverTimer = window.setTimeout(clearHoverZone, panel.config.hoverThreshold);\n }\n };\n const clearHoverTimer = () => {\n if (!hoverTimer)\n return;\n clearTimeout(hoverTimer);\n hoverTimer = null;\n };\n const clearHoverZone = () => {\n if (!hoverZone.value)\n return;\n hoverZone.value.innerHTML = \"\";\n clearHoverTimer();\n };\n return {\n panel,\n hoverZone,\n isEmpty,\n menuId,\n t,\n handleExpand,\n handleMouseMove,\n clearHoverZone\n };\n }\n});\n\nconst _hoisted_1$1 = {\n key: 0,\n class: \"el-cascader-menu__empty-text\"\n};\nconst _hoisted_2$1 = {\n key: 1,\n ref: \"hoverZone\",\n class: \"el-cascader-menu__hover-zone\"\n};\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_cascader_node = resolveComponent(\"el-cascader-node\");\n const _component_el_scrollbar = resolveComponent(\"el-scrollbar\");\n return openBlock(), createBlock(_component_el_scrollbar, {\n id: _ctx.menuId,\n tag: \"ul\",\n role: \"menu\",\n class: \"el-cascader-menu\",\n \"wrap-class\": \"el-cascader-menu__wrap\",\n \"view-class\": [\n \"el-cascader-menu__list\",\n _ctx.isEmpty && \"is-empty\"\n ],\n onMousemove: _ctx.handleMouseMove,\n onMouseleave: _ctx.clearHoverZone\n }, {\n default: withCtx(() => [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.nodes, (node) => {\n return openBlock(), createBlock(_component_el_cascader_node, {\n key: node.uid,\n node,\n \"menu-id\": _ctx.menuId,\n onExpand: _ctx.handleExpand\n }, null, 8, [\"node\", \"menu-id\", \"onExpand\"]);\n }), 128)),\n _ctx.isEmpty ? (openBlock(), createBlock(\"div\", _hoisted_1$1, toDisplayString(_ctx.t(\"el.cascader.noData\")), 1)) : _ctx.panel.isHoverMenu ? (openBlock(), createBlock(\"svg\", _hoisted_2$1, null, 512)) : createCommentVNode(\"v-if\", true)\n ]),\n _: 1\n }, 8, [\"id\", \"view-class\", \"onMousemove\", \"onMouseleave\"]);\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"packages/cascader-panel/src/menu.vue\";\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst NOOP = () => { };\r\nconst isFunction = (val) => typeof val === 'function';\n\nlet uid = 0;\nconst calculatePathNodes = (node) => {\n const nodes = [node];\n let { parent } = node;\n while (parent) {\n nodes.unshift(parent);\n parent = parent.parent;\n }\n return nodes;\n};\nclass Node {\n constructor(data, config, parent, root = false) {\n this.data = data;\n this.config = config;\n this.parent = parent;\n this.root = root;\n this.uid = uid++;\n this.checked = false;\n this.indeterminate = false;\n this.loading = false;\n const { value: valueKey, label: labelKey, children: childrenKey } = config;\n const childrenData = data[childrenKey];\n const pathNodes = calculatePathNodes(this);\n this.level = root ? 0 : parent ? parent.level + 1 : 1;\n this.value = data[valueKey];\n this.label = data[labelKey];\n this.pathNodes = pathNodes;\n this.pathValues = pathNodes.map((node) => node.value);\n this.pathLabels = pathNodes.map((node) => node.label);\n this.childrenData = childrenData;\n this.children = (childrenData || []).map((child) => new Node(child, config, this));\n this.loaded = !config.lazy || this.isLeaf || !isEmpty(childrenData);\n }\n get isDisabled() {\n const { data, parent, config } = this;\n const { disabled, checkStrictly } = config;\n const isDisabled = isFunction(disabled) ? disabled(data, this) : !!data[disabled];\n return isDisabled || !checkStrictly && (parent == null ? void 0 : parent.isDisabled);\n }\n get isLeaf() {\n const { data, config, childrenData, loaded } = this;\n const { lazy, leaf } = config;\n const isLeaf = isFunction(leaf) ? leaf(data, this) : data[leaf];\n return isUndefined(isLeaf) ? lazy && !loaded ? false : !Array.isArray(childrenData) : !!isLeaf;\n }\n get valueByOption() {\n return this.config.emitPath ? this.pathValues : this.value;\n }\n appendChild(childData) {\n const { childrenData, children } = this;\n const node = new Node(childData, this.config, this);\n if (Array.isArray(childrenData)) {\n childrenData.push(childData);\n } else {\n this.childrenData = [childData];\n }\n children.push(node);\n return node;\n }\n calcText(allLevels, separator) {\n const text = allLevels ? this.pathLabels.join(separator) : this.label;\n this.text = text;\n return text;\n }\n broadcast(event, ...args) {\n const handlerName = `onParent${capitalize(event)}`;\n this.children.forEach((child) => {\n if (child) {\n child.broadcast(event, ...args);\n child[handlerName] && child[handlerName](...args);\n }\n });\n }\n emit(event, ...args) {\n const { parent } = this;\n const handlerName = `onChild${capitalize(event)}`;\n if (parent) {\n parent[handlerName] && parent[handlerName](...args);\n parent.emit(event, ...args);\n }\n }\n onParentCheck(checked) {\n if (!this.isDisabled) {\n this.setCheckState(checked);\n }\n }\n onChildCheck() {\n const { children } = this;\n const validChildren = children.filter((child) => !child.isDisabled);\n const checked = validChildren.length ? validChildren.every((child) => child.checked) : false;\n this.setCheckState(checked);\n }\n setCheckState(checked) {\n const totalNum = this.children.length;\n const checkedNum = this.children.reduce((c, p) => {\n const num = p.checked ? 1 : p.indeterminate ? 0.5 : 0;\n return c + num;\n }, 0);\n this.checked = this.loaded && this.children.every((child) => child.loaded && child.checked) && checked;\n this.indeterminate = this.loaded && checkedNum !== totalNum && checkedNum > 0;\n }\n doCheck(checked) {\n if (this.checked === checked)\n return;\n const { checkStrictly, multiple } = this.config;\n if (checkStrictly || !multiple) {\n this.checked = checked;\n } else {\n this.broadcast(\"check\", checked);\n this.setCheckState(checked);\n this.emit(\"check\");\n }\n }\n}\n\nconst flatNodes = (nodes, leafOnly) => {\n return nodes.reduce((res, node) => {\n if (node.isLeaf) {\n res.push(node);\n } else {\n !leafOnly && res.push(node);\n res = res.concat(flatNodes(node.children, leafOnly));\n }\n return res;\n }, []);\n};\nclass Store {\n constructor(data, config) {\n this.config = config;\n const nodes = (data || []).map((nodeData) => new Node(nodeData, this.config));\n this.nodes = nodes;\n this.allNodes = flatNodes(nodes, false);\n this.leafNodes = flatNodes(nodes, true);\n }\n getNodes() {\n return this.nodes;\n }\n getFlattedNodes(leafOnly) {\n return leafOnly ? this.leafNodes : this.allNodes;\n }\n appendNode(nodeData, parentNode) {\n const node = parentNode ? parentNode.appendChild(nodeData) : new Node(nodeData, this.config);\n if (!parentNode)\n this.nodes.push(node);\n this.allNodes.push(node);\n node.isLeaf && this.leafNodes.push(node);\n }\n appendNodes(nodeDataList, parentNode) {\n nodeDataList.forEach((nodeData) => this.appendNode(nodeData, parentNode));\n }\n getNodeByValue(value, leafOnly = false) {\n if (!value && value !== 0)\n return null;\n const nodes = this.getFlattedNodes(leafOnly).filter((node) => isEqual(node.value, value) || isEqual(node.pathValues, value));\n return nodes[0] || null;\n }\n getSameNode(node) {\n if (!node)\n return null;\n const nodes = this.getFlattedNodes(false).filter(({ value, level }) => isEqual(node.value, value) && node.level === level);\n return nodes[0] || null;\n }\n}\n\nvar __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nconst CommonProps = {\n modelValue: [Number, String, Array],\n options: {\n type: Array,\n default: () => []\n },\n props: {\n type: Object,\n default: () => ({})\n }\n};\nconst DefaultProps = {\n expandTrigger: ExpandTrigger.CLICK,\n multiple: false,\n checkStrictly: false,\n emitPath: true,\n lazy: false,\n lazyLoad: NOOP,\n value: \"value\",\n label: \"label\",\n children: \"children\",\n leaf: \"leaf\",\n disabled: \"disabled\",\n hoverThreshold: 500\n};\nconst useCascaderConfig = (props) => {\n return computed(() => __spreadValues(__spreadValues({}, DefaultProps), props.props));\n};\n\nconst isLeaf = (el) => !el.getAttribute(\"aria-owns\");\nconst getSibling = (el, distance) => {\n const { parentNode } = el;\n if (!parentNode)\n return null;\n const siblings = parentNode.querySelectorAll('.el-cascader-node[tabindex=\"-1\"]');\n const index = Array.prototype.indexOf.call(siblings, el);\n return siblings[index + distance] || null;\n};\nconst getMenuIndex = (el) => {\n if (!el)\n return 0;\n const pieces = el.id.split(\"-\");\n return Number(pieces[pieces.length - 2]);\n};\nconst focusNode = (el) => {\n if (!el)\n return;\n el.focus();\n !isLeaf(el) && el.click();\n};\nconst checkNode = (el) => {\n if (!el)\n return;\n const input = el.querySelector(\"input\");\n if (input) {\n input.click();\n } else if (isLeaf(el)) {\n el.click();\n }\n};\nconst sortByOriginalOrder = (oldNodes, newNodes) => {\n const newNodesCopy = newNodes.slice(0);\n const newIds = newNodesCopy.map((node) => node.uid);\n const res = oldNodes.reduce((acc, item) => {\n const index = newIds.indexOf(item.uid);\n if (index > -1) {\n acc.push(item);\n newNodesCopy.splice(index, 1);\n newIds.splice(index, 1);\n }\n return acc;\n }, []);\n res.push(...newNodesCopy);\n return res;\n};\n\nvar __defProp$1 = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar script$2 = defineComponent({\n name: \"ElCascaderPanel\",\n components: {\n ElCascaderMenu: script$1\n },\n props: __spreadProps(__spreadValues$1({}, CommonProps), {\n border: {\n type: Boolean,\n default: true\n },\n renderLabel: Function\n }),\n emits: [\n UPDATE_MODEL_EVENT,\n CHANGE_EVENT,\n \"close\",\n \"expand-change\"\n ],\n setup(props, { emit, slots }) {\n let initialLoaded = true;\n let manualChecked = false;\n const config = useCascaderConfig(props);\n const store = ref(null);\n const menuList = ref([]);\n const checkedValue = ref(null);\n const menus = ref([]);\n const expandingNode = ref(null);\n const checkedNodes = ref([]);\n const isHoverMenu = computed(() => config.value.expandTrigger === ExpandTrigger.HOVER);\n const renderLabelFn = computed(() => props.renderLabel || slots.default);\n const initStore = () => {\n const { options } = props;\n const cfg = config.value;\n manualChecked = false;\n store.value = new Store(options, cfg);\n menus.value = [store.value.getNodes()];\n if (cfg.lazy && isEmpty(props.options)) {\n initialLoaded = false;\n lazyLoad(null, () => {\n initialLoaded = true;\n syncCheckedValue(false, true);\n });\n } else {\n syncCheckedValue(false, true);\n }\n };\n const lazyLoad = (node, cb) => {\n const cfg = config.value;\n node = node || new Node({}, cfg, null, true);\n node.loading = true;\n const resolve = (dataList) => {\n const parent = node.root ? null : node;\n dataList && store.value.appendNodes(dataList, parent);\n node.loading = false;\n node.loaded = true;\n cb && cb(dataList);\n };\n cfg.lazyLoad(node, resolve);\n };\n const expandNode = (node, silent) => {\n var _a;\n const { level } = node;\n const newMenus = menus.value.slice(0, level);\n let newExpandingNode;\n if (node.isLeaf) {\n newExpandingNode = node.pathNodes[level - 2];\n } else {\n newExpandingNode = node;\n newMenus.push(node.children);\n }\n if (((_a = expandingNode.value) == null ? void 0 : _a.uid) !== (newExpandingNode == null ? void 0 : newExpandingNode.uid)) {\n expandingNode.value = node;\n menus.value = newMenus;\n !silent && emit(\"expand-change\", (node == null ? void 0 : node.pathValues) || []);\n }\n };\n const handleCheckChange = (node, checked, emitClose = true) => {\n const { checkStrictly, multiple } = config.value;\n const oldNode = checkedNodes.value[0];\n manualChecked = true;\n !multiple && (oldNode == null ? void 0 : oldNode.doCheck(false));\n node.doCheck(checked);\n calculateCheckedValue();\n emitClose && !multiple && !checkStrictly && emit(\"close\");\n };\n const getFlattedNodes = (leafOnly) => {\n return store.value.getFlattedNodes(leafOnly);\n };\n const getCheckedNodes = (leafOnly) => {\n return getFlattedNodes(leafOnly).filter((node) => node.checked !== false);\n };\n const clearCheckedNodes = () => {\n checkedNodes.value.forEach((node) => node.doCheck(false));\n calculateCheckedValue();\n };\n const calculateCheckedValue = () => {\n var _a;\n const { checkStrictly, multiple } = config.value;\n const oldNodes = checkedNodes.value;\n const newNodes = getCheckedNodes(!checkStrictly);\n const nodes = sortByOriginalOrder(oldNodes, newNodes);\n const values = nodes.map((node) => node.valueByOption);\n checkedNodes.value = nodes;\n checkedValue.value = multiple ? values : (_a = values[0]) != null ? _a : null;\n };\n const syncCheckedValue = (loaded = false, forced = false) => {\n const { modelValue } = props;\n const { lazy, multiple, checkStrictly } = config.value;\n const leafOnly = !checkStrictly;\n if (!initialLoaded || manualChecked || !forced && isEqual(modelValue, checkedValue.value))\n return;\n if (lazy && !loaded) {\n const values = deduplicate(arrayFlat(coerceTruthyValueToArray(modelValue)));\n const nodes = values.map((val) => store.value.getNodeByValue(val)).filter((node) => !!node && !node.loaded && !node.loading);\n if (nodes.length) {\n nodes.forEach((node) => {\n lazyLoad(node, () => syncCheckedValue(false, forced));\n });\n } else {\n syncCheckedValue(true, forced);\n }\n } else {\n const values = multiple ? coerceTruthyValueToArray(modelValue) : [modelValue];\n const nodes = deduplicate(values.map((val) => store.value.getNodeByValue(val, leafOnly)));\n syncMenuState(nodes, false);\n checkedValue.value = modelValue;\n }\n };\n const syncMenuState = (newCheckedNodes, reserveExpandingState = true) => {\n const { checkStrictly } = config.value;\n const oldNodes = checkedNodes.value;\n const newNodes = newCheckedNodes.filter((node) => !!node && (checkStrictly || node.isLeaf));\n const oldExpandingNode = store.value.getSameNode(expandingNode.value);\n const newExpandingNode = reserveExpandingState && oldExpandingNode || newNodes[0];\n if (newExpandingNode) {\n newExpandingNode.pathNodes.forEach((node) => expandNode(node, true));\n } else {\n expandingNode.value = null;\n }\n oldNodes.forEach((node) => node.doCheck(false));\n newNodes.forEach((node) => node.doCheck(true));\n checkedNodes.value = newNodes;\n nextTick(scrollToExpandingNode);\n };\n const scrollToExpandingNode = () => {\n if (isServer)\n return;\n menuList.value.forEach((menu) => {\n const menuElement = menu == null ? void 0 : menu.$el;\n if (menuElement) {\n const container = menuElement.querySelector(\".el-scrollbar__wrap\");\n const activeNode = menuElement.querySelector(\".el-cascader-node.is-active\") || menuElement.querySelector(\".el-cascader-node.in-active-path\");\n scrollIntoView(container, activeNode);\n }\n });\n };\n const handleKeyDown = (e) => {\n const target = e.target;\n const { code } = e;\n switch (code) {\n case EVENT_CODE.up:\n case EVENT_CODE.down:\n const distance = code === EVENT_CODE.up ? -1 : 1;\n focusNode(getSibling(target, distance));\n break;\n case EVENT_CODE.left:\n const preMenu = menuList.value[getMenuIndex(target) - 1];\n const expandedNode = preMenu == null ? void 0 : preMenu.$el.querySelector('.el-cascader-node[aria-expanded=\"true\"]');\n focusNode(expandedNode);\n break;\n case EVENT_CODE.right:\n const nextMenu = menuList.value[getMenuIndex(target) + 1];\n const firstNode = nextMenu == null ? void 0 : nextMenu.$el.querySelector('.el-cascader-node[tabindex=\"-1\"]');\n focusNode(firstNode);\n break;\n case EVENT_CODE.enter:\n checkNode(target);\n break;\n case EVENT_CODE.esc:\n case EVENT_CODE.tab:\n emit(\"close\");\n break;\n }\n };\n provide(CASCADER_PANEL_INJECTION_KEY, reactive({\n config,\n expandingNode,\n checkedNodes,\n isHoverMenu,\n renderLabelFn,\n lazyLoad,\n expandNode,\n handleCheckChange\n }));\n watch([config, () => props.options], ([newConfig, newOptions], [oldConfig, oldOptions]) => {\n if (isEqualWithFunction(newConfig, oldConfig) && isEqual(newOptions, oldOptions))\n return;\n initStore();\n }, { deep: true, immediate: true });\n watch(() => props.modelValue, () => {\n manualChecked = false;\n syncCheckedValue();\n });\n watch(checkedValue, (val) => {\n if (!isEqual(val, props.modelValue)) {\n emit(UPDATE_MODEL_EVENT, val);\n emit(CHANGE_EVENT, val);\n }\n });\n onBeforeUpdate(() => menuList.value = []);\n onMounted(() => !isEmpty(props.modelValue) && syncCheckedValue());\n return {\n menuList,\n menus,\n checkedNodes,\n handleKeyDown,\n handleCheckChange,\n getFlattedNodes,\n getCheckedNodes,\n clearCheckedNodes,\n calculateCheckedValue,\n scrollToExpandingNode\n };\n }\n});\n\nfunction render$2(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_cascader_menu = resolveComponent(\"el-cascader-menu\");\n return openBlock(), createBlock(\"div\", {\n class: [\n \"el-cascader-panel\",\n _ctx.border && \"is-bordered\"\n ],\n onKeydown: _cache[1] || (_cache[1] = (...args) => _ctx.handleKeyDown && _ctx.handleKeyDown(...args))\n }, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.menus, (menu, index) => {\n return openBlock(), createBlock(_component_el_cascader_menu, {\n key: index,\n ref: (item) => _ctx.menuList[index] = item,\n index,\n nodes: menu\n }, null, 8, [\"index\", \"nodes\"]);\n }), 128))\n ], 34);\n}\n\nscript$2.render = render$2;\nscript$2.__file = \"packages/cascader-panel/src/index.vue\";\n\nscript$2.install = (app) => {\n app.component(script$2.name, script$2);\n};\nconst _CascaderPanel = script$2;\n\nexport default _CascaderPanel;\nexport { CASCADER_PANEL_INJECTION_KEY, CommonProps, DefaultProps, ExpandTrigger, useCascaderConfig };\n","import { defineComponent, computed, openBlock, createBlock, renderSlot, createCommentVNode, Transition, withCtx, createVNode } from 'vue';\nimport { useGlobalConfig } from '../utils/util';\nimport { isValidComponentSize } from '../utils/validators';\n\nvar script = defineComponent({\n name: \"ElTag\",\n props: {\n closable: Boolean,\n type: {\n type: String,\n default: \"\"\n },\n hit: Boolean,\n disableTransitions: Boolean,\n color: {\n type: String,\n default: \"\"\n },\n size: {\n type: String,\n validator: isValidComponentSize\n },\n effect: {\n type: String,\n default: \"light\",\n validator: (val) => {\n return [\"dark\", \"light\", \"plain\"].indexOf(val) !== -1;\n }\n }\n },\n emits: [\"close\", \"click\"],\n setup(props, ctx) {\n const ELEMENT = useGlobalConfig();\n const tagSize = computed(() => {\n return props.size || ELEMENT.size;\n });\n const classes = computed(() => {\n const { type, hit, effect } = props;\n return [\n \"el-tag\",\n type ? `el-tag--${type}` : \"\",\n tagSize.value ? `el-tag--${tagSize.value}` : \"\",\n effect ? `el-tag--${effect}` : \"\",\n hit && \"is-hit\"\n ];\n });\n const handleClose = (event) => {\n event.stopPropagation();\n ctx.emit(\"close\", event);\n };\n const handleClick = (event) => {\n ctx.emit(\"click\", event);\n };\n return {\n tagSize,\n classes,\n handleClose,\n handleClick\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return !_ctx.disableTransitions ? (openBlock(), createBlock(\"span\", {\n key: 0,\n class: _ctx.classes,\n style: { backgroundColor: _ctx.color },\n onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))\n }, [\n renderSlot(_ctx.$slots, \"default\"),\n _ctx.closable ? (openBlock(), createBlock(\"i\", {\n key: 0,\n class: \"el-tag__close el-icon-close\",\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleClose && _ctx.handleClose(...args))\n })) : createCommentVNode(\"v-if\", true)\n ], 6)) : (openBlock(), createBlock(Transition, {\n key: 1,\n name: \"el-zoom-in-center\"\n }, {\n default: withCtx(() => [\n createVNode(\"span\", {\n class: _ctx.classes,\n style: { backgroundColor: _ctx.color },\n onClick: _cache[4] || (_cache[4] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))\n }, [\n renderSlot(_ctx.$slots, \"default\"),\n _ctx.closable ? (openBlock(), createBlock(\"i\", {\n key: 0,\n class: \"el-tag__close el-icon-close\",\n onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleClose && _ctx.handleClose(...args))\n })) : createCommentVNode(\"v-if\", true)\n ], 6)\n ]),\n _: 3\n }));\n}\n\nscript.render = render;\nscript.__file = \"packages/tag/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Tag = script;\n\nexport default _Tag;\n","import { defineComponent, inject, ref, computed, watch, nextTick, onMounted, onBeforeUnmount, resolveComponent, resolveDirective, openBlock, createBlock, withCtx, withDirectives, createVNode, withModifiers, Fragment, renderList, toDisplayString, withKeys, vModelText, createCommentVNode, vShow, renderSlot } from 'vue';\nimport ElCascaderPanel, { CommonProps } from '../el-cascader-panel';\nimport ElInput from '../el-input';\nimport ElPopper from '../el-popper';\nimport ElScrollbar from '../el-scrollbar';\nimport ElTag from '../el-tag';\nimport { ClickOutside } from '../directives';\nimport { useLocaleInject } from '../hooks';\nimport debounce from 'lodash/debounce';\nimport { EVENT_CODE } from '../utils/aria';\nimport { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../utils/constants';\nimport isServer from '../utils/isServer';\nimport { useGlobalConfig } from '../utils/util';\nimport { addResizeListener, removeResizeListener } from '../utils/resize-event';\nimport { isValidComponentSize } from '../utils/validators';\nimport { elFormKey, elFormItemKey } from '../el-form';\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst isFunction = (val) => typeof val === 'function';\r\nconst isObject = (val) => val !== null && typeof val === 'object';\r\nconst isPromise = (val) => {\r\n return isObject(val) && isFunction(val.then) && isFunction(val.catch);\r\n};\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nconst DEFAULT_INPUT_HEIGHT = 40;\nconst INPUT_HEIGHT_MAP = {\n medium: 36,\n small: 32,\n mini: 28\n};\nconst popperOptions = {\n modifiers: [\n {\n name: \"arrowPosition\",\n enabled: true,\n phase: \"main\",\n fn: ({ state }) => {\n const { modifiersData, placement } = state;\n if ([\"right\", \"left\"].includes(placement))\n return;\n modifiersData.arrow.x = 35;\n },\n requires: [\"arrow\"]\n }\n ]\n};\nvar script = defineComponent({\n name: \"ElCascader\",\n components: {\n ElCascaderPanel,\n ElInput,\n ElPopper,\n ElScrollbar,\n ElTag\n },\n directives: {\n Clickoutside: ClickOutside\n },\n props: __spreadProps(__spreadValues({}, CommonProps), {\n size: {\n type: String,\n validator: isValidComponentSize\n },\n placeholder: {\n type: String\n },\n disabled: Boolean,\n clearable: Boolean,\n filterable: Boolean,\n filterMethod: {\n type: Function,\n default: (node, keyword) => node.text.includes(keyword)\n },\n separator: {\n type: String,\n default: \" / \"\n },\n showAllLevels: {\n type: Boolean,\n default: true\n },\n collapseTags: Boolean,\n debounce: {\n type: Number,\n default: 300\n },\n beforeFilter: {\n type: Function,\n default: () => true\n },\n popperClass: {\n type: String,\n default: \"\"\n },\n popperAppendToBody: {\n type: Boolean,\n default: true\n }\n }),\n emits: [\n UPDATE_MODEL_EVENT,\n CHANGE_EVENT,\n \"focus\",\n \"blur\",\n \"visible-change\",\n \"expand-change\",\n \"remove-tag\"\n ],\n setup(props, { emit }) {\n let inputInitialHeight = 0;\n let pressDeleteCount = 0;\n const { t } = useLocaleInject();\n const $ELEMENT = useGlobalConfig();\n const elForm = inject(elFormKey, {});\n const elFormItem = inject(elFormItemKey, {});\n const popper = ref(null);\n const input = ref(null);\n const tagWrapper = ref(null);\n const panel = ref(null);\n const suggestionPanel = ref(null);\n const popperVisible = ref(false);\n const inputHover = ref(false);\n const filtering = ref(false);\n const inputValue = ref(\"\");\n const searchInputValue = ref(\"\");\n const presentTags = ref([]);\n const suggestions = ref([]);\n const isDisabled = computed(() => props.disabled || elForm.disabled);\n const inputPlaceholder = computed(() => props.placeholder || t(\"el.cascader.placeholder\"));\n const realSize = computed(() => props.size || elFormItem.size || $ELEMENT.size);\n const tagSize = computed(() => [\"small\", \"mini\"].includes(realSize.value) ? \"mini\" : \"small\");\n const multiple = computed(() => !!props.props.multiple);\n const readonly = computed(() => !props.filterable || multiple.value);\n const searchKeyword = computed(() => multiple.value ? searchInputValue.value : inputValue.value);\n const checkedNodes = computed(() => {\n var _a;\n return ((_a = panel.value) == null ? void 0 : _a.checkedNodes) || [];\n });\n const clearBtnVisible = computed(() => {\n if (!props.clearable || isDisabled.value || filtering.value || !inputHover.value)\n return false;\n return !!checkedNodes.value.length;\n });\n const presentText = computed(() => {\n const { showAllLevels, separator } = props;\n const nodes = checkedNodes.value;\n return nodes.length ? multiple.value ? \" \" : nodes[0].calcText(showAllLevels, separator) : \"\";\n });\n const checkedValue = computed({\n get() {\n return props.modelValue;\n },\n set(val) {\n var _a;\n emit(UPDATE_MODEL_EVENT, val);\n emit(CHANGE_EVENT, val);\n (_a = elFormItem.formItemMitt) == null ? void 0 : _a.emit(\"el.form.change\", [val]);\n }\n });\n const popperPaneRef = computed(() => {\n var _a;\n return (_a = popper.value) == null ? void 0 : _a.popperRef;\n });\n const togglePopperVisible = (visible) => {\n if (isDisabled.value)\n return;\n visible = visible != null ? visible : !popperVisible.value;\n if (visible !== popperVisible.value) {\n popperVisible.value = visible;\n input.value.input.setAttribute(\"aria-expanded\", visible);\n if (visible) {\n updatePopperPosition();\n nextTick(panel.value.scrollToExpandingNode);\n } else if (props.filterable) {\n const { value } = presentText;\n inputValue.value = value;\n searchInputValue.value = value;\n }\n emit(\"visible-change\", visible);\n }\n };\n const updatePopperPosition = () => {\n nextTick(popper.value.update);\n };\n const hideSuggestionPanel = () => {\n filtering.value = false;\n };\n const genTag = (node) => {\n const { showAllLevels, separator } = props;\n return {\n node,\n key: node.uid,\n text: node.calcText(showAllLevels, separator),\n hitState: false,\n closable: !isDisabled.value && !node.isDisabled\n };\n };\n const deleteTag = (tag) => {\n const { node } = tag;\n node.doCheck(false);\n panel.value.calculateCheckedValue();\n emit(\"remove-tag\", node.valueByOption);\n };\n const calculatePresentTags = () => {\n if (!multiple.value)\n return;\n const nodes = checkedNodes.value;\n const tags = [];\n if (nodes.length) {\n const [first, ...rest] = nodes;\n const restCount = rest.length;\n tags.push(genTag(first));\n if (restCount) {\n if (props.collapseTags) {\n tags.push({\n key: -1,\n text: `+ ${restCount}`,\n closable: false\n });\n } else {\n rest.forEach((node) => tags.push(genTag(node)));\n }\n }\n }\n presentTags.value = tags;\n };\n const calculateSuggestions = () => {\n const { filterMethod, showAllLevels, separator } = props;\n const res = panel.value.getFlattedNodes(!props.props.checkStrictly).filter((node) => {\n if (node.isDisabled)\n return false;\n node.calcText(showAllLevels, separator);\n return filterMethod(node, searchKeyword.value);\n });\n if (multiple.value) {\n presentTags.value.forEach((tag) => {\n tag.hitState = false;\n });\n }\n filtering.value = true;\n suggestions.value = res;\n updatePopperPosition();\n };\n const focusFirstNode = () => {\n var _a;\n let firstNode = null;\n if (filtering.value && suggestionPanel.value) {\n firstNode = suggestionPanel.value.$el.querySelector(\".el-cascader__suggestion-item\");\n } else {\n firstNode = (_a = panel.value) == null ? void 0 : _a.$el.querySelector('.el-cascader-node[tabindex=\"-1\"]');\n }\n if (firstNode) {\n firstNode.focus();\n !filtering.value && firstNode.click();\n }\n };\n const updateStyle = () => {\n var _a;\n const inputInner = input.value.input;\n const tagWrapperEl = tagWrapper.value;\n const suggestionPanelEl = (_a = suggestionPanel.value) == null ? void 0 : _a.$el;\n if (isServer || !inputInner)\n return;\n if (suggestionPanelEl) {\n const suggestionList = suggestionPanelEl.querySelector(\".el-cascader__suggestion-list\");\n suggestionList.style.minWidth = inputInner.offsetWidth + \"px\";\n }\n if (tagWrapperEl) {\n const { offsetHeight } = tagWrapperEl;\n const height = presentTags.value.length > 0 ? Math.max(offsetHeight + 6, inputInitialHeight) + \"px\" : `${inputInitialHeight}px`;\n inputInner.style.height = height;\n updatePopperPosition();\n }\n };\n const getCheckedNodes = (leafOnly) => {\n return panel.value.getCheckedNodes(leafOnly);\n };\n const handleExpandChange = (value) => {\n updatePopperPosition();\n emit(\"expand-change\", value);\n };\n const handleKeyDown = (e) => {\n switch (e.code) {\n case EVENT_CODE.enter:\n togglePopperVisible();\n break;\n case EVENT_CODE.down:\n togglePopperVisible(true);\n nextTick(focusFirstNode);\n event.preventDefault();\n break;\n case EVENT_CODE.esc:\n case EVENT_CODE.tab:\n togglePopperVisible(false);\n break;\n }\n };\n const handleClear = () => {\n panel.value.clearCheckedNodes();\n togglePopperVisible(false);\n };\n const handleSuggestionClick = (node) => {\n const { checked } = node;\n if (multiple.value) {\n panel.value.handleCheckChange(node, !checked, false);\n } else {\n !checked && panel.value.handleCheckChange(node, true, false);\n togglePopperVisible(false);\n }\n };\n const handleDelete = () => {\n const tags = presentTags.value;\n const lastTag = tags[tags.length - 1];\n pressDeleteCount = searchInputValue.value ? 0 : pressDeleteCount + 1;\n if (!lastTag || !pressDeleteCount)\n return;\n if (lastTag.hitState) {\n deleteTag(lastTag);\n } else {\n lastTag.hitState = true;\n }\n };\n const handleFilter = debounce(() => {\n const { value } = searchKeyword;\n if (!value)\n return;\n const passed = props.beforeFilter(value);\n if (isPromise(passed)) {\n passed.then(calculateSuggestions).catch(() => {\n });\n } else if (passed !== false) {\n calculateSuggestions();\n } else {\n hideSuggestionPanel();\n }\n }, props.debounce);\n const handleInput = (val, e) => {\n !popperVisible.value && togglePopperVisible(true);\n if (e == null ? void 0 : e.isComposing)\n return;\n val ? handleFilter() : hideSuggestionPanel();\n };\n watch(filtering, updatePopperPosition);\n watch([checkedNodes, isDisabled], calculatePresentTags);\n watch(presentTags, () => nextTick(updateStyle));\n watch(presentText, (val) => inputValue.value = val, { immediate: true });\n onMounted(() => {\n const inputEl = input.value.$el;\n inputInitialHeight = (inputEl == null ? void 0 : inputEl.offsetHeight) || INPUT_HEIGHT_MAP[realSize.value] || DEFAULT_INPUT_HEIGHT;\n addResizeListener(inputEl, updateStyle);\n });\n onBeforeUnmount(() => {\n removeResizeListener(input.value.$el, updateStyle);\n });\n return {\n popperOptions,\n popper,\n popperPaneRef,\n input,\n tagWrapper,\n panel,\n suggestionPanel,\n popperVisible,\n inputHover,\n inputPlaceholder,\n filtering,\n presentText,\n checkedValue,\n inputValue,\n searchInputValue,\n presentTags,\n suggestions,\n isDisabled,\n realSize,\n tagSize,\n multiple,\n readonly,\n clearBtnVisible,\n t,\n togglePopperVisible,\n hideSuggestionPanel,\n deleteTag,\n focusFirstNode,\n getCheckedNodes,\n handleExpandChange,\n handleKeyDown,\n handleClear,\n handleSuggestionClick,\n handleDelete,\n handleInput\n };\n }\n});\n\nconst _hoisted_1 = {\n key: 0,\n ref: \"tagWrapper\",\n class: \"el-cascader__tags\"\n};\nconst _hoisted_2 = {\n key: 0,\n class: \"el-icon-check\"\n};\nconst _hoisted_3 = { class: \"el-cascader__empty-text\" };\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_input = resolveComponent(\"el-input\");\n const _component_el_tag = resolveComponent(\"el-tag\");\n const _component_el_cascader_panel = resolveComponent(\"el-cascader-panel\");\n const _component_el_scrollbar = resolveComponent(\"el-scrollbar\");\n const _component_el_popper = resolveComponent(\"el-popper\");\n const _directive_clickoutside = resolveDirective(\"clickoutside\");\n return openBlock(), createBlock(_component_el_popper, {\n ref: \"popper\",\n visible: _ctx.popperVisible,\n \"onUpdate:visible\": _cache[16] || (_cache[16] = ($event) => _ctx.popperVisible = $event),\n \"manual-mode\": \"\",\n \"append-to-body\": _ctx.popperAppendToBody,\n placement: \"bottom-start\",\n \"popper-class\": `el-cascader__dropdown ${_ctx.popperClass}`,\n \"popper-options\": _ctx.popperOptions,\n \"fallback-placements\": [\"bottom-start\", \"top-start\", \"right\", \"left\"],\n \"stop-popper-mouse-event\": false,\n transition: \"el-zoom-in-top\",\n \"gpu-acceleration\": false,\n effect: \"light\",\n pure: \"\",\n onAfterLeave: _ctx.hideSuggestionPanel\n }, {\n trigger: withCtx(() => [\n withDirectives(createVNode(\"div\", {\n class: [\n \"el-cascader\",\n _ctx.realSize && `el-cascader--${_ctx.realSize}`,\n { \"is-disabled\": _ctx.isDisabled }\n ],\n onClick: _cache[10] || (_cache[10] = () => _ctx.togglePopperVisible(_ctx.readonly ? void 0 : true)),\n onKeydown: _cache[11] || (_cache[11] = (...args) => _ctx.handleKeyDown && _ctx.handleKeyDown(...args)),\n onMouseenter: _cache[12] || (_cache[12] = ($event) => _ctx.inputHover = true),\n onMouseleave: _cache[13] || (_cache[13] = ($event) => _ctx.inputHover = false)\n }, [\n createVNode(_component_el_input, {\n ref: \"input\",\n modelValue: _ctx.inputValue,\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = ($event) => _ctx.inputValue = $event),\n modelModifiers: { trim: true },\n placeholder: _ctx.inputPlaceholder,\n readonly: _ctx.readonly,\n disabled: _ctx.isDisabled,\n \"validate-event\": false,\n size: _ctx.realSize,\n class: { \"is-focus\": _ctx.popperVisible },\n onFocus: _cache[4] || (_cache[4] = (e) => _ctx.$emit(\"focus\", e)),\n onBlur: _cache[5] || (_cache[5] = (e) => _ctx.$emit(\"blur\", e)),\n onInput: _ctx.handleInput\n }, {\n suffix: withCtx(() => [\n _ctx.clearBtnVisible ? (openBlock(), createBlock(\"i\", {\n key: \"clear\",\n class: \"el-input__icon el-icon-circle-close\",\n onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.handleClear && _ctx.handleClear(...args), [\"stop\"]))\n })) : (openBlock(), createBlock(\"i\", {\n key: \"arrow-down\",\n class: [\n \"el-input__icon\",\n \"el-icon-arrow-down\",\n _ctx.popperVisible && \"is-reverse\"\n ],\n onClick: _cache[2] || (_cache[2] = withModifiers(($event) => _ctx.togglePopperVisible(), [\"stop\"]))\n }, null, 2))\n ]),\n _: 1\n }, 8, [\"modelValue\", \"placeholder\", \"readonly\", \"disabled\", \"size\", \"class\", \"onInput\"]),\n _ctx.multiple ? (openBlock(), createBlock(\"div\", _hoisted_1, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.presentTags, (tag) => {\n return openBlock(), createBlock(_component_el_tag, {\n key: tag.key,\n type: \"info\",\n size: _ctx.tagSize,\n hit: tag.hitState,\n closable: tag.closable,\n \"disable-transitions\": \"\",\n onClose: ($event) => _ctx.deleteTag(tag)\n }, {\n default: withCtx(() => [\n createVNode(\"span\", null, toDisplayString(tag.text), 1)\n ]),\n _: 2\n }, 1032, [\"size\", \"hit\", \"closable\", \"onClose\"]);\n }), 128)),\n _ctx.filterable && !_ctx.isDisabled ? withDirectives((openBlock(), createBlock(\"input\", {\n key: 0,\n \"onUpdate:modelValue\": _cache[6] || (_cache[6] = ($event) => _ctx.searchInputValue = $event),\n type: \"text\",\n class: \"el-cascader__search-input\",\n placeholder: _ctx.presentText ? \"\" : _ctx.inputPlaceholder,\n onInput: _cache[7] || (_cache[7] = (e) => _ctx.handleInput(_ctx.searchInputValue, e)),\n onClick: _cache[8] || (_cache[8] = withModifiers(($event) => _ctx.togglePopperVisible(true), [\"stop\"])),\n onKeydown: _cache[9] || (_cache[9] = withKeys((...args) => _ctx.handleDelete && _ctx.handleDelete(...args), [\"delete\"]))\n }, null, 40, [\"placeholder\"])), [\n [\n vModelText,\n _ctx.searchInputValue,\n void 0,\n { trim: true }\n ]\n ]) : createCommentVNode(\"v-if\", true)\n ], 512)) : createCommentVNode(\"v-if\", true)\n ], 34), [\n [_directive_clickoutside, () => _ctx.togglePopperVisible(false), _ctx.popperPaneRef]\n ])\n ]),\n default: withCtx(() => [\n withDirectives(createVNode(_component_el_cascader_panel, {\n ref: \"panel\",\n modelValue: _ctx.checkedValue,\n \"onUpdate:modelValue\": _cache[14] || (_cache[14] = ($event) => _ctx.checkedValue = $event),\n options: _ctx.options,\n props: _ctx.props,\n border: false,\n \"render-label\": _ctx.$slots.default,\n onExpandChange: _ctx.handleExpandChange,\n onClose: _cache[15] || (_cache[15] = ($event) => _ctx.togglePopperVisible(false))\n }, null, 8, [\"modelValue\", \"options\", \"props\", \"render-label\", \"onExpandChange\"]), [\n [vShow, !_ctx.filtering]\n ]),\n _ctx.filterable ? withDirectives((openBlock(), createBlock(_component_el_scrollbar, {\n key: 0,\n ref: \"suggestionPanel\",\n tag: \"ul\",\n class: \"el-cascader__suggestion-panel\",\n \"view-class\": \"el-cascader__suggestion-list\"\n }, {\n default: withCtx(() => [\n _ctx.suggestions.length ? (openBlock(true), createBlock(Fragment, { key: 0 }, renderList(_ctx.suggestions, (item) => {\n return openBlock(), createBlock(\"li\", {\n key: item.uid,\n class: [\n \"el-cascader__suggestion-item\",\n item.checked && \"is-checked\"\n ],\n tabindex: -1,\n onClick: ($event) => _ctx.handleSuggestionClick(item)\n }, [\n createVNode(\"span\", null, toDisplayString(item.text), 1),\n item.checked ? (openBlock(), createBlock(\"i\", _hoisted_2)) : createCommentVNode(\"v-if\", true)\n ], 10, [\"onClick\"]);\n }), 128)) : renderSlot(_ctx.$slots, \"empty\", { key: 1 }, () => [\n createVNode(\"li\", _hoisted_3, toDisplayString(_ctx.t(\"el.cascader.noMatch\")), 1)\n ])\n ]),\n _: 3\n }, 512)), [\n [vShow, _ctx.filtering]\n ]) : createCommentVNode(\"v-if\", true)\n ]),\n _: 1\n }, 8, [\"visible\", \"append-to-body\", \"popper-class\", \"popper-options\", \"onAfterLeave\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/cascader/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Cascader = script;\n\nexport default _Cascader;\n","import { inject, computed, ref, getCurrentInstance, watch, defineComponent, openBlock, createBlock, withDirectives, vModelCheckbox, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from 'vue';\nimport { UPDATE_MODEL_EVENT } from '../utils/constants';\nimport { useGlobalConfig } from '../utils/util';\nimport { elFormKey, elFormItemKey } from '../el-form';\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst objectToString = Object.prototype.toString;\r\nconst toTypeString = (value) => objectToString.call(value);\n\nconst useCheckboxGroup = () => {\n const ELEMENT = useGlobalConfig();\n const elForm = inject(elFormKey, {});\n const elFormItem = inject(elFormItemKey, {});\n const checkboxGroup = inject(\"CheckboxGroup\", {});\n const isGroup = computed(() => checkboxGroup && (checkboxGroup == null ? void 0 : checkboxGroup.name) === \"ElCheckboxGroup\");\n const elFormItemSize = computed(() => {\n return elFormItem.size;\n });\n return {\n isGroup,\n checkboxGroup,\n elForm,\n ELEMENT,\n elFormItemSize,\n elFormItem\n };\n};\nconst useModel = (props) => {\n const selfModel = ref(false);\n const { emit } = getCurrentInstance();\n const { isGroup, checkboxGroup } = useCheckboxGroup();\n const isLimitExceeded = ref(false);\n const store = computed(() => {\n var _a;\n return checkboxGroup ? (_a = checkboxGroup.modelValue) == null ? void 0 : _a.value : props.modelValue;\n });\n const model = computed({\n get() {\n var _a;\n return isGroup.value ? store.value : (_a = props.modelValue) != null ? _a : selfModel.value;\n },\n set(val) {\n var _a;\n if (isGroup.value && Array.isArray(val)) {\n isLimitExceeded.value = false;\n if (checkboxGroup.min !== void 0 && val.length < checkboxGroup.min.value) {\n isLimitExceeded.value = true;\n }\n if (checkboxGroup.max !== void 0 && val.length > checkboxGroup.max.value) {\n isLimitExceeded.value = true;\n }\n isLimitExceeded.value === false && ((_a = checkboxGroup == null ? void 0 : checkboxGroup.changeEvent) == null ? void 0 : _a.call(checkboxGroup, val));\n } else {\n emit(UPDATE_MODEL_EVENT, val);\n selfModel.value = val;\n }\n }\n });\n return {\n model,\n isLimitExceeded\n };\n};\nconst useCheckboxStatus = (props, { model }) => {\n const { isGroup, checkboxGroup, elFormItemSize, ELEMENT } = useCheckboxGroup();\n const focus = ref(false);\n const size = computed(() => {\n var _a;\n return ((_a = checkboxGroup == null ? void 0 : checkboxGroup.checkboxGroupSize) == null ? void 0 : _a.value) || elFormItemSize.value || ELEMENT.size;\n });\n const isChecked = computed(() => {\n const value = model.value;\n if (toTypeString(value) === \"[object Boolean]\") {\n return value;\n } else if (Array.isArray(value)) {\n return value.includes(props.label);\n } else if (value !== null && value !== void 0) {\n return value === props.trueLabel;\n }\n });\n const checkboxSize = computed(() => {\n var _a;\n const temCheckboxSize = props.size || elFormItemSize.value || ELEMENT.size;\n return isGroup.value ? ((_a = checkboxGroup == null ? void 0 : checkboxGroup.checkboxGroupSize) == null ? void 0 : _a.value) || temCheckboxSize : temCheckboxSize;\n });\n return {\n isChecked,\n focus,\n size,\n checkboxSize\n };\n};\nconst useDisabled = (props, { model, isChecked }) => {\n const { elForm, isGroup, checkboxGroup } = useCheckboxGroup();\n const isLimitDisabled = computed(() => {\n var _a, _b;\n const max = (_a = checkboxGroup.max) == null ? void 0 : _a.value;\n const min = (_b = checkboxGroup.min) == null ? void 0 : _b.value;\n return !!(max || min) && (model.value.length >= max && !isChecked.value) || model.value.length <= min && isChecked.value;\n });\n const isDisabled = computed(() => {\n var _a;\n const disabled = props.disabled || elForm.disabled;\n return isGroup.value ? ((_a = checkboxGroup.disabled) == null ? void 0 : _a.value) || disabled || isLimitDisabled.value : props.disabled || elForm.disabled;\n });\n return {\n isDisabled,\n isLimitDisabled\n };\n};\nconst setStoreValue = (props, { model }) => {\n function addToStore() {\n if (Array.isArray(model.value) && !model.value.includes(props.label)) {\n model.value.push(props.label);\n } else {\n model.value = props.trueLabel || true;\n }\n }\n props.checked && addToStore();\n};\nconst useEvent = (props, { isLimitExceeded }) => {\n const { elFormItem } = useCheckboxGroup();\n const { emit } = getCurrentInstance();\n function handleChange(e) {\n var _a, _b;\n if (isLimitExceeded.value)\n return;\n const target = e.target;\n const value = target.checked ? (_a = props.trueLabel) != null ? _a : true : (_b = props.falseLabel) != null ? _b : false;\n emit(\"change\", value, e);\n }\n watch(() => props.modelValue, (val) => {\n var _a;\n (_a = elFormItem.formItemMitt) == null ? void 0 : _a.emit(\"el.form.change\", [val]);\n });\n return {\n handleChange\n };\n};\nconst useCheckbox = (props) => {\n const { model, isLimitExceeded } = useModel(props);\n const { focus, size, isChecked, checkboxSize } = useCheckboxStatus(props, { model });\n const { isDisabled } = useDisabled(props, { model, isChecked });\n const { handleChange } = useEvent(props, { isLimitExceeded });\n setStoreValue(props, { model });\n return {\n isChecked,\n isDisabled,\n checkboxSize,\n model,\n handleChange,\n focus,\n size\n };\n};\n\nvar script = defineComponent({\n name: \"ElCheckboxButton\",\n props: {\n modelValue: {\n type: [Boolean, Number, String],\n default: () => void 0\n },\n label: {\n type: [String, Boolean, Number, Object]\n },\n indeterminate: Boolean,\n disabled: Boolean,\n checked: Boolean,\n name: {\n type: String,\n default: void 0\n },\n trueLabel: {\n type: [String, Number],\n default: void 0\n },\n falseLabel: {\n type: [String, Number],\n default: void 0\n }\n },\n emits: [UPDATE_MODEL_EVENT, \"change\"],\n setup(props) {\n const { focus, isChecked, isDisabled, size, model, handleChange } = useCheckbox(props);\n const { checkboxGroup } = useCheckboxGroup();\n const activeStyle = computed(() => {\n var _a, _b, _c, _d;\n const fillValue = (_b = (_a = checkboxGroup == null ? void 0 : checkboxGroup.fill) == null ? void 0 : _a.value) != null ? _b : \"\";\n return {\n backgroundColor: fillValue,\n borderColor: fillValue,\n color: (_d = (_c = checkboxGroup == null ? void 0 : checkboxGroup.textColor) == null ? void 0 : _c.value) != null ? _d : \"\",\n boxShadow: fillValue ? `-1px 0 0 0 ${fillValue}` : null\n };\n });\n return {\n focus,\n isChecked,\n isDisabled,\n model,\n handleChange,\n activeStyle,\n size\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"label\", {\n class: [\"el-checkbox-button\", [\n _ctx.size ? \"el-checkbox-button--\" + _ctx.size : \"\",\n { \"is-disabled\": _ctx.isDisabled },\n { \"is-checked\": _ctx.isChecked },\n { \"is-focus\": _ctx.focus }\n ]],\n role: \"checkbox\",\n \"aria-checked\": _ctx.isChecked,\n \"aria-disabled\": _ctx.isDisabled\n }, [\n _ctx.trueLabel || _ctx.falseLabel ? withDirectives((openBlock(), createBlock(\"input\", {\n key: 0,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event) => _ctx.model = $event),\n checked: _ctx.isChecked,\n class: \"el-checkbox-button__original\",\n type: \"checkbox\",\n name: _ctx.name,\n disabled: _ctx.isDisabled,\n \"true-value\": _ctx.trueLabel,\n \"false-value\": _ctx.falseLabel,\n onChange: _cache[2] || (_cache[2] = (...args) => _ctx.handleChange && _ctx.handleChange(...args)),\n onFocus: _cache[3] || (_cache[3] = ($event) => _ctx.focus = true),\n onBlur: _cache[4] || (_cache[4] = ($event) => _ctx.focus = false)\n }, null, 40, [\"checked\", \"name\", \"disabled\", \"true-value\", \"false-value\"])), [\n [vModelCheckbox, _ctx.model]\n ]) : withDirectives((openBlock(), createBlock(\"input\", {\n key: 1,\n \"onUpdate:modelValue\": _cache[5] || (_cache[5] = ($event) => _ctx.model = $event),\n class: \"el-checkbox-button__original\",\n type: \"checkbox\",\n name: _ctx.name,\n disabled: _ctx.isDisabled,\n value: _ctx.label,\n onChange: _cache[6] || (_cache[6] = (...args) => _ctx.handleChange && _ctx.handleChange(...args)),\n onFocus: _cache[7] || (_cache[7] = ($event) => _ctx.focus = true),\n onBlur: _cache[8] || (_cache[8] = ($event) => _ctx.focus = false)\n }, null, 40, [\"name\", \"disabled\", \"value\"])), [\n [vModelCheckbox, _ctx.model]\n ]),\n _ctx.$slots.default || _ctx.label ? (openBlock(), createBlock(\"span\", {\n key: 2,\n class: \"el-checkbox-button__inner\",\n style: _ctx.isChecked ? _ctx.activeStyle : null\n }, [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n createTextVNode(toDisplayString(_ctx.label), 1)\n ])\n ], 4)) : createCommentVNode(\"v-if\", true)\n ], 10, [\"aria-checked\", \"aria-disabled\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/checkbox/src/checkbox-button.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _CheckboxButton = script;\n\nexport default _CheckboxButton;\n","import { inject, computed, defineComponent, provide, toRefs, watch, nextTick, openBlock, createBlock, renderSlot } from 'vue';\nimport { UPDATE_MODEL_EVENT } from '../utils/constants';\nimport { isValidComponentSize } from '../utils/validators';\nimport { useGlobalConfig } from '../utils/util';\nimport { elFormKey, elFormItemKey } from '../el-form';\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\n\nconst useCheckboxGroup = () => {\n const ELEMENT = useGlobalConfig();\n const elForm = inject(elFormKey, {});\n const elFormItem = inject(elFormItemKey, {});\n const checkboxGroup = inject(\"CheckboxGroup\", {});\n const isGroup = computed(() => checkboxGroup && (checkboxGroup == null ? void 0 : checkboxGroup.name) === \"ElCheckboxGroup\");\n const elFormItemSize = computed(() => {\n return elFormItem.size;\n });\n return {\n isGroup,\n checkboxGroup,\n elForm,\n ELEMENT,\n elFormItemSize,\n elFormItem\n };\n};\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar script = defineComponent({\n name: \"ElCheckboxGroup\",\n props: {\n modelValue: {\n type: [Object, Boolean, Array],\n default: () => void 0\n },\n disabled: Boolean,\n min: {\n type: Number,\n default: void 0\n },\n max: {\n type: Number,\n default: void 0\n },\n size: {\n type: String,\n validator: isValidComponentSize\n },\n fill: {\n type: String,\n default: void 0\n },\n textColor: {\n type: String,\n default: void 0\n }\n },\n emits: [UPDATE_MODEL_EVENT, \"change\"],\n setup(props, ctx) {\n const { elFormItem, elFormItemSize, ELEMENT } = useCheckboxGroup();\n const checkboxGroupSize = computed(() => props.size || elFormItemSize.value || ELEMENT.size);\n const changeEvent = (value) => {\n ctx.emit(UPDATE_MODEL_EVENT, value);\n nextTick(() => {\n ctx.emit(\"change\", value);\n });\n };\n const modelValue = computed({\n get() {\n return props.modelValue;\n },\n set(val) {\n changeEvent(val);\n }\n });\n provide(\"CheckboxGroup\", __spreadProps(__spreadValues({\n name: \"ElCheckboxGroup\",\n modelValue\n }, toRefs(props)), {\n checkboxGroupSize,\n changeEvent\n }));\n watch(() => props.modelValue, (val) => {\n var _a;\n (_a = elFormItem.formItemMitt) == null ? void 0 : _a.emit(\"el.form.change\", [val]);\n });\n }\n});\n\nconst _hoisted_1 = {\n class: \"el-checkbox-group\",\n role: \"group\",\n \"aria-label\": \"checkbox-group\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", _hoisted_1, [\n renderSlot(_ctx.$slots, \"default\")\n ]);\n}\n\nscript.render = render;\nscript.__file = \"packages/checkbox/src/checkbox-group.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _CheckboxGroup = script;\n\nexport default _CheckboxGroup;\n","import { defineComponent, inject, computed, h } from 'vue';\n\nconst ElCol = defineComponent({\n name: \"ElCol\",\n props: {\n tag: {\n type: String,\n default: \"div\"\n },\n span: {\n type: Number,\n default: 24\n },\n offset: {\n type: Number,\n default: 0\n },\n pull: {\n type: Number,\n default: 0\n },\n push: {\n type: Number,\n default: 0\n },\n xs: {\n type: [Number, Object],\n default: () => ({})\n },\n sm: {\n type: [Number, Object],\n default: () => ({})\n },\n md: {\n type: [Number, Object],\n default: () => ({})\n },\n lg: {\n type: [Number, Object],\n default: () => ({})\n },\n xl: {\n type: [Number, Object],\n default: () => ({})\n }\n },\n setup(props, { slots }) {\n const { gutter } = inject(\"ElRow\", { gutter: { value: 0 } });\n const style = computed(() => {\n if (gutter.value) {\n return {\n paddingLeft: gutter.value / 2 + \"px\",\n paddingRight: gutter.value / 2 + \"px\"\n };\n }\n return {};\n });\n const classList = computed(() => {\n const ret = [];\n const pos = [\"span\", \"offset\", \"pull\", \"push\"];\n pos.forEach((prop) => {\n const size = props[prop];\n if (typeof size === \"number\") {\n if (prop === \"span\")\n ret.push(`el-col-${props[prop]}`);\n else if (size > 0)\n ret.push(`el-col-${prop}-${props[prop]}`);\n }\n });\n const sizes = [\"xs\", \"sm\", \"md\", \"lg\", \"xl\"];\n sizes.forEach((size) => {\n if (typeof props[size] === \"number\") {\n ret.push(`el-col-${size}-${props[size]}`);\n } else if (typeof props[size] === \"object\") {\n const sizeProps = props[size];\n Object.keys(sizeProps).forEach((prop) => {\n ret.push(prop !== \"span\" ? `el-col-${size}-${prop}-${sizeProps[prop]}` : `el-col-${size}-${sizeProps[prop]}`);\n });\n }\n });\n if (gutter.value) {\n ret.push(\"is-guttered\");\n }\n return ret;\n });\n return () => {\n var _a;\n return h(props.tag, {\n class: [\"el-col\", classList.value],\n style: style.value\n }, (_a = slots.default) == null ? void 0 : _a.call(slots));\n };\n }\n});\n\nconst _Col = ElCol;\n_Col.install = (app) => {\n app.component(_Col.name, _Col);\n};\n\nexport default _Col;\n","import { defineComponent, ref, watch, onUnmounted, provide, openBlock, createBlock, renderSlot } from 'vue';\nimport mitt from 'mitt';\nimport { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../utils/constants';\n\nvar script = defineComponent({\n name: \"ElCollapse\",\n props: {\n accordion: Boolean,\n modelValue: {\n type: [Array, String, Number],\n default: () => []\n }\n },\n emits: [UPDATE_MODEL_EVENT, CHANGE_EVENT],\n setup(props, { emit }) {\n const activeNames = ref([].concat(props.modelValue));\n const collapseMitt = mitt();\n const setActiveNames = (_activeNames) => {\n activeNames.value = [].concat(_activeNames);\n const value = props.accordion ? activeNames.value[0] : activeNames.value;\n emit(UPDATE_MODEL_EVENT, value);\n emit(CHANGE_EVENT, value);\n };\n const handleItemClick = (name) => {\n if (props.accordion) {\n setActiveNames((activeNames.value[0] || activeNames.value[0] === 0) && activeNames.value[0] === name ? \"\" : name);\n } else {\n const _activeNames = activeNames.value.slice(0);\n const index = _activeNames.indexOf(name);\n if (index > -1) {\n _activeNames.splice(index, 1);\n } else {\n _activeNames.push(name);\n }\n setActiveNames(_activeNames);\n }\n };\n watch(() => props.modelValue, () => {\n activeNames.value = [].concat(props.modelValue);\n });\n collapseMitt.on(\"item-click\", handleItemClick);\n onUnmounted(() => {\n collapseMitt.all.clear();\n });\n provide(\"collapse\", {\n activeNames,\n collapseMitt\n });\n return {\n activeNames,\n setActiveNames,\n handleItemClick\n };\n }\n});\n\nconst _hoisted_1 = {\n class: \"el-collapse\",\n role: \"tablist\",\n \"aria-multiselectable\": \"true\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", _hoisted_1, [\n renderSlot(_ctx.$slots, \"default\")\n ]);\n}\n\nscript.render = render;\nscript.__file = \"packages/collapse/src/collapse.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Collapse = script;\n\nexport default _Collapse;\n","import { defineComponent, openBlock, createBlock, Transition, toHandlers, withCtx, renderSlot } from 'vue';\nimport { addClass, removeClass } from '../utils/dom';\n\nvar script = defineComponent({\n name: \"ElCollapseTransition\",\n setup() {\n return {\n on: {\n beforeEnter(el) {\n addClass(el, \"collapse-transition\");\n if (!el.dataset)\n el.dataset = {};\n el.dataset.oldPaddingTop = el.style.paddingTop;\n el.dataset.oldPaddingBottom = el.style.paddingBottom;\n el.style.height = \"0\";\n el.style.paddingTop = 0;\n el.style.paddingBottom = 0;\n },\n enter(el) {\n el.dataset.oldOverflow = el.style.overflow;\n if (el.scrollHeight !== 0) {\n el.style.height = el.scrollHeight + \"px\";\n el.style.paddingTop = el.dataset.oldPaddingTop;\n el.style.paddingBottom = el.dataset.oldPaddingBottom;\n } else {\n el.style.height = \"\";\n el.style.paddingTop = el.dataset.oldPaddingTop;\n el.style.paddingBottom = el.dataset.oldPaddingBottom;\n }\n el.style.overflow = \"hidden\";\n },\n afterEnter(el) {\n removeClass(el, \"collapse-transition\");\n el.style.height = \"\";\n el.style.overflow = el.dataset.oldOverflow;\n },\n beforeLeave(el) {\n if (!el.dataset)\n el.dataset = {};\n el.dataset.oldPaddingTop = el.style.paddingTop;\n el.dataset.oldPaddingBottom = el.style.paddingBottom;\n el.dataset.oldOverflow = el.style.overflow;\n el.style.height = el.scrollHeight + \"px\";\n el.style.overflow = \"hidden\";\n },\n leave(el) {\n if (el.scrollHeight !== 0) {\n addClass(el, \"collapse-transition\");\n el.style.transitionProperty = \"height\";\n el.style.height = 0;\n el.style.paddingTop = 0;\n el.style.paddingBottom = 0;\n }\n },\n afterLeave(el) {\n removeClass(el, \"collapse-transition\");\n el.style.height = \"\";\n el.style.overflow = el.dataset.oldOverflow;\n el.style.paddingTop = el.dataset.oldPaddingTop;\n el.style.paddingBottom = el.dataset.oldPaddingBottom;\n }\n }\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(Transition, toHandlers(_ctx.on), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n}\n\nscript.render = render;\nscript.__file = \"packages/transition/collapse-transition/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _CollapseTransition = script;\n\nexport default _CollapseTransition;\n","import { defineComponent, inject, ref, computed, resolveComponent, openBlock, createBlock, createVNode, withKeys, withModifiers, renderSlot, createTextVNode, toDisplayString, withCtx, withDirectives, vShow } from 'vue';\nimport { generateId } from '../utils/util';\nimport ElCollapseTransition from '../el-collapse-transition';\n\nvar script = defineComponent({\n name: \"ElCollapseItem\",\n components: { ElCollapseTransition },\n props: {\n title: {\n type: String,\n default: \"\"\n },\n name: {\n type: [String, Number],\n default: () => {\n return generateId();\n }\n },\n disabled: Boolean\n },\n setup(props) {\n const collapse = inject(\"collapse\");\n const collapseMitt = collapse == null ? void 0 : collapse.collapseMitt;\n const contentWrapStyle = ref({\n height: \"auto\",\n display: \"block\"\n });\n const contentHeight = ref(0);\n const focusing = ref(false);\n const isClick = ref(false);\n const id = ref(generateId());\n const isActive = computed(() => {\n return (collapse == null ? void 0 : collapse.activeNames.value.indexOf(props.name)) > -1;\n });\n const handleFocus = () => {\n setTimeout(() => {\n if (!isClick.value) {\n focusing.value = true;\n } else {\n isClick.value = false;\n }\n }, 50);\n };\n const handleHeaderClick = () => {\n if (props.disabled)\n return;\n collapseMitt == null ? void 0 : collapseMitt.emit(\"item-click\", props.name);\n focusing.value = false;\n isClick.value = true;\n };\n const handleEnterClick = () => {\n collapseMitt == null ? void 0 : collapseMitt.emit(\"item-click\", props.name);\n };\n return {\n isActive,\n contentWrapStyle,\n contentHeight,\n focusing,\n isClick,\n id,\n handleFocus,\n handleHeaderClick,\n handleEnterClick,\n collapse\n };\n }\n});\n\nconst _hoisted_1 = { class: \"el-collapse-item__content\" };\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_collapse_transition = resolveComponent(\"el-collapse-transition\");\n return openBlock(), createBlock(\"div\", {\n class: [\"el-collapse-item\", { \"is-active\": _ctx.isActive, \"is-disabled\": _ctx.disabled }]\n }, [\n createVNode(\"div\", {\n role: \"tab\",\n \"aria-expanded\": _ctx.isActive,\n \"aria-controls\": `el-collapse-content-${_ctx.id}`,\n \"aria-describedby\": `el-collapse-content-${_ctx.id}`\n }, [\n createVNode(\"div\", {\n id: `el-collapse-head-${_ctx.id}`,\n class: [\"el-collapse-item__header\", {\n \"focusing\": _ctx.focusing,\n \"is-active\": _ctx.isActive\n }],\n role: \"button\",\n tabindex: _ctx.disabled ? -1 : 0,\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleHeaderClick && _ctx.handleHeaderClick(...args)),\n onKeyup: _cache[2] || (_cache[2] = withKeys(withModifiers((...args) => _ctx.handleEnterClick && _ctx.handleEnterClick(...args), [\"stop\"]), [\"space\", \"enter\"])),\n onFocus: _cache[3] || (_cache[3] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),\n onBlur: _cache[4] || (_cache[4] = ($event) => _ctx.focusing = false)\n }, [\n renderSlot(_ctx.$slots, \"title\", {}, () => [\n createTextVNode(toDisplayString(_ctx.title), 1)\n ]),\n createVNode(\"i\", {\n class: [\"el-collapse-item__arrow el-icon-arrow-right\", { \"is-active\": _ctx.isActive }]\n }, null, 2)\n ], 42, [\"id\", \"tabindex\"])\n ], 8, [\"aria-expanded\", \"aria-controls\", \"aria-describedby\"]),\n createVNode(_component_el_collapse_transition, null, {\n default: withCtx(() => [\n withDirectives(createVNode(\"div\", {\n id: `el-collapse-content-${_ctx.id}`,\n class: \"el-collapse-item__wrap\",\n role: \"tabpanel\",\n \"aria-hidden\": !_ctx.isActive,\n \"aria-labelledby\": `el-collapse-head-${_ctx.id}`\n }, [\n createVNode(\"div\", _hoisted_1, [\n renderSlot(_ctx.$slots, \"default\")\n ])\n ], 8, [\"id\", \"aria-hidden\", \"aria-labelledby\"]), [\n [vShow, _ctx.isActive]\n ])\n ]),\n _: 3\n })\n ], 2);\n}\n\nscript.render = render;\nscript.__file = \"packages/collapse/src/collapse-item.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _CollapseItem = script;\n\nexport default _CollapseItem;\n","import { defineComponent, getCurrentInstance, ref, computed, watch, onMounted, openBlock, createBlock, createVNode, watchEffect, Fragment, renderList, inject, reactive, nextTick, provide, resolveComponent, resolveDirective, withCtx, withDirectives, createCommentVNode, withKeys, createTextVNode, toDisplayString, vShow } from 'vue';\nimport { ClickOutside } from '../directives';\nimport isServer from '../utils/isServer';\nimport { on, off } from '../utils/dom';\nimport ElPopper from '../el-popper';\nimport ElButton from '../el-button';\nimport ElInput from '../el-input';\nimport { useLocaleInject } from '../hooks';\nimport { UPDATE_MODEL_EVENT } from '../utils/constants';\nimport { useGlobalConfig } from '../utils/util';\nimport { isValidComponentSize } from '../utils/validators';\nimport { elFormKey, elFormItemKey } from '../el-form';\nimport debounce from 'lodash/debounce';\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\r\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\n\nconst hsv2hsl = function(hue, sat, val) {\n return [\n hue,\n sat * val / ((hue = (2 - sat) * val) < 1 ? hue : 2 - hue) || 0,\n hue / 2\n ];\n};\nconst isOnePointZero = function(n) {\n return typeof n === \"string\" && n.indexOf(\".\") !== -1 && parseFloat(n) === 1;\n};\nconst isPercentage = function(n) {\n return typeof n === \"string\" && n.indexOf(\"%\") !== -1;\n};\nconst bound01 = function(value, max) {\n if (isOnePointZero(value))\n value = \"100%\";\n const processPercent = isPercentage(value);\n value = Math.min(max, Math.max(0, parseFloat(value + \"\")));\n if (processPercent) {\n value = parseInt(value * max + \"\", 10) / 100;\n }\n if (Math.abs(value - max) < 1e-6) {\n return 1;\n }\n return value % max / parseFloat(max);\n};\nconst INT_HEX_MAP = { 10: \"A\", 11: \"B\", 12: \"C\", 13: \"D\", 14: \"E\", 15: \"F\" };\nconst toHex = function({ r, g, b }) {\n const hexOne = function(value) {\n value = Math.min(Math.round(value), 255);\n const high = Math.floor(value / 16);\n const low = value % 16;\n return \"\" + (INT_HEX_MAP[high] || high) + (INT_HEX_MAP[low] || low);\n };\n if (isNaN(r) || isNaN(g) || isNaN(b))\n return \"\";\n return \"#\" + hexOne(r) + hexOne(g) + hexOne(b);\n};\nconst HEX_INT_MAP = { A: 10, B: 11, C: 12, D: 13, E: 14, F: 15 };\nconst parseHexChannel = function(hex) {\n if (hex.length === 2) {\n return (HEX_INT_MAP[hex[0].toUpperCase()] || +hex[0]) * 16 + (HEX_INT_MAP[hex[1].toUpperCase()] || +hex[1]);\n }\n return HEX_INT_MAP[hex[1].toUpperCase()] || +hex[1];\n};\nconst hsl2hsv = function(hue, sat, light) {\n sat = sat / 100;\n light = light / 100;\n let smin = sat;\n const lmin = Math.max(light, 0.01);\n light *= 2;\n sat *= light <= 1 ? light : 2 - light;\n smin *= lmin <= 1 ? lmin : 2 - lmin;\n const v = (light + sat) / 2;\n const sv = light === 0 ? 2 * smin / (lmin + smin) : 2 * sat / (light + sat);\n return {\n h: hue,\n s: sv * 100,\n v: v * 100\n };\n};\nconst rgb2hsv = function(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n let h;\n const v = max;\n const d = max - min;\n const s = max === 0 ? 0 : d / max;\n if (max === min) {\n h = 0;\n } else {\n switch (max) {\n case r: {\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n }\n case g: {\n h = (b - r) / d + 2;\n break;\n }\n case b: {\n h = (r - g) / d + 4;\n break;\n }\n }\n h /= 6;\n }\n return { h: h * 360, s: s * 100, v: v * 100 };\n};\nconst hsv2rgb = function(h, s, v) {\n h = bound01(h, 360) * 6;\n s = bound01(s, 100);\n v = bound01(v, 100);\n const i = Math.floor(h);\n const f = h - i;\n const p = v * (1 - s);\n const q = v * (1 - f * s);\n const t = v * (1 - (1 - f) * s);\n const mod = i % 6;\n const r = [v, q, p, p, t, v][mod];\n const g = [t, v, v, q, p, p][mod];\n const b = [p, p, t, v, v, q][mod];\n return {\n r: Math.round(r * 255),\n g: Math.round(g * 255),\n b: Math.round(b * 255)\n };\n};\nclass Color {\n constructor(options) {\n this._hue = 0;\n this._saturation = 100;\n this._value = 100;\n this._alpha = 100;\n this.enableAlpha = false;\n this.format = \"hex\";\n this.value = \"\";\n options = options || {};\n for (const option in options) {\n if (hasOwn(options, option)) {\n this[option] = options[option];\n }\n }\n this.doOnChange();\n }\n set(prop, value) {\n if (arguments.length === 1 && typeof prop === \"object\") {\n for (const p in prop) {\n if (hasOwn(prop, p)) {\n this.set(p, prop[p]);\n }\n }\n return;\n }\n this[\"_\" + prop] = value;\n this.doOnChange();\n }\n get(prop) {\n return this[\"_\" + prop];\n }\n toRgb() {\n return hsv2rgb(this._hue, this._saturation, this._value);\n }\n fromString(value) {\n if (!value) {\n this._hue = 0;\n this._saturation = 100;\n this._value = 100;\n this.doOnChange();\n return;\n }\n const fromHSV = (h, s, v) => {\n this._hue = Math.max(0, Math.min(360, h));\n this._saturation = Math.max(0, Math.min(100, s));\n this._value = Math.max(0, Math.min(100, v));\n this.doOnChange();\n };\n if (value.indexOf(\"hsl\") !== -1) {\n const parts = value.replace(/hsla|hsl|\\(|\\)/gm, \"\").split(/\\s|,/g).filter((val) => val !== \"\").map((val, index) => index > 2 ? parseFloat(val) : parseInt(val, 10));\n if (parts.length === 4) {\n this._alpha = Math.floor(parseFloat(parts[3]) * 100);\n } else if (parts.length === 3) {\n this._alpha = 100;\n }\n if (parts.length >= 3) {\n const { h, s, v } = hsl2hsv(parts[0], parts[1], parts[2]);\n fromHSV(h, s, v);\n }\n } else if (value.indexOf(\"hsv\") !== -1) {\n const parts = value.replace(/hsva|hsv|\\(|\\)/gm, \"\").split(/\\s|,/g).filter((val) => val !== \"\").map((val, index) => index > 2 ? parseFloat(val) : parseInt(val, 10));\n if (parts.length === 4) {\n this._alpha = Math.floor(parseFloat(parts[3]) * 100);\n } else if (parts.length === 3) {\n this._alpha = 100;\n }\n if (parts.length >= 3) {\n fromHSV(parts[0], parts[1], parts[2]);\n }\n } else if (value.indexOf(\"rgb\") !== -1) {\n const parts = value.replace(/rgba|rgb|\\(|\\)/gm, \"\").split(/\\s|,/g).filter((val) => val !== \"\").map((val, index) => index > 2 ? parseFloat(val) : parseInt(val, 10));\n if (parts.length === 4) {\n this._alpha = Math.floor(parseFloat(parts[3]) * 100);\n } else if (parts.length === 3) {\n this._alpha = 100;\n }\n if (parts.length >= 3) {\n const { h, s, v } = rgb2hsv(parts[0], parts[1], parts[2]);\n fromHSV(h, s, v);\n }\n } else if (value.indexOf(\"#\") !== -1) {\n const hex = value.replace(\"#\", \"\").trim();\n if (!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(hex))\n return;\n let r, g, b;\n if (hex.length === 3) {\n r = parseHexChannel(hex[0] + hex[0]);\n g = parseHexChannel(hex[1] + hex[1]);\n b = parseHexChannel(hex[2] + hex[2]);\n } else if (hex.length === 6 || hex.length === 8) {\n r = parseHexChannel(hex.substring(0, 2));\n g = parseHexChannel(hex.substring(2, 4));\n b = parseHexChannel(hex.substring(4, 6));\n }\n if (hex.length === 8) {\n this._alpha = Math.floor(parseHexChannel(hex.substring(6)) / 255 * 100);\n } else if (hex.length === 3 || hex.length === 6) {\n this._alpha = 100;\n }\n const { h, s, v } = rgb2hsv(r, g, b);\n fromHSV(h, s, v);\n }\n }\n compare(color) {\n 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;\n }\n doOnChange() {\n const { _hue, _saturation, _value, _alpha, format } = this;\n if (this.enableAlpha) {\n switch (format) {\n case \"hsl\": {\n const hsl = hsv2hsl(_hue, _saturation / 100, _value / 100);\n this.value = `hsla(${_hue}, ${Math.round(hsl[1] * 100)}%, ${Math.round(hsl[2] * 100)}%, ${_alpha / 100})`;\n break;\n }\n case \"hsv\": {\n this.value = `hsva(${_hue}, ${Math.round(_saturation)}%, ${Math.round(_value)}%, ${_alpha / 100})`;\n break;\n }\n default: {\n const { r, g, b } = hsv2rgb(_hue, _saturation, _value);\n this.value = `rgba(${r}, ${g}, ${b}, ${_alpha / 100})`;\n }\n }\n } else {\n switch (format) {\n case \"hsl\": {\n const hsl = hsv2hsl(_hue, _saturation / 100, _value / 100);\n this.value = `hsl(${_hue}, ${Math.round(hsl[1] * 100)}%, ${Math.round(hsl[2] * 100)}%)`;\n break;\n }\n case \"hsv\": {\n this.value = `hsv(${_hue}, ${Math.round(_saturation)}%, ${Math.round(_value)}%)`;\n break;\n }\n case \"rgb\": {\n const { r, g, b } = hsv2rgb(_hue, _saturation, _value);\n this.value = `rgb(${r}, ${g}, ${b})`;\n break;\n }\n default: {\n this.value = toHex(hsv2rgb(_hue, _saturation, _value));\n }\n }\n }\n }\n}\n\nlet isDragging = false;\nfunction draggable(element, options) {\n if (isServer)\n return;\n const moveFn = function(event) {\n var _a;\n (_a = options.drag) == null ? void 0 : _a.call(options, event);\n };\n const upFn = function(event) {\n var _a;\n off(document, \"mousemove\", moveFn);\n off(document, \"mouseup\", upFn);\n document.onselectstart = null;\n document.ondragstart = null;\n isDragging = false;\n (_a = options.end) == null ? void 0 : _a.call(options, event);\n };\n on(element, \"mousedown\", function(event) {\n var _a;\n if (isDragging)\n return;\n document.onselectstart = () => false;\n document.ondragstart = () => false;\n on(document, \"mousemove\", moveFn);\n on(document, \"mouseup\", upFn);\n isDragging = true;\n (_a = options.start) == null ? void 0 : _a.call(options, event);\n });\n}\n\nvar script = defineComponent({\n name: \"ElSlPanel\",\n props: {\n color: {\n type: Object,\n required: true\n }\n },\n setup(props) {\n const instance = getCurrentInstance();\n const cursorTop = ref(0);\n const cursorLeft = ref(0);\n const background = ref(\"hsl(0, 100%, 50%)\");\n const colorValue = computed(() => {\n const hue = props.color.get(\"hue\");\n const value = props.color.get(\"value\");\n return { hue, value };\n });\n function update() {\n const saturation = props.color.get(\"saturation\");\n const value = props.color.get(\"value\");\n const el = instance.vnode.el;\n let { clientWidth: width, clientHeight: height } = el;\n cursorLeft.value = saturation * width / 100;\n cursorTop.value = (100 - value) * height / 100;\n background.value = \"hsl(\" + props.color.get(\"hue\") + \", 100%, 50%)\";\n }\n function handleDrag(event) {\n const el = instance.vnode.el;\n const rect = el.getBoundingClientRect();\n let left = event.clientX - rect.left;\n let top = event.clientY - rect.top;\n left = Math.max(0, left);\n left = Math.min(left, rect.width);\n top = Math.max(0, top);\n top = Math.min(top, rect.height);\n cursorLeft.value = left;\n cursorTop.value = top;\n props.color.set({\n saturation: left / rect.width * 100,\n value: 100 - top / rect.height * 100\n });\n }\n watch(() => colorValue.value, () => {\n update();\n });\n onMounted(() => {\n draggable(instance.vnode.el, {\n drag: (event) => {\n handleDrag(event);\n },\n end: (event) => {\n handleDrag(event);\n }\n });\n update();\n });\n return {\n cursorTop,\n cursorLeft,\n background,\n colorValue,\n handleDrag,\n update\n };\n }\n});\n\nconst _hoisted_1 = /* @__PURE__ */ createVNode(\"div\", { class: \"el-color-svpanel__white\" }, null, -1);\nconst _hoisted_2 = /* @__PURE__ */ createVNode(\"div\", { class: \"el-color-svpanel__black\" }, null, -1);\nconst _hoisted_3 = /* @__PURE__ */ createVNode(\"div\", null, null, -1);\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", {\n class: \"el-color-svpanel\",\n style: {\n backgroundColor: _ctx.background\n }\n }, [\n _hoisted_1,\n _hoisted_2,\n createVNode(\"div\", {\n class: \"el-color-svpanel__cursor\",\n style: {\n top: _ctx.cursorTop + \"px\",\n left: _ctx.cursorLeft + \"px\"\n }\n }, [\n _hoisted_3\n ], 4)\n ], 4);\n}\n\nscript.render = render;\nscript.__file = \"packages/color-picker/src/components/sv-panel.vue\";\n\nvar script$1 = defineComponent({\n name: \"ElColorHueSlider\",\n props: {\n color: {\n type: Object,\n required: true\n },\n vertical: Boolean\n },\n setup(props) {\n const instance = getCurrentInstance();\n const thumb = ref(null);\n const bar = ref(null);\n const thumbLeft = ref(0);\n const thumbTop = ref(0);\n const hueValue = computed(() => {\n return props.color.get(\"hue\");\n });\n watch(() => hueValue.value, () => {\n update();\n });\n function handleClick(event) {\n const target = event.target;\n if (target !== thumb.value) {\n handleDrag(event);\n }\n }\n function handleDrag(event) {\n const el = instance.vnode.el;\n const rect = el.getBoundingClientRect();\n let hue;\n if (!props.vertical) {\n let left = event.clientX - rect.left;\n left = Math.min(left, rect.width - thumb.value.offsetWidth / 2);\n left = Math.max(thumb.value.offsetWidth / 2, left);\n hue = Math.round((left - thumb.value.offsetWidth / 2) / (rect.width - thumb.value.offsetWidth) * 360);\n } else {\n let top = event.clientY - rect.top;\n top = Math.min(top, rect.height - thumb.value.offsetHeight / 2);\n top = Math.max(thumb.value.offsetHeight / 2, top);\n hue = Math.round((top - thumb.value.offsetHeight / 2) / (rect.height - thumb.value.offsetHeight) * 360);\n }\n props.color.set(\"hue\", hue);\n }\n function getThumbLeft() {\n const el = instance.vnode.el;\n if (props.vertical)\n return 0;\n const hue = props.color.get(\"hue\");\n if (!el)\n return 0;\n return Math.round(hue * (el.offsetWidth - thumb.value.offsetWidth / 2) / 360);\n }\n function getThumbTop() {\n const el = instance.vnode.el;\n if (!props.vertical)\n return 0;\n const hue = props.color.get(\"hue\");\n if (!el)\n return 0;\n return Math.round(hue * (el.offsetHeight - thumb.value.offsetHeight / 2) / 360);\n }\n function update() {\n thumbLeft.value = getThumbLeft();\n thumbTop.value = getThumbTop();\n }\n onMounted(() => {\n const dragConfig = {\n drag: (event) => {\n handleDrag(event);\n },\n end: (event) => {\n handleDrag(event);\n }\n };\n draggable(bar.value, dragConfig);\n draggable(thumb.value, dragConfig);\n update();\n });\n return {\n bar,\n thumb,\n thumbLeft,\n thumbTop,\n hueValue,\n handleClick,\n update\n };\n }\n});\n\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", {\n class: [\"el-color-hue-slider\", { \"is-vertical\": _ctx.vertical }]\n }, [\n createVNode(\"div\", {\n ref: \"bar\",\n class: \"el-color-hue-slider__bar\",\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))\n }, null, 512),\n createVNode(\"div\", {\n ref: \"thumb\",\n class: \"el-color-hue-slider__thumb\",\n style: {\n left: _ctx.thumbLeft + \"px\",\n top: _ctx.thumbTop + \"px\"\n }\n }, null, 4)\n ], 2);\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"packages/color-picker/src/components/hue-slider.vue\";\n\nvar script$2 = defineComponent({\n name: \"ElColorAlphaSlider\",\n props: {\n color: {\n type: Object,\n required: true\n },\n vertical: {\n type: Boolean,\n default: false\n }\n },\n setup(props) {\n const instance = getCurrentInstance();\n const thumb = ref(null);\n const bar = ref(null);\n const thumbLeft = ref(0);\n const thumbTop = ref(0);\n const background = ref(null);\n watch(() => props.color.get(\"alpha\"), () => {\n update();\n });\n watch(() => props.color.value, () => {\n update();\n });\n function getThumbLeft() {\n if (props.vertical)\n return 0;\n const el = instance.vnode.el;\n const alpha = props.color.get(\"alpha\");\n if (!el)\n return 0;\n return Math.round(alpha * (el.offsetWidth - thumb.value.offsetWidth / 2) / 100);\n }\n function getThumbTop() {\n const el = instance.vnode.el;\n if (!props.vertical)\n return 0;\n const alpha = props.color.get(\"alpha\");\n if (!el)\n return 0;\n return Math.round(alpha * (el.offsetHeight - thumb.value.offsetHeight / 2) / 100);\n }\n function getBackground() {\n if (props.color && props.color.value) {\n const { r, g, b } = props.color.toRgb();\n return `linear-gradient(to right, rgba(${r}, ${g}, ${b}, 0) 0%, rgba(${r}, ${g}, ${b}, 1) 100%)`;\n }\n return null;\n }\n function handleClick(event) {\n const target = event.target;\n if (target !== thumb.value) {\n handleDrag(event);\n }\n }\n function handleDrag(event) {\n const el = instance.vnode.el;\n const rect = el.getBoundingClientRect();\n if (!props.vertical) {\n let left = event.clientX - rect.left;\n left = Math.max(thumb.value.offsetWidth / 2, left);\n left = Math.min(left, rect.width - thumb.value.offsetWidth / 2);\n props.color.set(\"alpha\", Math.round((left - thumb.value.offsetWidth / 2) / (rect.width - thumb.value.offsetWidth) * 100));\n } else {\n let top = event.clientY - rect.top;\n top = Math.max(thumb.value.offsetHeight / 2, top);\n top = Math.min(top, rect.height - thumb.value.offsetHeight / 2);\n props.color.set(\"alpha\", Math.round((top - thumb.value.offsetHeight / 2) / (rect.height - thumb.value.offsetHeight) * 100));\n }\n }\n function update() {\n thumbLeft.value = getThumbLeft();\n thumbTop.value = getThumbTop();\n background.value = getBackground();\n }\n onMounted(() => {\n const dragConfig = {\n drag: (event) => {\n handleDrag(event);\n },\n end: (event) => {\n handleDrag(event);\n }\n };\n draggable(bar.value, dragConfig);\n draggable(thumb.value, dragConfig);\n update();\n });\n return {\n thumb,\n bar,\n thumbLeft,\n thumbTop,\n background,\n handleClick,\n update\n };\n }\n});\n\nfunction render$2(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", {\n class: [\"el-color-alpha-slider\", { \"is-vertical\": _ctx.vertical }]\n }, [\n createVNode(\"div\", {\n ref: \"bar\",\n class: \"el-color-alpha-slider__bar\",\n style: {\n background: _ctx.background\n },\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))\n }, null, 4),\n createVNode(\"div\", {\n ref: \"thumb\",\n class: \"el-color-alpha-slider__thumb\",\n style: {\n left: _ctx.thumbLeft + \"px\",\n top: _ctx.thumbTop + \"px\"\n }\n }, null, 4)\n ], 2);\n}\n\nscript$2.render = render$2;\nscript$2.__file = \"packages/color-picker/src/components/alpha-slider.vue\";\n\nvar script$3 = defineComponent({\n props: {\n colors: { type: Array, required: true },\n color: {\n type: Object,\n required: true\n }\n },\n setup(props) {\n const { currentColor } = useOptions();\n const rgbaColors = ref(parseColors(props.colors, props.color));\n watch(() => currentColor.value, (val) => {\n const color = new Color();\n color.fromString(val);\n rgbaColors.value.forEach((item) => {\n item.selected = color.compare(item);\n });\n });\n watchEffect(() => {\n rgbaColors.value = parseColors(props.colors, props.color);\n });\n function handleSelect(index) {\n props.color.fromString(props.colors[index]);\n }\n function parseColors(colors, color) {\n return colors.map((value) => {\n const c = new Color();\n c.enableAlpha = true;\n c.format = \"rgba\";\n c.fromString(value);\n c.selected = c.value === color.value;\n return c;\n });\n }\n return {\n rgbaColors,\n handleSelect\n };\n }\n});\n\nconst _hoisted_1$1 = { class: \"el-color-predefine\" };\nconst _hoisted_2$1 = { class: \"el-color-predefine__colors\" };\nfunction render$3(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", _hoisted_1$1, [\n createVNode(\"div\", _hoisted_2$1, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.rgbaColors, (item, index) => {\n return openBlock(), createBlock(\"div\", {\n key: _ctx.colors[index],\n class: [\"el-color-predefine__color-selector\", { selected: item.selected, \"is-alpha\": item._alpha < 100 }],\n onClick: ($event) => _ctx.handleSelect(index)\n }, [\n createVNode(\"div\", {\n style: { \"background-color\": item.value }\n }, null, 4)\n ], 10, [\"onClick\"]);\n }), 128))\n ])\n ]);\n}\n\nscript$3.render = render$3;\nscript$3.__file = \"packages/color-picker/src/components/predefine.vue\";\n\nconst OPTIONS_KEY = Symbol();\nconst useOptions = () => {\n return inject(OPTIONS_KEY);\n};\nvar script$4 = defineComponent({\n name: \"ElColorPicker\",\n components: {\n ElPopper,\n ElInput,\n SvPanel: script,\n HueSlider: script$1,\n AlphaSlider: script$2,\n ElButton,\n Predefine: script$3\n },\n directives: {\n ClickOutside\n },\n props: {\n modelValue: String,\n showAlpha: Boolean,\n colorFormat: String,\n disabled: Boolean,\n size: {\n type: String,\n validator: isValidComponentSize\n },\n popperClass: String,\n predefine: Array\n },\n emits: [\"change\", \"active-change\", UPDATE_MODEL_EVENT],\n setup(props, { emit }) {\n const ELEMENT = useGlobalConfig();\n const { t } = useLocaleInject();\n const elForm = inject(elFormKey, {});\n const elFormItem = inject(elFormItemKey, {});\n const hue = ref(null);\n const svPanel = ref(null);\n const alpha = ref(null);\n const popper = ref(null);\n const color = reactive(new Color({\n enableAlpha: props.showAlpha,\n format: props.colorFormat\n }));\n const showPicker = ref(false);\n const showPanelColor = ref(false);\n const customInput = ref(\"\");\n const displayedColor = computed(() => {\n if (!props.modelValue && !showPanelColor.value) {\n return \"transparent\";\n }\n return displayedRgb(color, props.showAlpha);\n });\n const colorSize = computed(() => {\n return props.size || elFormItem.size || ELEMENT.size;\n });\n const colorDisabled = computed(() => {\n return props.disabled || elForm.disabled;\n });\n const currentColor = computed(() => {\n return !props.modelValue && !showPanelColor.value ? \"\" : color.value;\n });\n watch(() => props.modelValue, (newVal) => {\n if (!newVal) {\n showPanelColor.value = false;\n } else if (newVal && newVal !== color.value) {\n color.fromString(newVal);\n }\n });\n watch(() => currentColor.value, (val) => {\n customInput.value = val;\n emit(\"active-change\", val);\n });\n watch(() => color.value, () => {\n if (!props.modelValue && !showPanelColor.value) {\n showPanelColor.value = true;\n }\n });\n function displayedRgb(color2, showAlpha) {\n if (!(color2 instanceof Color)) {\n throw Error(\"color should be instance of _color Class\");\n }\n const { r, g, b } = color2.toRgb();\n return showAlpha ? `rgba(${r}, ${g}, ${b}, ${color2.get(\"alpha\") / 100})` : `rgb(${r}, ${g}, ${b})`;\n }\n function setShowPicker(value) {\n showPicker.value = value;\n }\n const debounceSetShowPicker = debounce(setShowPicker, 100);\n function hide() {\n debounceSetShowPicker(false);\n resetColor();\n }\n function resetColor() {\n nextTick(() => {\n if (props.modelValue) {\n color.fromString(props.modelValue);\n } else {\n showPanelColor.value = false;\n }\n });\n }\n function handleTrigger() {\n if (colorDisabled.value)\n return;\n debounceSetShowPicker(!showPicker.value);\n }\n function handleConfirm() {\n color.fromString(customInput.value);\n }\n function confirmValue() {\n var _a;\n const value = color.value;\n emit(UPDATE_MODEL_EVENT, value);\n emit(\"change\", value);\n (_a = elFormItem.formItemMitt) == null ? void 0 : _a.emit(\"el.form.change\", value);\n debounceSetShowPicker(false);\n nextTick(() => {\n const newColor = new Color({\n enableAlpha: props.showAlpha,\n format: props.colorFormat\n });\n newColor.fromString(props.modelValue);\n if (!color.compare(newColor)) {\n resetColor();\n }\n });\n }\n function clear() {\n var _a;\n debounceSetShowPicker(false);\n emit(UPDATE_MODEL_EVENT, null);\n emit(\"change\", null);\n if (props.modelValue !== null) {\n (_a = elFormItem.formItemMitt) == null ? void 0 : _a.emit(\"el.form.change\", null);\n }\n resetColor();\n }\n onMounted(() => {\n if (props.modelValue) {\n color.fromString(props.modelValue);\n customInput.value = currentColor.value;\n }\n });\n watch(() => showPicker.value, () => {\n nextTick(() => {\n var _a, _b, _c;\n (_a = hue.value) == null ? void 0 : _a.update();\n (_b = svPanel.value) == null ? void 0 : _b.update();\n (_c = alpha.value) == null ? void 0 : _c.update();\n });\n });\n provide(OPTIONS_KEY, {\n currentColor\n });\n return {\n color,\n colorDisabled,\n colorSize,\n displayedColor,\n showPanelColor,\n showPicker,\n customInput,\n handleConfirm,\n hide,\n handleTrigger,\n clear,\n confirmValue,\n t,\n hue,\n svPanel,\n alpha,\n popper\n };\n }\n});\n\nconst _hoisted_1$2 = { class: \"el-color-dropdown__main-wrapper\" };\nconst _hoisted_2$2 = { class: \"el-color-dropdown__btns\" };\nconst _hoisted_3$1 = { class: \"el-color-dropdown__value\" };\nconst _hoisted_4 = {\n key: 0,\n class: \"el-color-picker__mask\"\n};\nconst _hoisted_5 = {\n key: 0,\n class: \"el-color-picker__empty el-icon-close\"\n};\nconst _hoisted_6 = { class: \"el-color-picker__icon el-icon-arrow-down\" };\nfunction render$4(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_hue_slider = resolveComponent(\"hue-slider\");\n const _component_sv_panel = resolveComponent(\"sv-panel\");\n const _component_alpha_slider = resolveComponent(\"alpha-slider\");\n const _component_predefine = resolveComponent(\"predefine\");\n const _component_el_input = resolveComponent(\"el-input\");\n const _component_el_button = resolveComponent(\"el-button\");\n const _component_el_popper = resolveComponent(\"el-popper\");\n const _directive_click_outside = resolveDirective(\"click-outside\");\n return openBlock(), createBlock(_component_el_popper, {\n ref: \"popper\",\n visible: _ctx.showPicker,\n \"onUpdate:visible\": _cache[3] || (_cache[3] = ($event) => _ctx.showPicker = $event),\n effect: \"light\",\n \"manual-mode\": \"\",\n trigger: \"click\",\n \"show-arrow\": false,\n \"fallback-placements\": [\"bottom\", \"top\", \"right\", \"left\"],\n offset: 0,\n transition: \"el-zoom-in-top\",\n \"gpu-acceleration\": false,\n \"popper-class\": `el-color-picker__panel el-color-dropdown ${_ctx.popperClass}`,\n \"stop-popper-mouse-event\": false\n }, {\n default: withCtx(() => [\n withDirectives(createVNode(\"div\", null, [\n createVNode(\"div\", _hoisted_1$2, [\n createVNode(_component_hue_slider, {\n ref: \"hue\",\n class: \"hue-slider\",\n color: _ctx.color,\n vertical: \"\"\n }, null, 8, [\"color\"]),\n createVNode(_component_sv_panel, {\n ref: \"svPanel\",\n color: _ctx.color\n }, null, 8, [\"color\"])\n ]),\n _ctx.showAlpha ? (openBlock(), createBlock(_component_alpha_slider, {\n key: 0,\n ref: \"alpha\",\n color: _ctx.color\n }, null, 8, [\"color\"])) : createCommentVNode(\"v-if\", true),\n _ctx.predefine ? (openBlock(), createBlock(_component_predefine, {\n key: 1,\n ref: \"predefine\",\n color: _ctx.color,\n colors: _ctx.predefine\n }, null, 8, [\"color\", \"colors\"])) : createCommentVNode(\"v-if\", true),\n createVNode(\"div\", _hoisted_2$2, [\n createVNode(\"span\", _hoisted_3$1, [\n createVNode(_component_el_input, {\n modelValue: _ctx.customInput,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event) => _ctx.customInput = $event),\n \"validate-event\": false,\n size: \"mini\",\n onKeyup: withKeys(_ctx.handleConfirm, [\"enter\"]),\n onBlur: _ctx.handleConfirm\n }, null, 8, [\"modelValue\", \"onKeyup\", \"onBlur\"])\n ]),\n createVNode(_component_el_button, {\n size: \"mini\",\n type: \"text\",\n class: \"el-color-dropdown__link-btn\",\n onClick: _ctx.clear\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.t(\"el.colorpicker.clear\")), 1)\n ]),\n _: 1\n }, 8, [\"onClick\"]),\n createVNode(_component_el_button, {\n plain: \"\",\n size: \"mini\",\n class: \"el-color-dropdown__btn\",\n onClick: _ctx.confirmValue\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.t(\"el.colorpicker.confirm\")), 1)\n ]),\n _: 1\n }, 8, [\"onClick\"])\n ])\n ], 512), [\n [_directive_click_outside, _ctx.hide]\n ])\n ]),\n trigger: withCtx(() => [\n createVNode(\"div\", {\n class: [\n \"el-color-picker\",\n _ctx.colorDisabled ? \"is-disabled\" : \"\",\n _ctx.colorSize ? `el-color-picker--${_ctx.colorSize}` : \"\"\n ]\n }, [\n _ctx.colorDisabled ? (openBlock(), createBlock(\"div\", _hoisted_4)) : createCommentVNode(\"v-if\", true),\n createVNode(\"div\", {\n class: \"el-color-picker__trigger\",\n onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleTrigger && _ctx.handleTrigger(...args))\n }, [\n createVNode(\"span\", {\n class: [\"el-color-picker__color\", { \"is-alpha\": _ctx.showAlpha }]\n }, [\n createVNode(\"span\", {\n class: \"el-color-picker__color-inner\",\n style: {\n backgroundColor: _ctx.displayedColor\n }\n }, null, 4),\n !_ctx.modelValue && !_ctx.showPanelColor ? (openBlock(), createBlock(\"span\", _hoisted_5)) : createCommentVNode(\"v-if\", true)\n ], 2),\n withDirectives(createVNode(\"span\", _hoisted_6, null, 512), [\n [vShow, _ctx.modelValue || _ctx.showPanelColor]\n ])\n ])\n ], 2)\n ]),\n _: 1\n }, 8, [\"visible\", \"popper-class\"]);\n}\n\nscript$4.render = render$4;\nscript$4.__file = \"packages/color-picker/src/index.vue\";\n\nscript$4.install = (app) => {\n app.component(script$4.name, script$4);\n};\nconst _ColorPicker = script$4;\n\nexport default _ColorPicker;\n","import { defineComponent, computed, openBlock, createBlock, renderSlot } from 'vue';\n\nvar script = defineComponent({\n name: \"ElContainer\",\n props: {\n direction: {\n type: String,\n default: \"\"\n }\n },\n setup(props, { slots }) {\n const isVertical = computed(() => {\n if (props.direction === \"vertical\") {\n return true;\n } else if (props.direction === \"horizontal\") {\n return false;\n }\n if (slots && slots.default) {\n const vNodes = slots.default();\n return vNodes.some((vNode) => {\n const tag = vNode.type.name;\n return tag === \"ElHeader\" || tag === \"ElFooter\";\n });\n } else {\n return false;\n }\n });\n return {\n isVertical\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"section\", {\n class: [\"el-container\", { \"is-vertical\": _ctx.isVertical }]\n }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 2);\n}\n\nscript.render = render;\nscript.__file = \"packages/container/src/container.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Container = script;\n\nexport default _Container;\n","var withInstall = (component) => {\r\n component.install = (app) => {\r\n app.component(component.name, component);\r\n };\r\n return component;\r\n};\n\nexport default withInstall;\n","import withInstall from '../utils/with-install';\nimport { defineComponent } from 'vue';\nimport { useLocale, useLocaleProps } from '../hooks';\n\nvar __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nconst ConfigProvider = defineComponent({\n name: \"ElConfigProvider\",\n props: __spreadValues({}, useLocaleProps),\n setup(_, { slots }) {\n useLocale();\n return () => slots.default();\n }\n});\n\nvar index = withInstall(ConfigProvider);\n\nexport default index;\n","import { defineComponent, ref, computed, openBlock, createBlock, createVNode, toDisplayString, createCommentVNode, Fragment, renderList, watch, inject, resolveComponent, resolveDirective, renderSlot, withDirectives, vShow, withCtx, createTextVNode, provide, h } from 'vue';\nimport dayjs from 'dayjs';\nimport { rangeArr, TimePickPanel, extractTimeFormat, extractDateFormat, DEFAULT_FORMATS_DATEPICKER, DEFAULT_FORMATS_DATE, CommonPicker, defaultProps } from '../el-time-picker';\nimport { useLocaleInject } from '../hooks';\nimport ElInput from '../el-input';\nimport { ClickOutside } from '../directives';\nimport { EVENT_CODE } from '../utils/aria';\nimport ElButton from '../el-button';\nimport { isValidDatePickType } from '../utils/validators';\nimport { coerceTruthyValueToArray } from '../utils/util';\nimport { hasClass } from '../utils/dom';\nimport customParseFormat from 'dayjs/plugin/customParseFormat';\nimport advancedFormat from 'dayjs/plugin/advancedFormat';\nimport localeData from 'dayjs/plugin/localeData';\nimport weekOfYear from 'dayjs/plugin/weekOfYear';\nimport weekYear from 'dayjs/plugin/weekYear';\nimport dayOfYear from 'dayjs/plugin/dayOfYear';\nimport isSameOrAfter from 'dayjs/plugin/isSameOrAfter';\nimport isSameOrBefore from 'dayjs/plugin/isSameOrBefore';\n\nvar script = defineComponent({\n props: {\n date: {\n type: Object\n },\n minDate: {\n type: Object\n },\n maxDate: {\n type: Object\n },\n parsedValue: {\n type: [Object, Array]\n },\n selectionMode: {\n type: String,\n default: \"day\"\n },\n showWeekNumber: {\n type: Boolean,\n default: false\n },\n disabledDate: {\n type: Function\n },\n cellClassName: {\n type: Function\n },\n rangeState: {\n type: Object,\n default: () => ({\n endDate: null,\n selecting: false\n })\n }\n },\n emits: [\"changerange\", \"pick\", \"select\"],\n setup(props, ctx) {\n const { t } = useLocaleInject();\n const lastRow = ref(null);\n const lastColumn = ref(null);\n const tableRows = ref([[], [], [], [], [], []]);\n const firstDayOfWeek = props.date.$locale().weekStart || 7;\n const WEEKS_CONSTANT = props.date.locale(\"en\").localeData().weekdaysShort().map((_) => _.toLowerCase());\n const offsetDay = computed(() => {\n return firstDayOfWeek > 3 ? 7 - firstDayOfWeek : -firstDayOfWeek;\n });\n const startDate = computed(() => {\n const startDayOfMonth = props.date.startOf(\"month\");\n return startDayOfMonth.subtract(startDayOfMonth.day() || 7, \"day\");\n });\n const WEEKS = computed(() => {\n return WEEKS_CONSTANT.concat(WEEKS_CONSTANT).slice(firstDayOfWeek, firstDayOfWeek + 7);\n });\n const rows = computed(() => {\n var _a;\n const startOfMonth = props.date.startOf(\"month\");\n const startOfMonthDay = startOfMonth.day() || 7;\n const dateCountOfMonth = startOfMonth.daysInMonth();\n const dateCountOfLastMonth = startOfMonth.subtract(1, \"month\").daysInMonth();\n const offset = offsetDay.value;\n const rows_ = tableRows.value;\n let count = 1;\n const selectedDate = props.selectionMode === \"dates\" ? coerceTruthyValueToArray(props.parsedValue) : [];\n const calNow = dayjs().startOf(\"day\");\n for (let i = 0; i < 6; i++) {\n const row = rows_[i];\n if (props.showWeekNumber) {\n if (!row[0]) {\n row[0] = {\n type: \"week\",\n text: startDate.value.add(i * 7 + 1, \"day\").week()\n };\n }\n }\n for (let j = 0; j < 7; j++) {\n let cell = row[props.showWeekNumber ? j + 1 : j];\n if (!cell) {\n cell = {\n row: i,\n column: j,\n type: \"normal\",\n inRange: false,\n start: false,\n end: false\n };\n }\n const index = i * 7 + j;\n const calTime = startDate.value.add(index - offset, \"day\");\n cell.type = \"normal\";\n const calEndDate = props.rangeState.endDate || props.maxDate || props.rangeState.selecting && props.minDate;\n cell.inRange = props.minDate && calTime.isSameOrAfter(props.minDate, \"day\") && (calEndDate && calTime.isSameOrBefore(calEndDate, \"day\")) || props.minDate && calTime.isSameOrBefore(props.minDate, \"day\") && (calEndDate && calTime.isSameOrAfter(calEndDate, \"day\"));\n if ((_a = props.minDate) == null ? void 0 : _a.isSameOrAfter(calEndDate)) {\n cell.start = calEndDate && calTime.isSame(calEndDate, \"day\");\n cell.end = props.minDate && calTime.isSame(props.minDate, \"day\");\n } else {\n cell.start = props.minDate && calTime.isSame(props.minDate, \"day\");\n cell.end = calEndDate && calTime.isSame(calEndDate, \"day\");\n }\n const isToday = calTime.isSame(calNow, \"day\");\n if (isToday) {\n cell.type = \"today\";\n }\n if (i >= 0 && i <= 1) {\n const numberOfDaysFromPreviousMonth = startOfMonthDay + offset < 0 ? 7 + startOfMonthDay + offset : startOfMonthDay + offset;\n if (j + i * 7 >= numberOfDaysFromPreviousMonth) {\n cell.text = count++;\n } else {\n cell.text = dateCountOfLastMonth - (numberOfDaysFromPreviousMonth - j % 7) + 1 + i * 7;\n cell.type = \"prev-month\";\n }\n } else {\n if (count <= dateCountOfMonth) {\n cell.text = count++;\n } else {\n cell.text = count++ - dateCountOfMonth;\n cell.type = \"next-month\";\n }\n }\n const cellDate = calTime.toDate();\n cell.selected = selectedDate.find((_) => _.valueOf() === calTime.valueOf());\n cell.disabled = props.disabledDate && props.disabledDate(cellDate);\n cell.customClass = props.cellClassName && props.cellClassName(cellDate);\n row[props.showWeekNumber ? j + 1 : j] = cell;\n }\n if (props.selectionMode === \"week\") {\n const start = props.showWeekNumber ? 1 : 0;\n const end = props.showWeekNumber ? 7 : 6;\n const isActive = isWeekActive(row[start + 1]);\n row[start].inRange = isActive;\n row[start].start = isActive;\n row[end].inRange = isActive;\n row[end].end = isActive;\n }\n }\n return rows_;\n });\n const cellMatchesDate = (cell, date) => {\n if (!date)\n return false;\n return dayjs(date).isSame(props.date.date(Number(cell.text)), \"day\");\n };\n const getCellClasses = (cell) => {\n let classes = [];\n if ((cell.type === \"normal\" || cell.type === \"today\") && !cell.disabled) {\n classes.push(\"available\");\n if (cell.type === \"today\") {\n classes.push(\"today\");\n }\n } else {\n classes.push(cell.type);\n }\n if (props.selectionMode === \"day\" && (cell.type === \"normal\" || cell.type === \"today\") && cellMatchesDate(cell, props.parsedValue)) {\n classes.push(\"current\");\n }\n if (cell.inRange && (cell.type === \"normal\" || cell.type === \"today\" || props.selectionMode === \"week\")) {\n classes.push(\"in-range\");\n if (cell.start) {\n classes.push(\"start-date\");\n }\n if (cell.end) {\n classes.push(\"end-date\");\n }\n }\n if (cell.disabled) {\n classes.push(\"disabled\");\n }\n if (cell.selected) {\n classes.push(\"selected\");\n }\n if (cell.customClass) {\n classes.push(cell.customClass);\n }\n return classes.join(\" \");\n };\n const getDateOfCell = (row, column) => {\n const offsetFromStart = row * 7 + (column - (props.showWeekNumber ? 1 : 0)) - offsetDay.value;\n return startDate.value.add(offsetFromStart, \"day\");\n };\n const handleMouseMove = (event) => {\n if (!props.rangeState.selecting)\n return;\n let target = event.target;\n if (target.tagName === \"SPAN\") {\n target = target.parentNode.parentNode;\n }\n if (target.tagName === \"DIV\") {\n target = target.parentNode;\n }\n if (target.tagName !== \"TD\")\n return;\n const row = target.parentNode.rowIndex - 1;\n const column = target.cellIndex;\n if (rows.value[row][column].disabled)\n return;\n if (row !== lastRow.value || column !== lastColumn.value) {\n lastRow.value = row;\n lastColumn.value = column;\n ctx.emit(\"changerange\", {\n selecting: true,\n endDate: getDateOfCell(row, column)\n });\n }\n };\n const handleClick = (event) => {\n let target = event.target;\n if (target.tagName === \"SPAN\") {\n target = target.parentNode.parentNode;\n }\n if (target.tagName === \"DIV\") {\n target = target.parentNode;\n }\n if (target.tagName !== \"TD\")\n return;\n const row = target.parentNode.rowIndex - 1;\n const column = target.cellIndex;\n const cell = rows.value[row][column];\n if (cell.disabled || cell.type === \"week\")\n return;\n const newDate = getDateOfCell(row, column);\n if (props.selectionMode === \"range\") {\n if (!props.rangeState.selecting) {\n ctx.emit(\"pick\", { minDate: newDate, maxDate: null });\n ctx.emit(\"select\", true);\n } else {\n if (newDate >= props.minDate) {\n ctx.emit(\"pick\", { minDate: props.minDate, maxDate: newDate });\n } else {\n ctx.emit(\"pick\", { minDate: newDate, maxDate: props.minDate });\n }\n ctx.emit(\"select\", false);\n }\n } else if (props.selectionMode === \"day\") {\n ctx.emit(\"pick\", newDate);\n } else if (props.selectionMode === \"week\") {\n const weekNumber = newDate.week();\n const value = newDate.year() + \"w\" + weekNumber;\n ctx.emit(\"pick\", {\n year: newDate.year(),\n week: weekNumber,\n value,\n date: newDate.startOf(\"week\")\n });\n } else if (props.selectionMode === \"dates\") {\n const newValue = cell.selected ? coerceTruthyValueToArray(props.parsedValue).filter((_) => _.valueOf() !== newDate.valueOf()) : coerceTruthyValueToArray(props.parsedValue).concat([newDate]);\n ctx.emit(\"pick\", newValue);\n }\n };\n const isWeekActive = (cell) => {\n if (props.selectionMode !== \"week\")\n return false;\n let newDate = props.date.startOf(\"day\");\n if (cell.type === \"prev-month\") {\n newDate = newDate.subtract(1, \"month\");\n }\n if (cell.type === \"next-month\") {\n newDate = newDate.add(1, \"month\");\n }\n newDate = newDate.date(parseInt(cell.text, 10));\n if (props.parsedValue && !Array.isArray(props.parsedValue)) {\n const dayOffset = (props.parsedValue.day() - firstDayOfWeek + 7) % 7 - 1;\n const weekDate = props.parsedValue.subtract(dayOffset, \"day\");\n return weekDate.isSame(newDate, \"day\");\n }\n return false;\n };\n return {\n handleMouseMove,\n t,\n rows,\n isWeekActive,\n getCellClasses,\n WEEKS,\n handleClick\n };\n }\n});\n\nconst _hoisted_1 = { key: 0 };\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"table\", {\n cellspacing: \"0\",\n cellpadding: \"0\",\n class: [\"el-date-table\", { \"is-week-mode\": _ctx.selectionMode === \"week\" }],\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),\n onMousemove: _cache[2] || (_cache[2] = (...args) => _ctx.handleMouseMove && _ctx.handleMouseMove(...args))\n }, [\n createVNode(\"tbody\", null, [\n createVNode(\"tr\", null, [\n _ctx.showWeekNumber ? (openBlock(), createBlock(\"th\", _hoisted_1, toDisplayString(_ctx.t(\"el.datepicker.week\")), 1)) : createCommentVNode(\"v-if\", true),\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.WEEKS, (week, key) => {\n return openBlock(), createBlock(\"th\", { key }, toDisplayString(_ctx.t(\"el.datepicker.weeks.\" + week)), 1);\n }), 128))\n ]),\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.rows, (row, key) => {\n return openBlock(), createBlock(\"tr\", {\n key,\n class: [\"el-date-table__row\", { current: _ctx.isWeekActive(row[1]) }]\n }, [\n (openBlock(true), createBlock(Fragment, null, renderList(row, (cell, key_) => {\n return openBlock(), createBlock(\"td\", {\n key: key_,\n class: _ctx.getCellClasses(cell)\n }, [\n createVNode(\"div\", null, [\n createVNode(\"span\", null, toDisplayString(cell.text), 1)\n ])\n ], 2);\n }), 128))\n ], 2);\n }), 128))\n ])\n ], 34);\n}\n\nscript.render = render;\nscript.__file = \"packages/date-picker/src/date-picker-com/basic-date-table.vue\";\n\nconst datesInMonth = (year, month) => {\n const firstDay = dayjs().startOf(\"month\").month(month).year(year);\n const numOfDays = firstDay.daysInMonth();\n return rangeArr(numOfDays).map((n) => firstDay.add(n, \"day\").toDate());\n};\nvar script$1 = defineComponent({\n props: {\n disabledDate: {\n type: Function\n },\n selectionMode: {\n type: String,\n default: \"month\"\n },\n minDate: {\n type: Object\n },\n maxDate: {\n type: Object\n },\n date: {\n type: Object\n },\n parsedValue: {\n type: Object\n },\n rangeState: {\n type: Object,\n default: () => ({\n endDate: null,\n selecting: false\n })\n }\n },\n emits: [\"changerange\", \"pick\", \"select\"],\n setup(props, ctx) {\n const { t } = useLocaleInject();\n const months = ref(props.date.locale(\"en\").localeData().monthsShort().map((_) => _.toLowerCase()));\n const tableRows = ref([[], [], []]);\n const lastRow = ref(null);\n const lastColumn = ref(null);\n const rows = computed(() => {\n var _a;\n const rows2 = tableRows.value;\n const now = dayjs().startOf(\"month\");\n for (let i = 0; i < 3; i++) {\n const row = rows2[i];\n for (let j = 0; j < 4; j++) {\n let cell = row[j];\n if (!cell) {\n cell = {\n row: i,\n column: j,\n type: \"normal\",\n inRange: false,\n start: false,\n end: false\n };\n }\n cell.type = \"normal\";\n const index = i * 4 + j;\n const calTime = props.date.startOf(\"year\").month(index);\n const calEndDate = props.rangeState.endDate || props.maxDate || props.rangeState.selecting && props.minDate;\n cell.inRange = props.minDate && calTime.isSameOrAfter(props.minDate, \"month\") && (calEndDate && calTime.isSameOrBefore(calEndDate, \"month\")) || props.minDate && calTime.isSameOrBefore(props.minDate, \"month\") && (calEndDate && calTime.isSameOrAfter(calEndDate, \"month\"));\n if ((_a = props.minDate) == null ? void 0 : _a.isSameOrAfter(calEndDate)) {\n cell.start = calEndDate && calTime.isSame(calEndDate, \"month\");\n cell.end = props.minDate && calTime.isSame(props.minDate, \"month\");\n } else {\n cell.start = props.minDate && calTime.isSame(props.minDate, \"month\");\n cell.end = calEndDate && calTime.isSame(calEndDate, \"month\");\n }\n const isToday = now.isSame(calTime);\n if (isToday) {\n cell.type = \"today\";\n }\n cell.text = index;\n let cellDate = calTime.toDate();\n cell.disabled = props.disabledDate && props.disabledDate(cellDate);\n row[j] = cell;\n }\n }\n return rows2;\n });\n const getCellStyle = (cell) => {\n const style = {};\n const year = props.date.year();\n const today = new Date();\n const month = cell.text;\n style.disabled = props.disabledDate ? datesInMonth(year, month).every(props.disabledDate) : false;\n style.current = coerceTruthyValueToArray(props.parsedValue).findIndex((date) => date.year() === year && date.month() === month) >= 0;\n style.today = today.getFullYear() === year && today.getMonth() === month;\n if (cell.inRange) {\n style[\"in-range\"] = true;\n if (cell.start) {\n style[\"start-date\"] = true;\n }\n if (cell.end) {\n style[\"end-date\"] = true;\n }\n }\n return style;\n };\n const handleMouseMove = (event) => {\n if (!props.rangeState.selecting)\n return;\n let target = event.target;\n if (target.tagName === \"A\") {\n target = target.parentNode.parentNode;\n }\n if (target.tagName === \"DIV\") {\n target = target.parentNode;\n }\n if (target.tagName !== \"TD\")\n return;\n const row = target.parentNode.rowIndex;\n const column = target.cellIndex;\n if (rows.value[row][column].disabled)\n return;\n if (row !== lastRow.value || column !== lastColumn.value) {\n lastRow.value = row;\n lastColumn.value = column;\n ctx.emit(\"changerange\", {\n selecting: true,\n endDate: props.date.startOf(\"year\").month(row * 4 + column)\n });\n }\n };\n const handleMonthTableClick = (event) => {\n let target = event.target;\n if (target.tagName === \"A\") {\n target = target.parentNode.parentNode;\n }\n if (target.tagName === \"DIV\") {\n target = target.parentNode;\n }\n if (target.tagName !== \"TD\")\n return;\n if (hasClass(target, \"disabled\"))\n return;\n const column = target.cellIndex;\n const row = target.parentNode.rowIndex;\n const month = row * 4 + column;\n const newDate = props.date.startOf(\"year\").month(month);\n if (props.selectionMode === \"range\") {\n if (!props.rangeState.selecting) {\n ctx.emit(\"pick\", { minDate: newDate, maxDate: null });\n ctx.emit(\"select\", true);\n } else {\n if (newDate >= props.minDate) {\n ctx.emit(\"pick\", { minDate: props.minDate, maxDate: newDate });\n } else {\n ctx.emit(\"pick\", { minDate: newDate, maxDate: props.minDate });\n }\n ctx.emit(\"select\", false);\n }\n } else {\n ctx.emit(\"pick\", month);\n }\n };\n return {\n handleMouseMove,\n handleMonthTableClick,\n rows,\n getCellStyle,\n t,\n months\n };\n }\n});\n\nconst _hoisted_1$1 = { class: \"cell\" };\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"table\", {\n class: \"el-month-table\",\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleMonthTableClick && _ctx.handleMonthTableClick(...args)),\n onMousemove: _cache[2] || (_cache[2] = (...args) => _ctx.handleMouseMove && _ctx.handleMouseMove(...args))\n }, [\n createVNode(\"tbody\", null, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.rows, (row, key) => {\n return openBlock(), createBlock(\"tr\", { key }, [\n (openBlock(true), createBlock(Fragment, null, renderList(row, (cell, key_) => {\n return openBlock(), createBlock(\"td\", {\n key: key_,\n class: _ctx.getCellStyle(cell)\n }, [\n createVNode(\"div\", null, [\n createVNode(\"a\", _hoisted_1$1, toDisplayString(_ctx.t(\"el.datepicker.months.\" + _ctx.months[cell.text])), 1)\n ])\n ], 2);\n }), 128))\n ]);\n }), 128))\n ])\n ], 32);\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"packages/date-picker/src/date-picker-com/basic-month-table.vue\";\n\nconst datesInYear = (year) => {\n const firstDay = dayjs(String(year)).startOf(\"year\");\n const lastDay = firstDay.endOf(\"year\");\n const numOfDays = lastDay.dayOfYear();\n return rangeArr(numOfDays).map((n) => firstDay.add(n, \"day\").toDate());\n};\nvar script$2 = defineComponent({\n props: {\n disabledDate: {\n type: Function\n },\n parsedValue: {\n type: Object\n },\n date: {\n type: Object\n }\n },\n emits: [\"pick\"],\n setup(props, ctx) {\n const startYear = computed(() => {\n return Math.floor(props.date.year() / 10) * 10;\n });\n const getCellStyle = (year) => {\n const style = {};\n const today = dayjs();\n style.disabled = props.disabledDate ? datesInYear(year).every(props.disabledDate) : false;\n style.current = coerceTruthyValueToArray(props.parsedValue).findIndex((_) => _.year() === year) >= 0;\n style.today = today.year() === year;\n return style;\n };\n const handleYearTableClick = (event) => {\n const target = event.target;\n if (target.tagName === \"A\") {\n if (hasClass(target.parentNode, \"disabled\"))\n return;\n const year = target.textContent || target.innerText;\n ctx.emit(\"pick\", Number(year));\n }\n };\n return {\n startYear,\n getCellStyle,\n handleYearTableClick\n };\n }\n});\n\nconst _hoisted_1$2 = { class: \"cell\" };\nconst _hoisted_2 = { class: \"cell\" };\nconst _hoisted_3 = { class: \"cell\" };\nconst _hoisted_4 = { class: \"cell\" };\nconst _hoisted_5 = { class: \"cell\" };\nconst _hoisted_6 = { class: \"cell\" };\nconst _hoisted_7 = { class: \"cell\" };\nconst _hoisted_8 = { class: \"cell\" };\nconst _hoisted_9 = { class: \"cell\" };\nconst _hoisted_10 = { class: \"cell\" };\nconst _hoisted_11 = /* @__PURE__ */ createVNode(\"td\", null, null, -1);\nconst _hoisted_12 = /* @__PURE__ */ createVNode(\"td\", null, null, -1);\nfunction render$2(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"table\", {\n class: \"el-year-table\",\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleYearTableClick && _ctx.handleYearTableClick(...args))\n }, [\n createVNode(\"tbody\", null, [\n createVNode(\"tr\", null, [\n createVNode(\"td\", {\n class: [\"available\", _ctx.getCellStyle(_ctx.startYear + 0)]\n }, [\n createVNode(\"a\", _hoisted_1$2, toDisplayString(_ctx.startYear), 1)\n ], 2),\n createVNode(\"td\", {\n class: [\"available\", _ctx.getCellStyle(_ctx.startYear + 1)]\n }, [\n createVNode(\"a\", _hoisted_2, toDisplayString(_ctx.startYear + 1), 1)\n ], 2),\n createVNode(\"td\", {\n class: [\"available\", _ctx.getCellStyle(_ctx.startYear + 2)]\n }, [\n createVNode(\"a\", _hoisted_3, toDisplayString(_ctx.startYear + 2), 1)\n ], 2),\n createVNode(\"td\", {\n class: [\"available\", _ctx.getCellStyle(_ctx.startYear + 3)]\n }, [\n createVNode(\"a\", _hoisted_4, toDisplayString(_ctx.startYear + 3), 1)\n ], 2)\n ]),\n createVNode(\"tr\", null, [\n createVNode(\"td\", {\n class: [\"available\", _ctx.getCellStyle(_ctx.startYear + 4)]\n }, [\n createVNode(\"a\", _hoisted_5, toDisplayString(_ctx.startYear + 4), 1)\n ], 2),\n createVNode(\"td\", {\n class: [\"available\", _ctx.getCellStyle(_ctx.startYear + 5)]\n }, [\n createVNode(\"a\", _hoisted_6, toDisplayString(_ctx.startYear + 5), 1)\n ], 2),\n createVNode(\"td\", {\n class: [\"available\", _ctx.getCellStyle(_ctx.startYear + 6)]\n }, [\n createVNode(\"a\", _hoisted_7, toDisplayString(_ctx.startYear + 6), 1)\n ], 2),\n createVNode(\"td\", {\n class: [\"available\", _ctx.getCellStyle(_ctx.startYear + 7)]\n }, [\n createVNode(\"a\", _hoisted_8, toDisplayString(_ctx.startYear + 7), 1)\n ], 2)\n ]),\n createVNode(\"tr\", null, [\n createVNode(\"td\", {\n class: [\"available\", _ctx.getCellStyle(_ctx.startYear + 8)]\n }, [\n createVNode(\"a\", _hoisted_9, toDisplayString(_ctx.startYear + 8), 1)\n ], 2),\n createVNode(\"td\", {\n class: [\"available\", _ctx.getCellStyle(_ctx.startYear + 9)]\n }, [\n createVNode(\"a\", _hoisted_10, toDisplayString(_ctx.startYear + 9), 1)\n ], 2),\n _hoisted_11,\n _hoisted_12\n ])\n ])\n ]);\n}\n\nscript$2.render = render$2;\nscript$2.__file = \"packages/date-picker/src/date-picker-com/basic-year-table.vue\";\n\nconst timeWithinRange = () => true;\nvar script$3 = defineComponent({\n components: {\n DateTable: script,\n ElInput,\n ElButton,\n TimePickPanel,\n MonthTable: script$1,\n YearTable: script$2\n },\n directives: { clickoutside: ClickOutside },\n props: {\n visible: {\n type: Boolean,\n default: false\n },\n parsedValue: {\n type: [Object, Array]\n },\n format: {\n type: String,\n default: \"\"\n },\n type: {\n type: String,\n required: true,\n validator: isValidDatePickType\n }\n },\n emits: [\"pick\", \"set-picker-option\"],\n setup(props, ctx) {\n const { t } = useLocaleInject();\n const innerDate = ref(dayjs());\n const month = computed(() => {\n return innerDate.value.month();\n });\n const year = computed(() => {\n return innerDate.value.year();\n });\n const selectableRange = ref([]);\n const userInputDate = ref(null);\n const userInputTime = ref(null);\n const checkDateWithinRange = (date) => {\n return selectableRange.value.length > 0 ? timeWithinRange(date, selectableRange.value, props.format || \"HH:mm:ss\") : true;\n };\n const formatEmit = (emitDayjs) => {\n if (defaultTime) {\n const defaultTimeD = dayjs(defaultTime);\n return defaultTimeD.year(emitDayjs.year()).month(emitDayjs.month()).date(emitDayjs.date());\n }\n if (showTime.value)\n return emitDayjs.millisecond(0);\n return emitDayjs.startOf(\"day\");\n };\n const emit = (value, ...args) => {\n if (!value) {\n ctx.emit(\"pick\", value, ...args);\n } else if (Array.isArray(value)) {\n const dates = value.map(formatEmit);\n ctx.emit(\"pick\", dates, ...args);\n } else {\n ctx.emit(\"pick\", formatEmit(value), ...args);\n }\n userInputDate.value = null;\n userInputTime.value = null;\n };\n const handleDatePick = (value) => {\n if (selectionMode.value === \"day\") {\n let newDate = props.parsedValue ? props.parsedValue.year(value.year()).month(value.month()).date(value.date()) : value;\n if (!checkDateWithinRange(newDate)) {\n newDate = selectableRange.value[0][0].year(value.year()).month(value.month()).date(value.date());\n }\n innerDate.value = newDate;\n emit(newDate, showTime.value);\n } else if (selectionMode.value === \"week\") {\n emit(value.date);\n } else if (selectionMode.value === \"dates\") {\n emit(value, true);\n }\n };\n const prevMonth_ = () => {\n innerDate.value = innerDate.value.subtract(1, \"month\");\n };\n const nextMonth_ = () => {\n innerDate.value = innerDate.value.add(1, \"month\");\n };\n const prevYear_ = () => {\n if (currentView.value === \"year\") {\n innerDate.value = innerDate.value.subtract(10, \"year\");\n } else {\n innerDate.value = innerDate.value.subtract(1, \"year\");\n }\n };\n const nextYear_ = () => {\n if (currentView.value === \"year\") {\n innerDate.value = innerDate.value.add(10, \"year\");\n } else {\n innerDate.value = innerDate.value.add(1, \"year\");\n }\n };\n const currentView = ref(\"date\");\n const yearLabel = computed(() => {\n const yearTranslation = t(\"el.datepicker.year\");\n if (currentView.value === \"year\") {\n const startYear = Math.floor(year.value / 10) * 10;\n if (yearTranslation) {\n return startYear + \" \" + yearTranslation + \" - \" + (startYear + 9) + \" \" + yearTranslation;\n }\n return startYear + \" - \" + (startYear + 9);\n }\n return year.value + \" \" + yearTranslation;\n });\n const handleShortcutClick = (shortcut) => {\n const shortcutValue = typeof shortcut.value === \"function\" ? shortcut.value() : shortcut.value;\n if (shortcutValue) {\n emit(dayjs(shortcutValue));\n return;\n }\n if (shortcut.onClick) {\n shortcut.onClick(ctx);\n }\n };\n const selectionMode = computed(() => {\n if ([\"week\", \"month\", \"year\", \"dates\"].includes(props.type)) {\n return props.type;\n }\n return \"day\";\n });\n watch(() => selectionMode.value, (val) => {\n if ([\"month\", \"year\"].includes(val)) {\n currentView.value = val;\n return;\n }\n currentView.value = \"date\";\n }, { immediate: true });\n const hasShortcuts = computed(() => !!shortcuts.length);\n const handleMonthPick = (month2) => {\n innerDate.value = innerDate.value.startOf(\"month\").month(month2);\n if (selectionMode.value === \"month\") {\n emit(innerDate.value);\n } else {\n currentView.value = \"date\";\n }\n };\n const handleYearPick = (year2) => {\n if (selectionMode.value === \"year\") {\n innerDate.value = innerDate.value.startOf(\"year\").year(year2);\n emit(innerDate.value);\n } else {\n innerDate.value = innerDate.value.year(year2);\n currentView.value = \"month\";\n }\n };\n const showMonthPicker = () => {\n currentView.value = \"month\";\n };\n const showYearPicker = () => {\n currentView.value = \"year\";\n };\n const showTime = computed(() => props.type === \"datetime\" || props.type === \"datetimerange\");\n const footerVisible = computed(() => {\n return showTime.value || selectionMode.value === \"dates\";\n });\n const onConfirm = () => {\n if (selectionMode.value === \"dates\") {\n emit(props.parsedValue);\n } else {\n let result = props.parsedValue;\n if (!result) {\n const defaultTimeD = dayjs(defaultTime);\n const defaultValueD = getDefaultValue();\n result = defaultTimeD.year(defaultValueD.year()).month(defaultValueD.month()).date(defaultValueD.date());\n }\n innerDate.value = result;\n emit(result);\n }\n };\n const changeToNow = () => {\n const now = dayjs();\n const nowDate = now.toDate();\n if ((!disabledDate || !disabledDate(nowDate)) && checkDateWithinRange(nowDate)) {\n innerDate.value = dayjs();\n emit(innerDate.value);\n }\n };\n const timeFormat = computed(() => {\n return extractTimeFormat(props.format);\n });\n const dateFormat = computed(() => {\n return extractDateFormat(props.format);\n });\n const visibleTime = computed(() => {\n if (userInputTime.value)\n return userInputTime.value;\n if (!props.parsedValue && !defaultValue)\n return;\n return (props.parsedValue || innerDate.value).format(timeFormat.value);\n });\n const visibleDate = computed(() => {\n if (userInputDate.value)\n return userInputDate.value;\n if (!props.parsedValue && !defaultValue)\n return;\n return (props.parsedValue || innerDate.value).format(dateFormat.value);\n });\n const timePickerVisible = ref(false);\n const onTimePickerInputFocus = () => {\n timePickerVisible.value = true;\n };\n const handleTimePickClose = () => {\n timePickerVisible.value = false;\n };\n const handleTimePick = (value, visible, first) => {\n const newDate = props.parsedValue ? props.parsedValue.hour(value.hour()).minute(value.minute()).second(value.second()) : value;\n innerDate.value = newDate;\n emit(innerDate.value, true);\n if (!first) {\n timePickerVisible.value = visible;\n }\n };\n const handleVisibleTimeChange = (value) => {\n const newDate = dayjs(value, timeFormat.value);\n if (newDate.isValid() && checkDateWithinRange(newDate)) {\n innerDate.value = newDate.year(innerDate.value.year()).month(innerDate.value.month()).date(innerDate.value.date());\n userInputTime.value = null;\n timePickerVisible.value = false;\n emit(innerDate.value, true);\n }\n };\n const handleVisibleDateChange = (value) => {\n const newDate = dayjs(value, dateFormat.value);\n if (newDate.isValid()) {\n if (disabledDate && disabledDate(newDate.toDate())) {\n return;\n }\n innerDate.value = newDate.hour(innerDate.value.hour()).minute(innerDate.value.minute()).second(innerDate.value.second());\n userInputDate.value = null;\n emit(innerDate.value, true);\n }\n };\n const isValidValue = (date_) => {\n return date_.isValid() && (disabledDate ? !disabledDate(date_.toDate()) : true);\n };\n const formatToString = (value) => {\n if (selectionMode.value === \"dates\") {\n return value.map((_) => _.format(props.format));\n }\n return value.format(props.format);\n };\n const parseUserInput = (value) => {\n return dayjs(value, props.format);\n };\n const getDefaultValue = () => {\n return dayjs(defaultValue);\n };\n const handleKeydown = (event) => {\n const { code, keyCode } = event;\n const list = [EVENT_CODE.up, EVENT_CODE.down, EVENT_CODE.left, EVENT_CODE.right];\n if (props.visible && !timePickerVisible.value) {\n if (list.includes(code)) {\n handleKeyControl(keyCode);\n event.stopPropagation();\n event.preventDefault();\n }\n if (code === EVENT_CODE.enter && userInputDate.value === null && userInputTime.value === null) {\n emit(innerDate, false);\n }\n }\n };\n const handleKeyControl = (keyCode) => {\n const mapping = {\n \"year\": {\n 38: -4,\n 40: 4,\n 37: -1,\n 39: 1,\n offset: (date, step) => date.setFullYear(date.getFullYear() + step)\n },\n \"month\": {\n 38: -4,\n 40: 4,\n 37: -1,\n 39: 1,\n offset: (date, step) => date.setMonth(date.getMonth() + step)\n },\n \"week\": {\n 38: -1,\n 40: 1,\n 37: -1,\n 39: 1,\n offset: (date, step) => date.setDate(date.getDate() + step * 7)\n },\n \"day\": {\n 38: -7,\n 40: 7,\n 37: -1,\n 39: 1,\n offset: (date, step) => date.setDate(date.getDate() + step)\n }\n };\n const newDate = innerDate.value.toDate();\n while (Math.abs(innerDate.value.diff(newDate, \"year\", true)) < 1) {\n const map = mapping[selectionMode.value];\n map.offset(newDate, map[keyCode]);\n if (disabledDate && disabledDate(newDate)) {\n continue;\n }\n const result = dayjs(newDate);\n innerDate.value = result;\n ctx.emit(\"pick\", result, true);\n break;\n }\n };\n ctx.emit(\"set-picker-option\", [\"isValidValue\", isValidValue]);\n ctx.emit(\"set-picker-option\", [\"formatToString\", formatToString]);\n ctx.emit(\"set-picker-option\", [\"parseUserInput\", parseUserInput]);\n ctx.emit(\"set-picker-option\", [\"handleKeydown\", handleKeydown]);\n const pickerBase = inject(\"EP_PICKER_BASE\");\n const { shortcuts, disabledDate, cellClassName, defaultTime, defaultValue, arrowControl } = pickerBase.props;\n watch(() => props.parsedValue, (val) => {\n if (val) {\n if (selectionMode.value === \"dates\")\n return;\n if (Array.isArray(val))\n return;\n innerDate.value = val;\n } else {\n innerDate.value = getDefaultValue();\n }\n }, { immediate: true });\n return {\n handleTimePick,\n handleTimePickClose,\n onTimePickerInputFocus,\n timePickerVisible,\n visibleTime,\n visibleDate,\n showTime,\n changeToNow,\n onConfirm,\n footerVisible,\n handleYearPick,\n showMonthPicker,\n showYearPicker,\n handleMonthPick,\n hasShortcuts,\n shortcuts,\n arrowControl,\n disabledDate,\n cellClassName,\n selectionMode,\n handleShortcutClick,\n prevYear_,\n nextYear_,\n prevMonth_,\n nextMonth_,\n innerDate,\n t,\n yearLabel,\n currentView,\n month,\n handleDatePick,\n handleVisibleTimeChange,\n handleVisibleDateChange,\n timeFormat,\n userInputTime,\n userInputDate\n };\n }\n});\n\nconst _hoisted_1$3 = { class: \"el-picker-panel__body-wrapper\" };\nconst _hoisted_2$1 = {\n key: 0,\n class: \"el-picker-panel__sidebar\"\n};\nconst _hoisted_3$1 = { class: \"el-picker-panel__body\" };\nconst _hoisted_4$1 = {\n key: 0,\n class: \"el-date-picker__time-header\"\n};\nconst _hoisted_5$1 = { class: \"el-date-picker__editor-wrap\" };\nconst _hoisted_6$1 = { class: \"el-date-picker__editor-wrap\" };\nconst _hoisted_7$1 = { class: \"el-picker-panel__content\" };\nconst _hoisted_8$1 = { class: \"el-picker-panel__footer\" };\nfunction render$3(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_input = resolveComponent(\"el-input\");\n const _component_time_pick_panel = resolveComponent(\"time-pick-panel\");\n const _component_date_table = resolveComponent(\"date-table\");\n const _component_year_table = resolveComponent(\"year-table\");\n const _component_month_table = resolveComponent(\"month-table\");\n const _component_el_button = resolveComponent(\"el-button\");\n const _directive_clickoutside = resolveDirective(\"clickoutside\");\n return openBlock(), createBlock(\"div\", {\n class: [\"el-picker-panel el-date-picker\", [{\n \"has-sidebar\": _ctx.$slots.sidebar || _ctx.hasShortcuts,\n \"has-time\": _ctx.showTime\n }]]\n }, [\n createVNode(\"div\", _hoisted_1$3, [\n renderSlot(_ctx.$slots, \"sidebar\", { class: \"el-picker-panel__sidebar\" }),\n _ctx.hasShortcuts ? (openBlock(), createBlock(\"div\", _hoisted_2$1, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.shortcuts, (shortcut, key) => {\n return openBlock(), createBlock(\"button\", {\n key,\n type: \"button\",\n class: \"el-picker-panel__shortcut\",\n onClick: ($event) => _ctx.handleShortcutClick(shortcut)\n }, toDisplayString(shortcut.text), 9, [\"onClick\"]);\n }), 128))\n ])) : createCommentVNode(\"v-if\", true),\n createVNode(\"div\", _hoisted_3$1, [\n _ctx.showTime ? (openBlock(), createBlock(\"div\", _hoisted_4$1, [\n createVNode(\"span\", _hoisted_5$1, [\n createVNode(_component_el_input, {\n placeholder: _ctx.t(\"el.datepicker.selectDate\"),\n \"model-value\": _ctx.visibleDate,\n size: \"small\",\n onInput: _cache[1] || (_cache[1] = (val) => _ctx.userInputDate = val),\n onChange: _ctx.handleVisibleDateChange\n }, null, 8, [\"placeholder\", \"model-value\", \"onChange\"])\n ]),\n withDirectives(createVNode(\"span\", _hoisted_6$1, [\n createVNode(_component_el_input, {\n placeholder: _ctx.t(\"el.datepicker.selectTime\"),\n \"model-value\": _ctx.visibleTime,\n size: \"small\",\n onFocus: _ctx.onTimePickerInputFocus,\n onInput: _cache[2] || (_cache[2] = (val) => _ctx.userInputTime = val),\n onChange: _ctx.handleVisibleTimeChange\n }, null, 8, [\"placeholder\", \"model-value\", \"onFocus\", \"onChange\"]),\n createVNode(_component_time_pick_panel, {\n visible: _ctx.timePickerVisible,\n format: _ctx.timeFormat,\n \"time-arrow-control\": _ctx.arrowControl,\n \"parsed-value\": _ctx.innerDate,\n onPick: _ctx.handleTimePick\n }, null, 8, [\"visible\", \"format\", \"time-arrow-control\", \"parsed-value\", \"onPick\"])\n ], 512), [\n [_directive_clickoutside, _ctx.handleTimePickClose]\n ])\n ])) : createCommentVNode(\"v-if\", true),\n withDirectives(createVNode(\"div\", {\n class: [\"el-date-picker__header\", { \"el-date-picker__header--bordered\": _ctx.currentView === \"year\" || _ctx.currentView === \"month\" }]\n }, [\n createVNode(\"button\", {\n type: \"button\",\n \"aria-label\": _ctx.t(`el.datepicker.prevYear`),\n class: \"el-picker-panel__icon-btn el-date-picker__prev-btn el-icon-d-arrow-left\",\n onClick: _cache[3] || (_cache[3] = (...args) => _ctx.prevYear_ && _ctx.prevYear_(...args))\n }, null, 8, [\"aria-label\"]),\n withDirectives(createVNode(\"button\", {\n type: \"button\",\n \"aria-label\": _ctx.t(`el.datepicker.prevMonth`),\n class: \"el-picker-panel__icon-btn el-date-picker__prev-btn el-icon-arrow-left\",\n onClick: _cache[4] || (_cache[4] = (...args) => _ctx.prevMonth_ && _ctx.prevMonth_(...args))\n }, null, 8, [\"aria-label\"]), [\n [vShow, _ctx.currentView === \"date\"]\n ]),\n createVNode(\"span\", {\n role: \"button\",\n class: \"el-date-picker__header-label\",\n onClick: _cache[5] || (_cache[5] = (...args) => _ctx.showYearPicker && _ctx.showYearPicker(...args))\n }, toDisplayString(_ctx.yearLabel), 1),\n withDirectives(createVNode(\"span\", {\n role: \"button\",\n class: [\"el-date-picker__header-label\", { active: _ctx.currentView === \"month\" }],\n onClick: _cache[6] || (_cache[6] = (...args) => _ctx.showMonthPicker && _ctx.showMonthPicker(...args))\n }, toDisplayString(_ctx.t(`el.datepicker.month${_ctx.month + 1}`)), 3), [\n [vShow, _ctx.currentView === \"date\"]\n ]),\n createVNode(\"button\", {\n type: \"button\",\n \"aria-label\": _ctx.t(`el.datepicker.nextYear`),\n class: \"el-picker-panel__icon-btn el-date-picker__next-btn el-icon-d-arrow-right\",\n onClick: _cache[7] || (_cache[7] = (...args) => _ctx.nextYear_ && _ctx.nextYear_(...args))\n }, null, 8, [\"aria-label\"]),\n withDirectives(createVNode(\"button\", {\n type: \"button\",\n \"aria-label\": _ctx.t(`el.datepicker.nextMonth`),\n class: \"el-picker-panel__icon-btn el-date-picker__next-btn el-icon-arrow-right\",\n onClick: _cache[8] || (_cache[8] = (...args) => _ctx.nextMonth_ && _ctx.nextMonth_(...args))\n }, null, 8, [\"aria-label\"]), [\n [vShow, _ctx.currentView === \"date\"]\n ])\n ], 2), [\n [vShow, _ctx.currentView !== \"time\"]\n ]),\n createVNode(\"div\", _hoisted_7$1, [\n _ctx.currentView === \"date\" ? (openBlock(), createBlock(_component_date_table, {\n key: 0,\n \"selection-mode\": _ctx.selectionMode,\n date: _ctx.innerDate,\n \"parsed-value\": _ctx.parsedValue,\n \"disabled-date\": _ctx.disabledDate,\n onPick: _ctx.handleDatePick\n }, null, 8, [\"selection-mode\", \"date\", \"parsed-value\", \"disabled-date\", \"onPick\"])) : createCommentVNode(\"v-if\", true),\n _ctx.currentView === \"year\" ? (openBlock(), createBlock(_component_year_table, {\n key: 1,\n date: _ctx.innerDate,\n \"disabled-date\": _ctx.disabledDate,\n \"parsed-value\": _ctx.parsedValue,\n onPick: _ctx.handleYearPick\n }, null, 8, [\"date\", \"disabled-date\", \"parsed-value\", \"onPick\"])) : createCommentVNode(\"v-if\", true),\n _ctx.currentView === \"month\" ? (openBlock(), createBlock(_component_month_table, {\n key: 2,\n date: _ctx.innerDate,\n \"parsed-value\": _ctx.parsedValue,\n \"disabled-date\": _ctx.disabledDate,\n onPick: _ctx.handleMonthPick\n }, null, 8, [\"date\", \"parsed-value\", \"disabled-date\", \"onPick\"])) : createCommentVNode(\"v-if\", true)\n ])\n ])\n ]),\n withDirectives(createVNode(\"div\", _hoisted_8$1, [\n withDirectives(createVNode(_component_el_button, {\n size: \"mini\",\n type: \"text\",\n class: \"el-picker-panel__link-btn\",\n onClick: _ctx.changeToNow\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.t(\"el.datepicker.now\")), 1)\n ]),\n _: 1\n }, 8, [\"onClick\"]), [\n [vShow, _ctx.selectionMode !== \"dates\"]\n ]),\n createVNode(_component_el_button, {\n plain: \"\",\n size: \"mini\",\n class: \"el-picker-panel__link-btn\",\n onClick: _ctx.onConfirm\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.t(\"el.datepicker.confirm\")), 1)\n ]),\n _: 1\n }, 8, [\"onClick\"])\n ], 512), [\n [vShow, _ctx.footerVisible && _ctx.currentView === \"date\"]\n ])\n ], 2);\n}\n\nscript$3.render = render$3;\nscript$3.__file = \"packages/date-picker/src/date-picker-com/panel-date-pick.vue\";\n\nvar script$4 = defineComponent({\n directives: { clickoutside: ClickOutside },\n components: { TimePickPanel, DateTable: script, ElInput, ElButton },\n props: {\n unlinkPanels: Boolean,\n parsedValue: {\n type: Array\n },\n type: {\n type: String,\n required: true,\n validator: isValidDatePickType\n }\n },\n emits: [\"pick\", \"set-picker-option\"],\n setup(props, ctx) {\n const { t } = useLocaleInject();\n const leftDate = ref(dayjs());\n const rightDate = ref(dayjs().add(1, \"month\"));\n const minDate = ref(null);\n const maxDate = ref(null);\n const dateUserInput = ref({\n min: null,\n max: null\n });\n const timeUserInput = ref({\n min: null,\n max: null\n });\n const leftLabel = computed(() => {\n return leftDate.value.year() + \" \" + t(\"el.datepicker.year\") + \" \" + t(`el.datepicker.month${leftDate.value.month() + 1}`);\n });\n const rightLabel = computed(() => {\n return rightDate.value.year() + \" \" + t(\"el.datepicker.year\") + \" \" + t(`el.datepicker.month${rightDate.value.month() + 1}`);\n });\n const leftYear = computed(() => {\n return leftDate.value.year();\n });\n const leftMonth = computed(() => {\n return leftDate.value.month();\n });\n const rightYear = computed(() => {\n return rightDate.value.year();\n });\n const rightMonth = computed(() => {\n return rightDate.value.month();\n });\n const hasShortcuts = computed(() => !!shortcuts.length);\n const minVisibleDate = computed(() => {\n if (dateUserInput.value.min !== null)\n return dateUserInput.value.min;\n if (minDate.value)\n return minDate.value.format(dateFormat.value);\n return \"\";\n });\n const maxVisibleDate = computed(() => {\n if (dateUserInput.value.max !== null)\n return dateUserInput.value.max;\n if (maxDate.value || minDate.value)\n return (maxDate.value || minDate.value).format(dateFormat.value);\n return \"\";\n });\n const minVisibleTime = computed(() => {\n if (timeUserInput.value.min !== null)\n return timeUserInput.value.min;\n if (minDate.value)\n return minDate.value.format(timeFormat.value);\n return \"\";\n });\n const maxVisibleTime = computed(() => {\n if (timeUserInput.value.max !== null)\n return timeUserInput.value.max;\n if (maxDate.value || minDate.value)\n return (maxDate.value || minDate.value).format(timeFormat.value);\n return \"\";\n });\n const timeFormat = computed(() => {\n return extractTimeFormat(format);\n });\n const dateFormat = computed(() => {\n return extractDateFormat(format);\n });\n const leftPrevYear = () => {\n leftDate.value = leftDate.value.subtract(1, \"year\");\n if (!props.unlinkPanels) {\n rightDate.value = leftDate.value.add(1, \"month\");\n }\n };\n const leftPrevMonth = () => {\n leftDate.value = leftDate.value.subtract(1, \"month\");\n if (!props.unlinkPanels) {\n rightDate.value = leftDate.value.add(1, \"month\");\n }\n };\n const rightNextYear = () => {\n if (!props.unlinkPanels) {\n leftDate.value = leftDate.value.add(1, \"year\");\n rightDate.value = leftDate.value.add(1, \"month\");\n } else {\n rightDate.value = rightDate.value.add(1, \"year\");\n }\n };\n const rightNextMonth = () => {\n if (!props.unlinkPanels) {\n leftDate.value = leftDate.value.add(1, \"month\");\n rightDate.value = leftDate.value.add(1, \"month\");\n } else {\n rightDate.value = rightDate.value.add(1, \"month\");\n }\n };\n const leftNextYear = () => {\n leftDate.value = leftDate.value.add(1, \"year\");\n };\n const leftNextMonth = () => {\n leftDate.value = leftDate.value.add(1, \"month\");\n };\n const rightPrevYear = () => {\n rightDate.value = rightDate.value.subtract(1, \"year\");\n };\n const rightPrevMonth = () => {\n rightDate.value = rightDate.value.subtract(1, \"month\");\n };\n const enableMonthArrow = computed(() => {\n const nextMonth = (leftMonth.value + 1) % 12;\n const yearOffset = leftMonth.value + 1 >= 12 ? 1 : 0;\n return props.unlinkPanels && new Date(leftYear.value + yearOffset, nextMonth) < new Date(rightYear.value, rightMonth.value);\n });\n const enableYearArrow = computed(() => {\n return props.unlinkPanels && rightYear.value * 12 + rightMonth.value - (leftYear.value * 12 + leftMonth.value + 1) >= 12;\n });\n const isValidValue = (value) => {\n return Array.isArray(value) && value[0] && value[1] && value[0].valueOf() <= value[1].valueOf();\n };\n const rangeState = ref({\n endDate: null,\n selecting: false\n });\n const btnDisabled = computed(() => {\n return !(minDate.value && maxDate.value && !rangeState.value.selecting && isValidValue([minDate.value, maxDate.value]));\n });\n const handleChangeRange = (val) => {\n rangeState.value = val;\n };\n const onSelect = (selecting) => {\n rangeState.value.selecting = selecting;\n if (!selecting) {\n rangeState.value.endDate = null;\n }\n };\n const showTime = computed(() => props.type === \"datetime\" || props.type === \"datetimerange\");\n const handleConfirm = (visible = false) => {\n if (isValidValue([minDate.value, maxDate.value])) {\n ctx.emit(\"pick\", [minDate.value, maxDate.value], visible);\n }\n };\n const formatEmit = (emitDayjs, index) => {\n if (!emitDayjs)\n return;\n if (defaultTime) {\n const defaultTimeD = dayjs(defaultTime[index] || defaultTime);\n return defaultTimeD.year(emitDayjs.year()).month(emitDayjs.month()).date(emitDayjs.date());\n }\n return emitDayjs;\n };\n const handleRangePick = (val, close = true) => {\n const minDate_ = formatEmit(val.minDate, 0);\n const maxDate_ = formatEmit(val.maxDate, 1);\n if (maxDate.value === maxDate_ && minDate.value === minDate_) {\n return;\n }\n maxDate.value = maxDate_;\n minDate.value = minDate_;\n if (!close || showTime.value)\n return;\n handleConfirm();\n };\n const handleShortcutClick = (shortcut) => {\n const shortcutValues = typeof shortcut.value === \"function\" ? shortcut.value() : shortcut.value;\n if (shortcutValues) {\n ctx.emit(\"pick\", [dayjs(shortcutValues[0]), dayjs(shortcutValues[1])]);\n return;\n }\n if (shortcut.onClick) {\n shortcut.onClick(ctx);\n }\n };\n const minTimePickerVisible = ref(false);\n const maxTimePickerVisible = ref(false);\n const handleMinTimeClose = () => {\n minTimePickerVisible.value = false;\n };\n const handleMaxTimeClose = () => {\n maxTimePickerVisible.value = false;\n };\n const handleDateInput = (value, type) => {\n dateUserInput.value[type] = value;\n const parsedValueD = dayjs(value, dateFormat.value);\n if (parsedValueD.isValid()) {\n if (disabledDate && disabledDate(parsedValueD.toDate())) {\n return;\n }\n if (type === \"min\") {\n leftDate.value = parsedValueD;\n minDate.value = (minDate.value || leftDate.value).year(parsedValueD.year()).month(parsedValueD.month()).date(parsedValueD.date());\n if (!props.unlinkPanels) {\n rightDate.value = parsedValueD.add(1, \"month\");\n maxDate.value = minDate.value.add(1, \"month\");\n }\n } else {\n rightDate.value = parsedValueD;\n maxDate.value = (maxDate.value || rightDate.value).year(parsedValueD.year()).month(parsedValueD.month()).date(parsedValueD.date());\n if (!props.unlinkPanels) {\n leftDate.value = parsedValueD.subtract(1, \"month\");\n minDate.value = maxDate.value.subtract(1, \"month\");\n }\n }\n }\n };\n const handleDateChange = (value, type) => {\n dateUserInput.value[type] = null;\n };\n const handleTimeInput = (value, type) => {\n timeUserInput.value[type] = value;\n const parsedValueD = dayjs(value, timeFormat.value);\n if (parsedValueD.isValid()) {\n if (type === \"min\") {\n minTimePickerVisible.value = true;\n minDate.value = (minDate.value || leftDate.value).hour(parsedValueD.hour()).minute(parsedValueD.minute()).second(parsedValueD.second());\n if (!maxDate.value || maxDate.value.isBefore(minDate.value)) {\n maxDate.value = minDate.value;\n }\n } else {\n maxTimePickerVisible.value = true;\n maxDate.value = (maxDate.value || rightDate.value).hour(parsedValueD.hour()).minute(parsedValueD.minute()).second(parsedValueD.second());\n rightDate.value = maxDate.value;\n if (maxDate.value && maxDate.value.isBefore(minDate.value)) {\n minDate.value = maxDate.value;\n }\n }\n }\n };\n const handleTimeChange = (value, type) => {\n timeUserInput.value[type] = null;\n if (type === \"min\") {\n leftDate.value = minDate.value;\n minTimePickerVisible.value = false;\n } else {\n rightDate.value = maxDate.value;\n maxTimePickerVisible.value = false;\n }\n };\n const handleMinTimePick = (value, visible, first) => {\n if (timeUserInput.value.min)\n return;\n if (value) {\n leftDate.value = value;\n minDate.value = (minDate.value || leftDate.value).hour(value.hour()).minute(value.minute()).second(value.second());\n }\n if (!first) {\n minTimePickerVisible.value = visible;\n }\n if (!maxDate.value || maxDate.value.isBefore(minDate.value)) {\n maxDate.value = minDate.value;\n }\n };\n const handleMaxTimePick = (value, visible, first) => {\n if (timeUserInput.value.max)\n return;\n if (value) {\n rightDate.value = value;\n maxDate.value = (maxDate.value || rightDate.value).hour(value.hour()).minute(value.minute()).second(value.second());\n }\n if (!first) {\n maxTimePickerVisible.value = visible;\n }\n if (maxDate.value && maxDate.value.isBefore(minDate.value)) {\n minDate.value = maxDate.value;\n }\n };\n const handleClear = () => {\n leftDate.value = getDefaultValue()[0];\n rightDate.value = leftDate.value.add(1, \"month\");\n ctx.emit(\"pick\", null);\n };\n const formatToString = (value) => {\n return Array.isArray(value) ? value.map((_) => _.format(format)) : value.format(format);\n };\n const parseUserInput = (value) => {\n return Array.isArray(value) ? value.map((_) => dayjs(_, format)) : dayjs(value, format);\n };\n const getDefaultValue = () => {\n let start;\n if (Array.isArray(defaultValue)) {\n const left = dayjs(defaultValue[0]);\n let right = dayjs(defaultValue[1]);\n if (!props.unlinkPanels) {\n right = left.add(1, \"month\");\n }\n return [left, right];\n } else if (defaultValue) {\n start = dayjs(defaultValue);\n } else {\n start = dayjs();\n }\n return [start, start.add(1, \"month\")];\n };\n ctx.emit(\"set-picker-option\", [\"isValidValue\", isValidValue]);\n ctx.emit(\"set-picker-option\", [\"parseUserInput\", parseUserInput]);\n ctx.emit(\"set-picker-option\", [\"formatToString\", formatToString]);\n ctx.emit(\"set-picker-option\", [\"handleClear\", handleClear]);\n const pickerBase = inject(\"EP_PICKER_BASE\");\n const {\n shortcuts,\n disabledDate,\n cellClassName,\n format,\n defaultTime,\n defaultValue,\n arrowControl,\n clearable\n } = pickerBase.props;\n watch(() => props.parsedValue, (newVal) => {\n if (newVal && newVal.length === 2) {\n minDate.value = newVal[0];\n maxDate.value = newVal[1];\n leftDate.value = minDate.value;\n if (props.unlinkPanels && maxDate.value) {\n const minDateYear = minDate.value.year();\n const minDateMonth = minDate.value.month();\n const maxDateYear = maxDate.value.year();\n const maxDateMonth = maxDate.value.month();\n rightDate.value = minDateYear === maxDateYear && minDateMonth === maxDateMonth ? maxDate.value.add(1, \"month\") : maxDate.value;\n } else {\n rightDate.value = leftDate.value.add(1, \"month\");\n }\n } else {\n const defaultArr = getDefaultValue();\n minDate.value = null;\n maxDate.value = null;\n leftDate.value = defaultArr[0];\n rightDate.value = defaultArr[1];\n }\n }, { immediate: true });\n return {\n shortcuts,\n disabledDate,\n cellClassName,\n minTimePickerVisible,\n maxTimePickerVisible,\n handleMinTimeClose,\n handleMaxTimeClose,\n handleShortcutClick,\n rangeState,\n minDate,\n maxDate,\n handleRangePick,\n onSelect,\n handleChangeRange,\n btnDisabled,\n enableYearArrow,\n enableMonthArrow,\n rightPrevMonth,\n rightPrevYear,\n rightNextMonth,\n rightNextYear,\n leftPrevMonth,\n leftPrevYear,\n leftNextMonth,\n leftNextYear,\n hasShortcuts,\n leftLabel,\n rightLabel,\n leftDate,\n rightDate,\n showTime,\n t,\n minVisibleDate,\n maxVisibleDate,\n minVisibleTime,\n maxVisibleTime,\n arrowControl,\n handleDateInput,\n handleDateChange,\n handleTimeInput,\n handleTimeChange,\n handleMinTimePick,\n handleMaxTimePick,\n handleClear,\n handleConfirm,\n timeFormat,\n clearable\n };\n }\n});\n\nconst _hoisted_1$4 = { class: \"el-picker-panel__body-wrapper\" };\nconst _hoisted_2$2 = {\n key: 0,\n class: \"el-picker-panel__sidebar\"\n};\nconst _hoisted_3$2 = { class: \"el-picker-panel__body\" };\nconst _hoisted_4$2 = {\n key: 0,\n class: \"el-date-range-picker__time-header\"\n};\nconst _hoisted_5$2 = { class: \"el-date-range-picker__editors-wrap\" };\nconst _hoisted_6$2 = { class: \"el-date-range-picker__time-picker-wrap\" };\nconst _hoisted_7$2 = { class: \"el-date-range-picker__time-picker-wrap\" };\nconst _hoisted_8$2 = /* @__PURE__ */ createVNode(\"span\", { class: \"el-icon-arrow-right\" }, null, -1);\nconst _hoisted_9$1 = { class: \"el-date-range-picker__editors-wrap is-right\" };\nconst _hoisted_10$1 = { class: \"el-date-range-picker__time-picker-wrap\" };\nconst _hoisted_11$1 = { class: \"el-date-range-picker__time-picker-wrap\" };\nconst _hoisted_12$1 = { class: \"el-picker-panel__content el-date-range-picker__content is-left\" };\nconst _hoisted_13 = { class: \"el-date-range-picker__header\" };\nconst _hoisted_14 = { class: \"el-picker-panel__content el-date-range-picker__content is-right\" };\nconst _hoisted_15 = { class: \"el-date-range-picker__header\" };\nconst _hoisted_16 = {\n key: 0,\n class: \"el-picker-panel__footer\"\n};\nfunction render$4(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_input = resolveComponent(\"el-input\");\n const _component_time_pick_panel = resolveComponent(\"time-pick-panel\");\n const _component_date_table = resolveComponent(\"date-table\");\n const _component_el_button = resolveComponent(\"el-button\");\n const _directive_clickoutside = resolveDirective(\"clickoutside\");\n return openBlock(), createBlock(\"div\", {\n class: [\"el-picker-panel el-date-range-picker\", [{\n \"has-sidebar\": _ctx.$slots.sidebar || _ctx.hasShortcuts,\n \"has-time\": _ctx.showTime\n }]]\n }, [\n createVNode(\"div\", _hoisted_1$4, [\n renderSlot(_ctx.$slots, \"sidebar\", { class: \"el-picker-panel__sidebar\" }),\n _ctx.hasShortcuts ? (openBlock(), createBlock(\"div\", _hoisted_2$2, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.shortcuts, (shortcut, key) => {\n return openBlock(), createBlock(\"button\", {\n key,\n type: \"button\",\n class: \"el-picker-panel__shortcut\",\n onClick: ($event) => _ctx.handleShortcutClick(shortcut)\n }, toDisplayString(shortcut.text), 9, [\"onClick\"]);\n }), 128))\n ])) : createCommentVNode(\"v-if\", true),\n createVNode(\"div\", _hoisted_3$2, [\n _ctx.showTime ? (openBlock(), createBlock(\"div\", _hoisted_4$2, [\n createVNode(\"span\", _hoisted_5$2, [\n createVNode(\"span\", _hoisted_6$2, [\n createVNode(_component_el_input, {\n size: \"small\",\n disabled: _ctx.rangeState.selecting,\n placeholder: _ctx.t(\"el.datepicker.startDate\"),\n class: \"el-date-range-picker__editor\",\n \"model-value\": _ctx.minVisibleDate,\n onInput: _cache[1] || (_cache[1] = (val) => _ctx.handleDateInput(val, \"min\")),\n onChange: _cache[2] || (_cache[2] = (val) => _ctx.handleDateChange(val, \"min\"))\n }, null, 8, [\"disabled\", \"placeholder\", \"model-value\"])\n ]),\n withDirectives(createVNode(\"span\", _hoisted_7$2, [\n createVNode(_component_el_input, {\n size: \"small\",\n class: \"el-date-range-picker__editor\",\n disabled: _ctx.rangeState.selecting,\n placeholder: _ctx.t(\"el.datepicker.startTime\"),\n \"model-value\": _ctx.minVisibleTime,\n onFocus: _cache[3] || (_cache[3] = ($event) => _ctx.minTimePickerVisible = true),\n onInput: _cache[4] || (_cache[4] = (val) => _ctx.handleTimeInput(val, \"min\")),\n onChange: _cache[5] || (_cache[5] = (val) => _ctx.handleTimeChange(val, \"min\"))\n }, null, 8, [\"disabled\", \"placeholder\", \"model-value\"]),\n createVNode(_component_time_pick_panel, {\n visible: _ctx.minTimePickerVisible,\n format: _ctx.timeFormat,\n \"datetime-role\": \"start\",\n \"time-arrow-control\": _ctx.arrowControl,\n \"parsed-value\": _ctx.leftDate,\n onPick: _ctx.handleMinTimePick\n }, null, 8, [\"visible\", \"format\", \"time-arrow-control\", \"parsed-value\", \"onPick\"])\n ], 512), [\n [_directive_clickoutside, _ctx.handleMinTimeClose]\n ])\n ]),\n _hoisted_8$2,\n createVNode(\"span\", _hoisted_9$1, [\n createVNode(\"span\", _hoisted_10$1, [\n createVNode(_component_el_input, {\n size: \"small\",\n class: \"el-date-range-picker__editor\",\n disabled: _ctx.rangeState.selecting,\n placeholder: _ctx.t(\"el.datepicker.endDate\"),\n \"model-value\": _ctx.maxVisibleDate,\n readonly: !_ctx.minDate,\n onInput: _cache[6] || (_cache[6] = (val) => _ctx.handleDateInput(val, \"max\")),\n onChange: _cache[7] || (_cache[7] = (val) => _ctx.handleDateChange(val, \"max\"))\n }, null, 8, [\"disabled\", \"placeholder\", \"model-value\", \"readonly\"])\n ]),\n withDirectives(createVNode(\"span\", _hoisted_11$1, [\n createVNode(_component_el_input, {\n size: \"small\",\n class: \"el-date-range-picker__editor\",\n disabled: _ctx.rangeState.selecting,\n placeholder: _ctx.t(\"el.datepicker.endTime\"),\n \"model-value\": _ctx.maxVisibleTime,\n readonly: !_ctx.minDate,\n onFocus: _cache[8] || (_cache[8] = ($event) => _ctx.minDate && (_ctx.maxTimePickerVisible = true)),\n onInput: _cache[9] || (_cache[9] = (val) => _ctx.handleTimeInput(val, \"max\")),\n onChange: _cache[10] || (_cache[10] = (val) => _ctx.handleTimeChange(val, \"max\"))\n }, null, 8, [\"disabled\", \"placeholder\", \"model-value\", \"readonly\"]),\n createVNode(_component_time_pick_panel, {\n \"datetime-role\": \"end\",\n visible: _ctx.maxTimePickerVisible,\n format: _ctx.timeFormat,\n \"time-arrow-control\": _ctx.arrowControl,\n \"parsed-value\": _ctx.rightDate,\n onPick: _ctx.handleMaxTimePick\n }, null, 8, [\"visible\", \"format\", \"time-arrow-control\", \"parsed-value\", \"onPick\"])\n ], 512), [\n [_directive_clickoutside, _ctx.handleMaxTimeClose]\n ])\n ])\n ])) : createCommentVNode(\"v-if\", true),\n createVNode(\"div\", _hoisted_12$1, [\n createVNode(\"div\", _hoisted_13, [\n createVNode(\"button\", {\n type: \"button\",\n class: \"el-picker-panel__icon-btn el-icon-d-arrow-left\",\n onClick: _cache[11] || (_cache[11] = (...args) => _ctx.leftPrevYear && _ctx.leftPrevYear(...args))\n }),\n createVNode(\"button\", {\n type: \"button\",\n class: \"el-picker-panel__icon-btn el-icon-arrow-left\",\n onClick: _cache[12] || (_cache[12] = (...args) => _ctx.leftPrevMonth && _ctx.leftPrevMonth(...args))\n }),\n _ctx.unlinkPanels ? (openBlock(), createBlock(\"button\", {\n key: 0,\n type: \"button\",\n disabled: !_ctx.enableYearArrow,\n class: [{ \"is-disabled\": !_ctx.enableYearArrow }, \"el-picker-panel__icon-btn el-icon-d-arrow-right\"],\n onClick: _cache[13] || (_cache[13] = (...args) => _ctx.leftNextYear && _ctx.leftNextYear(...args))\n }, null, 10, [\"disabled\"])) : createCommentVNode(\"v-if\", true),\n _ctx.unlinkPanels ? (openBlock(), createBlock(\"button\", {\n key: 1,\n type: \"button\",\n disabled: !_ctx.enableMonthArrow,\n class: [{ \"is-disabled\": !_ctx.enableMonthArrow }, \"el-picker-panel__icon-btn el-icon-arrow-right\"],\n onClick: _cache[14] || (_cache[14] = (...args) => _ctx.leftNextMonth && _ctx.leftNextMonth(...args))\n }, null, 10, [\"disabled\"])) : createCommentVNode(\"v-if\", true),\n createVNode(\"div\", null, toDisplayString(_ctx.leftLabel), 1)\n ]),\n createVNode(_component_date_table, {\n \"selection-mode\": \"range\",\n date: _ctx.leftDate,\n \"min-date\": _ctx.minDate,\n \"max-date\": _ctx.maxDate,\n \"range-state\": _ctx.rangeState,\n \"disabled-date\": _ctx.disabledDate,\n \"cell-class-name\": _ctx.cellClassName,\n onChangerange: _ctx.handleChangeRange,\n onPick: _ctx.handleRangePick,\n onSelect: _ctx.onSelect\n }, null, 8, [\"date\", \"min-date\", \"max-date\", \"range-state\", \"disabled-date\", \"cell-class-name\", \"onChangerange\", \"onPick\", \"onSelect\"])\n ]),\n createVNode(\"div\", _hoisted_14, [\n createVNode(\"div\", _hoisted_15, [\n _ctx.unlinkPanels ? (openBlock(), createBlock(\"button\", {\n key: 0,\n type: \"button\",\n disabled: !_ctx.enableYearArrow,\n class: [{ \"is-disabled\": !_ctx.enableYearArrow }, \"el-picker-panel__icon-btn el-icon-d-arrow-left\"],\n onClick: _cache[15] || (_cache[15] = (...args) => _ctx.rightPrevYear && _ctx.rightPrevYear(...args))\n }, null, 10, [\"disabled\"])) : createCommentVNode(\"v-if\", true),\n _ctx.unlinkPanels ? (openBlock(), createBlock(\"button\", {\n key: 1,\n type: \"button\",\n disabled: !_ctx.enableMonthArrow,\n class: [{ \"is-disabled\": !_ctx.enableMonthArrow }, \"el-picker-panel__icon-btn el-icon-arrow-left\"],\n onClick: _cache[16] || (_cache[16] = (...args) => _ctx.rightPrevMonth && _ctx.rightPrevMonth(...args))\n }, null, 10, [\"disabled\"])) : createCommentVNode(\"v-if\", true),\n createVNode(\"button\", {\n type: \"button\",\n class: \"el-picker-panel__icon-btn el-icon-d-arrow-right\",\n onClick: _cache[17] || (_cache[17] = (...args) => _ctx.rightNextYear && _ctx.rightNextYear(...args))\n }),\n createVNode(\"button\", {\n type: \"button\",\n class: \"el-picker-panel__icon-btn el-icon-arrow-right\",\n onClick: _cache[18] || (_cache[18] = (...args) => _ctx.rightNextMonth && _ctx.rightNextMonth(...args))\n }),\n createVNode(\"div\", null, toDisplayString(_ctx.rightLabel), 1)\n ]),\n createVNode(_component_date_table, {\n \"selection-mode\": \"range\",\n date: _ctx.rightDate,\n \"min-date\": _ctx.minDate,\n \"max-date\": _ctx.maxDate,\n \"range-state\": _ctx.rangeState,\n \"disabled-date\": _ctx.disabledDate,\n \"cell-class-name\": _ctx.cellClassName,\n onChangerange: _ctx.handleChangeRange,\n onPick: _ctx.handleRangePick,\n onSelect: _ctx.onSelect\n }, null, 8, [\"date\", \"min-date\", \"max-date\", \"range-state\", \"disabled-date\", \"cell-class-name\", \"onChangerange\", \"onPick\", \"onSelect\"])\n ])\n ])\n ]),\n _ctx.showTime ? (openBlock(), createBlock(\"div\", _hoisted_16, [\n _ctx.clearable ? (openBlock(), createBlock(_component_el_button, {\n key: 0,\n size: \"mini\",\n type: \"text\",\n class: \"el-picker-panel__link-btn\",\n onClick: _ctx.handleClear\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.t(\"el.datepicker.clear\")), 1)\n ]),\n _: 1\n }, 8, [\"onClick\"])) : createCommentVNode(\"v-if\", true),\n createVNode(_component_el_button, {\n plain: \"\",\n size: \"mini\",\n class: \"el-picker-panel__link-btn\",\n disabled: _ctx.btnDisabled,\n onClick: _cache[19] || (_cache[19] = ($event) => _ctx.handleConfirm(false))\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.t(\"el.datepicker.confirm\")), 1)\n ]),\n _: 1\n }, 8, [\"disabled\"])\n ])) : createCommentVNode(\"v-if\", true)\n ], 2);\n}\n\nscript$4.render = render$4;\nscript$4.__file = \"packages/date-picker/src/date-picker-com/panel-date-range.vue\";\n\nvar script$5 = defineComponent({\n components: { MonthTable: script$1 },\n props: {\n unlinkPanels: Boolean,\n parsedValue: {\n type: Array\n }\n },\n emits: [\"pick\", \"set-picker-option\"],\n setup(props, ctx) {\n const { t } = useLocaleInject();\n const leftDate = ref(dayjs());\n const rightDate = ref(dayjs().add(1, \"year\"));\n const hasShortcuts = computed(() => !!shortcuts.length);\n const handleShortcutClick = (shortcut) => {\n const shortcutValues = typeof shortcut.value === \"function\" ? shortcut.value() : shortcut.value;\n if (shortcutValues) {\n ctx.emit(\"pick\", [dayjs(shortcutValues[0]), dayjs(shortcutValues[1])]);\n return;\n }\n if (shortcut.onClick) {\n shortcut.onClick(ctx);\n }\n };\n const leftPrevYear = () => {\n leftDate.value = leftDate.value.subtract(1, \"year\");\n if (!props.unlinkPanels) {\n rightDate.value = rightDate.value.subtract(1, \"year\");\n }\n };\n const rightNextYear = () => {\n if (!props.unlinkPanels) {\n leftDate.value = leftDate.value.add(1, \"year\");\n }\n rightDate.value = rightDate.value.add(1, \"year\");\n };\n const leftNextYear = () => {\n leftDate.value = leftDate.value.add(1, \"year\");\n };\n const rightPrevYear = () => {\n rightDate.value = rightDate.value.subtract(1, \"year\");\n };\n const leftLabel = computed(() => {\n return `${leftDate.value.year()} ${t(\"el.datepicker.year\")}`;\n });\n const rightLabel = computed(() => {\n return `${rightDate.value.year()} ${t(\"el.datepicker.year\")}`;\n });\n const leftYear = computed(() => {\n return leftDate.value.year();\n });\n const rightYear = computed(() => {\n return rightDate.value.year() === leftDate.value.year() ? leftDate.value.year() + 1 : rightDate.value.year();\n });\n const enableYearArrow = computed(() => {\n return props.unlinkPanels && rightYear.value > leftYear.value + 1;\n });\n const minDate = ref(null);\n const maxDate = ref(null);\n const rangeState = ref({\n endDate: null,\n selecting: false\n });\n const handleChangeRange = (val) => {\n rangeState.value = val;\n };\n const handleRangePick = (val, close = true) => {\n const minDate_ = val.minDate;\n const maxDate_ = val.maxDate;\n if (maxDate.value === maxDate_ && minDate.value === minDate_) {\n return;\n }\n maxDate.value = maxDate_;\n minDate.value = minDate_;\n if (!close)\n return;\n handleConfirm();\n };\n const isValidValue = (value) => {\n return Array.isArray(value) && value && value[0] && value[1] && value[0].valueOf() <= value[1].valueOf();\n };\n const handleConfirm = (visible = false) => {\n if (isValidValue([minDate.value, maxDate.value])) {\n ctx.emit(\"pick\", [minDate.value, maxDate.value], visible);\n }\n };\n const onSelect = (selecting) => {\n rangeState.value.selecting = selecting;\n if (!selecting) {\n rangeState.value.endDate = null;\n }\n };\n const formatToString = (value) => {\n return value.map((_) => _.format(format));\n };\n const getDefaultValue = () => {\n let start;\n if (Array.isArray(defaultValue)) {\n const left = dayjs(defaultValue[0]);\n let right = dayjs(defaultValue[1]);\n if (!props.unlinkPanels) {\n right = left.add(1, \"year\");\n }\n return [left, right];\n } else if (defaultValue) {\n start = dayjs(defaultValue);\n } else {\n start = dayjs();\n }\n return [start, start.add(1, \"year\")];\n };\n ctx.emit(\"set-picker-option\", [\"formatToString\", formatToString]);\n const pickerBase = inject(\"EP_PICKER_BASE\");\n const { shortcuts, disabledDate, format, defaultValue } = pickerBase.props;\n watch(() => props.parsedValue, (newVal) => {\n if (newVal && newVal.length === 2) {\n minDate.value = newVal[0];\n maxDate.value = newVal[1];\n leftDate.value = minDate.value;\n if (props.unlinkPanels && maxDate.value) {\n const minDateYear = minDate.value.year();\n const maxDateYear = maxDate.value.year();\n rightDate.value = minDateYear === maxDateYear ? maxDate.value.add(1, \"year\") : maxDate.value;\n } else {\n rightDate.value = leftDate.value.add(1, \"year\");\n }\n } else {\n const defaultArr = getDefaultValue();\n leftDate.value = defaultArr[0];\n rightDate.value = defaultArr[1];\n }\n }, { immediate: true });\n return {\n shortcuts,\n disabledDate,\n onSelect,\n handleRangePick,\n rangeState,\n handleChangeRange,\n minDate,\n maxDate,\n enableYearArrow,\n leftLabel,\n rightLabel,\n leftNextYear,\n leftPrevYear,\n rightNextYear,\n rightPrevYear,\n t,\n leftDate,\n rightDate,\n hasShortcuts,\n handleShortcutClick\n };\n }\n});\n\nconst _hoisted_1$5 = { class: \"el-picker-panel__body-wrapper\" };\nconst _hoisted_2$3 = {\n key: 0,\n class: \"el-picker-panel__sidebar\"\n};\nconst _hoisted_3$3 = { class: \"el-picker-panel__body\" };\nconst _hoisted_4$3 = { class: \"el-picker-panel__content el-date-range-picker__content is-left\" };\nconst _hoisted_5$3 = { class: \"el-date-range-picker__header\" };\nconst _hoisted_6$3 = { class: \"el-picker-panel__content el-date-range-picker__content is-right\" };\nconst _hoisted_7$3 = { class: \"el-date-range-picker__header\" };\nfunction render$5(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_month_table = resolveComponent(\"month-table\");\n return openBlock(), createBlock(\"div\", {\n class: [\"el-picker-panel el-date-range-picker\", [{\n \"has-sidebar\": _ctx.$slots.sidebar || _ctx.hasShortcuts\n }]]\n }, [\n createVNode(\"div\", _hoisted_1$5, [\n renderSlot(_ctx.$slots, \"sidebar\", { class: \"el-picker-panel__sidebar\" }),\n _ctx.hasShortcuts ? (openBlock(), createBlock(\"div\", _hoisted_2$3, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.shortcuts, (shortcut, key) => {\n return openBlock(), createBlock(\"button\", {\n key,\n type: \"button\",\n class: \"el-picker-panel__shortcut\",\n onClick: ($event) => _ctx.handleShortcutClick(shortcut)\n }, toDisplayString(shortcut.text), 9, [\"onClick\"]);\n }), 128))\n ])) : createCommentVNode(\"v-if\", true),\n createVNode(\"div\", _hoisted_3$3, [\n createVNode(\"div\", _hoisted_4$3, [\n createVNode(\"div\", _hoisted_5$3, [\n createVNode(\"button\", {\n type: \"button\",\n class: \"el-picker-panel__icon-btn el-icon-d-arrow-left\",\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.leftPrevYear && _ctx.leftPrevYear(...args))\n }),\n _ctx.unlinkPanels ? (openBlock(), createBlock(\"button\", {\n key: 0,\n type: \"button\",\n disabled: !_ctx.enableYearArrow,\n class: [{ \"is-disabled\": !_ctx.enableYearArrow }, \"el-picker-panel__icon-btn el-icon-d-arrow-right\"],\n onClick: _cache[2] || (_cache[2] = (...args) => _ctx.leftNextYear && _ctx.leftNextYear(...args))\n }, null, 10, [\"disabled\"])) : createCommentVNode(\"v-if\", true),\n createVNode(\"div\", null, toDisplayString(_ctx.leftLabel), 1)\n ]),\n createVNode(_component_month_table, {\n \"selection-mode\": \"range\",\n date: _ctx.leftDate,\n \"min-date\": _ctx.minDate,\n \"max-date\": _ctx.maxDate,\n \"range-state\": _ctx.rangeState,\n \"disabled-date\": _ctx.disabledDate,\n onChangerange: _ctx.handleChangeRange,\n onPick: _ctx.handleRangePick,\n onSelect: _ctx.onSelect\n }, null, 8, [\"date\", \"min-date\", \"max-date\", \"range-state\", \"disabled-date\", \"onChangerange\", \"onPick\", \"onSelect\"])\n ]),\n createVNode(\"div\", _hoisted_6$3, [\n createVNode(\"div\", _hoisted_7$3, [\n _ctx.unlinkPanels ? (openBlock(), createBlock(\"button\", {\n key: 0,\n type: \"button\",\n disabled: !_ctx.enableYearArrow,\n class: [{ \"is-disabled\": !_ctx.enableYearArrow }, \"el-picker-panel__icon-btn el-icon-d-arrow-left\"],\n onClick: _cache[3] || (_cache[3] = (...args) => _ctx.rightPrevYear && _ctx.rightPrevYear(...args))\n }, null, 10, [\"disabled\"])) : createCommentVNode(\"v-if\", true),\n createVNode(\"button\", {\n type: \"button\",\n class: \"el-picker-panel__icon-btn el-icon-d-arrow-right\",\n onClick: _cache[4] || (_cache[4] = (...args) => _ctx.rightNextYear && _ctx.rightNextYear(...args))\n }),\n createVNode(\"div\", null, toDisplayString(_ctx.rightLabel), 1)\n ]),\n createVNode(_component_month_table, {\n \"selection-mode\": \"range\",\n date: _ctx.rightDate,\n \"min-date\": _ctx.minDate,\n \"max-date\": _ctx.maxDate,\n \"range-state\": _ctx.rangeState,\n \"disabled-date\": _ctx.disabledDate,\n onChangerange: _ctx.handleChangeRange,\n onPick: _ctx.handleRangePick,\n onSelect: _ctx.onSelect\n }, null, 8, [\"date\", \"min-date\", \"max-date\", \"range-state\", \"disabled-date\", \"onChangerange\", \"onPick\", \"onSelect\"])\n ])\n ])\n ])\n ], 2);\n}\n\nscript$5.render = render$5;\nscript$5.__file = \"packages/date-picker/src/date-picker-com/panel-month-range.vue\";\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\ndayjs.extend(localeData);\ndayjs.extend(advancedFormat);\ndayjs.extend(customParseFormat);\ndayjs.extend(weekOfYear);\ndayjs.extend(weekYear);\ndayjs.extend(dayOfYear);\ndayjs.extend(isSameOrAfter);\ndayjs.extend(isSameOrBefore);\nconst getPanel = function(type) {\n if (type === \"daterange\" || type === \"datetimerange\") {\n return script$4;\n } else if (type === \"monthrange\") {\n return script$5;\n }\n return script$3;\n};\nvar DatePicker = defineComponent({\n name: \"ElDatePicker\",\n install: null,\n props: __spreadProps(__spreadValues({}, defaultProps), {\n type: {\n type: String,\n default: \"date\"\n }\n }),\n emits: [\"update:modelValue\"],\n setup(props, ctx) {\n provide(\"ElPopperOptions\", props.popperOptions);\n const commonPicker = ref(null);\n const refProps = __spreadProps(__spreadValues({}, props), {\n focus: () => {\n var _a;\n (_a = commonPicker.value) == null ? void 0 : _a.handleFocus();\n }\n });\n ctx.expose(refProps);\n return () => {\n var _a;\n const format = (_a = props.format) != null ? _a : DEFAULT_FORMATS_DATEPICKER[props.type] || DEFAULT_FORMATS_DATE;\n return h(CommonPicker, __spreadProps(__spreadValues({}, props), {\n format,\n type: props.type,\n ref: commonPicker,\n \"onUpdate:modelValue\": (value) => ctx.emit(\"update:modelValue\", value)\n }), {\n default: (scopedProps) => h(getPanel(props.type), scopedProps)\n });\n };\n }\n});\n\nconst _DatePicker = DatePicker;\n_DatePicker.install = (app) => {\n app.component(_DatePicker.name, _DatePicker);\n};\n\nexport default _DatePicker;\n","import { defineComponent, createVNode, renderSlot, h } from 'vue';\nimport { PatchFlags } from '../utils/vnode';\n\nvar script = defineComponent({\n name: \"ElOverlay\",\n props: {\n mask: {\n type: Boolean,\n default: true\n },\n overlayClass: {\n type: [String, Array, Object]\n },\n zIndex: {\n type: Number\n }\n },\n emits: [\"click\"],\n setup(props, { slots, emit }) {\n let mousedownTarget = false;\n let mouseupTarget = false;\n const onMaskClick = (e) => {\n if (mousedownTarget && mouseupTarget) {\n emit(\"click\", e);\n }\n mousedownTarget = mouseupTarget = false;\n };\n return () => {\n return props.mask ? createVNode(\"div\", {\n class: [\"el-overlay\", props.overlayClass],\n style: {\n zIndex: props.zIndex\n },\n onClick: onMaskClick,\n onMousedown: (e) => {\n if (props.mask) {\n mousedownTarget = e.target === e.currentTarget;\n }\n },\n onMouseup: (e) => {\n if (props.mask) {\n mouseupTarget = e.target === e.currentTarget;\n }\n }\n }, [renderSlot(slots, \"default\")], PatchFlags.STYLE | PatchFlags.CLASS | PatchFlags.PROPS, [\"onClick\", \"onMouseup\", \"onMousedown\"]) : h(\"div\", {\n class: props.overlayClass,\n style: {\n zIndex: props.zIndex,\n position: \"fixed\",\n top: \"0px\",\n right: \"0px\",\n bottom: \"0px\",\n left: \"0px\"\n }\n }, [renderSlot(slots, \"default\")]);\n };\n }\n});\n\nscript.__file = \"packages/overlay/src/index.vue\";\n\nexport { script as Overlay };\n","import { ref, computed, watch, nextTick, onMounted, defineComponent, resolveComponent, resolveDirective, openBlock, createBlock, Teleport, createVNode, Transition, withCtx, withDirectives, withModifiers, renderSlot, toDisplayString, createCommentVNode, vShow } from 'vue';\nimport { TrapFocus } from '../directives';\nimport { isValidWidthUnit } from '../utils/validators';\nimport { Overlay } from '../el-overlay';\nimport isServer from '../utils/isServer';\nimport { UPDATE_MODEL_EVENT } from '../utils/constants';\nimport PopupManager from '../utils/popup-manager';\nimport { isNumber, clearTimer } from '../utils/util';\nimport { useLockScreen, useModal, useRestoreActive } from '../hooks';\n\nconst CLOSE_EVENT = \"close\";\nconst OPEN_EVENT = \"open\";\nconst CLOSED_EVENT = \"closed\";\nconst OPENED_EVENT = \"opened\";\nfunction useDialog(props, ctx, targetRef) {\n const visible = ref(false);\n const closed = ref(false);\n const dialogRef = ref(null);\n const openTimer = ref(null);\n const closeTimer = ref(null);\n const rendered = ref(false);\n const zIndex = ref(props.zIndex || PopupManager.nextZIndex());\n const modalRef = ref(null);\n const normalizeWidth = () => {\n if (isNumber(props.width))\n return `${props.width}px`;\n else\n return props.width;\n };\n const style = computed(() => {\n const style2 = {};\n if (!props.fullscreen) {\n style2.marginTop = props.top;\n if (props.width) {\n style2.width = normalizeWidth();\n }\n }\n return style2;\n });\n function afterEnter() {\n ctx.emit(OPENED_EVENT);\n }\n function afterLeave() {\n ctx.emit(CLOSED_EVENT);\n ctx.emit(UPDATE_MODEL_EVENT, false);\n if (props.destroyOnClose) {\n rendered.value = false;\n }\n }\n function beforeLeave() {\n ctx.emit(CLOSE_EVENT);\n }\n function open() {\n clearTimer(closeTimer);\n clearTimer(openTimer);\n if (props.openDelay && props.openDelay > 0) {\n openTimer.value = window.setTimeout(() => {\n openTimer.value = null;\n doOpen();\n }, props.openDelay);\n } else {\n doOpen();\n }\n }\n function close() {\n clearTimer(openTimer);\n clearTimer(closeTimer);\n if (props.closeDelay && props.closeDelay > 0) {\n closeTimer.value = window.setTimeout(() => {\n closeTimer.value = null;\n doClose();\n }, props.closeDelay);\n } else {\n doClose();\n }\n }\n function hide(shouldCancel) {\n if (shouldCancel)\n return;\n closed.value = true;\n visible.value = false;\n }\n function handleClose() {\n if (props.beforeClose) {\n props.beforeClose(hide);\n } else {\n close();\n }\n }\n function onModalClick() {\n if (props.closeOnClickModal) {\n handleClose();\n }\n }\n function doOpen() {\n if (isServer) {\n return;\n }\n visible.value = true;\n }\n function doClose() {\n visible.value = false;\n }\n if (props.lockScroll) {\n useLockScreen(visible);\n }\n if (props.closeOnPressEscape) {\n useModal({\n handleClose\n }, visible);\n }\n useRestoreActive(visible);\n watch(() => props.modelValue, (val) => {\n if (val) {\n closed.value = false;\n open();\n rendered.value = true;\n ctx.emit(OPEN_EVENT);\n zIndex.value = props.zIndex ? zIndex.value++ : PopupManager.nextZIndex();\n nextTick(() => {\n if (targetRef.value) {\n targetRef.value.scrollTop = 0;\n }\n });\n } else {\n if (visible.value) {\n close();\n }\n }\n });\n onMounted(() => {\n if (props.modelValue) {\n visible.value = true;\n rendered.value = true;\n open();\n }\n });\n return {\n afterEnter,\n afterLeave,\n beforeLeave,\n handleClose,\n onModalClick,\n closed,\n dialogRef,\n style,\n rendered,\n modalRef,\n visible,\n zIndex\n };\n}\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar script = defineComponent({\n name: \"ElDialog\",\n components: {\n \"el-overlay\": Overlay\n },\n directives: {\n TrapFocus\n },\n props: {\n appendToBody: {\n type: Boolean,\n default: false\n },\n beforeClose: {\n type: Function\n },\n destroyOnClose: {\n type: Boolean,\n default: false\n },\n center: {\n type: Boolean,\n default: false\n },\n customClass: {\n type: String,\n default: \"\"\n },\n closeOnClickModal: {\n type: Boolean,\n default: true\n },\n closeOnPressEscape: {\n type: Boolean,\n default: true\n },\n fullscreen: {\n type: Boolean,\n default: false\n },\n lockScroll: {\n type: Boolean,\n default: true\n },\n modal: {\n type: Boolean,\n default: true\n },\n showClose: {\n type: Boolean,\n default: true\n },\n title: {\n type: String,\n default: \"\"\n },\n openDelay: {\n type: Number,\n default: 0\n },\n closeDelay: {\n type: Number,\n default: 0\n },\n top: {\n type: String,\n default: \"15vh\"\n },\n modelValue: {\n type: Boolean,\n required: true\n },\n modalClass: String,\n width: {\n type: [String, Number],\n default: \"50%\",\n validator: isValidWidthUnit\n },\n zIndex: {\n type: Number\n }\n },\n emits: [\n OPEN_EVENT,\n OPENED_EVENT,\n CLOSE_EVENT,\n CLOSED_EVENT,\n UPDATE_MODEL_EVENT\n ],\n setup(props, ctx) {\n const dialogRef = ref(null);\n return __spreadProps(__spreadValues({}, useDialog(props, ctx, dialogRef)), {\n dialogRef\n });\n }\n});\n\nconst _hoisted_1 = { class: \"el-dialog__header\" };\nconst _hoisted_2 = { class: \"el-dialog__title\" };\nconst _hoisted_3 = /* @__PURE__ */ createVNode(\"i\", { class: \"el-dialog__close el-icon el-icon-close\" }, null, -1);\nconst _hoisted_4 = {\n key: 0,\n class: \"el-dialog__body\"\n};\nconst _hoisted_5 = {\n key: 1,\n class: \"el-dialog__footer\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_overlay = resolveComponent(\"el-overlay\");\n const _directive_trap_focus = resolveDirective(\"trap-focus\");\n return openBlock(), createBlock(Teleport, {\n to: \"body\",\n disabled: !_ctx.appendToBody\n }, [\n createVNode(Transition, {\n name: \"dialog-fade\",\n onAfterEnter: _ctx.afterEnter,\n onAfterLeave: _ctx.afterLeave,\n onBeforeLeave: _ctx.beforeLeave\n }, {\n default: withCtx(() => [\n withDirectives(createVNode(_component_el_overlay, {\n mask: _ctx.modal,\n \"overlay-class\": _ctx.modalClass,\n \"z-index\": _ctx.zIndex,\n onClick: _ctx.onModalClick\n }, {\n default: withCtx(() => [\n withDirectives(createVNode(\"div\", {\n ref: \"dialogRef\",\n class: [\n \"el-dialog\",\n {\n \"is-fullscreen\": _ctx.fullscreen,\n \"el-dialog--center\": _ctx.center\n },\n _ctx.customClass\n ],\n \"aria-modal\": \"true\",\n role: \"dialog\",\n \"aria-label\": _ctx.title || \"dialog\",\n style: _ctx.style,\n onClick: _cache[2] || (_cache[2] = withModifiers(() => {\n }, [\"stop\"]))\n }, [\n createVNode(\"div\", _hoisted_1, [\n renderSlot(_ctx.$slots, \"title\", {}, () => [\n createVNode(\"span\", _hoisted_2, toDisplayString(_ctx.title), 1)\n ]),\n _ctx.showClose ? (openBlock(), createBlock(\"button\", {\n key: 0,\n \"aria-label\": \"close\",\n class: \"el-dialog__headerbtn\",\n type: \"button\",\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleClose && _ctx.handleClose(...args))\n }, [\n _hoisted_3\n ])) : createCommentVNode(\"v-if\", true)\n ]),\n _ctx.rendered ? (openBlock(), createBlock(\"div\", _hoisted_4, [\n renderSlot(_ctx.$slots, \"default\")\n ])) : createCommentVNode(\"v-if\", true),\n _ctx.$slots.footer ? (openBlock(), createBlock(\"div\", _hoisted_5, [\n renderSlot(_ctx.$slots, \"footer\")\n ])) : createCommentVNode(\"v-if\", true)\n ], 14, [\"aria-label\"]), [\n [_directive_trap_focus]\n ])\n ]),\n _: 3\n }, 8, [\"mask\", \"overlay-class\", \"z-index\", \"onClick\"]), [\n [vShow, _ctx.visible]\n ])\n ]),\n _: 1\n }, 8, [\"onAfterEnter\", \"onAfterLeave\", \"onBeforeLeave\"])\n ], 8, [\"disabled\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/dialog/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Dialog = script;\n\nexport default _Dialog;\nexport { useDialog };\n","import { defineComponent, openBlock, createBlock, renderSlot, createCommentVNode } from 'vue';\n\nvar script = defineComponent({\n name: \"ElDivider\",\n props: {\n direction: {\n type: String,\n default: \"horizontal\",\n validator(val) {\n return [\"horizontal\", \"vertical\"].indexOf(val) !== -1;\n }\n },\n contentPosition: {\n type: String,\n default: \"center\",\n validator(val) {\n return [\"left\", \"center\", \"right\"].indexOf(val) !== -1;\n }\n }\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", {\n class: [\"el-divider\", `el-divider--${_ctx.direction}`]\n }, [\n _ctx.$slots.default && _ctx.direction !== \"vertical\" ? (openBlock(), createBlock(\"div\", {\n key: 0,\n class: [\"el-divider__text\", `is-${_ctx.contentPosition}`]\n }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 2)) : createCommentVNode(\"v-if\", true)\n ], 2);\n}\n\nscript.render = render;\nscript.__file = \"packages/divider/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Divider = script;\n\nexport default _Divider;\n","import { defineComponent, ref, computed, resolveComponent, resolveDirective, openBlock, createBlock, Teleport, createVNode, Transition, withCtx, withDirectives, withModifiers, renderSlot, toDisplayString, createCommentVNode, vShow } from 'vue';\nimport { Overlay } from '../el-overlay';\nimport { useDialog } from '../el-dialog';\nimport { TrapFocus } from '../directives';\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar script = defineComponent({\n name: \"ElDrawer\",\n components: {\n [Overlay.name]: Overlay\n },\n directives: {\n TrapFocus\n },\n props: {\n modelValue: {\n type: Boolean,\n required: true\n },\n appendToBody: {\n type: Boolean,\n default: false\n },\n beforeClose: Function,\n customClass: {\n type: String,\n default: \"\"\n },\n direction: {\n type: String,\n default: \"rtl\",\n validator: (val) => {\n return [\"ltr\", \"rtl\", \"ttb\", \"btt\"].indexOf(val) !== -1;\n }\n },\n showClose: {\n type: Boolean,\n default: true\n },\n size: {\n type: [String, Number],\n default: \"30%\"\n },\n title: {\n type: String,\n default: \"\"\n },\n closeOnClickModal: {\n type: Boolean,\n default: true\n },\n withHeader: {\n type: Boolean,\n default: true\n },\n openDelay: {\n type: Number,\n default: 0\n },\n closeDelay: {\n type: Number,\n default: 0\n },\n zIndex: Number,\n modal: {\n type: Boolean,\n default: true\n },\n modalFade: {\n type: Boolean,\n default: true\n },\n modalClass: String,\n lockScroll: {\n type: Boolean,\n default: true\n },\n closeOnPressEscape: {\n type: Boolean,\n default: true\n },\n destroyOnClose: {\n type: Boolean,\n default: false\n }\n },\n emits: [\"open\", \"opened\", \"close\", \"closed\", \"update:modelValue\"],\n setup(props, ctx) {\n const drawerRef = ref(null);\n return __spreadProps(__spreadValues({}, useDialog(props, ctx, drawerRef)), {\n drawerRef,\n isHorizontal: computed(() => props.direction === \"rtl\" || props.direction === \"ltr\"),\n drawerSize: computed(() => typeof props.size === \"number\" ? `${props.size}px` : props.size)\n });\n }\n});\n\nconst _hoisted_1 = {\n key: 0,\n id: \"el-drawer__title\",\n class: \"el-drawer__header\"\n};\nconst _hoisted_2 = /* @__PURE__ */ createVNode(\"i\", { class: \"el-drawer__close el-icon el-icon-close\" }, null, -1);\nconst _hoisted_3 = {\n key: 1,\n class: \"el-drawer__body\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_overlay = resolveComponent(\"el-overlay\");\n const _directive_trap_focus = resolveDirective(\"trap-focus\");\n return openBlock(), createBlock(Teleport, {\n to: \"body\",\n disabled: !_ctx.appendToBody\n }, [\n createVNode(Transition, {\n name: \"el-drawer-fade\",\n onAfterEnter: _ctx.afterEnter,\n onAfterLeave: _ctx.afterLeave,\n onBeforeLeave: _ctx.beforeLeave\n }, {\n default: withCtx(() => [\n withDirectives(createVNode(_component_el_overlay, {\n mask: _ctx.modal,\n \"overlay-class\": _ctx.modalClass,\n \"z-index\": _ctx.zIndex,\n onClick: _ctx.onModalClick\n }, {\n default: withCtx(() => [\n withDirectives(createVNode(\"div\", {\n ref: \"drawerRef\",\n \"aria-modal\": \"true\",\n \"aria-labelledby\": \"el-drawer__title\",\n \"aria-label\": _ctx.title,\n class: [\"el-drawer\", _ctx.direction, _ctx.customClass],\n style: _ctx.isHorizontal ? \"width: \" + _ctx.drawerSize : \"height: \" + _ctx.drawerSize,\n role: \"dialog\",\n onClick: _cache[2] || (_cache[2] = withModifiers(() => {\n }, [\"stop\"]))\n }, [\n _ctx.withHeader ? (openBlock(), createBlock(\"header\", _hoisted_1, [\n renderSlot(_ctx.$slots, \"title\", {}, () => [\n createVNode(\"span\", {\n role: \"heading\",\n title: _ctx.title\n }, toDisplayString(_ctx.title), 9, [\"title\"])\n ]),\n _ctx.showClose ? (openBlock(), createBlock(\"button\", {\n key: 0,\n \"aria-label\": \"close \" + (_ctx.title || \"drawer\"),\n class: \"el-drawer__close-btn\",\n type: \"button\",\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleClose && _ctx.handleClose(...args))\n }, [\n _hoisted_2\n ], 8, [\"aria-label\"])) : createCommentVNode(\"v-if\", true)\n ])) : createCommentVNode(\"v-if\", true),\n _ctx.rendered ? (openBlock(), createBlock(\"section\", _hoisted_3, [\n renderSlot(_ctx.$slots, \"default\")\n ])) : createCommentVNode(\"v-if\", true)\n ], 14, [\"aria-label\"]), [\n [_directive_trap_focus]\n ])\n ]),\n _: 3\n }, 8, [\"mask\", \"overlay-class\", \"z-index\", \"onClick\"]), [\n [vShow, _ctx.visible]\n ])\n ]),\n _: 1\n }, 8, [\"onAfterEnter\", \"onAfterLeave\", \"onBeforeLeave\"])\n ], 8, [\"disabled\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/drawer/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Drawer = script;\n\nexport default _Drawer;\n","import { inject, computed, defineComponent, getCurrentInstance, ref, watch, provide, onMounted, resolveComponent, openBlock, createBlock, withCtx, createVNode, renderSlot } from 'vue';\nimport { addClass, removeClass, on } from '../utils/dom';\nimport ElButton from '../el-button';\nimport ElButtonGroup from '../el-button-group';\nimport ElScrollbar from '../el-scrollbar';\nimport ElPopper from '../el-popper';\nimport { useGlobalConfig, addUnit } from '../utils/util';\nimport '../utils/aria';\n\nconst useDropdown = () => {\n const ELEMENT = useGlobalConfig();\n const elDropdown = inject(\"elDropdown\", {});\n const _elDropdownSize = computed(() => elDropdown == null ? void 0 : elDropdown.dropdownSize);\n return {\n ELEMENT,\n elDropdown,\n _elDropdownSize\n };\n};\n\nvar script = defineComponent({\n name: \"ElDropdown\",\n components: {\n ElButton,\n ElButtonGroup,\n ElScrollbar,\n ElPopper\n },\n props: {\n trigger: {\n type: String,\n default: \"hover\"\n },\n type: String,\n size: {\n type: String,\n default: \"\"\n },\n splitButton: Boolean,\n hideOnClick: {\n type: Boolean,\n default: true\n },\n placement: {\n type: String,\n default: \"bottom\"\n },\n showTimeout: {\n type: Number,\n default: 150\n },\n hideTimeout: {\n type: Number,\n default: 150\n },\n tabindex: {\n type: [Number, String],\n default: 0\n },\n effect: {\n type: String,\n default: \"light\"\n },\n maxHeight: {\n type: [Number, String],\n default: \"\"\n }\n },\n emits: [\"visible-change\", \"click\", \"command\"],\n setup(props, { emit }) {\n const _instance = getCurrentInstance();\n const { ELEMENT } = useDropdown();\n const timeout = ref(null);\n const visible = ref(false);\n const scrollbar = ref(null);\n const wrapStyle = computed(() => `max-height: ${addUnit(props.maxHeight)}`);\n watch(() => visible.value, (val) => {\n if (val)\n triggerElmFocus();\n if (!val)\n triggerElmBlur();\n emit(\"visible-change\", val);\n });\n const focusing = ref(false);\n watch(() => focusing.value, (val) => {\n const selfDefine = triggerElm.value;\n if (selfDefine) {\n if (val) {\n addClass(selfDefine, \"focusing\");\n } else {\n removeClass(selfDefine, \"focusing\");\n }\n }\n });\n const triggerVnode = ref(null);\n const triggerElm = computed(() => {\n var _a, _b, _c, _d;\n const _ = (_c = (_b = (_a = triggerVnode.value) == null ? void 0 : _a.$refs.triggerRef) == null ? void 0 : _b.children[0]) != null ? _c : {};\n return !props.splitButton ? _ : (_d = _.children) == null ? void 0 : _d[1];\n });\n function handleClick() {\n var _a;\n if ((_a = triggerElm.value) == null ? void 0 : _a.disabled)\n return;\n if (visible.value) {\n hide();\n } else {\n show();\n }\n }\n function show() {\n var _a;\n if ((_a = triggerElm.value) == null ? void 0 : _a.disabled)\n return;\n timeout.value && clearTimeout(timeout.value);\n timeout.value = window.setTimeout(() => {\n visible.value = true;\n }, [\"click\", \"contextmenu\"].includes(props.trigger) ? 0 : props.showTimeout);\n }\n function hide() {\n var _a;\n if ((_a = triggerElm.value) == null ? void 0 : _a.disabled)\n return;\n removeTabindex();\n if (props.tabindex >= 0) {\n resetTabindex(triggerElm.value);\n }\n clearTimeout(timeout.value);\n timeout.value = window.setTimeout(() => {\n visible.value = false;\n }, [\"click\", \"contextmenu\"].includes(props.trigger) ? 0 : props.hideTimeout);\n }\n function removeTabindex() {\n var _a;\n (_a = triggerElm.value) == null ? void 0 : _a.setAttribute(\"tabindex\", \"-1\");\n }\n function resetTabindex(ele) {\n removeTabindex();\n ele == null ? void 0 : ele.setAttribute(\"tabindex\", \"0\");\n }\n function triggerElmFocus() {\n var _a, _b;\n (_b = (_a = triggerElm.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);\n }\n function triggerElmBlur() {\n var _a, _b;\n (_b = (_a = triggerElm.value) == null ? void 0 : _a.blur) == null ? void 0 : _b.call(_a);\n }\n const dropdownSize = computed(() => props.size || ELEMENT.size);\n function commandHandler(...args) {\n emit(\"command\", ...args);\n }\n provide(\"elDropdown\", {\n instance: _instance,\n dropdownSize,\n visible,\n handleClick,\n commandHandler,\n show,\n hide,\n trigger: computed(() => props.trigger),\n hideOnClick: computed(() => props.hideOnClick),\n triggerElm\n });\n onMounted(() => {\n if (!props.splitButton) {\n on(triggerElm.value, \"focus\", () => {\n focusing.value = true;\n });\n on(triggerElm.value, \"blur\", () => {\n focusing.value = false;\n });\n on(triggerElm.value, \"click\", () => {\n focusing.value = false;\n });\n }\n if (props.trigger === \"hover\") {\n on(triggerElm.value, \"mouseenter\", show);\n on(triggerElm.value, \"mouseleave\", hide);\n } else if (props.trigger === \"click\") {\n on(triggerElm.value, \"click\", handleClick);\n } else if (props.trigger === \"contextmenu\") {\n on(triggerElm.value, \"contextmenu\", (e) => {\n e.preventDefault();\n handleClick();\n });\n }\n Object.assign(_instance, {\n handleClick,\n hide,\n resetTabindex\n });\n });\n const handlerMainButtonClick = (event) => {\n emit(\"click\", event);\n hide();\n };\n return {\n visible,\n scrollbar,\n wrapStyle,\n dropdownSize,\n handlerMainButtonClick,\n triggerVnode\n };\n }\n});\n\nconst _hoisted_1 = /* @__PURE__ */ createVNode(\"i\", { class: \"el-dropdown__icon el-icon-arrow-down\" }, null, -1);\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_scrollbar = resolveComponent(\"el-scrollbar\");\n const _component_el_button = resolveComponent(\"el-button\");\n const _component_el_button_group = resolveComponent(\"el-button-group\");\n const _component_el_popper = resolveComponent(\"el-popper\");\n return openBlock(), createBlock(_component_el_popper, {\n ref: \"triggerVnode\",\n visible: _ctx.visible,\n \"onUpdate:visible\": _cache[1] || (_cache[1] = ($event) => _ctx.visible = $event),\n placement: _ctx.placement,\n \"fallback-placements\": [\"bottom\", \"top\", \"right\", \"left\"],\n effect: _ctx.effect,\n pure: \"\",\n \"manual-mode\": true,\n trigger: [_ctx.trigger],\n \"popper-class\": \"el-dropdown__popper\",\n \"append-to-body\": \"\",\n transition: \"el-zoom-in-top\",\n \"stop-popper-mouse-event\": false,\n \"gpu-acceleration\": false\n }, {\n default: withCtx(() => [\n createVNode(_component_el_scrollbar, {\n ref: \"scrollbar\",\n tag: \"ul\",\n \"wrap-style\": _ctx.wrapStyle,\n \"view-class\": \"el-dropdown__list\"\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"dropdown\")\n ]),\n _: 3\n }, 8, [\"wrap-style\"])\n ]),\n trigger: withCtx(() => [\n createVNode(\"div\", {\n class: [\"el-dropdown\", _ctx.dropdownSize ? \"el-dropdown--\" + _ctx.dropdownSize : \"\"]\n }, [\n !_ctx.splitButton ? renderSlot(_ctx.$slots, \"default\", { key: 0 }) : (openBlock(), createBlock(_component_el_button_group, { key: 1 }, {\n default: withCtx(() => [\n createVNode(_component_el_button, {\n size: _ctx.dropdownSize,\n type: _ctx.type,\n onClick: _ctx.handlerMainButtonClick\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"size\", \"type\", \"onClick\"]),\n createVNode(_component_el_button, {\n size: _ctx.dropdownSize,\n type: _ctx.type,\n class: \"el-dropdown__caret-button\"\n }, {\n default: withCtx(() => [\n _hoisted_1\n ]),\n _: 1\n }, 8, [\"size\", \"type\"])\n ]),\n _: 1\n }))\n ], 2)\n ]),\n _: 1\n }, 8, [\"visible\", \"placement\", \"effect\", \"trigger\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/dropdown/src/dropdown.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Dropdown = script;\n\nexport default _Dropdown;\n","import { inject, computed, defineComponent, getCurrentInstance, openBlock, createBlock, createCommentVNode, renderSlot } from 'vue';\nimport { useGlobalConfig } from '../utils/util';\nimport '../utils/aria';\nimport '../utils/dom';\n\nconst useDropdown = () => {\n const ELEMENT = useGlobalConfig();\n const elDropdown = inject(\"elDropdown\", {});\n const _elDropdownSize = computed(() => elDropdown == null ? void 0 : elDropdown.dropdownSize);\n return {\n ELEMENT,\n elDropdown,\n _elDropdownSize\n };\n};\n\nvar script = defineComponent({\n name: \"ElDropdownItem\",\n props: {\n command: {\n type: [Object, String, Number],\n default: () => ({})\n },\n disabled: Boolean,\n divided: Boolean,\n icon: String\n },\n setup(props) {\n const { elDropdown } = useDropdown();\n const _instance = getCurrentInstance();\n function handleClick(e) {\n var _a, _b;\n if (props.disabled) {\n e.stopImmediatePropagation();\n return;\n }\n if (elDropdown.hideOnClick.value) {\n (_a = elDropdown.handleClick) == null ? void 0 : _a.call(elDropdown);\n }\n (_b = elDropdown.commandHandler) == null ? void 0 : _b.call(elDropdown, props.command, _instance, e);\n }\n return {\n handleClick\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"li\", {\n class: [\"el-dropdown-menu__item\", {\n \"is-disabled\": _ctx.disabled,\n \"el-dropdown-menu__item--divided\": _ctx.divided\n }],\n \"aria-disabled\": _ctx.disabled,\n tabindex: _ctx.disabled ? null : -1,\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))\n }, [\n _ctx.icon ? (openBlock(), createBlock(\"i\", {\n key: 0,\n class: _ctx.icon\n }, null, 2)) : createCommentVNode(\"v-if\", true),\n renderSlot(_ctx.$slots, \"default\")\n ], 10, [\"aria-disabled\", \"tabindex\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/dropdown/src/dropdown-item.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _DropdownItem = script;\n\nexport default _DropdownItem;\n","import { inject, computed, ref, defineComponent, onMounted, getCurrentInstance, resolveDirective, withDirectives, openBlock, createBlock, withModifiers, renderSlot } from 'vue';\nimport { ClickOutside } from '../directives';\nimport { useGlobalConfig, generateId } from '../utils/util';\nimport { EVENT_CODE } from '../utils/aria';\nimport { addClass, on } from '../utils/dom';\n\nconst useDropdown = () => {\n const ELEMENT = useGlobalConfig();\n const elDropdown = inject(\"elDropdown\", {});\n const _elDropdownSize = computed(() => elDropdown == null ? void 0 : elDropdown.dropdownSize);\n return {\n ELEMENT,\n elDropdown,\n _elDropdownSize\n };\n};\nconst initDropdownDomEvent = (dropdownChildren, triggerElm, _instance) => {\n const menuItems = ref(null);\n const menuItemsArray = ref(null);\n const dropdownElm = ref(null);\n const listId = ref(`dropdown-menu-${generateId()}`);\n dropdownElm.value = dropdownChildren == null ? void 0 : dropdownChildren.subTree.el;\n function removeTabindex() {\n var _a;\n triggerElm.setAttribute(\"tabindex\", \"-1\");\n (_a = menuItemsArray.value) == null ? void 0 : _a.forEach((item) => {\n item.setAttribute(\"tabindex\", \"-1\");\n });\n }\n function resetTabindex(ele) {\n removeTabindex();\n ele == null ? void 0 : ele.setAttribute(\"tabindex\", \"0\");\n }\n function handleTriggerKeyDown(ev) {\n const code = ev.code;\n if ([EVENT_CODE.up, EVENT_CODE.down].includes(code)) {\n removeTabindex();\n resetTabindex(menuItems.value[0]);\n menuItems.value[0].focus();\n ev.preventDefault();\n ev.stopPropagation();\n } else if (code === EVENT_CODE.enter) {\n _instance.handleClick();\n } else if ([EVENT_CODE.tab, EVENT_CODE.esc].includes(code)) {\n _instance.hide();\n }\n }\n function handleItemKeyDown(ev) {\n const code = ev.code;\n const target = ev.target;\n const currentIndex = menuItemsArray.value.indexOf(target);\n const max = menuItemsArray.value.length - 1;\n let nextIndex;\n if ([EVENT_CODE.up, EVENT_CODE.down].includes(code)) {\n if (code === EVENT_CODE.up) {\n nextIndex = currentIndex !== 0 ? currentIndex - 1 : 0;\n } else {\n nextIndex = currentIndex < max ? currentIndex + 1 : max;\n }\n removeTabindex();\n resetTabindex(menuItems.value[nextIndex]);\n menuItems.value[nextIndex].focus();\n ev.preventDefault();\n ev.stopPropagation();\n } else if (code === EVENT_CODE.enter) {\n triggerElmFocus();\n target.click();\n if (_instance.props.hideOnClick) {\n _instance.hide();\n }\n } else if ([EVENT_CODE.tab, EVENT_CODE.esc].includes(code)) {\n _instance.hide();\n triggerElmFocus();\n }\n }\n function initAria() {\n dropdownElm.value.setAttribute(\"id\", listId.value);\n triggerElm.setAttribute(\"aria-haspopup\", \"list\");\n triggerElm.setAttribute(\"aria-controls\", listId.value);\n if (!_instance.props.splitButton) {\n triggerElm.setAttribute(\"role\", \"button\");\n triggerElm.setAttribute(\"tabindex\", _instance.props.tabindex);\n addClass(triggerElm, \"el-dropdown-selfdefine\");\n }\n }\n function initEvent() {\n on(triggerElm, \"keydown\", handleTriggerKeyDown);\n on(dropdownElm.value, \"keydown\", handleItemKeyDown, true);\n }\n function initDomOperation() {\n menuItems.value = dropdownElm.value.querySelectorAll(\"[tabindex='-1']\");\n menuItemsArray.value = [].slice.call(menuItems.value);\n initEvent();\n initAria();\n }\n function triggerElmFocus() {\n triggerElm.focus();\n }\n initDomOperation();\n};\n\nvar script = defineComponent({\n name: \"ElDropdownMenu\",\n directives: {\n ClickOutside\n },\n setup() {\n const { _elDropdownSize, elDropdown } = useDropdown();\n const size = _elDropdownSize.value;\n function show() {\n var _a;\n if ([\"click\", \"contextmenu\"].includes(elDropdown.trigger.value))\n return;\n (_a = elDropdown.show) == null ? void 0 : _a.call(elDropdown);\n }\n function hide() {\n if ([\"click\", \"contextmenu\"].includes(elDropdown.trigger.value))\n return;\n _hide();\n }\n function _hide() {\n var _a;\n (_a = elDropdown.hide) == null ? void 0 : _a.call(elDropdown);\n }\n onMounted(() => {\n const dropdownMenu = getCurrentInstance();\n initDropdownDomEvent(dropdownMenu, elDropdown.triggerElm.value, elDropdown.instance);\n });\n return {\n size,\n show,\n hide,\n innerHide: _hide,\n triggerElm: elDropdown.triggerElm\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _directive_clickOutside = resolveDirective(\"clickOutside\");\n return withDirectives((openBlock(), createBlock(\"ul\", {\n class: [[_ctx.size && `el-dropdown-menu--${_ctx.size}`], \"el-dropdown-menu\"],\n onMouseenter: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.show && _ctx.show(...args), [\"stop\"])),\n onMouseleave: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.hide && _ctx.hide(...args), [\"stop\"]))\n }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 34)), [\n [_directive_clickOutside, _ctx.innerHide, _ctx.triggerElm]\n ]);\n}\n\nscript.render = render;\nscript.__file = \"packages/dropdown/src/dropdown-menu.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _DropdownMenu = script;\n\nexport default _DropdownMenu;\n","import { defineComponent, openBlock, createBlock, createVNode, computed, resolveComponent, renderSlot, toDisplayString, createCommentVNode } from 'vue';\nimport { useLocaleInject } from '../hooks';\n\nlet id = 0;\nvar script = defineComponent({\n name: \"ImgEmpty\",\n setup() {\n return {\n id: ++id\n };\n }\n});\n\nconst _hoisted_1 = {\n viewBox: \"0 0 79 86\",\n version: \"1.1\",\n xmlns: \"http://www.w3.org/2000/svg\",\n \"xmlns:xlink\": \"http://www.w3.org/1999/xlink\"\n};\nconst _hoisted_2 = /* @__PURE__ */ createVNode(\"stop\", {\n \"stop-color\": \"#FCFCFD\",\n offset: \"0%\"\n}, null, -1);\nconst _hoisted_3 = /* @__PURE__ */ createVNode(\"stop\", {\n \"stop-color\": \"#EEEFF3\",\n offset: \"100%\"\n}, null, -1);\nconst _hoisted_4 = /* @__PURE__ */ createVNode(\"stop\", {\n \"stop-color\": \"#FCFCFD\",\n offset: \"0%\"\n}, null, -1);\nconst _hoisted_5 = /* @__PURE__ */ createVNode(\"stop\", {\n \"stop-color\": \"#E9EBEF\",\n offset: \"100%\"\n}, null, -1);\nconst _hoisted_6 = {\n id: \"Illustrations\",\n stroke: \"none\",\n \"stroke-width\": \"1\",\n fill: \"none\",\n \"fill-rule\": \"evenodd\"\n};\nconst _hoisted_7 = {\n id: \"B-type\",\n transform: \"translate(-1268.000000, -535.000000)\"\n};\nconst _hoisted_8 = {\n id: \"Group-2\",\n transform: \"translate(1268.000000, 535.000000)\"\n};\nconst _hoisted_9 = /* @__PURE__ */ createVNode(\"path\", {\n id: \"Oval-Copy-2\",\n d: \"M39.5,86 C61.3152476,86 79,83.9106622 79,81.3333333 C79,78.7560045 57.3152476,78 35.5,78 C13.6847524,78 0,78.7560045 0,81.3333333 C0,83.9106622 17.6847524,86 39.5,86 Z\",\n fill: \"#F7F8FC\"\n}, null, -1);\nconst _hoisted_10 = /* @__PURE__ */ createVNode(\"polygon\", {\n id: \"Rectangle-Copy-14\",\n fill: \"#E5E7E9\",\n transform: \"translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) \",\n points: \"13 58 53 58 42 45 2 45\"\n}, null, -1);\nconst _hoisted_11 = {\n id: \"Group-Copy\",\n transform: \"translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)\"\n};\nconst _hoisted_12 = /* @__PURE__ */ createVNode(\"polygon\", {\n id: \"Rectangle-Copy-10\",\n fill: \"#E5E7E9\",\n transform: \"translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) \",\n points: \"2.84078316e-14 3 18 3 23 7 5 7\"\n}, null, -1);\nconst _hoisted_13 = /* @__PURE__ */ createVNode(\"polygon\", {\n id: \"Rectangle-Copy-11\",\n fill: \"#EDEEF2\",\n points: \"-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43\"\n}, null, -1);\nconst _hoisted_14 = /* @__PURE__ */ createVNode(\"polygon\", {\n id: \"Rectangle-Copy-13\",\n fill: \"#F8F9FB\",\n transform: \"translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) \",\n points: \"24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12\"\n}, null, -1);\nconst _hoisted_15 = {\n id: \"Rectangle-Copy-17\",\n transform: \"translate(53.000000, 45.000000)\"\n};\nconst _hoisted_16 = /* @__PURE__ */ createVNode(\"polygon\", {\n id: \"Rectangle-Copy-18\",\n fill: \"#F8F9FB\",\n transform: \"translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) \",\n points: \"62 45 79 45 70 58 53 58\"\n}, null, -1);\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"svg\", _hoisted_1, [\n createVNode(\"defs\", null, [\n createVNode(\"linearGradient\", {\n id: `linearGradient-1-${_ctx.id}`,\n x1: \"38.8503086%\",\n y1: \"0%\",\n x2: \"61.1496914%\",\n y2: \"100%\"\n }, [\n _hoisted_2,\n _hoisted_3\n ], 8, [\"id\"]),\n createVNode(\"linearGradient\", {\n id: `linearGradient-2-${_ctx.id}`,\n x1: \"0%\",\n y1: \"9.5%\",\n x2: \"100%\",\n y2: \"90.5%\"\n }, [\n _hoisted_4,\n _hoisted_5\n ], 8, [\"id\"]),\n createVNode(\"rect\", {\n id: `path-3-${_ctx.id}`,\n x: \"0\",\n y: \"0\",\n width: \"17\",\n height: \"36\"\n }, null, 8, [\"id\"])\n ]),\n createVNode(\"g\", _hoisted_6, [\n createVNode(\"g\", _hoisted_7, [\n createVNode(\"g\", _hoisted_8, [\n _hoisted_9,\n _hoisted_10,\n createVNode(\"g\", _hoisted_11, [\n _hoisted_12,\n _hoisted_13,\n createVNode(\"rect\", {\n id: \"Rectangle-Copy-12\",\n fill: `url(#linearGradient-1-${_ctx.id})`,\n transform: \"translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) \",\n x: \"38\",\n y: \"7\",\n width: \"17\",\n height: \"36\"\n }, null, 8, [\"fill\"]),\n _hoisted_14\n ]),\n createVNode(\"rect\", {\n id: \"Rectangle-Copy-15\",\n fill: `url(#linearGradient-2-${_ctx.id})`,\n x: \"13\",\n y: \"45\",\n width: \"40\",\n height: \"36\"\n }, null, 8, [\"fill\"]),\n createVNode(\"g\", _hoisted_15, [\n createVNode(\"mask\", {\n id: `mask-4-${_ctx.id}`,\n fill: \"white\"\n }, [\n createVNode(\"use\", {\n \"xlink:href\": `#path-3-${_ctx.id}`\n }, null, 8, [\"xlink:href\"])\n ], 8, [\"id\"]),\n createVNode(\"use\", {\n id: \"Mask\",\n fill: \"#E0E3E9\",\n transform: \"translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) \",\n \"xlink:href\": `#path-3-${_ctx.id}`\n }, null, 8, [\"xlink:href\"]),\n createVNode(\"polygon\", {\n id: \"Rectangle-Copy\",\n fill: \"#D5D7DE\",\n mask: `url(#mask-4-${_ctx.id})`,\n transform: \"translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) \",\n points: \"7 0 24 0 20 18 -1.70530257e-13 16\"\n }, null, 8, [\"mask\"])\n ]),\n _hoisted_16\n ])\n ])\n ])\n ]);\n}\n\nscript.render = render;\nscript.__file = \"packages/empty/src/img-empty.vue\";\n\nvar script$1 = defineComponent({\n name: \"ElEmpty\",\n components: {\n [script.name]: script\n },\n props: {\n image: {\n type: String,\n default: \"\"\n },\n imageSize: Number,\n description: {\n type: String,\n default: \"\"\n }\n },\n setup(props) {\n const { t } = useLocaleInject();\n const emptyDescription = computed(() => props.description || t(\"el.table.emptyText\"));\n const imageStyle = computed(() => {\n return {\n width: props.imageSize ? `${props.imageSize}px` : \"\"\n };\n });\n return {\n emptyDescription,\n imageStyle\n };\n }\n});\n\nconst _hoisted_1$1 = { class: \"el-empty\" };\nconst _hoisted_2$1 = { class: \"el-empty__description\" };\nconst _hoisted_3$1 = { key: 1 };\nconst _hoisted_4$1 = {\n key: 0,\n class: \"el-empty__bottom\"\n};\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_img_empty = resolveComponent(\"img-empty\");\n return openBlock(), createBlock(\"div\", _hoisted_1$1, [\n createVNode(\"div\", {\n class: \"el-empty__image\",\n style: _ctx.imageStyle\n }, [\n _ctx.image ? (openBlock(), createBlock(\"img\", {\n key: 0,\n src: _ctx.image,\n ondragstart: \"return false\"\n }, null, 8, [\"src\"])) : renderSlot(_ctx.$slots, \"image\", { key: 1 }, () => [\n createVNode(_component_img_empty)\n ])\n ], 4),\n createVNode(\"div\", _hoisted_2$1, [\n _ctx.$slots.description ? renderSlot(_ctx.$slots, \"description\", { key: 0 }) : (openBlock(), createBlock(\"p\", _hoisted_3$1, toDisplayString(_ctx.emptyDescription), 1))\n ]),\n _ctx.$slots.default ? (openBlock(), createBlock(\"div\", _hoisted_4$1, [\n renderSlot(_ctx.$slots, \"default\")\n ])) : createCommentVNode(\"v-if\", true)\n ]);\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"packages/empty/src/index.vue\";\n\nscript$1.install = (app) => {\n app.component(script$1.name, script$1);\n};\nconst _Empty = script$1;\n\nexport default _Empty;\n","import { defineComponent, openBlock, createBlock, renderSlot } from 'vue';\n\nvar script = defineComponent({\n name: \"ElFooter\",\n props: {\n height: {\n type: String,\n default: null\n }\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"footer\", {\n class: \"el-footer\",\n style: { \"--el-footer-height\": _ctx.height }\n }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 4);\n}\n\nscript.render = render;\nscript.__file = \"packages/container/src/footer.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Footer = script;\n\nexport default _Footer;\n","import { useGlobalConfig, addUnit, getPropByPath } from '../utils/util';\nimport { defineComponent, ref, inject, watch, onMounted, onUpdated, onBeforeUnmount, nextTick, h, Fragment, getCurrentInstance, computed, reactive, toRefs, provide, resolveComponent, openBlock, createBlock, createVNode, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode, Transition } from 'vue';\nimport AsyncValidator from 'async-validator';\nimport { isValidComponentSize } from '../utils/validators';\nimport mitt from 'mitt';\nimport { addResizeListener, removeResizeListener } from '../utils/resize-event';\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst NOOP = () => { };\n\nconst elFormKey = \"elForm\";\nconst elFormItemKey = \"elFormItem\";\nconst elFormEvents = {\n addField: \"el.form.addField\",\n removeField: \"el.form.removeField\"\n};\n\nvar LabelWrap = defineComponent({\n name: \"ElLabelWrap\",\n props: {\n isAutoWidth: Boolean,\n updateAll: Boolean\n },\n setup(props, { slots }) {\n const el = ref(null);\n const elForm = inject(elFormKey);\n const elFormItem = inject(elFormItemKey);\n const computedWidth = ref(0);\n watch(computedWidth, (val, oldVal) => {\n if (props.updateAll) {\n elForm.registerLabelWidth(val, oldVal);\n elFormItem.updateComputedLabelWidth(val);\n }\n });\n const getLabelWidth = () => {\n var _a;\n if ((_a = el.value) == null ? void 0 : _a.firstElementChild) {\n const width = window.getComputedStyle(el.value.firstElementChild).width;\n return Math.ceil(parseFloat(width));\n } else {\n return 0;\n }\n };\n const updateLabelWidth = (action = \"update\") => {\n nextTick(() => {\n if (slots.default && props.isAutoWidth) {\n if (action === \"update\") {\n computedWidth.value = getLabelWidth();\n } else if (action === \"remove\") {\n elForm.deregisterLabelWidth(computedWidth.value);\n }\n }\n });\n };\n const updateLabelWidthFn = () => updateLabelWidth(\"update\");\n onMounted(() => {\n addResizeListener(el.value.firstElementChild, updateLabelWidthFn);\n updateLabelWidthFn();\n });\n onUpdated(updateLabelWidthFn);\n onBeforeUnmount(() => {\n updateLabelWidth(\"remove\");\n removeResizeListener(el.value.firstElementChild, updateLabelWidthFn);\n });\n function render() {\n var _a, _b;\n if (!slots)\n return null;\n if (props.isAutoWidth) {\n const autoLabelWidth = elForm.autoLabelWidth;\n const style = {};\n if (autoLabelWidth && autoLabelWidth !== \"auto\") {\n const marginWidth = parseInt(autoLabelWidth, 10) - computedWidth.value;\n const marginPositon = elForm.labelPosition === \"left\" ? \"marginRight\" : \"marginLeft\";\n if (marginWidth) {\n style[marginPositon] = marginWidth + \"px\";\n }\n }\n return h(\"div\", {\n ref: el,\n class: [\"el-form-item__label-wrap\"],\n style\n }, (_a = slots.default) == null ? void 0 : _a.call(slots));\n } else {\n return h(Fragment, { ref: el }, (_b = slots.default) == null ? void 0 : _b.call(slots));\n }\n }\n return render;\n }\n});\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar script = defineComponent({\n name: \"ElFormItem\",\n componentName: \"ElFormItem\",\n components: {\n LabelWrap\n },\n props: {\n label: String,\n labelWidth: {\n type: [String, Number],\n default: \"\"\n },\n prop: String,\n required: {\n type: Boolean,\n default: void 0\n },\n rules: [Object, Array],\n error: String,\n validateStatus: String,\n for: String,\n inlineMessage: {\n type: [String, Boolean],\n default: \"\"\n },\n showMessage: {\n type: Boolean,\n default: true\n },\n size: {\n types: String,\n validator: isValidComponentSize\n }\n },\n setup(props, { slots }) {\n const formItemMitt = mitt();\n const $ELEMENT = useGlobalConfig();\n const elForm = inject(elFormKey, {});\n const validateState = ref(\"\");\n const validateMessage = ref(\"\");\n const validateDisabled = ref(false);\n const computedLabelWidth = ref(\"\");\n const vm = getCurrentInstance();\n const isNested = computed(() => {\n let parent = vm.parent;\n while (parent && parent.type.name !== \"ElForm\") {\n if (parent.type.name === \"ElFormItem\") {\n return true;\n }\n parent = parent.parent;\n }\n return false;\n });\n let initialValue = void 0;\n watch(() => props.error, (val) => {\n validateMessage.value = val;\n validateState.value = val ? \"error\" : \"\";\n }, {\n immediate: true\n });\n watch(() => props.validateStatus, (val) => {\n validateState.value = val;\n });\n const labelFor = computed(() => props.for || props.prop);\n const labelStyle = computed(() => {\n const ret = {};\n if (elForm.labelPosition === \"top\")\n return ret;\n const labelWidth = addUnit(props.labelWidth) || addUnit(elForm.labelWidth);\n if (labelWidth) {\n ret.width = labelWidth;\n }\n return ret;\n });\n const contentStyle = computed(() => {\n const ret = {};\n if (elForm.labelPosition === \"top\" || elForm.inline) {\n return ret;\n }\n if (!props.label && !props.labelWidth && isNested.value) {\n return ret;\n }\n const labelWidth = addUnit(props.labelWidth) || addUnit(elForm.labelWidth);\n if (!props.label && !slots.label) {\n ret.marginLeft = labelWidth;\n }\n return ret;\n });\n const fieldValue = computed(() => {\n const model = elForm.model;\n if (!model || !props.prop) {\n return;\n }\n let path = props.prop;\n if (path.indexOf(\":\") !== -1) {\n path = path.replace(/:/, \".\");\n }\n return getPropByPath(model, path, true).v;\n });\n const isRequired = computed(() => {\n let rules = getRules();\n let required = false;\n if (rules && rules.length) {\n rules.every((rule) => {\n if (rule.required) {\n required = true;\n return false;\n }\n return true;\n });\n }\n return required;\n });\n const elFormItemSize = computed(() => props.size || elForm.size);\n const sizeClass = computed(() => {\n return elFormItemSize.value || $ELEMENT.size;\n });\n const validate = (trigger, callback = NOOP) => {\n validateDisabled.value = false;\n const rules = getFilteredRule(trigger);\n if ((!rules || rules.length === 0) && props.required === void 0) {\n callback();\n return;\n }\n validateState.value = \"validating\";\n const descriptor = {};\n if (rules && rules.length > 0) {\n rules.forEach((rule) => {\n delete rule.trigger;\n });\n }\n descriptor[props.prop] = rules;\n const validator = new AsyncValidator(descriptor);\n const model = {};\n model[props.prop] = fieldValue.value;\n validator.validate(model, { firstFields: true }, (errors, invalidFields) => {\n var _a;\n validateState.value = !errors ? \"success\" : \"error\";\n validateMessage.value = errors ? errors[0].message : \"\";\n callback(validateMessage.value, invalidFields);\n (_a = elForm.emit) == null ? void 0 : _a.call(elForm, \"validate\", props.prop, !errors, validateMessage.value || null);\n });\n };\n const clearValidate = () => {\n validateState.value = \"\";\n validateMessage.value = \"\";\n validateDisabled.value = false;\n };\n const resetField = () => {\n validateState.value = \"\";\n validateMessage.value = \"\";\n let model = elForm.model;\n let value = fieldValue.value;\n let path = props.prop;\n if (path.indexOf(\":\") !== -1) {\n path = path.replace(/:/, \".\");\n }\n let prop = getPropByPath(model, path, true);\n validateDisabled.value = true;\n if (Array.isArray(value)) {\n prop.o[prop.k] = [].concat(initialValue);\n } else {\n prop.o[prop.k] = initialValue;\n }\n nextTick(() => {\n validateDisabled.value = false;\n });\n };\n const getRules = () => {\n const formRules = elForm.rules;\n const selfRules = props.rules;\n const requiredRule = props.required !== void 0 ? { required: !!props.required } : [];\n const prop = getPropByPath(formRules, props.prop || \"\", false);\n const normalizedRule = formRules ? prop.o[props.prop || \"\"] || prop.v : [];\n return [].concat(selfRules || normalizedRule || []).concat(requiredRule);\n };\n const getFilteredRule = (trigger) => {\n const rules = getRules();\n return rules.filter((rule) => {\n if (!rule.trigger || trigger === \"\")\n return true;\n if (Array.isArray(rule.trigger)) {\n return rule.trigger.indexOf(trigger) > -1;\n } else {\n return rule.trigger === trigger;\n }\n }).map((rule) => __spreadValues({}, rule));\n };\n const onFieldBlur = () => {\n validate(\"blur\");\n };\n const onFieldChange = () => {\n if (validateDisabled.value) {\n validateDisabled.value = false;\n return;\n }\n validate(\"change\");\n };\n const updateComputedLabelWidth = (width) => {\n computedLabelWidth.value = width ? `${width}px` : \"\";\n };\n const addValidateEvents = () => {\n const rules = getRules();\n if (rules.length || props.required !== void 0) {\n formItemMitt.on(\"el.form.blur\", onFieldBlur);\n formItemMitt.on(\"el.form.change\", onFieldChange);\n }\n };\n const removeValidateEvents = () => {\n formItemMitt.off(\"el.form.blur\", onFieldBlur);\n formItemMitt.off(\"el.form.change\", onFieldChange);\n };\n const elFormItem = reactive(__spreadProps(__spreadValues({}, toRefs(props)), {\n size: sizeClass,\n validateState,\n removeValidateEvents,\n addValidateEvents,\n resetField,\n clearValidate,\n validate,\n formItemMitt,\n updateComputedLabelWidth\n }));\n onMounted(() => {\n var _a;\n if (props.prop) {\n (_a = elForm.formMitt) == null ? void 0 : _a.emit(elFormEvents.addField, elFormItem);\n let value = fieldValue.value;\n initialValue = Array.isArray(value) ? [...value] : value;\n addValidateEvents();\n }\n });\n onBeforeUnmount(() => {\n var _a;\n (_a = elForm.formMitt) == null ? void 0 : _a.emit(elFormEvents.removeField, elFormItem);\n });\n provide(elFormItemKey, elFormItem);\n const formItemClass = computed(() => [\n {\n \"el-form-item--feedback\": elForm.statusIcon,\n \"is-error\": validateState.value === \"error\",\n \"is-validating\": validateState.value === \"validating\",\n \"is-success\": validateState.value === \"success\",\n \"is-required\": isRequired.value || props.required,\n \"is-no-asterisk\": elForm.hideRequiredAsterisk\n },\n sizeClass.value ? \"el-form-item--\" + sizeClass.value : \"\"\n ]);\n const shouldShowError = computed(() => {\n return validateState.value === \"error\" && props.showMessage && elForm.showMessage;\n });\n return {\n formItemClass,\n shouldShowError,\n elForm,\n labelStyle,\n contentStyle,\n validateMessage,\n labelFor,\n resetField,\n clearValidate\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_LabelWrap = resolveComponent(\"LabelWrap\");\n return openBlock(), createBlock(\"div\", {\n class: [\"el-form-item\", _ctx.formItemClass]\n }, [\n createVNode(_component_LabelWrap, {\n \"is-auto-width\": _ctx.labelStyle.width === \"auto\",\n \"update-all\": _ctx.elForm.labelWidth === \"auto\"\n }, {\n default: withCtx(() => [\n _ctx.label || _ctx.$slots.label ? (openBlock(), createBlock(\"label\", {\n key: 0,\n for: _ctx.labelFor,\n class: \"el-form-item__label\",\n style: _ctx.labelStyle\n }, [\n renderSlot(_ctx.$slots, \"label\", {\n label: _ctx.label + _ctx.elForm.labelSuffix\n }, () => [\n createTextVNode(toDisplayString(_ctx.label + _ctx.elForm.labelSuffix), 1)\n ])\n ], 12, [\"for\"])) : createCommentVNode(\"v-if\", true)\n ]),\n _: 3\n }, 8, [\"is-auto-width\", \"update-all\"]),\n createVNode(\"div\", {\n class: \"el-form-item__content\",\n style: _ctx.contentStyle\n }, [\n renderSlot(_ctx.$slots, \"default\"),\n createVNode(Transition, { name: \"el-zoom-in-top\" }, {\n default: withCtx(() => [\n _ctx.shouldShowError ? renderSlot(_ctx.$slots, \"error\", {\n key: 0,\n error: _ctx.validateMessage\n }, () => [\n createVNode(\"div\", {\n class: [\"el-form-item__error\", {\n \"el-form-item__error--inline\": typeof _ctx.inlineMessage === \"boolean\" ? _ctx.inlineMessage : _ctx.elForm.inlineMessage || false\n }]\n }, toDisplayString(_ctx.validateMessage), 3)\n ]) : createCommentVNode(\"v-if\", true)\n ]),\n _: 3\n })\n ], 4)\n ], 2);\n}\n\nscript.render = render;\nscript.__file = \"packages/form/src/form-item.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _FormItem = script;\n\nexport default _FormItem;\n","import { defineComponent, openBlock, createBlock, renderSlot } from 'vue';\n\nvar script = defineComponent({\n name: \"ElHeader\",\n props: {\n height: {\n type: String,\n default: null\n }\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"header\", {\n class: \"el-header\",\n style: { \"--el-header-height\": _ctx.height }\n }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 4);\n}\n\nscript.render = render;\nscript.__file = \"packages/container/src/header.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Header = script;\n\nexport default _Header;\n","import { defineComponent, openBlock, createBlock } from 'vue';\n\nvar script = defineComponent({\n name: \"ElIcon\",\n props: {\n name: {\n type: String,\n default: \"\"\n }\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"i\", {\n class: `el-icon-${_ctx.name}`\n }, null, 2);\n}\n\nscript.render = render;\nscript.__file = \"packages/icon/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Icon = script;\n\nexport default _Icon;\n","import { defineComponent, ref, computed, watch, nextTick, onMounted, openBlock, createBlock, Transition, withCtx, createVNode, withModifiers, createCommentVNode, Fragment, renderList, withDirectives, vShow } from 'vue';\nimport { isFirefox, rafThrottle } from '../utils/util';\nimport { on, off } from '../utils/dom';\nimport { EVENT_CODE } from '../utils/aria';\nimport { useLocaleInject } from '../hooks';\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nconst Mode = {\n CONTAIN: {\n name: \"contain\",\n icon: \"el-icon-full-screen\"\n },\n ORIGINAL: {\n name: \"original\",\n icon: \"el-icon-c-scale-to-original\"\n }\n};\nconst mousewheelEventName = isFirefox() ? \"DOMMouseScroll\" : \"mousewheel\";\nconst CLOSE_EVENT = \"close\";\nconst SWITCH_EVENT = \"switch\";\nvar script = defineComponent({\n name: \"ElImageViewer\",\n props: {\n urlList: {\n type: Array,\n default: []\n },\n zIndex: {\n type: Number,\n default: 2e3\n },\n initialIndex: {\n type: Number,\n default: 0\n },\n infinite: {\n type: Boolean,\n default: true\n },\n hideOnClickModal: {\n type: Boolean,\n default: false\n }\n },\n emits: [CLOSE_EVENT, SWITCH_EVENT],\n setup(props, { emit }) {\n const { t } = useLocaleInject();\n let _keyDownHandler = null;\n let _mouseWheelHandler = null;\n let _dragHandler = null;\n const loading = ref(true);\n const index = ref(props.initialIndex);\n const wrapper = ref(null);\n const img = ref(null);\n const mode = ref(Mode.CONTAIN);\n let transform = ref({\n scale: 1,\n deg: 0,\n offsetX: 0,\n offsetY: 0,\n enableTransition: false\n });\n const isSingle = computed(() => {\n const { urlList } = props;\n return urlList.length <= 1;\n });\n const isFirst = computed(() => {\n return index.value === 0;\n });\n const isLast = computed(() => {\n return index.value === props.urlList.length - 1;\n });\n const currentImg = computed(() => {\n return props.urlList[index.value];\n });\n const imgStyle = computed(() => {\n const { scale, deg, offsetX, offsetY, enableTransition } = transform.value;\n const style = {\n transform: `scale(${scale}) rotate(${deg}deg)`,\n transition: enableTransition ? \"transform .3s\" : \"\",\n marginLeft: `${offsetX}px`,\n marginTop: `${offsetY}px`\n };\n if (mode.value.name === Mode.CONTAIN.name) {\n style.maxWidth = style.maxHeight = \"100%\";\n }\n return style;\n });\n function hide() {\n deviceSupportUninstall();\n emit(CLOSE_EVENT);\n }\n function deviceSupportInstall() {\n _keyDownHandler = rafThrottle((e) => {\n switch (e.code) {\n case EVENT_CODE.esc:\n hide();\n break;\n case EVENT_CODE.space:\n toggleMode();\n break;\n case EVENT_CODE.left:\n prev();\n break;\n case EVENT_CODE.up:\n handleActions(\"zoomIn\");\n break;\n case EVENT_CODE.right:\n next();\n break;\n case EVENT_CODE.down:\n handleActions(\"zoomOut\");\n break;\n }\n });\n _mouseWheelHandler = rafThrottle((e) => {\n const delta = e.wheelDelta ? e.wheelDelta : -e.detail;\n if (delta > 0) {\n handleActions(\"zoomIn\", {\n zoomRate: 0.015,\n enableTransition: false\n });\n } else {\n handleActions(\"zoomOut\", {\n zoomRate: 0.015,\n enableTransition: false\n });\n }\n });\n on(document, \"keydown\", _keyDownHandler);\n on(document, mousewheelEventName, _mouseWheelHandler);\n }\n function deviceSupportUninstall() {\n off(document, \"keydown\", _keyDownHandler);\n off(document, mousewheelEventName, _mouseWheelHandler);\n _keyDownHandler = null;\n _mouseWheelHandler = null;\n }\n function handleImgLoad() {\n loading.value = false;\n }\n function handleImgError(e) {\n loading.value = false;\n e.target.alt = t(\"el.image.error\");\n }\n function handleMouseDown(e) {\n if (loading.value || e.button !== 0)\n return;\n const { offsetX, offsetY } = transform.value;\n const startX = e.pageX;\n const startY = e.pageY;\n _dragHandler = rafThrottle((ev) => {\n transform.value = __spreadProps(__spreadValues({}, transform.value), {\n offsetX: offsetX + ev.pageX - startX,\n offsetY: offsetY + ev.pageY - startY\n });\n });\n on(document, \"mousemove\", _dragHandler);\n on(document, \"mouseup\", () => {\n off(document, \"mousemove\", _dragHandler);\n });\n e.preventDefault();\n }\n function reset() {\n transform.value = {\n scale: 1,\n deg: 0,\n offsetX: 0,\n offsetY: 0,\n enableTransition: false\n };\n }\n function toggleMode() {\n if (loading.value)\n return;\n const modeNames = Object.keys(Mode);\n const modeValues = Object.values(Mode);\n const currentMode = mode.value.name;\n const index2 = modeValues.findIndex((i) => i.name === currentMode);\n const nextIndex = (index2 + 1) % modeNames.length;\n mode.value = Mode[modeNames[nextIndex]];\n reset();\n }\n function prev() {\n if (isFirst.value && !props.infinite)\n return;\n const len = props.urlList.length;\n index.value = (index.value - 1 + len) % len;\n }\n function next() {\n if (isLast.value && !props.infinite)\n return;\n const len = props.urlList.length;\n index.value = (index.value + 1) % len;\n }\n function handleActions(action, options = {}) {\n if (loading.value)\n return;\n const { zoomRate, rotateDeg, enableTransition } = __spreadValues({\n zoomRate: 0.2,\n rotateDeg: 90,\n enableTransition: true\n }, options);\n switch (action) {\n case \"zoomOut\":\n if (transform.value.scale > 0.2) {\n transform.value.scale = parseFloat((transform.value.scale - zoomRate).toFixed(3));\n }\n break;\n case \"zoomIn\":\n transform.value.scale = parseFloat((transform.value.scale + zoomRate).toFixed(3));\n break;\n case \"clocelise\":\n transform.value.deg += rotateDeg;\n break;\n case \"anticlocelise\":\n transform.value.deg -= rotateDeg;\n break;\n }\n transform.value.enableTransition = enableTransition;\n }\n watch(currentImg, () => {\n nextTick(() => {\n const $img = img.value;\n if (!$img.complete) {\n loading.value = true;\n }\n });\n });\n watch(index, (val) => {\n reset();\n emit(SWITCH_EVENT, val);\n });\n onMounted(() => {\n var _a, _b;\n deviceSupportInstall();\n (_b = (_a = wrapper.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);\n });\n return {\n index,\n wrapper,\n img,\n isSingle,\n isFirst,\n isLast,\n currentImg,\n imgStyle,\n mode,\n handleActions,\n prev,\n next,\n hide,\n toggleMode,\n handleImgLoad,\n handleImgError,\n handleMouseDown\n };\n }\n});\n\nconst _hoisted_1 = /* @__PURE__ */ createVNode(\"i\", { class: \"el-icon-close\" }, null, -1);\nconst _hoisted_2 = /* @__PURE__ */ createVNode(\"i\", { class: \"el-icon-arrow-left\" }, null, -1);\nconst _hoisted_3 = /* @__PURE__ */ createVNode(\"i\", { class: \"el-icon-arrow-right\" }, null, -1);\nconst _hoisted_4 = { class: \"el-image-viewer__btn el-image-viewer__actions\" };\nconst _hoisted_5 = { class: \"el-image-viewer__actions__inner\" };\nconst _hoisted_6 = /* @__PURE__ */ createVNode(\"i\", { class: \"el-image-viewer__actions__divider\" }, null, -1);\nconst _hoisted_7 = /* @__PURE__ */ createVNode(\"i\", { class: \"el-image-viewer__actions__divider\" }, null, -1);\nconst _hoisted_8 = { class: \"el-image-viewer__canvas\" };\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(Transition, { name: \"viewer-fade\" }, {\n default: withCtx(() => [\n createVNode(\"div\", {\n ref: \"wrapper\",\n tabindex: -1,\n class: \"el-image-viewer__wrapper\",\n style: { zIndex: _ctx.zIndex }\n }, [\n createVNode(\"div\", {\n class: \"el-image-viewer__mask\",\n onClick: _cache[1] || (_cache[1] = withModifiers(($event) => _ctx.hideOnClickModal && _ctx.hide(), [\"self\"]))\n }),\n createCommentVNode(\" CLOSE \"),\n createVNode(\"span\", {\n class: \"el-image-viewer__btn el-image-viewer__close\",\n onClick: _cache[2] || (_cache[2] = (...args) => _ctx.hide && _ctx.hide(...args))\n }, [\n _hoisted_1\n ]),\n createCommentVNode(\" ARROW \"),\n !_ctx.isSingle ? (openBlock(), createBlock(Fragment, { key: 0 }, [\n createVNode(\"span\", {\n class: [\"el-image-viewer__btn el-image-viewer__prev\", { \"is-disabled\": !_ctx.infinite && _ctx.isFirst }],\n onClick: _cache[3] || (_cache[3] = (...args) => _ctx.prev && _ctx.prev(...args))\n }, [\n _hoisted_2\n ], 2),\n createVNode(\"span\", {\n class: [\"el-image-viewer__btn el-image-viewer__next\", { \"is-disabled\": !_ctx.infinite && _ctx.isLast }],\n onClick: _cache[4] || (_cache[4] = (...args) => _ctx.next && _ctx.next(...args))\n }, [\n _hoisted_3\n ], 2)\n ], 64)) : createCommentVNode(\"v-if\", true),\n createCommentVNode(\" ACTIONS \"),\n createVNode(\"div\", _hoisted_4, [\n createVNode(\"div\", _hoisted_5, [\n createVNode(\"i\", {\n class: \"el-icon-zoom-out\",\n onClick: _cache[5] || (_cache[5] = ($event) => _ctx.handleActions(\"zoomOut\"))\n }),\n createVNode(\"i\", {\n class: \"el-icon-zoom-in\",\n onClick: _cache[6] || (_cache[6] = ($event) => _ctx.handleActions(\"zoomIn\"))\n }),\n _hoisted_6,\n createVNode(\"i\", {\n class: _ctx.mode.icon,\n onClick: _cache[7] || (_cache[7] = (...args) => _ctx.toggleMode && _ctx.toggleMode(...args))\n }, null, 2),\n _hoisted_7,\n createVNode(\"i\", {\n class: \"el-icon-refresh-left\",\n onClick: _cache[8] || (_cache[8] = ($event) => _ctx.handleActions(\"anticlocelise\"))\n }),\n createVNode(\"i\", {\n class: \"el-icon-refresh-right\",\n onClick: _cache[9] || (_cache[9] = ($event) => _ctx.handleActions(\"clocelise\"))\n })\n ])\n ]),\n createCommentVNode(\" CANVAS \"),\n createVNode(\"div\", _hoisted_8, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.urlList, (url, i) => {\n return withDirectives((openBlock(), createBlock(\"img\", {\n ref: \"img\",\n key: url,\n src: url,\n style: _ctx.imgStyle,\n class: \"el-image-viewer__img\",\n onLoad: _cache[10] || (_cache[10] = (...args) => _ctx.handleImgLoad && _ctx.handleImgLoad(...args)),\n onError: _cache[11] || (_cache[11] = (...args) => _ctx.handleImgError && _ctx.handleImgError(...args)),\n onMousedown: _cache[12] || (_cache[12] = (...args) => _ctx.handleMouseDown && _ctx.handleMouseDown(...args))\n }, null, 44, [\"src\"])), [\n [vShow, i === _ctx.index]\n ]);\n }), 128))\n ])\n ], 4)\n ]),\n _: 1\n });\n}\n\nscript.render = render;\nscript.__file = \"packages/image-viewer/src/index.vue\";\n\nscript.install = (app) => {\n app.component(Image.name, Image);\n};\nconst _ImageViewer = script;\n\nexport default _ImageViewer;\n","import { defineComponent, ref, computed, watch, onMounted, nextTick, onBeforeUnmount, resolveComponent, openBlock, createBlock, renderSlot, createVNode, toDisplayString, mergeProps, Teleport, Fragment, createCommentVNode } from 'vue';\nimport throttle from 'lodash/throttle';\nimport { useLocaleInject, useAttrs } from '../hooks';\nimport isServer from '../utils/isServer';\nimport { getScrollContainer, on, off, isInContainer } from '../utils/dom';\nimport ImageViewer from '../el-image-viewer';\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst isString = (val) => typeof val === 'string';\n\nconst isSupportObjectFit = () => document.documentElement.style.objectFit !== void 0;\nconst isHtmlEle = (e) => e && e.nodeType === 1;\nconst ObjectFit = {\n NONE: \"none\",\n CONTAIN: \"contain\",\n COVER: \"cover\",\n FILL: \"fill\",\n SCALE_DOWN: \"scale-down\"\n};\nlet prevOverflow = \"\";\nvar script = defineComponent({\n name: \"ElImage\",\n components: {\n ImageViewer\n },\n inheritAttrs: false,\n props: {\n appendToBody: {\n type: Boolean,\n default: false\n },\n hideOnClickModal: {\n type: Boolean,\n default: false\n },\n src: {\n type: String,\n default: \"\"\n },\n fit: {\n type: String,\n default: \"\"\n },\n lazy: {\n type: Boolean,\n default: false\n },\n scrollContainer: {\n type: [String, Object],\n default: null\n },\n previewSrcList: {\n type: Array,\n default: () => []\n },\n zIndex: {\n type: Number,\n default: 2e3\n }\n },\n emits: [\"error\"],\n setup(props, { emit }) {\n const { t } = useLocaleInject();\n const attrs = useAttrs();\n const hasLoadError = ref(false);\n const loading = ref(true);\n const imgWidth = ref(0);\n const imgHeight = ref(0);\n const showViewer = ref(false);\n const container = ref(null);\n let _scrollContainer = null;\n let _lazyLoadHandler = null;\n const imageStyle = computed(() => {\n const { fit } = props;\n if (!isServer && fit) {\n return isSupportObjectFit() ? { \"object-fit\": fit } : getImageStyle(fit);\n }\n return {};\n });\n const alignCenter = computed(() => {\n const { fit } = props;\n return !isServer && !isSupportObjectFit() && fit !== ObjectFit.FILL;\n });\n const preview = computed(() => {\n const { previewSrcList } = props;\n return Array.isArray(previewSrcList) && previewSrcList.length > 0;\n });\n const imageIndex = computed(() => {\n const { src, previewSrcList } = props;\n let previewIndex = 0;\n const srcIndex = previewSrcList.indexOf(src);\n if (srcIndex >= 0) {\n previewIndex = srcIndex;\n }\n return previewIndex;\n });\n function getImageStyle(fit) {\n const imageWidth = imgWidth.value;\n const imageHeight = imgHeight.value;\n if (!container.value)\n return {};\n const {\n clientWidth: containerWidth,\n clientHeight: containerHeight\n } = container.value;\n if (!imageWidth || !imageHeight || !containerWidth || !containerHeight)\n return {};\n const imageAspectRatio = imageWidth / imageHeight;\n const containerAspectRatio = containerWidth / containerHeight;\n if (fit === ObjectFit.SCALE_DOWN) {\n const isSmaller = imageWidth < containerWidth && imageHeight < containerHeight;\n fit = isSmaller ? ObjectFit.NONE : ObjectFit.CONTAIN;\n }\n switch (fit) {\n case ObjectFit.NONE:\n return { width: \"auto\", height: \"auto\" };\n case ObjectFit.CONTAIN:\n return imageAspectRatio < containerAspectRatio ? { width: \"auto\" } : { height: \"auto\" };\n case ObjectFit.COVER:\n return imageAspectRatio < containerAspectRatio ? { height: \"auto\" } : { width: \"auto\" };\n default:\n return {};\n }\n }\n const loadImage = () => {\n if (isServer)\n return;\n const attributes = attrs.value;\n loading.value = true;\n hasLoadError.value = false;\n const img = new Image();\n img.onload = (e) => handleLoad(e, img);\n img.onerror = handleError;\n Object.keys(attributes).forEach((key) => {\n if (key.toLowerCase() === \"onload\")\n return;\n const value = attributes[key];\n img.setAttribute(key, value);\n });\n img.src = props.src;\n };\n function handleLoad(e, img) {\n imgWidth.value = img.width;\n imgHeight.value = img.height;\n loading.value = false;\n hasLoadError.value = false;\n }\n function handleError(e) {\n loading.value = false;\n hasLoadError.value = true;\n emit(\"error\", e);\n }\n function handleLazyLoad() {\n if (isInContainer(container.value, _scrollContainer)) {\n loadImage();\n removeLazyLoadListener();\n }\n }\n function addLazyLoadListener() {\n if (isServer)\n return;\n const { scrollContainer } = props;\n if (isHtmlEle(scrollContainer)) {\n _scrollContainer = scrollContainer;\n } else if (isString(scrollContainer) && scrollContainer !== \"\") {\n _scrollContainer = document.querySelector(scrollContainer);\n } else {\n _scrollContainer = getScrollContainer(container.value);\n }\n if (_scrollContainer) {\n _lazyLoadHandler = throttle(handleLazyLoad, 200);\n on(_scrollContainer, \"scroll\", _lazyLoadHandler);\n setTimeout(() => handleLazyLoad(), 100);\n }\n }\n function removeLazyLoadListener() {\n if (isServer || !_scrollContainer || !_lazyLoadHandler)\n return;\n off(_scrollContainer, \"scroll\", _lazyLoadHandler);\n _scrollContainer = null;\n _lazyLoadHandler = null;\n }\n function clickHandler() {\n if (!preview.value) {\n return;\n }\n prevOverflow = document.body.style.overflow;\n document.body.style.overflow = \"hidden\";\n showViewer.value = true;\n }\n function closeViewer() {\n document.body.style.overflow = prevOverflow;\n showViewer.value = false;\n }\n watch(() => props.src, () => {\n loadImage();\n });\n onMounted(() => {\n if (props.lazy) {\n nextTick(addLazyLoadListener);\n } else {\n loadImage();\n }\n });\n onBeforeUnmount(() => {\n props.lazy && removeLazyLoadListener();\n });\n return {\n attrs,\n loading,\n hasLoadError,\n showViewer,\n imgWidth,\n imgHeight,\n imageStyle,\n alignCenter,\n preview,\n imageIndex,\n clickHandler,\n closeViewer,\n container,\n handleError,\n t\n };\n }\n});\n\nconst _hoisted_1 = /* @__PURE__ */ createVNode(\"div\", { class: \"el-image__placeholder\" }, null, -1);\nconst _hoisted_2 = { class: \"el-image__error\" };\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_image_viewer = resolveComponent(\"image-viewer\");\n return openBlock(), createBlock(\"div\", {\n ref: \"container\",\n class: [\"el-image\", _ctx.$attrs.class],\n style: _ctx.$attrs.style\n }, [\n _ctx.loading ? renderSlot(_ctx.$slots, \"placeholder\", { key: 0 }, () => [\n _hoisted_1\n ]) : _ctx.hasLoadError ? renderSlot(_ctx.$slots, \"error\", { key: 1 }, () => [\n createVNode(\"div\", _hoisted_2, toDisplayString(_ctx.t(\"el.image.error\")), 1)\n ]) : (openBlock(), createBlock(\"img\", mergeProps({\n key: 2,\n class: \"el-image__inner\"\n }, _ctx.attrs, {\n src: _ctx.src,\n style: _ctx.imageStyle,\n class: { \"el-image__inner--center\": _ctx.alignCenter, \"el-image__preview\": _ctx.preview },\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.clickHandler && _ctx.clickHandler(...args))\n }), null, 16, [\"src\"])),\n (openBlock(), createBlock(Teleport, {\n to: \"body\",\n disabled: !_ctx.appendToBody\n }, [\n _ctx.preview ? (openBlock(), createBlock(Fragment, { key: 0 }, [\n _ctx.showViewer ? (openBlock(), createBlock(_component_image_viewer, {\n key: 0,\n \"z-index\": _ctx.zIndex,\n \"initial-index\": _ctx.imageIndex,\n \"url-list\": _ctx.previewSrcList,\n \"hide-on-click-modal\": _ctx.hideOnClickModal,\n onClose: _ctx.closeViewer\n }, null, 8, [\"z-index\", \"initial-index\", \"url-list\", \"hide-on-click-modal\", \"onClose\"])) : createCommentVNode(\"v-if\", true)\n ], 2112)) : createCommentVNode(\"v-if\", true)\n ], 8, [\"disabled\"]))\n ], 6);\n}\n\nscript.render = render;\nscript.__file = \"packages/image/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Image = script;\n\nexport default _Image;\n","import { defineComponent, inject, ref, reactive, computed, watch, onMounted, onUpdated, resolveComponent, resolveDirective, openBlock, createBlock, withModifiers, withDirectives, withKeys, createVNode, createCommentVNode } from 'vue';\nimport { RepeatClick } from '../directives';\nimport ElInput from '../el-input';\nimport { useGlobalConfig } from '../utils/util';\nimport { isValidComponentSize } from '../utils/validators';\nimport { elFormKey, elFormItemKey } from '../el-form';\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst objectToString = Object.prototype.toString;\r\nconst toTypeString = (value) => objectToString.call(value);\r\nconst toRawType = (value) => {\r\n // extract \"RawType\" from strings like \"[object RawType]\"\r\n return toTypeString(value).slice(8, -1);\r\n};\n\nvar script = defineComponent({\n name: \"ElInputNumber\",\n components: {\n ElInput\n },\n directives: {\n RepeatClick\n },\n props: {\n step: {\n type: Number,\n default: 1\n },\n stepStrictly: {\n type: Boolean,\n default: false\n },\n max: {\n type: Number,\n default: Infinity\n },\n min: {\n type: Number,\n default: -Infinity\n },\n modelValue: {\n required: true,\n validator: (val) => {\n return toRawType(val) === \"Number\" || val === void 0;\n }\n },\n disabled: {\n type: Boolean,\n default: false\n },\n size: {\n type: String,\n validator: isValidComponentSize\n },\n controls: {\n type: Boolean,\n default: true\n },\n controlsPosition: {\n type: String,\n default: \"\"\n },\n name: String,\n label: String,\n placeholder: String,\n precision: {\n type: Number,\n validator: (val) => val >= 0 && val === parseInt(val + \"\", 10)\n }\n },\n emits: [\"update:modelValue\", \"change\", \"input\", \"blur\", \"focus\"],\n setup(props, { emit }) {\n const ELEMENT = useGlobalConfig();\n const elForm = inject(elFormKey, {});\n const elFormItem = inject(elFormItemKey, {});\n const input = ref(null);\n const data = reactive({\n currentValue: props.modelValue,\n userInput: null\n });\n const minDisabled = computed(() => {\n return _decrease(props.modelValue) < props.min;\n });\n const maxDisabled = computed(() => {\n return _increase(props.modelValue) > props.max;\n });\n const numPrecision = computed(() => {\n const stepPrecision = getPrecision(props.step);\n if (props.precision !== void 0) {\n if (stepPrecision > props.precision) {\n console.warn(\"[Element Warn][InputNumber]precision should not be less than the decimal places of step\");\n }\n return props.precision;\n } else {\n return Math.max(getPrecision(props.modelValue), stepPrecision);\n }\n });\n const controlsAtRight = computed(() => {\n return props.controls && props.controlsPosition === \"right\";\n });\n const inputNumberSize = computed(() => {\n return props.size || elFormItem.size || ELEMENT.size;\n });\n const inputNumberDisabled = computed(() => {\n return props.disabled || elForm.disabled;\n });\n const displayValue = computed(() => {\n if (data.userInput !== null) {\n return data.userInput;\n }\n let currentValue = data.currentValue;\n if (typeof currentValue === \"number\") {\n if (props.precision !== void 0) {\n currentValue = currentValue.toFixed(props.precision);\n }\n }\n return currentValue;\n });\n const toPrecision = (num, pre) => {\n if (pre === void 0)\n pre = numPrecision.value;\n return parseFloat(Math.round(num * Math.pow(10, pre)) / Math.pow(10, pre) + \"\");\n };\n const getPrecision = (value) => {\n if (value === void 0)\n return 0;\n const valueString = value.toString();\n const dotPosition = valueString.indexOf(\".\");\n let precision = 0;\n if (dotPosition !== -1) {\n precision = valueString.length - dotPosition - 1;\n }\n return precision;\n };\n const _increase = (val) => {\n if (typeof val !== \"number\" && val !== void 0)\n return data.currentValue;\n const precisionFactor = Math.pow(10, numPrecision.value);\n return toPrecision((precisionFactor * val + precisionFactor * props.step) / precisionFactor);\n };\n const _decrease = (val) => {\n if (typeof val !== \"number\" && val !== void 0)\n return data.currentValue;\n const precisionFactor = Math.pow(10, numPrecision.value);\n return toPrecision((precisionFactor * val - precisionFactor * props.step) / precisionFactor);\n };\n const increase = () => {\n if (inputNumberDisabled.value || maxDisabled.value)\n return;\n const value = props.modelValue || 0;\n const newVal = _increase(value);\n setCurrentValue(newVal);\n };\n const decrease = () => {\n if (inputNumberDisabled.value || minDisabled.value)\n return;\n const value = props.modelValue || 0;\n const newVal = _decrease(value);\n setCurrentValue(newVal);\n };\n const setCurrentValue = (newVal) => {\n const oldVal = data.currentValue;\n if (typeof newVal === \"number\" && props.precision !== void 0) {\n newVal = toPrecision(newVal, props.precision);\n }\n if (newVal !== void 0 && newVal >= props.max)\n newVal = props.max;\n if (newVal !== void 0 && newVal <= props.min)\n newVal = props.min;\n if (oldVal === newVal)\n return;\n data.userInput = null;\n emit(\"update:modelValue\", newVal);\n emit(\"input\", newVal);\n emit(\"change\", newVal, oldVal);\n data.currentValue = newVal;\n };\n const handleInput = (value) => {\n return data.userInput = value;\n };\n const handleInputChange = (value) => {\n const newVal = value === \"\" ? void 0 : Number(value);\n if (!isNaN(newVal) || value === \"\") {\n setCurrentValue(newVal);\n }\n data.userInput = null;\n };\n watch(() => props.modelValue, (value) => {\n let newVal = value === void 0 ? value : Number(value);\n if (newVal !== void 0) {\n if (isNaN(newVal))\n return;\n if (props.stepStrictly) {\n const stepPrecision = getPrecision(props.step);\n const precisionFactor = Math.pow(10, stepPrecision);\n newVal = Math.round(newVal / props.step) * precisionFactor * props.step / precisionFactor;\n }\n if (props.precision !== void 0) {\n newVal = toPrecision(newVal, props.precision);\n }\n }\n if (newVal !== void 0 && newVal >= props.max) {\n newVal = props.max;\n emit(\"update:modelValue\", newVal);\n }\n if (newVal !== void 0 && newVal <= props.min) {\n newVal = props.min;\n emit(\"update:modelValue\", newVal);\n }\n data.currentValue = newVal;\n data.userInput = null;\n }, { immediate: true });\n onMounted(() => {\n let innerInput = input.value.input;\n innerInput.setAttribute(\"role\", \"spinbutton\");\n innerInput.setAttribute(\"aria-valuemax\", props.max);\n innerInput.setAttribute(\"aria-valuemin\", props.min);\n innerInput.setAttribute(\"aria-valuenow\", data.currentValue);\n innerInput.setAttribute(\"aria-disabled\", inputNumberDisabled.value);\n if (toRawType(props.modelValue) !== \"Number\" && props.modelValue !== void 0) {\n emit(\"update:modelValue\", void 0);\n }\n });\n onUpdated(() => {\n let innerInput = input.value.input;\n innerInput.setAttribute(\"aria-valuenow\", data.currentValue);\n });\n return {\n input,\n displayValue,\n handleInput,\n handleInputChange,\n controlsAtRight,\n decrease,\n increase,\n inputNumberSize,\n inputNumberDisabled,\n maxDisabled,\n minDisabled\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_input = resolveComponent(\"el-input\");\n const _directive_repeat_click = resolveDirective(\"repeat-click\");\n return openBlock(), createBlock(\"div\", {\n class: [\n \"el-input-number\",\n _ctx.inputNumberSize ? \"el-input-number--\" + _ctx.inputNumberSize : \"\",\n { \"is-disabled\": _ctx.inputNumberDisabled },\n { \"is-without-controls\": !_ctx.controls },\n { \"is-controls-right\": _ctx.controlsAtRight }\n ],\n onDragstart: _cache[5] || (_cache[5] = withModifiers(() => {\n }, [\"prevent\"]))\n }, [\n _ctx.controls ? withDirectives((openBlock(), createBlock(\"span\", {\n key: 0,\n class: [\"el-input-number__decrease\", { \"is-disabled\": _ctx.minDisabled }],\n role: \"button\",\n onKeydown: _cache[1] || (_cache[1] = withKeys((...args) => _ctx.decrease && _ctx.decrease(...args), [\"enter\"]))\n }, [\n createVNode(\"i\", {\n class: `el-icon-${_ctx.controlsAtRight ? \"arrow-down\" : \"minus\"}`\n }, null, 2)\n ], 34)), [\n [_directive_repeat_click, _ctx.decrease]\n ]) : createCommentVNode(\"v-if\", true),\n _ctx.controls ? withDirectives((openBlock(), createBlock(\"span\", {\n key: 1,\n class: [\"el-input-number__increase\", { \"is-disabled\": _ctx.maxDisabled }],\n role: \"button\",\n onKeydown: _cache[2] || (_cache[2] = withKeys((...args) => _ctx.increase && _ctx.increase(...args), [\"enter\"]))\n }, [\n createVNode(\"i\", {\n class: `el-icon-${_ctx.controlsAtRight ? \"arrow-up\" : \"plus\"}`\n }, null, 2)\n ], 34)), [\n [_directive_repeat_click, _ctx.increase]\n ]) : createCommentVNode(\"v-if\", true),\n createVNode(_component_el_input, {\n ref: \"input\",\n \"model-value\": _ctx.displayValue,\n placeholder: _ctx.placeholder,\n disabled: _ctx.inputNumberDisabled,\n size: _ctx.inputNumberSize,\n max: _ctx.max,\n min: _ctx.min,\n name: _ctx.name,\n label: _ctx.label,\n onKeydown: [\n withKeys(withModifiers(_ctx.increase, [\"prevent\"]), [\"up\"]),\n withKeys(withModifiers(_ctx.decrease, [\"prevent\"]), [\"down\"])\n ],\n onBlur: _cache[3] || (_cache[3] = (event) => _ctx.$emit(\"blur\", event)),\n onFocus: _cache[4] || (_cache[4] = (event) => _ctx.$emit(\"focus\", event)),\n onInput: _ctx.handleInput,\n onChange: _ctx.handleInputChange\n }, null, 8, [\"model-value\", \"placeholder\", \"disabled\", \"size\", \"max\", \"min\", \"name\", \"label\", \"onKeydown\", \"onInput\", \"onChange\"])\n ], 34);\n}\n\nscript.render = render;\nscript.__file = \"packages/input-number/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _InputNumber = script;\n\nexport default _InputNumber;\n","import { defineComponent, openBlock, createBlock, createCommentVNode, renderSlot } from 'vue';\n\nvar script = defineComponent({\n name: \"ElLink\",\n props: {\n type: {\n type: String,\n default: \"default\",\n validator: (val) => {\n return [\"default\", \"primary\", \"success\", \"warning\", \"info\", \"danger\"].includes(val);\n }\n },\n underline: {\n type: Boolean,\n default: true\n },\n disabled: { type: Boolean, default: false },\n href: { type: String, default: \"\" },\n icon: { type: String, default: \"\" }\n },\n emits: [\"click\"],\n setup(props, { emit }) {\n function handleClick(event) {\n if (!props.disabled) {\n emit(\"click\", event);\n }\n }\n return {\n handleClick\n };\n }\n});\n\nconst _hoisted_1 = {\n key: 1,\n class: \"el-link--inner\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"a\", {\n class: [\n \"el-link\",\n _ctx.type ? `el-link--${_ctx.type}` : \"\",\n _ctx.disabled && \"is-disabled\",\n _ctx.underline && !_ctx.disabled && \"is-underline\"\n ],\n href: _ctx.disabled ? null : _ctx.href,\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))\n }, [\n _ctx.icon ? (openBlock(), createBlock(\"i\", {\n key: 0,\n class: _ctx.icon\n }, null, 2)) : createCommentVNode(\"v-if\", true),\n _ctx.$slots.default ? (openBlock(), createBlock(\"span\", _hoisted_1, [\n renderSlot(_ctx.$slots, \"default\")\n ])) : createCommentVNode(\"v-if\", true),\n _ctx.$slots.icon ? renderSlot(_ctx.$slots, \"icon\", { key: 2 }) : createCommentVNode(\"v-if\", true)\n ], 10, [\"href\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/link/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Link = script;\n\nexport default _Link;\n","import { defineComponent, openBlock, createBlock, renderSlot } from 'vue';\n\nvar script = defineComponent({\n name: \"ElMain\"\n});\n\nconst _hoisted_1 = { class: \"el-main\" };\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"main\", _hoisted_1, [\n renderSlot(_ctx.$slots, \"default\")\n ]);\n}\n\nscript.render = render;\nscript.__file = \"packages/container/src/main.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Main = script;\n\nexport default _Main;\n","import { EVENT_CODE, triggerEvent } from '../aria';\n\nclass SubMenu {\r\n constructor(parent, domNode) {\r\n this.parent = parent;\r\n this.domNode = domNode;\r\n this.subIndex = 0;\r\n this.subIndex = 0;\r\n this.init();\r\n }\r\n init() {\r\n this.subMenuItems = this.domNode.querySelectorAll('li');\r\n this.addListeners();\r\n }\r\n gotoSubIndex(idx) {\r\n if (idx === this.subMenuItems.length) {\r\n idx = 0;\r\n }\r\n else if (idx < 0) {\r\n idx = this.subMenuItems.length - 1;\r\n }\r\n this.subMenuItems[idx].focus();\r\n this.subIndex = idx;\r\n }\r\n addListeners() {\r\n const parentNode = this.parent.domNode;\r\n Array.prototype.forEach.call(this.subMenuItems, (el) => {\r\n el.addEventListener('keydown', (event) => {\r\n let prevDef = false;\r\n switch (event.code) {\r\n case EVENT_CODE.down: {\r\n this.gotoSubIndex(this.subIndex + 1);\r\n prevDef = true;\r\n break;\r\n }\r\n case EVENT_CODE.up: {\r\n this.gotoSubIndex(this.subIndex - 1);\r\n prevDef = true;\r\n break;\r\n }\r\n case EVENT_CODE.tab: {\r\n triggerEvent(parentNode, 'mouseleave');\r\n break;\r\n }\r\n case EVENT_CODE.enter:\r\n case EVENT_CODE.space: {\r\n prevDef = true;\r\n event.currentTarget.click();\r\n break;\r\n }\r\n }\r\n if (prevDef) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n }\r\n return false;\r\n });\r\n });\r\n }\r\n}\n\nexport default SubMenu;\n","import { EVENT_CODE, triggerEvent } from '../aria';\nimport SubMenu from './submenu';\n\nclass MenuItem {\r\n constructor(domNode) {\r\n this.domNode = domNode;\r\n this.submenu = null;\r\n this.submenu = null;\r\n this.init();\r\n }\r\n init() {\r\n this.domNode.setAttribute('tabindex', '0');\r\n const menuChild = this.domNode.querySelector('.el-menu');\r\n if (menuChild) {\r\n this.submenu = new SubMenu(this, menuChild);\r\n }\r\n this.addListeners();\r\n }\r\n addListeners() {\r\n this.domNode.addEventListener('keydown', (event) => {\r\n let prevDef = false;\r\n switch (event.code) {\r\n case EVENT_CODE.down: {\r\n triggerEvent(event.currentTarget, 'mouseenter');\r\n this.submenu && this.submenu.gotoSubIndex(0);\r\n prevDef = true;\r\n break;\r\n }\r\n case EVENT_CODE.up: {\r\n triggerEvent(event.currentTarget, 'mouseenter');\r\n this.submenu && this.submenu.gotoSubIndex(this.submenu.subMenuItems.length - 1);\r\n prevDef = true;\r\n break;\r\n }\r\n case EVENT_CODE.tab: {\r\n triggerEvent(event.currentTarget, 'mouseleave');\r\n break;\r\n }\r\n case EVENT_CODE.enter:\r\n case EVENT_CODE.space: {\r\n prevDef = true;\r\n event.currentTarget.click();\r\n break;\r\n }\r\n }\r\n if (prevDef) {\r\n event.preventDefault();\r\n }\r\n });\r\n }\r\n}\n\nexport default MenuItem;\n","import MenuItem from './menu-item';\n\nclass Menu {\r\n constructor(domNode) {\r\n this.domNode = domNode;\r\n this.init();\r\n }\r\n init() {\r\n const menuChildren = this.domNode.childNodes;\r\n [].filter\r\n .call(menuChildren, (child) => child.nodeType === 1)\r\n .forEach((child) => {\r\n new MenuItem(child);\r\n });\r\n }\r\n}\n\nexport default Menu;\n","import { defineComponent, openBlock, createBlock, Transition, mergeProps, toHandlers, withCtx, renderSlot, computed, ref, getCurrentInstance, watch, provide, onMounted, isRef, resolveComponent } from 'vue';\nimport mitt from 'mitt';\nimport Menubar from '../utils/menu/menu-bar';\nimport { addClass, removeClass, hasClass } from '../utils/dom';\n\nvar script = defineComponent({\n name: \"ElMenuCollapseTransition\",\n setup() {\n return {\n on: {\n beforeEnter(el) {\n el.style.opacity = 0.2;\n },\n enter(el, done) {\n addClass(el, \"el-opacity-transition\");\n el.style.opacity = 1;\n done();\n },\n afterEnter(el) {\n removeClass(el, \"el-opacity-transition\");\n el.style.opacity = \"\";\n },\n beforeLeave(el) {\n if (!el.dataset)\n el.dataset = {};\n if (hasClass(el, \"el-menu--collapse\")) {\n removeClass(el, \"el-menu--collapse\");\n el.dataset.oldOverflow = el.style.overflow;\n el.dataset.scrollWidth = el.clientWidth;\n addClass(el, \"el-menu--collapse\");\n } else {\n addClass(el, \"el-menu--collapse\");\n el.dataset.oldOverflow = el.style.overflow;\n el.dataset.scrollWidth = el.clientWidth;\n removeClass(el, \"el-menu--collapse\");\n }\n el.style.width = el.scrollWidth + \"px\";\n el.style.overflow = \"hidden\";\n },\n leave(el) {\n addClass(el, \"horizontal-collapse-transition\");\n el.style.width = el.dataset.scrollWidth + \"px\";\n }\n }\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(Transition, mergeProps({ mode: \"out-in\" }, toHandlers(_ctx.on)), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n}\n\nscript.render = render;\nscript.__file = \"packages/menu/src/menu-collapse-transition.vue\";\n\nfunction useMenuColor(props) {\n const menuBarColor = computed(() => {\n const color = props.backgroundColor;\n if (!color) {\n return \"\";\n } else {\n return mixColor(color);\n }\n });\n function calcColorChannels(c) {\n let rawColor = c.replace(\"#\", \"\");\n if (/^[0-9a-fA-F]{3}$/.test(rawColor)) {\n const color = rawColor.split(\"\");\n for (let i = 2; i >= 0; i--) {\n color.splice(i, 0, color[i]);\n }\n rawColor = color.join(\"\");\n }\n if (/^[0-9a-fA-F]{6}$/.test(rawColor)) {\n return {\n red: parseInt(rawColor.slice(0, 2), 16),\n green: parseInt(rawColor.slice(2, 4), 16),\n blue: parseInt(rawColor.slice(4, 6), 16)\n };\n } else {\n return {\n red: 255,\n green: 255,\n blue: 255\n };\n }\n }\n function mixColor(color, percent = 0.2) {\n let { red, green, blue } = calcColorChannels(color);\n if (percent > 0) {\n red *= 1 - percent;\n green *= 1 - percent;\n blue *= 1 - percent;\n } else {\n red += (255 - red) * percent;\n green += (255 - green) * percent;\n blue += (255 - blue) * percent;\n }\n return `rgb(${Math.round(red)}, ${Math.round(green)}, ${Math.round(blue)})`;\n }\n return menuBarColor;\n}\n\nvar script$1 = defineComponent({\n name: \"ElMenu\",\n componentName: \"ElMenu\",\n components: {\n ElMenuCollapseTransition: script\n },\n props: {\n mode: {\n type: String,\n default: \"vertical\"\n },\n defaultActive: {\n type: String,\n default: \"\"\n },\n defaultOpeneds: Array,\n uniqueOpened: Boolean,\n router: Boolean,\n menuTrigger: {\n type: String,\n default: \"hover\"\n },\n collapse: Boolean,\n backgroundColor: { type: String },\n textColor: { type: String },\n activeTextColor: { type: String },\n collapseTransition: {\n type: Boolean,\n default: true\n }\n },\n emits: [\"close\", \"open\", \"select\"],\n setup(props, ctx) {\n const openedMenus = ref(props.defaultOpeneds && !props.collapse ? props.defaultOpeneds.slice(0) : []);\n const instance = getCurrentInstance();\n const activeIndex = ref(props.defaultActive);\n const items = ref({});\n const submenus = ref({});\n const alteredCollapse = ref(false);\n const rootMenuEmitter = mitt();\n const router = instance.appContext.config.globalProperties.$router;\n const hoverBackground = useMenuColor(props);\n const isMenuPopup = computed(() => {\n return props.mode === \"horizontal\" || props.mode === \"vertical\" && props.collapse;\n });\n const initializeMenu = () => {\n const index = activeIndex.value;\n const activeItem = items.value[index];\n if (!activeItem || props.mode === \"horizontal\" || props.collapse)\n return;\n let indexPath = activeItem.indexPath;\n indexPath.forEach((index2) => {\n let submenu = submenus.value[index2];\n submenu && openMenu(index2, submenu == null ? void 0 : submenu.indexPath);\n });\n };\n const addSubMenu = (item) => {\n submenus.value[item.index] = item;\n };\n const removeSubMenu = (item) => {\n delete submenus.value[item.index];\n };\n const addMenuItem = (item) => {\n items.value[item.index] = item;\n };\n const removeMenuItem = (item) => {\n delete items.value[item.index];\n };\n const openMenu = (index, indexPath) => {\n if (openedMenus.value.includes(index))\n return;\n if (props.uniqueOpened) {\n openedMenus.value = openedMenus.value.filter((index2) => {\n return (isRef(indexPath) ? indexPath.value : indexPath).indexOf(index2) !== -1;\n });\n }\n openedMenus.value.push(index);\n };\n const closeMenu = (index) => {\n const i = openedMenus.value.indexOf(index);\n if (i !== -1) {\n openedMenus.value.splice(i, 1);\n }\n };\n const open = (index) => {\n const { indexPath } = submenus.value[index.toString()];\n indexPath.forEach((i) => openMenu(i, indexPath));\n };\n const close = (index) => {\n closeMenu(index);\n };\n const handleSubmenuClick = (submenu) => {\n const { index, indexPath } = submenu;\n let isOpened = openedMenus.value.includes(index);\n if (isOpened) {\n closeMenu(index);\n ctx.emit(\"close\", index, indexPath.value);\n } else {\n openMenu(index, indexPath);\n ctx.emit(\"open\", index, indexPath.value);\n }\n };\n const handleItemClick = (item) => {\n const { index, indexPath } = item;\n const hasIndex = item.index !== null;\n const emitParams = [index, indexPath.value, item];\n if (props.mode === \"horizontal\" || props.collapse) {\n openedMenus.value = [];\n }\n if (!hasIndex) {\n return;\n }\n if (props.router && router) {\n let route = item.route || item.index;\n const routerResult = router.push(route).then((navigationResult) => {\n if (!navigationResult) {\n activeIndex.value = item.index;\n }\n return navigationResult;\n });\n ctx.emit(\"select\", ...emitParams.concat(routerResult));\n } else {\n activeIndex.value = item.index;\n ctx.emit(\"select\", ...emitParams);\n }\n };\n const updateActiveIndex = (val) => {\n const itemsInData = items.value;\n const item = itemsInData[val] || itemsInData[activeIndex.value] || itemsInData[props.defaultActive];\n if (item) {\n activeIndex.value = item.index;\n initializeMenu();\n } else {\n if (!alteredCollapse.value) {\n activeIndex.value = null;\n } else {\n alteredCollapse.value = false;\n }\n }\n };\n watch(() => props.defaultActive, (currentActive) => {\n if (!items.value[currentActive]) {\n activeIndex.value = \"\";\n }\n updateActiveIndex(currentActive);\n });\n watch(items.value, () => {\n updateActiveIndex();\n });\n watch(() => props.collapse, (value, prev) => {\n if (value !== prev) {\n alteredCollapse.value = true;\n }\n if (value)\n openedMenus.value = [];\n rootMenuEmitter.emit(\"rootMenu:toggle-collapse\", Boolean(props.collapse));\n });\n provide(\"rootMenu\", {\n props,\n openedMenus,\n items,\n submenus,\n hoverBackground,\n activeIndex,\n isMenuPopup,\n methods: {\n addMenuItem,\n removeMenuItem,\n addSubMenu,\n removeSubMenu,\n openMenu,\n closeMenu\n },\n rootMenuEmit: rootMenuEmitter.emit,\n rootMenuOn: rootMenuEmitter.on\n });\n provide(`subMenu:${instance.uid}`, {\n addSubMenu,\n removeSubMenu\n });\n onMounted(() => {\n initializeMenu();\n rootMenuEmitter.on(\"menuItem:item-click\", handleItemClick);\n rootMenuEmitter.on(\"submenu:submenu-click\", handleSubmenuClick);\n if (props.mode === \"horizontal\") {\n new Menubar(instance.vnode.el);\n }\n });\n return {\n hoverBackground,\n isMenuPopup,\n props,\n open,\n close\n };\n }\n});\n\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_menu_collapse_transition = resolveComponent(\"el-menu-collapse-transition\");\n return _ctx.props.collapseTransition ? (openBlock(), createBlock(_component_el_menu_collapse_transition, { key: 0 }, {\n default: withCtx(() => [\n (openBlock(), createBlock(\"ul\", {\n key: +_ctx.props.collapse,\n role: \"menubar\",\n style: { backgroundColor: _ctx.props.backgroundColor || \"\" },\n class: {\n \"el-menu\": true,\n \"el-menu--horizontal\": _ctx.mode === \"horizontal\",\n \"el-menu--collapse\": _ctx.props.collapse\n }\n }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 6))\n ]),\n _: 3\n })) : (openBlock(), createBlock(\"ul\", {\n key: +_ctx.props.collapse,\n role: \"menubar\",\n style: { backgroundColor: _ctx.props.backgroundColor || \"\" },\n class: {\n \"el-menu\": true,\n \"el-menu--horizontal\": _ctx.mode === \"horizontal\",\n \"el-menu--collapse\": _ctx.props.collapse\n }\n }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 6));\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"packages/menu/src/menu.vue\";\n\nscript$1.install = (app) => {\n app.component(script$1.name, script$1);\n};\nconst _Menu = script$1;\n\nexport default _Menu;\n","import { defineComponent, ref, h, cloneVNode } from 'vue';\nimport ElPopper, { defaultProps } from '../el-popper';\nimport { UPDATE_MODEL_EVENT } from '../utils/constants';\nimport throwError from '../utils/error';\nimport { getFirstValidNode } from '../utils/vnode';\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar Tooltip = defineComponent({\n name: \"ElTooltip\",\n components: {\n ElPopper\n },\n props: __spreadProps(__spreadValues({}, defaultProps), {\n manual: {\n type: Boolean,\n default: false\n },\n modelValue: {\n type: Boolean,\n validator: (val) => {\n return typeof val === \"boolean\";\n },\n default: void 0\n },\n openDelay: {\n type: Number,\n default: 0\n },\n visibleArrow: {\n type: Boolean,\n default: true\n },\n tabindex: {\n type: [String, Number],\n default: \"0\"\n }\n }),\n emits: [UPDATE_MODEL_EVENT],\n setup(props, ctx) {\n if (props.manual && typeof props.modelValue === \"undefined\") {\n throwError(\"[ElTooltip]\", \"You need to pass a v-model to el-tooltip when `manual` is true\");\n }\n const popper = ref(null);\n const onUpdateVisible = (val) => {\n ctx.emit(UPDATE_MODEL_EVENT, val);\n };\n const updatePopper = () => {\n return popper.value.update();\n };\n return {\n popper,\n onUpdateVisible,\n updatePopper\n };\n },\n render() {\n const {\n $slots,\n content,\n manual,\n openDelay,\n onUpdateVisible,\n showAfter,\n visibleArrow,\n modelValue,\n tabindex\n } = this;\n const throwErrorTip = () => {\n throwError(\"[ElTooltip]\", \"you need to provide a valid default slot.\");\n };\n const popper = h(ElPopper, __spreadProps(__spreadValues({}, Object.keys(defaultProps).reduce((result, key) => {\n return __spreadProps(__spreadValues({}, result), { [key]: this[key] });\n }, {})), {\n ref: \"popper\",\n manualMode: manual,\n showAfter: openDelay || showAfter,\n showArrow: visibleArrow,\n visible: modelValue,\n \"onUpdate:visible\": onUpdateVisible\n }), {\n default: () => $slots.content ? $slots.content() : content,\n trigger: () => {\n if ($slots.default) {\n const firstVnode = getFirstValidNode($slots.default(), 1);\n if (!firstVnode)\n throwErrorTip();\n return cloneVNode(firstVnode, { tabindex }, true);\n }\n throwErrorTip();\n }\n });\n return popper;\n }\n});\n\nTooltip.install = (app) => {\n app.component(Tooltip.name, Tooltip);\n};\nconst _Tooltip = Tooltip;\n\nexport default _Tooltip;\n","import { inject, computed, defineComponent, getCurrentInstance, onMounted, onBeforeUnmount, resolveComponent, openBlock, createBlock, withCtx, renderSlot, createVNode, Fragment } from 'vue';\nimport ElTooltip from '../el-tooltip';\n\nfunction useMenu(instance, currentIndex) {\n const rootMenu = inject(\"rootMenu\");\n const indexPath = computed(() => {\n let parent = instance.parent;\n const path = [currentIndex];\n while (parent.type.name !== \"ElMenu\") {\n if (parent.props.index) {\n path.unshift(parent.props.index);\n }\n parent = parent.parent;\n }\n return path;\n });\n const parentMenu = computed(() => {\n let parent = instance.parent;\n while (parent && [\"ElMenu\", \"ElSubmenu\"].indexOf(parent.type.name) === -1) {\n parent = parent.parent;\n }\n return parent;\n });\n const paddingStyle = computed(() => {\n let parent = instance.parent;\n if (rootMenu.props.mode !== \"vertical\")\n return {};\n let padding = 20;\n if (rootMenu.props.collapse) {\n padding = 20;\n } else {\n while (parent && parent.type.name !== \"ElMenu\") {\n if (parent.type.name === \"ElSubmenu\") {\n padding += 20;\n }\n parent = parent.parent;\n }\n }\n return { paddingLeft: padding + \"px\" };\n });\n return { parentMenu, paddingStyle, indexPath };\n}\n\nvar script = defineComponent({\n name: \"ElMenuItem\",\n componentName: \"ElMenuItem\",\n components: { ElTooltip },\n props: {\n index: {\n default: null,\n validator: (val) => typeof val === \"string\" || val === null\n },\n route: [String, Object],\n disabled: Boolean\n },\n emits: [\"click\"],\n setup(props, { emit, slots }) {\n const instance = getCurrentInstance();\n const rootMenu = inject(\"rootMenu\");\n const { parentMenu, paddingStyle, indexPath } = useMenu(instance, props.index);\n const { addSubMenu, removeSubMenu } = inject(`subMenu:${parentMenu.value.uid}`);\n const active = computed(() => {\n return props.index === rootMenu.activeIndex.value;\n });\n const hoverBackground = computed(() => {\n return rootMenu.hoverBackground.value;\n });\n const backgroundColor = computed(() => {\n return rootMenu.props.backgroundColor || \"\";\n });\n const activeTextColor = computed(() => {\n return rootMenu.props.activeTextColor || \"\";\n });\n const textColor = computed(() => {\n return rootMenu.props.textColor || \"\";\n });\n const mode = computed(() => {\n return rootMenu.props.mode;\n });\n const isNested = computed(() => {\n return parentMenu.value.type.name !== \"ElMenu\";\n });\n const itemStyle = computed(() => {\n const style = {\n color: active.value ? activeTextColor.value : textColor.value,\n borderBottomColor: \"\"\n };\n if (mode.value === \"horizontal\" && !isNested.value) {\n style.borderBottomColor = active.value ? rootMenu.props.activeTextColor ? activeTextColor.value : \"\" : \"transparent\";\n }\n return style;\n });\n const onMouseEnter = () => {\n if (mode.value === \"horizontal\" && !rootMenu.props.backgroundColor)\n return;\n instance.vnode.el.style.backgroundColor = hoverBackground.value;\n };\n const onMouseLeave = () => {\n if (mode.value === \"horizontal\" && !rootMenu.props.backgroundColor)\n return;\n instance.vnode.el.style.backgroundColor = backgroundColor.value;\n };\n const handleClick = () => {\n if (!props.disabled) {\n rootMenu.rootMenuEmit(\"menuItem:item-click\", {\n index: props.index,\n indexPath,\n route: props.route\n });\n emit(\"click\", {\n index: props.index,\n indexPath: indexPath.value\n });\n }\n };\n onMounted(() => {\n addSubMenu({ index: props.index, indexPath, active });\n rootMenu.methods.addMenuItem({ index: props.index, indexPath, active });\n });\n onBeforeUnmount(() => {\n removeSubMenu({ index: props.index, indexPath, active });\n rootMenu.methods.removeMenuItem({ index: props.index, indexPath, active });\n });\n return {\n parentMenu,\n rootMenu,\n slots,\n paddingStyle,\n itemStyle,\n backgroundColor,\n active,\n handleClick,\n onMouseEnter,\n onMouseLeave\n };\n }\n});\n\nconst _hoisted_1 = { style: { \"position\": \"absolute\", \"left\": \"0\", \"top\": \"0\", \"height\": \"100%\", \"width\": \"100%\", \"display\": \"inline-block\", \"box-sizing\": \"border-box\", \"padding\": \"0 20px\" } };\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_tooltip = resolveComponent(\"el-tooltip\");\n return openBlock(), createBlock(\"li\", {\n class: [\"el-menu-item\", {\n \"is-active\": _ctx.active,\n \"is-disabled\": _ctx.disabled\n }],\n role: \"menuitem\",\n tabindex: \"-1\",\n style: [_ctx.paddingStyle, _ctx.itemStyle, { backgroundColor: _ctx.backgroundColor }],\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),\n onMouseenter: _cache[2] || (_cache[2] = (...args) => _ctx.onMouseEnter && _ctx.onMouseEnter(...args)),\n onFocus: _cache[3] || (_cache[3] = (...args) => _ctx.onMouseEnter && _ctx.onMouseEnter(...args)),\n onBlur: _cache[4] || (_cache[4] = (...args) => _ctx.onMouseLeave && _ctx.onMouseLeave(...args)),\n onMouseleave: _cache[5] || (_cache[5] = (...args) => _ctx.onMouseLeave && _ctx.onMouseLeave(...args))\n }, [\n _ctx.parentMenu.type.name === \"ElMenu\" && _ctx.rootMenu.props.collapse && _ctx.slots.title ? (openBlock(), createBlock(_component_el_tooltip, {\n key: 0,\n effect: \"dark\",\n placement: \"right\"\n }, {\n content: withCtx(() => [\n renderSlot(_ctx.$slots, \"title\")\n ]),\n default: withCtx(() => [\n createVNode(\"div\", _hoisted_1, [\n renderSlot(_ctx.$slots, \"default\")\n ])\n ]),\n _: 3\n })) : (openBlock(), createBlock(Fragment, { key: 1 }, [\n renderSlot(_ctx.$slots, \"default\"),\n renderSlot(_ctx.$slots, \"title\")\n ], 64))\n ], 38);\n}\n\nscript.render = render;\nscript.__file = \"packages/menu/src/menuItem.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _MenuItem = script;\n\nexport default _MenuItem;\n","import { defineComponent, reactive, getCurrentInstance, computed, inject, openBlock, createBlock, createVNode, Fragment, createTextVNode, toDisplayString, renderSlot } from 'vue';\n\nvar script = defineComponent({\n name: \"ElMenuItemGroup\",\n componentName: \"ElMenuItemGroup\",\n props: {\n title: {\n type: String\n }\n },\n setup(props, { slots }) {\n const data = reactive({\n paddingLeft: 20\n });\n const instance = getCurrentInstance();\n const levelPadding = computed(() => {\n let padding = 20;\n let parent = instance.parent;\n if (rootProps.collapse)\n return 20;\n while (parent && parent.type.name !== \"ElMenu\") {\n if (parent.type.name === \"ElSubmenu\") {\n padding += 20;\n }\n parent = parent.parent;\n }\n return padding;\n });\n const { props: rootProps } = inject(\"rootMenu\");\n return {\n data,\n levelPadding,\n props,\n slots\n };\n }\n});\n\nconst _hoisted_1 = { class: \"el-menu-item-group\" };\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"li\", _hoisted_1, [\n createVNode(\"div\", {\n class: \"el-menu-item-group__title\",\n style: { paddingLeft: _ctx.levelPadding + \"px\" }\n }, [\n !_ctx.slots.title ? (openBlock(), createBlock(Fragment, { key: 0 }, [\n createTextVNode(toDisplayString(_ctx.title), 1)\n ], 2112)) : renderSlot(_ctx.$slots, \"title\", { key: 1 })\n ], 4),\n createVNode(\"ul\", null, [\n renderSlot(_ctx.$slots, \"default\")\n ])\n ]);\n}\n\nscript.render = render;\nscript.__file = \"packages/menu/src/menuItemGroup.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _MenuItemGroup = script;\n\nexport default _MenuItemGroup;\n","import { inject, computed, getCurrentInstance, watch, onBeforeUnmount, defineComponent, reactive, toRefs, withDirectives, openBlock, createBlock, withModifiers, renderSlot, createVNode, toDisplayString, vShow, ref, onMounted, nextTick, provide, resolveComponent, resolveDirective, withCtx, createCommentVNode, Transition, Fragment, renderList, withKeys, vModelText, createSlots } from 'vue';\nimport ElInput from '../el-input';\nimport { getValueByPath, escapeRegexpString, useGlobalConfig, isIE, isEdge } from '../utils/util';\nimport { addResizeListener, removeResizeListener } from '../utils/resize-event';\nimport ElTag from '../el-tag';\nimport ElPopper from '../el-popper';\nimport ElScrollbar from '../el-scrollbar';\nimport { ClickOutside } from '../directives';\nimport { useLocaleInject, useFocus } from '../hooks';\nimport { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../utils/constants';\nimport { isValidComponentSize } from '../utils/validators';\nimport mitt from 'mitt';\nimport { EVENT_CODE } from '../utils/aria';\nimport isServer from '../utils/isServer';\nimport scrollIntoView from '../utils/scroll-into-view';\nimport lodashDebounce from 'lodash/debounce';\nimport { isKorean } from '../utils/isDef';\nimport { elFormKey, elFormItemKey } from '../el-form';\nimport isEqual from 'lodash/isEqual';\n\nconst selectGroupKey = \"ElSelectGroup\";\nconst selectKey = \"ElSelect\";\nconst selectEvents = {\n queryChange: \"elOptionQueryChange\",\n groupQueryChange: \"elOptionGroupQueryChange\"\n};\n\nfunction useOption(props, states) {\n const select = inject(selectKey);\n const selectGroup = inject(selectGroupKey, { disabled: false });\n const isObject = computed(() => {\n return Object.prototype.toString.call(props.value).toLowerCase() === \"[object object]\";\n });\n const itemSelected = computed(() => {\n if (!select.props.multiple) {\n return isEqual(props.value, select.props.modelValue);\n } else {\n return contains(select.props.modelValue, props.value);\n }\n });\n const limitReached = computed(() => {\n if (select.props.multiple) {\n const modelValue = select.props.modelValue || [];\n return !itemSelected.value && modelValue.length >= select.props.multipleLimit && select.props.multipleLimit > 0;\n } else {\n return false;\n }\n });\n const currentLabel = computed(() => {\n return props.label || (isObject.value ? \"\" : props.value);\n });\n const currentValue = computed(() => {\n return props.value || props.label || \"\";\n });\n const isDisabled = computed(() => {\n return props.disabled || states.groupDisabled || limitReached.value;\n });\n const instance = getCurrentInstance();\n const contains = (arr = [], target) => {\n if (!isObject.value) {\n return arr && arr.indexOf(target) > -1;\n } else {\n const valueKey = select.props.valueKey;\n return arr && arr.some((item) => {\n return getValueByPath(item, valueKey) === getValueByPath(target, valueKey);\n });\n }\n };\n const isEqual = (a, b) => {\n if (!isObject.value) {\n return a === b;\n } else {\n const { valueKey } = select.props;\n return getValueByPath(a, valueKey) === getValueByPath(b, valueKey);\n }\n };\n const hoverItem = () => {\n if (!props.disabled && !selectGroup.disabled) {\n select.hoverIndex = select.optionsArray.indexOf(instance);\n }\n };\n const queryChange = (query) => {\n if (!query) {\n states.visible = !props.created;\n } else {\n const regexp = new RegExp(escapeRegexpString(query), \"i\");\n states.visible = regexp.test(currentLabel.value);\n if (!states.visible && !props.created) {\n select.filteredOptionsCount--;\n }\n }\n };\n watch(() => currentLabel.value, () => {\n if (!props.created && !select.props.remote)\n select.setSelected();\n });\n watch(() => props.value, (val, oldVal) => {\n const { remote, valueKey } = select.props;\n if (!props.created && !remote) {\n if (valueKey && typeof val === \"object\" && typeof oldVal === \"object\" && val[valueKey] === oldVal[valueKey]) {\n return;\n }\n select.setSelected();\n }\n });\n watch(() => selectGroup.disabled, () => {\n states.groupDisabled = selectGroup.disabled;\n }, { immediate: true });\n select.selectEmitter.on(selectEvents.queryChange, queryChange);\n onBeforeUnmount(() => {\n select.selectEmitter.off(selectEvents.queryChange, queryChange);\n });\n return {\n select,\n currentLabel,\n currentValue,\n itemSelected,\n isDisabled,\n hoverItem\n };\n}\n\nvar script = defineComponent({\n name: \"ElOption\",\n componentName: \"ElOption\",\n props: {\n value: {\n required: true,\n type: [String, Number, Boolean, Object]\n },\n label: [String, Number],\n created: Boolean,\n disabled: {\n type: Boolean,\n default: false\n }\n },\n setup(props) {\n const states = reactive({\n index: -1,\n groupDisabled: false,\n visible: true,\n hitState: false,\n hover: false\n });\n const {\n currentLabel,\n itemSelected,\n isDisabled,\n select,\n hoverItem\n } = useOption(props, states);\n const {\n visible,\n hover\n } = toRefs(states);\n const vm = getCurrentInstance().proxy;\n select.onOptionCreate(vm);\n onBeforeUnmount(() => {\n const { selected } = select;\n let selectedOptions = select.props.multiple ? selected : [selected];\n const doesExist = select.cachedOptions.has(props.value);\n const doesSelected = selectedOptions.some((item) => {\n return item.value === vm.value;\n });\n if (doesExist && !doesSelected) {\n select.cachedOptions.delete(props.value);\n }\n select.onOptionDestroy(props.value);\n });\n function selectOptionClick() {\n if (props.disabled !== true && states.groupDisabled !== true) {\n select.handleOptionSelect(vm, true);\n }\n }\n return {\n currentLabel,\n itemSelected,\n isDisabled,\n select,\n hoverItem,\n visible,\n hover,\n selectOptionClick\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return withDirectives((openBlock(), createBlock(\"li\", {\n class: [\"el-select-dropdown__item\", {\n \"selected\": _ctx.itemSelected,\n \"is-disabled\": _ctx.isDisabled,\n \"hover\": _ctx.hover\n }],\n onMouseenter: _cache[1] || (_cache[1] = (...args) => _ctx.hoverItem && _ctx.hoverItem(...args)),\n onClick: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.selectOptionClick && _ctx.selectOptionClick(...args), [\"stop\"]))\n }, [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n createVNode(\"span\", null, toDisplayString(_ctx.currentLabel), 1)\n ])\n ], 34)), [\n [vShow, _ctx.visible]\n ]);\n}\n\nscript.render = render;\nscript.__file = \"packages/select/src/option.vue\";\n\nvar script$1 = defineComponent({\n name: \"ElSelectDropdown\",\n componentName: \"ElSelectDropdown\",\n setup() {\n const select = inject(selectKey);\n const popperClass = computed(() => select.props.popperClass);\n const isMultiple = computed(() => select.props.multiple);\n const minWidth = ref(\"\");\n function updateMinWidth() {\n var _a;\n minWidth.value = ((_a = select.selectWrapper) == null ? void 0 : _a.getBoundingClientRect().width) + \"px\";\n }\n onMounted(() => {\n addResizeListener(select.selectWrapper, updateMinWidth);\n });\n onBeforeUnmount(() => {\n removeResizeListener(select.selectWrapper, updateMinWidth);\n });\n return {\n minWidth,\n popperClass,\n isMultiple\n };\n }\n});\n\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", {\n class: [\"el-select-dropdown\", [{ \"is-multiple\": _ctx.isMultiple }, _ctx.popperClass]],\n style: { minWidth: _ctx.minWidth }\n }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 6);\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"packages/select/src/select-dropdown.vue\";\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst isObject = (val) => val !== null && typeof val === 'object';\r\nconst objectToString = Object.prototype.toString;\r\nconst toTypeString = (value) => objectToString.call(value);\r\nconst toRawType = (value) => {\r\n // extract \"RawType\" from strings like \"[object RawType]\"\r\n return toTypeString(value).slice(8, -1);\r\n};\n\nfunction useSelectStates(props) {\n const { t } = useLocaleInject();\n const selectEmitter = mitt();\n return reactive({\n options: new Map(),\n cachedOptions: new Map(),\n createdLabel: null,\n createdSelected: false,\n selected: props.multiple ? [] : {},\n inputLength: 20,\n inputWidth: 0,\n initialInputHeight: 0,\n optionsCount: 0,\n filteredOptionsCount: 0,\n visible: false,\n softFocus: false,\n selectedLabel: \"\",\n hoverIndex: -1,\n query: \"\",\n previousQuery: null,\n inputHovering: false,\n cachedPlaceHolder: \"\",\n currentPlaceholder: t(\"el.select.placeholder\"),\n menuVisibleOnFocus: false,\n isOnComposition: false,\n isSilentBlur: false,\n selectEmitter,\n prefixWidth: null,\n tagInMultiLine: false\n });\n}\nconst useSelect = (props, states, ctx) => {\n const ELEMENT = useGlobalConfig();\n const { t } = useLocaleInject();\n const reference = ref(null);\n const input = ref(null);\n const popper = ref(null);\n const tags = ref(null);\n const selectWrapper = ref(null);\n const scrollbar = ref(null);\n const hoverOption = ref(-1);\n const elForm = inject(elFormKey, {});\n const elFormItem = inject(elFormItemKey, {});\n const readonly = computed(() => !props.filterable || props.multiple || !isIE() && !isEdge() && !states.visible);\n const selectDisabled = computed(() => props.disabled || elForm.disabled);\n const showClose = computed(() => {\n const hasValue = props.multiple ? Array.isArray(props.modelValue) && props.modelValue.length > 0 : props.modelValue !== void 0 && props.modelValue !== null && props.modelValue !== \"\";\n const criteria = props.clearable && !selectDisabled.value && states.inputHovering && hasValue;\n return criteria;\n });\n const iconClass = computed(() => props.remote && props.filterable ? \"\" : states.visible ? \"arrow-up is-reverse\" : \"arrow-up\");\n const debounce = computed(() => props.remote ? 300 : 0);\n const emptyText = computed(() => {\n if (props.loading) {\n return props.loadingText || t(\"el.select.loading\");\n } else {\n if (props.remote && states.query === \"\" && states.options.size === 0)\n return false;\n if (props.filterable && states.query && states.options.size > 0 && states.filteredOptionsCount === 0) {\n return props.noMatchText || t(\"el.select.noMatch\");\n }\n if (states.options.size === 0) {\n return props.noDataText || t(\"el.select.noData\");\n }\n }\n return null;\n });\n const optionsArray = computed(() => Array.from(states.options.values()));\n const cachedOptionsArray = computed(() => Array.from(states.cachedOptions.values()));\n const showNewOption = computed(() => {\n const hasExistingOption = optionsArray.value.filter((option) => {\n return !option.created;\n }).some((option) => {\n return option.currentLabel === states.query;\n });\n return props.filterable && props.allowCreate && states.query !== \"\" && !hasExistingOption;\n });\n const selectSize = computed(() => props.size || elFormItem.size || ELEMENT.size);\n const collapseTagSize = computed(() => [\"small\", \"mini\"].indexOf(selectSize.value) > -1 ? \"mini\" : \"small\");\n const dropMenuVisible = computed(() => states.visible && emptyText.value !== false);\n watch(() => selectDisabled.value, () => {\n nextTick(() => {\n resetInputHeight();\n });\n });\n watch(() => props.placeholder, (val) => {\n states.cachedPlaceHolder = states.currentPlaceholder = val;\n });\n watch(() => props.modelValue, (val, oldVal) => {\n var _a;\n if (props.multiple) {\n resetInputHeight();\n if (val && val.length > 0 || input.value && states.query !== \"\") {\n states.currentPlaceholder = \"\";\n } else {\n states.currentPlaceholder = states.cachedPlaceHolder;\n }\n if (props.filterable && !props.reserveKeyword) {\n states.query = \"\";\n handleQueryChange(states.query);\n }\n }\n setSelected();\n if (props.filterable && !props.multiple) {\n states.inputLength = 20;\n }\n if (!isEqual(val, oldVal)) {\n (_a = elFormItem.formItemMitt) == null ? void 0 : _a.emit(\"el.form.change\", val);\n }\n }, {\n flush: \"post\",\n deep: true\n });\n watch(() => states.visible, (val) => {\n var _a, _b;\n if (!val) {\n input.value && input.value.blur();\n states.query = \"\";\n states.previousQuery = null;\n states.selectedLabel = \"\";\n states.inputLength = 20;\n states.menuVisibleOnFocus = false;\n resetHoverIndex();\n nextTick(() => {\n if (input.value && input.value.value === \"\" && states.selected.length === 0) {\n states.currentPlaceholder = states.cachedPlaceHolder;\n }\n });\n if (!props.multiple) {\n if (states.selected) {\n if (props.filterable && props.allowCreate && states.createdSelected && states.createdLabel) {\n states.selectedLabel = states.createdLabel;\n } else {\n states.selectedLabel = states.selected.currentLabel;\n }\n if (props.filterable)\n states.query = states.selectedLabel;\n }\n if (props.filterable) {\n states.currentPlaceholder = states.cachedPlaceHolder;\n }\n }\n } else {\n (_b = (_a = popper.value) == null ? void 0 : _a.update) == null ? void 0 : _b.call(_a);\n if (props.filterable) {\n states.filteredOptionsCount = states.optionsCount;\n states.query = props.remote ? \"\" : states.selectedLabel;\n if (props.multiple) {\n input.value.focus();\n } else {\n if (states.selectedLabel) {\n states.currentPlaceholder = states.selectedLabel;\n states.selectedLabel = \"\";\n }\n }\n handleQueryChange(states.query);\n if (!props.multiple && !props.remote) {\n states.selectEmitter.emit(\"elOptionQueryChange\", \"\");\n states.selectEmitter.emit(\"elOptionGroupQueryChange\");\n }\n }\n }\n ctx.emit(\"visible-change\", val);\n });\n watch(() => states.options.entries(), () => {\n var _a, _b, _c;\n if (isServer)\n return;\n (_b = (_a = popper.value) == null ? void 0 : _a.update) == null ? void 0 : _b.call(_a);\n if (props.multiple) {\n resetInputHeight();\n }\n const inputs = ((_c = selectWrapper.value) == null ? void 0 : _c.querySelectorAll(\"input\")) || [];\n if ([].indexOf.call(inputs, document.activeElement) === -1) {\n setSelected();\n }\n if (props.defaultFirstOption && (props.filterable || props.remote) && states.filteredOptionsCount) {\n checkDefaultFirstOption();\n }\n }, {\n flush: \"post\"\n });\n watch(() => states.hoverIndex, (val) => {\n if (typeof val === \"number\" && val > -1) {\n hoverOption.value = optionsArray.value[val] || {};\n }\n optionsArray.value.forEach((option) => {\n option.hover = hoverOption.value === option;\n });\n });\n const resetInputHeight = () => {\n if (props.collapseTags && !props.filterable)\n return;\n nextTick(() => {\n var _a, _b;\n if (!reference.value)\n return;\n const inputChildNodes = reference.value.$el.childNodes;\n const input2 = [].filter.call(inputChildNodes, (item) => item.tagName === \"INPUT\")[0];\n const _tags = tags.value;\n const sizeInMap = states.initialInputHeight || 40;\n input2.style.height = states.selected.length === 0 ? sizeInMap + \"px\" : Math.max(_tags ? _tags.clientHeight + (_tags.clientHeight > sizeInMap ? 6 : 0) : 0, sizeInMap) + \"px\";\n states.tagInMultiLine = parseFloat(input2.style.height) > sizeInMap;\n if (states.visible && emptyText.value !== false) {\n (_b = (_a = popper.value) == null ? void 0 : _a.update) == null ? void 0 : _b.call(_a);\n }\n });\n };\n const handleQueryChange = (val) => {\n if (states.previousQuery === val || states.isOnComposition)\n return;\n if (states.previousQuery === null && (typeof props.filterMethod === \"function\" || typeof props.remoteMethod === \"function\")) {\n states.previousQuery = val;\n return;\n }\n states.previousQuery = val;\n nextTick(() => {\n var _a, _b;\n if (states.visible)\n (_b = (_a = popper.value) == null ? void 0 : _a.update) == null ? void 0 : _b.call(_a);\n });\n states.hoverIndex = -1;\n if (props.multiple && props.filterable) {\n nextTick(() => {\n const length = input.value.length * 15 + 20;\n states.inputLength = props.collapseTags ? Math.min(50, length) : length;\n managePlaceholder();\n resetInputHeight();\n });\n }\n if (props.remote && typeof props.remoteMethod === \"function\") {\n states.hoverIndex = -1;\n props.remoteMethod(val);\n } else if (typeof props.filterMethod === \"function\") {\n props.filterMethod(val);\n states.selectEmitter.emit(\"elOptionGroupQueryChange\");\n } else {\n states.filteredOptionsCount = states.optionsCount;\n states.selectEmitter.emit(\"elOptionQueryChange\", val);\n states.selectEmitter.emit(\"elOptionGroupQueryChange\");\n }\n if (props.defaultFirstOption && (props.filterable || props.remote) && states.filteredOptionsCount) {\n checkDefaultFirstOption();\n }\n };\n const managePlaceholder = () => {\n if (states.currentPlaceholder !== \"\") {\n states.currentPlaceholder = input.value.value ? \"\" : states.cachedPlaceHolder;\n }\n };\n const checkDefaultFirstOption = () => {\n const optionsInDropdown = optionsArray.value.filter((n) => n.visible && !n.disabled && !n.groupDisabled);\n const userCreatedOption = optionsInDropdown.filter((n) => n.created)[0];\n const firstOriginOption = optionsInDropdown[0];\n states.hoverIndex = getValueIndex(optionsArray.value, userCreatedOption || firstOriginOption);\n };\n const setSelected = () => {\n var _a;\n if (!props.multiple) {\n const option = getOption(props.modelValue);\n if ((_a = option.props) == null ? void 0 : _a.created) {\n states.createdLabel = option.props.value;\n states.createdSelected = true;\n } else {\n states.createdSelected = false;\n }\n states.selectedLabel = option.currentLabel;\n states.selected = option;\n if (props.filterable)\n states.query = states.selectedLabel;\n return;\n }\n const result = [];\n if (Array.isArray(props.modelValue)) {\n props.modelValue.forEach((value) => {\n result.push(getOption(value));\n });\n }\n states.selected = result;\n nextTick(() => {\n resetInputHeight();\n });\n };\n const getOption = (value) => {\n let option;\n const isObjectValue = toRawType(value).toLowerCase() === \"object\";\n const isNull = toRawType(value).toLowerCase() === \"null\";\n const isUndefined = toRawType(value).toLowerCase() === \"undefined\";\n for (let i = states.cachedOptions.size - 1; i >= 0; i--) {\n const cachedOption = cachedOptionsArray.value[i];\n const isEqualValue = isObjectValue ? getValueByPath(cachedOption.value, props.valueKey) === getValueByPath(value, props.valueKey) : cachedOption.value === value;\n if (isEqualValue) {\n option = {\n value,\n currentLabel: cachedOption.currentLabel,\n isDisabled: cachedOption.isDisabled\n };\n break;\n }\n }\n if (option)\n return option;\n const label = !isObjectValue && !isNull && !isUndefined ? value : \"\";\n const newOption = {\n value,\n currentLabel: label\n };\n if (props.multiple) {\n newOption.hitState = false;\n }\n return newOption;\n };\n const resetHoverIndex = () => {\n setTimeout(() => {\n const valueKey = props.valueKey;\n if (!props.multiple) {\n states.hoverIndex = optionsArray.value.findIndex((item) => {\n return getValueByPath(item, valueKey) === getValueByPath(states.selected, valueKey);\n });\n } else {\n if (states.selected.length > 0) {\n states.hoverIndex = Math.min.apply(null, states.selected.map((selected) => {\n return optionsArray.value.findIndex((item) => {\n return getValueByPath(item, valueKey) === getValueByPath(selected, valueKey);\n });\n }));\n } else {\n states.hoverIndex = -1;\n }\n }\n }, 300);\n };\n const handleResize = () => {\n var _a, _b;\n resetInputWidth();\n (_b = (_a = popper.value) == null ? void 0 : _a.update) == null ? void 0 : _b.call(_a);\n if (props.multiple)\n resetInputHeight();\n };\n const resetInputWidth = () => {\n var _a;\n states.inputWidth = (_a = reference.value) == null ? void 0 : _a.$el.getBoundingClientRect().width;\n };\n const onInputChange = () => {\n if (props.filterable && states.query !== states.selectedLabel) {\n states.query = states.selectedLabel;\n handleQueryChange(states.query);\n }\n };\n const debouncedOnInputChange = lodashDebounce(() => {\n onInputChange();\n }, debounce.value);\n const debouncedQueryChange = lodashDebounce((e) => {\n handleQueryChange(e.target.value);\n }, debounce.value);\n const emitChange = (val) => {\n if (!isEqual(props.modelValue, val)) {\n ctx.emit(CHANGE_EVENT, val);\n }\n };\n const deletePrevTag = (e) => {\n if (e.target.value.length <= 0 && !toggleLastOptionHitState()) {\n const value = props.modelValue.slice();\n value.pop();\n ctx.emit(UPDATE_MODEL_EVENT, value);\n emitChange(value);\n }\n if (e.target.value.length === 1 && props.modelValue.length === 0) {\n states.currentPlaceholder = states.cachedPlaceHolder;\n }\n };\n const deleteTag = (event, tag) => {\n const index = states.selected.indexOf(tag);\n if (index > -1 && !selectDisabled.value) {\n const value = props.modelValue.slice();\n value.splice(index, 1);\n ctx.emit(UPDATE_MODEL_EVENT, value);\n emitChange(value);\n ctx.emit(\"remove-tag\", tag.value);\n }\n event.stopPropagation();\n };\n const deleteSelected = (event) => {\n event.stopPropagation();\n const value = props.multiple ? [] : \"\";\n if (typeof value !== \"string\") {\n for (const item of states.selected) {\n if (item.isDisabled)\n value.push(item.value);\n }\n }\n ctx.emit(UPDATE_MODEL_EVENT, value);\n emitChange(value);\n states.visible = false;\n ctx.emit(\"clear\");\n };\n const handleOptionSelect = (option, byClick) => {\n if (props.multiple) {\n const value = (props.modelValue || []).slice();\n const optionIndex = getValueIndex(value, option.value);\n if (optionIndex > -1) {\n value.splice(optionIndex, 1);\n } else if (props.multipleLimit <= 0 || value.length < props.multipleLimit) {\n value.push(option.value);\n }\n ctx.emit(UPDATE_MODEL_EVENT, value);\n emitChange(value);\n if (option.created) {\n states.query = \"\";\n handleQueryChange(\"\");\n states.inputLength = 20;\n }\n if (props.filterable)\n input.value.focus();\n } else {\n ctx.emit(UPDATE_MODEL_EVENT, option.value);\n emitChange(option.value);\n states.visible = false;\n }\n states.isSilentBlur = byClick;\n setSoftFocus();\n if (states.visible)\n return;\n nextTick(() => {\n scrollToOption(option);\n });\n };\n const getValueIndex = (arr = [], value) => {\n if (!isObject(value))\n return arr.indexOf(value);\n const valueKey = props.valueKey;\n let index = -1;\n arr.some((item, i) => {\n if (getValueByPath(item, valueKey) === getValueByPath(value, valueKey)) {\n index = i;\n return true;\n }\n return false;\n });\n return index;\n };\n const setSoftFocus = () => {\n states.softFocus = true;\n const _input = input.value || reference.value;\n if (_input) {\n _input.focus();\n }\n };\n const scrollToOption = (option) => {\n var _a, _b, _c, _d;\n const targetOption = Array.isArray(option) ? option[0] : option;\n let target = null;\n if (targetOption == null ? void 0 : targetOption.value) {\n const options = optionsArray.value.filter((item) => item.value === targetOption.value);\n if (options.length > 0) {\n target = options[0].$el;\n }\n }\n if (popper.value && target) {\n const menu = (_c = (_b = (_a = popper.value) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.querySelector) == null ? void 0 : _c.call(_b, \".el-select-dropdown__wrap\");\n if (menu) {\n scrollIntoView(menu, target);\n }\n }\n (_d = scrollbar.value) == null ? void 0 : _d.handleScroll();\n };\n const onOptionCreate = (vm) => {\n states.optionsCount++;\n states.filteredOptionsCount++;\n states.options.set(vm.value, vm);\n states.cachedOptions.set(vm.value, vm);\n };\n const onOptionDestroy = (key) => {\n states.optionsCount--;\n states.filteredOptionsCount--;\n states.options.delete(key);\n };\n const resetInputState = (e) => {\n if (e.code !== EVENT_CODE.backspace)\n toggleLastOptionHitState(false);\n states.inputLength = input.value.length * 15 + 20;\n resetInputHeight();\n };\n const toggleLastOptionHitState = (hit) => {\n if (!Array.isArray(states.selected))\n return;\n const option = states.selected[states.selected.length - 1];\n if (!option)\n return;\n if (hit === true || hit === false) {\n option.hitState = hit;\n return hit;\n }\n option.hitState = !option.hitState;\n return option.hitState;\n };\n const handleComposition = (event) => {\n const text = event.target.value;\n if (event.type === \"compositionend\") {\n states.isOnComposition = false;\n nextTick(() => handleQueryChange(text));\n } else {\n const lastCharacter = text[text.length - 1] || \"\";\n states.isOnComposition = !isKorean(lastCharacter);\n }\n };\n const handleMenuEnter = () => {\n nextTick(() => scrollToOption(states.selected));\n };\n const handleFocus = (event) => {\n if (!states.softFocus) {\n if (props.automaticDropdown || props.filterable) {\n states.visible = true;\n if (props.filterable) {\n states.menuVisibleOnFocus = true;\n }\n }\n ctx.emit(\"focus\", event);\n } else {\n states.softFocus = false;\n }\n };\n const blur = () => {\n states.visible = false;\n reference.value.blur();\n };\n const handleBlur = (event) => {\n nextTick(() => {\n if (states.isSilentBlur) {\n states.isSilentBlur = false;\n } else {\n ctx.emit(\"blur\", event);\n }\n });\n states.softFocus = false;\n };\n const handleClearClick = (event) => {\n deleteSelected(event);\n };\n const handleClose = () => {\n states.visible = false;\n };\n const toggleMenu = () => {\n if (props.automaticDropdown)\n return;\n if (!selectDisabled.value) {\n if (states.menuVisibleOnFocus) {\n states.menuVisibleOnFocus = false;\n } else {\n states.visible = !states.visible;\n }\n if (states.visible) {\n (input.value || reference.value).focus();\n }\n }\n };\n const selectOption = () => {\n if (!states.visible) {\n toggleMenu();\n } else {\n if (optionsArray.value[states.hoverIndex]) {\n handleOptionSelect(optionsArray.value[states.hoverIndex], void 0);\n }\n }\n };\n const getValueKey = (item) => {\n return isObject(item.value) ? getValueByPath(item.value, props.valueKey) : item.value;\n };\n const optionsAllDisabled = computed(() => optionsArray.value.filter((option) => option.visible).every((option) => option.disabled));\n const navigateOptions = (direction) => {\n if (!states.visible) {\n states.visible = true;\n return;\n }\n if (states.options.size === 0 || states.filteredOptionsCount === 0)\n return;\n if (!optionsAllDisabled.value) {\n if (direction === \"next\") {\n states.hoverIndex++;\n if (states.hoverIndex === states.options.size) {\n states.hoverIndex = 0;\n }\n } else if (direction === \"prev\") {\n states.hoverIndex--;\n if (states.hoverIndex < 0) {\n states.hoverIndex = states.options.size - 1;\n }\n }\n const option = optionsArray.value[states.hoverIndex];\n if (option.disabled === true || option.groupDisabled === true || !option.visible) {\n navigateOptions(direction);\n }\n nextTick(() => scrollToOption(hoverOption.value));\n }\n };\n return {\n optionsArray,\n selectSize,\n handleResize,\n debouncedOnInputChange,\n debouncedQueryChange,\n deletePrevTag,\n deleteTag,\n deleteSelected,\n handleOptionSelect,\n scrollToOption,\n readonly,\n resetInputHeight,\n showClose,\n iconClass,\n showNewOption,\n collapseTagSize,\n setSelected,\n managePlaceholder,\n selectDisabled,\n emptyText,\n toggleLastOptionHitState,\n resetInputState,\n handleComposition,\n onOptionCreate,\n onOptionDestroy,\n handleMenuEnter,\n handleFocus,\n blur,\n handleBlur,\n handleClearClick,\n handleClose,\n toggleMenu,\n selectOption,\n getValueKey,\n navigateOptions,\n dropMenuVisible,\n reference,\n input,\n popper,\n tags,\n selectWrapper,\n scrollbar\n };\n};\n\nvar script$2 = defineComponent({\n name: \"ElSelect\",\n componentName: \"ElSelect\",\n components: {\n ElInput,\n ElSelectMenu: script$1,\n ElOption: script,\n ElTag,\n ElScrollbar,\n ElPopper\n },\n directives: { ClickOutside },\n props: {\n name: String,\n id: String,\n modelValue: [Array, String, Number, Boolean, Object],\n autocomplete: {\n type: String,\n default: \"off\"\n },\n automaticDropdown: Boolean,\n size: {\n type: String,\n validator: isValidComponentSize\n },\n disabled: Boolean,\n clearable: Boolean,\n filterable: Boolean,\n allowCreate: Boolean,\n loading: Boolean,\n popperClass: {\n type: String,\n default: \"\"\n },\n remote: Boolean,\n loadingText: String,\n noMatchText: String,\n noDataText: String,\n remoteMethod: Function,\n filterMethod: Function,\n multiple: Boolean,\n multipleLimit: {\n type: Number,\n default: 0\n },\n placeholder: {\n type: String\n },\n defaultFirstOption: Boolean,\n reserveKeyword: Boolean,\n valueKey: {\n type: String,\n default: \"value\"\n },\n collapseTags: Boolean,\n popperAppendToBody: {\n type: Boolean,\n default: true\n },\n clearIcon: {\n type: String,\n default: \"el-icon-circle-close\"\n }\n },\n emits: [UPDATE_MODEL_EVENT, CHANGE_EVENT, \"remove-tag\", \"clear\", \"visible-change\", \"focus\", \"blur\"],\n setup(props, ctx) {\n const { t } = useLocaleInject();\n const states = useSelectStates(props);\n const {\n optionsArray,\n selectSize,\n readonly,\n handleResize,\n collapseTagSize,\n debouncedOnInputChange,\n debouncedQueryChange,\n deletePrevTag,\n deleteTag,\n deleteSelected,\n handleOptionSelect,\n scrollToOption,\n setSelected,\n resetInputHeight,\n managePlaceholder,\n showClose,\n selectDisabled,\n iconClass,\n showNewOption,\n emptyText,\n toggleLastOptionHitState,\n resetInputState,\n handleComposition,\n onOptionCreate,\n onOptionDestroy,\n handleMenuEnter,\n handleFocus,\n blur,\n handleBlur,\n handleClearClick,\n handleClose,\n toggleMenu,\n selectOption,\n getValueKey,\n navigateOptions,\n dropMenuVisible,\n reference,\n input,\n popper,\n tags,\n selectWrapper,\n scrollbar\n } = useSelect(props, states, ctx);\n const { focus } = useFocus(reference);\n const {\n inputWidth,\n selected,\n inputLength,\n filteredOptionsCount,\n visible,\n softFocus,\n selectedLabel,\n hoverIndex,\n query,\n inputHovering,\n currentPlaceholder,\n menuVisibleOnFocus,\n isOnComposition,\n isSilentBlur,\n options,\n cachedOptions,\n optionsCount,\n prefixWidth,\n tagInMultiLine\n } = toRefs(states);\n provide(selectKey, reactive({\n props,\n options,\n optionsArray,\n cachedOptions,\n optionsCount,\n filteredOptionsCount,\n hoverIndex,\n handleOptionSelect,\n selectEmitter: states.selectEmitter,\n onOptionCreate,\n onOptionDestroy,\n selectWrapper,\n selected,\n setSelected\n }));\n onMounted(() => {\n states.cachedPlaceHolder = currentPlaceholder.value = props.placeholder || t(\"el.select.placeholder\");\n if (props.multiple && Array.isArray(props.modelValue) && props.modelValue.length > 0) {\n currentPlaceholder.value = \"\";\n }\n addResizeListener(selectWrapper.value, handleResize);\n if (reference.value && reference.value.$el) {\n const sizeMap = {\n medium: 36,\n small: 32,\n mini: 28\n };\n const input2 = reference.value.input;\n states.initialInputHeight = input2.getBoundingClientRect().height || sizeMap[selectSize.value];\n }\n if (props.remote && props.multiple) {\n resetInputHeight();\n }\n nextTick(() => {\n if (reference.value.$el) {\n inputWidth.value = reference.value.$el.getBoundingClientRect().width;\n }\n if (ctx.slots.prefix) {\n const inputChildNodes = reference.value.$el.childNodes;\n const input2 = [].filter.call(inputChildNodes, (item) => item.tagName === \"INPUT\")[0];\n const prefix = reference.value.$el.querySelector(\".el-input__prefix\");\n prefixWidth.value = Math.max(prefix.getBoundingClientRect().width + 5, 30);\n if (states.prefixWidth) {\n input2.style.paddingLeft = `${Math.max(states.prefixWidth, 30)}px`;\n }\n }\n });\n setSelected();\n });\n onBeforeUnmount(() => {\n removeResizeListener(selectWrapper.value, handleResize);\n });\n if (props.multiple && !Array.isArray(props.modelValue)) {\n ctx.emit(UPDATE_MODEL_EVENT, []);\n }\n if (!props.multiple && Array.isArray(props.modelValue)) {\n ctx.emit(UPDATE_MODEL_EVENT, \"\");\n }\n const popperPaneRef = computed(() => {\n var _a;\n return (_a = popper.value) == null ? void 0 : _a.popperRef;\n });\n return {\n tagInMultiLine,\n prefixWidth,\n selectSize,\n readonly,\n handleResize,\n collapseTagSize,\n debouncedOnInputChange,\n debouncedQueryChange,\n deletePrevTag,\n deleteTag,\n deleteSelected,\n handleOptionSelect,\n scrollToOption,\n inputWidth,\n selected,\n inputLength,\n filteredOptionsCount,\n visible,\n softFocus,\n selectedLabel,\n hoverIndex,\n query,\n inputHovering,\n currentPlaceholder,\n menuVisibleOnFocus,\n isOnComposition,\n isSilentBlur,\n options,\n resetInputHeight,\n managePlaceholder,\n showClose,\n selectDisabled,\n iconClass,\n showNewOption,\n emptyText,\n toggleLastOptionHitState,\n resetInputState,\n handleComposition,\n handleMenuEnter,\n handleFocus,\n blur,\n handleBlur,\n handleClearClick,\n handleClose,\n toggleMenu,\n selectOption,\n getValueKey,\n navigateOptions,\n dropMenuVisible,\n focus,\n reference,\n input,\n popper,\n popperPaneRef,\n tags,\n selectWrapper,\n scrollbar\n };\n }\n});\n\nconst _hoisted_1 = { class: \"select-trigger\" };\nconst _hoisted_2 = { key: 0 };\nconst _hoisted_3 = { class: \"el-select__tags-text\" };\nconst _hoisted_4 = { style: { \"height\": \"100%\", \"display\": \"flex\", \"justify-content\": \"center\", \"align-items\": \"center\" } };\nconst _hoisted_5 = {\n key: 1,\n class: \"el-select-dropdown__empty\"\n};\nfunction render$2(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_tag = resolveComponent(\"el-tag\");\n const _component_el_input = resolveComponent(\"el-input\");\n const _component_el_option = resolveComponent(\"el-option\");\n const _component_el_scrollbar = resolveComponent(\"el-scrollbar\");\n const _component_el_select_menu = resolveComponent(\"el-select-menu\");\n const _component_el_popper = resolveComponent(\"el-popper\");\n const _directive_click_outside = resolveDirective(\"click-outside\");\n return withDirectives((openBlock(), createBlock(\"div\", {\n ref: \"selectWrapper\",\n class: [\"el-select\", [_ctx.selectSize ? \"el-select--\" + _ctx.selectSize : \"\"]],\n onClick: _cache[26] || (_cache[26] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), [\"stop\"]))\n }, [\n createVNode(_component_el_popper, {\n ref: \"popper\",\n visible: _ctx.dropMenuVisible,\n \"onUpdate:visible\": _cache[25] || (_cache[25] = ($event) => _ctx.dropMenuVisible = $event),\n placement: \"bottom-start\",\n \"append-to-body\": _ctx.popperAppendToBody,\n \"popper-class\": `el-select__popper ${_ctx.popperClass}`,\n \"fallback-placements\": [\"bottom-start\", \"top-start\", \"right\", \"left\"],\n \"manual-mode\": \"\",\n effect: \"light\",\n pure: \"\",\n trigger: \"click\",\n transition: \"el-zoom-in-top\",\n \"stop-popper-mouse-event\": false,\n \"gpu-acceleration\": false,\n onBeforeEnter: _ctx.handleMenuEnter\n }, {\n trigger: withCtx(() => [\n createVNode(\"div\", _hoisted_1, [\n _ctx.multiple ? (openBlock(), createBlock(\"div\", {\n key: 0,\n ref: \"tags\",\n class: \"el-select__tags\",\n style: { \"max-width\": _ctx.inputWidth - 32 + \"px\", width: \"100%\" }\n }, [\n _ctx.collapseTags && _ctx.selected.length ? (openBlock(), createBlock(\"span\", _hoisted_2, [\n createVNode(_component_el_tag, {\n closable: !_ctx.selectDisabled && !_ctx.selected[0].isDisabled,\n size: _ctx.collapseTagSize,\n hit: _ctx.selected[0].hitState,\n type: \"info\",\n \"disable-transitions\": \"\",\n onClose: _cache[1] || (_cache[1] = ($event) => _ctx.deleteTag($event, _ctx.selected[0]))\n }, {\n default: withCtx(() => [\n createVNode(\"span\", {\n class: \"el-select__tags-text\",\n style: { \"max-width\": _ctx.inputWidth - 123 + \"px\" }\n }, toDisplayString(_ctx.selected[0].currentLabel), 5)\n ]),\n _: 1\n }, 8, [\"closable\", \"size\", \"hit\"]),\n _ctx.selected.length > 1 ? (openBlock(), createBlock(_component_el_tag, {\n key: 0,\n closable: false,\n size: _ctx.collapseTagSize,\n type: \"info\",\n \"disable-transitions\": \"\"\n }, {\n default: withCtx(() => [\n createVNode(\"span\", _hoisted_3, \"+ \" + toDisplayString(_ctx.selected.length - 1), 1)\n ]),\n _: 1\n }, 8, [\"size\"])) : createCommentVNode(\"v-if\", true)\n ])) : createCommentVNode(\"v-if\", true),\n createCommentVNode(\" \"),\n !_ctx.collapseTags ? (openBlock(), createBlock(Transition, {\n key: 1,\n onAfterLeave: _ctx.resetInputHeight\n }, {\n default: withCtx(() => [\n createVNode(\"span\", {\n style: { marginLeft: _ctx.prefixWidth && _ctx.selected.length ? `${_ctx.prefixWidth}px` : null }\n }, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.selected, (item) => {\n return openBlock(), createBlock(_component_el_tag, {\n key: _ctx.getValueKey(item),\n closable: !_ctx.selectDisabled && !item.isDisabled,\n size: _ctx.collapseTagSize,\n hit: item.hitState,\n type: \"info\",\n \"disable-transitions\": \"\",\n onClose: ($event) => _ctx.deleteTag($event, item)\n }, {\n default: withCtx(() => [\n createVNode(\"span\", {\n class: \"el-select__tags-text\",\n style: { \"max-width\": _ctx.inputWidth - 75 + \"px\" }\n }, toDisplayString(item.currentLabel), 5)\n ]),\n _: 2\n }, 1032, [\"closable\", \"size\", \"hit\", \"onClose\"]);\n }), 128))\n ], 4)\n ]),\n _: 1\n }, 8, [\"onAfterLeave\"])) : createCommentVNode(\"v-if\", true),\n createCommentVNode(\"
\"),\n _ctx.filterable ? withDirectives((openBlock(), createBlock(\"input\", {\n key: 2,\n ref: \"input\",\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event) => _ctx.query = $event),\n type: \"text\",\n class: [\"el-select__input\", [_ctx.selectSize ? `is-${_ctx.selectSize}` : \"\"]],\n disabled: _ctx.selectDisabled,\n autocomplete: _ctx.autocomplete,\n style: { marginLeft: _ctx.prefixWidth && !_ctx.selected.length || _ctx.tagInMultiLine ? `${_ctx.prefixWidth}px` : null, flexGrow: \"1\", width: `${_ctx.inputLength / (_ctx.inputWidth - 32)}%`, maxWidth: `${_ctx.inputWidth - 42}px` },\n onFocus: _cache[3] || (_cache[3] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),\n onBlur: _cache[4] || (_cache[4] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)),\n onKeyup: _cache[5] || (_cache[5] = (...args) => _ctx.managePlaceholder && _ctx.managePlaceholder(...args)),\n onKeydown: [\n _cache[6] || (_cache[6] = (...args) => _ctx.resetInputState && _ctx.resetInputState(...args)),\n _cache[7] || (_cache[7] = withKeys(withModifiers(($event) => _ctx.navigateOptions(\"next\"), [\"prevent\"]), [\"down\"])),\n _cache[8] || (_cache[8] = withKeys(withModifiers(($event) => _ctx.navigateOptions(\"prev\"), [\"prevent\"]), [\"up\"])),\n _cache[9] || (_cache[9] = withKeys(withModifiers(($event) => _ctx.visible = false, [\"stop\", \"prevent\"]), [\"esc\"])),\n _cache[10] || (_cache[10] = withKeys(withModifiers((...args) => _ctx.selectOption && _ctx.selectOption(...args), [\"stop\", \"prevent\"]), [\"enter\"])),\n _cache[11] || (_cache[11] = withKeys((...args) => _ctx.deletePrevTag && _ctx.deletePrevTag(...args), [\"delete\"])),\n _cache[12] || (_cache[12] = withKeys(($event) => _ctx.visible = false, [\"tab\"]))\n ],\n onCompositionstart: _cache[13] || (_cache[13] = (...args) => _ctx.handleComposition && _ctx.handleComposition(...args)),\n onCompositionupdate: _cache[14] || (_cache[14] = (...args) => _ctx.handleComposition && _ctx.handleComposition(...args)),\n onCompositionend: _cache[15] || (_cache[15] = (...args) => _ctx.handleComposition && _ctx.handleComposition(...args)),\n onInput: _cache[16] || (_cache[16] = (...args) => _ctx.debouncedQueryChange && _ctx.debouncedQueryChange(...args))\n }, null, 46, [\"disabled\", \"autocomplete\"])), [\n [vModelText, _ctx.query]\n ]) : createCommentVNode(\"v-if\", true)\n ], 4)) : createCommentVNode(\"v-if\", true),\n createVNode(_component_el_input, {\n id: _ctx.id,\n ref: \"reference\",\n modelValue: _ctx.selectedLabel,\n \"onUpdate:modelValue\": _cache[18] || (_cache[18] = ($event) => _ctx.selectedLabel = $event),\n type: \"text\",\n placeholder: _ctx.currentPlaceholder,\n name: _ctx.name,\n autocomplete: _ctx.autocomplete,\n size: _ctx.selectSize,\n disabled: _ctx.selectDisabled,\n readonly: _ctx.readonly,\n \"validate-event\": false,\n class: { \"is-focus\": _ctx.visible },\n tabindex: _ctx.multiple && _ctx.filterable ? \"-1\" : null,\n onFocus: _ctx.handleFocus,\n onBlur: _ctx.handleBlur,\n onInput: _ctx.debouncedOnInputChange,\n onPaste: _ctx.debouncedOnInputChange,\n onKeydown: [\n _cache[19] || (_cache[19] = withKeys(withModifiers(($event) => _ctx.navigateOptions(\"next\"), [\"stop\", \"prevent\"]), [\"down\"])),\n _cache[20] || (_cache[20] = withKeys(withModifiers(($event) => _ctx.navigateOptions(\"prev\"), [\"stop\", \"prevent\"]), [\"up\"])),\n withKeys(withModifiers(_ctx.selectOption, [\"stop\", \"prevent\"]), [\"enter\"]),\n _cache[21] || (_cache[21] = withKeys(withModifiers(($event) => _ctx.visible = false, [\"stop\", \"prevent\"]), [\"esc\"])),\n _cache[22] || (_cache[22] = withKeys(($event) => _ctx.visible = false, [\"tab\"]))\n ],\n onMouseenter: _cache[23] || (_cache[23] = ($event) => _ctx.inputHovering = true),\n onMouseleave: _cache[24] || (_cache[24] = ($event) => _ctx.inputHovering = false)\n }, createSlots({\n suffix: withCtx(() => [\n withDirectives(createVNode(\"i\", {\n class: [\"el-select__caret\", \"el-input__icon\", \"el-icon-\" + _ctx.iconClass]\n }, null, 2), [\n [vShow, !_ctx.showClose]\n ]),\n _ctx.showClose ? (openBlock(), createBlock(\"i\", {\n key: 0,\n class: `el-select__caret el-input__icon ${_ctx.clearIcon}`,\n onClick: _cache[17] || (_cache[17] = (...args) => _ctx.handleClearClick && _ctx.handleClearClick(...args))\n }, null, 2)) : createCommentVNode(\"v-if\", true)\n ]),\n _: 2\n }, [\n _ctx.$slots.prefix ? {\n name: \"prefix\",\n fn: withCtx(() => [\n createVNode(\"div\", _hoisted_4, [\n renderSlot(_ctx.$slots, \"prefix\")\n ])\n ])\n } : void 0\n ]), 1032, [\"id\", \"modelValue\", \"placeholder\", \"name\", \"autocomplete\", \"size\", \"disabled\", \"readonly\", \"class\", \"tabindex\", \"onFocus\", \"onBlur\", \"onInput\", \"onPaste\", \"onKeydown\"])\n ])\n ]),\n default: withCtx(() => [\n createVNode(_component_el_select_menu, null, {\n default: withCtx(() => [\n withDirectives(createVNode(_component_el_scrollbar, {\n ref: \"scrollbar\",\n tag: \"ul\",\n \"wrap-class\": \"el-select-dropdown__wrap\",\n \"view-class\": \"el-select-dropdown__list\",\n class: { \"is-empty\": !_ctx.allowCreate && _ctx.query && _ctx.filteredOptionsCount === 0 }\n }, {\n default: withCtx(() => [\n _ctx.showNewOption ? (openBlock(), createBlock(_component_el_option, {\n key: 0,\n value: _ctx.query,\n created: true\n }, null, 8, [\"value\"])) : createCommentVNode(\"v-if\", true),\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"class\"]), [\n [vShow, _ctx.options.size > 0 && !_ctx.loading]\n ]),\n _ctx.emptyText && (!_ctx.allowCreate || _ctx.loading || _ctx.allowCreate && _ctx.options.size === 0) ? (openBlock(), createBlock(Fragment, { key: 0 }, [\n _ctx.$slots.empty ? renderSlot(_ctx.$slots, \"empty\", { key: 0 }) : (openBlock(), createBlock(\"p\", _hoisted_5, toDisplayString(_ctx.emptyText), 1))\n ], 2112)) : createCommentVNode(\"v-if\", true)\n ]),\n _: 3\n })\n ]),\n _: 1\n }, 8, [\"visible\", \"append-to-body\", \"popper-class\", \"onBeforeEnter\"])\n ], 2)), [\n [_directive_click_outside, _ctx.handleClose, _ctx.popperPaneRef]\n ]);\n}\n\nscript$2.render = render$2;\nscript$2.__file = \"packages/select/src/select.vue\";\n\nscript$2.install = (app) => {\n app.component(script$2.name, script$2);\n};\nconst _Select = script$2;\n\nexport default _Select;\nexport { script as Option };\n","import { Option } from '../el-select';\n\nconst _Option = Option;\n_Option.install = (app) => {\n app.component(_Option.name, _Option);\n};\n\nexport default _Option;\n","import { defineComponent, ref, getCurrentInstance, provide, reactive, toRefs, inject, onMounted, withDirectives, openBlock, createBlock, createVNode, toDisplayString, renderSlot, vShow } from 'vue';\n\nconst selectGroupKey = \"ElSelectGroup\";\nconst selectKey = \"ElSelect\";\nconst selectEvents = {\n queryChange: \"elOptionQueryChange\",\n groupQueryChange: \"elOptionGroupQueryChange\"\n};\n\nvar __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar script = defineComponent({\n name: \"ElOptionGroup\",\n componentName: \"ElOptionGroup\",\n props: {\n label: String,\n disabled: {\n type: Boolean,\n default: false\n }\n },\n setup(props) {\n const visible = ref(true);\n const instance = getCurrentInstance();\n const children = ref([]);\n provide(selectGroupKey, reactive(__spreadValues({}, toRefs(props))));\n const select = inject(selectKey);\n onMounted(() => {\n children.value = flattedChildren(instance.subTree);\n });\n const flattedChildren = (node) => {\n const children2 = [];\n if (Array.isArray(node.children)) {\n node.children.forEach((child) => {\n var _a;\n if (child.type && child.type.name === \"ElOption\" && child.component && child.component.proxy) {\n children2.push(child.component.proxy);\n } else if ((_a = child.children) == null ? void 0 : _a.length) {\n children2.push(...flattedChildren(child));\n }\n });\n }\n return children2;\n };\n const queryChange = () => {\n visible.value = children.value.some((option) => option.visible === true);\n };\n select.selectEmitter.on(selectEvents.groupQueryChange, queryChange);\n return {\n visible\n };\n }\n});\n\nconst _hoisted_1 = { class: \"el-select-group__wrap\" };\nconst _hoisted_2 = { class: \"el-select-group__title\" };\nconst _hoisted_3 = { class: \"el-select-group\" };\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return withDirectives((openBlock(), createBlock(\"ul\", _hoisted_1, [\n createVNode(\"li\", _hoisted_2, toDisplayString(_ctx.label), 1),\n createVNode(\"li\", null, [\n createVNode(\"ul\", _hoisted_3, [\n renderSlot(_ctx.$slots, \"default\")\n ])\n ])\n ], 512)), [\n [vShow, _ctx.visible]\n ]);\n}\n\nscript.render = render;\nscript.__file = \"packages/select/src/option-group.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _OptionGroup = script;\n\nexport default _OptionGroup;\n","import { defineComponent, openBlock, createBlock, createVNode, renderSlot, createCommentVNode, createTextVNode, toDisplayString } from 'vue';\nimport { useLocaleInject } from '../hooks';\n\nvar script = defineComponent({\n name: \"ElPageHeader\",\n props: {\n icon: {\n type: String,\n default: \"el-icon-back\"\n },\n title: {\n type: String\n },\n content: {\n type: String,\n default: \"\"\n }\n },\n emits: [\"back\"],\n setup(props, { emit }) {\n const { t } = useLocaleInject();\n function handleClick() {\n emit(\"back\");\n }\n return {\n handleClick,\n t\n };\n }\n});\n\nconst _hoisted_1 = { class: \"el-page-header\" };\nconst _hoisted_2 = {\n key: 0,\n class: \"el-page-header__icon\"\n};\nconst _hoisted_3 = { class: \"el-page-header__title\" };\nconst _hoisted_4 = { class: \"el-page-header__content\" };\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", _hoisted_1, [\n createVNode(\"div\", {\n class: \"el-page-header__left\",\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))\n }, [\n _ctx.icon || _ctx.$slots.icon ? (openBlock(), createBlock(\"div\", _hoisted_2, [\n renderSlot(_ctx.$slots, \"icon\", {}, () => [\n createVNode(\"i\", { class: _ctx.icon }, null, 2)\n ])\n ])) : createCommentVNode(\"v-if\", true),\n createVNode(\"div\", _hoisted_3, [\n renderSlot(_ctx.$slots, \"title\", {}, () => [\n createTextVNode(toDisplayString(_ctx.title || _ctx.t(\"el.pageHeader.title\")), 1)\n ])\n ])\n ]),\n createVNode(\"div\", _hoisted_4, [\n renderSlot(_ctx.$slots, \"content\", {}, () => [\n createTextVNode(toDisplayString(_ctx.content), 1)\n ])\n ])\n ]);\n}\n\nscript.render = render;\nscript.__file = \"packages/page-header/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _PageHeader = script;\n\nexport default _PageHeader;\n","import { defineComponent, computed, openBlock, createBlock, withModifiers, toDisplayString, inject, ref, watch, resolveComponent, createVNode, withCtx, Fragment, renderList, createTextVNode, watchEffect, withKeys, createCommentVNode, getCurrentInstance, provide, h } from 'vue';\nimport { warn } from '../utils/error';\nimport { useLocaleInject } from '../hooks';\nimport ElSelect from '../el-select';\nimport ElOption from '../el-option';\nimport isEqual from 'lodash/isEqual';\nimport ElInput from '../el-input';\n\nvar script = defineComponent({\n name: \"Prev\",\n props: {\n disabled: Boolean,\n currentPage: {\n type: Number,\n default: 1\n },\n prevText: {\n type: String,\n default: \"\"\n }\n },\n setup(props) {\n const internalDisabled = computed(() => props.disabled || props.currentPage <= 1);\n return {\n internalDisabled\n };\n }\n});\n\nconst _hoisted_1 = { key: 0 };\nconst _hoisted_2 = {\n key: 1,\n class: \"el-icon el-icon-arrow-left\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"button\", {\n type: \"button\",\n class: \"btn-prev\",\n disabled: _ctx.internalDisabled,\n \"aria-disabled\": _ctx.internalDisabled,\n onClick: _cache[1] || (_cache[1] = withModifiers(() => {\n }, [\"self\", \"prevent\"]))\n }, [\n _ctx.prevText ? (openBlock(), createBlock(\"span\", _hoisted_1, toDisplayString(_ctx.prevText), 1)) : (openBlock(), createBlock(\"i\", _hoisted_2))\n ], 8, [\"disabled\", \"aria-disabled\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/pagination/src/prev.vue\";\n\nvar script$1 = defineComponent({\n name: \"Next\",\n props: {\n disabled: Boolean,\n currentPage: {\n type: Number,\n default: 1\n },\n pageCount: {\n type: Number,\n default: 50\n },\n nextText: {\n type: String,\n default: \"\"\n }\n },\n setup(props) {\n const internalDisabled = computed(() => props.disabled || props.currentPage === props.pageCount || props.pageCount === 0);\n return {\n internalDisabled\n };\n }\n});\n\nconst _hoisted_1$1 = { key: 0 };\nconst _hoisted_2$1 = {\n key: 1,\n class: \"el-icon el-icon-arrow-right\"\n};\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"button\", {\n type: \"button\",\n class: \"btn-next\",\n disabled: _ctx.internalDisabled,\n \"aria-disabled\": _ctx.internalDisabled,\n onClick: _cache[1] || (_cache[1] = withModifiers(() => {\n }, [\"self\", \"prevent\"]))\n }, [\n _ctx.nextText ? (openBlock(), createBlock(\"span\", _hoisted_1$1, toDisplayString(_ctx.nextText), 1)) : (openBlock(), createBlock(\"i\", _hoisted_2$1))\n ], 8, [\"disabled\", \"aria-disabled\"]);\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"packages/pagination/src/next.vue\";\n\nconst usePagination = () => {\n const pagination = inject(\"pagination\", {});\n return {\n pagination,\n pageCount: pagination.pageCount,\n disabled: pagination.disabled,\n currentPage: pagination.currentPage\n };\n};\n\nvar script$2 = defineComponent({\n name: \"Sizes\",\n components: {\n ElSelect,\n ElOption\n },\n props: {\n pageSize: Number,\n pageSizes: {\n type: Array,\n default: () => {\n return [10, 20, 30, 40, 50, 100];\n }\n },\n popperClass: {\n type: String,\n default: \"\"\n },\n disabled: Boolean\n },\n emits: [\"page-size-change\"],\n setup(props, { emit }) {\n const { t } = useLocaleInject();\n const { pagination } = usePagination();\n const innerPageSize = ref(props.pageSize);\n watch(() => props.pageSizes, (newVal, oldVal) => {\n if (isEqual(newVal, oldVal))\n return;\n if (Array.isArray(newVal)) {\n const pageSize = newVal.indexOf(props.pageSize) > -1 ? props.pageSize : props.pageSizes[0];\n emit(\"page-size-change\", pageSize);\n }\n });\n watch(() => props.pageSize, (newVal) => {\n innerPageSize.value = newVal;\n });\n const innerPagesizes = computed(() => props.pageSizes);\n function handleChange(val) {\n if (val !== innerPageSize.value) {\n innerPageSize.value = val;\n pagination == null ? void 0 : pagination.handleSizeChange(Number(val));\n }\n }\n return {\n t,\n innerPagesizes,\n innerPageSize,\n handleChange\n };\n }\n});\n\nconst _hoisted_1$2 = { class: \"el-pagination__sizes\" };\nfunction render$2(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_option = resolveComponent(\"el-option\");\n const _component_el_select = resolveComponent(\"el-select\");\n return openBlock(), createBlock(\"span\", _hoisted_1$2, [\n createVNode(_component_el_select, {\n \"model-value\": _ctx.innerPageSize,\n disabled: _ctx.disabled,\n \"popper-class\": _ctx.popperClass,\n size: \"mini\",\n onChange: _ctx.handleChange\n }, {\n default: withCtx(() => [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.innerPagesizes, (item) => {\n return openBlock(), createBlock(_component_el_option, {\n key: item,\n value: item,\n label: item + _ctx.t(\"el.pagination.pagesize\")\n }, null, 8, [\"value\", \"label\"]);\n }), 128))\n ]),\n _: 1\n }, 8, [\"model-value\", \"disabled\", \"popper-class\", \"onChange\"])\n ]);\n}\n\nscript$2.render = render$2;\nscript$2.__file = \"packages/pagination/src/sizes.vue\";\n\nvar script$3 = defineComponent({\n components: {\n ElInput\n },\n setup() {\n const { t } = useLocaleInject();\n const { pagination, pageCount, disabled, currentPage } = usePagination();\n const userInput = ref(null);\n const innerValue = computed(() => {\n var _a;\n return (_a = userInput.value) != null ? _a : currentPage.value;\n });\n function handleInput(val) {\n userInput.value = Number(val);\n }\n function handleChange(val) {\n pagination == null ? void 0 : pagination.changeEvent(Number(val));\n userInput.value = null;\n }\n return {\n t,\n userInput,\n pageCount,\n disabled,\n handleInput,\n handleChange,\n innerValue\n };\n }\n});\n\nconst _hoisted_1$3 = { class: \"el-pagination__jump\" };\nfunction render$3(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_input = resolveComponent(\"el-input\");\n return openBlock(), createBlock(\"span\", _hoisted_1$3, [\n createTextVNode(toDisplayString(_ctx.t(\"el.pagination.goto\")) + \" \", 1),\n createVNode(_component_el_input, {\n size: \"mini\",\n class: \"el-pagination__editor is-in-pagination\",\n min: 1,\n max: _ctx.pageCount,\n disabled: _ctx.disabled,\n \"model-value\": _ctx.innerValue,\n type: \"number\",\n \"onUpdate:modelValue\": _ctx.handleInput,\n onChange: _ctx.handleChange\n }, null, 8, [\"max\", \"disabled\", \"model-value\", \"onUpdate:modelValue\", \"onChange\"]),\n createTextVNode(\" \" + toDisplayString(_ctx.t(\"el.pagination.pageClassifier\")), 1)\n ]);\n}\n\nscript$3.render = render$3;\nscript$3.__file = \"packages/pagination/src/jumper.vue\";\n\nvar script$4 = defineComponent({\n name: \"Total\",\n props: {\n total: {\n type: Number,\n default: 1e3\n }\n },\n setup() {\n const { t } = useLocaleInject();\n return {\n t\n };\n }\n});\n\nconst _hoisted_1$4 = { class: \"el-pagination__total\" };\nfunction render$4(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"span\", _hoisted_1$4, toDisplayString(_ctx.t(\"el.pagination.total\", {\n total: _ctx.total\n })), 1);\n}\n\nscript$4.render = render$4;\nscript$4.__file = \"packages/pagination/src/total.vue\";\n\nvar script$5 = defineComponent({\n name: \"ElPager\",\n props: {\n currentPage: {\n type: Number,\n default: 1\n },\n pageCount: {\n type: Number\n },\n pagerCount: {\n type: Number,\n default: 7\n },\n disabled: Boolean\n },\n emits: [\"change\"],\n setup(props, { emit }) {\n const showPrevMore = ref(false);\n const showNextMore = ref(false);\n const quicknextIconClass = ref(\"el-icon-more\");\n const quickprevIconClass = ref(\"el-icon-more\");\n const pagers = computed(() => {\n const pagerCount = props.pagerCount;\n const halfPagerCount = (pagerCount - 1) / 2;\n const currentPage = Number(props.currentPage);\n const pageCount = Number(props.pageCount);\n let showPrevMore2 = false;\n let showNextMore2 = false;\n if (pageCount > pagerCount) {\n if (currentPage > pagerCount - halfPagerCount) {\n showPrevMore2 = true;\n }\n if (currentPage < pageCount - halfPagerCount) {\n showNextMore2 = true;\n }\n }\n const array = [];\n if (showPrevMore2 && !showNextMore2) {\n const startPage = pageCount - (pagerCount - 2);\n for (let i = startPage; i < pageCount; i++) {\n array.push(i);\n }\n } else if (!showPrevMore2 && showNextMore2) {\n for (let i = 2; i < pagerCount; i++) {\n array.push(i);\n }\n } else if (showPrevMore2 && showNextMore2) {\n const offset = Math.floor(pagerCount / 2) - 1;\n for (let i = currentPage - offset; i <= currentPage + offset; i++) {\n array.push(i);\n }\n } else {\n for (let i = 2; i < pageCount; i++) {\n array.push(i);\n }\n }\n return array;\n });\n watchEffect(() => {\n const halfPagerCount = (props.pagerCount - 1) / 2;\n showPrevMore.value = false;\n showNextMore.value = false;\n if (props.pageCount > props.pagerCount) {\n if (props.currentPage > props.pagerCount - halfPagerCount) {\n showPrevMore.value = true;\n }\n if (props.currentPage < props.pageCount - halfPagerCount) {\n showNextMore.value = true;\n }\n }\n });\n watchEffect(() => {\n if (!showPrevMore.value)\n quickprevIconClass.value = \"el-icon-more\";\n });\n watchEffect(() => {\n if (!showNextMore.value)\n quicknextIconClass.value = \"el-icon-more\";\n });\n function onMouseenter(direction) {\n if (props.disabled)\n return;\n if (direction === \"left\") {\n quickprevIconClass.value = \"el-icon-d-arrow-left\";\n } else {\n quicknextIconClass.value = \"el-icon-d-arrow-right\";\n }\n }\n function onEnter(e) {\n const target = e.target;\n if (target.tagName.toLowerCase() === \"li\" && Array.from(target.classList).includes(\"number\")) {\n const newPage = Number(target.textContent);\n if (newPage !== props.currentPage) {\n emit(\"change\", newPage);\n }\n }\n }\n function onPagerClick(event) {\n const target = event.target;\n if (target.tagName.toLowerCase() === \"ul\" || props.disabled) {\n return;\n }\n let newPage = Number(target.textContent);\n const pageCount = props.pageCount;\n const currentPage = props.currentPage;\n const pagerCountOffset = props.pagerCount - 2;\n if (target.className.includes(\"more\")) {\n if (target.className.includes(\"quickprev\")) {\n newPage = currentPage - pagerCountOffset;\n } else if (target.className.includes(\"quicknext\")) {\n newPage = currentPage + pagerCountOffset;\n }\n }\n if (!isNaN(newPage)) {\n if (newPage < 1) {\n newPage = 1;\n }\n if (newPage > pageCount) {\n newPage = pageCount;\n }\n }\n if (newPage !== currentPage) {\n emit(\"change\", newPage);\n }\n }\n return {\n showPrevMore,\n showNextMore,\n quicknextIconClass,\n quickprevIconClass,\n pagers,\n onMouseenter,\n onPagerClick,\n onEnter\n };\n }\n});\n\nfunction render$5(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"ul\", {\n class: \"el-pager\",\n onClick: _cache[5] || (_cache[5] = (...args) => _ctx.onPagerClick && _ctx.onPagerClick(...args)),\n onKeyup: _cache[6] || (_cache[6] = withKeys((...args) => _ctx.onEnter && _ctx.onEnter(...args), [\"enter\"]))\n }, [\n _ctx.pageCount > 0 ? (openBlock(), createBlock(\"li\", {\n key: 0,\n class: [{ active: _ctx.currentPage === 1, disabled: _ctx.disabled }, \"number\"],\n \"aria-current\": _ctx.currentPage === 1,\n tabindex: \"0\"\n }, \" 1 \", 10, [\"aria-current\"])) : createCommentVNode(\"v-if\", true),\n _ctx.showPrevMore ? (openBlock(), createBlock(\"li\", {\n key: 1,\n class: [\"el-icon more btn-quickprev\", [_ctx.quickprevIconClass, { disabled: _ctx.disabled }]],\n onMouseenter: _cache[1] || (_cache[1] = ($event) => _ctx.onMouseenter(\"left\")),\n onMouseleave: _cache[2] || (_cache[2] = ($event) => _ctx.quickprevIconClass = \"el-icon-more\")\n }, null, 34)) : createCommentVNode(\"v-if\", true),\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.pagers, (pager) => {\n return openBlock(), createBlock(\"li\", {\n key: pager,\n class: [{ active: _ctx.currentPage === pager, disabled: _ctx.disabled }, \"number\"],\n \"aria-current\": _ctx.currentPage === pager,\n tabindex: \"0\"\n }, toDisplayString(pager), 11, [\"aria-current\"]);\n }), 128)),\n _ctx.showNextMore ? (openBlock(), createBlock(\"li\", {\n key: 2,\n class: [\"el-icon more btn-quicknext\", [_ctx.quicknextIconClass, { disabled: _ctx.disabled }]],\n onMouseenter: _cache[3] || (_cache[3] = ($event) => _ctx.onMouseenter(\"right\")),\n onMouseleave: _cache[4] || (_cache[4] = ($event) => _ctx.quicknextIconClass = \"el-icon-more\")\n }, null, 34)) : createCommentVNode(\"v-if\", true),\n _ctx.pageCount > 1 ? (openBlock(), createBlock(\"li\", {\n key: 3,\n class: [{ active: _ctx.currentPage === _ctx.pageCount, disabled: _ctx.disabled }, \"number\"],\n \"aria-current\": _ctx.currentPage === _ctx.pageCount,\n tabindex: \"0\"\n }, toDisplayString(_ctx.pageCount), 11, [\"aria-current\"])) : createCommentVNode(\"v-if\", true)\n ], 32);\n}\n\nscript$5.render = render$5;\nscript$5.__file = \"packages/pagination/src/pager.vue\";\n\nconst isAbsent = (v) => typeof v !== \"number\";\nconst componentName = \"ElPagination\";\nvar Pagination = defineComponent({\n name: componentName,\n components: {\n Prev: script,\n Next: script$1,\n Sizes: script$2,\n Jumper: script$3,\n Total: script$4,\n Pager: script$5\n },\n props: {\n total: {\n type: Number\n },\n pageSize: {\n type: Number\n },\n defaultPageSize: {\n type: Number\n },\n currentPage: {\n type: Number\n },\n defaultCurrentPage: {\n type: Number\n },\n pageCount: {\n type: Number\n },\n pagerCount: {\n type: Number,\n validator: (value) => {\n return (value | 0) === value && value > 4 && value < 22 && value % 2 === 1;\n },\n default: 7\n },\n layout: {\n type: String,\n default: \"prev, pager, next, jumper, ->, total\"\n },\n pageSizes: {\n type: Array,\n default: () => {\n return [10, 20, 30, 40, 50, 100];\n }\n },\n popperClass: {\n type: String,\n default: \"\"\n },\n prevText: {\n type: String,\n default: \"\"\n },\n nextText: {\n type: String,\n default: \"\"\n },\n small: Boolean,\n background: Boolean,\n disabled: Boolean,\n hideOnSinglePage: Boolean\n },\n emits: [\n \"update:current-page\",\n \"update:page-size\",\n \"size-change\",\n \"current-change\",\n \"prev-click\",\n \"next-click\"\n ],\n setup(props, { emit, slots }) {\n const { t } = useLocaleInject();\n const vnodeProps = getCurrentInstance().vnode.props || {};\n const hasCurrentPageListener = \"onUpdate:currentPage\" in vnodeProps || \"onCurrentChange\" in vnodeProps;\n const hasPageSizeListener = \"onUpdate:pageSize\" in vnodeProps || \"onSizeChange\" in vnodeProps;\n const assertValidUsage = computed(() => {\n if (isAbsent(props.total) && isAbsent(props.pageCount))\n return false;\n if (!isAbsent(props.currentPage) && !hasCurrentPageListener)\n return false;\n if (props.layout.includes(\"sizes\")) {\n if (!isAbsent(props.pageCount)) {\n if (!hasPageSizeListener)\n return false;\n } else if (!isAbsent(props.total)) {\n if (!isAbsent(props.pageSize)) {\n if (!hasPageSizeListener) {\n return false;\n }\n }\n }\n }\n return true;\n });\n const innerPageSize = ref(isAbsent(props.defaultPageSize) ? 10 : props.defaultPageSize);\n const innerCurrentPage = ref(isAbsent(props.defaultCurrentPage) ? 1 : props.defaultCurrentPage);\n const pageSizeBridge = computed({\n get() {\n return isAbsent(props.pageSize) ? innerPageSize.value : props.pageSize;\n },\n set(v) {\n if (isAbsent(props.pageSize)) {\n innerPageSize.value = v;\n }\n if (hasPageSizeListener) {\n emit(\"update:page-size\", v);\n emit(\"size-change\", v);\n }\n }\n });\n const pageCountBridge = computed(() => {\n let pageCount = 0;\n if (!isAbsent(props.pageCount)) {\n pageCount = props.pageCount;\n } else if (!isAbsent(props.total)) {\n pageCount = Math.max(1, Math.ceil(props.total / pageSizeBridge.value));\n }\n if (currentPageBridge.value > pageCount) {\n currentPageBridge.value = pageCount;\n }\n return pageCount;\n });\n const currentPageBridge = computed({\n get() {\n return isAbsent(props.currentPage) ? innerCurrentPage.value : props.currentPage;\n },\n set(v) {\n let newCurrentPage = v;\n if (v < 1) {\n newCurrentPage = 1;\n } else if (v > pageCountBridge.value) {\n newCurrentPage = pageCountBridge.value;\n }\n if (isAbsent(props.currentPage)) {\n innerCurrentPage.value = newCurrentPage;\n }\n if (hasCurrentPageListener) {\n emit(\"update:current-page\", newCurrentPage);\n emit(\"current-change\", newCurrentPage);\n }\n }\n });\n function handleCurrentChange(val) {\n currentPageBridge.value = val;\n }\n function handleSizeChange(val) {\n pageSizeBridge.value = val;\n const newPageCount = pageCountBridge.value;\n if (currentPageBridge.value > newPageCount) {\n currentPageBridge.value = newPageCount;\n }\n }\n function prev() {\n if (props.disabled)\n return;\n currentPageBridge.value -= 1;\n emit(\"prev-click\", currentPageBridge.value);\n }\n function next() {\n if (props.disabled)\n return;\n currentPageBridge.value += 1;\n emit(\"next-click\", currentPageBridge.value);\n }\n provide(\"pagination\", {\n pageCount: pageCountBridge,\n disabled: computed(() => props.disabled),\n currentPage: currentPageBridge,\n changeEvent: handleCurrentChange,\n handleSizeChange\n });\n return () => {\n var _a, _b;\n if (!assertValidUsage.value) {\n warn(componentName, t(\"el.pagination.docRefer\"));\n return null;\n }\n if (!props.layout)\n return null;\n if (props.hideOnSinglePage && pageCountBridge.value <= 1)\n return null;\n const rootChildren = [];\n const rightWrapperChildren = [];\n const rightWrapperRoot = h(\"div\", { class: \"el-pagination__rightwrapper\" }, rightWrapperChildren);\n const TEMPLATE_MAP = {\n prev: h(script, {\n disabled: props.disabled,\n currentPage: currentPageBridge.value,\n prevText: props.prevText,\n onClick: prev\n }),\n jumper: h(script$3),\n pager: h(script$5, {\n currentPage: currentPageBridge.value,\n pageCount: pageCountBridge.value,\n pagerCount: props.pagerCount,\n onChange: handleCurrentChange,\n disabled: props.disabled\n }),\n next: h(script$1, {\n disabled: props.disabled,\n currentPage: currentPageBridge.value,\n pageCount: pageCountBridge.value,\n nextText: props.nextText,\n onClick: next\n }),\n sizes: h(script$2, {\n pageSize: pageSizeBridge.value,\n pageSizes: props.pageSizes,\n popperClass: props.popperClass,\n disabled: props.disabled\n }),\n slot: (_b = (_a = slots == null ? void 0 : slots.default) == null ? void 0 : _a.call(slots)) != null ? _b : null,\n total: h(script$4, { total: isAbsent(props.total) ? 0 : props.total })\n };\n const components = props.layout.split(\",\").map((item) => item.trim());\n let haveRightWrapper = false;\n components.forEach((c) => {\n if (c === \"->\") {\n haveRightWrapper = true;\n return;\n }\n if (!haveRightWrapper) {\n rootChildren.push(TEMPLATE_MAP[c]);\n } else {\n rightWrapperChildren.push(TEMPLATE_MAP[c]);\n }\n });\n if (haveRightWrapper && rightWrapperChildren.length > 0) {\n rootChildren.unshift(rightWrapperRoot);\n }\n return h(\"div\", {\n role: \"pagination\",\n \"aria-label\": \"pagination\",\n class: [\n \"el-pagination\",\n {\n \"is-background\": props.background,\n \"el-pagination--small\": props.small\n }\n ]\n }, rootChildren);\n };\n }\n});\n\nconst _Pagination = Pagination;\n_Pagination.install = (app) => {\n app.component(_Pagination.name, _Pagination);\n};\n\nexport default _Pagination;\n","import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, withCtx, renderSlot, createVNode, createCommentVNode, createTextVNode, toDisplayString } from 'vue';\nimport ElButton from '../el-button';\nimport ElPopper from '../el-popper';\nimport { useLocaleInject } from '../hooks';\n\nvar script = defineComponent({\n name: \"ElPopconfirm\",\n components: {\n ElButton,\n ElPopper\n },\n props: {\n title: {\n type: String\n },\n confirmButtonText: {\n type: String\n },\n cancelButtonText: {\n type: String\n },\n confirmButtonType: {\n type: String,\n default: \"primary\"\n },\n cancelButtonType: {\n type: String,\n default: \"text\"\n },\n icon: {\n type: String,\n default: \"el-icon-question\"\n },\n iconColor: {\n type: String,\n default: \"#f90\"\n },\n hideIcon: {\n type: Boolean,\n default: false\n }\n },\n emits: [\"confirm\", \"cancel\"],\n setup(props, { emit }) {\n const { t } = useLocaleInject();\n const visible = ref(false);\n const confirm = () => {\n visible.value = false;\n emit(\"confirm\");\n };\n const cancel = () => {\n visible.value = false;\n emit(\"cancel\");\n };\n const confirmButtonText_ = computed(() => {\n return props.confirmButtonText || t(\"el.popconfirm.confirmButtonText\");\n });\n const cancelButtonText_ = computed(() => {\n return props.cancelButtonText || t(\"el.popconfirm.cancelButtonText\");\n });\n return {\n visible,\n confirm,\n cancel,\n confirmButtonText_,\n cancelButtonText_\n };\n }\n});\n\nconst _hoisted_1 = { class: \"el-popconfirm\" };\nconst _hoisted_2 = { class: \"el-popconfirm__main\" };\nconst _hoisted_3 = { class: \"el-popconfirm__action\" };\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_button = resolveComponent(\"el-button\");\n const _component_el_popper = resolveComponent(\"el-popper\");\n return openBlock(), createBlock(_component_el_popper, {\n visible: _ctx.visible,\n \"onUpdate:visible\": _cache[1] || (_cache[1] = ($event) => _ctx.visible = $event),\n trigger: \"click\",\n effect: \"light\",\n \"popper-class\": \"el-popover\",\n \"append-to-body\": \"\",\n \"fallback-placements\": [\"bottom\", \"top\", \"right\", \"left\"]\n }, {\n trigger: withCtx(() => [\n renderSlot(_ctx.$slots, \"reference\")\n ]),\n default: withCtx(() => [\n createVNode(\"div\", _hoisted_1, [\n createVNode(\"p\", _hoisted_2, [\n !_ctx.hideIcon ? (openBlock(), createBlock(\"i\", {\n key: 0,\n class: [_ctx.icon, \"el-popconfirm__icon\"],\n style: { color: _ctx.iconColor }\n }, null, 6)) : createCommentVNode(\"v-if\", true),\n createTextVNode(\" \" + toDisplayString(_ctx.title), 1)\n ]),\n createVNode(\"div\", _hoisted_3, [\n createVNode(_component_el_button, {\n size: \"mini\",\n type: _ctx.cancelButtonType,\n onClick: _ctx.cancel\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.cancelButtonText_), 1)\n ]),\n _: 1\n }, 8, [\"type\", \"onClick\"]),\n createVNode(_component_el_button, {\n size: \"mini\",\n type: _ctx.confirmButtonType,\n onClick: _ctx.confirm\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.confirmButtonText_), 1)\n ]),\n _: 1\n }, 8, [\"type\", \"onClick\"])\n ])\n ])\n ]),\n _: 1\n }, 8, [\"visible\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/popconfirm/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Popconfirm = script;\n\nexport default _Popconfirm;\n","import { defineComponent, computed, openBlock, createBlock, createVNode, renderSlot, toDisplayString, createCommentVNode } from 'vue';\n\nvar script = defineComponent({\n name: \"ElProgress\",\n props: {\n type: {\n type: String,\n default: \"line\",\n validator: (val) => [\"line\", \"circle\", \"dashboard\"].indexOf(val) > -1\n },\n percentage: {\n type: Number,\n default: 0,\n required: true,\n validator: (val) => val >= 0 && val <= 100\n },\n status: {\n type: String,\n default: \"\",\n validator: (val) => [\"\", \"success\", \"exception\", \"warning\"].indexOf(val) > -1\n },\n indeterminate: {\n type: Boolean,\n default: false\n },\n duration: {\n type: Number,\n default: 3\n },\n strokeWidth: {\n type: Number,\n default: 6\n },\n strokeLinecap: {\n type: String,\n default: \"round\"\n },\n textInside: {\n type: Boolean,\n default: false\n },\n width: {\n type: Number,\n default: 126\n },\n showText: {\n type: Boolean,\n default: true\n },\n color: {\n type: [String, Array, Function],\n default: \"\"\n },\n format: {\n type: Function,\n default: (percentage) => `${percentage}%`\n }\n },\n setup(props) {\n const barStyle = computed(() => {\n return {\n width: `${props.percentage}%`,\n animationDuration: `${props.duration}s`,\n backgroundColor: getCurrentColor(props.percentage)\n };\n });\n const relativeStrokeWidth = computed(() => {\n return (props.strokeWidth / props.width * 100).toFixed(1);\n });\n const radius = computed(() => {\n if (props.type === \"circle\" || props.type === \"dashboard\") {\n return parseInt(`${50 - parseFloat(relativeStrokeWidth.value) / 2}`, 10);\n } else {\n return 0;\n }\n });\n const trackPath = computed(() => {\n const r = radius.value;\n const isDashboard = props.type === \"dashboard\";\n return `\n M 50 50\n m 0 ${isDashboard ? \"\" : \"-\"}${r}\n a ${r} ${r} 0 1 1 0 ${isDashboard ? \"-\" : \"\"}${r * 2}\n a ${r} ${r} 0 1 1 0 ${isDashboard ? \"\" : \"-\"}${r * 2}\n `;\n });\n const perimeter = computed(() => {\n return 2 * Math.PI * radius.value;\n });\n const rate = computed(() => {\n return props.type === \"dashboard\" ? 0.75 : 1;\n });\n const strokeDashoffset = computed(() => {\n const offset = -1 * perimeter.value * (1 - rate.value) / 2;\n return `${offset}px`;\n });\n const trailPathStyle = computed(() => {\n return {\n strokeDasharray: `${perimeter.value * rate.value}px, ${perimeter.value}px`,\n strokeDashoffset: strokeDashoffset.value\n };\n });\n const circlePathStyle = computed(() => {\n return {\n strokeDasharray: `${perimeter.value * rate.value * (props.percentage / 100)}px, ${perimeter.value}px`,\n strokeDashoffset: strokeDashoffset.value,\n transition: \"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease\"\n };\n });\n const stroke = computed(() => {\n let ret;\n if (props.color) {\n ret = getCurrentColor(props.percentage);\n } else {\n switch (props.status) {\n case \"success\":\n ret = \"#13ce66\";\n break;\n case \"exception\":\n ret = \"#ff4949\";\n break;\n case \"warning\":\n ret = \"#e6a23c\";\n break;\n default:\n ret = \"#20a0ff\";\n }\n }\n return ret;\n });\n const iconClass = computed(() => {\n if (props.status === \"warning\") {\n return \"el-icon-warning\";\n }\n if (props.type === \"line\") {\n return props.status === \"success\" ? \"el-icon-circle-check\" : \"el-icon-circle-close\";\n } else {\n return props.status === \"success\" ? \"el-icon-check\" : \"el-icon-close\";\n }\n });\n const progressTextSize = computed(() => {\n return props.type === \"line\" ? 12 + props.strokeWidth * 0.4 : props.width * 0.111111 + 2;\n });\n const content = computed(() => {\n return props.format(props.percentage);\n });\n const getCurrentColor = (percentage) => {\n var _a;\n const { color } = props;\n if (typeof color === \"function\") {\n return color(percentage);\n } else if (typeof color === \"string\") {\n return color;\n } else {\n const span = 100 / color.length;\n const seriesColors = color.map((seriesColor, index) => {\n if (typeof seriesColor === \"string\") {\n return {\n color: seriesColor,\n percentage: (index + 1) * span\n };\n }\n return seriesColor;\n });\n const colorArray = seriesColors.sort((a, b) => a.percentage - b.percentage);\n for (let i = 0; i < colorArray.length; i++) {\n if (colorArray[i].percentage > percentage) {\n return colorArray[i].color;\n }\n }\n return (_a = colorArray[colorArray.length - 1]) == null ? void 0 : _a.color;\n }\n };\n const slotData = computed(() => {\n return {\n percentage: props.percentage\n };\n });\n return {\n barStyle,\n relativeStrokeWidth,\n radius,\n trackPath,\n perimeter,\n rate,\n strokeDashoffset,\n trailPathStyle,\n circlePathStyle,\n stroke,\n iconClass,\n progressTextSize,\n content,\n getCurrentColor,\n slotData\n };\n }\n});\n\nconst _hoisted_1 = {\n key: 0,\n class: \"el-progress-bar\"\n};\nconst _hoisted_2 = {\n key: 0,\n class: \"el-progress-bar__innerText\"\n};\nconst _hoisted_3 = { viewBox: \"0 0 100 100\" };\nconst _hoisted_4 = { key: 0 };\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", {\n class: [\"el-progress\", [\n `el-progress--${_ctx.type}`,\n _ctx.status ? `is-${_ctx.status}` : \"\",\n {\n \"el-progress--without-text\": !_ctx.showText,\n \"el-progress--text-inside\": _ctx.textInside\n }\n ]],\n role: \"progressbar\",\n \"aria-valuenow\": _ctx.percentage,\n \"aria-valuemin\": \"0\",\n \"aria-valuemax\": \"100\"\n }, [\n _ctx.type === \"line\" ? (openBlock(), createBlock(\"div\", _hoisted_1, [\n createVNode(\"div\", {\n class: \"el-progress-bar__outer\",\n style: { height: `${_ctx.strokeWidth}px` }\n }, [\n createVNode(\"div\", {\n class: [\n \"el-progress-bar__inner\",\n { \"el-progress-bar__inner--indeterminate\": _ctx.indeterminate }\n ],\n style: _ctx.barStyle\n }, [\n (_ctx.showText || _ctx.$slots.default) && _ctx.textInside ? (openBlock(), createBlock(\"div\", _hoisted_2, [\n renderSlot(_ctx.$slots, \"default\", _ctx.slotData, () => [\n createVNode(\"span\", null, toDisplayString(_ctx.content), 1)\n ])\n ])) : createCommentVNode(\"v-if\", true)\n ], 6)\n ], 4)\n ])) : (openBlock(), createBlock(\"div\", {\n key: 1,\n class: \"el-progress-circle\",\n style: { height: `${_ctx.width}px`, width: `${_ctx.width}px` }\n }, [\n (openBlock(), createBlock(\"svg\", _hoisted_3, [\n createVNode(\"path\", {\n class: \"el-progress-circle__track\",\n d: _ctx.trackPath,\n stroke: \"#e5e9f2\",\n \"stroke-width\": _ctx.relativeStrokeWidth,\n fill: \"none\",\n style: _ctx.trailPathStyle\n }, null, 12, [\"d\", \"stroke-width\"]),\n createVNode(\"path\", {\n class: \"el-progress-circle__path\",\n d: _ctx.trackPath,\n stroke: _ctx.stroke,\n fill: \"none\",\n \"stroke-linecap\": _ctx.strokeLinecap,\n \"stroke-width\": _ctx.percentage ? _ctx.relativeStrokeWidth : 0,\n style: _ctx.circlePathStyle\n }, null, 12, [\"d\", \"stroke\", \"stroke-linecap\", \"stroke-width\"])\n ]))\n ], 4)),\n (_ctx.showText || _ctx.$slots.default) && !_ctx.textInside ? (openBlock(), createBlock(\"div\", {\n key: 2,\n class: \"el-progress__text\",\n style: { fontSize: `${_ctx.progressTextSize}px` }\n }, [\n renderSlot(_ctx.$slots, \"default\", _ctx.slotData, () => [\n !_ctx.status ? (openBlock(), createBlock(\"span\", _hoisted_4, toDisplayString(_ctx.content), 1)) : (openBlock(), createBlock(\"i\", {\n key: 1,\n class: _ctx.iconClass\n }, null, 2))\n ])\n ], 4)) : createCommentVNode(\"v-if\", true)\n ], 10, [\"aria-valuenow\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/progress/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Progress = script;\n\nexport default _Progress;\n","import { inject, ref, computed, defineComponent, openBlock, createBlock, withKeys, withModifiers, withDirectives, createVNode, vModelRadio, renderSlot, createTextVNode, toDisplayString } from 'vue';\nimport { elFormKey, elFormItemKey } from '../el-form';\nimport { useGlobalConfig } from '../utils/util';\n\nconst radioGroupKey = \"RadioGroup\";\n\nconst useRadio = () => {\n const ELEMENT = useGlobalConfig();\n const elForm = inject(elFormKey, {});\n const elFormItem = inject(elFormItemKey, {});\n const radioGroup = inject(radioGroupKey, {});\n const focus = ref(false);\n const isGroup = computed(() => (radioGroup == null ? void 0 : radioGroup.name) === \"ElRadioGroup\");\n const elFormItemSize = computed(() => elFormItem.size || ELEMENT.size);\n return {\n isGroup,\n focus,\n radioGroup,\n elForm,\n ELEMENT,\n elFormItemSize\n };\n};\nconst useRadioAttrs = (props, {\n isGroup,\n radioGroup,\n elForm,\n model\n}) => {\n const isDisabled = computed(() => {\n return isGroup.value ? radioGroup.disabled || props.disabled || elForm.disabled : props.disabled || elForm.disabled;\n });\n const tabIndex = computed(() => {\n return isDisabled.value || isGroup.value && model.value !== props.label ? -1 : 0;\n });\n return {\n isDisabled,\n tabIndex\n };\n};\n\nvar script = defineComponent({\n name: \"ElRadioButton\",\n props: {\n label: {\n type: [String, Number, Boolean],\n default: \"\"\n },\n disabled: Boolean,\n name: {\n type: String,\n default: \"\"\n }\n },\n setup(props) {\n const {\n isGroup,\n radioGroup,\n elFormItemSize,\n ELEMENT,\n focus,\n elForm\n } = useRadio();\n const size = computed(() => {\n return radioGroup.radioGroupSize || elFormItemSize.value || ELEMENT.size;\n });\n const value = computed({\n get() {\n return radioGroup.modelValue;\n },\n set(value2) {\n radioGroup.changeEvent(value2);\n }\n });\n const {\n isDisabled,\n tabIndex\n } = useRadioAttrs(props, {\n model: value,\n elForm,\n radioGroup,\n isGroup\n });\n const activeStyle = computed(() => {\n return {\n backgroundColor: radioGroup.fill || \"\",\n borderColor: radioGroup.fill || \"\",\n boxShadow: radioGroup.fill ? `-1px 0 0 0 ${radioGroup.fill}` : \"\",\n color: radioGroup.textColor || \"\"\n };\n });\n return {\n isGroup,\n size,\n isDisabled,\n tabIndex,\n value,\n focus,\n activeStyle\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"label\", {\n class: [\"el-radio-button\", [\n _ctx.size ? \"el-radio-button--\" + _ctx.size : \"\",\n {\n \"is-active\": _ctx.value === _ctx.label,\n \"is-disabled\": _ctx.isDisabled,\n \"is-focus\": _ctx.focus\n }\n ]],\n role: \"radio\",\n \"aria-checked\": _ctx.value === _ctx.label,\n \"aria-disabled\": _ctx.isDisabled,\n tabindex: _ctx.tabIndex,\n onKeydown: _cache[5] || (_cache[5] = withKeys(withModifiers(($event) => _ctx.value = _ctx.isDisabled ? _ctx.value : _ctx.label, [\"stop\", \"prevent\"]), [\"space\"]))\n }, [\n withDirectives(createVNode(\"input\", {\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event) => _ctx.value = $event),\n class: \"el-radio-button__orig-radio\",\n value: _ctx.label,\n type: \"radio\",\n name: _ctx.name,\n disabled: _ctx.isDisabled,\n tabindex: \"-1\",\n onFocus: _cache[2] || (_cache[2] = ($event) => _ctx.focus = true),\n onBlur: _cache[3] || (_cache[3] = ($event) => _ctx.focus = false)\n }, null, 40, [\"value\", \"name\", \"disabled\"]), [\n [vModelRadio, _ctx.value]\n ]),\n createVNode(\"span\", {\n class: \"el-radio-button__inner\",\n style: _ctx.value === _ctx.label ? _ctx.activeStyle : null,\n onKeydown: _cache[4] || (_cache[4] = withModifiers(() => {\n }, [\"stop\"]))\n }, [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n createTextVNode(toDisplayString(_ctx.label), 1)\n ])\n ], 36)\n ], 42, [\"aria-checked\", \"aria-disabled\", \"tabindex\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/radio/src/radio-button.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _RadioButton = script;\n\nexport default _RadioButton;\n","import { defineComponent, ref, inject, computed, provide, reactive, toRefs, watch, onMounted, nextTick, openBlock, createBlock, renderSlot } from 'vue';\nimport { EVENT_CODE } from '../utils/aria';\nimport { UPDATE_MODEL_EVENT } from '../utils/constants';\nimport { isValidComponentSize } from '../utils/validators';\nimport { elFormItemKey } from '../el-form';\n\nconst radioGroupKey = \"RadioGroup\";\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar script = defineComponent({\n name: \"ElRadioGroup\",\n componentName: \"ElRadioGroup\",\n props: {\n modelValue: {\n type: [String, Number, Boolean],\n default: \"\"\n },\n size: {\n type: String,\n validator: isValidComponentSize\n },\n fill: {\n type: String,\n default: \"\"\n },\n textColor: {\n type: String,\n default: \"\"\n },\n disabled: Boolean\n },\n emits: [UPDATE_MODEL_EVENT, \"change\"],\n setup(props, ctx) {\n const radioGroup = ref(null);\n const elFormItem = inject(elFormItemKey, {});\n const radioGroupSize = computed(() => {\n return props.size || elFormItem.size;\n });\n const changeEvent = (value) => {\n ctx.emit(UPDATE_MODEL_EVENT, value);\n nextTick(() => {\n ctx.emit(\"change\", value);\n });\n };\n provide(radioGroupKey, reactive(__spreadProps(__spreadValues({\n name: \"ElRadioGroup\"\n }, toRefs(props)), {\n radioGroupSize,\n changeEvent\n })));\n watch(() => props.modelValue, (val) => {\n var _a;\n (_a = elFormItem.formItemMitt) == null ? void 0 : _a.emit(\"el.form.change\", [val]);\n });\n const handleKeydown = (e) => {\n const target = e.target;\n const className = target.nodeName === \"INPUT\" ? \"[type=radio]\" : \"[role=radio]\";\n const radios = radioGroup.value.querySelectorAll(className);\n const length = radios.length;\n const index = Array.from(radios).indexOf(target);\n const roleRadios = radioGroup.value.querySelectorAll(\"[role=radio]\");\n let nextIndex = null;\n switch (e.code) {\n case EVENT_CODE.left:\n case EVENT_CODE.up:\n e.stopPropagation();\n e.preventDefault();\n nextIndex = index === 0 ? length - 1 : index - 1;\n break;\n case EVENT_CODE.right:\n case EVENT_CODE.down:\n e.stopPropagation();\n e.preventDefault();\n nextIndex = index === length - 1 ? 0 : index + 1;\n break;\n }\n if (nextIndex === null)\n return;\n roleRadios[nextIndex].click();\n roleRadios[nextIndex].focus();\n };\n onMounted(() => {\n const radios = radioGroup.value.querySelectorAll(\"[type=radio]\");\n const firstLabel = radios[0];\n if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) {\n firstLabel.tabIndex = 0;\n }\n });\n return {\n handleKeydown,\n radioGroupSize,\n radioGroup\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", {\n ref: \"radioGroup\",\n class: \"el-radio-group\",\n role: \"radiogroup\",\n onKeydown: _cache[1] || (_cache[1] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args))\n }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 544);\n}\n\nscript.render = render;\nscript.__file = \"packages/radio/src/radio-group.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _RadioGroup = script;\n\nexport default _RadioGroup;\n","import { defineComponent, inject, ref, computed, watch, openBlock, createBlock, Fragment, renderList, createVNode, createCommentVNode, toDisplayString } from 'vue';\nimport { hasClass } from '../utils/dom';\nimport { EVENT_CODE } from '../utils/aria';\nimport { elFormKey } from '../el-form';\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst isArray = Array.isArray;\r\nconst isObject = (val) => val !== null && typeof val === 'object';\n\nvar script = defineComponent({\n name: \"ElRate\",\n props: {\n modelValue: {\n type: Number,\n default: 0\n },\n lowThreshold: {\n type: Number,\n default: 2\n },\n highThreshold: {\n type: Number,\n default: 4\n },\n max: {\n type: Number,\n default: 5\n },\n colors: {\n type: [Array, Object],\n default: () => [\"#F7BA2A\", \"#F7BA2A\", \"#F7BA2A\"]\n },\n voidColor: {\n type: String,\n default: \"#C6D1DE\"\n },\n disabledVoidColor: {\n type: String,\n default: \"#EFF2F7\"\n },\n iconClasses: {\n type: [Array, Object],\n default: () => [\"el-icon-star-on\", \"el-icon-star-on\", \"el-icon-star-on\"]\n },\n voidIconClass: {\n type: String,\n default: \"el-icon-star-off\"\n },\n disabledVoidIconClass: {\n type: String,\n default: \"el-icon-star-on\"\n },\n disabled: {\n type: Boolean,\n default: false\n },\n allowHalf: {\n type: Boolean,\n default: false\n },\n showText: {\n type: Boolean,\n default: false\n },\n showScore: {\n type: Boolean,\n default: false\n },\n textColor: {\n type: String,\n default: \"#1f2d3d\"\n },\n texts: {\n type: Array,\n default: () => [\"Extremely bad\", \"Disappointed\", \"Fair\", \"Satisfied\", \"Surprise\"]\n },\n scoreTemplate: {\n type: String,\n default: \"{value}\"\n }\n },\n emits: [\"update:modelValue\", \"change\"],\n setup(props, { emit }) {\n const elForm = inject(elFormKey, {});\n const currentValue = ref(props.modelValue);\n const rateDisabled = computed(() => props.disabled || elForm.disabled);\n const text = computed(() => {\n let result = \"\";\n if (props.showScore) {\n result = props.scoreTemplate.replace(/\\{\\s*value\\s*\\}/, rateDisabled.value ? `${props.modelValue}` : `${currentValue.value}`);\n } else if (props.showText) {\n result = props.texts[Math.ceil(currentValue.value) - 1];\n }\n return result;\n });\n function getValueFromMap(value, map) {\n const matchedKeys = Object.keys(map).filter((key) => {\n const val = map[key];\n const excluded = isObject(val) ? val.excluded : false;\n return excluded ? value < key : value <= key;\n }).sort((a, b) => a - b);\n const matchedValue = map[matchedKeys[0]];\n return isObject(matchedValue) ? matchedValue.value : matchedValue || \"\";\n }\n const valueDecimal = computed(() => props.modelValue * 100 - Math.floor(props.modelValue) * 100);\n const colorMap = computed(() => isArray(props.colors) ? {\n [props.lowThreshold]: props.colors[0],\n [props.highThreshold]: { value: props.colors[1], excluded: true },\n [props.max]: props.colors[2]\n } : props.colors);\n const activeColor = computed(() => getValueFromMap(currentValue.value, colorMap.value));\n const decimalStyle = computed(() => {\n let width = \"\";\n if (rateDisabled.value) {\n width = `${valueDecimal.value}%`;\n } else if (props.allowHalf) {\n width = \"50%\";\n }\n return {\n color: activeColor.value,\n width\n };\n });\n const classMap = computed(() => isArray(props.iconClasses) ? {\n [props.lowThreshold]: props.iconClasses[0],\n [props.highThreshold]: { value: props.iconClasses[1], excluded: true },\n [props.max]: props.iconClasses[2]\n } : props.iconClasses);\n const decimalIconClass = computed(() => getValueFromMap(props.modelValue, classMap.value));\n const voidClass = computed(() => rateDisabled.value ? props.disabledVoidIconClass : props.voidIconClass);\n const activeClass = computed(() => getValueFromMap(currentValue.value, classMap.value));\n const classes = computed(() => {\n let result = Array(props.max);\n let threshold = currentValue.value;\n result.fill(activeClass.value, 0, threshold);\n result.fill(voidClass.value, threshold, props.max);\n return result;\n });\n const pointerAtLeftHalf = ref(true);\n watch(() => props.modelValue, (val) => {\n currentValue.value = val;\n pointerAtLeftHalf.value = props.modelValue !== Math.floor(props.modelValue);\n });\n function showDecimalIcon(item) {\n let showWhenDisabled = rateDisabled.value && valueDecimal.value > 0 && item - 1 < props.modelValue && item > props.modelValue;\n let showWhenAllowHalf = props.allowHalf && pointerAtLeftHalf.value && item - 0.5 <= currentValue.value && item > currentValue.value;\n return showWhenDisabled || showWhenAllowHalf;\n }\n function getIconStyle(item) {\n const voidColor = rateDisabled.value ? props.disabledVoidColor : props.voidColor;\n return {\n color: item <= currentValue.value ? activeColor.value : voidColor\n };\n }\n function selectValue(value) {\n if (rateDisabled.value) {\n return;\n }\n if (props.allowHalf && pointerAtLeftHalf.value) {\n emit(\"update:modelValue\", currentValue.value);\n if (props.modelValue !== currentValue.value) {\n emit(\"change\", currentValue.value);\n }\n } else {\n emit(\"update:modelValue\", value);\n if (props.modelValue !== value) {\n emit(\"change\", value);\n }\n }\n }\n function handleKey(e) {\n if (rateDisabled.value) {\n return;\n }\n let _currentValue = currentValue.value;\n const code = e.code;\n if (code === EVENT_CODE.up || code === EVENT_CODE.right) {\n if (props.allowHalf) {\n _currentValue += 0.5;\n } else {\n _currentValue += 1;\n }\n e.stopPropagation();\n e.preventDefault();\n } else if (code === EVENT_CODE.left || code === EVENT_CODE.down) {\n if (props.allowHalf) {\n _currentValue -= 0.5;\n } else {\n _currentValue -= 1;\n }\n e.stopPropagation();\n e.preventDefault();\n }\n _currentValue = _currentValue < 0 ? 0 : _currentValue;\n _currentValue = _currentValue > props.max ? props.max : _currentValue;\n emit(\"update:modelValue\", _currentValue);\n emit(\"change\", _currentValue);\n return _currentValue;\n }\n const hoverIndex = ref(-1);\n function setCurrentValue(value, event) {\n if (rateDisabled.value) {\n return;\n }\n if (props.allowHalf) {\n let target = event.target;\n if (hasClass(target, \"el-rate__item\")) {\n target = target.querySelector(\".el-rate__icon\");\n }\n if (hasClass(target, \"el-rate__decimal\")) {\n target = target.parentNode;\n }\n pointerAtLeftHalf.value = event.offsetX * 2 <= target.clientWidth;\n currentValue.value = pointerAtLeftHalf.value ? value - 0.5 : value;\n } else {\n currentValue.value = value;\n }\n hoverIndex.value = value;\n }\n function resetCurrentValue() {\n if (rateDisabled.value) {\n return;\n }\n if (props.allowHalf) {\n pointerAtLeftHalf.value = props.modelValue !== Math.floor(props.modelValue);\n }\n currentValue.value = props.modelValue;\n hoverIndex.value = -1;\n }\n if (!props.modelValue) {\n emit(\"update:modelValue\", 0);\n }\n return {\n hoverIndex,\n currentValue,\n rateDisabled,\n text,\n decimalStyle,\n decimalIconClass,\n classes,\n showDecimalIcon,\n getIconStyle,\n selectValue,\n handleKey,\n setCurrentValue,\n resetCurrentValue\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", {\n class: \"el-rate\",\n role: \"slider\",\n \"aria-valuenow\": _ctx.currentValue,\n \"aria-valuetext\": _ctx.text,\n \"aria-valuemin\": \"0\",\n \"aria-valuemax\": _ctx.max,\n tabindex: \"0\",\n onKeydown: _cache[2] || (_cache[2] = (...args) => _ctx.handleKey && _ctx.handleKey(...args))\n }, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.max, (item, key) => {\n return openBlock(), createBlock(\"span\", {\n key,\n class: \"el-rate__item\",\n style: { cursor: _ctx.rateDisabled ? \"auto\" : \"pointer\" },\n onMousemove: ($event) => _ctx.setCurrentValue(item, $event),\n onMouseleave: _cache[1] || (_cache[1] = (...args) => _ctx.resetCurrentValue && _ctx.resetCurrentValue(...args)),\n onClick: ($event) => _ctx.selectValue(item)\n }, [\n createVNode(\"i\", {\n class: [[_ctx.classes[item - 1], { \"hover\": _ctx.hoverIndex === item }], \"el-rate__icon\"],\n style: _ctx.getIconStyle(item)\n }, [\n _ctx.showDecimalIcon(item) ? (openBlock(), createBlock(\"i\", {\n key: 0,\n class: [_ctx.decimalIconClass, \"el-rate__decimal\"],\n style: _ctx.decimalStyle\n }, null, 6)) : createCommentVNode(\"v-if\", true)\n ], 6)\n ], 44, [\"onMousemove\", \"onClick\"]);\n }), 128)),\n _ctx.showText || _ctx.showScore ? (openBlock(), createBlock(\"span\", {\n key: 0,\n class: \"el-rate__text\",\n style: { color: _ctx.textColor }\n }, toDisplayString(_ctx.text), 5)) : createCommentVNode(\"v-if\", true)\n ], 40, [\"aria-valuenow\", \"aria-valuetext\", \"aria-valuemax\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/rate/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Rate = script;\n\nexport default _Rate;\n","import { defineComponent, computed, provide, h } from 'vue';\n\nvar Row = defineComponent({\n name: \"ElRow\",\n props: {\n tag: {\n type: String,\n default: \"div\"\n },\n gutter: {\n type: Number,\n default: 0\n },\n justify: {\n type: String,\n default: \"start\"\n },\n align: {\n type: String,\n default: \"top\"\n }\n },\n setup(props, { slots }) {\n const gutter = computed(() => props.gutter);\n provide(\"ElRow\", {\n gutter\n });\n const style = computed(() => {\n const ret = {\n marginLeft: \"\",\n marginRight: \"\"\n };\n if (props.gutter) {\n ret.marginLeft = `-${props.gutter / 2}px`;\n ret.marginRight = ret.marginLeft;\n }\n return ret;\n });\n return () => {\n var _a;\n return h(props.tag, {\n class: [\n \"el-row\",\n props.justify !== \"start\" ? `is-justify-${props.justify}` : \"\",\n props.align !== \"top\" ? `is-align-${props.align}` : \"\"\n ],\n style: style.value\n }, (_a = slots.default) == null ? void 0 : _a.call(slots));\n };\n }\n});\n\nconst _Row = Row;\n_Row.install = (app) => {\n app.component(_Row.name, _Row);\n};\n\nexport default _Row;\n","import { inject, computed, nextTick, watch, ref, defineComponent, reactive, toRefs, resolveComponent, openBlock, createBlock, withKeys, withModifiers, createVNode, withCtx, toDisplayString, h, provide, onMounted, onBeforeUnmount, createCommentVNode, Fragment, renderList } from 'vue';\nimport { UPDATE_MODEL_EVENT, CHANGE_EVENT, INPUT_EVENT } from '../utils/constants';\nimport { on, off } from '../utils/dom';\nimport throwError from '../utils/error';\nimport ElInputNumber from '../el-input-number';\nimport ElTooltip from '../el-tooltip';\nimport debounce from 'lodash/debounce';\nimport { elFormKey, elFormItemKey } from '../el-form';\n\nvar __async = (__this, __arguments, generator) => {\n return new Promise((resolve, reject) => {\n var fulfilled = (value) => {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n };\n var rejected = (value) => {\n try {\n step(generator.throw(value));\n } catch (e) {\n reject(e);\n }\n };\n var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);\n step((generator = generator.apply(__this, __arguments)).next());\n });\n};\nconst useTooltip = (props, formatTooltip, showTooltip) => {\n const tooltip = ref(null);\n const tooltipVisible = ref(false);\n const enableFormat = computed(() => {\n return formatTooltip.value instanceof Function;\n });\n const formatValue = computed(() => {\n return enableFormat.value && formatTooltip.value(props.modelValue) || props.modelValue;\n });\n const displayTooltip = debounce(() => {\n showTooltip.value && (tooltipVisible.value = true);\n }, 50);\n const hideTooltip = debounce(() => {\n showTooltip.value && (tooltipVisible.value = false);\n }, 50);\n return {\n tooltip,\n tooltipVisible,\n formatValue,\n displayTooltip,\n hideTooltip\n };\n};\nconst useSliderButton = (props, initData, emit) => {\n const {\n disabled,\n min,\n max,\n step,\n showTooltip,\n precision,\n sliderSize,\n formatTooltip,\n emitChange,\n resetSize,\n updateDragging\n } = inject(\"SliderProvider\");\n const {\n tooltip,\n tooltipVisible,\n formatValue,\n displayTooltip,\n hideTooltip\n } = useTooltip(props, formatTooltip, showTooltip);\n const currentPosition = computed(() => {\n return `${(props.modelValue - min.value) / (max.value - min.value) * 100}%`;\n });\n const wrapperStyle = computed(() => {\n return props.vertical ? { bottom: currentPosition.value } : { left: currentPosition.value };\n });\n const handleMouseEnter = () => {\n initData.hovering = true;\n displayTooltip();\n };\n const handleMouseLeave = () => {\n initData.hovering = false;\n if (!initData.dragging) {\n hideTooltip();\n }\n };\n const onButtonDown = (event) => {\n if (disabled.value)\n return;\n event.preventDefault();\n onDragStart(event);\n on(window, \"mousemove\", onDragging);\n on(window, \"touchmove\", onDragging);\n on(window, \"mouseup\", onDragEnd);\n on(window, \"touchend\", onDragEnd);\n on(window, \"contextmenu\", onDragEnd);\n };\n const onLeftKeyDown = () => {\n if (disabled.value)\n return;\n initData.newPosition = parseFloat(currentPosition.value) - step.value / (max.value - min.value) * 100;\n setPosition(initData.newPosition);\n emitChange();\n };\n const onRightKeyDown = () => {\n if (disabled.value)\n return;\n initData.newPosition = parseFloat(currentPosition.value) + step.value / (max.value - min.value) * 100;\n setPosition(initData.newPosition);\n emitChange();\n };\n const getClientXY = (event) => {\n let clientX;\n let clientY;\n if (event.type.startsWith(\"touch\")) {\n clientY = event.touches[0].clientY;\n clientX = event.touches[0].clientX;\n } else {\n clientY = event.clientY;\n clientX = event.clientX;\n }\n return {\n clientX,\n clientY\n };\n };\n const onDragStart = (event) => {\n initData.dragging = true;\n initData.isClick = true;\n const {\n clientX,\n clientY\n } = getClientXY(event);\n if (props.vertical) {\n initData.startY = clientY;\n } else {\n initData.startX = clientX;\n }\n initData.startPosition = parseFloat(currentPosition.value);\n initData.newPosition = initData.startPosition;\n };\n const onDragging = (event) => {\n if (initData.dragging) {\n initData.isClick = false;\n displayTooltip();\n resetSize();\n let diff;\n const {\n clientX,\n clientY\n } = getClientXY(event);\n if (props.vertical) {\n initData.currentY = clientY;\n diff = (initData.startY - initData.currentY) / sliderSize.value * 100;\n } else {\n initData.currentX = clientX;\n diff = (initData.currentX - initData.startX) / sliderSize.value * 100;\n }\n initData.newPosition = initData.startPosition + diff;\n setPosition(initData.newPosition);\n }\n };\n const onDragEnd = () => {\n if (initData.dragging) {\n setTimeout(() => {\n initData.dragging = false;\n if (!initData.hovering) {\n hideTooltip();\n }\n if (!initData.isClick) {\n setPosition(initData.newPosition);\n emitChange();\n }\n }, 0);\n off(window, \"mousemove\", onDragging);\n off(window, \"touchmove\", onDragging);\n off(window, \"mouseup\", onDragEnd);\n off(window, \"touchend\", onDragEnd);\n off(window, \"contextmenu\", onDragEnd);\n }\n };\n const setPosition = (newPosition) => __async(undefined, null, function* () {\n if (newPosition === null || isNaN(newPosition))\n return;\n if (newPosition < 0) {\n newPosition = 0;\n } else if (newPosition > 100) {\n newPosition = 100;\n }\n const lengthPerStep = 100 / ((max.value - min.value) / step.value);\n const steps = Math.round(newPosition / lengthPerStep);\n let value = steps * lengthPerStep * (max.value - min.value) * 0.01 + min.value;\n value = parseFloat(value.toFixed(precision.value));\n emit(UPDATE_MODEL_EVENT, value);\n if (!initData.dragging && props.modelValue !== initData.oldValue) {\n initData.oldValue = props.modelValue;\n }\n yield nextTick();\n initData.dragging && displayTooltip();\n tooltip.value.updatePopper();\n });\n watch(() => initData.dragging, (val) => {\n updateDragging(val);\n });\n return {\n tooltip,\n tooltipVisible,\n showTooltip,\n wrapperStyle,\n formatValue,\n handleMouseEnter,\n handleMouseLeave,\n onButtonDown,\n onLeftKeyDown,\n onRightKeyDown,\n setPosition\n };\n};\n\nvar script = defineComponent({\n name: \"ElSliderButton\",\n components: {\n ElTooltip\n },\n props: {\n modelValue: {\n type: Number,\n default: 0\n },\n vertical: {\n type: Boolean,\n default: false\n },\n tooltipClass: {\n type: String,\n default: \"\"\n }\n },\n emits: [UPDATE_MODEL_EVENT],\n setup(props, { emit }) {\n const initData = reactive({\n hovering: false,\n dragging: false,\n isClick: false,\n startX: 0,\n currentX: 0,\n startY: 0,\n currentY: 0,\n startPosition: 0,\n newPosition: 0,\n oldValue: props.modelValue\n });\n const {\n tooltip,\n showTooltip,\n tooltipVisible,\n wrapperStyle,\n formatValue,\n handleMouseEnter,\n handleMouseLeave,\n onButtonDown,\n onLeftKeyDown,\n onRightKeyDown,\n setPosition\n } = useSliderButton(props, initData, emit);\n const { hovering, dragging } = toRefs(initData);\n return {\n tooltip,\n tooltipVisible,\n showTooltip,\n wrapperStyle,\n formatValue,\n handleMouseEnter,\n handleMouseLeave,\n onButtonDown,\n onLeftKeyDown,\n onRightKeyDown,\n setPosition,\n hovering,\n dragging\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_tooltip = resolveComponent(\"el-tooltip\");\n return openBlock(), createBlock(\"div\", {\n ref: \"button\",\n class: [\"el-slider__button-wrapper\", { hover: _ctx.hovering, dragging: _ctx.dragging }],\n style: _ctx.wrapperStyle,\n tabindex: \"0\",\n onMouseenter: _cache[2] || (_cache[2] = (...args) => _ctx.handleMouseEnter && _ctx.handleMouseEnter(...args)),\n onMouseleave: _cache[3] || (_cache[3] = (...args) => _ctx.handleMouseLeave && _ctx.handleMouseLeave(...args)),\n onMousedown: _cache[4] || (_cache[4] = (...args) => _ctx.onButtonDown && _ctx.onButtonDown(...args)),\n onTouchstart: _cache[5] || (_cache[5] = (...args) => _ctx.onButtonDown && _ctx.onButtonDown(...args)),\n onFocus: _cache[6] || (_cache[6] = (...args) => _ctx.handleMouseEnter && _ctx.handleMouseEnter(...args)),\n onBlur: _cache[7] || (_cache[7] = (...args) => _ctx.handleMouseLeave && _ctx.handleMouseLeave(...args)),\n onKeydown: [\n _cache[8] || (_cache[8] = withKeys((...args) => _ctx.onLeftKeyDown && _ctx.onLeftKeyDown(...args), [\"left\"])),\n _cache[9] || (_cache[9] = withKeys((...args) => _ctx.onRightKeyDown && _ctx.onRightKeyDown(...args), [\"right\"])),\n _cache[10] || (_cache[10] = withKeys(withModifiers((...args) => _ctx.onLeftKeyDown && _ctx.onLeftKeyDown(...args), [\"prevent\"]), [\"down\"])),\n _cache[11] || (_cache[11] = withKeys(withModifiers((...args) => _ctx.onRightKeyDown && _ctx.onRightKeyDown(...args), [\"prevent\"]), [\"up\"]))\n ]\n }, [\n createVNode(_component_el_tooltip, {\n ref: \"tooltip\",\n modelValue: _ctx.tooltipVisible,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event) => _ctx.tooltipVisible = $event),\n placement: \"top\",\n \"stop-popper-mouse-event\": false,\n \"popper-class\": _ctx.tooltipClass,\n disabled: !_ctx.showTooltip,\n manual: \"\"\n }, {\n content: withCtx(() => [\n createVNode(\"span\", null, toDisplayString(_ctx.formatValue), 1)\n ]),\n default: withCtx(() => [\n createVNode(\"div\", {\n class: [\"el-slider__button\", { hover: _ctx.hovering, dragging: _ctx.dragging }]\n }, null, 2)\n ]),\n _: 1\n }, 8, [\"modelValue\", \"popper-class\", \"disabled\"])\n ], 38);\n}\n\nscript.render = render;\nscript.__file = \"packages/slider/src/button.vue\";\n\nvar script$1 = defineComponent({\n name: \"ElMarker\",\n props: {\n mark: {\n type: [String, Object],\n default: () => void 0\n }\n },\n setup(props) {\n const label = computed(() => {\n return typeof props.mark === \"string\" ? props.mark : props.mark.label;\n });\n return {\n label\n };\n },\n render() {\n var _a;\n return h(\"div\", {\n class: \"el-slider__marks-text\",\n style: (_a = this.mark) == null ? void 0 : _a.style\n }, this.label);\n }\n});\n\nscript$1.__file = \"packages/slider/src/marker.vue\";\n\nconst useMarks = (props) => {\n return computed(() => {\n if (!props.marks) {\n return [];\n }\n const marksKeys = Object.keys(props.marks);\n return marksKeys.map(parseFloat).sort((a, b) => a - b).filter((point) => point <= props.max && point >= props.min).map((point) => ({\n point,\n position: (point - props.min) * 100 / (props.max - props.min),\n mark: props.marks[point]\n }));\n });\n};\n\nvar __async$1 = (__this, __arguments, generator) => {\n return new Promise((resolve, reject) => {\n var fulfilled = (value) => {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n };\n var rejected = (value) => {\n try {\n step(generator.throw(value));\n } catch (e) {\n reject(e);\n }\n };\n var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);\n step((generator = generator.apply(__this, __arguments)).next());\n });\n};\nconst useSlide = (props, initData, emit) => {\n const elForm = inject(elFormKey, {});\n const elFormItem = inject(elFormItemKey, {});\n const slider = ref(null);\n const firstButton = ref(null);\n const secondButton = ref(null);\n const buttonRefs = {\n firstButton,\n secondButton\n };\n const sliderDisabled = computed(() => {\n return props.disabled || (elForm.disabled || false);\n });\n const minValue = computed(() => {\n return Math.min(initData.firstValue, initData.secondValue);\n });\n const maxValue = computed(() => {\n return Math.max(initData.firstValue, initData.secondValue);\n });\n const barSize = computed(() => {\n return props.range ? `${100 * (maxValue.value - minValue.value) / (props.max - props.min)}%` : `${100 * (initData.firstValue - props.min) / (props.max - props.min)}%`;\n });\n const barStart = computed(() => {\n return props.range ? `${100 * (minValue.value - props.min) / (props.max - props.min)}%` : \"0%\";\n });\n const runwayStyle = computed(() => {\n return props.vertical ? { height: props.height } : {};\n });\n const barStyle = computed(() => {\n return props.vertical ? {\n height: barSize.value,\n bottom: barStart.value\n } : {\n width: barSize.value,\n left: barStart.value\n };\n });\n const resetSize = () => {\n if (slider.value) {\n initData.sliderSize = slider.value[`client${props.vertical ? \"Height\" : \"Width\"}`];\n }\n };\n const setPosition = (percent) => {\n const targetValue = props.min + percent * (props.max - props.min) / 100;\n if (!props.range) {\n firstButton.value.setPosition(percent);\n return;\n }\n let buttonRefName;\n if (Math.abs(minValue.value - targetValue) < Math.abs(maxValue.value - targetValue)) {\n buttonRefName = initData.firstValue < initData.secondValue ? \"firstButton\" : \"secondButton\";\n } else {\n buttonRefName = initData.firstValue > initData.secondValue ? \"firstButton\" : \"secondButton\";\n }\n buttonRefs[buttonRefName].value.setPosition(percent);\n };\n const emitChange = () => __async$1(undefined, null, function* () {\n yield nextTick();\n emit(CHANGE_EVENT, props.range ? [minValue.value, maxValue.value] : props.modelValue);\n });\n const onSliderClick = (event) => {\n if (sliderDisabled.value || initData.dragging)\n return;\n resetSize();\n if (props.vertical) {\n const sliderOffsetBottom = slider.value.getBoundingClientRect().bottom;\n setPosition((sliderOffsetBottom - event.clientY) / initData.sliderSize * 100);\n } else {\n const sliderOffsetLeft = slider.value.getBoundingClientRect().left;\n setPosition((event.clientX - sliderOffsetLeft) / initData.sliderSize * 100);\n }\n emitChange();\n };\n return {\n elFormItem,\n slider,\n firstButton,\n secondButton,\n sliderDisabled,\n minValue,\n maxValue,\n runwayStyle,\n barStyle,\n resetSize,\n setPosition,\n emitChange,\n onSliderClick\n };\n};\n\nconst useStops = (props, initData, minValue, maxValue) => {\n const stops = computed(() => {\n if (!props.showStops || props.min > props.max)\n return [];\n if (props.step === 0) {\n process.env.NODE_ENV !== \"production\" && console.warn(\"[Element Warn][Slider]step should not be 0.\");\n return [];\n }\n const stopCount = (props.max - props.min) / props.step;\n const stepWidth = 100 * props.step / (props.max - props.min);\n const result = Array.from({ length: stopCount - 1 }).map((_, index) => (index + 1) * stepWidth);\n if (props.range) {\n return result.filter((step) => {\n return step < 100 * (minValue.value - props.min) / (props.max - props.min) || step > 100 * (maxValue.value - props.min) / (props.max - props.min);\n });\n } else {\n return result.filter((step) => step > 100 * (initData.firstValue - props.min) / (props.max - props.min));\n }\n });\n const getStopStyle = (position) => {\n return props.vertical ? { \"bottom\": position + \"%\" } : { \"left\": position + \"%\" };\n };\n return {\n stops,\n getStopStyle\n };\n};\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar __async$2 = (__this, __arguments, generator) => {\n return new Promise((resolve, reject) => {\n var fulfilled = (value) => {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n };\n var rejected = (value) => {\n try {\n step(generator.throw(value));\n } catch (e) {\n reject(e);\n }\n };\n var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);\n step((generator = generator.apply(__this, __arguments)).next());\n });\n};\nvar script$2 = defineComponent({\n name: \"ElSlider\",\n components: {\n ElInputNumber,\n SliderButton: script,\n SliderMarker: script$1\n },\n props: {\n modelValue: {\n type: [Number, Array],\n default: 0\n },\n min: {\n type: Number,\n default: 0\n },\n max: {\n type: Number,\n default: 100\n },\n step: {\n type: Number,\n default: 1\n },\n showInput: {\n type: Boolean,\n default: false\n },\n showInputControls: {\n type: Boolean,\n default: true\n },\n inputSize: {\n type: String,\n default: \"small\"\n },\n showStops: {\n type: Boolean,\n default: false\n },\n showTooltip: {\n type: Boolean,\n default: true\n },\n formatTooltip: {\n type: Function,\n default: void 0\n },\n disabled: {\n type: Boolean,\n default: false\n },\n range: {\n type: Boolean,\n default: false\n },\n vertical: {\n type: Boolean,\n default: false\n },\n height: {\n type: String,\n default: \"\"\n },\n debounce: {\n type: Number,\n default: 300\n },\n label: {\n type: String,\n default: void 0\n },\n tooltipClass: {\n type: String,\n default: void 0\n },\n marks: Object\n },\n emits: [UPDATE_MODEL_EVENT, CHANGE_EVENT, INPUT_EVENT],\n setup(props, { emit }) {\n const initData = reactive({\n firstValue: 0,\n secondValue: 0,\n oldValue: 0,\n dragging: false,\n sliderSize: 1\n });\n const {\n elFormItem,\n slider,\n firstButton,\n secondButton,\n sliderDisabled,\n minValue,\n maxValue,\n runwayStyle,\n barStyle,\n resetSize,\n emitChange,\n onSliderClick\n } = useSlide(props, initData, emit);\n const {\n stops,\n getStopStyle\n } = useStops(props, initData, minValue, maxValue);\n const markList = useMarks(props);\n useWatch(props, initData, minValue, maxValue, emit, elFormItem);\n const precision = computed(() => {\n let precisions = [props.min, props.max, props.step].map((item) => {\n let decimal = (\"\" + item).split(\".\")[1];\n return decimal ? decimal.length : 0;\n });\n return Math.max.apply(null, precisions);\n });\n const { sliderWrapper } = useLifecycle(props, initData, resetSize);\n const {\n firstValue,\n secondValue,\n oldValue,\n dragging,\n sliderSize\n } = toRefs(initData);\n const updateDragging = (val) => {\n initData.dragging = val;\n };\n provide(\"SliderProvider\", __spreadProps(__spreadValues({}, toRefs(props)), {\n sliderSize,\n disabled: sliderDisabled,\n precision,\n emitChange,\n resetSize,\n updateDragging\n }));\n return {\n firstValue,\n secondValue,\n oldValue,\n dragging,\n sliderSize,\n slider,\n firstButton,\n secondButton,\n sliderDisabled,\n runwayStyle,\n barStyle,\n emitChange,\n onSliderClick,\n getStopStyle,\n stops,\n markList,\n sliderWrapper\n };\n }\n});\nconst useWatch = (props, initData, minValue, maxValue, emit, elFormItem) => {\n const _emit = (val) => {\n emit(UPDATE_MODEL_EVENT, val);\n emit(INPUT_EVENT, val);\n };\n const valueChanged = () => {\n if (props.range) {\n return ![minValue.value, maxValue.value].every((item, index) => item === initData.oldValue[index]);\n } else {\n return props.modelValue !== initData.oldValue;\n }\n };\n const setValues = () => {\n var _a, _b;\n if (props.min > props.max) {\n throwError(\"Slider\", \"min should not be greater than max.\");\n return;\n }\n const val = props.modelValue;\n if (props.range && Array.isArray(val)) {\n if (val[1] < props.min) {\n _emit([props.min, props.min]);\n } else if (val[0] > props.max) {\n _emit([props.max, props.max]);\n } else if (val[0] < props.min) {\n _emit([props.min, val[1]]);\n } else if (val[1] > props.max) {\n _emit([val[0], props.max]);\n } else {\n initData.firstValue = val[0];\n initData.secondValue = val[1];\n if (valueChanged()) {\n (_a = elFormItem.formItemMitt) == null ? void 0 : _a.emit(\"el.form.change\", [minValue.value, maxValue.value]);\n initData.oldValue = val.slice();\n }\n }\n } else if (!props.range && typeof val === \"number\" && !isNaN(val)) {\n if (val < props.min) {\n _emit(props.min);\n } else if (val > props.max) {\n _emit(props.max);\n } else {\n initData.firstValue = val;\n if (valueChanged()) {\n (_b = elFormItem.formItemMitt) == null ? void 0 : _b.emit(\"el.form.change\", val);\n initData.oldValue = val;\n }\n }\n }\n };\n setValues();\n watch(() => initData.dragging, (val) => {\n if (!val) {\n setValues();\n }\n });\n watch(() => initData.firstValue, (val) => {\n if (props.range) {\n _emit([minValue.value, maxValue.value]);\n } else {\n _emit(val);\n }\n });\n watch(() => initData.secondValue, () => {\n if (props.range) {\n _emit([minValue.value, maxValue.value]);\n }\n });\n watch(() => props.modelValue, (val, oldVal) => {\n if (initData.dragging || Array.isArray(val) && Array.isArray(oldVal) && val.every((item, index) => item === oldVal[index])) {\n return;\n }\n setValues();\n });\n watch(() => [props.min, props.max], () => {\n setValues();\n });\n};\nconst useLifecycle = (props, initData, resetSize) => {\n const sliderWrapper = ref(null);\n onMounted(() => __async$2(undefined, null, function* () {\n let valuetext;\n if (props.range) {\n if (Array.isArray(props.modelValue)) {\n initData.firstValue = Math.max(props.min, props.modelValue[0]);\n initData.secondValue = Math.min(props.max, props.modelValue[1]);\n } else {\n initData.firstValue = props.min;\n initData.secondValue = props.max;\n }\n initData.oldValue = [initData.firstValue, initData.secondValue];\n valuetext = `${initData.firstValue}-${initData.secondValue}`;\n } else {\n if (typeof props.modelValue !== \"number\" || isNaN(props.modelValue)) {\n initData.firstValue = props.min;\n } else {\n initData.firstValue = Math.min(props.max, Math.max(props.min, props.modelValue));\n }\n initData.oldValue = initData.firstValue;\n valuetext = initData.firstValue;\n }\n sliderWrapper.value.setAttribute(\"aria-valuetext\", valuetext);\n sliderWrapper.value.setAttribute(\"aria-label\", props.label ? props.label : `slider between ${props.min} and ${props.max}`);\n on(window, \"resize\", resetSize);\n yield nextTick();\n resetSize();\n }));\n onBeforeUnmount(() => {\n off(window, \"resize\", resetSize);\n });\n return {\n sliderWrapper\n };\n};\n\nconst _hoisted_1 = { key: 1 };\nconst _hoisted_2 = { class: \"el-slider__marks\" };\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_input_number = resolveComponent(\"el-input-number\");\n const _component_slider_button = resolveComponent(\"slider-button\");\n const _component_slider_marker = resolveComponent(\"slider-marker\");\n return openBlock(), createBlock(\"div\", {\n ref: \"sliderWrapper\",\n class: [\"el-slider\", { \"is-vertical\": _ctx.vertical, \"el-slider--with-input\": _ctx.showInput }],\n role: \"slider\",\n \"aria-valuemin\": _ctx.min,\n \"aria-valuemax\": _ctx.max,\n \"aria-orientation\": _ctx.vertical ? \"vertical\" : \"horizontal\",\n \"aria-disabled\": _ctx.sliderDisabled\n }, [\n _ctx.showInput && !_ctx.range ? (openBlock(), createBlock(_component_el_input_number, {\n key: 0,\n ref: \"input\",\n modelValue: _ctx.firstValue,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event) => _ctx.firstValue = $event),\n class: \"el-slider__input\",\n step: _ctx.step,\n disabled: _ctx.sliderDisabled,\n controls: _ctx.showInputControls,\n min: _ctx.min,\n max: _ctx.max,\n debounce: _ctx.debounce,\n size: _ctx.inputSize,\n onChange: _ctx.emitChange\n }, null, 8, [\"modelValue\", \"step\", \"disabled\", \"controls\", \"min\", \"max\", \"debounce\", \"size\", \"onChange\"])) : createCommentVNode(\"v-if\", true),\n createVNode(\"div\", {\n ref: \"slider\",\n class: [\"el-slider__runway\", { \"show-input\": _ctx.showInput && !_ctx.range, \"disabled\": _ctx.sliderDisabled }],\n style: _ctx.runwayStyle,\n onClick: _cache[4] || (_cache[4] = (...args) => _ctx.onSliderClick && _ctx.onSliderClick(...args))\n }, [\n createVNode(\"div\", {\n class: \"el-slider__bar\",\n style: _ctx.barStyle\n }, null, 4),\n createVNode(_component_slider_button, {\n ref: \"firstButton\",\n modelValue: _ctx.firstValue,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event) => _ctx.firstValue = $event),\n vertical: _ctx.vertical,\n \"tooltip-class\": _ctx.tooltipClass\n }, null, 8, [\"modelValue\", \"vertical\", \"tooltip-class\"]),\n _ctx.range ? (openBlock(), createBlock(_component_slider_button, {\n key: 0,\n ref: \"secondButton\",\n modelValue: _ctx.secondValue,\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = ($event) => _ctx.secondValue = $event),\n vertical: _ctx.vertical,\n \"tooltip-class\": _ctx.tooltipClass\n }, null, 8, [\"modelValue\", \"vertical\", \"tooltip-class\"])) : createCommentVNode(\"v-if\", true),\n _ctx.showStops ? (openBlock(), createBlock(\"div\", _hoisted_1, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.stops, (item, key) => {\n return openBlock(), createBlock(\"div\", {\n key,\n class: \"el-slider__stop\",\n style: _ctx.getStopStyle(item)\n }, null, 4);\n }), 128))\n ])) : createCommentVNode(\"v-if\", true),\n _ctx.markList.length > 0 ? (openBlock(), createBlock(Fragment, { key: 2 }, [\n createVNode(\"div\", null, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.markList, (item, key) => {\n return openBlock(), createBlock(\"div\", {\n key,\n style: _ctx.getStopStyle(item.position),\n class: \"el-slider__stop el-slider__marks-stop\"\n }, null, 4);\n }), 128))\n ]),\n createVNode(\"div\", _hoisted_2, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.markList, (item, key) => {\n return openBlock(), createBlock(_component_slider_marker, {\n key,\n mark: item.mark,\n style: _ctx.getStopStyle(item.position)\n }, null, 8, [\"mark\", \"style\"]);\n }), 128))\n ])\n ], 64)) : createCommentVNode(\"v-if\", true)\n ], 6)\n ], 10, [\"aria-valuemin\", \"aria-valuemax\", \"aria-orientation\", \"aria-disabled\"]);\n}\n\nscript$2.render = render$1;\nscript$2.__file = \"packages/slider/src/index.vue\";\n\nscript$2.install = (app) => {\n app.component(script$2.name, script$2);\n};\nconst _Slider = script$2;\n\nexport default _Slider;\n","import { defineComponent, ref, inject, getCurrentInstance, onMounted, watch, onBeforeUnmount, computed, reactive, openBlock, createBlock, createCommentVNode, createVNode, renderSlot, toDisplayString, createTextVNode } from 'vue';\n\nvar script = defineComponent({\n name: \"ElStep\",\n props: {\n title: {\n type: String,\n default: \"\"\n },\n icon: {\n type: String,\n default: \"\"\n },\n description: {\n type: String,\n default: \"\"\n },\n status: {\n type: String,\n default: \"\",\n validator: (val) => [\"\", \"wait\", \"process\", \"finish\", \"error\", \"success\"].includes(val)\n }\n },\n setup(props) {\n const index = ref(-1);\n const lineStyle = ref({});\n const internalStatus = ref(\"\");\n const parent = inject(\"ElSteps\");\n const currentInstance = getCurrentInstance();\n onMounted(() => {\n watch([() => parent.props.active, () => parent.props.processStatus, () => parent.props.finishStatus], ([active]) => {\n updateStatus(active);\n }, { immediate: true });\n });\n onBeforeUnmount(() => {\n parent.steps.value = parent.steps.value.filter((instance) => instance.uid !== currentInstance.uid);\n });\n const currentStatus = computed(() => {\n return props.status || internalStatus.value;\n });\n const prevStatus = computed(() => {\n const prevStep = parent.steps.value[index.value - 1];\n return prevStep ? prevStep.currentStatus : \"wait\";\n });\n const isCenter = computed(() => {\n return parent.props.alignCenter;\n });\n const isVertical = computed(() => {\n return parent.props.direction === \"vertical\";\n });\n const isSimple = computed(() => {\n return parent.props.simple;\n });\n const stepsCount = computed(() => {\n return parent.steps.value.length;\n });\n const isLast = computed(() => {\n var _a;\n return ((_a = parent.steps.value[stepsCount.value - 1]) == null ? void 0 : _a.uid) === currentInstance.uid;\n });\n const space = computed(() => {\n return isSimple.value ? \"\" : parent.props.space;\n });\n const style = computed(() => {\n const style2 = {\n flexBasis: typeof space.value === \"number\" ? `${space.value}px` : space.value ? space.value : 100 / (stepsCount.value - (isCenter.value ? 0 : 1)) + \"%\"\n };\n if (isVertical.value)\n return style2;\n if (isLast.value) {\n style2.maxWidth = 100 / stepsCount.value + \"%\";\n }\n return style2;\n });\n const setIndex = (val) => {\n index.value = val;\n };\n const calcProgress = (status) => {\n let step = 100;\n const style2 = {};\n style2.transitionDelay = 150 * index.value + \"ms\";\n if (status === parent.props.processStatus) {\n step = 0;\n } else if (status === \"wait\") {\n step = 0;\n style2.transitionDelay = -150 * index.value + \"ms\";\n }\n style2.borderWidth = step && !isSimple.value ? \"1px\" : 0;\n style2[parent.props.direction === \"vertical\" ? \"height\" : \"width\"] = `${step}%`;\n lineStyle.value = style2;\n };\n const updateStatus = (activeIndex) => {\n if (activeIndex > index.value) {\n internalStatus.value = parent.props.finishStatus;\n } else if (activeIndex === index.value && prevStatus.value !== \"error\") {\n internalStatus.value = parent.props.processStatus;\n } else {\n internalStatus.value = \"wait\";\n }\n const prevChild = parent.steps.value[stepsCount.value - 1];\n if (prevChild)\n prevChild.calcProgress(internalStatus.value);\n };\n const stepItemState = reactive({\n uid: computed(() => currentInstance.uid),\n currentStatus,\n setIndex,\n calcProgress\n });\n parent.steps.value = [...parent.steps.value, stepItemState];\n return {\n index,\n lineStyle,\n currentStatus,\n isCenter,\n isVertical,\n isSimple,\n isLast,\n space,\n style,\n parent,\n setIndex,\n calcProgress,\n updateStatus\n };\n }\n});\n\nconst _hoisted_1 = { class: \"el-step__line\" };\nconst _hoisted_2 = {\n key: 1,\n class: \"el-step__icon-inner\"\n};\nconst _hoisted_3 = { class: \"el-step__main\" };\nconst _hoisted_4 = {\n key: 0,\n class: \"el-step__arrow\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", {\n style: _ctx.style,\n class: [\n \"el-step\",\n _ctx.isSimple ? \"is-simple\" : `is-${_ctx.parent.props.direction}`,\n _ctx.isLast && !_ctx.space && !_ctx.isCenter && \"is-flex\",\n _ctx.isCenter && !_ctx.isVertical && !_ctx.isSimple && \"is-center\"\n ]\n }, [\n createCommentVNode(\" icon & line \"),\n createVNode(\"div\", {\n class: [\"el-step__head\", `is-${_ctx.currentStatus}`]\n }, [\n createVNode(\"div\", _hoisted_1, [\n createVNode(\"i\", {\n class: \"el-step__line-inner\",\n style: _ctx.lineStyle\n }, null, 4)\n ]),\n createVNode(\"div\", {\n class: [\"el-step__icon\", `is-${_ctx.icon ? \"icon\" : \"text\"}`]\n }, [\n _ctx.currentStatus !== \"success\" && _ctx.currentStatus !== \"error\" ? renderSlot(_ctx.$slots, \"icon\", { key: 0 }, () => [\n _ctx.icon ? (openBlock(), createBlock(\"i\", {\n key: 0,\n class: [\"el-step__icon-inner\", _ctx.icon]\n }, null, 2)) : createCommentVNode(\"v-if\", true),\n !_ctx.icon && !_ctx.isSimple ? (openBlock(), createBlock(\"div\", _hoisted_2, toDisplayString(_ctx.index + 1), 1)) : createCommentVNode(\"v-if\", true)\n ]) : (openBlock(), createBlock(\"i\", {\n key: 1,\n class: [\"el-step__icon-inner\", \"is-status\", `el-icon-${_ctx.currentStatus === \"success\" ? \"check\" : \"close\"}`]\n }, null, 2))\n ], 2)\n ], 2),\n createCommentVNode(\" title & description \"),\n createVNode(\"div\", _hoisted_3, [\n createVNode(\"div\", {\n class: [\"el-step__title\", `is-${_ctx.currentStatus}`]\n }, [\n renderSlot(_ctx.$slots, \"title\", {}, () => [\n createTextVNode(toDisplayString(_ctx.title), 1)\n ])\n ], 2),\n _ctx.isSimple ? (openBlock(), createBlock(\"div\", _hoisted_4)) : (openBlock(), createBlock(\"div\", {\n key: 1,\n class: [\"el-step__description\", `is-${_ctx.currentStatus}`]\n }, [\n renderSlot(_ctx.$slots, \"description\", {}, () => [\n createTextVNode(toDisplayString(_ctx.description), 1)\n ])\n ], 2))\n ])\n ], 6);\n}\n\nscript.render = render;\nscript.__file = \"packages/steps/src/item.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Step = script;\n\nexport default _Step;\n","import { defineComponent, ref, watch, provide, openBlock, createBlock, renderSlot } from 'vue';\nimport { CHANGE_EVENT } from '../utils/constants';\n\nvar script = defineComponent({\n name: \"ElSteps\",\n props: {\n space: {\n type: [Number, String],\n default: \"\"\n },\n active: {\n type: Number,\n default: 0\n },\n direction: {\n type: String,\n default: \"horizontal\",\n validator: (val) => [\"horizontal\", \"vertical\"].includes(val)\n },\n alignCenter: {\n type: Boolean,\n default: false\n },\n simple: {\n type: Boolean,\n default: false\n },\n finishStatus: {\n type: String,\n default: \"finish\",\n validator: (val) => [\"wait\", \"process\", \"finish\", \"error\", \"success\"].includes(val)\n },\n processStatus: {\n type: String,\n default: \"process\",\n validator: (val) => [\"wait\", \"process\", \"finish\", \"error\", \"success\"].includes(val)\n }\n },\n emits: [CHANGE_EVENT],\n setup(props, { emit }) {\n const steps = ref([]);\n watch(steps, () => {\n steps.value.forEach((instance, index) => {\n instance.setIndex(index);\n });\n });\n provide(\"ElSteps\", { props, steps });\n watch(() => props.active, (newVal, oldVal) => {\n emit(CHANGE_EVENT, newVal, oldVal);\n });\n return {\n steps\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", {\n class: [\"el-steps\", _ctx.simple ? \"el-steps--simple\" : `el-steps--${_ctx.direction}`]\n }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 2);\n}\n\nscript.render = render;\nscript.__file = \"packages/steps/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Steps = script;\n\nexport default _Steps;\n","import mitt from 'mitt';\nimport { inject, computed, defineComponent, reactive, ref, getCurrentInstance, provide, onBeforeMount, onMounted, onBeforeUnmount, h, Fragment, withDirectives, vShow } from 'vue';\nimport ElCollapseTransition from '../el-collapse-transition';\nimport ElPopper from '../el-popper';\n\nfunction useMenu(instance, currentIndex) {\n const rootMenu = inject(\"rootMenu\");\n const indexPath = computed(() => {\n let parent = instance.parent;\n const path = [currentIndex];\n while (parent.type.name !== \"ElMenu\") {\n if (parent.props.index) {\n path.unshift(parent.props.index);\n }\n parent = parent.parent;\n }\n return path;\n });\n const parentMenu = computed(() => {\n let parent = instance.parent;\n while (parent && [\"ElMenu\", \"ElSubmenu\"].indexOf(parent.type.name) === -1) {\n parent = parent.parent;\n }\n return parent;\n });\n const paddingStyle = computed(() => {\n let parent = instance.parent;\n if (rootMenu.props.mode !== \"vertical\")\n return {};\n let padding = 20;\n if (rootMenu.props.collapse) {\n padding = 20;\n } else {\n while (parent && parent.type.name !== \"ElMenu\") {\n if (parent.type.name === \"ElSubmenu\") {\n padding += 20;\n }\n parent = parent.parent;\n }\n }\n return { paddingLeft: padding + \"px\" };\n });\n return { parentMenu, paddingStyle, indexPath };\n}\n\nvar script = defineComponent({\n name: \"ElSubmenu\",\n componentName: \"ElSubmenu\",\n props: {\n index: {\n type: String,\n required: true\n },\n showTimeout: {\n type: Number,\n default: 300\n },\n hideTimeout: {\n type: Number,\n default: 300\n },\n popperClass: String,\n disabled: Boolean,\n popperAppendToBody: {\n type: Boolean,\n default: void 0\n }\n },\n setup(props) {\n const data = reactive({\n popperJS: null,\n timeout: null,\n items: {},\n submenus: {},\n currentPlacement: \"\",\n mouseInChild: false,\n opened: false\n });\n const verticalTitleRef = ref(null);\n const popperVnode = ref(null);\n const instance = getCurrentInstance();\n const { paddingStyle, indexPath, parentMenu } = useMenu(instance, props.index);\n const {\n openedMenus,\n isMenuPopup,\n hoverBackground: rootHoverBackground,\n methods: rootMethods,\n props: rootProps,\n methods: { closeMenu },\n rootMenuOn,\n rootMenuEmit\n } = inject(\"rootMenu\");\n const {\n addSubMenu: parentAddSubmenu,\n removeSubMenu: parentRemoveSubmenu,\n handleMouseleave: parentHandleMouseleave\n } = inject(`subMenu:${parentMenu.value.uid}`);\n const submenuTitleIcon = computed(() => {\n return mode.value === \"horizontal\" && isFirstLevel.value || mode.value === \"vertical\" && !rootProps.collapse ? \"el-icon-arrow-down\" : \"el-icon-arrow-right\";\n });\n const isFirstLevel = computed(() => {\n let isFirstLevel2 = true;\n let parent = instance.parent;\n while (parent && parent.type.name !== \"ElMenu\") {\n if ([\"ElSubmenu\", \"ElMenuItemGroup\"].includes(parent.type.name)) {\n isFirstLevel2 = false;\n break;\n } else {\n parent = parent.parent;\n }\n }\n return isFirstLevel2;\n });\n const appendToBody = computed(() => {\n return props.popperAppendToBody === void 0 ? isFirstLevel.value : Boolean(props.popperAppendToBody);\n });\n const menuTransitionName = computed(() => {\n return rootProps.collapse ? \"el-zoom-in-left\" : \"el-zoom-in-top\";\n });\n const opened = computed(() => {\n return openedMenus.value.includes(props.index);\n });\n const active = computed(() => {\n let isActive = false;\n const submenus = data.submenus;\n const items = data.items;\n Object.keys(items).forEach((index) => {\n if (items[index].active) {\n isActive = true;\n }\n });\n Object.keys(submenus).forEach((index) => {\n if (submenus[index].active) {\n isActive = true;\n }\n });\n return isActive;\n });\n const backgroundColor = computed(() => {\n return rootProps.backgroundColor || \"\";\n });\n const activeTextColor = computed(() => {\n return rootProps.activeTextColor || \"\";\n });\n const textColor = computed(() => {\n return rootProps.textColor || \"\";\n });\n const mode = computed(() => {\n return rootProps.mode;\n });\n const titleStyle = computed(() => {\n if (mode.value !== \"horizontal\") {\n return {\n color: textColor.value\n };\n }\n return {\n borderBottomColor: active.value ? rootProps.activeTextColor ? activeTextColor.value : \"\" : \"transparent\",\n color: active.value ? activeTextColor.value : textColor.value\n };\n });\n const subMenuEmitter = mitt();\n const doDestroy = () => {\n var _a;\n (_a = popperVnode.value) == null ? void 0 : _a.doDestroy();\n };\n const handleCollapseToggle = (value) => {\n if (value) {\n updatePlacement();\n } else {\n doDestroy();\n }\n };\n const addItem = (item) => {\n data.items[item.index] = item;\n };\n const removeItem = (item) => {\n delete data.items[item.index];\n };\n const addSubMenu = (item) => {\n data.submenus[item.index] = item;\n };\n const removeSubMenu = (item) => {\n delete data.submenus[item.index];\n };\n const handleClick = () => {\n const disabled = props.disabled;\n if (rootProps.menuTrigger === \"hover\" && rootProps.mode === \"horizontal\" || rootProps.collapse && rootProps.mode === \"vertical\" || disabled) {\n return;\n }\n rootMenuEmit(\"submenu:submenu-click\", { index: props.index, indexPath });\n };\n const handleMouseenter = (event, showTimeout = props.showTimeout) => {\n if (!(\"ActiveXObject\" in window) && event.type === \"focus\" && !event.relatedTarget) {\n return;\n }\n const disabled = props.disabled;\n if (rootProps.menuTrigger === \"click\" && rootProps.mode === \"horizontal\" || !rootProps.collapse && rootProps.mode === \"vertical\" || disabled) {\n return;\n }\n subMenuEmitter.emit(\"submenu:mouse-enter-child\");\n clearTimeout(data.timeout);\n data.timeout = setTimeout(() => {\n rootMethods.openMenu(props.index, indexPath);\n }, showTimeout);\n if (appendToBody.value) {\n parentMenu.value.vnode.el.dispatchEvent(new MouseEvent(\"mouseenter\"));\n }\n };\n const handleMouseleave = (deepDispatch = false) => {\n if (rootProps.menuTrigger === \"click\" && rootProps.mode === \"horizontal\" || !rootProps.collapse && rootProps.mode === \"vertical\") {\n return;\n }\n subMenuEmitter.emit(\"submenu:mouse-leave-child\");\n clearTimeout(data.timeout);\n data.timeout = setTimeout(() => {\n !data.mouseInChild && closeMenu(props.index);\n }, props.hideTimeout);\n if (appendToBody.value && deepDispatch) {\n if (instance.parent.type.name === \"ElSubmenu\") {\n parentHandleMouseleave(true);\n }\n }\n };\n const handleTitleMouseenter = () => {\n var _a;\n if (mode.value === \"horizontal\" && !rootProps.backgroundColor)\n return;\n const title = ((_a = popperVnode.value) == null ? void 0 : _a.triggerRef) || verticalTitleRef.value;\n title && (title.style.backgroundColor = rootHoverBackground.value);\n };\n const handleTitleMouseleave = () => {\n var _a;\n if (mode.value === \"horizontal\" && !rootProps.backgroundColor)\n return;\n const title = ((_a = popperVnode.value) == null ? void 0 : _a.triggerRef) || verticalTitleRef.value;\n title && (title.style.backgroundColor = rootProps.backgroundColor || \"\");\n };\n const updatePlacement = () => {\n data.currentPlacement = mode.value === \"horizontal\" && isFirstLevel.value ? \"bottom-start\" : \"right-start\";\n };\n provide(`subMenu:${instance.uid}`, {\n addSubMenu,\n removeSubMenu,\n handleMouseleave\n });\n onBeforeMount(() => {\n rootMenuOn(\"rootMenu:toggle-collapse\", (val) => {\n handleCollapseToggle(val);\n });\n subMenuEmitter.on(\"submenu:mouse-enter-child\", () => {\n data.mouseInChild = true;\n clearTimeout(data.timeout);\n });\n subMenuEmitter.on(\"submenu:mouse-leave-child\", () => {\n data.mouseInChild = false;\n clearTimeout(data.timeout);\n });\n });\n onMounted(() => {\n rootMethods.addSubMenu({\n index: props.index,\n indexPath,\n active\n });\n parentAddSubmenu({\n index: props.index,\n indexPath,\n active\n });\n updatePlacement();\n });\n onBeforeUnmount(() => {\n parentRemoveSubmenu({\n index: props.index,\n indexPath,\n active\n });\n rootMethods.removeSubMenu({\n index: props.index,\n indexPath,\n active\n });\n });\n return {\n data,\n props,\n mode,\n active,\n isMenuPopup,\n opened,\n paddingStyle,\n titleStyle,\n backgroundColor,\n rootProps,\n menuTransitionName,\n submenuTitleIcon,\n appendToBody,\n handleClick,\n handleMouseenter,\n handleMouseleave,\n handleTitleMouseenter,\n handleTitleMouseleave,\n addItem,\n removeItem,\n addSubMenu,\n removeSubMenu,\n popperVnode,\n verticalTitleRef\n };\n },\n render() {\n var _a, _b;\n const titleTag = [\n (_b = (_a = this.$slots).title) == null ? void 0 : _b.call(_a),\n h(\"i\", {\n class: [\"el-submenu__icon-arrow\", this.submenuTitleIcon]\n }, null)\n ];\n const ulStyle = {\n backgroundColor: this.rootProps.backgroundColor || \"\"\n };\n const child = this.isMenuPopup ? h(ElPopper, {\n ref: \"popperVNode\",\n manualMode: true,\n visible: this.opened,\n \"onUpdate:visible\": (val) => this.opened = val,\n effect: \"light\",\n pure: true,\n offset: 6,\n showArrow: false,\n popperClass: this.popperClass,\n placement: this.data.currentPlacement,\n appendToBody: this.appendToBody,\n transition: this.menuTransitionName,\n gpuAcceleration: false\n }, {\n default: () => {\n var _a2, _b2;\n return h(\"div\", {\n ref: \"menu\",\n class: [\n `el-menu--${this.mode}`,\n this.popperClass\n ],\n onMouseenter: ($event) => this.handleMouseenter($event, 100),\n onMouseleave: () => this.handleMouseleave(true),\n onFocus: ($event) => this.handleMouseenter($event, 100)\n }, [\n h(\"ul\", {\n class: [\n \"el-menu el-menu--popup\",\n `el-menu--popup-${this.data.currentPlacement}`\n ],\n style: ulStyle\n }, [(_b2 = (_a2 = this.$slots).default) == null ? void 0 : _b2.call(_a2)])\n ]);\n },\n trigger: () => h(\"div\", {\n class: \"el-submenu__title\",\n style: [this.paddingStyle, this.titleStyle, { backgroundColor: this.backgroundColor }],\n onClick: this.handleClick,\n onMouseenter: this.handleTitleMouseenter,\n onMouseleave: this.handleTitleMouseleave\n }, titleTag)\n }) : h(Fragment, {}, [\n h(\"div\", {\n class: \"el-submenu__title\",\n style: [this.paddingStyle, this.titleStyle, { backgroundColor: this.backgroundColor }],\n ref: \"verticalTitleRef\",\n onClick: this.handleClick,\n onMouseenter: this.handleTitleMouseenter,\n onMouseleave: this.handleTitleMouseleave\n }, titleTag),\n h(ElCollapseTransition, {}, {\n default: () => {\n var _a2, _b2;\n return withDirectives(h(\"ul\", {\n role: \"menu\",\n class: \"el-menu el-menu--inline\",\n style: ulStyle\n }, [(_b2 = (_a2 = this.$slots).default) == null ? void 0 : _b2.call(_a2)]), [[vShow, this.opened]]);\n }\n })\n ]);\n return h(\"li\", {\n class: [\n \"el-submenu\",\n {\n \"is-active\": this.active,\n \"is-opened\": this.opened,\n \"is-disabled\": this.disabled\n }\n ],\n role: \"menuitem\",\n ariaHaspopup: true,\n ariaExpanded: this.opened,\n onMouseenter: this.handleMouseenter,\n onMouseleave: () => this.handleMouseleave(true),\n onFocus: this.handleMouseenter\n }, [child]);\n }\n});\n\nscript.__file = \"packages/menu/src/submenu.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Submenu = script;\n\nexport default _Submenu;\n","import { defineComponent, inject, ref, watch, computed, onMounted, nextTick, openBlock, createBlock, withModifiers, createVNode, withKeys, createCommentVNode, toDisplayString } from 'vue';\nimport { elFormKey, elFormItemKey } from '../el-form';\nimport { isBool } from '../utils/util';\nimport throwError, { warn } from '../utils/error';\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst isFunction = (val) => typeof val === 'function';\r\nconst isObject = (val) => val !== null && typeof val === 'object';\r\nconst isPromise = (val) => {\r\n return isObject(val) && isFunction(val.then) && isFunction(val.catch);\r\n};\n\nvar script = defineComponent({\n name: \"ElSwitch\",\n props: {\n modelValue: {\n type: [Boolean, String, Number],\n default: false\n },\n value: {\n type: [Boolean, String, Number],\n default: false\n },\n disabled: {\n type: Boolean,\n default: false\n },\n width: {\n type: Number,\n default: 40\n },\n activeIconClass: {\n type: String,\n default: \"\"\n },\n inactiveIconClass: {\n type: String,\n default: \"\"\n },\n activeText: {\n type: String,\n default: \"\"\n },\n inactiveText: {\n type: String,\n default: \"\"\n },\n activeColor: {\n type: String,\n default: \"\"\n },\n inactiveColor: {\n type: String,\n default: \"\"\n },\n activeValue: {\n type: [Boolean, String, Number],\n default: true\n },\n inactiveValue: {\n type: [Boolean, String, Number],\n default: false\n },\n name: {\n type: String,\n default: \"\"\n },\n validateEvent: {\n type: Boolean,\n default: true\n },\n id: String,\n loading: {\n type: Boolean,\n default: false\n },\n beforeChange: Function\n },\n emits: [\"update:modelValue\", \"change\", \"input\"],\n setup(props, ctx) {\n const elForm = inject(elFormKey, {});\n const elFormItem = inject(elFormItemKey, {});\n const isModelValue = ref(props.modelValue !== false);\n const input = ref(null);\n const core = ref(null);\n const scope = \"ElSwitch\";\n watch(() => props.modelValue, () => {\n isModelValue.value = true;\n });\n watch(() => props.value, () => {\n isModelValue.value = false;\n });\n const actualValue = computed(() => {\n return isModelValue.value ? props.modelValue : props.value;\n });\n const checked = computed(() => {\n return actualValue.value === props.activeValue;\n });\n if (!~[props.activeValue, props.inactiveValue].indexOf(actualValue.value)) {\n ctx.emit(\"update:modelValue\", props.inactiveValue);\n ctx.emit(\"change\", props.inactiveValue);\n ctx.emit(\"input\", props.inactiveValue);\n }\n watch(checked, () => {\n var _a;\n input.value.checked = checked.value;\n if (props.activeColor || props.inactiveColor) {\n setBackgroundColor();\n }\n if (props.validateEvent) {\n (_a = elFormItem.formItemMitt) == null ? void 0 : _a.emit(\"el.form.change\", [actualValue.value]);\n }\n });\n const switchDisabled = computed(() => {\n return props.disabled || props.loading || (elForm || {}).disabled;\n });\n const handleChange = () => {\n const val = checked.value ? props.inactiveValue : props.activeValue;\n ctx.emit(\"update:modelValue\", val);\n ctx.emit(\"change\", val);\n ctx.emit(\"input\", val);\n nextTick(() => {\n input.value.checked = checked.value;\n });\n };\n const switchValue = () => {\n if (switchDisabled.value)\n return;\n const { beforeChange } = props;\n if (!beforeChange) {\n handleChange();\n return;\n }\n const shouldChange = beforeChange();\n const isExpectType = [isPromise(shouldChange), isBool(shouldChange)].some((i) => i);\n if (!isExpectType) {\n throwError(scope, \"beforeChange must return type `Promise` or `boolean`\");\n }\n if (isPromise(shouldChange)) {\n shouldChange.then((result) => {\n if (result) {\n handleChange();\n }\n }).catch((e) => {\n if (process.env.NODE_ENV !== \"production\") {\n warn(scope, `some error occurred: ${e}`);\n }\n });\n } else if (shouldChange) {\n handleChange();\n }\n };\n const setBackgroundColor = () => {\n const newColor = checked.value ? props.activeColor : props.inactiveColor;\n const coreEl = core.value;\n coreEl.style.borderColor = newColor;\n coreEl.style.backgroundColor = newColor;\n coreEl.children[0].style.color = newColor;\n };\n const focus = () => {\n var _a, _b;\n (_b = (_a = input.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);\n };\n onMounted(() => {\n if (props.activeColor || props.inactiveColor) {\n setBackgroundColor();\n }\n input.value.checked = checked.value;\n });\n return {\n input,\n core,\n switchDisabled,\n checked,\n handleChange,\n switchValue,\n focus\n };\n }\n});\n\nconst _hoisted_1 = { class: \"el-switch__action\" };\nconst _hoisted_2 = {\n key: 0,\n class: \"el-icon-loading\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", {\n class: [\"el-switch\", { \"is-disabled\": _ctx.switchDisabled, \"is-checked\": _ctx.checked }],\n role: \"switch\",\n \"aria-checked\": _ctx.checked,\n \"aria-disabled\": _ctx.switchDisabled,\n onClick: _cache[3] || (_cache[3] = withModifiers((...args) => _ctx.switchValue && _ctx.switchValue(...args), [\"prevent\"]))\n }, [\n createVNode(\"input\", {\n id: _ctx.id,\n ref: \"input\",\n class: \"el-switch__input\",\n type: \"checkbox\",\n name: _ctx.name,\n \"true-value\": _ctx.activeValue,\n \"false-value\": _ctx.inactiveValue,\n disabled: _ctx.switchDisabled,\n onChange: _cache[1] || (_cache[1] = (...args) => _ctx.handleChange && _ctx.handleChange(...args)),\n onKeydown: _cache[2] || (_cache[2] = withKeys((...args) => _ctx.switchValue && _ctx.switchValue(...args), [\"enter\"]))\n }, null, 40, [\"id\", \"name\", \"true-value\", \"false-value\", \"disabled\"]),\n _ctx.inactiveIconClass || _ctx.inactiveText ? (openBlock(), createBlock(\"span\", {\n key: 0,\n class: [\"el-switch__label\", \"el-switch__label--left\", !_ctx.checked ? \"is-active\" : \"\"]\n }, [\n _ctx.inactiveIconClass ? (openBlock(), createBlock(\"i\", {\n key: 0,\n class: [_ctx.inactiveIconClass]\n }, null, 2)) : createCommentVNode(\"v-if\", true),\n !_ctx.inactiveIconClass && _ctx.inactiveText ? (openBlock(), createBlock(\"span\", {\n key: 1,\n \"aria-hidden\": _ctx.checked\n }, toDisplayString(_ctx.inactiveText), 9, [\"aria-hidden\"])) : createCommentVNode(\"v-if\", true)\n ], 2)) : createCommentVNode(\"v-if\", true),\n createVNode(\"span\", {\n ref: \"core\",\n class: \"el-switch__core\",\n style: { \"width\": (_ctx.width || 40) + \"px\" }\n }, [\n createVNode(\"div\", _hoisted_1, [\n _ctx.loading ? (openBlock(), createBlock(\"i\", _hoisted_2)) : createCommentVNode(\"v-if\", true)\n ])\n ], 4),\n _ctx.activeIconClass || _ctx.activeText ? (openBlock(), createBlock(\"span\", {\n key: 1,\n class: [\"el-switch__label\", \"el-switch__label--right\", _ctx.checked ? \"is-active\" : \"\"]\n }, [\n _ctx.activeIconClass ? (openBlock(), createBlock(\"i\", {\n key: 0,\n class: [_ctx.activeIconClass]\n }, null, 2)) : createCommentVNode(\"v-if\", true),\n !_ctx.activeIconClass && _ctx.activeText ? (openBlock(), createBlock(\"span\", {\n key: 1,\n \"aria-hidden\": !_ctx.checked\n }, toDisplayString(_ctx.activeText), 9, [\"aria-hidden\"])) : createCommentVNode(\"v-if\", true)\n ], 2)) : createCommentVNode(\"v-if\", true)\n ], 10, [\"aria-checked\", \"aria-disabled\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/switch/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Switch = script;\n\nexport default _Switch;\n","import { defineComponent, ref, inject, computed, getCurrentInstance, withDirectives, openBlock, createBlock, renderSlot, vShow, createCommentVNode } from 'vue';\n\nvar script = defineComponent({\n name: \"ElTabPane\",\n props: {\n label: {\n type: String,\n default: \"\"\n },\n name: {\n type: String,\n default: \"\"\n },\n closable: Boolean,\n disabled: Boolean,\n lazy: Boolean\n },\n setup(props) {\n const index = ref(null);\n const loaded = ref(false);\n const rootTabs = inject(\"rootTabs\");\n const updatePaneState = inject(\"updatePaneState\");\n if (!rootTabs || !updatePaneState) {\n throw new Error(`ElTabPane must use with ElTabs`);\n }\n const isClosable = computed(() => {\n return props.closable || rootTabs.props.closable;\n });\n const active = computed(() => {\n const active2 = rootTabs.currentName.value === (props.name || index.value);\n if (active2) {\n loaded.value = true;\n }\n return active2;\n });\n const paneName = computed(() => {\n return props.name || index.value;\n });\n const shouldBeRender = computed(() => {\n return !props.lazy || loaded.value || active.value;\n });\n const instance = getCurrentInstance();\n updatePaneState({\n uid: instance.uid,\n instance,\n props,\n paneName,\n active,\n index,\n isClosable\n });\n return {\n index,\n loaded,\n isClosable,\n active,\n paneName,\n shouldBeRender\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return _ctx.shouldBeRender ? withDirectives((openBlock(), createBlock(\"div\", {\n key: 0,\n id: `pane-${_ctx.paneName}`,\n class: \"el-tab-pane\",\n role: \"tabpanel\",\n \"aria-hidden\": !_ctx.active,\n \"aria-labelledby\": `tab-${_ctx.paneName}`\n }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 8, [\"id\", \"aria-hidden\", \"aria-labelledby\"])), [\n [vShow, _ctx.active]\n ]) : createCommentVNode(\"v-if\", true);\n}\n\nscript.render = render;\nscript.__file = \"packages/tabs/src/tab-pane.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _TabPane = script;\n\nexport default _TabPane;\n","import { getCurrentInstance, ref, unref, computed, watch, nextTick, isRef, defineComponent, resolveComponent, resolveDirective, openBlock, createBlock, withCtx, createVNode, Fragment, renderList, createTextVNode, toDisplayString, withDirectives, onBeforeMount, onMounted, onUpdated, onUnmounted, h, watchEffect, renderSlot, createCommentVNode, vShow } from 'vue';\nimport { getValueByPath, arrayFind, arrayFindIndex, useGlobalConfig } from '../utils/util';\nimport { off, on, addClass, hasClass, removeClass, getStyle } from '../utils/dom';\nimport { createPopper } from '@popperjs/core';\nimport PopupManager from '../utils/popup-manager';\nimport debounce from 'lodash/debounce';\nimport { useLocaleInject } from '../hooks';\nimport { ClickOutside, Mousewheel } from '../directives';\nimport scrollbarWidth from '../utils/scrollbar-width';\nimport isServer from '../utils/isServer';\nimport ElCheckbox from '../el-checkbox';\nimport ElPopper from '../el-popper';\nimport ElCheckboxGroup from '../el-checkbox-group';\nimport ElScrollbar from '../el-scrollbar';\nimport { addResizeListener, removeResizeListener } from '../utils/resize-event';\nimport throttle from 'lodash/throttle';\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\r\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\n\nvar __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nconst getCell = function(event) {\n let cell = event.target;\n while (cell && cell.tagName.toUpperCase() !== \"HTML\") {\n if (cell.tagName.toUpperCase() === \"TD\") {\n return cell;\n }\n cell = cell.parentNode;\n }\n return null;\n};\nconst isObject = function(obj) {\n return obj !== null && typeof obj === \"object\";\n};\nconst orderBy = function(array, sortKey, reverse, sortMethod, sortBy) {\n if (!sortKey && !sortMethod && (!sortBy || Array.isArray(sortBy) && !sortBy.length)) {\n return array;\n }\n if (typeof reverse === \"string\") {\n reverse = reverse === \"descending\" ? -1 : 1;\n } else {\n reverse = reverse && reverse < 0 ? -1 : 1;\n }\n const getKey = sortMethod ? null : function(value, index) {\n if (sortBy) {\n if (!Array.isArray(sortBy)) {\n sortBy = [sortBy];\n }\n return sortBy.map(function(by) {\n if (typeof by === \"string\") {\n return getValueByPath(value, by);\n } else {\n return by(value, index, array);\n }\n });\n }\n if (sortKey !== \"$key\") {\n if (isObject(value) && \"$value\" in value)\n value = value.$value;\n }\n return [isObject(value) ? getValueByPath(value, sortKey) : value];\n };\n const compare = function(a, b) {\n if (sortMethod) {\n return sortMethod(a.value, b.value);\n }\n for (let i = 0, len = a.key.length; i < len; i++) {\n if (a.key[i] < b.key[i]) {\n return -1;\n }\n if (a.key[i] > b.key[i]) {\n return 1;\n }\n }\n return 0;\n };\n return array.map(function(value, index) {\n return {\n value,\n index,\n key: getKey ? getKey(value, index) : null\n };\n }).sort(function(a, b) {\n let order = compare(a, b);\n if (!order) {\n order = a.index - b.index;\n }\n return order * +reverse;\n }).map((item) => item.value);\n};\nconst getColumnById = function(table, columnId) {\n let column = null;\n table.columns.forEach(function(item) {\n if (item.id === columnId) {\n column = item;\n }\n });\n return column;\n};\nconst getColumnByKey = function(table, columnKey) {\n let column = null;\n for (let i = 0; i < table.columns.length; i++) {\n const item = table.columns[i];\n if (item.columnKey === columnKey) {\n column = item;\n break;\n }\n }\n return column;\n};\nconst getColumnByCell = function(table, cell) {\n const matches = (cell.className || \"\").match(/el-table_[^\\s]+/gm);\n if (matches) {\n return getColumnById(table, matches[0]);\n }\n return null;\n};\nconst getRowIdentity = (row, rowKey) => {\n if (!row)\n throw new Error(\"row is required when get row identity\");\n if (typeof rowKey === \"string\") {\n if (rowKey.indexOf(\".\") < 0) {\n return row[rowKey] + \"\";\n }\n const key = rowKey.split(\".\");\n let current = row;\n for (let i = 0; i < key.length; i++) {\n current = current[key[i]];\n }\n return current + \"\";\n } else if (typeof rowKey === \"function\") {\n return rowKey.call(null, row);\n }\n};\nconst getKeysMap = function(array, rowKey) {\n const arrayMap = {};\n (array || []).forEach((row, index) => {\n arrayMap[getRowIdentity(row, rowKey)] = { row, index };\n });\n return arrayMap;\n};\nfunction parseHeight(height) {\n if (typeof height === \"number\") {\n return height;\n }\n if (typeof height === \"string\") {\n if (/^\\d+(?:px)?$/.test(height)) {\n return parseInt(height, 10);\n } else {\n return height;\n }\n }\n return null;\n}\nfunction toggleRowStatus(statusArr, row, newVal) {\n let changed = false;\n const index = statusArr.indexOf(row);\n const included = index !== -1;\n const addRow = () => {\n statusArr.push(row);\n changed = true;\n };\n const removeRow = () => {\n statusArr.splice(index, 1);\n changed = true;\n };\n if (typeof newVal === \"boolean\") {\n if (newVal && !included) {\n addRow();\n } else if (!newVal && included) {\n removeRow();\n }\n } else {\n if (included) {\n removeRow();\n } else {\n addRow();\n }\n }\n return changed;\n}\nfunction walkTreeNode(root, cb, childrenKey = \"children\", lazyKey = \"hasChildren\") {\n const isNil = (array) => !(Array.isArray(array) && array.length);\n function _walker(parent, children, level) {\n cb(parent, children, level);\n children.forEach((item) => {\n if (item[lazyKey]) {\n cb(item, null, level + 1);\n return;\n }\n const children2 = item[childrenKey];\n if (!isNil(children2)) {\n _walker(item, children2, level + 1);\n }\n });\n }\n root.forEach((item) => {\n if (item[lazyKey]) {\n cb(item, null, 0);\n return;\n }\n const children = item[childrenKey];\n if (!isNil(children)) {\n _walker(item, children, 0);\n }\n });\n}\nlet removePopper;\nfunction createTablePopper(trigger, popperContent, popperOptions, tooltipEffect) {\n function renderContent() {\n const isLight = tooltipEffect === \"light\";\n const content2 = document.createElement(\"div\");\n content2.className = `el-popper ${isLight ? \"is-light\" : \"is-dark\"}`;\n content2.innerHTML = popperContent;\n content2.style.zIndex = String(PopupManager.nextZIndex());\n document.body.appendChild(content2);\n return content2;\n }\n function renderArrow() {\n const arrow2 = document.createElement(\"div\");\n arrow2.className = \"el-popper__arrow\";\n arrow2.style.bottom = \"-4px\";\n return arrow2;\n }\n function showPopper() {\n popperInstance && popperInstance.update();\n }\n removePopper = function removePopper2() {\n try {\n popperInstance && popperInstance.destroy();\n content && document.body.removeChild(content);\n off(trigger, \"mouseenter\", showPopper);\n off(trigger, \"mouseleave\", removePopper2);\n } catch (e) {\n }\n };\n let popperInstance = null;\n const content = renderContent();\n const arrow = renderArrow();\n content.appendChild(arrow);\n popperInstance = createPopper(trigger, content, __spreadValues({\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 8]\n }\n },\n {\n name: \"arrow\",\n options: {\n element: arrow,\n padding: 10\n }\n }\n ]\n }, popperOptions));\n on(trigger, \"mouseenter\", showPopper);\n on(trigger, \"mouseleave\", removePopper);\n return popperInstance;\n}\n\nfunction useExpand(watcherData) {\n const instance = getCurrentInstance();\n const defaultExpandAll = ref(false);\n const expandRows = ref([]);\n const updateExpandRows = () => {\n const data = watcherData.data.value || [];\n const rowKey = watcherData.rowKey.value;\n if (defaultExpandAll.value) {\n expandRows.value = data.slice();\n } else if (rowKey) {\n const expandRowsMap = getKeysMap(expandRows.value, rowKey);\n expandRows.value = data.reduce((prev, row) => {\n const rowId = getRowIdentity(row, rowKey);\n const rowInfo = expandRowsMap[rowId];\n if (rowInfo) {\n prev.push(row);\n }\n return prev;\n }, []);\n } else {\n expandRows.value = [];\n }\n };\n const toggleRowExpansion = (row, expanded) => {\n const changed = toggleRowStatus(expandRows.value, row, expanded);\n if (changed) {\n instance.emit(\"expand-change\", row, expandRows.value.slice());\n instance.store.scheduleLayout();\n }\n };\n const setExpandRowKeys = (rowKeys) => {\n instance.store.assertRowKey();\n const data = watcherData.data.value || [];\n const rowKey = watcherData.rowKey.value;\n const keysMap = getKeysMap(data, rowKey);\n expandRows.value = rowKeys.reduce((prev, cur) => {\n const info = keysMap[cur];\n if (info) {\n prev.push(info.row);\n }\n return prev;\n }, []);\n };\n const isRowExpanded = (row) => {\n const rowKey = watcherData.rowKey.value;\n if (rowKey) {\n const expandMap = getKeysMap(expandRows.value, rowKey);\n return !!expandMap[getRowIdentity(row, rowKey)];\n }\n return expandRows.value.indexOf(row) !== -1;\n };\n return {\n updateExpandRows,\n toggleRowExpansion,\n setExpandRowKeys,\n isRowExpanded,\n states: {\n expandRows,\n defaultExpandAll\n }\n };\n}\n\nfunction useCurrent(watcherData) {\n const instance = getCurrentInstance();\n const _currentRowKey = ref(null);\n const currentRow = ref(null);\n const setCurrentRowKey = (key) => {\n instance.store.assertRowKey();\n _currentRowKey.value = key;\n setCurrentRowByKey(key);\n };\n const restoreCurrentRowKey = () => {\n _currentRowKey.value = null;\n };\n const setCurrentRowByKey = (key) => {\n const { data = [], rowKey } = watcherData;\n let _currentRow = null;\n if (rowKey.value) {\n _currentRow = arrayFind(unref(data), (item) => getRowIdentity(item, rowKey.value) === key);\n }\n currentRow.value = _currentRow;\n };\n const updateCurrentRow = (_currentRow) => {\n const oldCurrentRow = currentRow.value;\n if (_currentRow && _currentRow !== oldCurrentRow) {\n currentRow.value = _currentRow;\n instance.emit(\"current-change\", currentRow.value, oldCurrentRow);\n return;\n }\n if (!_currentRow && oldCurrentRow) {\n currentRow.value = null;\n instance.emit(\"current-change\", null, oldCurrentRow);\n }\n };\n const updateCurrentRowData = () => {\n const rowKey = watcherData.rowKey.value;\n const data = watcherData.data.value || [];\n const oldCurrentRow = currentRow.value;\n if (data.indexOf(oldCurrentRow) === -1 && oldCurrentRow) {\n if (rowKey) {\n const currentRowKey = getRowIdentity(oldCurrentRow, rowKey);\n setCurrentRowByKey(currentRowKey);\n } else {\n currentRow.value = null;\n }\n if (currentRow.value === null) {\n instance.emit(\"current-change\", null, oldCurrentRow);\n }\n } else if (_currentRowKey.value) {\n setCurrentRowByKey(_currentRowKey.value);\n restoreCurrentRowKey();\n }\n };\n return {\n setCurrentRowKey,\n restoreCurrentRowKey,\n setCurrentRowByKey,\n updateCurrentRow,\n updateCurrentRowData,\n states: {\n _currentRowKey,\n currentRow\n }\n };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTree(watcherData) {\n const expandRowKeys = ref([]);\n const treeData = ref({});\n const indent = ref(16);\n const lazy = ref(false);\n const lazyTreeNodeMap = ref({});\n const lazyColumnIdentifier = ref(\"hasChildren\");\n const childrenColumnName = ref(\"children\");\n const instance = getCurrentInstance();\n const normalizedData = computed(() => {\n if (!watcherData.rowKey.value)\n return {};\n const data = watcherData.data.value || [];\n return normalize(data);\n });\n const normalizedLazyNode = computed(() => {\n const rowKey = watcherData.rowKey.value;\n const keys = Object.keys(lazyTreeNodeMap.value);\n const res = {};\n if (!keys.length)\n return res;\n keys.forEach((key) => {\n if (lazyTreeNodeMap.value[key].length) {\n const item = { children: [] };\n lazyTreeNodeMap.value[key].forEach((row) => {\n const currentRowKey = getRowIdentity(row, rowKey);\n item.children.push(currentRowKey);\n if (row[lazyColumnIdentifier.value] && !res[currentRowKey]) {\n res[currentRowKey] = { children: [] };\n }\n });\n res[key] = item;\n }\n });\n return res;\n });\n const normalize = (data) => {\n const rowKey = watcherData.rowKey.value;\n const res = {};\n walkTreeNode(data, (parent, children, level) => {\n const parentId = getRowIdentity(parent, rowKey);\n if (Array.isArray(children)) {\n res[parentId] = {\n children: children.map((row) => getRowIdentity(row, rowKey)),\n level\n };\n } else if (lazy.value) {\n res[parentId] = {\n children: [],\n lazy: true,\n level\n };\n }\n }, childrenColumnName.value, lazyColumnIdentifier.value);\n return res;\n };\n const updateTreeData = () => {\n var _a, _b;\n const nested = normalizedData.value;\n const normalizedLazyNode_ = normalizedLazyNode.value;\n const keys = Object.keys(nested);\n const newTreeData = {};\n if (keys.length) {\n const oldTreeData = unref(treeData);\n const defaultExpandAll = (_a = instance.store) == null ? void 0 : _a.states.defaultExpandAll.value;\n const rootLazyRowKeys = [];\n const getExpanded = (oldValue, key) => {\n const included = defaultExpandAll || expandRowKeys.value && expandRowKeys.value.indexOf(key) !== -1;\n return !!(oldValue && oldValue.expanded || included);\n };\n keys.forEach((key) => {\n const oldValue = oldTreeData[key];\n const newValue = __spreadValues$1({}, nested[key]);\n newValue.expanded = getExpanded(oldValue, key);\n if (newValue.lazy) {\n const { loaded = false, loading = false } = oldValue || {};\n newValue.loaded = !!loaded;\n newValue.loading = !!loading;\n rootLazyRowKeys.push(key);\n }\n newTreeData[key] = newValue;\n });\n const lazyKeys = Object.keys(normalizedLazyNode_);\n if (lazy.value && lazyKeys.length && rootLazyRowKeys.length) {\n lazyKeys.forEach((key) => {\n const oldValue = oldTreeData[key];\n const lazyNodeChildren = normalizedLazyNode_[key].children;\n if (rootLazyRowKeys.indexOf(key) !== -1) {\n if (newTreeData[key].children.length !== 0) {\n throw new Error(\"[ElTable]children must be an empty array.\");\n }\n newTreeData[key].children = lazyNodeChildren;\n } else {\n const { loaded = false, loading = false } = oldValue || {};\n newTreeData[key] = {\n lazy: true,\n loaded: !!loaded,\n loading: !!loading,\n expanded: getExpanded(oldValue, key),\n children: lazyNodeChildren,\n level: \"\"\n };\n }\n });\n }\n }\n treeData.value = newTreeData;\n (_b = instance.store) == null ? void 0 : _b.updateTableScrollY();\n };\n watch(() => normalizedData.value, updateTreeData);\n watch(() => normalizedLazyNode.value, updateTreeData);\n const updateTreeExpandKeys = (value) => {\n expandRowKeys.value = value;\n updateTreeData();\n };\n const toggleTreeExpansion = (row, expanded) => {\n instance.store.assertRowKey();\n const rowKey = watcherData.rowKey.value;\n const id = getRowIdentity(row, rowKey);\n const data = id && treeData.value[id];\n if (id && data && \"expanded\" in data) {\n const oldExpanded = data.expanded;\n expanded = typeof expanded === \"undefined\" ? !data.expanded : expanded;\n treeData.value[id].expanded = expanded;\n if (oldExpanded !== expanded) {\n instance.emit(\"expand-change\", row, expanded);\n }\n instance.store.updateTableScrollY();\n }\n };\n const loadOrToggle = (row) => {\n instance.store.assertRowKey();\n const rowKey = watcherData.rowKey.value;\n const id = getRowIdentity(row, rowKey);\n const data = treeData.value[id];\n if (lazy.value && data && \"loaded\" in data && !data.loaded) {\n loadData(row, id, data);\n } else {\n toggleTreeExpansion(row, void 0);\n }\n };\n const loadData = (row, key, treeNode) => {\n const { load } = instance.props;\n if (load && !treeData.value[key].loaded) {\n treeData.value[key].loading = true;\n load(row, treeNode, (data) => {\n if (!Array.isArray(data)) {\n throw new Error(\"[ElTable] data must be an array\");\n }\n treeData.value[key].loading = false;\n treeData.value[key].loaded = true;\n treeData.value[key].expanded = true;\n if (data.length) {\n lazyTreeNodeMap.value[key] = data;\n }\n instance.emit(\"expand-change\", row, true);\n });\n }\n };\n return {\n loadData,\n loadOrToggle,\n toggleTreeExpansion,\n updateTreeExpandKeys,\n updateTreeData,\n normalize,\n states: {\n expandRowKeys,\n treeData,\n indent,\n lazy,\n lazyTreeNodeMap,\n lazyColumnIdentifier,\n childrenColumnName\n }\n };\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nconst sortData = (data, states) => {\n const sortingColumn = states.sortingColumn;\n if (!sortingColumn || typeof sortingColumn.sortable === \"string\") {\n return data;\n }\n return orderBy(data, states.sortProp, states.sortOrder, sortingColumn.sortMethod, sortingColumn.sortBy);\n};\nconst doFlattenColumns = (columns) => {\n const result = [];\n columns.forEach((column) => {\n if (column.children) {\n result.push.apply(result, doFlattenColumns(column.children));\n } else {\n result.push(column);\n }\n });\n return result;\n};\nfunction useWatcher() {\n const instance = getCurrentInstance();\n const rowKey = ref(null);\n const data = ref([]);\n const _data = ref([]);\n const isComplex = ref(false);\n const _columns = ref([]);\n const originColumns = ref([]);\n const columns = ref([]);\n const fixedColumns = ref([]);\n const rightFixedColumns = ref([]);\n const leafColumns = ref([]);\n const fixedLeafColumns = ref([]);\n const rightFixedLeafColumns = ref([]);\n const leafColumnsLength = ref(0);\n const fixedLeafColumnsLength = ref(0);\n const rightFixedLeafColumnsLength = ref(0);\n const isAllSelected = ref(false);\n const selection = ref([]);\n const reserveSelection = ref(false);\n const selectOnIndeterminate = ref(false);\n const selectable = ref(null);\n const filters = ref({});\n const filteredData = ref(null);\n const sortingColumn = ref(null);\n const sortProp = ref(null);\n const sortOrder = ref(null);\n const hoverRow = ref(null);\n watch(data, () => instance.state && scheduleLayout(false), {\n deep: true\n });\n const assertRowKey = () => {\n if (!rowKey.value)\n throw new Error(\"[ElTable] prop row-key is required\");\n };\n const updateColumns = () => {\n fixedColumns.value = _columns.value.filter((column) => column.fixed === true || column.fixed === \"left\");\n rightFixedColumns.value = _columns.value.filter((column) => column.fixed === \"right\");\n if (fixedColumns.value.length > 0 && _columns.value[0] && _columns.value[0].type === \"selection\" && !_columns.value[0].fixed) {\n _columns.value[0].fixed = true;\n fixedColumns.value.unshift(_columns.value[0]);\n }\n const notFixedColumns = _columns.value.filter((column) => !column.fixed);\n originColumns.value = [].concat(fixedColumns.value).concat(notFixedColumns).concat(rightFixedColumns.value);\n const leafColumns2 = doFlattenColumns(notFixedColumns);\n const fixedLeafColumns2 = doFlattenColumns(fixedColumns.value);\n const rightFixedLeafColumns2 = doFlattenColumns(rightFixedColumns.value);\n leafColumnsLength.value = leafColumns2.length;\n fixedLeafColumnsLength.value = fixedLeafColumns2.length;\n rightFixedLeafColumnsLength.value = rightFixedLeafColumns2.length;\n columns.value = [].concat(fixedLeafColumns2).concat(leafColumns2).concat(rightFixedLeafColumns2);\n isComplex.value = fixedColumns.value.length > 0 || rightFixedColumns.value.length > 0;\n };\n const scheduleLayout = (needUpdateColumns, immediate = false) => {\n if (needUpdateColumns) {\n updateColumns();\n }\n if (immediate) {\n instance.state.doLayout();\n } else {\n instance.state.debouncedUpdateLayout();\n }\n };\n const isSelected = (row) => {\n return selection.value.indexOf(row) > -1;\n };\n const clearSelection = () => {\n isAllSelected.value = false;\n const oldSelection = selection.value;\n if (oldSelection.length) {\n selection.value = [];\n instance.emit(\"selection-change\", []);\n }\n };\n const cleanSelection = () => {\n let deleted;\n if (rowKey.value) {\n deleted = [];\n const selectedMap = getKeysMap(selection.value, rowKey.value);\n const dataMap = getKeysMap(data.value, rowKey.value);\n for (const key in selectedMap) {\n if (hasOwn(selectedMap, key) && !dataMap[key]) {\n deleted.push(selectedMap[key].row);\n }\n }\n } else {\n deleted = selection.value.filter((item) => data.value.indexOf(item) === -1);\n }\n if (deleted.length) {\n const newSelection = selection.value.filter((item) => deleted.indexOf(item) === -1);\n selection.value = newSelection;\n instance.emit(\"selection-change\", newSelection.slice());\n }\n };\n const toggleRowSelection = (row, selected = void 0, emitChange = true) => {\n const changed = toggleRowStatus(selection.value, row, selected);\n if (changed) {\n const newSelection = (selection.value || []).slice();\n if (emitChange) {\n instance.emit(\"select\", newSelection, row);\n }\n instance.emit(\"selection-change\", newSelection);\n }\n };\n const _toggleAllSelection = () => {\n var _a, _b;\n const value = selectOnIndeterminate.value ? !isAllSelected.value : !(isAllSelected.value || selection.value.length);\n isAllSelected.value = value;\n let selectionChanged = false;\n let childrenCount = 0;\n const rowKey2 = (_b = (_a = instance == null ? void 0 : instance.store) == null ? void 0 : _a.states) == null ? void 0 : _b.rowKey.value;\n data.value.forEach((row, index) => {\n const rowIndex = index + childrenCount;\n if (selectable.value) {\n if (selectable.value.call(null, row, rowIndex) && toggleRowStatus(selection.value, row, value)) {\n selectionChanged = true;\n }\n } else {\n if (toggleRowStatus(selection.value, row, value)) {\n selectionChanged = true;\n }\n }\n childrenCount += getChildrenCount(getRowIdentity(row, rowKey2));\n });\n if (selectionChanged) {\n instance.emit(\"selection-change\", selection.value ? selection.value.slice() : []);\n }\n instance.emit(\"select-all\", selection.value);\n };\n const updateSelectionByRowKey = () => {\n const selectedMap = getKeysMap(selection.value, rowKey.value);\n data.value.forEach((row) => {\n const rowId = getRowIdentity(row, rowKey.value);\n const rowInfo = selectedMap[rowId];\n if (rowInfo) {\n selection.value[rowInfo.index] = row;\n }\n });\n };\n const updateAllSelected = () => {\n var _a, _b, _c;\n if (((_a = data.value) == null ? void 0 : _a.length) === 0) {\n isAllSelected.value = false;\n return;\n }\n let selectedMap;\n if (rowKey.value) {\n selectedMap = getKeysMap(selection.value, rowKey.value);\n }\n const isSelected2 = function(row) {\n if (selectedMap) {\n return !!selectedMap[getRowIdentity(row, rowKey.value)];\n } else {\n return selection.value.indexOf(row) !== -1;\n }\n };\n let isAllSelected_ = true;\n let selectedCount = 0;\n let childrenCount = 0;\n for (let i = 0, j = (data.value || []).length; i < j; i++) {\n const keyProp = (_c = (_b = instance == null ? void 0 : instance.store) == null ? void 0 : _b.states) == null ? void 0 : _c.rowKey.value;\n const rowIndex = i + childrenCount;\n const item = data.value[i];\n const isRowSelectable = selectable.value && selectable.value.call(null, item, rowIndex);\n if (!isSelected2(item)) {\n if (!selectable.value || isRowSelectable) {\n isAllSelected_ = false;\n break;\n }\n } else {\n selectedCount++;\n }\n childrenCount += getChildrenCount(getRowIdentity(item, keyProp));\n }\n if (selectedCount === 0)\n isAllSelected_ = false;\n isAllSelected.value = isAllSelected_;\n };\n const getChildrenCount = (rowKey2) => {\n var _a;\n if (!instance || !instance.store)\n return 0;\n const {\n treeData\n } = instance.store.states;\n let count = 0;\n const children = (_a = treeData.value[rowKey2]) == null ? void 0 : _a.children;\n if (children) {\n count += children.length;\n children.forEach((childKey) => {\n count += getChildrenCount(childKey);\n });\n }\n return count;\n };\n const updateFilters = (columns2, values) => {\n if (!Array.isArray(columns2)) {\n columns2 = [columns2];\n }\n const filters_ = {};\n columns2.forEach((col) => {\n filters.value[col.id] = values;\n filters_[col.columnKey || col.id] = values;\n });\n return filters_;\n };\n const updateSort = (column, prop, order) => {\n if (sortingColumn.value && sortingColumn.value !== column) {\n sortingColumn.value.order = null;\n }\n sortingColumn.value = column;\n sortProp.value = prop;\n sortOrder.value = order;\n };\n const execFilter = () => {\n let sourceData = unref(_data);\n Object.keys(filters.value).forEach((columnId) => {\n const values = filters.value[columnId];\n if (!values || values.length === 0)\n return;\n const column = getColumnById({\n columns: columns.value\n }, columnId);\n if (column && column.filterMethod) {\n sourceData = sourceData.filter((row) => {\n return values.some((value) => column.filterMethod.call(null, value, row, column));\n });\n }\n });\n filteredData.value = sourceData;\n };\n const execSort = () => {\n data.value = sortData(filteredData.value, {\n sortingColumn: sortingColumn.value,\n sortProp: sortProp.value,\n sortOrder: sortOrder.value\n });\n };\n const execQuery = (ignore = void 0) => {\n if (!(ignore && ignore.filter)) {\n execFilter();\n }\n execSort();\n };\n const clearFilter = (columnKeys) => {\n const {\n tableHeader,\n fixedTableHeader,\n rightFixedTableHeader\n } = instance.refs;\n let panels = {};\n if (tableHeader)\n panels = Object.assign(panels, tableHeader.filterPanels);\n if (fixedTableHeader)\n panels = Object.assign(panels, fixedTableHeader.filterPanels);\n if (rightFixedTableHeader)\n panels = Object.assign(panels, rightFixedTableHeader.filterPanels);\n const keys = Object.keys(panels);\n if (!keys.length)\n return;\n if (typeof columnKeys === \"string\") {\n columnKeys = [columnKeys];\n }\n if (Array.isArray(columnKeys)) {\n const columns_ = columnKeys.map((key) => getColumnByKey({\n columns: columns.value\n }, key));\n keys.forEach((key) => {\n const column = columns_.find((col) => col.id === key);\n if (column) {\n column.filteredValue = [];\n }\n });\n instance.store.commit(\"filterChange\", {\n column: columns_,\n values: [],\n silent: true,\n multi: true\n });\n } else {\n keys.forEach((key) => {\n const column = columns.value.find((col) => col.id === key);\n if (column) {\n column.filteredValue = [];\n }\n });\n filters.value = {};\n instance.store.commit(\"filterChange\", {\n column: {},\n values: [],\n silent: true\n });\n }\n };\n const clearSort = () => {\n if (!sortingColumn.value)\n return;\n updateSort(null, null, null);\n instance.store.commit(\"changeSortCondition\", {\n silent: true\n });\n };\n const {\n setExpandRowKeys,\n toggleRowExpansion,\n updateExpandRows,\n states: expandStates,\n isRowExpanded\n } = useExpand({\n data,\n rowKey\n });\n const {\n updateTreeExpandKeys,\n toggleTreeExpansion,\n loadOrToggle,\n states: treeStates\n } = useTree({\n data,\n rowKey\n });\n const {\n updateCurrentRowData,\n updateCurrentRow,\n setCurrentRowKey,\n states: currentData\n } = useCurrent({\n data,\n rowKey\n });\n const setExpandRowKeysAdapter = (val) => {\n setExpandRowKeys(val);\n updateTreeExpandKeys(val);\n };\n const toggleRowExpansionAdapter = (row, expanded) => {\n const hasExpandColumn = columns.value.some(({ type }) => type === \"expand\");\n if (hasExpandColumn) {\n toggleRowExpansion(row, expanded);\n } else {\n toggleTreeExpansion(row, expanded);\n }\n };\n return {\n assertRowKey,\n updateColumns,\n scheduleLayout,\n isSelected,\n clearSelection,\n cleanSelection,\n toggleRowSelection,\n _toggleAllSelection,\n toggleAllSelection: null,\n updateSelectionByRowKey,\n updateAllSelected,\n updateFilters,\n updateCurrentRow,\n updateSort,\n execFilter,\n execSort,\n execQuery,\n clearFilter,\n clearSort,\n toggleRowExpansion,\n setExpandRowKeysAdapter,\n setCurrentRowKey,\n toggleRowExpansionAdapter,\n isRowExpanded,\n updateExpandRows,\n updateCurrentRowData,\n loadOrToggle,\n states: __spreadValues$2(__spreadValues$2(__spreadValues$2({\n rowKey,\n data,\n _data,\n isComplex,\n _columns,\n originColumns,\n columns,\n fixedColumns,\n rightFixedColumns,\n leafColumns,\n fixedLeafColumns,\n rightFixedLeafColumns,\n leafColumnsLength,\n fixedLeafColumnsLength,\n rightFixedLeafColumnsLength,\n isAllSelected,\n selection,\n reserveSelection,\n selectOnIndeterminate,\n selectable,\n filters,\n filteredData,\n sortingColumn,\n sortProp,\n sortOrder,\n hoverRow\n }, expandStates), treeStates), currentData)\n };\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction replaceColumn(array, column) {\n return array.map((item) => {\n var _a;\n if (item.id === column.id) {\n return column;\n } else if ((_a = item.children) == null ? void 0 : _a.length) {\n item.children = replaceColumn(item.children, column);\n }\n return item;\n });\n}\nfunction sortColumn(array) {\n array.forEach((item) => {\n var _a, _b;\n item.no = (_a = item.getColumnIndex) == null ? void 0 : _a.call(item);\n if ((_b = item.children) == null ? void 0 : _b.length) {\n sortColumn(item.children);\n }\n });\n array.sort((cur, pre) => cur.no - pre.no);\n}\nfunction useStore() {\n const instance = getCurrentInstance();\n const watcher = useWatcher();\n const mutations = {\n setData(states, data) {\n const dataInstanceChanged = unref(states.data) !== data;\n states.data.value = data;\n states._data.value = data;\n instance.store.execQuery();\n instance.store.updateCurrentRowData();\n instance.store.updateExpandRows();\n if (unref(states.reserveSelection)) {\n instance.store.assertRowKey();\n instance.store.updateSelectionByRowKey();\n } else {\n if (dataInstanceChanged) {\n instance.store.clearSelection();\n } else {\n instance.store.cleanSelection();\n }\n }\n instance.store.updateAllSelected();\n if (instance.$ready) {\n instance.store.scheduleLayout();\n }\n },\n insertColumn(states, column, parent) {\n const array = unref(states._columns);\n let newColumns = [];\n if (!parent) {\n array.push(column);\n newColumns = array;\n } else {\n if (parent && !parent.children) {\n parent.children = [];\n }\n parent.children.push(column);\n newColumns = replaceColumn(array, parent);\n }\n sortColumn(newColumns);\n states._columns.value = newColumns;\n if (column.type === \"selection\") {\n states.selectable.value = column.selectable;\n states.reserveSelection.value = column.reserveSelection;\n }\n if (instance.$ready) {\n instance.store.updateColumns();\n instance.store.scheduleLayout();\n }\n },\n removeColumn(states, column, parent) {\n const array = unref(states._columns) || [];\n if (parent) {\n parent.children.splice(parent.children.findIndex((item) => item.id === column.id), 1);\n if (parent.children.length === 0) {\n delete parent.children;\n }\n states._columns.value = replaceColumn(array, parent);\n } else {\n const index = array.indexOf(column);\n if (index > -1) {\n array.splice(index, 1);\n states._columns.value = array;\n }\n }\n if (instance.$ready) {\n instance.store.updateColumns();\n instance.store.scheduleLayout();\n }\n },\n sort(states, options) {\n const { prop, order, init } = options;\n if (prop) {\n const column = arrayFind(unref(states.columns), (column2) => column2.property === prop);\n if (column) {\n column.order = order;\n instance.store.updateSort(column, prop, order);\n instance.store.commit(\"changeSortCondition\", { init });\n }\n }\n },\n changeSortCondition(states, options) {\n const { sortingColumn: column, sortProp: prop, sortOrder: order } = states;\n if (unref(order) === null) {\n states.sortingColumn.value = null;\n states.sortProp.value = null;\n }\n const ingore = { filter: true };\n instance.store.execQuery(ingore);\n if (!options || !(options.silent || options.init)) {\n instance.emit(\"sort-change\", {\n column: unref(column),\n prop: unref(prop),\n order: unref(order)\n });\n }\n instance.store.updateTableScrollY();\n },\n filterChange(_states, options) {\n const { column, values, silent } = options;\n const newFilters = instance.store.updateFilters(column, values);\n instance.store.execQuery();\n if (!silent) {\n instance.emit(\"filter-change\", newFilters);\n }\n instance.store.updateTableScrollY();\n },\n toggleAllSelection() {\n instance.store.toggleAllSelection();\n },\n rowSelectedChanged(_states, row) {\n instance.store.toggleRowSelection(row);\n instance.store.updateAllSelected();\n },\n setHoverRow(states, row) {\n states.hoverRow.value = row;\n },\n setCurrentRow(_states, row) {\n instance.store.updateCurrentRow(row);\n }\n };\n const commit = function(name, ...args) {\n const mutations2 = instance.store.mutations;\n if (mutations2[name]) {\n mutations2[name].apply(instance, [instance.store.states].concat(args));\n } else {\n throw new Error(`Action not found: ${name}`);\n }\n };\n const updateTableScrollY = function() {\n nextTick(() => instance.layout.updateScrollY.apply(instance.layout));\n };\n return __spreadProps(__spreadValues$3({}, watcher), {\n mutations,\n commit,\n updateTableScrollY\n });\n}\n\nconst InitialStateMap = {\n rowKey: \"rowKey\",\n defaultExpandAll: \"defaultExpandAll\",\n selectOnIndeterminate: \"selectOnIndeterminate\",\n indent: \"indent\",\n lazy: \"lazy\",\n data: \"data\",\n [\"treeProps.hasChildren\"]: {\n key: \"lazyColumnIdentifier\",\n default: \"hasChildren\"\n },\n [\"treeProps.children\"]: {\n key: \"childrenColumnName\",\n default: \"children\"\n }\n};\nfunction createStore(table, props) {\n if (!table) {\n throw new Error(\"Table is required.\");\n }\n const store = useStore();\n store.toggleAllSelection = debounce(store._toggleAllSelection, 10);\n Object.keys(InitialStateMap).forEach((key) => {\n handleValue(getArrKeysValue(props, key), key, store);\n });\n proxyTableProps(store, props);\n return store;\n}\nfunction proxyTableProps(store, props) {\n Object.keys(InitialStateMap).forEach((key) => {\n watch(() => getArrKeysValue(props, key), (value) => {\n handleValue(value, key, store);\n });\n });\n}\nfunction handleValue(value, propsKey, store) {\n let newVal = value;\n let storeKey = InitialStateMap[propsKey];\n if (typeof InitialStateMap[propsKey] === \"object\") {\n storeKey = storeKey.key;\n newVal = newVal || InitialStateMap[propsKey].default;\n }\n store.states[storeKey].value = newVal;\n}\nfunction getArrKeysValue(props, keys) {\n if (keys.includes(\".\")) {\n const keyList = keys.split(\".\");\n let value = props;\n keyList.forEach((key) => {\n value = value[key];\n });\n return value;\n } else {\n return props[keys];\n }\n}\n\nclass TableLayout {\n constructor(options) {\n this.observers = [];\n this.table = null;\n this.store = null;\n this.columns = [];\n this.fit = true;\n this.showHeader = true;\n this.height = ref(null);\n this.scrollX = ref(false);\n this.scrollY = ref(false);\n this.bodyWidth = ref(null);\n this.fixedWidth = ref(null);\n this.rightFixedWidth = ref(null);\n this.tableHeight = ref(null);\n this.headerHeight = ref(44);\n this.appendHeight = ref(0);\n this.footerHeight = ref(44);\n this.viewportHeight = ref(null);\n this.bodyHeight = ref(null);\n this.fixedBodyHeight = ref(null);\n this.gutterWidth = scrollbarWidth();\n for (const name in options) {\n if (hasOwn(options, name)) {\n if (isRef(this[name])) {\n this[name].value = options[name];\n } else {\n this[name] = options[name];\n }\n }\n }\n if (!this.table) {\n throw new Error(\"table is required for Table Layout\");\n }\n if (!this.store) {\n throw new Error(\"store is required for Table Layout\");\n }\n }\n updateScrollY() {\n const height = this.height.value;\n if (height === null)\n return false;\n const bodyWrapper = this.table.refs.bodyWrapper;\n if (this.table.vnode.el && bodyWrapper) {\n let scrollY = true;\n const prevScrollY = this.scrollY.value;\n if (this.bodyHeight.value === null) {\n scrollY = false;\n } else {\n const body = bodyWrapper.querySelector(\".el-table__body\");\n scrollY = body.offsetHeight > this.bodyHeight.value;\n }\n this.scrollY.value = scrollY;\n return prevScrollY !== scrollY;\n }\n return false;\n }\n setHeight(value, prop = \"height\") {\n if (isServer)\n return;\n const el = this.table.vnode.el;\n value = parseHeight(value);\n this.height.value = Number(value);\n if (!el && (value || value === 0))\n return nextTick(() => this.setHeight(value, prop));\n if (typeof value === \"number\") {\n el.style[prop] = value + \"px\";\n this.updateElsHeight();\n } else if (typeof value === \"string\") {\n el.style[prop] = value;\n this.updateElsHeight();\n }\n }\n setMaxHeight(value) {\n this.setHeight(value, \"max-height\");\n }\n getFlattenColumns() {\n const flattenColumns = [];\n const columns = this.table.store.states.columns.value;\n columns.forEach((column) => {\n if (column.isColumnGroup) {\n flattenColumns.push.apply(flattenColumns, column.columns);\n } else {\n flattenColumns.push(column);\n }\n });\n return flattenColumns;\n }\n updateElsHeight() {\n if (!this.table.$ready)\n return nextTick(() => this.updateElsHeight());\n const { headerWrapper, appendWrapper, footerWrapper } = this.table.refs;\n this.appendHeight.value = appendWrapper ? appendWrapper.offsetHeight : 0;\n if (this.showHeader && !headerWrapper)\n return;\n const headerTrElm = headerWrapper ? headerWrapper.querySelector(\".el-table__header tr\") : null;\n const noneHeader = this.headerDisplayNone(headerTrElm);\n const headerHeight = this.headerHeight.value = !this.showHeader ? 0 : headerWrapper.offsetHeight;\n if (this.showHeader && !noneHeader && headerWrapper.offsetWidth > 0 && (this.table.store.states.columns.value || []).length > 0 && headerHeight < 2) {\n return nextTick(() => this.updateElsHeight());\n }\n const tableHeight = this.tableHeight.value = this.table.vnode.el.clientHeight;\n const footerHeight = this.footerHeight.value = footerWrapper ? footerWrapper.offsetHeight : 0;\n if (this.height.value !== null) {\n this.bodyHeight.value = tableHeight - headerHeight - footerHeight + (footerWrapper ? 1 : 0);\n }\n this.fixedBodyHeight.value = this.scrollX.value ? this.bodyHeight.value - this.gutterWidth : this.bodyHeight.value;\n this.viewportHeight.value = this.scrollX.value ? tableHeight - this.gutterWidth : tableHeight;\n this.updateScrollY();\n this.notifyObservers(\"scrollable\");\n }\n headerDisplayNone(elm) {\n if (!elm)\n return true;\n let headerChild = elm;\n while (headerChild.tagName !== \"DIV\") {\n if (getComputedStyle(headerChild).display === \"none\") {\n return true;\n }\n headerChild = headerChild.parentElement;\n }\n return false;\n }\n updateColumnsWidth() {\n if (isServer)\n return;\n const fit = this.fit;\n const bodyWidth = this.table.vnode.el.clientWidth;\n let bodyMinWidth = 0;\n const flattenColumns = this.getFlattenColumns();\n const flexColumns = flattenColumns.filter((column) => typeof column.width !== \"number\");\n flattenColumns.forEach((column) => {\n if (typeof column.width === \"number\" && column.realWidth)\n column.realWidth = null;\n });\n if (flexColumns.length > 0 && fit) {\n flattenColumns.forEach((column) => {\n bodyMinWidth += Number(column.width || column.minWidth || 80);\n });\n const scrollYWidth = this.scrollY.value ? this.gutterWidth : 0;\n if (bodyMinWidth <= bodyWidth - scrollYWidth) {\n this.scrollX.value = false;\n const totalFlexWidth = bodyWidth - scrollYWidth - bodyMinWidth;\n if (flexColumns.length === 1) {\n flexColumns[0].realWidth = Number(flexColumns[0].minWidth || 80) + totalFlexWidth;\n } else {\n const allColumnsWidth = flexColumns.reduce((prev, column) => prev + Number(column.minWidth || 80), 0);\n const flexWidthPerPixel = totalFlexWidth / allColumnsWidth;\n let noneFirstWidth = 0;\n flexColumns.forEach((column, index) => {\n if (index === 0)\n return;\n const flexWidth = Math.floor(Number(column.minWidth || 80) * flexWidthPerPixel);\n noneFirstWidth += flexWidth;\n column.realWidth = Number(column.minWidth || 80) + flexWidth;\n });\n flexColumns[0].realWidth = Number(flexColumns[0].minWidth || 80) + totalFlexWidth - noneFirstWidth;\n }\n } else {\n this.scrollX.value = true;\n flexColumns.forEach(function(column) {\n column.realWidth = Number(column.minWidth);\n });\n }\n this.bodyWidth.value = Math.max(bodyMinWidth, bodyWidth);\n this.table.state.resizeState.value.width = this.bodyWidth.value;\n } else {\n flattenColumns.forEach((column) => {\n if (!column.width && !column.minWidth) {\n column.realWidth = 80;\n } else {\n column.realWidth = Number(column.width || column.minWidth);\n }\n bodyMinWidth += column.realWidth;\n });\n this.scrollX.value = bodyMinWidth > bodyWidth;\n this.bodyWidth.value = bodyMinWidth;\n }\n const fixedColumns = this.store.states.fixedColumns.value;\n if (fixedColumns.length > 0) {\n let fixedWidth = 0;\n fixedColumns.forEach(function(column) {\n fixedWidth += Number(column.realWidth || column.width);\n });\n this.fixedWidth.value = fixedWidth;\n }\n const rightFixedColumns = this.store.states.rightFixedColumns.value;\n if (rightFixedColumns.length > 0) {\n let rightFixedWidth = 0;\n rightFixedColumns.forEach(function(column) {\n rightFixedWidth += Number(column.realWidth || column.width);\n });\n this.rightFixedWidth.value = rightFixedWidth;\n }\n this.notifyObservers(\"columns\");\n }\n addObserver(observer) {\n this.observers.push(observer);\n }\n removeObserver(observer) {\n const index = this.observers.indexOf(observer);\n if (index !== -1) {\n this.observers.splice(index, 1);\n }\n }\n notifyObservers(event) {\n const observers = this.observers;\n observers.forEach((observer) => {\n var _a, _b;\n switch (event) {\n case \"columns\":\n (_a = observer.state) == null ? void 0 : _a.onColumnsChange(this);\n break;\n case \"scrollable\":\n (_b = observer.state) == null ? void 0 : _b.onScrollableChange(this);\n break;\n default:\n throw new Error(`Table Layout don't have event ${event}.`);\n }\n });\n }\n}\n\nvar script = defineComponent({\n name: \"ElTableFilterPanel\",\n components: {\n ElCheckbox,\n ElCheckboxGroup,\n ElScrollbar,\n ElPopper\n },\n directives: { ClickOutside },\n props: {\n placement: {\n type: String,\n default: \"bottom-start\"\n },\n store: {\n type: Object\n },\n column: {\n type: Object\n },\n upDataColumn: {\n type: Function\n }\n },\n setup(props) {\n const instance = getCurrentInstance();\n const { t } = useLocaleInject();\n const parent = instance.parent;\n if (!parent.filterPanels.value[props.column.id]) {\n parent.filterPanels.value[props.column.id] = instance;\n }\n const tooltipVisible = ref(false);\n const tooltip = ref(null);\n const filters = computed(() => {\n return props.column && props.column.filters;\n });\n const filterValue = computed({\n get: () => (props.column.filteredValue || [])[0],\n set: (value) => {\n if (filteredValue.value) {\n if (typeof value !== \"undefined\" && value !== null) {\n filteredValue.value.splice(0, 1, value);\n } else {\n filteredValue.value.splice(0, 1);\n }\n }\n }\n });\n const filteredValue = computed({\n get() {\n if (props.column) {\n return props.column.filteredValue || [];\n }\n return [];\n },\n set(value) {\n if (props.column) {\n props.upDataColumn(\"filteredValue\", value);\n }\n }\n });\n const multiple = computed(() => {\n if (props.column) {\n return props.column.filterMultiple;\n }\n return true;\n });\n const isActive = (filter) => {\n return filter.value === filterValue.value;\n };\n const hidden = () => {\n tooltipVisible.value = false;\n };\n const showFilterPanel = (e) => {\n e.stopPropagation();\n tooltipVisible.value = !tooltipVisible.value;\n };\n const hideFilterPanel = () => {\n tooltipVisible.value = false;\n };\n const handleConfirm = () => {\n confirmFilter(filteredValue.value);\n hidden();\n };\n const handleReset = () => {\n filteredValue.value = [];\n confirmFilter(filteredValue.value);\n hidden();\n };\n const handleSelect = (_filterValue) => {\n filterValue.value = _filterValue;\n if (typeof _filterValue !== \"undefined\" && _filterValue !== null) {\n confirmFilter(filteredValue.value);\n } else {\n confirmFilter([]);\n }\n hidden();\n };\n const confirmFilter = (filteredValue2) => {\n props.store.commit(\"filterChange\", {\n column: props.column,\n values: filteredValue2\n });\n props.store.updateAllSelected();\n };\n watch(tooltipVisible, (value) => {\n if (props.column) {\n props.upDataColumn(\"filterOpened\", value);\n }\n }, {\n immediate: true\n });\n const popperPaneRef = computed(() => {\n var _a;\n return (_a = tooltip.value) == null ? void 0 : _a.popperRef;\n });\n return {\n tooltipVisible,\n multiple,\n filteredValue,\n filterValue,\n filters,\n handleConfirm,\n handleReset,\n handleSelect,\n isActive,\n t,\n showFilterPanel,\n hideFilterPanel,\n popperPaneRef,\n tooltip\n };\n }\n});\n\nconst _hoisted_1 = { key: 0 };\nconst _hoisted_2 = { class: \"el-table-filter__content\" };\nconst _hoisted_3 = { class: \"el-table-filter__bottom\" };\nconst _hoisted_4 = {\n key: 1,\n class: \"el-table-filter__list\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_checkbox = resolveComponent(\"el-checkbox\");\n const _component_el_checkbox_group = resolveComponent(\"el-checkbox-group\");\n const _component_el_scrollbar = resolveComponent(\"el-scrollbar\");\n const _component_el_popper = resolveComponent(\"el-popper\");\n const _directive_click_outside = resolveDirective(\"click-outside\");\n return openBlock(), createBlock(_component_el_popper, {\n ref: \"tooltip\",\n visible: _ctx.tooltipVisible,\n \"onUpdate:visible\": _cache[6] || (_cache[6] = ($event) => _ctx.tooltipVisible = $event),\n offset: 0,\n placement: _ctx.placement,\n \"show-arrow\": false,\n \"stop-popper-mouse-event\": false,\n effect: \"light\",\n pure: \"\",\n \"manual-mode\": \"\",\n \"popper-class\": \"el-table-filter\",\n \"append-to-body\": \"\"\n }, {\n default: withCtx(() => [\n _ctx.multiple ? (openBlock(), createBlock(\"div\", _hoisted_1, [\n createVNode(\"div\", _hoisted_2, [\n createVNode(_component_el_scrollbar, { \"wrap-class\": \"el-table-filter__wrap\" }, {\n default: withCtx(() => [\n createVNode(_component_el_checkbox_group, {\n modelValue: _ctx.filteredValue,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event) => _ctx.filteredValue = $event),\n class: \"el-table-filter__checkbox-group\"\n }, {\n default: withCtx(() => [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.filters, (filter) => {\n return openBlock(), createBlock(_component_el_checkbox, {\n key: filter.value,\n label: filter.value\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(filter.text), 1)\n ]),\n _: 2\n }, 1032, [\"label\"]);\n }), 128))\n ]),\n _: 1\n }, 8, [\"modelValue\"])\n ]),\n _: 1\n })\n ]),\n createVNode(\"div\", _hoisted_3, [\n createVNode(\"button\", {\n class: { \"is-disabled\": _ctx.filteredValue.length === 0 },\n disabled: _ctx.filteredValue.length === 0,\n type: \"\",\n onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleConfirm && _ctx.handleConfirm(...args))\n }, toDisplayString(_ctx.t(\"el.table.confirmFilter\")), 11, [\"disabled\"]),\n createVNode(\"button\", {\n type: \"\",\n onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleReset && _ctx.handleReset(...args))\n }, toDisplayString(_ctx.t(\"el.table.resetFilter\")), 1)\n ])\n ])) : (openBlock(), createBlock(\"ul\", _hoisted_4, [\n createVNode(\"li\", {\n class: [{\n \"is-active\": _ctx.filterValue === void 0 || _ctx.filterValue === null\n }, \"el-table-filter__list-item\"],\n onClick: _cache[4] || (_cache[4] = ($event) => _ctx.handleSelect(null))\n }, toDisplayString(_ctx.t(\"el.table.clearFilter\")), 3),\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.filters, (filter) => {\n return openBlock(), createBlock(\"li\", {\n key: filter.value,\n class: [{ \"is-active\": _ctx.isActive(filter) }, \"el-table-filter__list-item\"],\n label: filter.value,\n onClick: ($event) => _ctx.handleSelect(filter.value)\n }, toDisplayString(filter.text), 11, [\"label\", \"onClick\"]);\n }), 128))\n ]))\n ]),\n trigger: withCtx(() => [\n withDirectives(createVNode(\"span\", {\n class: \"el-table__column-filter-trigger el-none-outline\",\n onClick: _cache[5] || (_cache[5] = (...args) => _ctx.showFilterPanel && _ctx.showFilterPanel(...args))\n }, [\n createVNode(\"i\", {\n class: [\n \"el-icon-arrow-down\",\n _ctx.column.filterOpened ? \"el-icon-arrow-up\" : \"\"\n ]\n }, null, 2)\n ], 512), [\n [_directive_click_outside, _ctx.hideFilterPanel, _ctx.popperPaneRef]\n ])\n ]),\n _: 1\n }, 8, [\"visible\", \"placement\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/table/src/filter-panel.vue\";\n\nfunction useLayoutObserver(root) {\n const instance = getCurrentInstance();\n onBeforeMount(() => {\n tableLayout.value.addObserver(instance);\n });\n onMounted(() => {\n onColumnsChange(tableLayout.value);\n onScrollableChange(tableLayout.value);\n });\n onUpdated(() => {\n onColumnsChange(tableLayout.value);\n onScrollableChange(tableLayout.value);\n });\n onUnmounted(() => {\n tableLayout.value.removeObserver(instance);\n });\n const tableLayout = computed(() => {\n const layout = root.layout;\n if (!layout) {\n throw new Error(\"Can not find table layout.\");\n }\n return layout;\n });\n const onColumnsChange = (layout) => {\n var _a;\n const cols = ((_a = root.vnode.el) == null ? void 0 : _a.querySelectorAll(\"colgroup > col\")) || [];\n if (!cols.length)\n return;\n const flattenColumns = layout.getFlattenColumns();\n const columnsMap = {};\n flattenColumns.forEach((column) => {\n columnsMap[column.id] = column;\n });\n for (let i = 0, j = cols.length; i < j; i++) {\n const col = cols[i];\n const name = col.getAttribute(\"name\");\n const column = columnsMap[name];\n if (column) {\n col.setAttribute(\"width\", column.realWidth || column.width);\n }\n }\n };\n const onScrollableChange = (layout) => {\n const cols = root.vnode.el.querySelectorAll(\"colgroup > col[name=gutter]\");\n for (let i = 0, j = cols.length; i < j; i++) {\n const col = cols[i];\n col.setAttribute(\"width\", layout.scrollY.value ? layout.gutterWidth : \"0\");\n }\n const ths = root.vnode.el.querySelectorAll(\"th.gutter\");\n for (let i = 0, j = ths.length; i < j; i++) {\n const th = ths[i];\n th.style.width = layout.scrollY.value ? layout.gutterWidth + \"px\" : \"0\";\n th.style.display = layout.scrollY.value ? \"\" : \"none\";\n }\n };\n return {\n tableLayout: tableLayout.value,\n onColumnsChange,\n onScrollableChange\n };\n}\n\nfunction useEvent(props, emit) {\n const instance = getCurrentInstance();\n const parent = instance.parent;\n const handleFilterClick = (event) => {\n event.stopPropagation();\n return;\n };\n const handleHeaderClick = (event, column) => {\n if (!column.filters && column.sortable) {\n handleSortClick(event, column, false);\n } else if (column.filterable && !column.sortable) {\n handleFilterClick(event);\n }\n parent.emit(\"header-click\", column, event);\n };\n const handleHeaderContextMenu = (event, column) => {\n parent.emit(\"header-contextmenu\", column, event);\n };\n const draggingColumn = ref(null);\n const dragging = ref(false);\n const dragState = ref({});\n const handleMouseDown = (event, column) => {\n if (isServer)\n return;\n if (column.children && column.children.length > 0)\n return;\n if (draggingColumn.value && props.border) {\n dragging.value = true;\n const table = parent;\n emit(\"set-drag-visible\", true);\n const tableEl = table.vnode.el;\n const tableLeft = tableEl.getBoundingClientRect().left;\n const columnEl = instance.vnode.el.querySelector(`th.${column.id}`);\n const columnRect = columnEl.getBoundingClientRect();\n const minLeft = columnRect.left - tableLeft + 30;\n addClass(columnEl, \"noclick\");\n dragState.value = {\n startMouseLeft: event.clientX,\n startLeft: columnRect.right - tableLeft,\n startColumnLeft: columnRect.left - tableLeft,\n tableLeft\n };\n const resizeProxy = table.refs.resizeProxy;\n resizeProxy.style.left = dragState.value.startLeft + \"px\";\n document.onselectstart = function() {\n return false;\n };\n document.ondragstart = function() {\n return false;\n };\n const handleMouseMove2 = (event2) => {\n const deltaLeft = event2.clientX - dragState.value.startMouseLeft;\n const proxyLeft = dragState.value.startLeft + deltaLeft;\n resizeProxy.style.left = Math.max(minLeft, proxyLeft) + \"px\";\n };\n const handleMouseUp = () => {\n if (dragging.value) {\n const { startColumnLeft, startLeft } = dragState.value;\n const finalLeft = parseInt(resizeProxy.style.left, 10);\n const columnWidth = finalLeft - startColumnLeft;\n column.width = column.realWidth = columnWidth;\n table.emit(\"header-dragend\", column.width, startLeft - startColumnLeft, column, event);\n props.store.scheduleLayout(false, true);\n document.body.style.cursor = \"\";\n dragging.value = false;\n draggingColumn.value = null;\n dragState.value = {};\n emit(\"set-drag-visible\", false);\n }\n document.removeEventListener(\"mousemove\", handleMouseMove2);\n document.removeEventListener(\"mouseup\", handleMouseUp);\n document.onselectstart = null;\n document.ondragstart = null;\n setTimeout(function() {\n removeClass(columnEl, \"noclick\");\n }, 0);\n };\n document.addEventListener(\"mousemove\", handleMouseMove2);\n document.addEventListener(\"mouseup\", handleMouseUp);\n }\n };\n const handleMouseMove = (event, column) => {\n if (column.children && column.children.length > 0)\n return;\n let target = event.target;\n while (target && target.tagName !== \"TH\") {\n target = target.parentNode;\n }\n if (!column || !column.resizable)\n return;\n if (!dragging.value && props.border) {\n const rect = target.getBoundingClientRect();\n const bodyStyle = document.body.style;\n if (rect.width > 12 && rect.right - event.pageX < 8) {\n bodyStyle.cursor = \"col-resize\";\n if (hasClass(target, \"is-sortable\")) {\n target.style.cursor = \"col-resize\";\n }\n draggingColumn.value = column;\n } else if (!dragging.value) {\n bodyStyle.cursor = \"\";\n if (hasClass(target, \"is-sortable\")) {\n target.style.cursor = \"pointer\";\n }\n draggingColumn.value = null;\n }\n }\n };\n const handleMouseOut = () => {\n if (isServer)\n return;\n document.body.style.cursor = \"\";\n };\n const toggleOrder = ({ order, sortOrders }) => {\n if (order === \"\")\n return sortOrders[0];\n const index = sortOrders.indexOf(order || null);\n return sortOrders[index > sortOrders.length - 2 ? 0 : index + 1];\n };\n const handleSortClick = (event, column, givenOrder) => {\n event.stopPropagation();\n const order = column.order === givenOrder ? null : givenOrder || toggleOrder(column);\n let target = event.target;\n while (target && target.tagName !== \"TH\") {\n target = target.parentNode;\n }\n if (target && target.tagName === \"TH\") {\n if (hasClass(target, \"noclick\")) {\n removeClass(target, \"noclick\");\n return;\n }\n }\n if (!column.sortable)\n return;\n const states = props.store.states;\n let sortProp = states.sortProp.value;\n let sortOrder;\n const sortingColumn = states.sortingColumn.value;\n if (sortingColumn !== column || sortingColumn === column && sortingColumn.order === null) {\n if (sortingColumn) {\n sortingColumn.order = null;\n }\n states.sortingColumn.value = column;\n sortProp = column.property;\n }\n if (!order) {\n sortOrder = column.order = null;\n } else {\n sortOrder = column.order = order;\n }\n states.sortProp.value = sortProp;\n states.sortOrder.value = sortOrder;\n parent.store.commit(\"changeSortCondition\");\n };\n return {\n handleHeaderClick,\n handleHeaderContextMenu,\n handleMouseDown,\n handleMouseMove,\n handleMouseOut,\n handleSortClick,\n handleFilterClick\n };\n}\n\nfunction useStyle(props) {\n const instance = getCurrentInstance();\n const parent = instance.parent;\n const storeData = parent.store.states;\n const isCellHidden = (index, columns) => {\n let start = 0;\n for (let i = 0; i < index; i++) {\n start += columns[i].colSpan;\n }\n const after = start + columns[index].colSpan - 1;\n if (props.fixed === \"left\") {\n return after >= storeData.fixedLeafColumnsLength.value;\n } else if (props.fixed === \"right\") {\n return start < storeData.columns.value.length - storeData.rightFixedLeafColumnsLength.value;\n } else {\n return after < storeData.fixedLeafColumnsLength.value || start >= storeData.columns.value.length - storeData.rightFixedLeafColumnsLength.value;\n }\n };\n const getHeaderRowStyle = (rowIndex) => {\n const headerRowStyle = parent.props.headerRowStyle;\n if (typeof headerRowStyle === \"function\") {\n return headerRowStyle.call(null, { rowIndex });\n }\n return headerRowStyle;\n };\n const getHeaderRowClass = (rowIndex) => {\n const classes = [];\n const headerRowClassName = parent.props.headerRowClassName;\n if (typeof headerRowClassName === \"string\") {\n classes.push(headerRowClassName);\n } else if (typeof headerRowClassName === \"function\") {\n classes.push(headerRowClassName.call(null, { rowIndex }));\n }\n return classes.join(\" \");\n };\n const getHeaderCellStyle = (rowIndex, columnIndex, row, column) => {\n const headerCellStyle = parent.props.headerCellStyle;\n if (typeof headerCellStyle === \"function\") {\n return headerCellStyle.call(null, {\n rowIndex,\n columnIndex,\n row,\n column\n });\n }\n return headerCellStyle;\n };\n const getHeaderCellClass = (rowIndex, columnIndex, row, column) => {\n const classes = [\n column.id,\n column.order,\n column.headerAlign,\n column.className,\n column.labelClassName\n ];\n if (rowIndex === 0 && isCellHidden(columnIndex, row)) {\n classes.push(\"is-hidden\");\n }\n if (!column.children) {\n classes.push(\"is-leaf\");\n }\n if (column.sortable) {\n classes.push(\"is-sortable\");\n }\n const headerCellClassName = parent.props.headerCellClassName;\n if (typeof headerCellClassName === \"string\") {\n classes.push(headerCellClassName);\n } else if (typeof headerCellClassName === \"function\") {\n classes.push(headerCellClassName.call(null, {\n rowIndex,\n columnIndex,\n row,\n column\n }));\n }\n return classes.join(\" \");\n };\n return {\n getHeaderRowStyle,\n getHeaderRowClass,\n getHeaderCellStyle,\n getHeaderCellClass\n };\n}\n\nconst getAllColumns = (columns) => {\n const result = [];\n columns.forEach((column) => {\n if (column.children) {\n result.push(column);\n result.push.apply(result, getAllColumns(column.children));\n } else {\n result.push(column);\n }\n });\n return result;\n};\nconst convertToRows = (originColumns) => {\n let maxLevel = 1;\n const traverse = (column, parent) => {\n if (parent) {\n column.level = parent.level + 1;\n if (maxLevel < column.level) {\n maxLevel = column.level;\n }\n }\n if (column.children) {\n let colSpan = 0;\n column.children.forEach((subColumn) => {\n traverse(subColumn, column);\n colSpan += subColumn.colSpan;\n });\n column.colSpan = colSpan;\n } else {\n column.colSpan = 1;\n }\n };\n originColumns.forEach((column) => {\n column.level = 1;\n traverse(column, void 0);\n });\n const rows = [];\n for (let i = 0; i < maxLevel; i++) {\n rows.push([]);\n }\n const allColumns = getAllColumns(originColumns);\n allColumns.forEach((column) => {\n if (!column.children) {\n column.rowSpan = maxLevel - column.level + 1;\n } else {\n column.rowSpan = 1;\n }\n rows[column.level - 1].push(column);\n });\n return rows;\n};\nfunction useUtils(props) {\n const instance = getCurrentInstance();\n const parent = instance.parent;\n const columnRows = computed(() => {\n return convertToRows(props.store.states.originColumns.value);\n });\n const isGroup = computed(() => {\n const result = columnRows.value.length > 1;\n if (result)\n parent.state.isGroup.value = true;\n return result;\n });\n const toggleAllSelection = (event) => {\n event.stopPropagation();\n parent.store.commit(\"toggleAllSelection\");\n };\n return {\n isGroup,\n toggleAllSelection,\n columnRows\n };\n}\n\nfunction hGutter() {\n return h(\"col\", {\n name: \"gutter\"\n });\n}\nfunction hColgroup(columns, hasGutter = false) {\n return h(\"colgroup\", {}, [\n ...columns.map((column) => h(\"col\", {\n name: column.id,\n key: column.id\n })),\n hasGutter && hGutter()\n ]);\n}\n\nvar TableHeader = defineComponent({\n name: \"ElTableHeader\",\n components: {\n ElCheckbox\n },\n props: {\n fixed: {\n type: String,\n default: \"\"\n },\n store: {\n required: true,\n type: Object\n },\n border: Boolean,\n defaultSort: {\n type: Object,\n default: () => {\n return {\n prop: \"\",\n order: \"\"\n };\n }\n }\n },\n setup(props, { emit }) {\n const instance = getCurrentInstance();\n const parent = instance.parent;\n const storeData = parent.store.states;\n const filterPanels = ref({});\n const {\n tableLayout,\n onColumnsChange,\n onScrollableChange\n } = useLayoutObserver(parent);\n const hasGutter = computed(() => {\n return !props.fixed && tableLayout.gutterWidth;\n });\n onMounted(() => {\n nextTick(() => {\n const { prop, order } = props.defaultSort;\n const init = true;\n parent.store.commit(\"sort\", { prop, order, init });\n });\n });\n const {\n handleHeaderClick,\n handleHeaderContextMenu,\n handleMouseDown,\n handleMouseMove,\n handleMouseOut,\n handleSortClick,\n handleFilterClick\n } = useEvent(props, emit);\n const {\n getHeaderRowStyle,\n getHeaderRowClass,\n getHeaderCellStyle,\n getHeaderCellClass\n } = useStyle(props);\n const { isGroup, toggleAllSelection, columnRows } = useUtils(props);\n instance.state = {\n onColumnsChange,\n onScrollableChange\n };\n instance.filterPanels = filterPanels;\n return {\n columns: storeData.columns,\n filterPanels,\n hasGutter,\n onColumnsChange,\n onScrollableChange,\n columnRows,\n getHeaderRowClass,\n getHeaderRowStyle,\n getHeaderCellClass,\n getHeaderCellStyle,\n handleHeaderClick,\n handleHeaderContextMenu,\n handleMouseDown,\n handleMouseMove,\n handleMouseOut,\n handleSortClick,\n handleFilterClick,\n isGroup,\n toggleAllSelection\n };\n },\n render() {\n return h(\"table\", {\n border: \"0\",\n cellpadding: \"0\",\n cellspacing: \"0\",\n class: \"el-table__header\"\n }, [\n hColgroup(this.columns, this.hasGutter),\n h(\"thead\", {\n class: { \"is-group\": this.isGroup, \"has-gutter\": this.hasGutter }\n }, this.columnRows.map((subColumns, rowIndex) => h(\"tr\", {\n class: this.getHeaderRowClass(rowIndex),\n key: rowIndex,\n style: this.getHeaderRowStyle(rowIndex)\n }, subColumns.map((column, cellIndex) => h(\"th\", {\n class: this.getHeaderCellClass(rowIndex, cellIndex, subColumns, column),\n colspan: column.colSpan,\n key: `${column.id}-thead`,\n rowSpan: column.rowSpan,\n style: this.getHeaderCellStyle(rowIndex, cellIndex, subColumns, column),\n onClick: ($event) => this.handleHeaderClick($event, column),\n onContextmenu: ($event) => this.handleHeaderContextMenu($event, column),\n onMousedown: ($event) => this.handleMouseDown($event, column),\n onMousemove: ($event) => this.handleMouseMove($event, column),\n onMouseout: this.handleMouseOut\n }, [\n h(\"div\", {\n class: [\n \"cell\",\n column.filteredValue && column.filteredValue.length > 0 ? \"highlight\" : \"\",\n column.labelClassName\n ]\n }, [\n column.renderHeader ? column.renderHeader({\n column,\n $index: cellIndex,\n store: this.store,\n _self: this.$parent\n }) : column.label,\n column.sortable && h(\"span\", {\n onClick: ($event) => this.handleSortClick($event, column),\n class: \"caret-wrapper\"\n }, [\n h(\"i\", {\n onClick: ($event) => this.handleSortClick($event, column, \"ascending\"),\n class: \"sort-caret ascending\"\n }),\n h(\"i\", {\n onClick: ($event) => this.handleSortClick($event, column, \"descending\"),\n class: \"sort-caret descending\"\n })\n ]),\n column.filterable && h(script, {\n store: this.$parent.store,\n placement: column.filterPlacement || \"bottom-start\",\n column,\n upDataColumn: (key, value) => {\n column[key] = value;\n }\n })\n ])\n ])))))\n ]);\n }\n});\n\nfunction useEvents(props) {\n const instance = getCurrentInstance();\n const parent = instance.parent;\n const tooltipContent = ref(\"\");\n const tooltipTrigger = ref(h(\"div\"));\n const handleEvent = (event, row, name) => {\n const table = parent;\n const cell = getCell(event);\n let column;\n if (cell) {\n column = getColumnByCell({\n columns: props.store.states.columns.value\n }, cell);\n if (column) {\n table.emit(`cell-${name}`, row, column, cell, event);\n }\n }\n table.emit(`row-${name}`, row, column, event);\n };\n const handleDoubleClick = (event, row) => {\n handleEvent(event, row, \"dblclick\");\n };\n const handleClick = (event, row) => {\n props.store.commit(\"setCurrentRow\", row);\n handleEvent(event, row, \"click\");\n };\n const handleContextMenu = (event, row) => {\n handleEvent(event, row, \"contextmenu\");\n };\n const handleMouseEnter = debounce(function(index) {\n props.store.commit(\"setHoverRow\", index);\n }, 30);\n const handleMouseLeave = debounce(function() {\n props.store.commit(\"setHoverRow\", null);\n }, 30);\n const handleCellMouseEnter = (event, row) => {\n const table = parent;\n const cell = getCell(event);\n if (cell) {\n const column = getColumnByCell({\n columns: props.store.states.columns.value\n }, cell);\n const hoverState = table.hoverState = { cell, column, row };\n table.emit(\"cell-mouse-enter\", hoverState.row, hoverState.column, hoverState.cell, event);\n }\n const cellChild = event.target.querySelector(\".cell\");\n if (!(hasClass(cellChild, \"el-tooltip\") && cellChild.childNodes.length)) {\n return;\n }\n const range = document.createRange();\n range.setStart(cellChild, 0);\n range.setEnd(cellChild, cellChild.childNodes.length);\n const rangeWidth = range.getBoundingClientRect().width;\n const padding = (parseInt(getStyle(cellChild, \"paddingLeft\"), 10) || 0) + (parseInt(getStyle(cellChild, \"paddingRight\"), 10) || 0);\n if (rangeWidth + padding > cellChild.offsetWidth || cellChild.scrollWidth > cellChild.offsetWidth) {\n createTablePopper(cell, cell.innerText || cell.textContent, {\n placement: \"top\",\n strategy: \"fixed\"\n }, row.tooltipEffect);\n }\n };\n const handleCellMouseLeave = (event) => {\n const cell = getCell(event);\n if (!cell)\n return;\n const oldHoverState = parent.hoverState;\n parent.emit(\"cell-mouse-leave\", oldHoverState == null ? void 0 : oldHoverState.row, oldHoverState == null ? void 0 : oldHoverState.column, oldHoverState == null ? void 0 : oldHoverState.cell, event);\n };\n return {\n handleDoubleClick,\n handleClick,\n handleContextMenu,\n handleMouseEnter,\n handleMouseLeave,\n handleCellMouseEnter,\n handleCellMouseLeave,\n tooltipContent,\n tooltipTrigger\n };\n}\n\nfunction useStyles(props) {\n const instance = getCurrentInstance();\n const parent = instance.parent;\n const isColumnHidden = (index) => {\n if (props.fixed === \"left\") {\n return index >= props.store.states.fixedLeafColumnsLength.value;\n } else if (props.fixed === \"right\") {\n return index < props.store.states.columns.value.length - props.store.states.rightFixedLeafColumnsLength.value;\n } else {\n return index < props.store.states.fixedLeafColumnsLength.value || index >= props.store.states.columns.value.length - props.store.states.rightFixedLeafColumnsLength.value;\n }\n };\n const getRowStyle = (row, rowIndex) => {\n const rowStyle = parent.props.rowStyle;\n if (typeof rowStyle === \"function\") {\n return rowStyle.call(null, {\n row,\n rowIndex\n });\n }\n return rowStyle || null;\n };\n const getRowClass = (row, rowIndex) => {\n const classes = [\"el-table__row\"];\n if (parent.props.highlightCurrentRow && row === props.store.states.currentRow.value) {\n classes.push(\"current-row\");\n }\n if (props.stripe && rowIndex % 2 === 1) {\n classes.push(\"el-table__row--striped\");\n }\n const rowClassName = parent.props.rowClassName;\n if (typeof rowClassName === \"string\") {\n classes.push(rowClassName);\n } else if (typeof rowClassName === \"function\") {\n classes.push(rowClassName.call(null, {\n row,\n rowIndex\n }));\n }\n if (props.store.states.expandRows.value.indexOf(row) > -1) {\n classes.push(\"expanded\");\n }\n return classes;\n };\n const getCellStyle = (rowIndex, columnIndex, row, column) => {\n const cellStyle = parent.props.cellStyle;\n if (typeof cellStyle === \"function\") {\n return cellStyle.call(null, {\n rowIndex,\n columnIndex,\n row,\n column\n });\n }\n return cellStyle;\n };\n const getCellClass = (rowIndex, columnIndex, row, column) => {\n const classes = [column.id, column.align, column.className];\n if (isColumnHidden(columnIndex)) {\n classes.push(\"is-hidden\");\n }\n const cellClassName = parent.props.cellClassName;\n if (typeof cellClassName === \"string\") {\n classes.push(cellClassName);\n } else if (typeof cellClassName === \"function\") {\n classes.push(cellClassName.call(null, {\n rowIndex,\n columnIndex,\n row,\n column\n }));\n }\n return classes.join(\" \");\n };\n const getSpan = (row, column, rowIndex, columnIndex) => {\n let rowspan = 1;\n let colspan = 1;\n const fn = parent.props.spanMethod;\n if (typeof fn === \"function\") {\n const result = fn({\n row,\n column,\n rowIndex,\n columnIndex\n });\n if (Array.isArray(result)) {\n rowspan = result[0];\n colspan = result[1];\n } else if (typeof result === \"object\") {\n rowspan = result.rowspan;\n colspan = result.colspan;\n }\n }\n return { rowspan, colspan };\n };\n const getColspanRealWidth = (columns, colspan, index) => {\n if (colspan < 1) {\n return columns[index].realWidth;\n }\n const widthArr = columns.map(({ realWidth, width }) => realWidth || width).slice(index, index + colspan);\n return Number(widthArr.reduce((acc, width) => Number(acc) + Number(width), -1));\n };\n return {\n getRowStyle,\n getRowClass,\n getCellStyle,\n getCellClass,\n getSpan,\n getColspanRealWidth,\n isColumnHidden\n };\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nfunction useRender(props) {\n const instance = getCurrentInstance();\n const parent = instance.parent;\n const {\n handleDoubleClick,\n handleClick,\n handleContextMenu,\n handleMouseEnter,\n handleMouseLeave,\n handleCellMouseEnter,\n handleCellMouseLeave,\n tooltipContent,\n tooltipTrigger\n } = useEvents(props);\n const {\n getRowStyle,\n getRowClass,\n getCellStyle,\n getCellClass,\n getSpan,\n getColspanRealWidth\n } = useStyles(props);\n const firstDefaultColumnIndex = computed(() => {\n return arrayFindIndex(props.store.states.columns.value, ({ type }) => type === \"default\");\n });\n const getKeyOfRow = (row, index) => {\n const rowKey = parent.props.rowKey;\n if (rowKey) {\n return getRowIdentity(row, rowKey);\n }\n return index;\n };\n const rowRender = (row, $index, treeRowData) => {\n const { tooltipEffect, store } = props;\n const { indent, columns } = store.states;\n const rowClasses = getRowClass(row, $index);\n let display = true;\n if (treeRowData) {\n rowClasses.push(\"el-table__row--level-\" + treeRowData.level);\n display = treeRowData.display;\n }\n const displayStyle = display ? null : {\n display: \"none\"\n };\n return h(\"tr\", {\n style: [displayStyle, getRowStyle(row, $index)],\n class: rowClasses,\n key: getKeyOfRow(row, $index),\n onDblclick: ($event) => handleDoubleClick($event, row),\n onClick: ($event) => handleClick($event, row),\n onContextmenu: ($event) => handleContextMenu($event, row),\n onMouseenter: () => handleMouseEnter($index),\n onMouseleave: handleMouseLeave\n }, columns.value.map((column, cellIndex) => {\n const { rowspan, colspan } = getSpan(row, column, $index, cellIndex);\n if (!rowspan || !colspan) {\n return null;\n }\n const columnData = __spreadValues$4({}, column);\n columnData.realWidth = getColspanRealWidth(columns.value, colspan, cellIndex);\n const data = {\n store: props.store,\n _self: props.context || parent,\n column: columnData,\n row,\n $index\n };\n if (cellIndex === firstDefaultColumnIndex.value && treeRowData) {\n data.treeNode = {\n indent: treeRowData.level * indent.value,\n level: treeRowData.level\n };\n if (typeof treeRowData.expanded === \"boolean\") {\n data.treeNode.expanded = treeRowData.expanded;\n if (\"loading\" in treeRowData) {\n data.treeNode.loading = treeRowData.loading;\n }\n if (\"noLazyChildren\" in treeRowData) {\n data.treeNode.noLazyChildren = treeRowData.noLazyChildren;\n }\n }\n }\n const baseKey = `${$index},${cellIndex}`;\n const patchKey = columnData.columnKey || columnData.rawColumnKey || \"\";\n return h(\"td\", {\n style: getCellStyle($index, cellIndex, row, column),\n class: getCellClass($index, cellIndex, row, column),\n key: `${patchKey}${baseKey}`,\n rowspan,\n colspan,\n onMouseenter: ($event) => handleCellMouseEnter($event, __spreadProps$1(__spreadValues$4({}, row), { tooltipEffect })),\n onMouseleave: handleCellMouseLeave\n }, [column.renderCell(data)]);\n }));\n };\n const wrappedRowRender = (row, $index) => {\n const store = props.store;\n const { isRowExpanded, assertRowKey } = store;\n const {\n treeData,\n lazyTreeNodeMap,\n childrenColumnName,\n rowKey\n } = store.states;\n const hasExpandColumn = store.states.columns.value.some(({ type }) => type === \"expand\");\n if (hasExpandColumn && isRowExpanded(row)) {\n const renderExpanded = parent.renderExpanded;\n const tr = rowRender(row, $index, void 0);\n if (!renderExpanded) {\n console.error(\"[Element Error]renderExpanded is required.\");\n return tr;\n }\n return [[\n tr,\n h(\"tr\", {\n key: \"expanded-row__\" + tr.key\n }, [\n h(\"td\", {\n colspan: store.states.columns.value.length,\n class: \"el-table__expanded-cell\"\n }, [renderExpanded({ row, $index, store })])\n ])\n ]];\n } else if (Object.keys(treeData.value).length) {\n assertRowKey();\n const key = getRowIdentity(row, rowKey.value);\n let cur = treeData.value[key];\n let treeRowData = null;\n if (cur) {\n treeRowData = {\n expanded: cur.expanded,\n level: cur.level,\n display: true\n };\n if (typeof cur.lazy === \"boolean\") {\n if (typeof cur.loaded === \"boolean\" && cur.loaded) {\n treeRowData.noLazyChildren = !(cur.children && cur.children.length);\n }\n treeRowData.loading = cur.loading;\n }\n }\n const tmp = [rowRender(row, $index, treeRowData)];\n if (cur) {\n let i = 0;\n const traverse = (children, parent2) => {\n if (!(children && children.length && parent2))\n return;\n children.forEach((node) => {\n const innerTreeRowData = {\n display: parent2.display && parent2.expanded,\n level: parent2.level + 1,\n expanded: false,\n noLazyChildren: false,\n loading: false\n };\n const childKey = getRowIdentity(node, rowKey.value);\n if (childKey === void 0 || childKey === null) {\n throw new Error(\"for nested data item, row-key is required.\");\n }\n cur = __spreadValues$4({}, treeData.value[childKey]);\n if (cur) {\n innerTreeRowData.expanded = cur.expanded;\n cur.level = cur.level || innerTreeRowData.level;\n cur.display = !!(cur.expanded && innerTreeRowData.display);\n if (typeof cur.lazy === \"boolean\") {\n if (typeof cur.loaded === \"boolean\" && cur.loaded) {\n innerTreeRowData.noLazyChildren = !(cur.children && cur.children.length);\n }\n innerTreeRowData.loading = cur.loading;\n }\n }\n i++;\n tmp.push(rowRender(node, $index + i, innerTreeRowData));\n if (cur) {\n const nodes2 = lazyTreeNodeMap.value[childKey] || node[childrenColumnName.value];\n traverse(nodes2, cur);\n }\n });\n };\n cur.display = true;\n const nodes = lazyTreeNodeMap.value[key] || row[childrenColumnName.value];\n traverse(nodes, cur);\n }\n return tmp;\n } else {\n return rowRender(row, $index, void 0);\n }\n };\n return {\n wrappedRowRender,\n tooltipContent,\n tooltipTrigger\n };\n}\n\nconst defaultProps = {\n store: {\n required: true,\n type: Object\n },\n stripe: Boolean,\n tooltipEffect: String,\n context: {\n default: () => ({}),\n type: Object\n },\n rowClassName: [String, Function],\n rowStyle: [Object, Function],\n fixed: {\n type: String,\n default: \"\"\n },\n highlight: Boolean\n};\n\nvar TableBody = defineComponent({\n name: \"ElTableBody\",\n props: defaultProps,\n setup(props) {\n const instance = getCurrentInstance();\n const parent = instance.parent;\n const { wrappedRowRender, tooltipContent, tooltipTrigger } = useRender(props);\n const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent);\n watch(props.store.states.hoverRow, (newVal, oldVal) => {\n if (!props.store.states.isComplex.value || isServer)\n return;\n let raf = window.requestAnimationFrame;\n if (!raf) {\n raf = (fn) => window.setTimeout(fn, 16);\n }\n raf(() => {\n const rows = instance.vnode.el.querySelectorAll(\".el-table__row\");\n const oldRow = rows[oldVal];\n const newRow = rows[newVal];\n if (oldRow) {\n removeClass(oldRow, \"hover-row\");\n }\n if (newRow) {\n addClass(newRow, \"hover-row\");\n }\n });\n });\n onUnmounted(() => {\n var _a;\n (_a = removePopper) == null ? void 0 : _a();\n });\n onUpdated(() => {\n var _a;\n (_a = removePopper) == null ? void 0 : _a();\n });\n return {\n onColumnsChange,\n onScrollableChange,\n wrappedRowRender,\n tooltipContent,\n tooltipTrigger\n };\n },\n render() {\n const data = this.store.states.data.value || [];\n return h(\"table\", {\n class: \"el-table__body\",\n cellspacing: \"0\",\n cellpadding: \"0\",\n border: \"0\"\n }, [\n hColgroup(this.store.states.columns.value),\n h(\"tbody\", {}, [\n data.reduce((acc, row) => {\n return acc.concat(this.wrappedRowRender(row, acc.length));\n }, [])\n ])\n ]);\n }\n});\n\nfunction useMapState() {\n const instance = getCurrentInstance();\n const table = instance.parent;\n const store = table.store;\n const leftFixedLeafCount = computed(() => {\n return store.states.fixedLeafColumnsLength.value;\n });\n const rightFixedLeafCount = computed(() => {\n return store.states.rightFixedColumns.value.length;\n });\n const columnsCount = computed(() => {\n return store.states.columns.value.length;\n });\n const leftFixedCount = computed(() => {\n return store.states.fixedColumns.value.length;\n });\n const rightFixedCount = computed(() => {\n return store.states.rightFixedColumns.value.length;\n });\n return {\n leftFixedLeafCount,\n rightFixedLeafCount,\n columnsCount,\n leftFixedCount,\n rightFixedCount,\n columns: store.states.columns\n };\n}\n\nfunction useStyle$1(props) {\n const instance = getCurrentInstance();\n const table = instance.parent;\n const store = table.store;\n const {\n leftFixedLeafCount,\n rightFixedLeafCount,\n columnsCount,\n leftFixedCount,\n rightFixedCount,\n columns\n } = useMapState();\n const hasGutter = computed(() => {\n return !props.fixed && table.layout.gutterWidth;\n });\n const isCellHidden = (index, columns2, column) => {\n if (props.fixed || props.fixed === \"left\") {\n return index >= leftFixedLeafCount.value;\n } else if (props.fixed === \"right\") {\n let before = 0;\n for (let i = 0; i < index; i++) {\n before += columns2[i].colSpan;\n }\n return before < columnsCount.value - rightFixedLeafCount.value;\n } else if (!props.fixed && column.fixed) {\n return true;\n } else {\n return index < leftFixedCount.value || index >= columnsCount.value - rightFixedCount.value;\n }\n };\n const getRowClasses = (column, cellIndex) => {\n const classes = [column.id, column.align, column.labelClassName];\n if (column.className) {\n classes.push(column.className);\n }\n if (isCellHidden(cellIndex, store.states.columns.value, column)) {\n classes.push(\"is-hidden\");\n }\n if (!column.children) {\n classes.push(\"is-leaf\");\n }\n return classes;\n };\n return {\n hasGutter,\n getRowClasses,\n columns\n };\n}\n\nvar TableFooter = defineComponent({\n name: \"ElTableFooter\",\n props: {\n fixed: {\n type: String,\n default: \"\"\n },\n store: {\n required: true,\n type: Object\n },\n summaryMethod: Function,\n sumText: String,\n border: Boolean,\n defaultSort: {\n type: Object,\n default: () => {\n return {\n prop: \"\",\n order: \"\"\n };\n }\n }\n },\n setup(props) {\n const { hasGutter, getRowClasses, columns } = useStyle$1(props);\n return {\n getRowClasses,\n hasGutter,\n columns\n };\n },\n render() {\n let sums = [];\n if (this.summaryMethod) {\n sums = this.summaryMethod({\n columns: this.columns,\n data: this.store.states.data.value\n });\n } else {\n this.columns.forEach((column, index) => {\n if (index === 0) {\n sums[index] = this.sumText;\n return;\n }\n const values = this.store.states.data.value.map((item) => Number(item[column.property]));\n const precisions = [];\n let notNumber = true;\n values.forEach((value) => {\n if (!isNaN(value)) {\n notNumber = false;\n const decimal = (\"\" + value).split(\".\")[1];\n precisions.push(decimal ? decimal.length : 0);\n }\n });\n const precision = Math.max.apply(null, precisions);\n if (!notNumber) {\n sums[index] = values.reduce((prev, curr) => {\n const value = Number(curr);\n if (!isNaN(value)) {\n return parseFloat((prev + curr).toFixed(Math.min(precision, 20)));\n } else {\n return prev;\n }\n }, 0);\n } else {\n sums[index] = \"\";\n }\n });\n }\n return h(\"table\", {\n class: \"el-table__footer\",\n cellspacing: \"0\",\n cellpadding: \"0\",\n border: \"0\"\n }, [\n hColgroup(this.columns, this.hasGutter),\n h(\"tbody\", {\n class: [{ \"has-gutter\": this.hasGutter }]\n }, [\n h(\"tr\", {}, [\n ...this.columns.map((column, cellIndex) => h(\"td\", {\n key: cellIndex,\n colspan: column.colSpan,\n rowspan: column.rowSpan,\n class: this.getRowClasses(column, cellIndex)\n }, [\n h(\"div\", {\n class: [\"cell\", column.labelClassName]\n }, [sums[cellIndex]])\n ])),\n this.hasGutter && hGutter()\n ])\n ])\n ]);\n }\n});\n\nfunction useUtils$1(store) {\n const setCurrentRow = (row) => {\n store.commit(\"setCurrentRow\", row);\n };\n const toggleRowSelection = (row, selected) => {\n store.toggleRowSelection(row, selected, false);\n store.updateAllSelected();\n };\n const clearSelection = () => {\n store.clearSelection();\n };\n const clearFilter = (columnKeys) => {\n store.clearFilter(columnKeys);\n };\n const toggleAllSelection = () => {\n store.commit(\"toggleAllSelection\");\n };\n const toggleRowExpansion = (row, expanded) => {\n store.toggleRowExpansionAdapter(row, expanded);\n };\n const clearSort = () => {\n store.clearSort();\n };\n const sort = (prop, order) => {\n store.commit(\"sort\", { prop, order });\n };\n return {\n setCurrentRow,\n toggleRowSelection,\n clearSelection,\n clearFilter,\n toggleAllSelection,\n toggleRowExpansion,\n clearSort,\n sort\n };\n}\n\nfunction useStyle$2(props, layout, store, table) {\n const $ELEMENT = useGlobalConfig();\n const isHidden = ref(false);\n const renderExpanded = ref(null);\n const resizeProxyVisible = ref(false);\n const setDragVisible = (visible) => {\n resizeProxyVisible.value = visible;\n };\n const resizeState = ref({\n width: null,\n height: null\n });\n const isGroup = ref(false);\n watchEffect(() => {\n layout.setHeight(props.height);\n });\n watchEffect(() => {\n layout.setMaxHeight(props.maxHeight);\n });\n watch(() => [props.currentRowKey, store.states.rowKey], ([currentRowKey, rowKey]) => {\n if (!unref(rowKey))\n return;\n store.setCurrentRowKey(currentRowKey + \"\");\n }, {\n immediate: true\n });\n watch(() => props.data, (data) => {\n table.store.commit(\"setData\", data);\n }, {\n immediate: true,\n deep: true\n });\n watchEffect(() => {\n if (props.expandRowKeys) {\n store.setExpandRowKeysAdapter(props.expandRowKeys);\n }\n });\n const handleMouseLeave = () => {\n table.store.commit(\"setHoverRow\", null);\n if (table.hoverState)\n table.hoverState = null;\n };\n const handleHeaderFooterMousewheel = (event, data) => {\n const { pixelX, pixelY } = data;\n if (Math.abs(pixelX) >= Math.abs(pixelY)) {\n table.refs.bodyWrapper.scrollLeft += data.pixelX / 5;\n }\n };\n const shouldUpdateHeight = computed(() => {\n return props.height || props.maxHeight || store.states.fixedColumns.value.length > 0 || store.states.rightFixedColumns.value.length > 0;\n });\n const doLayout = () => {\n if (shouldUpdateHeight.value) {\n layout.updateElsHeight();\n }\n layout.updateColumnsWidth();\n syncPostion();\n };\n onMounted(() => {\n setScrollClass(\"is-scrolling-left\");\n bindEvents();\n store.updateColumns();\n doLayout();\n resizeState.value = {\n width: table.vnode.el.offsetWidth,\n height: table.vnode.el.offsetHeight\n };\n store.states.columns.value.forEach((column) => {\n if (column.filteredValue && column.filteredValue.length) {\n table.store.commit(\"filterChange\", {\n column,\n values: column.filteredValue,\n silent: true\n });\n }\n });\n table.$ready = true;\n });\n const setScrollClassByEl = (el, className) => {\n if (!el)\n return;\n const classList = Array.from(el.classList).filter((item) => !item.startsWith(\"is-scrolling-\"));\n classList.push(layout.scrollX.value ? className : \"is-scrolling-none\");\n el.className = classList.join(\" \");\n };\n const setScrollClass = (className) => {\n const { bodyWrapper } = table.refs;\n setScrollClassByEl(bodyWrapper, className);\n };\n const syncPostion = throttle(function() {\n if (!table.refs.bodyWrapper)\n return;\n const {\n scrollLeft,\n scrollTop,\n offsetWidth,\n scrollWidth\n } = table.refs.bodyWrapper;\n const {\n headerWrapper,\n footerWrapper,\n fixedBodyWrapper,\n rightFixedBodyWrapper\n } = table.refs;\n if (headerWrapper)\n headerWrapper.scrollLeft = scrollLeft;\n if (footerWrapper)\n footerWrapper.scrollLeft = scrollLeft;\n if (fixedBodyWrapper)\n fixedBodyWrapper.scrollTop = scrollTop;\n if (rightFixedBodyWrapper)\n rightFixedBodyWrapper.scrollTop = scrollTop;\n const maxScrollLeftPosition = scrollWidth - offsetWidth - 1;\n if (scrollLeft >= maxScrollLeftPosition) {\n setScrollClass(\"is-scrolling-right\");\n } else if (scrollLeft === 0) {\n setScrollClass(\"is-scrolling-left\");\n } else {\n setScrollClass(\"is-scrolling-middle\");\n }\n }, 10);\n const bindEvents = () => {\n window.addEventListener(\"resize\", doLayout);\n table.refs.bodyWrapper.addEventListener(\"scroll\", syncPostion, {\n passive: true\n });\n if (props.fit) {\n addResizeListener(table.vnode.el, resizeListener);\n }\n };\n onUnmounted(() => {\n unbindEvents();\n });\n const unbindEvents = () => {\n var _a;\n (_a = table.refs.bodyWrapper) == null ? void 0 : _a.removeEventListener(\"scroll\", syncPostion, true);\n window.removeEventListener(\"resize\", doLayout);\n if (props.fit) {\n removeResizeListener(table.vnode.el, resizeListener);\n }\n };\n const resizeListener = () => {\n if (!table.$ready)\n return;\n let shouldUpdateLayout = false;\n const el = table.vnode.el;\n const { width: oldWidth, height: oldHeight } = resizeState.value;\n const width = el.offsetWidth;\n if (oldWidth !== width) {\n shouldUpdateLayout = true;\n }\n const height = el.offsetHeight;\n if ((props.height || shouldUpdateHeight.value) && oldHeight !== height) {\n shouldUpdateLayout = true;\n }\n if (shouldUpdateLayout) {\n resizeState.value = {\n width,\n height\n };\n doLayout();\n }\n };\n const tableSize = computed(() => {\n return props.size || $ELEMENT.size;\n });\n const bodyWidth = computed(() => {\n const { bodyWidth: bodyWidth_, scrollY, gutterWidth } = layout;\n return bodyWidth_.value ? bodyWidth_.value - (scrollY.value ? gutterWidth : 0) + \"px\" : \"\";\n });\n const bodyHeight = computed(() => {\n const headerHeight = layout.headerHeight.value || 0;\n const bodyHeight2 = layout.bodyHeight.value;\n const footerHeight = layout.footerHeight.value || 0;\n if (props.height) {\n return {\n height: bodyHeight2 ? bodyHeight2 + \"px\" : \"\"\n };\n } else if (props.maxHeight) {\n const maxHeight = parseHeight(props.maxHeight);\n if (typeof maxHeight === \"number\") {\n return {\n \"max-height\": maxHeight - footerHeight - (props.showHeader ? headerHeight : 0) + \"px\"\n };\n }\n }\n return {};\n });\n const emptyBlockStyle = computed(() => {\n if (props.data && props.data.length)\n return null;\n let height = \"100%\";\n if (layout.appendHeight.value) {\n height = `calc(100% - ${layout.appendHeight.value}px)`;\n }\n return {\n width: bodyWidth.value,\n height\n };\n });\n const handleFixedMousewheel = (event, data) => {\n const bodyWrapper = table.refs.bodyWrapper;\n if (Math.abs(data.spinY) > 0) {\n const currentScrollTop = bodyWrapper.scrollTop;\n if (data.pixelY < 0 && currentScrollTop !== 0) {\n event.preventDefault();\n }\n if (data.pixelY > 0 && bodyWrapper.scrollHeight - bodyWrapper.clientHeight > currentScrollTop) {\n event.preventDefault();\n }\n bodyWrapper.scrollTop += Math.ceil(data.pixelY / 5);\n } else {\n bodyWrapper.scrollLeft += Math.ceil(data.pixelX / 5);\n }\n };\n const fixedHeight = computed(() => {\n if (props.maxHeight) {\n if (props.showSummary) {\n return {\n bottom: 0\n };\n }\n return {\n bottom: layout.scrollX.value && props.data.length ? layout.gutterWidth + \"px\" : \"\"\n };\n } else {\n if (props.showSummary) {\n return {\n height: layout.tableHeight.value ? layout.tableHeight.value + \"px\" : \"\"\n };\n }\n return {\n height: layout.viewportHeight.value ? layout.viewportHeight.value + \"px\" : \"\"\n };\n }\n });\n const fixedBodyHeight = computed(() => {\n if (props.height) {\n return {\n height: layout.fixedBodyHeight.value ? layout.fixedBodyHeight.value + \"px\" : \"\"\n };\n } else if (props.maxHeight) {\n let maxHeight = parseHeight(props.maxHeight);\n if (typeof maxHeight === \"number\") {\n maxHeight = layout.scrollX.value ? maxHeight - layout.gutterWidth : maxHeight;\n if (props.showHeader) {\n maxHeight -= layout.headerHeight.value;\n }\n maxHeight -= layout.footerHeight.value;\n return {\n \"max-height\": maxHeight + \"px\"\n };\n }\n }\n return {};\n });\n return {\n isHidden,\n renderExpanded,\n setDragVisible,\n isGroup,\n handleMouseLeave,\n handleHeaderFooterMousewheel,\n tableSize,\n bodyHeight,\n emptyBlockStyle,\n handleFixedMousewheel,\n fixedHeight,\n fixedBodyHeight,\n resizeProxyVisible,\n bodyWidth,\n resizeState,\n doLayout\n };\n}\n\nvar defaultProps$1 = {\n data: {\n type: Array,\n default: () => {\n return [];\n }\n },\n size: String,\n width: [String, Number],\n height: [String, Number],\n maxHeight: [String, Number],\n fit: {\n type: Boolean,\n default: true\n },\n stripe: Boolean,\n border: Boolean,\n rowKey: [String, Function],\n showHeader: {\n type: Boolean,\n default: true\n },\n showSummary: Boolean,\n sumText: String,\n summaryMethod: Function,\n rowClassName: [String, Function],\n rowStyle: [Object, Function],\n cellClassName: [String, Function],\n cellStyle: [Object, Function],\n headerRowClassName: [String, Function],\n headerRowStyle: [Object, Function],\n headerCellClassName: [String, Function],\n headerCellStyle: [Object, Function],\n highlightCurrentRow: Boolean,\n currentRowKey: [String, Number],\n emptyText: String,\n expandRowKeys: Array,\n defaultExpandAll: Boolean,\n defaultSort: Object,\n tooltipEffect: String,\n spanMethod: Function,\n selectOnIndeterminate: {\n type: Boolean,\n default: true\n },\n indent: {\n type: Number,\n default: 16\n },\n treeProps: {\n type: Object,\n default: () => {\n return {\n hasChildren: \"hasChildren\",\n children: \"children\"\n };\n }\n },\n lazy: Boolean,\n load: Function,\n style: {\n type: Object,\n default: () => ({})\n },\n className: {\n type: String,\n default: \"\"\n }\n};\n\nlet tableIdSeed = 1;\nvar script$1 = defineComponent({\n name: \"ElTable\",\n directives: {\n Mousewheel\n },\n components: {\n TableHeader,\n TableBody,\n TableFooter\n },\n props: defaultProps$1,\n emits: [\n \"select\",\n \"select-all\",\n \"selection-change\",\n \"cell-mouse-enter\",\n \"cell-mouse-leave\",\n \"cell-contextmenu\",\n \"cell-click\",\n \"cell-dblclick\",\n \"row-click\",\n \"row-contextmenu\",\n \"row-dblclick\",\n \"header-click\",\n \"header-contextmenu\",\n \"sort-change\",\n \"filter-change\",\n \"current-change\",\n \"header-dragend\",\n \"expand-change\"\n ],\n setup(props) {\n const { t } = useLocaleInject();\n let table = getCurrentInstance();\n const store = createStore(table, props);\n table.store = store;\n const layout = new TableLayout({\n store: table.store,\n table,\n fit: props.fit,\n showHeader: props.showHeader\n });\n table.layout = layout;\n const isEmpty = computed(() => (store.states.data.value || []).length === 0);\n const {\n setCurrentRow,\n toggleRowSelection,\n clearSelection,\n clearFilter,\n toggleAllSelection,\n toggleRowExpansion,\n clearSort,\n sort\n } = useUtils$1(store);\n const {\n isHidden,\n renderExpanded,\n setDragVisible,\n isGroup,\n handleMouseLeave,\n handleHeaderFooterMousewheel,\n tableSize,\n bodyHeight,\n emptyBlockStyle,\n handleFixedMousewheel,\n fixedHeight,\n fixedBodyHeight,\n resizeProxyVisible,\n bodyWidth,\n resizeState,\n doLayout\n } = useStyle$2(props, layout, store, table);\n const debouncedUpdateLayout = debounce(doLayout, 50);\n const tableId = \"el-table_\" + tableIdSeed++;\n table.tableId = tableId;\n table.state = {\n isGroup,\n resizeState,\n doLayout,\n debouncedUpdateLayout\n };\n return {\n layout,\n store,\n handleHeaderFooterMousewheel,\n handleMouseLeave,\n tableId,\n tableSize,\n isHidden,\n isEmpty,\n renderExpanded,\n resizeProxyVisible,\n resizeState,\n isGroup,\n bodyWidth,\n bodyHeight,\n emptyBlockStyle,\n debouncedUpdateLayout,\n handleFixedMousewheel,\n fixedHeight,\n fixedBodyHeight,\n setCurrentRow,\n toggleRowSelection,\n clearSelection,\n clearFilter,\n toggleAllSelection,\n toggleRowExpansion,\n clearSort,\n doLayout,\n sort,\n t,\n setDragVisible,\n context: table\n };\n }\n});\n\nconst _hoisted_1$1 = {\n ref: \"hiddenColumns\",\n class: \"hidden-columns\"\n};\nconst _hoisted_2$1 = {\n key: 0,\n ref: \"headerWrapper\",\n class: \"el-table__header-wrapper\"\n};\nconst _hoisted_3$1 = { class: \"el-table__empty-text\" };\nconst _hoisted_4$1 = {\n key: 1,\n ref: \"appendWrapper\",\n class: \"el-table__append-wrapper\"\n};\nconst _hoisted_5 = {\n key: 1,\n ref: \"footerWrapper\",\n class: \"el-table__footer-wrapper\"\n};\nconst _hoisted_6 = {\n key: 0,\n ref: \"fixedHeaderWrapper\",\n class: \"el-table__fixed-header-wrapper\"\n};\nconst _hoisted_7 = {\n key: 1,\n ref: \"fixedFooterWrapper\",\n class: \"el-table__fixed-footer-wrapper\"\n};\nconst _hoisted_8 = {\n key: 0,\n ref: \"rightFixedHeaderWrapper\",\n class: \"el-table__fixed-header-wrapper\"\n};\nconst _hoisted_9 = {\n key: 1,\n ref: \"rightFixedFooterWrapper\",\n class: \"el-table__fixed-footer-wrapper\"\n};\nconst _hoisted_10 = {\n ref: \"resizeProxy\",\n class: \"el-table__column-resize-proxy\"\n};\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_table_header = resolveComponent(\"table-header\");\n const _component_table_body = resolveComponent(\"table-body\");\n const _component_table_footer = resolveComponent(\"table-footer\");\n const _directive_mousewheel = resolveDirective(\"mousewheel\");\n return openBlock(), createBlock(\"div\", {\n class: [\n {\n \"el-table--fit\": _ctx.fit,\n \"el-table--striped\": _ctx.stripe,\n \"el-table--border\": _ctx.border || _ctx.isGroup,\n \"el-table--hidden\": _ctx.isHidden,\n \"el-table--group\": _ctx.isGroup,\n \"el-table--fluid-height\": _ctx.maxHeight,\n \"el-table--scrollable-x\": _ctx.layout.scrollX.value,\n \"el-table--scrollable-y\": _ctx.layout.scrollY.value,\n \"el-table--enable-row-hover\": !_ctx.store.states.isComplex.value,\n \"el-table--enable-row-transition\": (_ctx.store.states.data.value || []).length !== 0 && (_ctx.store.states.data.value || []).length < 100\n },\n _ctx.tableSize ? `el-table--${_ctx.tableSize}` : \"\",\n _ctx.className,\n \"el-table\"\n ],\n style: _ctx.style,\n onMouseleave: _cache[1] || (_cache[1] = ($event) => _ctx.handleMouseLeave())\n }, [\n createVNode(\"div\", _hoisted_1$1, [\n renderSlot(_ctx.$slots, \"default\")\n ], 512),\n _ctx.showHeader ? withDirectives((openBlock(), createBlock(\"div\", _hoisted_2$1, [\n createVNode(_component_table_header, {\n ref: \"tableHeader\",\n border: _ctx.border,\n \"default-sort\": _ctx.defaultSort,\n store: _ctx.store,\n style: {\n width: _ctx.layout.bodyWidth.value ? _ctx.layout.bodyWidth.value + \"px\" : \"\"\n },\n onSetDragVisible: _ctx.setDragVisible\n }, null, 8, [\"border\", \"default-sort\", \"store\", \"style\", \"onSetDragVisible\"])\n ], 512)), [\n [_directive_mousewheel, _ctx.handleHeaderFooterMousewheel]\n ]) : createCommentVNode(\"v-if\", true),\n createVNode(\"div\", {\n ref: \"bodyWrapper\",\n style: [_ctx.bodyHeight],\n class: \"el-table__body-wrapper\"\n }, [\n createVNode(_component_table_body, {\n context: _ctx.context,\n highlight: _ctx.highlightCurrentRow,\n \"row-class-name\": _ctx.rowClassName,\n \"tooltip-effect\": _ctx.tooltipEffect,\n \"row-style\": _ctx.rowStyle,\n store: _ctx.store,\n stripe: _ctx.stripe,\n style: {\n width: _ctx.bodyWidth\n }\n }, null, 8, [\"context\", \"highlight\", \"row-class-name\", \"tooltip-effect\", \"row-style\", \"store\", \"stripe\", \"style\"]),\n _ctx.isEmpty ? (openBlock(), createBlock(\"div\", {\n key: 0,\n ref: \"emptyBlock\",\n style: _ctx.emptyBlockStyle,\n class: \"el-table__empty-block\"\n }, [\n createVNode(\"span\", _hoisted_3$1, [\n renderSlot(_ctx.$slots, \"empty\", {}, () => [\n createTextVNode(toDisplayString(_ctx.emptyText || _ctx.t(\"el.table.emptyText\")), 1)\n ])\n ])\n ], 4)) : createCommentVNode(\"v-if\", true),\n _ctx.$slots.append ? (openBlock(), createBlock(\"div\", _hoisted_4$1, [\n renderSlot(_ctx.$slots, \"append\")\n ], 512)) : createCommentVNode(\"v-if\", true)\n ], 4),\n _ctx.showSummary ? withDirectives((openBlock(), createBlock(\"div\", _hoisted_5, [\n createVNode(_component_table_footer, {\n border: _ctx.border,\n \"default-sort\": _ctx.defaultSort,\n store: _ctx.store,\n style: {\n width: _ctx.layout.bodyWidth.value ? _ctx.layout.bodyWidth.value + \"px\" : \"\"\n },\n \"sum-text\": _ctx.sumText || _ctx.t(\"el.table.sumText\"),\n \"summary-method\": _ctx.summaryMethod\n }, null, 8, [\"border\", \"default-sort\", \"store\", \"style\", \"sum-text\", \"summary-method\"])\n ], 512)), [\n [vShow, !_ctx.isEmpty],\n [_directive_mousewheel, _ctx.handleHeaderFooterMousewheel]\n ]) : createCommentVNode(\"v-if\", true),\n _ctx.store.states.fixedColumns.value.length > 0 ? withDirectives((openBlock(), createBlock(\"div\", {\n key: 2,\n ref: \"fixedWrapper\",\n style: [\n {\n width: _ctx.layout.fixedWidth.value ? _ctx.layout.fixedWidth.value + \"px\" : \"\"\n },\n _ctx.fixedHeight\n ],\n class: \"el-table__fixed\"\n }, [\n _ctx.showHeader ? (openBlock(), createBlock(\"div\", _hoisted_6, [\n createVNode(_component_table_header, {\n ref: \"fixedTableHeader\",\n border: _ctx.border,\n store: _ctx.store,\n style: {\n width: _ctx.bodyWidth\n },\n fixed: \"left\",\n onSetDragVisible: _ctx.setDragVisible\n }, null, 8, [\"border\", \"store\", \"style\", \"onSetDragVisible\"])\n ], 512)) : createCommentVNode(\"v-if\", true),\n createVNode(\"div\", {\n ref: \"fixedBodyWrapper\",\n style: [\n {\n top: _ctx.layout.headerHeight.value + \"px\"\n },\n _ctx.fixedBodyHeight\n ],\n class: \"el-table__fixed-body-wrapper\"\n }, [\n createVNode(_component_table_body, {\n highlight: _ctx.highlightCurrentRow,\n \"row-class-name\": _ctx.rowClassName,\n \"tooltip-effect\": _ctx.tooltipEffect,\n \"row-style\": _ctx.rowStyle,\n store: _ctx.store,\n stripe: _ctx.stripe,\n style: {\n width: _ctx.bodyWidth\n },\n fixed: \"left\"\n }, null, 8, [\"highlight\", \"row-class-name\", \"tooltip-effect\", \"row-style\", \"store\", \"stripe\", \"style\"]),\n _ctx.$slots.append ? (openBlock(), createBlock(\"div\", {\n key: 0,\n style: { height: _ctx.layout.appendHeight.value + \"px\" },\n class: \"el-table__append-gutter\"\n }, null, 4)) : createCommentVNode(\"v-if\", true)\n ], 4),\n _ctx.showSummary ? withDirectives((openBlock(), createBlock(\"div\", _hoisted_7, [\n createVNode(_component_table_footer, {\n border: _ctx.border,\n store: _ctx.store,\n style: {\n width: _ctx.bodyWidth\n },\n \"sum-text\": _ctx.sumText || _ctx.t(\"el.table.sumText\"),\n \"summary-method\": _ctx.summaryMethod,\n fixed: \"left\"\n }, null, 8, [\"border\", \"store\", \"style\", \"sum-text\", \"summary-method\"])\n ], 512)), [\n [vShow, !_ctx.isEmpty]\n ]) : createCommentVNode(\"v-if\", true)\n ], 4)), [\n [_directive_mousewheel, _ctx.handleFixedMousewheel]\n ]) : createCommentVNode(\"v-if\", true),\n _ctx.store.states.rightFixedColumns.value.length > 0 ? withDirectives((openBlock(), createBlock(\"div\", {\n key: 3,\n ref: \"rightFixedWrapper\",\n style: [\n {\n width: _ctx.layout.rightFixedWidth.value ? _ctx.layout.rightFixedWidth.value + \"px\" : \"\",\n right: _ctx.layout.scrollY.value ? (_ctx.border ? _ctx.layout.gutterWidth : _ctx.layout.gutterWidth || 0) + \"px\" : \"\"\n },\n _ctx.fixedHeight\n ],\n class: \"el-table__fixed-right\"\n }, [\n _ctx.showHeader ? (openBlock(), createBlock(\"div\", _hoisted_8, [\n createVNode(_component_table_header, {\n ref: \"rightFixedTableHeader\",\n border: _ctx.border,\n store: _ctx.store,\n style: {\n width: _ctx.bodyWidth\n },\n fixed: \"right\",\n onSetDragVisible: _ctx.setDragVisible\n }, null, 8, [\"border\", \"store\", \"style\", \"onSetDragVisible\"])\n ], 512)) : createCommentVNode(\"v-if\", true),\n createVNode(\"div\", {\n ref: \"rightFixedBodyWrapper\",\n style: [{ top: _ctx.layout.headerHeight.value + \"px\" }, _ctx.fixedBodyHeight],\n class: \"el-table__fixed-body-wrapper\"\n }, [\n createVNode(_component_table_body, {\n highlight: _ctx.highlightCurrentRow,\n \"row-class-name\": _ctx.rowClassName,\n \"tooltip-effect\": _ctx.tooltipEffect,\n \"row-style\": _ctx.rowStyle,\n store: _ctx.store,\n stripe: _ctx.stripe,\n style: {\n width: _ctx.bodyWidth\n },\n fixed: \"right\"\n }, null, 8, [\"highlight\", \"row-class-name\", \"tooltip-effect\", \"row-style\", \"store\", \"stripe\", \"style\"]),\n _ctx.$slots.append ? (openBlock(), createBlock(\"div\", {\n key: 0,\n style: { height: _ctx.layout.appendHeight.value + \"px\" },\n class: \"el-table__append-gutter\"\n }, null, 4)) : createCommentVNode(\"v-if\", true)\n ], 4),\n _ctx.showSummary ? withDirectives((openBlock(), createBlock(\"div\", _hoisted_9, [\n createVNode(_component_table_footer, {\n border: _ctx.border,\n store: _ctx.store,\n style: {\n width: _ctx.bodyWidth\n },\n \"sum-text\": _ctx.sumText || _ctx.t(\"el.table.sumText\"),\n \"summary-method\": _ctx.summaryMethod,\n fixed: \"right\"\n }, null, 8, [\"border\", \"store\", \"style\", \"sum-text\", \"summary-method\"])\n ], 512)), [\n [vShow, !_ctx.isEmpty]\n ]) : createCommentVNode(\"v-if\", true)\n ], 4)), [\n [_directive_mousewheel, _ctx.handleFixedMousewheel]\n ]) : createCommentVNode(\"v-if\", true),\n _ctx.store.states.rightFixedColumns.value.length > 0 ? (openBlock(), createBlock(\"div\", {\n key: 4,\n ref: \"rightFixedPatch\",\n style: {\n width: _ctx.layout.scrollY.value ? _ctx.layout.gutterWidth + \"px\" : \"0\",\n height: _ctx.layout.headerHeight.value + \"px\"\n },\n class: \"el-table__fixed-right-patch\"\n }, null, 4)) : createCommentVNode(\"v-if\", true),\n withDirectives(createVNode(\"div\", _hoisted_10, null, 512), [\n [vShow, _ctx.resizeProxyVisible]\n ])\n ], 38);\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"packages/table/src/table.vue\";\n\nscript$1.install = (app) => {\n app.component(script$1.name, script$1);\n};\nconst _Table = script$1;\n\nexport default _Table;\n","import { h, getCurrentInstance, watch, ref, watchEffect, computed, defineComponent, onBeforeMount, onMounted, onBeforeUnmount, Fragment } from 'vue';\nimport { getPropByPath } from '../utils/util';\nimport ElCheckbox from '../el-checkbox';\nimport '../utils/dom';\nimport '@popperjs/core';\nimport '../utils/popup-manager';\n\nconst cellStarts = {\n default: {\n order: \"\"\n },\n selection: {\n width: 48,\n minWidth: 48,\n realWidth: 48,\n order: \"\",\n className: \"el-table-column--selection\"\n },\n expand: {\n width: 48,\n minWidth: 48,\n realWidth: 48,\n order: \"\"\n },\n index: {\n width: 48,\n minWidth: 48,\n realWidth: 48,\n order: \"\"\n }\n};\nconst cellForced = {\n selection: {\n renderHeader: function({ store }) {\n function isDisabled() {\n return store.states.data.value && store.states.data.value.length === 0;\n }\n return h(ElCheckbox, {\n disabled: isDisabled(),\n indeterminate: store.states.selection.value.length > 0 && !store.states.isAllSelected.value,\n \"onUpdate:modelValue\": store.toggleAllSelection,\n modelValue: store.states.isAllSelected.value\n });\n },\n renderCell: function({\n row,\n column,\n store,\n $index\n }) {\n return h(ElCheckbox, {\n disabled: column.selectable ? !column.selectable.call(null, row, $index) : false,\n onChange: () => {\n store.commit(\"rowSelectedChanged\", row);\n },\n onClick: (event) => event.stopPropagation(),\n modelValue: store.isSelected(row)\n });\n },\n sortable: false,\n resizable: false\n },\n index: {\n renderHeader: function({ column }) {\n return column.label || \"#\";\n },\n renderCell: function({\n column,\n $index\n }) {\n let i = $index + 1;\n const index = column.index;\n if (typeof index === \"number\") {\n i = $index + index;\n } else if (typeof index === \"function\") {\n i = index($index);\n }\n return h(\"div\", {}, [i]);\n },\n sortable: false\n },\n expand: {\n renderHeader: function({ column }) {\n return column.label || \"\";\n },\n renderCell: function({ row, store }) {\n const classes = [\"el-table__expand-icon\"];\n if (store.states.expandRows.value.indexOf(row) > -1) {\n classes.push(\"el-table__expand-icon--expanded\");\n }\n const callback = function(e) {\n e.stopPropagation();\n store.toggleRowExpansion(row);\n };\n return h(\"div\", {\n class: classes,\n onClick: callback\n }, [\n h(\"i\", {\n class: \"el-icon el-icon-arrow-right\"\n })\n ]);\n },\n sortable: false,\n resizable: false,\n className: \"el-table__expand-column\"\n }\n};\nfunction defaultRenderCell({\n row,\n column,\n $index\n}) {\n var _a;\n const property = column.property;\n const value = property && getPropByPath(row, property, false).v;\n if (column && column.formatter) {\n return column.formatter(row, column, value, $index);\n }\n return ((_a = value == null ? void 0 : value.toString) == null ? void 0 : _a.call(value)) || \"\";\n}\nfunction treeCellPrefix({\n row,\n treeNode,\n store\n}) {\n if (!treeNode)\n return null;\n const ele = [];\n const callback = function(e) {\n e.stopPropagation();\n store.loadOrToggle(row);\n };\n if (treeNode.indent) {\n ele.push(h(\"span\", {\n class: \"el-table__indent\",\n style: { \"padding-left\": treeNode.indent + \"px\" }\n }));\n }\n if (typeof treeNode.expanded === \"boolean\" && !treeNode.noLazyChildren) {\n const expandClasses = [\n \"el-table__expand-icon\",\n treeNode.expanded ? \"el-table__expand-icon--expanded\" : \"\"\n ];\n let iconClasses = [\"el-icon-arrow-right\"];\n if (treeNode.loading) {\n iconClasses = [\"el-icon-loading\"];\n }\n ele.push(h(\"div\", {\n class: expandClasses,\n onClick: callback\n }, [\n h(\"i\", {\n class: iconClasses\n })\n ]));\n } else {\n ele.push(h(\"span\", {\n class: \"el-table__placeholder\"\n }));\n }\n return ele;\n}\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\r\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\n\nfunction mergeOptions(defaults, config) {\n const options = {};\n let key;\n for (key in defaults) {\n options[key] = defaults[key];\n }\n for (key in config) {\n if (hasOwn(config, key)) {\n const value = config[key];\n if (typeof value !== \"undefined\") {\n options[key] = value;\n }\n }\n }\n return options;\n}\nfunction parseWidth(width) {\n if (width !== void 0) {\n width = parseInt(width, 10);\n if (isNaN(width)) {\n width = null;\n }\n }\n return +width;\n}\nfunction parseMinWidth(minWidth) {\n if (typeof minWidth !== \"undefined\") {\n minWidth = parseWidth(minWidth);\n if (isNaN(minWidth)) {\n minWidth = 80;\n }\n }\n return minWidth;\n}\nfunction compose(...funcs) {\n if (funcs.length === 0) {\n return (arg) => arg;\n }\n if (funcs.length === 1) {\n return funcs[0];\n }\n return funcs.reduce((a, b) => (...args) => a(b(...args)));\n}\n\nfunction useWatcher(owner, props_) {\n const instance = getCurrentInstance();\n const registerComplexWatchers = () => {\n const props = [\"fixed\"];\n const aliases = {\n realWidth: \"width\",\n realMinWidth: \"minWidth\"\n };\n const allAliases = props.reduce((prev, cur) => {\n prev[cur] = cur;\n return prev;\n }, aliases);\n Object.keys(allAliases).forEach((key) => {\n const columnKey = aliases[key];\n if (hasOwn(props_, columnKey)) {\n watch(() => props_[columnKey], (newVal) => {\n let value = newVal;\n if (columnKey === \"width\" && key === \"realWidth\") {\n value = parseWidth(newVal);\n }\n if (columnKey === \"minWidth\" && key === \"realMinWidth\") {\n value = parseMinWidth(newVal);\n }\n instance.columnConfig.value[columnKey] = value;\n instance.columnConfig.value[key] = value;\n const updateColumns = columnKey === \"fixed\";\n owner.value.store.scheduleLayout(updateColumns);\n });\n }\n });\n };\n const registerNormalWatchers = () => {\n const props = [\n \"label\",\n \"filters\",\n \"filterMultiple\",\n \"sortable\",\n \"index\",\n \"formatter\",\n \"className\",\n \"labelClassName\",\n \"showOverflowTooltip\"\n ];\n const aliases = {\n property: \"prop\",\n align: \"realAlign\",\n headerAlign: \"realHeaderAlign\"\n };\n const allAliases = props.reduce((prev, cur) => {\n prev[cur] = cur;\n return prev;\n }, aliases);\n Object.keys(allAliases).forEach((key) => {\n const columnKey = aliases[key];\n if (hasOwn(props_, columnKey)) {\n watch(() => props_[columnKey], (newVal) => {\n instance.columnConfig.value[key] = newVal;\n });\n }\n });\n };\n return {\n registerComplexWatchers,\n registerNormalWatchers\n };\n}\n\nfunction useRender(props, slots, owner) {\n const instance = getCurrentInstance();\n const columnId = ref(\"\");\n const isSubColumn = ref(false);\n const realAlign = ref();\n const realHeaderAlign = ref();\n watchEffect(() => {\n realAlign.value = !!props.align ? \"is-\" + props.align : null;\n realAlign.value;\n });\n watchEffect(() => {\n realHeaderAlign.value = !!props.headerAlign ? \"is-\" + props.headerAlign : realAlign.value;\n realHeaderAlign.value;\n });\n const columnOrTableParent = computed(() => {\n let parent = instance.vnode.vParent || instance.parent;\n while (parent && !parent.tableId && !parent.columnId) {\n parent = parent.vnode.vParent || parent.parent;\n }\n return parent;\n });\n const realWidth = ref(parseWidth(props.width));\n const realMinWidth = ref(parseMinWidth(props.minWidth));\n const setColumnWidth = (column) => {\n if (realWidth.value)\n column.width = realWidth.value;\n if (realMinWidth.value) {\n column.minWidth = realMinWidth.value;\n }\n if (!column.minWidth) {\n column.minWidth = 80;\n }\n column.realWidth = Number(column.width === void 0 ? column.minWidth : column.width);\n return column;\n };\n const setColumnForcedProps = (column) => {\n const type = column.type;\n const source = cellForced[type] || {};\n Object.keys(source).forEach((prop) => {\n const value = source[prop];\n if (value !== void 0) {\n column[prop] = prop === \"className\" ? `${column[prop]} ${value}` : value;\n }\n });\n return column;\n };\n const checkSubColumn = (children) => {\n if (children instanceof Array) {\n children.forEach((child) => check(child));\n } else {\n check(children);\n }\n function check(item) {\n var _a;\n if (((_a = item == null ? void 0 : item.type) == null ? void 0 : _a.name) === \"ElTableColumn\") {\n item.vParent = instance;\n }\n }\n };\n const setColumnRenders = (column) => {\n if (props.renderHeader) {\n console.warn(\"[Element Warn][TableColumn]Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header.\");\n } else if (column.type !== \"selection\") {\n column.renderHeader = (scope) => {\n instance.columnConfig.value[\"label\"];\n const renderHeader = slots.header;\n return renderHeader ? renderHeader(scope) : column.label;\n };\n }\n let originRenderCell = column.renderCell;\n if (column.type === \"expand\") {\n column.renderCell = (data) => h(\"div\", {\n class: \"cell\"\n }, [originRenderCell(data)]);\n owner.value.renderExpanded = (data) => {\n return slots.default ? slots.default(data) : slots.default;\n };\n } else {\n originRenderCell = originRenderCell || defaultRenderCell;\n column.renderCell = (data) => {\n let children = null;\n if (slots.default) {\n children = slots.default(data);\n } else {\n children = originRenderCell(data);\n }\n const prefix = treeCellPrefix(data);\n const props2 = {\n class: \"cell\",\n style: {}\n };\n if (column.showOverflowTooltip) {\n props2.class += \" el-tooltip\";\n props2.style = {\n width: (data.column.realWidth || Number(data.column.width)) - 1 + \"px\"\n };\n }\n checkSubColumn(children);\n return h(\"div\", props2, [prefix, children]);\n };\n }\n return column;\n };\n const getPropsData = (...propsKey) => {\n return propsKey.reduce((prev, cur) => {\n if (Array.isArray(cur)) {\n cur.forEach((key) => {\n prev[key] = props[key];\n });\n }\n return prev;\n }, {});\n };\n const getColumnElIndex = (children, child) => {\n return [].indexOf.call(children, child);\n };\n return {\n columnId,\n realAlign,\n isSubColumn,\n realHeaderAlign,\n columnOrTableParent,\n setColumnWidth,\n setColumnForcedProps,\n setColumnRenders,\n getPropsData,\n getColumnElIndex\n };\n}\n\nvar defaultProps = {\n type: {\n type: String,\n default: \"default\"\n },\n label: String,\n className: String,\n labelClassName: String,\n property: String,\n prop: String,\n width: {\n type: [String, Number],\n default: \"\"\n },\n minWidth: {\n type: [String, Number],\n default: \"\"\n },\n renderHeader: Function,\n sortable: {\n type: [Boolean, String],\n default: false\n },\n sortMethod: Function,\n sortBy: [String, Function, Array],\n resizable: {\n type: Boolean,\n default: true\n },\n columnKey: String,\n align: String,\n headerAlign: String,\n showTooltipWhenOverflow: Boolean,\n showOverflowTooltip: Boolean,\n fixed: [Boolean, String],\n formatter: Function,\n selectable: Function,\n reserveSelection: Boolean,\n filterMethod: Function,\n filteredValue: Array,\n filters: Array,\n filterPlacement: String,\n filterMultiple: {\n type: Boolean,\n default: true\n },\n index: [Number, Function],\n sortOrders: {\n type: Array,\n default: () => {\n return [\"ascending\", \"descending\", null];\n },\n validator: (val) => {\n return val.every((order) => [\"ascending\", \"descending\", null].indexOf(order) > -1);\n }\n }\n};\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nlet columnIdSeed = 1;\nvar ElTableColumn = defineComponent({\n name: \"ElTableColumn\",\n components: {\n ElCheckbox\n },\n props: defaultProps,\n setup(props, { slots }) {\n const instance = getCurrentInstance();\n const columnConfig = ref({});\n const owner = computed(() => {\n let parent2 = instance.parent;\n while (parent2 && !parent2.tableId) {\n parent2 = parent2.parent;\n }\n return parent2;\n });\n const { registerNormalWatchers, registerComplexWatchers } = useWatcher(owner, props);\n const {\n columnId,\n isSubColumn,\n realHeaderAlign,\n columnOrTableParent,\n setColumnWidth,\n setColumnForcedProps,\n setColumnRenders,\n getPropsData,\n getColumnElIndex,\n realAlign\n } = useRender(props, slots, owner);\n const parent = columnOrTableParent.value;\n columnId.value = (parent.tableId || parent.columnId) + \"_column_\" + columnIdSeed++;\n onBeforeMount(() => {\n isSubColumn.value = owner.value !== parent;\n const type = props.type || \"default\";\n const sortable = props.sortable === \"\" ? true : props.sortable;\n const defaults = __spreadProps(__spreadValues({}, cellStarts[type]), {\n id: columnId.value,\n type,\n property: props.prop || props.property,\n align: realAlign,\n headerAlign: realHeaderAlign,\n showOverflowTooltip: props.showOverflowTooltip || props.showTooltipWhenOverflow,\n filterable: props.filters || props.filterMethod,\n filteredValue: [],\n filterPlacement: \"\",\n isColumnGroup: false,\n filterOpened: false,\n sortable,\n index: props.index,\n rawColumnKey: instance.vnode.key\n });\n const basicProps = [\n \"columnKey\",\n \"label\",\n \"className\",\n \"labelClassName\",\n \"type\",\n \"renderHeader\",\n \"formatter\",\n \"fixed\",\n \"resizable\"\n ];\n const sortProps = [\"sortMethod\", \"sortBy\", \"sortOrders\"];\n const selectProps = [\"selectable\", \"reserveSelection\"];\n const filterProps = [\n \"filterMethod\",\n \"filters\",\n \"filterMultiple\",\n \"filterOpened\",\n \"filteredValue\",\n \"filterPlacement\"\n ];\n let column = getPropsData(basicProps, sortProps, selectProps, filterProps);\n column = mergeOptions(defaults, column);\n const chains = compose(setColumnRenders, setColumnWidth, setColumnForcedProps);\n column = chains(column);\n columnConfig.value = column;\n registerNormalWatchers();\n registerComplexWatchers();\n });\n onMounted(() => {\n var _a;\n const parent2 = columnOrTableParent.value;\n const children = isSubColumn.value ? parent2.vnode.el.children : (_a = parent2.refs.hiddenColumns) == null ? void 0 : _a.children;\n const getColumnIndex = () => getColumnElIndex(children || [], instance.vnode.el);\n columnConfig.value.getColumnIndex = getColumnIndex;\n const columnIndex = getColumnIndex();\n columnIndex > -1 && owner.value.store.commit(\"insertColumn\", columnConfig.value, isSubColumn.value ? parent2.columnConfig.value : null);\n });\n onBeforeUnmount(() => {\n owner.value.store.commit(\"removeColumn\", columnConfig.value, isSubColumn.value ? parent.columnConfig.value : null);\n });\n instance.columnId = columnId.value;\n instance.columnConfig = columnConfig;\n return;\n },\n render() {\n var _a, _b, _c;\n let children = [];\n try {\n const renderDefault = (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a, {\n row: {},\n column: {},\n $index: -1\n });\n if (renderDefault instanceof Array) {\n for (const childNode of renderDefault) {\n if (((_c = childNode.type) == null ? void 0 : _c.name) === \"ElTableColumn\") {\n children.push(childNode);\n } else if (childNode.type === Fragment && childNode.children instanceof Array) {\n children.push(...childNode.children);\n }\n }\n }\n } catch (e) {\n children = [];\n }\n return h(\"div\", children);\n }\n});\n\nconst _TableColumn = ElTableColumn;\n_TableColumn.install = (app) => {\n app.component(_TableColumn.name, _TableColumn);\n};\n\nexport default _TableColumn;\n","import { defineComponent, inject, getCurrentInstance, ref, watch, nextTick, openBlock, createBlock, computed, onUpdated, onMounted, onBeforeUnmount, h, provide, Fragment } from 'vue';\nimport { EVENT_CODE } from '../utils/aria';\nimport { addResizeListener, removeResizeListener } from '../utils/resize-event';\nimport { on, off } from '../utils/dom';\nimport throwError from '../utils/error';\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst NOOP = () => { };\r\nconst isFunction = (val) => typeof val === 'function';\r\nconst isObject = (val) => val !== null && typeof val === 'object';\r\nconst isPromise = (val) => {\r\n return isObject(val) && isFunction(val.then) && isFunction(val.catch);\r\n};\r\nconst cacheStringFunction = (fn) => {\r\n const cache = Object.create(null);\r\n return ((str) => {\r\n const hit = cache[str];\r\n return hit || (cache[str] = fn(str));\r\n });\r\n};\r\n/**\r\n * @private\r\n */\r\nconst capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1));\n\nvar script = defineComponent({\n name: \"ElTabBar\",\n props: {\n tabs: {\n type: Array,\n default: () => []\n }\n },\n setup(props) {\n const rootTabs = inject(\"rootTabs\");\n if (!rootTabs) {\n throw new Error(`ElTabBar must use with ElTabs`);\n }\n const instance = getCurrentInstance();\n const getBarStyle = () => {\n let style = {};\n let offset = 0;\n let tabSize = 0;\n const sizeName = [\"top\", \"bottom\"].includes(rootTabs.props.tabPosition) ? \"width\" : \"height\";\n const sizeDir = sizeName === \"width\" ? \"x\" : \"y\";\n props.tabs.every((tab) => {\n var _a;\n let $el = (_a = instance.parent.refs) == null ? void 0 : _a[`tab-${tab.paneName}`];\n if (!$el) {\n return false;\n }\n if (!tab.active) {\n offset += $el[`client${capitalize(sizeName)}`];\n return true;\n } else {\n tabSize = $el[`client${capitalize(sizeName)}`];\n const tabStyles = window.getComputedStyle($el);\n if (sizeName === \"width\") {\n if (props.tabs.length > 1) {\n tabSize -= parseFloat(tabStyles.paddingLeft) + parseFloat(tabStyles.paddingRight);\n }\n offset += parseFloat(tabStyles.paddingLeft);\n }\n return false;\n }\n });\n const transform = `translate${capitalize(sizeDir)}(${offset}px)`;\n style[sizeName] = `${tabSize}px`;\n style.transform = transform;\n style.msTransform = transform;\n style.webkitTransform = transform;\n return style;\n };\n const barStyle = ref(getBarStyle());\n watch(() => props.tabs, () => {\n nextTick(() => {\n barStyle.value = getBarStyle();\n });\n });\n return {\n rootTabs,\n barStyle\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", {\n class: [\"el-tabs__active-bar\", `is-${_ctx.rootTabs.props.tabPosition}`],\n style: _ctx.barStyle\n }, null, 6);\n}\n\nscript.render = render;\nscript.__file = \"packages/tabs/src/tab-bar.vue\";\n\nvar script$1 = defineComponent({\n name: \"ElTabNav\",\n components: {\n TabBar: script\n },\n props: {\n panes: {\n type: Array,\n default: () => []\n },\n currentName: {\n type: String,\n default: \"\"\n },\n editable: Boolean,\n onTabClick: {\n type: Function,\n default: NOOP\n },\n onTabRemove: {\n type: Function,\n default: NOOP\n },\n type: {\n type: String,\n default: \"\"\n },\n stretch: Boolean\n },\n setup() {\n const rootTabs = inject(\"rootTabs\");\n if (!rootTabs) {\n throwError(\"[ElTabNav]\", `ElTabNav must be nested inside ElTabs`);\n }\n const scrollable = ref(false);\n const navOffset = ref(0);\n const isFocus = ref(false);\n const focusable = ref(true);\n const navScroll$ = ref(null);\n const nav$ = ref(null);\n const el$ = ref(null);\n const sizeName = computed(() => {\n return [\"top\", \"bottom\"].includes(rootTabs.props.tabPosition) ? \"width\" : \"height\";\n });\n const navStyle = computed(() => {\n const dir = sizeName.value === \"width\" ? \"X\" : \"Y\";\n return {\n transform: `translate${dir}(-${navOffset.value}px)`\n };\n });\n const scrollPrev = () => {\n const containerSize = navScroll$.value[`offset${capitalize(sizeName.value)}`];\n const currentOffset = navOffset.value;\n if (!currentOffset)\n return;\n let newOffset = currentOffset > containerSize ? currentOffset - containerSize : 0;\n navOffset.value = newOffset;\n };\n const scrollNext = () => {\n const navSize = nav$.value[`offset${capitalize(sizeName.value)}`];\n const containerSize = navScroll$.value[`offset${capitalize(sizeName.value)}`];\n const currentOffset = navOffset.value;\n if (navSize - currentOffset <= containerSize)\n return;\n let newOffset = navSize - currentOffset > containerSize * 2 ? currentOffset + containerSize : navSize - containerSize;\n navOffset.value = newOffset;\n };\n const scrollToActiveTab = () => {\n if (!scrollable.value)\n return;\n const nav = nav$.value;\n const activeTab = el$.value.querySelector(\".is-active\");\n if (!activeTab)\n return;\n const navScroll = navScroll$.value;\n const isHorizontal = [\"top\", \"bottom\"].includes(rootTabs.props.tabPosition);\n const activeTabBounding = activeTab.getBoundingClientRect();\n const navScrollBounding = navScroll.getBoundingClientRect();\n const maxOffset = isHorizontal ? nav.offsetWidth - navScrollBounding.width : nav.offsetHeight - navScrollBounding.height;\n const currentOffset = navOffset.value;\n let newOffset = currentOffset;\n if (isHorizontal) {\n if (activeTabBounding.left < navScrollBounding.left) {\n newOffset = currentOffset - (navScrollBounding.left - activeTabBounding.left);\n }\n if (activeTabBounding.right > navScrollBounding.right) {\n newOffset = currentOffset + activeTabBounding.right - navScrollBounding.right;\n }\n } else {\n if (activeTabBounding.top < navScrollBounding.top) {\n newOffset = currentOffset - (navScrollBounding.top - activeTabBounding.top);\n }\n if (activeTabBounding.bottom > navScrollBounding.bottom) {\n newOffset = currentOffset + (activeTabBounding.bottom - navScrollBounding.bottom);\n }\n }\n newOffset = Math.max(newOffset, 0);\n navOffset.value = Math.min(newOffset, maxOffset);\n };\n const update = () => {\n if (!nav$.value)\n return;\n const navSize = nav$.value[`offset${capitalize(sizeName.value)}`];\n const containerSize = navScroll$.value[`offset${capitalize(sizeName.value)}`];\n const currentOffset = navOffset.value;\n if (containerSize < navSize) {\n const currentOffset2 = navOffset.value;\n scrollable.value = scrollable.value || {};\n scrollable.value.prev = currentOffset2;\n scrollable.value.next = currentOffset2 + containerSize < navSize;\n if (navSize - currentOffset2 < containerSize) {\n navOffset.value = navSize - containerSize;\n }\n } else {\n scrollable.value = false;\n if (currentOffset > 0) {\n navOffset.value = 0;\n }\n }\n };\n const changeTab = (e) => {\n const code = e.code;\n let nextIndex;\n let currentIndex, tabList;\n const { up, down, left, right } = EVENT_CODE;\n if ([up, down, left, right].indexOf(code) !== -1) {\n tabList = e.currentTarget.querySelectorAll(\"[role=tab]\");\n currentIndex = Array.prototype.indexOf.call(tabList, e.target);\n } else {\n return;\n }\n if (code === left || code === up) {\n if (currentIndex === 0) {\n nextIndex = tabList.length - 1;\n } else {\n nextIndex = currentIndex - 1;\n }\n } else {\n if (currentIndex < tabList.length - 1) {\n nextIndex = currentIndex + 1;\n } else {\n nextIndex = 0;\n }\n }\n tabList[nextIndex].focus();\n tabList[nextIndex].click();\n setFocus();\n };\n const setFocus = () => {\n if (focusable.value) {\n isFocus.value = true;\n }\n };\n const removeFocus = () => {\n isFocus.value = false;\n };\n const visibilityChangeHandler = () => {\n const visibility = document.visibilityState;\n if (visibility === \"hidden\") {\n focusable.value = false;\n } else if (visibility === \"visible\") {\n setTimeout(() => {\n focusable.value = true;\n }, 50);\n }\n };\n const windowBlurHandler = () => {\n focusable.value = false;\n };\n const windowFocusHandler = () => {\n setTimeout(() => {\n focusable.value = true;\n }, 50);\n };\n onUpdated(() => {\n update();\n });\n onMounted(() => {\n addResizeListener(el$.value, update);\n on(document, \"visibilitychange\", visibilityChangeHandler);\n on(window, \"blur\", windowBlurHandler);\n on(window, \"focus\", windowFocusHandler);\n setTimeout(() => {\n scrollToActiveTab();\n }, 0);\n });\n onBeforeUnmount(() => {\n if (el$.value) {\n removeResizeListener(el$.value, update);\n }\n off(document, \"visibilitychange\", visibilityChangeHandler);\n off(window, \"blur\", windowBlurHandler);\n off(window, \"focus\", windowFocusHandler);\n });\n return {\n rootTabs,\n scrollable,\n navOffset,\n isFocus,\n focusable,\n navScroll$,\n nav$,\n el$,\n sizeName,\n navStyle,\n scrollPrev,\n scrollNext,\n scrollToActiveTab,\n update,\n changeTab,\n setFocus,\n removeFocus,\n visibilityChangeHandler,\n windowBlurHandler,\n windowFocusHandler\n };\n },\n render() {\n const {\n type,\n panes,\n editable,\n stretch,\n onTabClick,\n onTabRemove,\n navStyle,\n scrollable,\n scrollNext,\n scrollPrev,\n changeTab,\n setFocus,\n removeFocus,\n rootTabs,\n isFocus\n } = this;\n const scrollBtn = scrollable ? [\n h(\"span\", {\n class: [\"el-tabs__nav-prev\", scrollable.prev ? \"\" : \"is-disabled\"],\n onClick: scrollPrev\n }, [h(\"i\", { class: \"el-icon-arrow-left\" })]),\n h(\"span\", {\n class: [\"el-tabs__nav-next\", scrollable.next ? \"\" : \"is-disabled\"],\n onClick: scrollNext\n }, [h(\"i\", { class: \"el-icon-arrow-right\" })])\n ] : null;\n const tabs = panes.map((pane, index) => {\n var _a, _b;\n let tabName = pane.props.name || pane.index || `${index}`;\n const closable = pane.isClosable || editable;\n pane.index = `${index}`;\n const btnClose = closable ? h(\"span\", {\n class: \"el-icon-close\",\n onClick: (ev) => {\n onTabRemove(pane, ev);\n }\n }) : null;\n const tabLabelContent = ((_b = (_a = pane.instance.slots).label) == null ? void 0 : _b.call(_a)) || pane.props.label;\n const tabindex = pane.active ? 0 : -1;\n return h(\"div\", {\n class: {\n \"el-tabs__item\": true,\n [`is-${rootTabs.props.tabPosition}`]: true,\n \"is-active\": pane.active,\n \"is-disabled\": pane.props.disabled,\n \"is-closable\": closable,\n \"is-focus\": isFocus\n },\n id: `tab-${tabName}`,\n key: `tab-${tabName}`,\n \"aria-controls\": `pane-${tabName}`,\n role: \"tab\",\n \"aria-selected\": pane.active,\n ref: `tab-${tabName}`,\n tabindex,\n onFocus: () => {\n setFocus();\n },\n onBlur: () => {\n removeFocus();\n },\n onClick: (ev) => {\n removeFocus();\n onTabClick(pane, tabName, ev);\n },\n onKeydown: (ev) => {\n if (closable && (ev.code === EVENT_CODE.delete || ev.code === EVENT_CODE.backspace)) {\n onTabRemove(pane, ev);\n }\n }\n }, [tabLabelContent, btnClose]);\n });\n return h(\"div\", {\n ref: \"el$\",\n class: [\"el-tabs__nav-wrap\", scrollable ? \"is-scrollable\" : \"\", `is-${rootTabs.props.tabPosition}`]\n }, [\n scrollBtn,\n h(\"div\", {\n class: \"el-tabs__nav-scroll\",\n ref: \"navScroll$\"\n }, [\n h(\"div\", {\n class: [\"el-tabs__nav\", `is-${rootTabs.props.tabPosition}`, stretch && [\"top\", \"bottom\"].includes(rootTabs.props.tabPosition) ? \"is-stretch\" : \"\"],\n ref: \"nav$\",\n style: navStyle,\n role: \"tablist\",\n onKeydown: changeTab\n }, [\n !type ? h(script, {\n tabs: panes\n }) : null,\n tabs\n ])\n ])\n ]);\n }\n});\n\nscript$1.__file = \"packages/tabs/src/tab-nav.vue\";\n\nvar script$2 = defineComponent({\n name: \"ElTabs\",\n components: { TabNav: script$1 },\n props: {\n type: {\n type: String,\n default: \"\"\n },\n activeName: {\n type: String,\n default: \"\"\n },\n closable: Boolean,\n addable: Boolean,\n modelValue: {\n type: String,\n default: \"\"\n },\n editable: Boolean,\n tabPosition: {\n type: String,\n default: \"top\"\n },\n beforeLeave: {\n type: Function,\n default: null\n },\n stretch: Boolean\n },\n emits: [\"tab-click\", \"edit\", \"tab-remove\", \"tab-add\", \"input\", \"update:modelValue\"],\n setup(props, ctx) {\n const nav$ = ref(null);\n const currentName = ref(props.modelValue || props.activeName || \"0\");\n const panes = ref([]);\n const instance = getCurrentInstance();\n const paneStatesMap = {};\n provide(\"rootTabs\", {\n props,\n currentName\n });\n provide(\"updatePaneState\", (pane) => {\n paneStatesMap[pane.uid] = pane;\n });\n watch(() => props.activeName, (modelValue) => {\n setCurrentName(modelValue);\n });\n watch(() => props.modelValue, (modelValue) => {\n setCurrentName(modelValue);\n });\n watch(currentName, () => {\n if (nav$.value) {\n nextTick(() => {\n nav$.value.$nextTick(() => {\n nav$.value.scrollToActiveTab();\n });\n });\n }\n setPaneInstances(true);\n });\n const getPaneInstanceFromSlot = (vnode, paneInstanceList = []) => {\n Array.from(vnode.children || []).forEach((node) => {\n let type = node.type;\n type = type.name || type;\n if (type === \"ElTabPane\" && node.component) {\n paneInstanceList.push(node.component);\n } else if (type === Fragment || type === \"template\") {\n getPaneInstanceFromSlot(node, paneInstanceList);\n }\n });\n return paneInstanceList;\n };\n const setPaneInstances = (isForceUpdate = false) => {\n if (ctx.slots.default) {\n const children = instance.subTree.children;\n const content = Array.from(children).find(({ props: props2 }) => {\n return props2.class === \"el-tabs__content\";\n });\n if (!content)\n return;\n const paneInstanceList = getPaneInstanceFromSlot(content).map((paneComponent) => {\n return paneStatesMap[paneComponent.uid];\n });\n const panesChanged = !(paneInstanceList.length === panes.value.length && paneInstanceList.every((pane, index) => pane.uid === panes.value[index].uid));\n if (isForceUpdate || panesChanged) {\n panes.value = paneInstanceList;\n }\n } else if (panes.value.length !== 0) {\n panes.value = [];\n }\n };\n const changeCurrentName = (value) => {\n currentName.value = value;\n ctx.emit(\"input\", value);\n ctx.emit(\"update:modelValue\", value);\n };\n const setCurrentName = (value) => {\n if (currentName.value === value)\n return;\n const beforeLeave = props.beforeLeave;\n const before = beforeLeave && beforeLeave(value, currentName.value);\n if (before && isPromise(before)) {\n before.then(() => {\n var _a, _b;\n changeCurrentName(value);\n (_b = (_a = nav$.value).removeFocus) == null ? void 0 : _b.call(_a);\n }, () => {\n });\n } else if (before !== false) {\n changeCurrentName(value);\n }\n };\n const handleTabClick = (tab, tabName, event) => {\n if (tab.props.disabled)\n return;\n setCurrentName(tabName);\n ctx.emit(\"tab-click\", tab, event);\n };\n const handleTabRemove = (pane, ev) => {\n if (pane.props.disabled)\n return;\n ev.stopPropagation();\n ctx.emit(\"edit\", pane.props.name, \"remove\");\n ctx.emit(\"tab-remove\", pane.props.name);\n };\n const handleTabAdd = () => {\n ctx.emit(\"edit\", null, \"add\");\n ctx.emit(\"tab-add\");\n };\n onUpdated(() => {\n setPaneInstances();\n });\n onMounted(() => {\n setPaneInstances();\n });\n return {\n nav$,\n handleTabClick,\n handleTabRemove,\n handleTabAdd,\n currentName,\n panes\n };\n },\n render() {\n var _a;\n let {\n type,\n handleTabClick,\n handleTabRemove,\n handleTabAdd,\n currentName,\n panes,\n editable,\n addable,\n tabPosition,\n stretch\n } = this;\n const newButton = editable || addable ? h(\"span\", {\n class: \"el-tabs__new-tab\",\n tabindex: \"0\",\n onClick: handleTabAdd,\n onKeydown: (ev) => {\n if (ev.code === EVENT_CODE.enter) {\n handleTabAdd();\n }\n }\n }, [h(\"i\", { class: \"el-icon-plus\" })]) : null;\n const header = h(\"div\", {\n class: [\"el-tabs__header\", `is-${tabPosition}`]\n }, [\n newButton,\n h(script$1, {\n currentName,\n editable,\n type,\n panes,\n stretch,\n ref: \"nav$\",\n onTabClick: handleTabClick,\n onTabRemove: handleTabRemove\n })\n ]);\n const panels = h(\"div\", {\n class: \"el-tabs__content\"\n }, (_a = this.$slots) == null ? void 0 : _a.default());\n return h(\"div\", {\n class: {\n \"el-tabs\": true,\n \"el-tabs--card\": type === \"card\",\n [`el-tabs--${tabPosition}`]: true,\n \"el-tabs--border-card\": type === \"border-card\"\n }\n }, tabPosition !== \"bottom\" ? [header, panels] : [panels, header]);\n }\n});\n\nscript$2.__file = \"packages/tabs/src/tabs.vue\";\n\nscript$2.install = (app) => {\n app.component(script$2.name, script$2);\n};\nconst _Tabs = script$2;\n\nexport default _Tabs;\n","import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, withCtx, createVNode, Fragment, renderList } from 'vue';\nimport ElSelect from '../el-select';\nimport ElOption from '../el-option';\n\nconst parseTime = (time) => {\n const values = (time || \"\").split(\":\");\n if (values.length >= 2) {\n const hours = parseInt(values[0], 10);\n const minutes = parseInt(values[1], 10);\n return {\n hours,\n minutes\n };\n }\n return null;\n};\nconst compareTime = (time1, time2) => {\n const value1 = parseTime(time1);\n const value2 = parseTime(time2);\n const minutes1 = value1.minutes + value1.hours * 60;\n const minutes2 = value2.minutes + value2.hours * 60;\n if (minutes1 === minutes2) {\n return 0;\n }\n return minutes1 > minutes2 ? 1 : -1;\n};\nconst formatTime = (time) => {\n return (time.hours < 10 ? \"0\" + time.hours : time.hours) + \":\" + (time.minutes < 10 ? \"0\" + time.minutes : time.minutes);\n};\nconst nextTime = (time, step) => {\n const timeValue = parseTime(time);\n const stepValue = parseTime(step);\n const next = {\n hours: timeValue.hours,\n minutes: timeValue.minutes\n };\n next.minutes += stepValue.minutes;\n next.hours += stepValue.hours;\n next.hours += Math.floor(next.minutes / 60);\n next.minutes = next.minutes % 60;\n return formatTime(next);\n};\nvar script = defineComponent({\n name: \"ElTimeSelect\",\n components: { ElSelect, ElOption },\n model: {\n prop: \"value\",\n event: \"change\"\n },\n props: {\n modelValue: String,\n disabled: {\n type: Boolean,\n default: false\n },\n editable: {\n type: Boolean,\n default: true\n },\n clearable: {\n type: Boolean,\n default: true\n },\n size: {\n type: String,\n default: \"\",\n validator: (value) => !value || [\"medium\", \"small\", \"mini\"].indexOf(value) !== -1\n },\n placeholder: {\n type: String,\n default: \"\"\n },\n start: {\n type: String,\n default: \"09:00\"\n },\n end: {\n type: String,\n default: \"18:00\"\n },\n step: {\n type: String,\n default: \"00:30\"\n },\n minTime: {\n type: String,\n default: \"\"\n },\n maxTime: {\n type: String,\n default: \"\"\n },\n name: {\n type: String,\n default: \"\"\n },\n prefixIcon: {\n type: String,\n default: \"el-icon-time\"\n },\n clearIcon: {\n type: String,\n default: \"el-icon-circle-close\"\n }\n },\n emits: [\"change\", \"blur\", \"focus\", \"update:modelValue\"],\n setup(props) {\n const select = ref(null);\n const value = computed(() => props.modelValue);\n const items = computed(() => {\n const result = [];\n if (props.start && props.end && props.step) {\n let current = props.start;\n while (compareTime(current, props.end) <= 0) {\n result.push({\n value: current,\n disabled: compareTime(current, props.minTime || \"-1:-1\") <= 0 || compareTime(current, props.maxTime || \"100:100\") >= 0\n });\n current = nextTime(current, props.step);\n }\n }\n return result;\n });\n const blur = () => {\n var _a, _b;\n (_b = (_a = select.value) == null ? void 0 : _a.blur) == null ? void 0 : _b.call(_a);\n };\n const focus = () => {\n var _a, _b;\n (_b = (_a = select.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);\n };\n return {\n select,\n value,\n items,\n blur,\n focus\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_option = resolveComponent(\"el-option\");\n const _component_el_select = resolveComponent(\"el-select\");\n return openBlock(), createBlock(_component_el_select, {\n ref: \"select\",\n \"model-value\": _ctx.value,\n disabled: _ctx.disabled,\n clearable: _ctx.clearable,\n \"clear-icon\": _ctx.clearIcon,\n size: _ctx.size,\n placeholder: _ctx.placeholder,\n \"default-first-option\": \"\",\n filterable: _ctx.editable,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = (event) => _ctx.$emit(\"update:modelValue\", event)),\n onChange: _cache[2] || (_cache[2] = (event) => _ctx.$emit(\"change\", event)),\n onBlur: _cache[3] || (_cache[3] = (event) => _ctx.$emit(\"blur\", event)),\n onFocus: _cache[4] || (_cache[4] = (event) => _ctx.$emit(\"focus\", event))\n }, {\n prefix: withCtx(() => [\n createVNode(\"i\", {\n class: `el-input__icon ${_ctx.prefixIcon}`\n }, null, 2)\n ]),\n default: withCtx(() => [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.items, (item) => {\n return openBlock(), createBlock(_component_el_option, {\n key: item.value,\n label: item.value,\n value: item.value,\n disabled: item.disabled\n }, null, 8, [\"label\", \"value\", \"disabled\"]);\n }), 128))\n ]),\n _: 1\n }, 8, [\"model-value\", \"disabled\", \"clearable\", \"clear-icon\", \"size\", \"placeholder\", \"filterable\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/time-select/src/time-select.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _TimeSelect = script;\n\nexport default _TimeSelect;\n","import { defineComponent, provide, h } from 'vue';\n\nvar script = defineComponent({\n name: \"ElTimeline\",\n setup(props, ctx) {\n provide(\"timeline\", ctx);\n return () => {\n var _a, _b;\n return h(\"ul\", {\n class: { \"el-timeline\": true }\n }, (_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a));\n };\n }\n});\n\nscript.__file = \"packages/timeline/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Timeline = script;\n\nexport default _Timeline;\n","import { defineComponent, inject, openBlock, createBlock, createCommentVNode, renderSlot, createVNode, toDisplayString } from 'vue';\n\nvar script = defineComponent({\n name: \"ElTimelineItem\",\n props: {\n timestamp: {\n type: String,\n default: \"\"\n },\n hideTimestamp: {\n type: Boolean,\n default: false\n },\n placement: {\n type: String,\n default: \"bottom\"\n },\n type: {\n type: String,\n default: \"\"\n },\n color: {\n type: String,\n default: \"\"\n },\n size: {\n type: String,\n default: \"normal\"\n },\n icon: {\n type: String,\n default: \"\"\n }\n },\n setup() {\n inject(\"timeline\");\n }\n});\n\nconst _hoisted_1 = { class: \"el-timeline-item\" };\nconst _hoisted_2 = /* @__PURE__ */ createVNode(\"div\", { class: \"el-timeline-item__tail\" }, null, -1);\nconst _hoisted_3 = {\n key: 1,\n class: \"el-timeline-item__dot\"\n};\nconst _hoisted_4 = { class: \"el-timeline-item__wrapper\" };\nconst _hoisted_5 = {\n key: 0,\n class: \"el-timeline-item__timestamp is-top\"\n};\nconst _hoisted_6 = { class: \"el-timeline-item__content\" };\nconst _hoisted_7 = {\n key: 1,\n class: \"el-timeline-item__timestamp is-bottom\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"li\", _hoisted_1, [\n _hoisted_2,\n !_ctx.$slots.dot ? (openBlock(), createBlock(\"div\", {\n key: 0,\n class: [\"el-timeline-item__node\", [\n `el-timeline-item__node--${_ctx.size || \"\"}`,\n `el-timeline-item__node--${_ctx.type || \"\"}`\n ]],\n style: {\n backgroundColor: _ctx.color\n }\n }, [\n _ctx.icon ? (openBlock(), createBlock(\"i\", {\n key: 0,\n class: [\"el-timeline-item__icon\", _ctx.icon]\n }, null, 2)) : createCommentVNode(\"v-if\", true)\n ], 6)) : createCommentVNode(\"v-if\", true),\n _ctx.$slots.dot ? (openBlock(), createBlock(\"div\", _hoisted_3, [\n renderSlot(_ctx.$slots, \"dot\")\n ])) : createCommentVNode(\"v-if\", true),\n createVNode(\"div\", _hoisted_4, [\n !_ctx.hideTimestamp && _ctx.placement === \"top\" ? (openBlock(), createBlock(\"div\", _hoisted_5, toDisplayString(_ctx.timestamp), 1)) : createCommentVNode(\"v-if\", true),\n createVNode(\"div\", _hoisted_6, [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n !_ctx.hideTimestamp && _ctx.placement === \"bottom\" ? (openBlock(), createBlock(\"div\", _hoisted_7, toDisplayString(_ctx.timestamp), 1)) : createCommentVNode(\"v-if\", true)\n ])\n ]);\n}\n\nscript.render = render;\nscript.__file = \"packages/timeline/src/item.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _TimelineItem = script;\n\nexport default _TimelineItem;\n","import { computed, watch, defineComponent, reactive, toRefs, resolveComponent, openBlock, createBlock, createVNode, withCtx, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vShow, renderSlot, inject, ref, h } from 'vue';\nimport { useLocaleInject } from '../hooks';\nimport ElButton from '../el-button';\nimport ElCheckbox from '../el-checkbox';\nimport ElCheckboxGroup from '../el-checkbox-group';\nimport ElInput from '../el-input';\nimport { UPDATE_MODEL_EVENT as UPDATE_MODEL_EVENT$1 } from '../utils/constants';\nimport { elFormItemKey } from '../el-form';\n\nconst CHECKED_CHANGE_EVENT = \"checked-change\";\nconst useCheck = (props, panelState, emit) => {\n const labelProp = computed(() => props.props.label || \"label\");\n const keyProp = computed(() => props.props.key || \"key\");\n const disabledProp = computed(() => props.props.disabled || \"disabled\");\n const filteredData = computed(() => {\n return props.data.filter((item) => {\n if (typeof props.filterMethod === \"function\") {\n return props.filterMethod(panelState.query, item);\n } else {\n const label = item[labelProp.value] || item[keyProp.value].toString();\n return label.toLowerCase().includes(panelState.query.toLowerCase());\n }\n });\n });\n const checkableData = computed(() => {\n return filteredData.value.filter((item) => !item[disabledProp.value]);\n });\n const checkedSummary = computed(() => {\n const checkedLength = panelState.checked.length;\n const dataLength = props.data.length;\n const { noChecked, hasChecked } = props.format;\n if (noChecked && hasChecked) {\n return checkedLength > 0 ? hasChecked.replace(/\\${checked}/g, checkedLength.toString()).replace(/\\${total}/g, dataLength.toString()) : noChecked.replace(/\\${total}/g, dataLength.toString());\n } else {\n return `${checkedLength}/${dataLength}`;\n }\n });\n const isIndeterminate = computed(() => {\n const checkedLength = panelState.checked.length;\n return checkedLength > 0 && checkedLength < checkableData.value.length;\n });\n const updateAllChecked = () => {\n const checkableDataKeys = checkableData.value.map((item) => item[keyProp.value]);\n panelState.allChecked = checkableDataKeys.length > 0 && checkableDataKeys.every((item) => panelState.checked.includes(item));\n };\n const handleAllCheckedChange = (value) => {\n panelState.checked = value ? checkableData.value.map((item) => item[keyProp.value]) : [];\n };\n watch(() => panelState.checked, (val, oldVal) => {\n updateAllChecked();\n if (panelState.checkChangeByUser) {\n const movedKeys = val.concat(oldVal).filter((v) => !val.includes(v) || !oldVal.includes(v));\n emit(CHECKED_CHANGE_EVENT, val, movedKeys);\n } else {\n emit(CHECKED_CHANGE_EVENT, val);\n panelState.checkChangeByUser = true;\n }\n });\n watch(checkableData, () => {\n updateAllChecked();\n });\n watch(() => props.data, () => {\n const checked = [];\n const filteredDataKeys = filteredData.value.map((item) => item[keyProp.value]);\n panelState.checked.forEach((item) => {\n if (filteredDataKeys.includes(item)) {\n checked.push(item);\n }\n });\n panelState.checkChangeByUser = false;\n panelState.checked = checked;\n });\n watch(() => props.defaultChecked, (val, oldVal) => {\n if (oldVal && val.length === oldVal.length && val.every((item) => oldVal.includes(item)))\n return;\n const checked = [];\n const checkableDataKeys = checkableData.value.map((item) => item[keyProp.value]);\n val.forEach((item) => {\n if (checkableDataKeys.includes(item)) {\n checked.push(item);\n }\n });\n panelState.checkChangeByUser = false;\n panelState.checked = checked;\n }, {\n immediate: true\n });\n return {\n labelProp,\n keyProp,\n disabledProp,\n filteredData,\n checkableData,\n checkedSummary,\n isIndeterminate,\n updateAllChecked,\n handleAllCheckedChange\n };\n};\n\nvar script = defineComponent({\n name: \"ElTransferPanel\",\n components: {\n ElCheckboxGroup,\n ElCheckbox,\n ElInput,\n OptionContent: ({ option }) => option\n },\n props: {\n data: {\n type: Array,\n default() {\n return [];\n }\n },\n optionRender: Function,\n placeholder: String,\n title: String,\n filterable: Boolean,\n format: Object,\n filterMethod: Function,\n defaultChecked: Array,\n props: Object\n },\n emits: [CHECKED_CHANGE_EVENT],\n setup(props, { emit, slots }) {\n const { t } = useLocaleInject();\n const panelState = reactive({\n checked: [],\n allChecked: false,\n query: \"\",\n inputHover: false,\n checkChangeByUser: true\n });\n const {\n labelProp,\n keyProp,\n disabledProp,\n filteredData,\n checkedSummary,\n isIndeterminate,\n handleAllCheckedChange\n } = useCheck(props, panelState, emit);\n const hasNoMatch = computed(() => {\n return panelState.query.length > 0 && filteredData.value.length === 0;\n });\n const inputIcon = computed(() => {\n return panelState.query.length > 0 && panelState.inputHover ? \"circle-close\" : \"search\";\n });\n const hasFooter = computed(() => !!slots.default()[0].children.length);\n const clearQuery = () => {\n if (inputIcon.value === \"circle-close\") {\n panelState.query = \"\";\n }\n };\n const {\n checked,\n allChecked,\n query,\n inputHover,\n checkChangeByUser\n } = toRefs(panelState);\n return {\n labelProp,\n keyProp,\n disabledProp,\n filteredData,\n checkedSummary,\n isIndeterminate,\n handleAllCheckedChange,\n checked,\n allChecked,\n query,\n inputHover,\n checkChangeByUser,\n hasNoMatch,\n inputIcon,\n hasFooter,\n clearQuery,\n t\n };\n }\n});\n\nconst _hoisted_1 = { class: \"el-transfer-panel\" };\nconst _hoisted_2 = { class: \"el-transfer-panel__header\" };\nconst _hoisted_3 = {\n key: 0,\n class: \"el-transfer-panel__footer\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_checkbox = resolveComponent(\"el-checkbox\");\n const _component_el_input = resolveComponent(\"el-input\");\n const _component_option_content = resolveComponent(\"option-content\");\n const _component_el_checkbox_group = resolveComponent(\"el-checkbox-group\");\n return openBlock(), createBlock(\"div\", _hoisted_1, [\n createVNode(\"p\", _hoisted_2, [\n createVNode(_component_el_checkbox, {\n modelValue: _ctx.allChecked,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event) => _ctx.allChecked = $event),\n indeterminate: _ctx.isIndeterminate,\n onChange: _ctx.handleAllCheckedChange\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.title) + \" \", 1),\n createVNode(\"span\", null, toDisplayString(_ctx.checkedSummary), 1)\n ]),\n _: 1\n }, 8, [\"modelValue\", \"indeterminate\", \"onChange\"])\n ]),\n createVNode(\"div\", {\n class: [\"el-transfer-panel__body\", _ctx.hasFooter ? \"is-with-footer\" : \"\"]\n }, [\n _ctx.filterable ? (openBlock(), createBlock(_component_el_input, {\n key: 0,\n modelValue: _ctx.query,\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = ($event) => _ctx.query = $event),\n class: \"el-transfer-panel__filter\",\n size: \"small\",\n placeholder: _ctx.placeholder,\n onMouseenter: _cache[4] || (_cache[4] = ($event) => _ctx.inputHover = true),\n onMouseleave: _cache[5] || (_cache[5] = ($event) => _ctx.inputHover = false)\n }, {\n prefix: withCtx(() => [\n createVNode(\"i\", {\n class: [\"el-input__icon\", \"el-icon-\" + _ctx.inputIcon],\n onClick: _cache[2] || (_cache[2] = (...args) => _ctx.clearQuery && _ctx.clearQuery(...args))\n }, null, 2)\n ]),\n _: 1\n }, 8, [\"modelValue\", \"placeholder\"])) : createCommentVNode(\"v-if\", true),\n withDirectives(createVNode(_component_el_checkbox_group, {\n modelValue: _ctx.checked,\n \"onUpdate:modelValue\": _cache[6] || (_cache[6] = ($event) => _ctx.checked = $event),\n class: [{ \"is-filterable\": _ctx.filterable }, \"el-transfer-panel__list\"]\n }, {\n default: withCtx(() => [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.filteredData, (item) => {\n return openBlock(), createBlock(_component_el_checkbox, {\n key: item[_ctx.keyProp],\n class: \"el-transfer-panel__item\",\n label: item[_ctx.keyProp],\n disabled: item[_ctx.disabledProp]\n }, {\n default: withCtx(() => [\n createVNode(_component_option_content, {\n option: _ctx.optionRender(item)\n }, null, 8, [\"option\"])\n ]),\n _: 2\n }, 1032, [\"label\", \"disabled\"]);\n }), 128))\n ]),\n _: 1\n }, 8, [\"modelValue\", \"class\"]), [\n [vShow, !_ctx.hasNoMatch && _ctx.data.length > 0]\n ]),\n withDirectives(createVNode(\"p\", { class: \"el-transfer-panel__empty\" }, toDisplayString(_ctx.hasNoMatch ? _ctx.t(\"el.transfer.noMatch\") : _ctx.t(\"el.transfer.noData\")), 513), [\n [vShow, _ctx.hasNoMatch || _ctx.data.length === 0]\n ])\n ], 2),\n _ctx.hasFooter ? (openBlock(), createBlock(\"p\", _hoisted_3, [\n renderSlot(_ctx.$slots, \"default\")\n ])) : createCommentVNode(\"v-if\", true)\n ]);\n}\n\nscript.render = render;\nscript.__file = \"packages/transfer/src/transfer-panel.vue\";\n\nconst useComputedData = (props) => {\n const propsKey = computed(() => props.props.key);\n const dataObj = computed(() => {\n return props.data.reduce((o, cur) => (o[cur[propsKey.value]] = cur) && o, {});\n });\n const sourceData = computed(() => {\n return props.data.filter((item) => !props.modelValue.includes(item[propsKey.value]));\n });\n const targetData = computed(() => {\n if (props.targetOrder === \"original\") {\n return props.data.filter((item) => props.modelValue.includes(item[propsKey.value]));\n } else {\n return props.modelValue.reduce((arr, cur) => {\n const val = dataObj.value[cur];\n if (val) {\n arr.push(val);\n }\n return arr;\n }, []);\n }\n });\n return {\n propsKey,\n sourceData,\n targetData\n };\n};\n\nconst LEFT_CHECK_CHANGE_EVENT = \"left-check-change\";\nconst RIGHT_CHECK_CHANGE_EVENT = \"right-check-change\";\nconst useCheckedChange = (checkedState, emit) => {\n const onSourceCheckedChange = (val, movedKeys) => {\n checkedState.leftChecked = val;\n if (movedKeys === void 0)\n return;\n emit(LEFT_CHECK_CHANGE_EVENT, val, movedKeys);\n };\n const onTargetCheckedChange = (val, movedKeys) => {\n checkedState.rightChecked = val;\n if (movedKeys === void 0)\n return;\n emit(RIGHT_CHECK_CHANGE_EVENT, val, movedKeys);\n };\n return {\n onSourceCheckedChange,\n onTargetCheckedChange\n };\n};\n\nconst UPDATE_MODEL_EVENT = \"update:modelValue\";\n\nconst useMove = (props, checkedState, propsKey, emit) => {\n const _emit = (value, type, checked) => {\n emit(UPDATE_MODEL_EVENT, value);\n emit(CHANGE_EVENT, value, type, checked);\n };\n const addToLeft = () => {\n const currentValue = props.modelValue.slice();\n checkedState.rightChecked.forEach((item) => {\n const index = currentValue.indexOf(item);\n if (index > -1) {\n currentValue.splice(index, 1);\n }\n });\n _emit(currentValue, \"left\", checkedState.rightChecked);\n };\n const addToRight = () => {\n let currentValue = props.modelValue.slice();\n const itemsToBeMoved = props.data.filter((item) => {\n const itemKey = item[propsKey.value];\n return checkedState.leftChecked.includes(itemKey) && !props.modelValue.includes(itemKey);\n }).map((item) => item[propsKey.value]);\n currentValue = props.targetOrder === \"unshift\" ? itemsToBeMoved.concat(currentValue) : currentValue.concat(itemsToBeMoved);\n _emit(currentValue, \"right\", checkedState.leftChecked);\n };\n return {\n addToLeft,\n addToRight\n };\n};\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nconst CHANGE_EVENT = \"change\";\nvar script$1 = defineComponent({\n name: \"ElTransfer\",\n components: {\n TransferPanel: script,\n ElButton\n },\n props: {\n data: {\n type: Array,\n default: () => []\n },\n titles: {\n type: Array,\n default: () => []\n },\n buttonTexts: {\n type: Array,\n default: () => []\n },\n filterPlaceholder: {\n type: String,\n default: \"\"\n },\n filterMethod: Function,\n leftDefaultChecked: {\n type: Array,\n default: () => []\n },\n rightDefaultChecked: {\n type: Array,\n default: () => []\n },\n renderContent: Function,\n modelValue: {\n type: Array,\n default: () => []\n },\n format: {\n type: Object,\n default: () => ({})\n },\n filterable: {\n type: Boolean,\n default: false\n },\n props: {\n type: Object,\n default: () => ({\n label: \"label\",\n key: \"key\",\n disabled: \"disabled\"\n })\n },\n targetOrder: {\n type: String,\n default: \"original\",\n validator: (val) => {\n return [\"original\", \"push\", \"unshift\"].includes(val);\n }\n }\n },\n emits: [\n UPDATE_MODEL_EVENT$1,\n CHANGE_EVENT,\n LEFT_CHECK_CHANGE_EVENT,\n RIGHT_CHECK_CHANGE_EVENT\n ],\n setup(props, { emit, slots }) {\n const { t } = useLocaleInject();\n const elFormItem = inject(elFormItemKey, {});\n const checkedState = reactive({\n leftChecked: [],\n rightChecked: []\n });\n const {\n propsKey,\n sourceData,\n targetData\n } = useComputedData(props);\n const {\n onSourceCheckedChange,\n onTargetCheckedChange\n } = useCheckedChange(checkedState, emit);\n const {\n addToLeft,\n addToRight\n } = useMove(props, checkedState, propsKey, emit);\n const leftPanel = ref(null);\n const rightPanel = ref(null);\n const clearQuery = (which) => {\n if (which === \"left\") {\n leftPanel.value.query = \"\";\n } else if (which === \"right\") {\n rightPanel.value.query = \"\";\n }\n };\n const hasButtonTexts = computed(() => props.buttonTexts.length === 2);\n const leftPanelTitle = computed(() => props.titles[0] || t(\"el.transfer.titles.0\"));\n const rightPanelTitle = computed(() => props.titles[1] || t(\"el.transfer.titles.1\"));\n const panelFilterPlaceholder = computed(() => props.filterPlaceholder || t(\"el.transfer.filterPlaceholder\"));\n watch(() => props.modelValue, (val) => {\n var _a;\n (_a = elFormItem.formItemMitt) == null ? void 0 : _a.emit(\"el.form.change\", val);\n });\n const optionRender = computed(() => (option) => {\n if (props.renderContent)\n return props.renderContent(h, option);\n if (slots.default)\n return slots.default({ option });\n return h(\"span\", option[props.props.label] || option[props.props.key]);\n });\n return __spreadProps(__spreadValues({\n sourceData,\n targetData,\n onSourceCheckedChange,\n onTargetCheckedChange,\n addToLeft,\n addToRight\n }, toRefs(checkedState)), {\n hasButtonTexts,\n leftPanelTitle,\n rightPanelTitle,\n panelFilterPlaceholder,\n clearQuery,\n optionRender\n });\n }\n});\n\nconst _hoisted_1$1 = { class: \"el-transfer\" };\nconst _hoisted_2$1 = { class: \"el-transfer__buttons\" };\nconst _hoisted_3$1 = /* @__PURE__ */ createVNode(\"i\", { class: \"el-icon-arrow-left\" }, null, -1);\nconst _hoisted_4 = { key: 0 };\nconst _hoisted_5 = { key: 0 };\nconst _hoisted_6 = /* @__PURE__ */ createVNode(\"i\", { class: \"el-icon-arrow-right\" }, null, -1);\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_transfer_panel = resolveComponent(\"transfer-panel\");\n const _component_el_button = resolveComponent(\"el-button\");\n return openBlock(), createBlock(\"div\", _hoisted_1$1, [\n createVNode(_component_transfer_panel, {\n ref: \"leftPanel\",\n data: _ctx.sourceData,\n \"option-render\": _ctx.optionRender,\n placeholder: _ctx.panelFilterPlaceholder,\n title: _ctx.leftPanelTitle,\n filterable: _ctx.filterable,\n format: _ctx.format,\n \"filter-method\": _ctx.filterMethod,\n \"default-checked\": _ctx.leftDefaultChecked,\n props: _ctx.props,\n onCheckedChange: _ctx.onSourceCheckedChange\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"left-footer\")\n ]),\n _: 3\n }, 8, [\"data\", \"option-render\", \"placeholder\", \"title\", \"filterable\", \"format\", \"filter-method\", \"default-checked\", \"props\", \"onCheckedChange\"]),\n createVNode(\"div\", _hoisted_2$1, [\n createVNode(_component_el_button, {\n type: \"primary\",\n class: [\"el-transfer__button\", _ctx.hasButtonTexts ? \"is-with-texts\" : \"\"],\n disabled: _ctx.rightChecked.length === 0,\n onClick: _ctx.addToLeft\n }, {\n default: withCtx(() => [\n _hoisted_3$1,\n _ctx.buttonTexts[0] !== void 0 ? (openBlock(), createBlock(\"span\", _hoisted_4, toDisplayString(_ctx.buttonTexts[0]), 1)) : createCommentVNode(\"v-if\", true)\n ]),\n _: 1\n }, 8, [\"class\", \"disabled\", \"onClick\"]),\n createVNode(_component_el_button, {\n type: \"primary\",\n class: [\"el-transfer__button\", _ctx.hasButtonTexts ? \"is-with-texts\" : \"\"],\n disabled: _ctx.leftChecked.length === 0,\n onClick: _ctx.addToRight\n }, {\n default: withCtx(() => [\n _ctx.buttonTexts[1] !== void 0 ? (openBlock(), createBlock(\"span\", _hoisted_5, toDisplayString(_ctx.buttonTexts[1]), 1)) : createCommentVNode(\"v-if\", true),\n _hoisted_6\n ]),\n _: 1\n }, 8, [\"class\", \"disabled\", \"onClick\"])\n ]),\n createVNode(_component_transfer_panel, {\n ref: \"rightPanel\",\n data: _ctx.targetData,\n \"option-render\": _ctx.optionRender,\n placeholder: _ctx.panelFilterPlaceholder,\n filterable: _ctx.filterable,\n format: _ctx.format,\n \"filter-method\": _ctx.filterMethod,\n title: _ctx.rightPanelTitle,\n \"default-checked\": _ctx.rightDefaultChecked,\n props: _ctx.props,\n onCheckedChange: _ctx.onTargetCheckedChange\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"right-footer\")\n ]),\n _: 3\n }, 8, [\"data\", \"option-render\", \"placeholder\", \"filterable\", \"format\", \"filter-method\", \"title\", \"default-checked\", \"props\", \"onCheckedChange\"])\n ]);\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"packages/transfer/src/index.vue\";\n\nscript$1.install = (app) => {\n app.component(script$1.name, script$1);\n};\nconst _Transfer = script$1;\n\nexport default _Transfer;\n","import { reactive, defineComponent, inject, h, provide, ref, getCurrentInstance, watch, nextTick, resolveComponent, withDirectives, openBlock, createBlock, withModifiers, createVNode, createCommentVNode, withCtx, Fragment, renderList, vShow, onMounted, onBeforeUnmount, onUpdated, computed, toDisplayString } from 'vue';\nimport ElCollapseTransition from '../el-collapse-transition';\nimport ElCheckbox from '../el-checkbox';\nimport mitt from 'mitt';\nimport { removeClass, addClass, on, off } from '../utils/dom';\nimport { EVENT_CODE } from '../utils/aria';\nimport { useLocaleInject } from '../hooks';\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\r\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\n\nconst NODE_KEY = \"$treeNodeId\";\nconst markNodeData = function(node, data) {\n if (!data || data[NODE_KEY])\n return;\n Object.defineProperty(data, NODE_KEY, {\n value: node.id,\n enumerable: false,\n configurable: false,\n writable: false\n });\n};\nconst getNodeKey = function(key, data) {\n if (!key)\n return data[NODE_KEY];\n return data[key];\n};\n\nconst getChildState = (node) => {\n let all = true;\n let none = true;\n let allWithoutDisable = true;\n for (let i = 0, j = node.length; i < j; i++) {\n const n = node[i];\n if (n.checked !== true || n.indeterminate) {\n all = false;\n if (!n.disabled) {\n allWithoutDisable = false;\n }\n }\n if (n.checked !== false || n.indeterminate) {\n none = false;\n }\n }\n return { all, none, allWithoutDisable, half: !all && !none };\n};\nconst reInitChecked = function(node) {\n if (node.childNodes.length === 0)\n return;\n const { all, none, half } = getChildState(node.childNodes);\n if (all) {\n node.checked = true;\n node.indeterminate = false;\n } else if (half) {\n node.checked = false;\n node.indeterminate = true;\n } else if (none) {\n node.checked = false;\n node.indeterminate = false;\n }\n const parent = node.parent;\n if (!parent || parent.level === 0)\n return;\n if (!node.store.checkStrictly) {\n reInitChecked(parent);\n }\n};\nconst getPropertyFromData = function(node, prop) {\n const props = node.store.props;\n const data = node.data || {};\n const config = props[prop];\n if (typeof config === \"function\") {\n return config(data, node);\n } else if (typeof config === \"string\") {\n return data[config];\n } else if (typeof config === \"undefined\") {\n const dataProp = data[prop];\n return dataProp === void 0 ? \"\" : dataProp;\n }\n};\nlet nodeIdSeed = 0;\nclass Node {\n constructor(options) {\n this.id = nodeIdSeed++;\n this.text = null;\n this.checked = false;\n this.indeterminate = false;\n this.data = null;\n this.expanded = false;\n this.parent = null;\n this.visible = true;\n this.isCurrent = false;\n this.canFocus = false;\n for (const name in options) {\n if (hasOwn(options, name)) {\n this[name] = options[name];\n }\n }\n this.level = 0;\n this.loaded = false;\n this.childNodes = [];\n this.loading = false;\n if (this.parent) {\n this.level = this.parent.level + 1;\n }\n }\n initialize() {\n const store = this.store;\n if (!store) {\n throw new Error(\"[Node]store is required!\");\n }\n store.registerNode(this);\n const props = store.props;\n if (props && typeof props.isLeaf !== \"undefined\") {\n const isLeaf = getPropertyFromData(this, \"isLeaf\");\n if (typeof isLeaf === \"boolean\") {\n this.isLeafByUser = isLeaf;\n }\n }\n if (store.lazy !== true && this.data) {\n this.setData(this.data);\n if (store.defaultExpandAll) {\n this.expanded = true;\n this.canFocus = true;\n }\n } else if (this.level > 0 && store.lazy && store.defaultExpandAll) {\n this.expand();\n }\n if (!Array.isArray(this.data)) {\n markNodeData(this, this.data);\n }\n if (!this.data)\n return;\n const defaultExpandedKeys = store.defaultExpandedKeys;\n const key = store.key;\n if (key && defaultExpandedKeys && defaultExpandedKeys.indexOf(this.key) !== -1) {\n this.expand(null, store.autoExpandParent);\n }\n if (key && store.currentNodeKey !== void 0 && this.key === store.currentNodeKey) {\n store.currentNode = this;\n store.currentNode.isCurrent = true;\n }\n if (store.lazy) {\n store._initDefaultCheckedNode(this);\n }\n this.updateLeafState();\n if (this.parent && (this.level === 1 || this.parent.expanded === true))\n this.canFocus = true;\n }\n setData(data) {\n if (!Array.isArray(data)) {\n markNodeData(this, data);\n }\n this.data = data;\n this.childNodes = [];\n let children;\n if (this.level === 0 && this.data instanceof Array) {\n children = this.data;\n } else {\n children = getPropertyFromData(this, \"children\") || [];\n }\n for (let i = 0, j = children.length; i < j; i++) {\n this.insertChild({ data: children[i] });\n }\n }\n get label() {\n return getPropertyFromData(this, \"label\");\n }\n get key() {\n const nodeKey = this.store.key;\n if (this.data)\n return this.data[nodeKey];\n return null;\n }\n get disabled() {\n return getPropertyFromData(this, \"disabled\");\n }\n get nextSibling() {\n const parent = this.parent;\n if (parent) {\n const index = parent.childNodes.indexOf(this);\n if (index > -1) {\n return parent.childNodes[index + 1];\n }\n }\n return null;\n }\n get previousSibling() {\n const parent = this.parent;\n if (parent) {\n const index = parent.childNodes.indexOf(this);\n if (index > -1) {\n return index > 0 ? parent.childNodes[index - 1] : null;\n }\n }\n return null;\n }\n contains(target, deep = true) {\n return (this.childNodes || []).some((child) => child === target || deep && child.contains(target));\n }\n remove() {\n const parent = this.parent;\n if (parent) {\n parent.removeChild(this);\n }\n }\n insertChild(child, index, batch) {\n if (!child)\n throw new Error(\"insertChild error: child is required.\");\n if (!(child instanceof Node)) {\n if (!batch) {\n const children = this.getChildren(true);\n if (children.indexOf(child.data) === -1) {\n if (typeof index === \"undefined\" || index < 0) {\n children.push(child.data);\n } else {\n children.splice(index, 0, child.data);\n }\n }\n }\n Object.assign(child, {\n parent: this,\n store: this.store\n });\n child = reactive(new Node(child));\n if (child instanceof Node) {\n child.initialize();\n }\n }\n child.level = this.level + 1;\n if (typeof index === \"undefined\" || index < 0) {\n this.childNodes.push(child);\n } else {\n this.childNodes.splice(index, 0, child);\n }\n this.updateLeafState();\n }\n insertBefore(child, ref) {\n let index;\n if (ref) {\n index = this.childNodes.indexOf(ref);\n }\n this.insertChild(child, index);\n }\n insertAfter(child, ref) {\n let index;\n if (ref) {\n index = this.childNodes.indexOf(ref);\n if (index !== -1)\n index += 1;\n }\n this.insertChild(child, index);\n }\n removeChild(child) {\n const children = this.getChildren() || [];\n const dataIndex = children.indexOf(child.data);\n if (dataIndex > -1) {\n children.splice(dataIndex, 1);\n }\n const index = this.childNodes.indexOf(child);\n if (index > -1) {\n this.store && this.store.deregisterNode(child);\n child.parent = null;\n this.childNodes.splice(index, 1);\n }\n this.updateLeafState();\n }\n removeChildByData(data) {\n let targetNode = null;\n for (let i = 0; i < this.childNodes.length; i++) {\n if (this.childNodes[i].data === data) {\n targetNode = this.childNodes[i];\n break;\n }\n }\n if (targetNode) {\n this.removeChild(targetNode);\n }\n }\n expand(callback, expandParent) {\n const done = () => {\n if (expandParent) {\n let parent = this.parent;\n while (parent.level > 0) {\n parent.expanded = true;\n parent = parent.parent;\n }\n }\n this.expanded = true;\n if (callback)\n callback();\n this.childNodes.forEach((item) => {\n item.canFocus = true;\n });\n };\n if (this.shouldLoadData()) {\n this.loadData((data) => {\n if (Array.isArray(data)) {\n if (this.checked) {\n this.setChecked(true, true);\n } else if (!this.store.checkStrictly) {\n reInitChecked(this);\n }\n done();\n }\n });\n } else {\n done();\n }\n }\n doCreateChildren(array, defaultProps = {}) {\n array.forEach((item) => {\n this.insertChild(Object.assign({ data: item }, defaultProps), void 0, true);\n });\n }\n collapse() {\n this.expanded = false;\n this.childNodes.forEach((item) => {\n item.canFocus = false;\n });\n }\n shouldLoadData() {\n return this.store.lazy === true && this.store.load && !this.loaded;\n }\n updateLeafState() {\n if (this.store.lazy === true && this.loaded !== true && typeof this.isLeafByUser !== \"undefined\") {\n this.isLeaf = this.isLeafByUser;\n return;\n }\n const childNodes = this.childNodes;\n if (!this.store.lazy || this.store.lazy === true && this.loaded === true) {\n this.isLeaf = !childNodes || childNodes.length === 0;\n return;\n }\n this.isLeaf = false;\n }\n setChecked(value, deep, recursion, passValue) {\n this.indeterminate = value === \"half\";\n this.checked = value === true;\n if (this.store.checkStrictly)\n return;\n if (!(this.shouldLoadData() && !this.store.checkDescendants)) {\n const { all, allWithoutDisable } = getChildState(this.childNodes);\n if (!this.isLeaf && (!all && allWithoutDisable)) {\n this.checked = false;\n value = false;\n }\n const handleDescendants = () => {\n if (deep) {\n const childNodes = this.childNodes;\n for (let i = 0, j = childNodes.length; i < j; i++) {\n const child = childNodes[i];\n passValue = passValue || value !== false;\n const isCheck = child.disabled ? child.checked : passValue;\n child.setChecked(isCheck, deep, true, passValue);\n }\n const { half, all: all2 } = getChildState(childNodes);\n if (!all2) {\n this.checked = all2;\n this.indeterminate = half;\n }\n }\n };\n if (this.shouldLoadData()) {\n this.loadData(() => {\n handleDescendants();\n reInitChecked(this);\n }, {\n checked: value !== false\n });\n return;\n } else {\n handleDescendants();\n }\n }\n const parent = this.parent;\n if (!parent || parent.level === 0)\n return;\n if (!recursion) {\n reInitChecked(parent);\n }\n }\n getChildren(forceInit = false) {\n if (this.level === 0)\n return this.data;\n const data = this.data;\n if (!data)\n return null;\n const props = this.store.props;\n let children = \"children\";\n if (props) {\n children = props.children || \"children\";\n }\n if (data[children] === void 0) {\n data[children] = null;\n }\n if (forceInit && !data[children]) {\n data[children] = [];\n }\n return data[children];\n }\n updateChildren() {\n const newData = this.getChildren() || [];\n const oldData = this.childNodes.map((node) => node.data);\n const newDataMap = {};\n const newNodes = [];\n newData.forEach((item, index) => {\n const key = item[NODE_KEY];\n const isNodeExists = !!key && oldData.findIndex((data) => data[NODE_KEY] === key) >= 0;\n if (isNodeExists) {\n newDataMap[key] = { index, data: item };\n } else {\n newNodes.push({ index, data: item });\n }\n });\n if (!this.store.lazy) {\n oldData.forEach((item) => {\n if (!newDataMap[item[NODE_KEY]])\n this.removeChildByData(item);\n });\n }\n newNodes.forEach(({ index, data }) => {\n this.insertChild({ data }, index);\n });\n this.updateLeafState();\n }\n loadData(callback, defaultProps = {}) {\n if (this.store.lazy === true && this.store.load && !this.loaded && (!this.loading || Object.keys(defaultProps).length)) {\n this.loading = true;\n const resolve = (children) => {\n this.loaded = true;\n this.loading = false;\n this.childNodes = [];\n this.doCreateChildren(children, defaultProps);\n this.updateLeafState();\n if (callback) {\n callback.call(this, children);\n }\n };\n this.store.load(this, resolve);\n } else {\n if (callback) {\n callback.call(this);\n }\n }\n }\n}\n\nclass TreeStore {\n constructor(options) {\n this.currentNode = null;\n this.currentNodeKey = null;\n for (const option in options) {\n if (hasOwn(options, option)) {\n this[option] = options[option];\n }\n }\n this.nodesMap = {};\n }\n initialize() {\n this.root = new Node({\n data: this.data,\n store: this\n });\n this.root.initialize();\n if (this.lazy && this.load) {\n const loadFn = this.load;\n loadFn(this.root, (data) => {\n this.root.doCreateChildren(data);\n this._initDefaultCheckedNodes();\n });\n } else {\n this._initDefaultCheckedNodes();\n }\n }\n filter(value) {\n const filterNodeMethod = this.filterNodeMethod;\n const lazy = this.lazy;\n const traverse = function(node) {\n const childNodes = node.root ? node.root.childNodes : node.childNodes;\n childNodes.forEach((child) => {\n child.visible = filterNodeMethod.call(child, value, child.data, child);\n traverse(child);\n });\n if (!node.visible && childNodes.length) {\n let allHidden = true;\n allHidden = !childNodes.some((child) => child.visible);\n if (node.root) {\n node.root.visible = allHidden === false;\n } else {\n node.visible = allHidden === false;\n }\n }\n if (!value)\n return;\n if (node.visible && !node.isLeaf && !lazy)\n node.expand();\n };\n traverse(this);\n }\n setData(newVal) {\n const instanceChanged = newVal !== this.root.data;\n if (instanceChanged) {\n this.root.setData(newVal);\n this._initDefaultCheckedNodes();\n } else {\n this.root.updateChildren();\n }\n }\n getNode(data) {\n if (data instanceof Node)\n return data;\n const key = typeof data !== \"object\" ? data : getNodeKey(this.key, data);\n return this.nodesMap[key] || null;\n }\n insertBefore(data, refData) {\n const refNode = this.getNode(refData);\n refNode.parent.insertBefore({ data }, refNode);\n }\n insertAfter(data, refData) {\n const refNode = this.getNode(refData);\n refNode.parent.insertAfter({ data }, refNode);\n }\n remove(data) {\n const node = this.getNode(data);\n if (node && node.parent) {\n if (node === this.currentNode) {\n this.currentNode = null;\n }\n node.parent.removeChild(node);\n }\n }\n append(data, parentData) {\n const parentNode = parentData ? this.getNode(parentData) : this.root;\n if (parentNode) {\n parentNode.insertChild({ data });\n }\n }\n _initDefaultCheckedNodes() {\n const defaultCheckedKeys = this.defaultCheckedKeys || [];\n const nodesMap = this.nodesMap;\n defaultCheckedKeys.forEach((checkedKey) => {\n const node = nodesMap[checkedKey];\n if (node) {\n node.setChecked(true, !this.checkStrictly);\n }\n });\n }\n _initDefaultCheckedNode(node) {\n const defaultCheckedKeys = this.defaultCheckedKeys || [];\n if (defaultCheckedKeys.indexOf(node.key) !== -1) {\n node.setChecked(true, !this.checkStrictly);\n }\n }\n setDefaultCheckedKey(newVal) {\n if (newVal !== this.defaultCheckedKeys) {\n this.defaultCheckedKeys = newVal;\n this._initDefaultCheckedNodes();\n }\n }\n registerNode(node) {\n const key = this.key;\n if (!node || !node.data)\n return;\n if (!key) {\n this.nodesMap[node.id] = node;\n } else {\n const nodeKey = node.key;\n if (nodeKey !== void 0)\n this.nodesMap[node.key] = node;\n }\n }\n deregisterNode(node) {\n const key = this.key;\n if (!key || !node || !node.data)\n return;\n node.childNodes.forEach((child) => {\n this.deregisterNode(child);\n });\n delete this.nodesMap[node.key];\n }\n getCheckedNodes(leafOnly = false, includeHalfChecked = false) {\n const checkedNodes = [];\n const traverse = function(node) {\n const childNodes = node.root ? node.root.childNodes : node.childNodes;\n childNodes.forEach((child) => {\n if ((child.checked || includeHalfChecked && child.indeterminate) && (!leafOnly || leafOnly && child.isLeaf)) {\n checkedNodes.push(child.data);\n }\n traverse(child);\n });\n };\n traverse(this);\n return checkedNodes;\n }\n getCheckedKeys(leafOnly = false) {\n return this.getCheckedNodes(leafOnly).map((data) => (data || {})[this.key]);\n }\n getHalfCheckedNodes() {\n const nodes = [];\n const traverse = function(node) {\n const childNodes = node.root ? node.root.childNodes : node.childNodes;\n childNodes.forEach((child) => {\n if (child.indeterminate) {\n nodes.push(child.data);\n }\n traverse(child);\n });\n };\n traverse(this);\n return nodes;\n }\n getHalfCheckedKeys() {\n return this.getHalfCheckedNodes().map((data) => (data || {})[this.key]);\n }\n _getAllNodes() {\n const allNodes = [];\n const nodesMap = this.nodesMap;\n for (const nodeKey in nodesMap) {\n if (hasOwn(nodesMap, nodeKey)) {\n allNodes.push(nodesMap[nodeKey]);\n }\n }\n return allNodes;\n }\n updateChildren(key, data) {\n const node = this.nodesMap[key];\n if (!node)\n return;\n const childNodes = node.childNodes;\n for (let i = childNodes.length - 1; i >= 0; i--) {\n const child = childNodes[i];\n this.remove(child.data);\n }\n for (let i = 0, j = data.length; i < j; i++) {\n const child = data[i];\n this.append(child, node.data);\n }\n }\n _setCheckedKeys(key, leafOnly = false, checkedKeys) {\n const allNodes = this._getAllNodes().sort((a, b) => b.level - a.level);\n const cache = Object.create(null);\n const keys = Object.keys(checkedKeys);\n allNodes.forEach((node) => node.setChecked(false, false));\n for (let i = 0, j = allNodes.length; i < j; i++) {\n const node = allNodes[i];\n const nodeKey = node.data[key].toString();\n const checked = keys.indexOf(nodeKey) > -1;\n if (!checked) {\n if (node.checked && !cache[nodeKey]) {\n node.setChecked(false, false);\n }\n continue;\n }\n let parent = node.parent;\n while (parent && parent.level > 0) {\n cache[parent.data[key]] = true;\n parent = parent.parent;\n }\n if (node.isLeaf || this.checkStrictly) {\n node.setChecked(true, false);\n continue;\n }\n node.setChecked(true, true);\n if (leafOnly) {\n node.setChecked(false, false);\n const traverse = function(node2) {\n const childNodes = node2.childNodes;\n childNodes.forEach((child) => {\n if (!child.isLeaf) {\n child.setChecked(false, false);\n }\n traverse(child);\n });\n };\n traverse(node);\n }\n }\n }\n setCheckedNodes(array, leafOnly = false) {\n const key = this.key;\n const checkedKeys = {};\n array.forEach((item) => {\n checkedKeys[(item || {})[key]] = true;\n });\n this._setCheckedKeys(key, leafOnly, checkedKeys);\n }\n setCheckedKeys(keys, leafOnly = false) {\n this.defaultCheckedKeys = keys;\n const key = this.key;\n const checkedKeys = {};\n keys.forEach((key2) => {\n checkedKeys[key2] = true;\n });\n this._setCheckedKeys(key, leafOnly, checkedKeys);\n }\n setDefaultExpandedKeys(keys) {\n keys = keys || [];\n this.defaultExpandedKeys = keys;\n keys.forEach((key) => {\n const node = this.getNode(key);\n if (node)\n node.expand(null, this.autoExpandParent);\n });\n }\n setChecked(data, checked, deep) {\n const node = this.getNode(data);\n if (node) {\n node.setChecked(!!checked, deep);\n }\n }\n getCurrentNode() {\n return this.currentNode;\n }\n setCurrentNode(currentNode) {\n const prevCurrentNode = this.currentNode;\n if (prevCurrentNode) {\n prevCurrentNode.isCurrent = false;\n }\n this.currentNode = currentNode;\n this.currentNode.isCurrent = true;\n }\n setUserCurrentNode(node, shouldAutoExpandParent = true) {\n const key = node[this.key];\n const currNode = this.nodesMap[key];\n this.setCurrentNode(currNode);\n if (shouldAutoExpandParent && this.currentNode.level > 1) {\n this.currentNode.parent.expand(null, true);\n }\n }\n setCurrentNodeKey(key, shouldAutoExpandParent = true) {\n if (key === null || key === void 0) {\n this.currentNode && (this.currentNode.isCurrent = false);\n this.currentNode = null;\n return;\n }\n const node = this.getNode(key);\n if (node) {\n this.setCurrentNode(node);\n if (shouldAutoExpandParent && this.currentNode.level > 1) {\n this.currentNode.parent.expand(null, true);\n }\n }\n }\n}\n\nvar script = defineComponent({\n name: \"ElTreeNodeContent\",\n props: {\n node: {\n type: Object,\n required: true\n },\n renderContent: Function\n },\n setup(props) {\n const nodeInstance = inject(\"NodeInstance\");\n const tree = inject(\"RootTree\");\n return () => {\n const node = props.node;\n const { data, store } = node;\n return props.renderContent ? props.renderContent(h, { _self: nodeInstance, node, data, store }) : tree.ctx.slots.default ? tree.ctx.slots.default({ node, data }) : h(\"span\", { class: \"el-tree-node__label\" }, [node.label]);\n };\n }\n});\n\nscript.__file = \"packages/tree/src/tree-node-content.vue\";\n\nfunction useNodeExpandEventBroadcast(props) {\n const parentNodeMap = inject(\"TreeNodeMap\", null);\n const currentNodeMap = {\n treeNodeExpand: (node) => {\n if (props.node !== node) {\n props.node.collapse();\n }\n },\n children: []\n };\n if (parentNodeMap) {\n parentNodeMap.children.push(currentNodeMap);\n }\n provide(\"TreeNodeMap\", currentNodeMap);\n return {\n broadcastExpanded: (node) => {\n if (!props.accordion)\n return;\n for (const childNode of currentNodeMap.children) {\n childNode.treeNodeExpand(node);\n }\n }\n };\n}\n\nfunction useDragNodeHandler({ props, ctx, el$, dropIndicator$, store }) {\n const emitter = mitt();\n provide(\"DragNodeEmitter\", emitter);\n const dragState = ref({\n showDropIndicator: false,\n draggingNode: null,\n dropNode: null,\n allowDrop: true,\n dropType: null\n });\n emitter.on(\"tree-node-drag-start\", ({ event, treeNode }) => {\n if (typeof props.allowDrag === \"function\" && !props.allowDrag(treeNode.node)) {\n event.preventDefault();\n return false;\n }\n event.dataTransfer.effectAllowed = \"move\";\n try {\n event.dataTransfer.setData(\"text/plain\", \"\");\n } catch (e) {\n }\n dragState.value.draggingNode = treeNode;\n ctx.emit(\"node-drag-start\", treeNode.node, event);\n });\n emitter.on(\"tree-node-drag-over\", ({ event, treeNode }) => {\n const dropNode = treeNode;\n const oldDropNode = dragState.value.dropNode;\n if (oldDropNode && oldDropNode !== dropNode) {\n removeClass(oldDropNode.$el, \"is-drop-inner\");\n }\n const draggingNode = dragState.value.draggingNode;\n if (!draggingNode || !dropNode)\n return;\n let dropPrev = true;\n let dropInner = true;\n let dropNext = true;\n let userAllowDropInner = true;\n if (typeof props.allowDrop === \"function\") {\n dropPrev = props.allowDrop(draggingNode.node, dropNode.node, \"prev\");\n userAllowDropInner = dropInner = props.allowDrop(draggingNode.node, dropNode.node, \"inner\");\n dropNext = props.allowDrop(draggingNode.node, dropNode.node, \"next\");\n }\n event.dataTransfer.dropEffect = dropInner ? \"move\" : \"none\";\n if ((dropPrev || dropInner || dropNext) && oldDropNode !== dropNode) {\n if (oldDropNode) {\n ctx.emit(\"node-drag-leave\", draggingNode.node, oldDropNode.node, event);\n }\n ctx.emit(\"node-drag-enter\", draggingNode.node, dropNode.node, event);\n }\n if (dropPrev || dropInner || dropNext) {\n dragState.value.dropNode = dropNode;\n }\n if (dropNode.node.nextSibling === draggingNode.node) {\n dropNext = false;\n }\n if (dropNode.node.previousSibling === draggingNode.node) {\n dropPrev = false;\n }\n if (dropNode.node.contains(draggingNode.node, false)) {\n dropInner = false;\n }\n if (draggingNode.node === dropNode.node || draggingNode.node.contains(dropNode.node)) {\n dropPrev = false;\n dropInner = false;\n dropNext = false;\n }\n const targetPosition = dropNode.$el.getBoundingClientRect();\n const treePosition = el$.value.getBoundingClientRect();\n let dropType;\n const prevPercent = dropPrev ? dropInner ? 0.25 : dropNext ? 0.45 : 1 : -1;\n const nextPercent = dropNext ? dropInner ? 0.75 : dropPrev ? 0.55 : 0 : 1;\n let indicatorTop = -9999;\n const distance = event.clientY - targetPosition.top;\n if (distance < targetPosition.height * prevPercent) {\n dropType = \"before\";\n } else if (distance > targetPosition.height * nextPercent) {\n dropType = \"after\";\n } else if (dropInner) {\n dropType = \"inner\";\n } else {\n dropType = \"none\";\n }\n const iconPosition = dropNode.$el.querySelector(\".el-tree-node__expand-icon\").getBoundingClientRect();\n const dropIndicator = dropIndicator$.value;\n if (dropType === \"before\") {\n indicatorTop = iconPosition.top - treePosition.top;\n } else if (dropType === \"after\") {\n indicatorTop = iconPosition.bottom - treePosition.top;\n }\n dropIndicator.style.top = indicatorTop + \"px\";\n dropIndicator.style.left = iconPosition.right - treePosition.left + \"px\";\n if (dropType === \"inner\") {\n addClass(dropNode.$el, \"is-drop-inner\");\n } else {\n removeClass(dropNode.$el, \"is-drop-inner\");\n }\n dragState.value.showDropIndicator = dropType === \"before\" || dropType === \"after\";\n dragState.value.allowDrop = dragState.value.showDropIndicator || userAllowDropInner;\n dragState.value.dropType = dropType;\n ctx.emit(\"node-drag-over\", draggingNode.node, dropNode.node, event);\n });\n emitter.on(\"tree-node-drag-end\", (event) => {\n const { draggingNode, dropType, dropNode } = dragState.value;\n event.preventDefault();\n event.dataTransfer.dropEffect = \"move\";\n if (draggingNode && dropNode) {\n const draggingNodeCopy = { data: draggingNode.node.data };\n if (dropType !== \"none\") {\n draggingNode.node.remove();\n }\n if (dropType === \"before\") {\n dropNode.node.parent.insertBefore(draggingNodeCopy, dropNode.node);\n } else if (dropType === \"after\") {\n dropNode.node.parent.insertAfter(draggingNodeCopy, dropNode.node);\n } else if (dropType === \"inner\") {\n dropNode.node.insertChild(draggingNodeCopy);\n }\n if (dropType !== \"none\") {\n store.value.registerNode(draggingNodeCopy);\n }\n removeClass(dropNode.$el, \"is-drop-inner\");\n ctx.emit(\"node-drag-end\", draggingNode.node, dropNode.node, dropType, event);\n if (dropType !== \"none\") {\n ctx.emit(\"node-drop\", draggingNode.node, dropNode.node, dropType, event);\n }\n }\n if (draggingNode && !dropNode) {\n ctx.emit(\"node-drag-end\", draggingNode.node, null, dropType, event);\n }\n dragState.value.showDropIndicator = false;\n dragState.value.draggingNode = null;\n dragState.value.dropNode = null;\n dragState.value.allowDrop = true;\n });\n return {\n dragState\n };\n}\nfunction useDragNodeEmitter() {\n const emitter = inject(\"DragNodeEmitter\");\n return {\n emitter\n };\n}\n\nvar script$1 = defineComponent({\n name: \"ElTreeNode\",\n components: {\n ElCollapseTransition,\n ElCheckbox,\n NodeContent: script\n },\n props: {\n node: {\n type: Node,\n default: () => ({})\n },\n props: {\n type: Object,\n default: () => ({})\n },\n accordion: Boolean,\n renderContent: Function,\n renderAfterExpand: Boolean,\n showCheckbox: {\n type: Boolean,\n default: false\n }\n },\n emits: [\"node-expand\"],\n setup(props, ctx) {\n const { broadcastExpanded } = useNodeExpandEventBroadcast(props);\n const tree = inject(\"RootTree\");\n const expanded = ref(false);\n const childNodeRendered = ref(false);\n const oldChecked = ref(null);\n const oldIndeterminate = ref(null);\n const node$ = ref(null);\n const { emitter } = useDragNodeEmitter();\n const instance = getCurrentInstance();\n provide(\"NodeInstance\", instance);\n if (!tree) {\n console.warn(\"Can not find node's tree.\");\n }\n if (props.node.expanded) {\n expanded.value = true;\n childNodeRendered.value = true;\n }\n const childrenKey = tree.props[\"children\"] || \"children\";\n watch(() => {\n const children = props.node.data[childrenKey];\n return children && [...children];\n }, () => {\n props.node.updateChildren();\n });\n watch(() => props.node.indeterminate, (val) => {\n handleSelectChange(props.node.checked, val);\n });\n watch(() => props.node.checked, (val) => {\n handleSelectChange(val, props.node.indeterminate);\n });\n watch(() => props.node.expanded, (val) => {\n nextTick(() => expanded.value = val);\n if (val) {\n childNodeRendered.value = true;\n }\n });\n const getNodeKey$1 = (node) => {\n return getNodeKey(tree.props.nodeKey, node.data);\n };\n const handleSelectChange = (checked, indeterminate) => {\n if (oldChecked.value !== checked || oldIndeterminate.value !== indeterminate) {\n tree.ctx.emit(\"check-change\", props.node.data, checked, indeterminate);\n }\n oldChecked.value = checked;\n oldIndeterminate.value = indeterminate;\n };\n const handleClick = () => {\n const store = tree.store.value;\n store.setCurrentNode(props.node);\n tree.ctx.emit(\"current-change\", store.currentNode ? store.currentNode.data : null, store.currentNode);\n tree.currentNode.value = props.node;\n if (tree.props.expandOnClickNode) {\n handleExpandIconClick();\n }\n if (tree.props.checkOnClickNode && !props.node.disabled) {\n handleCheckChange(null, {\n target: { checked: !props.node.checked }\n });\n }\n tree.ctx.emit(\"node-click\", props.node.data, props.node, instance);\n };\n const handleContextMenu = (event) => {\n if (tree.instance.vnode.props[\"onNodeContextmenu\"]) {\n event.stopPropagation();\n event.preventDefault();\n }\n tree.ctx.emit(\"node-contextmenu\", event, props.node.data, props.node, instance);\n };\n const handleExpandIconClick = () => {\n if (props.node.isLeaf)\n return;\n if (expanded.value) {\n tree.ctx.emit(\"node-collapse\", props.node.data, props.node, instance);\n props.node.collapse();\n } else {\n props.node.expand();\n ctx.emit(\"node-expand\", props.node.data, props.node, instance);\n }\n };\n const handleCheckChange = (value, ev) => {\n props.node.setChecked(ev.target.checked, !tree.props.checkStrictly);\n nextTick(() => {\n const store = tree.store.value;\n tree.ctx.emit(\"check\", props.node.data, {\n checkedNodes: store.getCheckedNodes(),\n checkedKeys: store.getCheckedKeys(),\n halfCheckedNodes: store.getHalfCheckedNodes(),\n halfCheckedKeys: store.getHalfCheckedKeys()\n });\n });\n };\n const handleChildNodeExpand = (nodeData, node, instance2) => {\n broadcastExpanded(node);\n tree.ctx.emit(\"node-expand\", nodeData, node, instance2);\n };\n const handleDragStart = (event) => {\n if (!tree.props.draggable)\n return;\n emitter.emit(\"tree-node-drag-start\", { event, treeNode: props });\n };\n const handleDragOver = (event) => {\n if (!tree.props.draggable)\n return;\n emitter.emit(\"tree-node-drag-over\", { event, treeNode: { $el: node$.value, node: props.node } });\n event.preventDefault();\n };\n const handleDrop = (event) => {\n event.preventDefault();\n };\n const handleDragEnd = (event) => {\n if (!tree.props.draggable)\n return;\n emitter.emit(\"tree-node-drag-end\", event);\n };\n return {\n node$,\n tree,\n expanded,\n childNodeRendered,\n oldChecked,\n oldIndeterminate,\n emitter,\n parent,\n getNodeKey: getNodeKey$1,\n handleSelectChange,\n handleClick,\n handleContextMenu,\n handleExpandIconClick,\n handleCheckChange,\n handleChildNodeExpand,\n handleDragStart,\n handleDragOver,\n handleDrop,\n handleDragEnd\n };\n }\n});\n\nconst _hoisted_1 = {\n key: 1,\n class: \"el-tree-node__loading-icon el-icon-loading\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_checkbox = resolveComponent(\"el-checkbox\");\n const _component_node_content = resolveComponent(\"node-content\");\n const _component_el_tree_node = resolveComponent(\"el-tree-node\");\n const _component_el_collapse_transition = resolveComponent(\"el-collapse-transition\");\n return withDirectives((openBlock(), createBlock(\"div\", {\n ref: \"node$\",\n class: [\"el-tree-node\", {\n \"is-expanded\": _ctx.expanded,\n \"is-current\": _ctx.node.isCurrent,\n \"is-hidden\": !_ctx.node.visible,\n \"is-focusable\": !_ctx.node.disabled,\n \"is-checked\": !_ctx.node.disabled && _ctx.node.checked\n }],\n role: \"treeitem\",\n tabindex: \"-1\",\n \"aria-expanded\": _ctx.expanded,\n \"aria-disabled\": _ctx.node.disabled,\n \"aria-checked\": _ctx.node.checked,\n draggable: _ctx.tree.props.draggable,\n \"data-key\": _ctx.getNodeKey(_ctx.node),\n onClick: _cache[3] || (_cache[3] = withModifiers((...args) => _ctx.handleClick && _ctx.handleClick(...args), [\"stop\"])),\n onContextmenu: _cache[4] || (_cache[4] = (...args) => _ctx.handleContextMenu && _ctx.handleContextMenu(...args)),\n onDragstart: _cache[5] || (_cache[5] = withModifiers((...args) => _ctx.handleDragStart && _ctx.handleDragStart(...args), [\"stop\"])),\n onDragover: _cache[6] || (_cache[6] = withModifiers((...args) => _ctx.handleDragOver && _ctx.handleDragOver(...args), [\"stop\"])),\n onDragend: _cache[7] || (_cache[7] = withModifiers((...args) => _ctx.handleDragEnd && _ctx.handleDragEnd(...args), [\"stop\"])),\n onDrop: _cache[8] || (_cache[8] = withModifiers((...args) => _ctx.handleDrop && _ctx.handleDrop(...args), [\"stop\"]))\n }, [\n createVNode(\"div\", {\n class: \"el-tree-node__content\",\n style: { \"padding-left\": (_ctx.node.level - 1) * _ctx.tree.props.indent + \"px\" }\n }, [\n createVNode(\"span\", {\n class: [\n {\n \"is-leaf\": _ctx.node.isLeaf,\n expanded: !_ctx.node.isLeaf && _ctx.expanded\n },\n \"el-tree-node__expand-icon\",\n _ctx.tree.props.iconClass ? _ctx.tree.props.iconClass : \"el-icon-caret-right\"\n ],\n onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.handleExpandIconClick && _ctx.handleExpandIconClick(...args), [\"stop\"]))\n }, null, 2),\n _ctx.showCheckbox ? (openBlock(), createBlock(_component_el_checkbox, {\n key: 0,\n \"model-value\": _ctx.node.checked,\n indeterminate: _ctx.node.indeterminate,\n disabled: !!_ctx.node.disabled,\n onClick: _cache[2] || (_cache[2] = withModifiers(() => {\n }, [\"stop\"])),\n onChange: _ctx.handleCheckChange\n }, null, 8, [\"model-value\", \"indeterminate\", \"disabled\", \"onChange\"])) : createCommentVNode(\"v-if\", true),\n _ctx.node.loading ? (openBlock(), createBlock(\"span\", _hoisted_1)) : createCommentVNode(\"v-if\", true),\n createVNode(_component_node_content, {\n node: _ctx.node,\n \"render-content\": _ctx.renderContent\n }, null, 8, [\"node\", \"render-content\"])\n ], 4),\n createVNode(_component_el_collapse_transition, null, {\n default: withCtx(() => [\n !_ctx.renderAfterExpand || _ctx.childNodeRendered ? withDirectives((openBlock(), createBlock(\"div\", {\n key: 0,\n class: \"el-tree-node__children\",\n role: \"group\",\n \"aria-expanded\": _ctx.expanded\n }, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.node.childNodes, (child) => {\n return openBlock(), createBlock(_component_el_tree_node, {\n key: _ctx.getNodeKey(child),\n \"render-content\": _ctx.renderContent,\n \"render-after-expand\": _ctx.renderAfterExpand,\n \"show-checkbox\": _ctx.showCheckbox,\n node: child,\n onNodeExpand: _ctx.handleChildNodeExpand\n }, null, 8, [\"render-content\", \"render-after-expand\", \"show-checkbox\", \"node\", \"onNodeExpand\"]);\n }), 128))\n ], 8, [\"aria-expanded\"])), [\n [vShow, _ctx.expanded]\n ]) : createCommentVNode(\"v-if\", true)\n ]),\n _: 1\n })\n ], 42, [\"aria-expanded\", \"aria-disabled\", \"aria-checked\", \"draggable\", \"data-key\"])), [\n [vShow, _ctx.node.visible]\n ]);\n}\n\nscript$1.render = render;\nscript$1.__file = \"packages/tree/src/tree-node.vue\";\n\nfunction useKeydown({ el$ }, store) {\n const treeItems = ref([]);\n const checkboxItems = ref([]);\n onMounted(() => {\n initTabIndex();\n on(el$.value, \"keydown\", handleKeydown);\n });\n onBeforeUnmount(() => {\n off(el$.value, \"keydown\", handleKeydown);\n });\n onUpdated(() => {\n treeItems.value = Array.from(el$.value.querySelectorAll(\"[role=treeitem]\"));\n checkboxItems.value = Array.from(el$.value.querySelectorAll(\"input[type=checkbox]\"));\n });\n watch(checkboxItems, (val) => {\n val.forEach((checkbox) => {\n checkbox.setAttribute(\"tabindex\", \"-1\");\n });\n });\n const handleKeydown = (ev) => {\n const currentItem = ev.target;\n if (currentItem.className.indexOf(\"el-tree-node\") === -1)\n return;\n const code = ev.code;\n treeItems.value = Array.from(el$.value.querySelectorAll(\".is-focusable[role=treeitem]\"));\n const currentIndex = treeItems.value.indexOf(currentItem);\n let nextIndex;\n if ([EVENT_CODE.up, EVENT_CODE.down].indexOf(code) > -1) {\n ev.preventDefault();\n if (code === EVENT_CODE.up) {\n nextIndex = currentIndex === -1 ? 0 : currentIndex !== 0 ? currentIndex - 1 : treeItems.value.length - 1;\n const startIndex = nextIndex;\n while (true) {\n if (store.value.getNode(treeItems.value[nextIndex].dataset.key).canFocus)\n break;\n nextIndex--;\n if (nextIndex === startIndex) {\n nextIndex = -1;\n break;\n }\n if (nextIndex < 0) {\n nextIndex = treeItems.value.length - 1;\n }\n }\n } else {\n nextIndex = currentIndex === -1 ? 0 : currentIndex < treeItems.value.length - 1 ? currentIndex + 1 : 0;\n const startIndex = nextIndex;\n while (true) {\n if (store.value.getNode(treeItems.value[nextIndex].dataset.key).canFocus)\n break;\n nextIndex++;\n if (nextIndex === startIndex) {\n nextIndex = -1;\n break;\n }\n if (nextIndex >= treeItems.value.length) {\n nextIndex = 0;\n }\n }\n }\n nextIndex !== -1 && treeItems.value[nextIndex].focus();\n }\n if ([EVENT_CODE.left, EVENT_CODE.right].indexOf(code) > -1) {\n ev.preventDefault();\n currentItem.click();\n }\n const hasInput = currentItem.querySelector('[type=\"checkbox\"]');\n if ([EVENT_CODE.enter, EVENT_CODE.space].indexOf(code) > -1 && hasInput) {\n ev.preventDefault();\n hasInput.click();\n }\n };\n const initTabIndex = () => {\n var _a;\n treeItems.value = Array.from(el$.value.querySelectorAll(\".is-focusable[role=treeitem]\"));\n checkboxItems.value = Array.from(el$.value.querySelectorAll(\"input[type=checkbox]\"));\n const checkedItem = el$.value.querySelectorAll(\".is-checked[role=treeitem]\");\n if (checkedItem.length) {\n checkedItem[0].setAttribute(\"tabindex\", \"0\");\n return;\n }\n (_a = treeItems.value[0]) == null ? void 0 : _a.setAttribute(\"tabindex\", \"0\");\n };\n}\n\nvar script$2 = defineComponent({\n name: \"ElTree\",\n components: { ElTreeNode: script$1 },\n props: {\n data: {\n type: Array\n },\n emptyText: {\n type: String\n },\n renderAfterExpand: {\n type: Boolean,\n default: true\n },\n nodeKey: String,\n checkStrictly: Boolean,\n defaultExpandAll: Boolean,\n expandOnClickNode: {\n type: Boolean,\n default: true\n },\n checkOnClickNode: Boolean,\n checkDescendants: {\n type: Boolean,\n default: false\n },\n autoExpandParent: {\n type: Boolean,\n default: true\n },\n defaultCheckedKeys: Array,\n defaultExpandedKeys: Array,\n currentNodeKey: [String, Number],\n renderContent: Function,\n showCheckbox: {\n type: Boolean,\n default: false\n },\n draggable: {\n type: Boolean,\n default: false\n },\n allowDrag: Function,\n allowDrop: Function,\n props: {\n type: Object,\n default() {\n return {\n children: \"children\",\n label: \"label\",\n disabled: \"disabled\"\n };\n }\n },\n lazy: {\n type: Boolean,\n default: false\n },\n highlightCurrent: Boolean,\n load: Function,\n filterNodeMethod: Function,\n accordion: Boolean,\n indent: {\n type: Number,\n default: 18\n },\n iconClass: String\n },\n emits: [\n \"check-change\",\n \"current-change\",\n \"node-click\",\n \"node-contextmenu\",\n \"node-collapse\",\n \"node-expand\",\n \"check\",\n \"node-drag-start\",\n \"node-drag-end\",\n \"node-drop\",\n \"node-drag-leave\",\n \"node-drag-enter\",\n \"node-drag-over\"\n ],\n setup(props, ctx) {\n const { t } = useLocaleInject();\n const store = ref(new TreeStore({\n key: props.nodeKey,\n data: props.data,\n lazy: props.lazy,\n props: props.props,\n load: props.load,\n currentNodeKey: props.currentNodeKey,\n checkStrictly: props.checkStrictly,\n checkDescendants: props.checkDescendants,\n defaultCheckedKeys: props.defaultCheckedKeys,\n defaultExpandedKeys: props.defaultExpandedKeys,\n autoExpandParent: props.autoExpandParent,\n defaultExpandAll: props.defaultExpandAll,\n filterNodeMethod: props.filterNodeMethod\n }));\n store.value.initialize();\n const root = ref(store.value.root);\n const currentNode = ref(null);\n const el$ = ref(null);\n const dropIndicator$ = ref(null);\n const { broadcastExpanded } = useNodeExpandEventBroadcast(props);\n const { dragState } = useDragNodeHandler({\n props,\n ctx,\n el$,\n dropIndicator$,\n store\n });\n useKeydown({ el$ }, store);\n const isEmpty = computed(() => {\n const { childNodes } = root.value;\n return !childNodes || childNodes.length === 0 || childNodes.every(({ visible }) => !visible);\n });\n watch(() => props.defaultCheckedKeys, (newVal) => {\n store.value.setDefaultCheckedKey(newVal);\n });\n watch(() => props.defaultExpandedKeys, (newVal) => {\n store.value.defaultExpandedKeys = newVal;\n store.value.setDefaultExpandedKeys(newVal);\n });\n watch(() => props.data, (newVal) => {\n store.value.setData(newVal);\n }, { deep: true });\n watch(() => props.checkStrictly, (newVal) => {\n store.value.checkStrictly = newVal;\n });\n const filter = (value) => {\n if (!props.filterNodeMethod)\n throw new Error(\"[Tree] filterNodeMethod is required when filter\");\n store.value.filter(value);\n };\n const getNodeKey$1 = (node) => {\n return getNodeKey(props.nodeKey, node.data);\n };\n const getNodePath = (data) => {\n if (!props.nodeKey)\n throw new Error(\"[Tree] nodeKey is required in getNodePath\");\n const node = store.value.getNode(data);\n if (!node)\n return [];\n const path = [node.data];\n let parent = node.parent;\n while (parent && parent !== root.value) {\n path.push(parent.data);\n parent = parent.parent;\n }\n return path.reverse();\n };\n const getCheckedNodes = (leafOnly, includeHalfChecked) => {\n return store.value.getCheckedNodes(leafOnly, includeHalfChecked);\n };\n const getCheckedKeys = (leafOnly) => {\n return store.value.getCheckedKeys(leafOnly);\n };\n const getCurrentNode = () => {\n const currentNode2 = store.value.getCurrentNode();\n return currentNode2 ? currentNode2.data : null;\n };\n const getCurrentKey = () => {\n if (!props.nodeKey)\n throw new Error(\"[Tree] nodeKey is required in getCurrentKey\");\n const currentNode2 = getCurrentNode();\n return currentNode2 ? currentNode2[props.nodeKey] : null;\n };\n const setCheckedNodes = (nodes, leafOnly) => {\n if (!props.nodeKey)\n throw new Error(\"[Tree] nodeKey is required in setCheckedNodes\");\n store.value.setCheckedNodes(nodes, leafOnly);\n };\n const setCheckedKeys = (keys, leafOnly) => {\n if (!props.nodeKey)\n throw new Error(\"[Tree] nodeKey is required in setCheckedKeys\");\n store.value.setCheckedKeys(keys, leafOnly);\n };\n const setChecked = (data, checked, deep) => {\n store.value.setChecked(data, checked, deep);\n };\n const getHalfCheckedNodes = () => {\n return store.value.getHalfCheckedNodes();\n };\n const getHalfCheckedKeys = () => {\n return store.value.getHalfCheckedKeys();\n };\n const setCurrentNode = (node, shouldAutoExpandParent = true) => {\n if (!props.nodeKey)\n throw new Error(\"[Tree] nodeKey is required in setCurrentNode\");\n store.value.setUserCurrentNode(node, shouldAutoExpandParent);\n };\n const setCurrentKey = (key, shouldAutoExpandParent = true) => {\n if (!props.nodeKey)\n throw new Error(\"[Tree] nodeKey is required in setCurrentKey\");\n store.value.setCurrentNodeKey(key, shouldAutoExpandParent);\n };\n const getNode = (data) => {\n return store.value.getNode(data);\n };\n const remove = (data) => {\n store.value.remove(data);\n };\n const append = (data, parentNode) => {\n store.value.append(data, parentNode);\n };\n const insertBefore = (data, refNode) => {\n store.value.insertBefore(data, refNode);\n };\n const insertAfter = (data, refNode) => {\n store.value.insertAfter(data, refNode);\n };\n const handleNodeExpand = (nodeData, node, instance) => {\n broadcastExpanded(node);\n ctx.emit(\"node-expand\", nodeData, node, instance);\n };\n const updateKeyChildren = (key, data) => {\n if (!props.nodeKey)\n throw new Error(\"[Tree] nodeKey is required in updateKeyChild\");\n store.value.updateChildren(key, data);\n };\n provide(\"RootTree\", {\n ctx,\n props,\n store,\n root,\n currentNode,\n instance: getCurrentInstance()\n });\n return {\n store,\n root,\n currentNode,\n dragState,\n el$,\n dropIndicator$,\n isEmpty,\n filter,\n getNodeKey: getNodeKey$1,\n getNodePath,\n getCheckedNodes,\n getCheckedKeys,\n getCurrentNode,\n getCurrentKey,\n setCheckedNodes,\n setCheckedKeys,\n setChecked,\n getHalfCheckedNodes,\n getHalfCheckedKeys,\n setCurrentNode,\n setCurrentKey,\n t,\n getNode,\n remove,\n append,\n insertBefore,\n insertAfter,\n handleNodeExpand,\n updateKeyChildren\n };\n }\n});\n\nconst _hoisted_1$1 = {\n key: 0,\n class: \"el-tree__empty-block\"\n};\nconst _hoisted_2 = { class: \"el-tree__empty-text\" };\nconst _hoisted_3 = {\n ref: \"dropIndicator$\",\n class: \"el-tree__drop-indicator\"\n};\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_tree_node = resolveComponent(\"el-tree-node\");\n return openBlock(), createBlock(\"div\", {\n ref: \"el$\",\n class: [\"el-tree\", {\n \"el-tree--highlight-current\": _ctx.highlightCurrent,\n \"is-dragging\": !!_ctx.dragState.draggingNode,\n \"is-drop-not-allow\": !_ctx.dragState.allowDrop,\n \"is-drop-inner\": _ctx.dragState.dropType === \"inner\"\n }],\n role: \"tree\"\n }, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.root.childNodes, (child) => {\n return openBlock(), createBlock(_component_el_tree_node, {\n key: _ctx.getNodeKey(child),\n node: child,\n props: _ctx.props,\n accordion: _ctx.accordion,\n \"render-after-expand\": _ctx.renderAfterExpand,\n \"show-checkbox\": _ctx.showCheckbox,\n \"render-content\": _ctx.renderContent,\n onNodeExpand: _ctx.handleNodeExpand\n }, null, 8, [\"node\", \"props\", \"accordion\", \"render-after-expand\", \"show-checkbox\", \"render-content\", \"onNodeExpand\"]);\n }), 128)),\n _ctx.isEmpty ? (openBlock(), createBlock(\"div\", _hoisted_1$1, [\n createVNode(\"span\", _hoisted_2, toDisplayString(_ctx.emptyText || _ctx.t(\"el.tree.emptyText\")), 1)\n ])) : createCommentVNode(\"v-if\", true),\n withDirectives(createVNode(\"div\", _hoisted_3, null, 512), [\n [vShow, _ctx.dragState.showDropIndicator]\n ])\n ], 2);\n}\n\nscript$2.render = render$1;\nscript$2.__file = \"packages/tree/src/tree.vue\";\n\nscript$2.install = (app) => {\n app.component(script$2.name, script$2);\n};\nconst _Tree = script$2;\n\nexport default _Tree;\n","import { defineComponent, ref, resolveComponent, openBlock, createBlock, TransitionGroup, withCtx, Fragment, renderList, withKeys, renderSlot, createCommentVNode, createVNode, createTextVNode, toDisplayString, inject, withModifiers, watch, computed, provide, getCurrentInstance, onBeforeUnmount, h } from 'vue';\nimport { elFormKey } from '../el-form';\nimport { useLocaleInject } from '../hooks';\nimport ElProgress from '../el-progress';\nimport cloneDeep from 'lodash/cloneDeep';\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst NOOP = () => { };\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\r\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\n\nfunction getError(action, option, xhr) {\n let msg;\n if (xhr.response) {\n msg = `${xhr.response.error || xhr.response}`;\n } else if (xhr.responseText) {\n msg = `${xhr.responseText}`;\n } else {\n msg = `fail to post ${action} ${xhr.status}`;\n }\n const err = new Error(msg);\n err.status = xhr.status;\n err.method = \"post\";\n err.url = action;\n return err;\n}\nfunction getBody(xhr) {\n const text = xhr.responseText || xhr.response;\n if (!text) {\n return text;\n }\n try {\n return JSON.parse(text);\n } catch (e) {\n return text;\n }\n}\nfunction upload(option) {\n if (typeof XMLHttpRequest === \"undefined\") {\n return;\n }\n const xhr = new XMLHttpRequest();\n const action = option.action;\n if (xhr.upload) {\n xhr.upload.onprogress = function progress(e) {\n if (e.total > 0) {\n e.percent = e.loaded / e.total * 100;\n }\n option.onProgress(e);\n };\n }\n const formData = new FormData();\n if (option.data) {\n Object.keys(option.data).forEach((key) => {\n formData.append(key, option.data[key]);\n });\n }\n formData.append(option.filename, option.file, option.file.name);\n xhr.onerror = function error() {\n option.onError(getError(action, option, xhr));\n };\n xhr.onload = function onload() {\n if (xhr.status < 200 || xhr.status >= 300) {\n return option.onError(getError(action, option, xhr));\n }\n option.onSuccess(getBody(xhr));\n };\n xhr.open(\"post\", action, true);\n if (option.withCredentials && \"withCredentials\" in xhr) {\n xhr.withCredentials = true;\n }\n const headers = option.headers || {};\n for (const item in headers) {\n if (hasOwn(headers, item) && headers[item] !== null) {\n xhr.setRequestHeader(item, headers[item]);\n }\n }\n xhr.send(formData);\n return xhr;\n}\n\nvar script = defineComponent({\n name: \"ElUploadList\",\n components: { ElProgress },\n props: {\n files: {\n type: Array,\n default: () => []\n },\n disabled: {\n type: Boolean,\n default: false\n },\n handlePreview: {\n type: Function,\n default: () => NOOP\n },\n listType: {\n type: String,\n default: \"text\"\n }\n },\n emits: [\"remove\"],\n setup(props, { emit }) {\n const { t } = useLocaleInject();\n const parsePercentage = (val) => {\n return parseInt(val, 10);\n };\n const handleClick = (file) => {\n props.handlePreview(file);\n };\n const onFileClicked = (e) => {\n e.target.focus();\n };\n const handleRemove = (e, file) => {\n emit(\"remove\", file);\n };\n return {\n focusing: ref(false),\n parsePercentage,\n handleClick,\n handleRemove,\n onFileClicked,\n t\n };\n }\n});\n\nconst _hoisted_1 = /* @__PURE__ */ createVNode(\"i\", { class: \"el-icon-document\" }, null, -1);\nconst _hoisted_2 = { class: \"el-upload-list__item-status-label\" };\nconst _hoisted_3 = {\n key: 2,\n class: \"el-icon-close-tip\"\n};\nconst _hoisted_4 = {\n key: 4,\n class: \"el-upload-list__item-actions\"\n};\nconst _hoisted_5 = /* @__PURE__ */ createVNode(\"i\", { class: \"el-icon-zoom-in\" }, null, -1);\nconst _hoisted_6 = /* @__PURE__ */ createVNode(\"i\", { class: \"el-icon-delete\" }, null, -1);\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_progress = resolveComponent(\"el-progress\");\n return openBlock(), createBlock(TransitionGroup, {\n tag: \"ul\",\n class: [\n \"el-upload-list\",\n \"el-upload-list--\" + _ctx.listType,\n { \"is-disabled\": _ctx.disabled }\n ],\n name: \"el-list\"\n }, {\n default: withCtx(() => [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.files, (file) => {\n return openBlock(), createBlock(\"li\", {\n key: file.uid || file,\n class: [\"el-upload-list__item\", \"is-\" + file.status, _ctx.focusing ? \"focusing\" : \"\"],\n tabindex: \"0\",\n onKeydown: withKeys(($event) => !_ctx.disabled && _ctx.handleRemove($event, file), [\"delete\"]),\n onFocus: _cache[1] || (_cache[1] = ($event) => _ctx.focusing = true),\n onBlur: _cache[2] || (_cache[2] = ($event) => _ctx.focusing = false),\n onClick: _cache[3] || (_cache[3] = (...args) => _ctx.onFileClicked && _ctx.onFileClicked(...args))\n }, [\n renderSlot(_ctx.$slots, \"default\", { file }, () => [\n file.status !== \"uploading\" && [\"picture-card\", \"picture\"].includes(_ctx.listType) ? (openBlock(), createBlock(\"img\", {\n key: 0,\n class: \"el-upload-list__item-thumbnail\",\n src: file.url,\n alt: \"\"\n }, null, 8, [\"src\"])) : createCommentVNode(\"v-if\", true),\n createVNode(\"a\", {\n class: \"el-upload-list__item-name\",\n onClick: ($event) => _ctx.handleClick(file)\n }, [\n _hoisted_1,\n createTextVNode(toDisplayString(file.name), 1)\n ], 8, [\"onClick\"]),\n createVNode(\"label\", _hoisted_2, [\n createVNode(\"i\", {\n class: {\n \"el-icon-upload-success\": true,\n \"el-icon-circle-check\": _ctx.listType === \"text\",\n \"el-icon-check\": [\"picture-card\", \"picture\"].includes(_ctx.listType)\n }\n }, null, 2)\n ]),\n !_ctx.disabled ? (openBlock(), createBlock(\"i\", {\n key: 1,\n class: \"el-icon-close\",\n onClick: ($event) => _ctx.handleRemove($event, file)\n }, null, 8, [\"onClick\"])) : createCommentVNode(\"v-if\", true),\n createCommentVNode(\" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn\"),\n createCommentVNode(\" This is a bug which needs to be fixed \"),\n createCommentVNode(\" TODO: Fix the incorrect navigation interaction \"),\n !_ctx.disabled ? (openBlock(), createBlock(\"i\", _hoisted_3, toDisplayString(_ctx.t(\"el.upload.deleteTip\")), 1)) : createCommentVNode(\"v-if\", true),\n file.status === \"uploading\" ? (openBlock(), createBlock(_component_el_progress, {\n key: 3,\n type: _ctx.listType === \"picture-card\" ? \"circle\" : \"line\",\n \"stroke-width\": _ctx.listType === \"picture-card\" ? 6 : 2,\n percentage: _ctx.parsePercentage(file.percentage)\n }, null, 8, [\"type\", \"stroke-width\", \"percentage\"])) : createCommentVNode(\"v-if\", true),\n _ctx.listType === \"picture-card\" ? (openBlock(), createBlock(\"span\", _hoisted_4, [\n createVNode(\"span\", {\n class: \"el-upload-list__item-preview\",\n onClick: ($event) => _ctx.handlePreview(file)\n }, [\n _hoisted_5\n ], 8, [\"onClick\"]),\n !_ctx.disabled ? (openBlock(), createBlock(\"span\", {\n key: 0,\n class: \"el-upload-list__item-delete\",\n onClick: ($event) => _ctx.handleRemove($event, file)\n }, [\n _hoisted_6\n ], 8, [\"onClick\"])) : createCommentVNode(\"v-if\", true)\n ])) : createCommentVNode(\"v-if\", true)\n ])\n ], 42, [\"onKeydown\"]);\n }), 128))\n ]),\n _: 3\n }, 8, [\"class\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/upload/src/upload-list.vue\";\n\nvar script$1 = defineComponent({\n name: \"ElUploadDrag\",\n props: {\n disabled: {\n type: Boolean,\n default: false\n }\n },\n emits: [\"file\"],\n setup(props, { emit }) {\n const uploader = inject(\"uploader\", {});\n const dragover = ref(false);\n function onDrop(e) {\n if (props.disabled || !uploader)\n return;\n const accept = uploader.accept;\n dragover.value = false;\n if (!accept) {\n emit(\"file\", e.dataTransfer.files);\n return;\n }\n emit(\"file\", Array.from(e.dataTransfer.files).filter((file) => {\n const { type, name } = file;\n const extension = name.indexOf(\".\") > -1 ? `.${name.split(\".\").pop()}` : \"\";\n const baseType = type.replace(/\\/.*$/, \"\");\n return accept.split(\",\").map((type2) => type2.trim()).filter((type2) => type2).some((acceptedType) => {\n if (acceptedType.startsWith(\".\")) {\n return extension === acceptedType;\n }\n if (/\\/\\*$/.test(acceptedType)) {\n return baseType === acceptedType.replace(/\\/\\*$/, \"\");\n }\n if (/^[^\\/]+\\/[^\\/]+$/.test(acceptedType)) {\n return type === acceptedType;\n }\n return false;\n });\n }));\n }\n function onDragover() {\n if (!props.disabled)\n dragover.value = true;\n }\n return {\n dragover,\n onDrop,\n onDragover\n };\n }\n});\n\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", {\n class: {\n \"el-upload-dragger\": true,\n \"is-dragover\": _ctx.dragover\n },\n onDrop: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.onDrop && _ctx.onDrop(...args), [\"prevent\"])),\n onDragover: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.onDragover && _ctx.onDragover(...args), [\"prevent\"])),\n onDragleave: _cache[3] || (_cache[3] = withModifiers(($event) => _ctx.dragover = false, [\"prevent\"]))\n }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 34);\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"packages/upload/src/upload-dragger.vue\";\n\nvar script$2 = defineComponent({\n components: {\n UploadDragger: script$1\n },\n props: {\n type: {\n type: String,\n default: \"\"\n },\n action: {\n type: String,\n required: true\n },\n name: {\n type: String,\n default: \"file\"\n },\n data: {\n type: Object,\n default: () => null\n },\n headers: {\n type: Object,\n default: () => null\n },\n withCredentials: {\n type: Boolean,\n default: false\n },\n multiple: {\n type: Boolean,\n default: null\n },\n accept: {\n type: String,\n default: \"\"\n },\n onStart: {\n type: Function,\n default: NOOP\n },\n onProgress: {\n type: Function,\n default: NOOP\n },\n onSuccess: {\n type: Function,\n default: NOOP\n },\n onError: {\n type: Function,\n default: NOOP\n },\n beforeUpload: {\n type: Function,\n default: NOOP\n },\n drag: {\n type: Boolean,\n default: false\n },\n onPreview: {\n type: Function,\n default: NOOP\n },\n onRemove: {\n type: Function,\n default: NOOP\n },\n fileList: {\n type: Array,\n default: () => []\n },\n autoUpload: {\n type: Boolean,\n default: true\n },\n listType: {\n type: String,\n default: \"text\"\n },\n httpRequest: {\n type: Function,\n default: () => upload\n },\n disabled: Boolean,\n limit: {\n type: Number,\n default: null\n },\n onExceed: {\n type: Function,\n default: NOOP\n }\n },\n setup(props) {\n const reqs = ref({});\n const mouseover = ref(false);\n const inputRef = ref(null);\n function uploadFiles(files) {\n if (props.limit && props.fileList.length + files.length > props.limit) {\n props.onExceed(files, props.fileList);\n return;\n }\n let postFiles = Array.from(files);\n if (!props.multiple) {\n postFiles = postFiles.slice(0, 1);\n }\n if (postFiles.length === 0) {\n return;\n }\n postFiles.forEach((rawFile) => {\n props.onStart(rawFile);\n if (props.autoUpload)\n upload(rawFile);\n });\n }\n function upload(rawFile) {\n inputRef.value.value = null;\n if (!props.beforeUpload) {\n return post(rawFile);\n }\n const before = props.beforeUpload(rawFile);\n if (before instanceof Promise) {\n before.then((processedFile) => {\n const fileType = Object.prototype.toString.call(processedFile);\n if (fileType === \"[object File]\" || fileType === \"[object Blob]\") {\n if (fileType === \"[object Blob]\") {\n processedFile = new File([processedFile], rawFile.name, {\n type: rawFile.type\n });\n }\n for (const p in rawFile) {\n if (hasOwn(rawFile, p)) {\n processedFile[p] = rawFile[p];\n }\n }\n post(processedFile);\n } else {\n post(rawFile);\n }\n }).catch(() => {\n props.onRemove(null, rawFile);\n });\n } else if (before !== false) {\n post(rawFile);\n } else {\n props.onRemove(null, rawFile);\n }\n }\n function abort(file) {\n const _reqs = reqs.value;\n if (file) {\n let uid = file;\n if (file.uid)\n uid = file.uid;\n if (_reqs[uid]) {\n _reqs[uid].abort();\n }\n } else {\n Object.keys(_reqs).forEach((uid) => {\n if (_reqs[uid])\n _reqs[uid].abort();\n delete _reqs[uid];\n });\n }\n }\n function post(rawFile) {\n const { uid } = rawFile;\n const options = {\n headers: props.headers,\n withCredentials: props.withCredentials,\n file: rawFile,\n data: props.data,\n filename: props.name,\n action: props.action,\n onProgress: (e) => {\n props.onProgress(e, rawFile);\n },\n onSuccess: (res) => {\n props.onSuccess(res, rawFile);\n delete reqs.value[uid];\n },\n onError: (err) => {\n props.onError(err, rawFile);\n delete reqs.value[uid];\n }\n };\n const req = props.httpRequest(options);\n reqs.value[uid] = req;\n if (req instanceof Promise) {\n req.then(options.onSuccess, options.onError);\n }\n }\n function handleChange(e) {\n const files = e.target.files;\n if (!files)\n return;\n uploadFiles(files);\n }\n function handleClick() {\n if (!props.disabled) {\n inputRef.value.value = null;\n inputRef.value.click();\n }\n }\n function handleKeydown() {\n handleClick();\n }\n return {\n reqs,\n mouseover,\n inputRef,\n abort,\n post,\n handleChange,\n handleClick,\n handleKeydown,\n upload,\n uploadFiles\n };\n }\n});\n\nfunction render$2(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_upload_dragger = resolveComponent(\"upload-dragger\");\n return openBlock(), createBlock(\"div\", {\n class: [\"el-upload\", `el-upload--${_ctx.listType}`],\n tabindex: \"0\",\n onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),\n onKeydown: _cache[3] || (_cache[3] = withKeys(withModifiers((...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args), [\"self\"]), [\"enter\", \"space\"]))\n }, [\n _ctx.drag ? (openBlock(), createBlock(_component_upload_dragger, {\n key: 0,\n disabled: _ctx.disabled,\n onFile: _ctx.uploadFiles\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"disabled\", \"onFile\"])) : renderSlot(_ctx.$slots, \"default\", { key: 1 }),\n createVNode(\"input\", {\n ref: \"inputRef\",\n class: \"el-upload__input\",\n type: \"file\",\n name: _ctx.name,\n multiple: _ctx.multiple,\n accept: _ctx.accept,\n onChange: _cache[1] || (_cache[1] = (...args) => _ctx.handleChange && _ctx.handleChange(...args))\n }, null, 40, [\"name\", \"multiple\", \"accept\"])\n ], 34);\n}\n\nscript$2.render = render$2;\nscript$2.__file = \"packages/upload/src/upload.vue\";\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction getFile(rawFile, uploadFiles) {\n return uploadFiles.find((file) => file.uid === rawFile.uid);\n}\nfunction genUid(seed) {\n return Date.now() + seed;\n}\nvar useHandlers = (props) => {\n const uploadFiles = ref([]);\n const uploadRef = ref(null);\n let tempIndex = 1;\n function abort(file) {\n uploadRef.value.abort(file);\n }\n function clearFiles() {\n uploadFiles.value = [];\n }\n function handleError(err, rawFile) {\n const file = getFile(rawFile, uploadFiles.value);\n file.status = \"fail\";\n uploadFiles.value.splice(uploadFiles.value.indexOf(file), 1);\n props.onError(err, file, uploadFiles.value);\n props.onChange(file, uploadFiles.value);\n }\n function handleProgress(ev, rawFile) {\n const file = getFile(rawFile, uploadFiles.value);\n props.onProgress(ev, file, uploadFiles.value);\n file.status = \"uploading\";\n file.percentage = ev.percent || 0;\n }\n function handleSuccess(res, rawFile) {\n const file = getFile(rawFile, uploadFiles.value);\n if (file) {\n file.status = \"success\";\n file.response = res;\n props.onSuccess(res, file, uploadFiles.value);\n props.onChange(file, uploadFiles.value);\n }\n }\n function handleStart(rawFile) {\n const uid = genUid(tempIndex++);\n rawFile.uid = uid;\n const file = {\n name: rawFile.name,\n percentage: 0,\n status: \"ready\",\n size: rawFile.size,\n raw: rawFile,\n uid\n };\n if (props.listType === \"picture-card\" || props.listType === \"picture\") {\n try {\n file.url = URL.createObjectURL(rawFile);\n } catch (err) {\n console.error(\"[Element Error][Upload]\", err);\n props.onError(err, file, uploadFiles.value);\n }\n }\n uploadFiles.value.push(file);\n props.onChange(file, uploadFiles.value);\n }\n function handleRemove(file, raw) {\n if (raw) {\n file = getFile(raw, uploadFiles.value);\n }\n const doRemove = () => {\n abort(file);\n const fileList = uploadFiles.value;\n fileList.splice(fileList.indexOf(file), 1);\n props.onRemove(file, fileList);\n };\n if (!props.beforeRemove) {\n doRemove();\n } else if (typeof props.beforeRemove === \"function\") {\n const before = props.beforeRemove(file, uploadFiles.value);\n if (before instanceof Promise) {\n before.then(() => {\n doRemove();\n }).catch(NOOP);\n } else if (before !== false) {\n doRemove();\n }\n }\n }\n function submit() {\n uploadFiles.value.filter((file) => file.status === \"ready\").forEach((file) => {\n uploadRef.value.upload(file.raw);\n });\n }\n watch(() => props.listType, (val) => {\n if (val === \"picture-card\" || val === \"picture\") {\n uploadFiles.value = uploadFiles.value.map((file) => {\n if (!file.url && file.raw) {\n try {\n file.url = URL.createObjectURL(file.raw);\n } catch (err) {\n props.onError(err, file, uploadFiles.value);\n }\n }\n return file;\n });\n }\n });\n watch(() => props.fileList, (fileList) => {\n uploadFiles.value = fileList.map((file) => {\n const cloneFile = cloneDeep(file);\n return __spreadProps(__spreadValues({}, cloneFile), {\n uid: file.uid || genUid(tempIndex++),\n status: file.status || \"success\"\n });\n });\n }, {\n immediate: true,\n deep: true\n });\n return {\n abort,\n clearFiles,\n handleError,\n handleProgress,\n handleStart,\n handleSuccess,\n handleRemove,\n submit,\n uploadFiles,\n uploadRef\n };\n};\n\nvar script$3 = defineComponent({\n name: \"ElUpload\",\n components: {\n Upload: script$2,\n UploadList: script\n },\n props: {\n action: {\n type: String,\n required: true\n },\n headers: {\n type: Object,\n default: () => ({})\n },\n data: {\n type: Object,\n default: () => ({})\n },\n multiple: {\n type: Boolean,\n default: false\n },\n name: {\n type: String,\n default: \"file\"\n },\n drag: {\n type: Boolean,\n default: false\n },\n withCredentials: Boolean,\n showFileList: {\n type: Boolean,\n default: true\n },\n accept: {\n type: String,\n default: \"\"\n },\n type: {\n type: String,\n default: \"select\"\n },\n beforeUpload: {\n type: Function,\n default: NOOP\n },\n beforeRemove: {\n type: Function,\n default: NOOP\n },\n onRemove: {\n type: Function,\n default: NOOP\n },\n onChange: {\n type: Function,\n default: NOOP\n },\n onPreview: {\n type: Function,\n default: NOOP\n },\n onSuccess: {\n type: Function,\n default: NOOP\n },\n onProgress: {\n type: Function,\n default: NOOP\n },\n onError: {\n type: Function,\n default: NOOP\n },\n fileList: {\n type: Array,\n default: () => {\n return [];\n }\n },\n autoUpload: {\n type: Boolean,\n default: true\n },\n listType: {\n type: String,\n default: \"text\"\n },\n httpRequest: {\n type: Function,\n default: upload\n },\n disabled: Boolean,\n limit: {\n type: Number,\n default: null\n },\n onExceed: {\n type: Function,\n default: () => NOOP\n }\n },\n setup(props) {\n const elForm = inject(elFormKey, {});\n const uploadDisabled = computed(() => {\n return props.disabled || elForm.disabled;\n });\n const {\n abort,\n clearFiles,\n handleError,\n handleProgress,\n handleStart,\n handleSuccess,\n handleRemove,\n submit,\n uploadRef,\n uploadFiles\n } = useHandlers(props);\n provide(\"uploader\", getCurrentInstance());\n onBeforeUnmount(() => {\n uploadFiles.value.forEach((file) => {\n if (file.url && file.url.indexOf(\"blob:\") === 0) {\n URL.revokeObjectURL(file.url);\n }\n });\n });\n return {\n abort,\n dragOver: ref(false),\n draging: ref(false),\n handleError,\n handleProgress,\n handleRemove,\n handleStart,\n handleSuccess,\n uploadDisabled,\n uploadFiles,\n uploadRef,\n submit,\n clearFiles\n };\n },\n render() {\n var _a, _b;\n let uploadList;\n if (this.showFileList) {\n uploadList = h(script, {\n disabled: this.uploadDisabled,\n listType: this.listType,\n files: this.uploadFiles,\n onRemove: this.handleRemove,\n handlePreview: this.onPreview\n }, this.$slots.file ? {\n default: (props) => {\n return this.$slots.file({\n file: props.file\n });\n }\n } : null);\n } else {\n uploadList = null;\n }\n const uploadData = {\n type: this.type,\n drag: this.drag,\n action: this.action,\n multiple: this.multiple,\n \"before-upload\": this.beforeUpload,\n \"with-credentials\": this.withCredentials,\n headers: this.headers,\n name: this.name,\n data: this.data,\n accept: this.accept,\n fileList: this.uploadFiles,\n autoUpload: this.autoUpload,\n listType: this.listType,\n disabled: this.uploadDisabled,\n limit: this.limit,\n \"on-exceed\": this.onExceed,\n \"on-start\": this.handleStart,\n \"on-progress\": this.handleProgress,\n \"on-success\": this.handleSuccess,\n \"on-error\": this.handleError,\n \"on-preview\": this.onPreview,\n \"on-remove\": this.handleRemove,\n \"http-request\": this.httpRequest,\n ref: \"uploadRef\"\n };\n const trigger = this.$slots.trigger || this.$slots.default;\n const uploadComponent = h(script$2, uploadData, {\n default: () => trigger == null ? void 0 : trigger()\n });\n return h(\"div\", [\n this.listType === \"picture-card\" ? uploadList : null,\n this.$slots.trigger ? [uploadComponent, this.$slots.default()] : uploadComponent,\n (_b = (_a = this.$slots).tip) == null ? void 0 : _b.call(_a),\n this.listType !== \"picture-card\" ? uploadList : null\n ]);\n }\n});\n\nscript$3.__file = \"packages/upload/src/index.vue\";\n\nscript$3.install = (app) => {\n app.component(script$3.name, script$3);\n};\nconst _Upload = script$3;\n\nexport default _Upload;\n","import { defineComponent, computed, openBlock, createBlock, renderSlot, isVNode, ref, watch, createVNode, createTextVNode } from 'vue';\nimport { isFragment, PatchFlags, isValidElementNode } from '../utils/vnode';\nimport { isNumber, isString, isArray } from '../utils/util';\nimport { isValidComponentSize } from '../utils/validators';\n\nvar script = defineComponent({\n props: {\n prefixCls: {\n type: String,\n default: \"el-space\"\n }\n },\n setup(props) {\n return {\n classes: computed(() => `${props.prefixCls}__item`)\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", { class: _ctx.classes }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 2);\n}\n\nscript.render = render;\nscript.__file = \"packages/space/src/item.vue\";\n\nconst SizeMap = {\n mini: 4,\n small: 8,\n medium: 12,\n large: 16\n};\nconst defaultProps = {\n direction: {\n type: String,\n default: \"horizontal\"\n },\n class: {\n type: [String, Object, Array],\n default: \"\"\n },\n style: {\n type: [String, Array, Object]\n },\n alignment: {\n type: String,\n default: \"center\"\n },\n prefixCls: {\n type: String\n },\n spacer: {\n type: [Object, String, Number],\n default: null,\n validator: (val) => {\n return isVNode(val) || isNumber(val) || isString(val);\n }\n },\n wrap: {\n type: Boolean,\n default: false\n },\n size: {\n type: [String, Array, Number],\n validator: (val) => {\n return isValidComponentSize(val) || isNumber(val) || isArray(val);\n }\n }\n};\nfunction useSpace(props) {\n const classes = computed(() => [\n \"el-space\",\n `el-space--${props.direction}`,\n props.class\n ]);\n const horizontalSize = ref(0);\n const verticalSize = ref(0);\n watch(() => [props.size, props.wrap, props.direction], ([size = \"small\", wrap, dir]) => {\n if (isArray(size)) {\n const [h = 0, v = 0] = size;\n horizontalSize.value = h;\n verticalSize.value = v;\n } else {\n let val;\n if (isNumber(size)) {\n val = size;\n } else {\n val = SizeMap[size] || SizeMap.small;\n }\n if (wrap && dir === \"horizontal\") {\n horizontalSize.value = verticalSize.value = val;\n } else {\n if (dir === \"horizontal\") {\n horizontalSize.value = val;\n verticalSize.value = 0;\n } else {\n verticalSize.value = val;\n horizontalSize.value = 0;\n }\n }\n }\n }, { immediate: true });\n const containerStyle = computed(() => {\n const wrapKls = props.wrap ? { flexWrap: \"wrap\", marginBottom: `-${verticalSize.value}px` } : null;\n const alignment = {\n alignItems: props.alignment\n };\n return [wrapKls, alignment, props.style];\n });\n const itemStyle = computed(() => {\n return {\n paddingBottom: `${verticalSize.value}px`,\n marginRight: `${horizontalSize.value}px`\n };\n });\n return {\n classes,\n containerStyle,\n itemStyle\n };\n}\n\nvar Space = defineComponent({\n name: \"ElSpace\",\n props: defaultProps,\n setup(props) {\n return useSpace(props);\n },\n render(ctx) {\n const {\n classes,\n $slots,\n containerStyle,\n itemStyle,\n spacer,\n prefixCls,\n direction\n } = ctx;\n const children = renderSlot($slots, \"default\", { key: 0 }, () => []);\n if (children.children.length === 0)\n return null;\n if (isArray(children.children)) {\n let extractedChildren = [];\n children.children.forEach((child, loopKey) => {\n if (isFragment(child)) {\n if (isArray(child.children)) {\n child.children.forEach((nested, key) => {\n extractedChildren.push(createVNode(script, {\n style: itemStyle,\n prefixCls,\n key: `nested-${key}`\n }, {\n default: () => [nested]\n }, PatchFlags.PROPS | PatchFlags.STYLE, [\"style\", \"prefixCls\"]));\n });\n }\n } else if (isValidElementNode(child)) {\n extractedChildren.push(createVNode(script, {\n style: itemStyle,\n prefixCls,\n key: `LoopKey${loopKey}`\n }, {\n default: () => [child]\n }, PatchFlags.PROPS | PatchFlags.STYLE, [\"style\", \"prefixCls\"]));\n }\n });\n if (spacer) {\n const len = extractedChildren.length - 1;\n extractedChildren = extractedChildren.reduce((acc, child, idx) => {\n return idx === len ? [...acc, child] : [\n ...acc,\n child,\n createVNode(\"span\", { style: [itemStyle, direction === \"vertical\" ? \"width: 100%\" : null], key: idx }, [\n isVNode(spacer) ? spacer : createTextVNode(spacer, PatchFlags.TEXT)\n ], PatchFlags.STYLE)\n ];\n }, []);\n }\n return createVNode(\"div\", {\n class: classes,\n style: containerStyle\n }, extractedChildren, PatchFlags.STYLE | PatchFlags.CLASS);\n }\n return children.children;\n }\n});\n\nconst _Space = Space;\n_Space.install = (app) => {\n app.component(_Space.name, _Space);\n};\n\nexport default _Space;\n","import { defineComponent, openBlock, createBlock, createVNode, resolveComponent, createCommentVNode } from 'vue';\n\nvar script = defineComponent({\n name: \"ImgPlaceholder\"\n});\n\nconst _hoisted_1 = {\n viewBox: \"0 0 1024 1024\",\n xmlns: \"http://www.w3.org/2000/svg\"\n};\nconst _hoisted_2 = /* @__PURE__ */ createVNode(\"path\", { d: \"M64 896V128h896v768H64z m64-128l192-192 116.352 116.352L640 448l256 307.2V192H128v576z m224-480a96 96 0 1 1-0.064 192.064A96 96 0 0 1 352 288z\" }, null, -1);\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"svg\", _hoisted_1, [\n _hoisted_2\n ]);\n}\n\nscript.render = render;\nscript.__file = \"packages/skeleton-item/src/img-placeholder.vue\";\n\nvar script$1 = defineComponent({\n name: \"ElSkeletonItem\",\n components: {\n [script.name]: script\n },\n props: {\n variant: {\n type: String,\n default: \"text\"\n }\n }\n});\n\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_img_placeholder = resolveComponent(\"img-placeholder\");\n return openBlock(), createBlock(\"div\", {\n class: [\"el-skeleton__item\", `el-skeleton__${_ctx.variant}`]\n }, [\n _ctx.variant === \"image\" ? (openBlock(), createBlock(_component_img_placeholder, { key: 0 })) : createCommentVNode(\"v-if\", true)\n ], 2);\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"packages/skeleton-item/src/index.vue\";\n\nscript$1.install = (app) => {\n app.component(script$1.name, script$1);\n};\nconst _SkeletonItem = script$1;\n\nexport default _SkeletonItem;\n","import { defineComponent, computed, resolveComponent, openBlock, createBlock, mergeProps, Fragment, renderList, renderSlot, createVNode, createCommentVNode } from 'vue';\nimport SkeletonItem from '../el-skeleton-item';\nimport { useThrottleRender } from '../hooks';\n\nvar script = defineComponent({\n name: \"ElSkeleton\",\n components: {\n [SkeletonItem.name]: SkeletonItem\n },\n props: {\n animated: {\n type: Boolean,\n default: false\n },\n count: {\n type: Number,\n default: 1\n },\n rows: {\n type: Number,\n default: 3\n },\n loading: {\n type: Boolean,\n default: true\n },\n throttle: {\n type: Number\n }\n },\n setup(props) {\n const innerLoading = computed(() => {\n return props.loading;\n });\n const uiLoading = useThrottleRender(innerLoading, props.throttle);\n return {\n uiLoading\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_skeleton_item = resolveComponent(\"el-skeleton-item\");\n return _ctx.uiLoading ? (openBlock(), createBlock(\"div\", mergeProps({\n key: 0,\n class: [\"el-skeleton\", _ctx.animated ? \"is-animated\" : \"\"]\n }, _ctx.$attrs), [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.count, (i) => {\n return openBlock(), createBlock(Fragment, { key: i }, [\n _ctx.loading ? renderSlot(_ctx.$slots, \"template\", { key: 0 }, () => [\n createVNode(_component_el_skeleton_item, {\n class: \"is-first\",\n variant: \"p\"\n }),\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.rows, (item) => {\n return openBlock(), createBlock(_component_el_skeleton_item, {\n key: item,\n class: {\n \"el-skeleton__paragraph\": true,\n \"is-last\": item === _ctx.rows && _ctx.rows > 1\n },\n variant: \"p\"\n }, null, 8, [\"class\"]);\n }), 128))\n ]) : createCommentVNode(\"v-if\", true)\n ], 64);\n }), 128))\n ], 16)) : renderSlot(_ctx.$slots, \"default\", mergeProps({ key: 1 }, _ctx.$attrs));\n}\n\nscript.render = render;\nscript.__file = \"packages/skeleton/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _Skeleton = script;\n\nexport default _Skeleton;\n","import { defineComponent, openBlock, createBlock, renderSlot } from 'vue';\n\nvar script = defineComponent({\n name: \"ElCheckTag\",\n props: {\n checked: Boolean\n },\n emits: [\"change\"],\n setup(props, { emit }) {\n const onChange = () => {\n emit(\"change\", !props.checked);\n };\n return {\n onChange\n };\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"span\", {\n class: {\n \"el-check-tag\": true,\n \"is-checked\": _ctx.checked\n },\n onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onChange && _ctx.onChange(...args))\n }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 2);\n}\n\nscript.render = render;\nscript.__file = \"packages/check-tag/src/index.vue\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n};\nconst _CheckTag = script;\n\nexport default _CheckTag;\n","import { defineComponent, inject, h, resolveComponent, openBlock, createBlock, Fragment, createVNode, renderList, provide, computed, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from 'vue';\nimport { isValidComponentSize } from '../utils/validators';\nimport { addUnit, useGlobalConfig } from '../utils/util';\nimport { getNormalizedProps } from '../utils/vnode';\n\nconst elDescriptionsKey = \"elDescriptions\";\n\nvar DescriptionsCell = defineComponent({\n name: \"ElDescriptionsCell\",\n props: {\n cell: {\n type: Object\n },\n tag: {\n type: String\n },\n type: {\n type: String\n }\n },\n setup() {\n const descriptions = inject(elDescriptionsKey, {});\n return {\n descriptions\n };\n },\n render() {\n var _a, _b, _c, _d, _e, _f;\n const item = getNormalizedProps(this.cell);\n const label = ((_c = (_b = (_a = this.cell) == null ? void 0 : _a.children) == null ? void 0 : _b.label) == null ? void 0 : _c.call(_b)) || item.label;\n const content = (_f = (_e = (_d = this.cell) == null ? void 0 : _d.children) == null ? void 0 : _e.default) == null ? void 0 : _f.call(_e);\n const span = item.span;\n const align = item.align ? `is-${item.align}` : \"\";\n const labelAlign = item.labelAlign ? `is-${item.labelAlign}` : align;\n const className = item.className;\n const labelClassName = item.labelClassName;\n const style = {\n width: addUnit(item.width),\n minWidth: addUnit(item.minWidth)\n };\n switch (this.type) {\n case \"label\":\n return h(this.tag, {\n style,\n class: [\"el-descriptions__label\", { \"is-bordered-label\": this.descriptions.border }, labelAlign, labelClassName],\n colSpan: this.descriptions.direction === \"vertical\" ? span : 1\n }, label);\n case \"content\":\n return h(this.tag, {\n style,\n class: [\"el-descriptions__content\", align, className],\n colSpan: this.descriptions.direction === \"vertical\" ? span : span * 2 - 1\n }, content);\n default:\n return h(\"td\", {\n style,\n class: [align],\n colSpan: span\n }, [\n h(\"span\", {\n class: [\"el-descriptions__label\", labelClassName]\n }, label),\n h(\"span\", {\n class: [\"el-descriptions__content\", className]\n }, content)\n ]);\n }\n }\n});\n\nvar script = defineComponent({\n name: \"ElDescriptionsRow\",\n components: {\n [DescriptionsCell.name]: DescriptionsCell\n },\n props: {\n row: {\n type: Array\n }\n },\n setup() {\n const descriptions = inject(elDescriptionsKey, {});\n return {\n descriptions\n };\n }\n});\n\nconst _hoisted_1 = { key: 1 };\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_descriptions_cell = resolveComponent(\"el-descriptions-cell\");\n return _ctx.descriptions.direction === \"vertical\" ? (openBlock(), createBlock(Fragment, { key: 0 }, [\n createVNode(\"tr\", null, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.row, (cell, index) => {\n return openBlock(), createBlock(_component_el_descriptions_cell, {\n key: `tr1-${index}`,\n cell,\n tag: \"th\",\n type: \"label\"\n }, null, 8, [\"cell\"]);\n }), 128))\n ]),\n createVNode(\"tr\", null, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.row, (cell, index) => {\n return openBlock(), createBlock(_component_el_descriptions_cell, {\n key: `tr2-${index}`,\n cell,\n tag: \"td\",\n type: \"content\"\n }, null, 8, [\"cell\"]);\n }), 128))\n ])\n ], 64)) : (openBlock(), createBlock(\"tr\", _hoisted_1, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.row, (cell, index) => {\n return openBlock(), createBlock(Fragment, {\n key: `tr3-${index}`\n }, [\n _ctx.descriptions.border ? (openBlock(), createBlock(Fragment, { key: 0 }, [\n createVNode(_component_el_descriptions_cell, {\n cell,\n tag: \"td\",\n type: \"label\"\n }, null, 8, [\"cell\"]),\n createVNode(_component_el_descriptions_cell, {\n cell,\n tag: \"td\",\n type: \"content\"\n }, null, 8, [\"cell\"])\n ], 64)) : (openBlock(), createBlock(_component_el_descriptions_cell, {\n key: 1,\n cell,\n tag: \"td\",\n type: \"both\"\n }, null, 8, [\"cell\"]))\n ], 64);\n }), 128))\n ]));\n}\n\nscript.render = render;\nscript.__file = \"packages/descriptions/src/descriptions-row.vue\";\n\nvar script$1 = defineComponent({\n name: \"ElDescriptions\",\n components: {\n [script.name]: script\n },\n props: {\n border: {\n type: Boolean,\n default: false\n },\n column: {\n type: Number,\n default: 3\n },\n direction: {\n type: String,\n default: \"horizontal\"\n },\n size: {\n type: String,\n validator: isValidComponentSize\n },\n title: {\n type: String,\n default: \"\"\n },\n extra: {\n type: String,\n default: \"\"\n }\n },\n setup(props, { slots }) {\n provide(elDescriptionsKey, props);\n const $ELEMENT = useGlobalConfig();\n const descriptionsSize = computed(() => {\n return props.size || $ELEMENT.size;\n });\n const flattedChildren = (children) => {\n const temp = Array.isArray(children) ? children : [children];\n const res = [];\n temp.forEach((child) => {\n if (Array.isArray(child.children)) {\n res.push(...flattedChildren(child.children));\n } else {\n res.push(child);\n }\n });\n return res;\n };\n const filledNode = (node, span, count, isLast = false) => {\n if (!node.props) {\n node.props = {};\n }\n if (span > count) {\n node.props.span = count;\n }\n if (isLast) {\n node.props.span = span;\n }\n return node;\n };\n const getRows = () => {\n var _a;\n const children = flattedChildren((_a = slots.default) == null ? void 0 : _a.call(slots)).filter((node) => {\n var _a2;\n return ((_a2 = node == null ? void 0 : node.type) == null ? void 0 : _a2.name) === \"ElDescriptionsItem\";\n });\n const rows = [];\n let temp = [];\n let count = props.column;\n let totalSpan = 0;\n children.forEach((node, index) => {\n var _a2;\n let span = ((_a2 = node.props) == null ? void 0 : _a2.span) || 1;\n if (index < children.length - 1) {\n totalSpan += span > count ? count : span;\n }\n if (index === children.length - 1) {\n const lastSpan = props.column - totalSpan % props.column;\n temp.push(filledNode(node, lastSpan, count, true));\n rows.push(temp);\n return;\n }\n if (span < count) {\n count -= span;\n temp.push(node);\n } else {\n temp.push(filledNode(node, span, count));\n rows.push(temp);\n count = props.column;\n temp = [];\n }\n });\n return rows;\n };\n return {\n descriptionsSize,\n getRows\n };\n }\n});\n\nconst _hoisted_1$1 = { class: \"el-descriptions\" };\nconst _hoisted_2 = {\n key: 0,\n class: \"el-descriptions__header\"\n};\nconst _hoisted_3 = { class: \"el-descriptions__title\" };\nconst _hoisted_4 = { class: \"el-descriptions__extra\" };\nconst _hoisted_5 = { class: \"el-descriptions__body\" };\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_descriptions_row = resolveComponent(\"el-descriptions-row\");\n return openBlock(), createBlock(\"div\", _hoisted_1$1, [\n _ctx.title || _ctx.extra || _ctx.$slots.title || _ctx.$slots.extra ? (openBlock(), createBlock(\"div\", _hoisted_2, [\n createVNode(\"div\", _hoisted_3, [\n renderSlot(_ctx.$slots, \"title\", {}, () => [\n createTextVNode(toDisplayString(_ctx.title), 1)\n ])\n ]),\n createVNode(\"div\", _hoisted_4, [\n renderSlot(_ctx.$slots, \"extra\", {}, () => [\n createTextVNode(toDisplayString(_ctx.extra), 1)\n ])\n ])\n ])) : createCommentVNode(\"v-if\", true),\n createVNode(\"div\", _hoisted_5, [\n createVNode(\"table\", {\n class: [{ \"is-bordered\": _ctx.border }, _ctx.descriptionsSize ? `el-descriptions--${_ctx.descriptionsSize}` : \"\"]\n }, [\n createVNode(\"tbody\", null, [\n (openBlock(true), createBlock(Fragment, null, renderList(_ctx.getRows(), (row, index) => {\n return openBlock(), createBlock(_component_el_descriptions_row, {\n key: index,\n row\n }, null, 8, [\"row\"]);\n }), 128))\n ])\n ], 2)\n ])\n ]);\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"packages/descriptions/src/index.vue\";\n\nscript$1.install = (app) => {\n app.component(script$1.name, script$1);\n};\nconst _Descriptions = script$1;\n\nexport default _Descriptions;\n","import { defineComponent } from 'vue';\n\nvar DescriptionsItem = defineComponent({\n name: \"ElDescriptionsItem\",\n props: {\n label: {\n type: String,\n default: \"\"\n },\n span: {\n type: Number,\n default: 1\n },\n width: {\n type: [String, Number],\n default: \"\"\n },\n minWidth: {\n type: [String, Number],\n default: \"\"\n },\n align: {\n type: String,\n default: \"left\"\n },\n labelAlign: {\n type: String,\n default: \"\"\n },\n className: {\n type: String,\n default: \"\"\n },\n labelClassName: {\n type: String,\n default: \"\"\n }\n }\n});\n\nDescriptionsItem.install = (app) => {\n app.component(DescriptionsItem.name, DescriptionsItem);\n};\nconst _DescriptionsItem = DescriptionsItem;\n\nexport default _DescriptionsItem;\n","import { defineComponent, openBlock, createBlock, createVNode, computed, renderSlot, resolveDynamicComponent, toDisplayString, createCommentVNode } from 'vue';\n\nvar script = defineComponent({\n name: \"IconSuccess\"\n});\n\nconst _hoisted_1 = {\n viewBox: \"0 0 48 48\",\n xmlns: \"http://www.w3.org/2000/svg\"\n};\nconst _hoisted_2 = /* @__PURE__ */ createVNode(\"path\", { d: \"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M34.5548098,16.4485711 C33.9612228,15.8504763 32.9988282,15.8504763 32.4052412,16.4485711 L32.4052412,16.4485711 L21.413757,27.5805811 L21.413757,27.5805811 L21.4034642,27.590855 C21.0097542,27.9781674 20.3766105,27.9729811 19.9892981,27.5792711 L19.9892981,27.5792711 L15.5947588,23.1121428 C15.0011718,22.514048 14.0387772,22.514048 13.4451902,23.1121428 C12.8516033,23.7102376 12.8516033,24.6799409 13.4451902,25.2780357 L13.4451902,25.2780357 L19.6260786,31.5514289 C20.2196656,32.1495237 21.1820602,32.1495237 21.7756472,31.5514289 L21.7756472,31.5514289 L34.5548098,18.614464 C35.1483967,18.0163692 35.1483967,17.0466659 34.5548098,16.4485711 Z\" }, null, -1);\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"svg\", _hoisted_1, [\n _hoisted_2\n ]);\n}\n\nscript.render = render;\nscript.__file = \"packages/result/src/icon-success.vue\";\n\nvar script$1 = defineComponent({\n name: \"IconError\"\n});\n\nconst _hoisted_1$1 = {\n viewBox: \"0 0 48 48\",\n xmlns: \"http://www.w3.org/2000/svg\"\n};\nconst _hoisted_2$1 = /* @__PURE__ */ createVNode(\"path\", { d: \"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M32.57818,15.42182 C32.0157534,14.8593933 31.1038797,14.8593933 30.541453,15.42182 L30.541453,15.42182 L24.0006789,21.9625941 L17.458547,15.42182 C16.8961203,14.8593933 15.9842466,14.8593933 15.42182,15.42182 C14.8593933,15.9842466 14.8593933,16.8961203 15.42182,17.458547 L15.42182,17.458547 L21.9639519,23.9993211 L15.42182,30.541453 C14.8593933,31.1038797 14.8593933,32.0157534 15.42182,32.57818 C15.9842466,33.1406067 16.8961203,33.1406067 17.458547,32.57818 L17.458547,32.57818 L24.0006789,26.0360481 L30.541453,32.57818 C31.1038797,33.1406067 32.0157534,33.1406067 32.57818,32.57818 C33.1406067,32.0157534 33.1406067,31.1038797 32.57818,30.541453 L32.57818,30.541453 L26.0374059,23.9993211 L32.57818,17.458547 C33.1406067,16.8961203 33.1406067,15.9842466 32.57818,15.42182 Z\" }, null, -1);\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"svg\", _hoisted_1$1, [\n _hoisted_2$1\n ]);\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"packages/result/src/icon-error.vue\";\n\nvar script$2 = defineComponent({\n name: \"IconWarning\"\n});\n\nconst _hoisted_1$2 = {\n viewBox: \"0 0 48 48\",\n xmlns: \"http://www.w3.org/2000/svg\"\n};\nconst _hoisted_2$2 = /* @__PURE__ */ createVNode(\"path\", { d: \"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M24,31 C22.8954305,31 22,31.8954305 22,33 C22,34.1045695 22.8954305,35 24,35 C25.1045695,35 26,34.1045695 26,33 C26,31.8954305 25.1045695,31 24,31 Z M24,14 C23.1715729,14 22.5,14.6715729 22.5,15.5 L22.5,15.5 L22.5,27.5 C22.5,28.3284271 23.1715729,29 24,29 C24.8284271,29 25.5,28.3284271 25.5,27.5 L25.5,27.5 L25.5,15.5 C25.5,14.6715729 24.8284271,14 24,14 Z\" }, null, -1);\nfunction render$2(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"svg\", _hoisted_1$2, [\n _hoisted_2$2\n ]);\n}\n\nscript$2.render = render$2;\nscript$2.__file = \"packages/result/src/icon-warning.vue\";\n\nvar script$3 = defineComponent({\n name: \"IconInfo\"\n});\n\nconst _hoisted_1$3 = {\n viewBox: \"0 0 48 48\",\n xmlns: \"http://www.w3.org/2000/svg\"\n};\nconst _hoisted_2$3 = /* @__PURE__ */ createVNode(\"path\", { d: \"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M24,19 L21,19 C20.1715729,19 19.5,19.6715729 19.5,20.5 C19.5,21.3284271 20.1715729,22 21,22 L21,22 L22.5,22 L22.5,31 L21,31 C20.1715729,31 19.5,31.6715729 19.5,32.5 C19.5,33.3284271 20.1715729,34 21,34 L21,34 L27,34 C27.8284271,34 28.5,33.3284271 28.5,32.5 C28.5,31.6715729 27.8284271,31 27,31 L27,31 L25.5,31 L25.5,20.5 C25.5,19.6715729 24.8284271,19 24,19 L24,19 Z M24,13 C22.8954305,13 22,13.8954305 22,15 C22,16.1045695 22.8954305,17 24,17 C25.1045695,17 26,16.1045695 26,15 C26,13.8954305 25.1045695,13 24,13 Z\" }, null, -1);\nfunction render$3(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"svg\", _hoisted_1$3, [\n _hoisted_2$3\n ]);\n}\n\nscript$3.render = render$3;\nscript$3.__file = \"packages/result/src/icon-info.vue\";\n\nconst IconMap = {\n success: \"icon-success\",\n warning: \"icon-warning\",\n error: \"icon-error\",\n info: \"icon-info\"\n};\nvar script$4 = defineComponent({\n name: \"ElResult\",\n components: {\n [script.name]: script,\n [script$1.name]: script$1,\n [script$2.name]: script$2,\n [script$3.name]: script$3\n },\n props: {\n title: {\n type: String,\n default: \"\"\n },\n subTitle: {\n type: String,\n default: \"\"\n },\n icon: {\n type: String,\n default: \"info\"\n }\n },\n setup(props) {\n const iconElement = computed(() => {\n const icon = props.icon;\n return icon && IconMap[icon] ? IconMap[icon] : \"icon-info\";\n });\n return {\n iconElement\n };\n }\n});\n\nconst _hoisted_1$4 = { class: \"el-result\" };\nconst _hoisted_2$4 = { class: \"el-result__icon\" };\nconst _hoisted_3 = {\n key: 0,\n class: \"el-result__title\"\n};\nconst _hoisted_4 = {\n key: 1,\n class: \"el-result__subtitle\"\n};\nconst _hoisted_5 = {\n key: 2,\n class: \"el-result__extra\"\n};\nfunction render$4(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"div\", _hoisted_1$4, [\n createVNode(\"div\", _hoisted_2$4, [\n renderSlot(_ctx.$slots, \"icon\", {}, () => [\n (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconElement), { class: _ctx.iconElement }, null, 8, [\"class\"]))\n ])\n ]),\n _ctx.title || _ctx.$slots.title ? (openBlock(), createBlock(\"div\", _hoisted_3, [\n renderSlot(_ctx.$slots, \"title\", {}, () => [\n createVNode(\"p\", null, toDisplayString(_ctx.title), 1)\n ])\n ])) : createCommentVNode(\"v-if\", true),\n _ctx.subTitle || _ctx.$slots.subTitle ? (openBlock(), createBlock(\"div\", _hoisted_4, [\n renderSlot(_ctx.$slots, \"subTitle\", {}, () => [\n createVNode(\"p\", null, toDisplayString(_ctx.subTitle), 1)\n ])\n ])) : createCommentVNode(\"v-if\", true),\n _ctx.$slots.extra ? (openBlock(), createBlock(\"div\", _hoisted_5, [\n renderSlot(_ctx.$slots, \"extra\")\n ])) : createCommentVNode(\"v-if\", true)\n ]);\n}\n\nscript$4.render = render$4;\nscript$4.__file = \"packages/result/src/index.vue\";\n\nscript$4.install = (app) => {\n app.component(script$4.name, script$4);\n};\nconst _Result = script$4;\n\nexport default _Result;\n","import isServer from './isServer';\n\nlet rAF = (fn) => setTimeout(fn, 16);\r\nlet cAF = (handle) => clearTimeout(handle);\r\nif (!isServer) {\r\n rAF = (fn) => window.requestAnimationFrame(fn);\r\n cAF = (handle) => window.cancelAnimationFrame(handle);\r\n}\n\nexport { cAF, rAF };\n","import { isNumber, $, isString } from '../utils/util';\nimport throwError from '../utils/error';\nimport { defineComponent, ref, reactive, computed, watch, onMounted, onBeforeUnmount, h, withModifiers, getCurrentInstance, onUpdated, resolveDynamicComponent, nextTick } from 'vue';\nimport memo from 'lodash/memoize';\nimport isServer from '../utils/isServer';\nimport { cAF, rAF } from '../utils/raf';\nimport { on, off } from '../utils/dom';\nimport getScrollBarWidth from '../utils/scrollbar-width';\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst NOOP = () => { };\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\r\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\r\nconst isFunction = (val) => typeof val === 'function';\r\nconst isObject = (val) => val !== null && typeof val === 'object';\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nconst DEFAULT_DYNAMIC_LIST_ITEM_SIZE = 50;\nconst ITEM_RENDER_EVT = \"item-rendered\";\nconst SCROLL_EVT = \"scroll\";\nconst FORWARD = \"forward\";\nconst BACKWARD = \"backward\";\nconst AUTO_ALIGNMENT = \"auto\";\nconst SMART_ALIGNMENT = \"smart\";\nconst START_ALIGNMENT = \"start\";\nconst CENTERED_ALIGNMENT = \"center\";\nconst END_ALIGNMENT = \"end\";\nconst HORIZONTAL = \"horizontal\";\nconst VERTICAL = \"vertical\";\nconst LTR = \"ltr\";\nconst RTL = \"rtl\";\nconst RTL_OFFSET_NAG = \"negative\";\nconst RTL_OFFSET_POS_ASC = \"positive-ascending\";\nconst RTL_OFFSET_POS_DESC = \"positive-descending\";\nconst DefaultListProps = {\n cache: {\n type: Number,\n default: 2\n },\n className: {\n type: String,\n default: \"\"\n },\n containerElement: {\n type: [String, Object],\n default: \"div\"\n },\n data: {\n type: [Array],\n default: () => []\n },\n direction: {\n type: String,\n default: \"ltr\",\n validator: (val) => {\n return val === LTR || val === RTL;\n }\n },\n estimatedItemSize: {\n type: [Number]\n },\n height: {\n type: [String, Number],\n required: true\n },\n layout: {\n type: String,\n default: VERTICAL\n },\n initScrollOffset: {\n type: Number,\n default: 0\n },\n innerElement: {\n type: [String, Object],\n default: \"div\"\n },\n total: {\n type: Number,\n required: true\n },\n itemSize: {\n type: [Number, Function],\n required: true\n },\n style: {\n type: [Object, String, Array],\n default: () => ({})\n },\n useIsScrolling: {\n type: Boolean,\n default: false\n },\n width: {\n type: [Number, String],\n required: true\n }\n};\nconst DefaultGridProps = {\n className: DefaultListProps.className,\n columnCache: DefaultListProps.cache,\n columnWidth: DefaultListProps.itemSize,\n containerElement: DefaultListProps.containerElement,\n data: DefaultListProps.data,\n direction: DefaultListProps.direction,\n estimatedColumnWidth: DefaultListProps.estimatedItemSize,\n estimatedRowHeight: DefaultListProps.estimatedItemSize,\n height: __spreadProps(__spreadValues({}, DefaultListProps.height), {\n validator: (val) => isNumber(val)\n }),\n initScrollLeft: DefaultListProps.initScrollOffset,\n initScrollTop: DefaultListProps.initScrollOffset,\n innerElement: DefaultListProps.innerElement,\n rowCache: DefaultListProps.cache,\n rowHeight: DefaultListProps.itemSize,\n style: DefaultListProps.style,\n useIsScrolling: DefaultListProps.useIsScrolling,\n width: __spreadProps(__spreadValues({}, DefaultListProps.width), {\n validator: (val) => {\n return isNumber(val);\n }\n }),\n totalColumn: DefaultListProps.total,\n totalRow: DefaultListProps.total\n};\nconst DefaultScrollBarProps = {\n layout: DefaultListProps.layout,\n total: Number,\n ratio: Number,\n clientSize: Number,\n scrollFrom: Number,\n visible: Boolean\n};\nconst SCROLLBAR_MIN_SIZE = 20;\n\nconst getScrollDir = (prev, cur) => prev < cur ? FORWARD : BACKWARD;\nconst isHorizontal = (dir) => dir === LTR || dir === RTL || dir === HORIZONTAL;\nconst isRTL = (dir) => dir === RTL;\nlet cachedRTLResult = null;\nfunction getRTLOffsetType(recalculate = false) {\n if (cachedRTLResult === null || recalculate) {\n const outerDiv = document.createElement(\"div\");\n const outerStyle = outerDiv.style;\n outerStyle.width = \"50px\";\n outerStyle.height = \"50px\";\n outerStyle.overflow = \"scroll\";\n outerStyle.direction = \"rtl\";\n const innerDiv = document.createElement(\"div\");\n const innerStyle = innerDiv.style;\n innerStyle.width = \"100px\";\n innerStyle.height = \"100px\";\n outerDiv.appendChild(innerDiv);\n document.body.appendChild(outerDiv);\n if (outerDiv.scrollLeft > 0) {\n cachedRTLResult = RTL_OFFSET_POS_DESC;\n } else {\n outerDiv.scrollLeft = 1;\n if (outerDiv.scrollLeft === 0) {\n cachedRTLResult = RTL_OFFSET_NAG;\n } else {\n cachedRTLResult = RTL_OFFSET_POS_ASC;\n }\n }\n document.body.removeChild(outerDiv);\n return cachedRTLResult;\n }\n return cachedRTLResult;\n}\nfunction renderThumbStyle({ move, size, bar }, layout) {\n const style = {};\n const translate = `translate${bar.axis}(${move}px)`;\n style[bar.size] = size;\n style.transform = translate;\n style.msTransform = translate;\n style.webkitTransform = translate;\n if (layout === \"horizontal\") {\n style.height = \"100%\";\n } else {\n style.width = \"100%\";\n }\n return style;\n}\nconst isFF = typeof navigator !== \"undefined\" && isObject(navigator) && /Firefox/i.test(navigator.userAgent);\n\nconst LayoutKeys = {\n [HORIZONTAL]: \"deltaX\",\n [VERTICAL]: \"deltaY\"\n};\nconst useWheel = ({\n atEndEdge,\n atStartEdge,\n layout\n}, onWheelDelta) => {\n let frameHandle = null;\n let offset = 0;\n const hasReachedEdge = (offset2) => {\n const edgeReached = offset2 < 0 && atStartEdge.value || offset2 > 0 && atEndEdge.value;\n return edgeReached;\n };\n const onWheel = (e) => {\n cAF(frameHandle);\n const newOffset = e[LayoutKeys[layout.value]];\n if (hasReachedEdge(offset) && hasReachedEdge(offset + newOffset))\n return;\n offset += newOffset;\n if (!isFF) {\n e.preventDefault();\n }\n frameHandle = rAF(() => {\n onWheelDelta(offset);\n offset = 0;\n });\n };\n return {\n hasReachedEdge,\n onWheel\n };\n};\n\nconst BAR_MAP = {\n vertical: {\n offset: \"offsetHeight\",\n scroll: \"scrollTop\",\n scrollSize: \"scrollHeight\",\n size: \"height\",\n key: \"vertical\",\n axis: \"Y\",\n client: \"clientY\",\n direction: \"top\"\n },\n horizontal: {\n offset: \"offsetWidth\",\n scroll: \"scrollLeft\",\n scrollSize: \"scrollWidth\",\n size: \"width\",\n key: \"horizontal\",\n axis: \"X\",\n client: \"clientX\",\n direction: \"left\"\n }\n};\n\nconst ScrollBar = defineComponent({\n name: \"ElVirtualScrollBar\",\n props: DefaultScrollBarProps,\n emits: [\"scroll\", \"start-move\", \"stop-move\"],\n setup(props, { emit }) {\n const trackRef = ref(null);\n const thumbRef = ref(null);\n let frameHandle = null;\n let onselectstartStore = null;\n const state = reactive({\n isDragging: false,\n traveled: 0\n });\n const bar = computed(() => BAR_MAP[props.layout]);\n const trackStyle = computed(() => ({\n display: props.visible ? null : \"none\",\n position: \"absolute\",\n width: HORIZONTAL === props.layout ? \"100%\" : \"6px\",\n height: HORIZONTAL === props.layout ? \"6px\" : \"100%\",\n right: \"2px\",\n bottom: \"2px\",\n borderRadius: \"4px\"\n }));\n const thumbSize = computed(() => {\n if (props.ratio >= 100) {\n return Number.POSITIVE_INFINITY;\n }\n if (props.ratio >= 50) {\n return props.ratio * props.clientSize / 100;\n }\n const SCROLLBAR_MAX_SIZE = props.clientSize / 3;\n return Math.floor(Math.min(Math.max(props.ratio * props.clientSize, SCROLLBAR_MIN_SIZE), SCROLLBAR_MAX_SIZE));\n });\n const thumbStyle = computed(() => {\n if (!Number.isFinite(thumbSize.value)) {\n return {\n display: \"none\"\n };\n }\n const thumb = `${thumbSize.value}px`;\n const style = renderThumbStyle({\n bar: bar.value,\n size: thumb,\n move: state.traveled\n }, props.layout);\n return style;\n });\n const totalSteps = computed(() => Math.floor(props.clientSize - thumbSize.value - 4));\n const attachEvents = () => {\n on(window, \"mousemove\", onMouseMove);\n on(window, \"mouseup\", onMouseUp);\n const thumbEl = thumbRef.value;\n onselectstartStore = document.onselectstart;\n document.onselectstart = () => false;\n on(thumbEl, \"touchmove\", onMouseMove);\n on(thumbEl, \"touchend\", onMouseUp);\n };\n const detachEvents = () => {\n off(window, \"mousemove\", onMouseMove);\n off(window, \"mouseup\", onMouseUp);\n document.onselectstart = onselectstartStore;\n onselectstartStore = null;\n const thumbEl = thumbRef.value;\n off(thumbEl, \"touchmove\", onMouseMove);\n off(thumbEl, \"touchend\", onMouseUp);\n };\n const onThumbMouseDown = (e) => {\n e.stopImmediatePropagation();\n if (e.ctrlKey || [1, 2].includes(e.button)) {\n return;\n }\n state.isDragging = true;\n state[bar.value.axis] = e.currentTarget[bar.value.offset] - (e[bar.value.client] - e.currentTarget.getBoundingClientRect()[bar.value.direction]);\n emit(\"start-move\");\n attachEvents();\n };\n const onMouseUp = () => {\n state.isDragging = false;\n state[bar.value.axis] = 0;\n emit(\"stop-move\");\n detachEvents();\n };\n const onMouseMove = (e) => {\n const { isDragging } = state;\n if (!isDragging)\n return;\n const prevPage = state[bar.value.axis];\n if (!prevPage)\n return;\n cAF(frameHandle);\n const offset = (trackRef.value.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) * -1;\n const thumbClickPosition = thumbRef.value[bar.value.offset] - prevPage;\n const distance = offset - thumbClickPosition;\n frameHandle = rAF(() => {\n state.traveled = Math.max(2, Math.min(distance, totalSteps.value));\n emit(\"scroll\", distance, totalSteps.value);\n });\n };\n const onScrollbarTouchStart = (e) => e.preventDefault();\n watch(() => props.scrollFrom, (v) => {\n if (state.isDragging)\n return;\n state.traveled = Math.ceil(v * props.clientSize / (props.clientSize / totalSteps.value));\n });\n onMounted(() => {\n if (isServer)\n return;\n on(trackRef.value, \"touchstart\", onScrollbarTouchStart);\n on(thumbRef.value, \"touchstart\", onThumbMouseDown);\n });\n onBeforeUnmount(() => {\n off(trackRef.value, \"touchstart\", onScrollbarTouchStart);\n detachEvents();\n });\n return () => {\n return h(\"div\", {\n role: \"presentation\",\n ref: trackRef,\n class: \"el-virtual-scrollbar\",\n style: trackStyle.value,\n onMousedown: withModifiers(NOOP, [\"stop\", \"prevent\"])\n }, h(\"div\", {\n ref: thumbRef,\n class: \"el-scrollbar__thumb\",\n style: thumbStyle.value,\n onMousedown: onThumbMouseDown\n }, null));\n };\n }\n});\n\nvar __defProp$1 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nconst createList = ({\n name,\n getOffset,\n getItemSize,\n getItemOffset,\n getEstimatedTotalSize,\n getStartIndexForOffset,\n getStopIndexForStartIndex,\n initCache,\n clearCache,\n validateProps\n}) => {\n return defineComponent({\n name: name != null ? name : \"ElVirtualList\",\n props: DefaultListProps,\n emits: [ITEM_RENDER_EVT, SCROLL_EVT],\n setup(props, { emit, expose }) {\n validateProps(props);\n const instance = getCurrentInstance();\n const dynamicSizeCache = ref(initCache(props, instance));\n const windowRef = ref(null);\n const innerRef = ref(null);\n const scrollbarRef = ref(null);\n const states = ref({\n isScrolling: false,\n scrollDir: \"forward\",\n scrollOffset: isNumber(props.initScrollOffset) ? props.initScrollOffset : 0,\n updateRequested: false,\n isScrollbarDragging: false\n });\n const itemsToRender = computed(() => {\n const { total, cache } = props;\n const { isScrolling, scrollDir, scrollOffset } = $(states);\n if (total === 0) {\n return [0, 0, 0, 0];\n }\n const startIndex = getStartIndexForOffset(props, scrollOffset, $(dynamicSizeCache));\n const stopIndex = getStopIndexForStartIndex(props, startIndex, scrollOffset, $(dynamicSizeCache));\n const cacheBackward = !isScrolling || scrollDir === BACKWARD ? Math.max(1, cache) : 1;\n const cacheForward = !isScrolling || scrollDir === FORWARD ? Math.max(1, cache) : 1;\n return [\n Math.max(0, startIndex - cacheBackward),\n Math.max(0, Math.min(total - 1, stopIndex + cacheForward)),\n startIndex,\n stopIndex\n ];\n });\n const estimatedTotalSize = computed(() => getEstimatedTotalSize(props, $(dynamicSizeCache)));\n const _isHorizontal = computed(() => isHorizontal(props.layout));\n const windowStyle = computed(() => [\n {\n position: \"relative\",\n overflow: \"hidden\",\n WebkitOverflowScrolling: \"touch\",\n willChange: \"transform\"\n },\n __spreadValues$1({\n direction: props.direction,\n height: isNumber(props.height) ? `${props.height}px` : props.height,\n width: isNumber(props.width) ? `${props.width}px` : props.width\n }, props.style)\n ]);\n const innerStyle = computed(() => {\n const size = $(estimatedTotalSize);\n const horizontal = $(_isHorizontal);\n return {\n height: horizontal ? \"100%\" : `${size}px`,\n pointerEvents: $(states).isScrolling ? \"none\" : void 0,\n width: horizontal ? `${size}px` : \"100%\"\n };\n });\n const clientSize = computed(() => _isHorizontal.value ? props.width : props.height);\n const {\n onWheel\n } = useWheel({\n atStartEdge: computed(() => states.value.scrollOffset <= 0),\n atEndEdge: computed(() => states.value.scrollOffset >= estimatedTotalSize.value),\n layout: computed(() => props.layout)\n }, (offset) => {\n var _a, _b;\n (_b = (_a = scrollbarRef.value).onMouseUp) == null ? void 0 : _b.call(_a);\n scrollTo(Math.min(states.value.scrollOffset + offset, estimatedTotalSize.value - clientSize.value));\n });\n const emitEvents = () => {\n const { total } = props;\n if (total > 0) {\n const [cacheStart, cacheEnd, visibleStart, visibleEnd] = $(itemsToRender);\n emit(ITEM_RENDER_EVT, cacheStart, cacheEnd, visibleStart, visibleEnd);\n }\n const { scrollDir, scrollOffset, updateRequested } = $(states);\n emit(SCROLL_EVT, scrollDir, scrollOffset, updateRequested);\n };\n const scrollVertically = (e) => {\n const { clientHeight, scrollHeight, scrollTop } = e.currentTarget;\n const _states = $(states);\n if (_states.scrollOffset === scrollTop) {\n return;\n }\n const scrollOffset = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));\n states.value = __spreadProps$1(__spreadValues$1({}, _states), {\n isScrolling: true,\n scrollDir: getScrollDir(_states.scrollOffset, scrollOffset),\n scrollOffset,\n updateRequested: false\n });\n nextTick(resetIsScrolling);\n };\n const scrollHorizontally = (e) => {\n const { clientWidth, scrollLeft, scrollWidth } = e.currentTarget;\n const _states = $(states);\n if (_states.scrollOffset === scrollLeft) {\n return;\n }\n const { direction } = props;\n let scrollOffset = scrollLeft;\n if (direction === RTL) {\n switch (getRTLOffsetType()) {\n case RTL_OFFSET_NAG: {\n scrollOffset = -scrollLeft;\n break;\n }\n case RTL_OFFSET_POS_DESC: {\n scrollOffset = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n }\n }\n scrollOffset = Math.max(0, Math.min(scrollOffset, scrollWidth - clientWidth));\n states.value = __spreadProps$1(__spreadValues$1({}, _states), {\n isScrolling: true,\n scrollDir: getScrollDir(_states.scrollOffset, scrollOffset),\n scrollOffset,\n updateRequested: false\n });\n nextTick(resetIsScrolling);\n };\n const onScroll = (e) => {\n $(_isHorizontal) ? scrollHorizontally(e) : scrollVertically(e);\n emitEvents();\n };\n const onScrollbarScroll = (distanceToGo, totalSteps) => {\n const offset = (estimatedTotalSize.value - clientSize.value) / totalSteps * distanceToGo;\n scrollTo(Math.min(estimatedTotalSize.value - clientSize.value, offset));\n };\n const getItemStyleCache = memo((_, __, ___) => ({}));\n const scrollTo = (offset) => {\n offset = Math.max(offset, 0);\n if (offset === $(states).scrollOffset) {\n return;\n }\n states.value = __spreadProps$1(__spreadValues$1({}, $(states)), {\n scrollOffset: offset,\n scrollDir: getScrollDir($(states).scrollOffset, offset),\n updateRequested: true\n });\n nextTick(resetIsScrolling);\n };\n const scrollToItem = (idx, alignment = AUTO_ALIGNMENT) => {\n const { scrollOffset } = $(states);\n idx = Math.max(0, Math.min(idx, props.total - 1));\n scrollTo(getOffset(props, idx, alignment, scrollOffset, $(dynamicSizeCache)));\n };\n const getItemStyle = (idx) => {\n const { direction, itemSize, layout } = props;\n const itemStyleCache = getItemStyleCache(clearCache && itemSize, clearCache && layout, clearCache && direction);\n let style;\n if (hasOwn(itemStyleCache, String(idx))) {\n style = itemStyleCache[idx];\n } else {\n const offset = getItemOffset(props, idx, $(dynamicSizeCache));\n const size = getItemSize(props, idx, $(dynamicSizeCache));\n const horizontal = $(_isHorizontal);\n const isRtl = direction === RTL;\n const offsetHorizontal = horizontal ? offset : 0;\n itemStyleCache[idx] = style = {\n position: \"absolute\",\n left: isRtl ? void 0 : `${offsetHorizontal}px`,\n right: isRtl ? `${offsetHorizontal}px` : void 0,\n top: !horizontal ? `${offset}px` : 0,\n height: !horizontal ? `${size}px` : \"100%\",\n width: horizontal ? `${size}px` : \"100%\"\n };\n }\n return style;\n };\n const resetIsScrolling = () => {\n states.value.isScrolling = false;\n nextTick(() => {\n getItemStyleCache(-1, null, null);\n });\n };\n onMounted(() => {\n if (isServer)\n return;\n const { initScrollOffset } = props;\n const windowElement = $(windowRef);\n if (isNumber(initScrollOffset) && windowElement !== null) {\n if ($(_isHorizontal)) {\n windowElement.scrollLeft = initScrollOffset;\n } else {\n windowElement.scrollTop = initScrollOffset;\n }\n }\n emitEvents();\n });\n onUpdated(() => {\n const { direction, layout } = props;\n const { scrollOffset, updateRequested } = $(states);\n if (updateRequested && $(windowRef) !== null) {\n const windowElement = $(windowRef);\n if (layout === HORIZONTAL) {\n if (direction === RTL) {\n switch (getRTLOffsetType()) {\n case \"negative\": {\n windowElement.scrollLeft = -scrollOffset;\n break;\n }\n case \"positive-ascending\": {\n windowElement.scrollLeft = scrollOffset;\n break;\n }\n default: {\n const { clientWidth, scrollWidth } = windowElement;\n windowElement.scrollLeft = scrollWidth - clientWidth - scrollOffset;\n break;\n }\n }\n } else {\n windowElement.scrollLeft = scrollOffset;\n }\n } else {\n windowElement.scrollTop = scrollOffset;\n }\n }\n });\n const api = {\n clientSize,\n estimatedTotalSize,\n windowStyle,\n windowRef,\n innerRef,\n innerStyle,\n itemsToRender,\n scrollbarRef,\n states,\n getItemStyle,\n onScroll,\n onScrollbarScroll,\n onWheel,\n scrollTo,\n scrollToItem\n };\n expose({\n windowRef,\n innerRef,\n getItemStyleCache,\n scrollTo,\n scrollToItem,\n states\n });\n return api;\n },\n render(ctx) {\n var _a;\n const {\n $slots,\n className,\n clientSize,\n containerElement,\n data,\n getItemStyle,\n innerElement,\n itemsToRender,\n innerStyle,\n layout,\n total,\n onScroll,\n onScrollbarScroll,\n onWheel,\n states,\n useIsScrolling,\n windowStyle\n } = ctx;\n const [start, end] = itemsToRender;\n const Container = resolveDynamicComponent(containerElement);\n const Inner = resolveDynamicComponent(innerElement);\n const children = [];\n if (total > 0) {\n for (let i = start; i <= end; i++) {\n children.push((_a = $slots.default) == null ? void 0 : _a.call($slots, {\n data,\n key: i,\n index: i,\n isScrolling: useIsScrolling ? states.isScrolling : void 0,\n style: getItemStyle(i)\n }));\n }\n }\n const InnerNode = [h(Inner, {\n style: innerStyle,\n ref: \"innerRef\"\n }, !isString(Inner) ? {\n default: () => children\n } : children)];\n const scrollbar = h(ScrollBar, {\n ref: \"scrollbarRef\",\n clientSize,\n layout,\n onScroll: onScrollbarScroll,\n ratio: clientSize * 100 / this.estimatedTotalSize,\n scrollFrom: states.scrollOffset / (this.estimatedTotalSize - clientSize),\n total,\n visible: true\n });\n const listContainer = h(Container, {\n class: className,\n style: windowStyle,\n onScroll,\n onWheel,\n ref: \"windowRef\",\n key: 0\n }, !isString(Container) ? { default: () => [InnerNode] } : [InnerNode]);\n return h(\"div\", {\n key: 0,\n class: \"el-vl__wrapper\"\n }, [\n listContainer,\n scrollbar\n ]);\n }\n });\n};\n\nconst FixedSizeList = createList({\n name: \"ElFixedSizeList\",\n getItemOffset: ({ itemSize }, index) => index * itemSize,\n getItemSize: ({ itemSize }) => itemSize,\n getEstimatedTotalSize: ({ total, itemSize }) => itemSize * total,\n getOffset: ({ height, total, itemSize, layout, width }, index, alignment, scrollOffset) => {\n const size = isHorizontal(layout) ? width : height;\n if (process.env.ENV !== \"production\" && isString(size)) {\n throwError(\"[ElVirtualList]\", `\n You should set\n width/height\n to number when your layout is\n horizontal/vertical\n `);\n }\n const lastItemOffset = Math.max(0, total * itemSize - size);\n const maxOffset = Math.min(lastItemOffset, index * itemSize);\n const minOffset = Math.max(0, (index + 1) * itemSize - size);\n if (alignment === SMART_ALIGNMENT) {\n if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {\n alignment = AUTO_ALIGNMENT;\n } else {\n alignment = CENTERED_ALIGNMENT;\n }\n }\n switch (alignment) {\n case START_ALIGNMENT: {\n return maxOffset;\n }\n case END_ALIGNMENT: {\n return minOffset;\n }\n case CENTERED_ALIGNMENT: {\n const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);\n if (middleOffset < Math.ceil(size / 2)) {\n return 0;\n } else if (middleOffset > lastItemOffset + Math.floor(size / 2)) {\n return lastItemOffset;\n } else {\n return middleOffset;\n }\n }\n case AUTO_ALIGNMENT:\n default: {\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset;\n } else if (scrollOffset < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n }\n }\n },\n getStartIndexForOffset: ({ total, itemSize }, offset) => Math.max(0, Math.min(total - 1, Math.floor(offset / itemSize))),\n getStopIndexForStartIndex: ({ height, total, itemSize, layout, width }, startIndex, scrollOffset) => {\n const offset = startIndex * itemSize;\n const size = isHorizontal(layout) ? width : height;\n const numVisibleItems = Math.ceil((size + scrollOffset - offset) / itemSize);\n return Math.max(0, Math.min(total - 1, startIndex + numVisibleItems - 1));\n },\n initCache() {\n return void 0;\n },\n clearCache: true,\n validateProps() {\n }\n});\n\nconst SCOPE = \"ElDynamicSizeList\";\nconst getItemFromCache = (props, index, listCache) => {\n const { itemSize } = props;\n const { items, lastVisitedIndex } = listCache;\n if (index > lastVisitedIndex) {\n let offset = 0;\n if (lastVisitedIndex >= 0) {\n const item = items[lastVisitedIndex];\n offset = item.offset + item.size;\n }\n for (let i = lastVisitedIndex + 1; i <= index; i++) {\n const size = itemSize(i);\n items[i] = {\n offset,\n size\n };\n offset += size;\n }\n listCache.lastVisitedIndex = index;\n }\n return items[index];\n};\nconst findItem = (props, listCache, offset) => {\n const { items, lastVisitedIndex } = listCache;\n const lastVisitedOffset = lastVisitedIndex > 0 ? items[lastVisitedIndex].offset : 0;\n if (lastVisitedOffset >= offset) {\n return bs(props, listCache, 0, lastVisitedIndex, offset);\n }\n return es(props, listCache, Math.max(0, lastVisitedIndex), offset);\n};\nconst bs = (props, listCache, low, high, offset) => {\n while (low <= high) {\n const mid = low + Math.floor((high - low) / 2);\n const currentOffset = getItemFromCache(props, mid, listCache).offset;\n if (currentOffset === offset) {\n return mid;\n } else if (currentOffset < offset) {\n low = mid + 1;\n } else if (currentOffset > offset) {\n high = mid - 1;\n }\n }\n return Math.max(0, low - 1);\n};\nconst es = (props, listCache, index, offset) => {\n const { total } = props;\n let exponent = 1;\n while (index < total && getItemFromCache(props, index, listCache).offset < offset) {\n index += exponent;\n exponent *= 2;\n }\n return bs(props, listCache, Math.floor(index / 2), Math.min(index, total - 1), offset);\n};\nconst getEstimatedTotalSize = ({ total }, { items, estimatedItemSize, lastVisitedIndex }) => {\n let totalSizeOfMeasuredItems = 0;\n if (lastVisitedIndex >= total) {\n lastVisitedIndex = total - 1;\n }\n if (lastVisitedIndex >= 0) {\n const item = items[lastVisitedIndex];\n totalSizeOfMeasuredItems = item.offset + item.size;\n }\n const numUnmeasuredItems = total - lastVisitedIndex - 1;\n const totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedItemSize;\n return totalSizeOfMeasuredItems + totalSizeOfUnmeasuredItems;\n};\nconst DynamicSizeList = createList({\n name: \"ElDynamicSizeList\",\n getItemOffset: (props, index, listCache) => getItemFromCache(props, index, listCache).offset,\n getItemSize: (_, index, { items }) => items[index].size,\n getEstimatedTotalSize,\n getOffset: (props, index, alignment, scrollOffset, listCache) => {\n const { height, layout, width } = props;\n const size = isHorizontal(layout) ? width : height;\n const item = getItemFromCache(props, index, listCache);\n const estimatedTotalSize = getEstimatedTotalSize(props, listCache);\n const maxOffset = Math.max(0, Math.min(estimatedTotalSize - size, item.offset));\n const minOffset = Math.max(0, item.offset - size + item.size);\n if (alignment === SMART_ALIGNMENT) {\n if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {\n alignment = AUTO_ALIGNMENT;\n } else {\n alignment = CENTERED_ALIGNMENT;\n }\n }\n switch (alignment) {\n case START_ALIGNMENT: {\n return maxOffset;\n }\n case END_ALIGNMENT: {\n return minOffset;\n }\n case CENTERED_ALIGNMENT: {\n return Math.round(minOffset + (maxOffset - minOffset) / 2);\n }\n case AUTO_ALIGNMENT:\n default: {\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset;\n } else if (scrollOffset < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n }\n }\n },\n getStartIndexForOffset: (props, offset, listCache) => findItem(props, listCache, offset),\n getStopIndexForStartIndex: (props, startIndex, scrollOffset, listCache) => {\n const { height, total, layout, width } = props;\n const size = isHorizontal(layout) ? width : height;\n const item = getItemFromCache(props, startIndex, listCache);\n const maxOffset = scrollOffset + size;\n let offset = item.offset + item.size;\n let stopIndex = startIndex;\n while (stopIndex < total - 1 && offset < maxOffset) {\n stopIndex++;\n offset += getItemFromCache(props, stopIndex, listCache).size;\n }\n return stopIndex;\n },\n initCache({ estimatedItemSize = DEFAULT_DYNAMIC_LIST_ITEM_SIZE }, instance) {\n const cache = {\n items: {},\n estimatedItemSize,\n lastVisitedIndex: -1\n };\n cache.clearCacheAfterIndex = (index, forceUpdate = true) => {\n cache.lastVisitedIndex = Math.min(cache.lastVisitedIndex, index - 1);\n instance.exposed.getItemStyleCache(-1);\n if (forceUpdate) {\n instance.proxy.$forceUpdate();\n }\n };\n return cache;\n },\n clearCache: false,\n validateProps: ({ itemSize }) => {\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof itemSize !== \"function\") {\n throwError(SCOPE, `\n itemSize is required as function, but the given value was ${typeof itemSize}\n `);\n }\n }\n }\n});\n\nvar __defProp$2 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nconst createGrid = ({\n name,\n clearCache,\n getColumnPosition,\n getColumnStartIndexForOffset,\n getColumnStopIndexForStartIndex,\n getEstimatedTotalHeight,\n getEstimatedTotalWidth,\n getColumnOffset,\n getRowOffset,\n getRowPosition,\n getRowStartIndexForOffset,\n getRowStopIndexForStartIndex,\n initCache,\n validateProps\n}) => {\n return defineComponent({\n name: name != null ? name : \"ElVirtualList\",\n props: DefaultGridProps,\n emits: [ITEM_RENDER_EVT, SCROLL_EVT],\n setup(props, { emit, expose }) {\n validateProps(props);\n const instance = getCurrentInstance();\n const cache = ref(initCache(props, instance));\n const windowRef = ref(null);\n const innerRef = ref(null);\n const states = ref({\n isScrolling: false,\n scrollLeft: isNumber(props.initScrollLeft) ? props.initScrollLeft : 0,\n scrollTop: isNumber(props.initScrollTop) ? props.initScrollTop : 0,\n updateRequested: false,\n xAxisScrollDir: FORWARD,\n yAxisScrollDir: FORWARD\n });\n const columnsToRender = computed(() => {\n const { totalColumn, totalRow, columnCache } = props;\n const { isScrolling, xAxisScrollDir, scrollLeft } = $(states);\n if (totalColumn === 0 || totalRow === 0) {\n return [0, 0, 0, 0];\n }\n const startIndex = getColumnStartIndexForOffset(props, scrollLeft, $(cache));\n const stopIndex = getColumnStopIndexForStartIndex(props, startIndex, scrollLeft, $(cache));\n const cacheBackward = !isScrolling || xAxisScrollDir === BACKWARD ? Math.max(1, columnCache) : 1;\n const cacheForward = !isScrolling || xAxisScrollDir === FORWARD ? Math.max(1, columnCache) : 1;\n return [\n Math.max(0, startIndex - cacheBackward),\n Math.max(0, Math.min(totalColumn - 1, stopIndex + cacheForward)),\n startIndex,\n stopIndex\n ];\n });\n const rowsToRender = computed(() => {\n const { totalColumn, totalRow, rowCache } = props;\n const { isScrolling, yAxisScrollDir, scrollTop } = $(states);\n if (totalColumn === 0 || totalRow === 0) {\n return [0, 0, 0, 0];\n }\n const startIndex = getRowStartIndexForOffset(props, scrollTop, $(cache));\n const stopIndex = getRowStopIndexForStartIndex(props, startIndex, scrollTop, $(cache));\n const cacheBackward = !isScrolling || yAxisScrollDir === BACKWARD ? Math.max(1, rowCache) : 1;\n const cacheForward = !isScrolling || yAxisScrollDir === FORWARD ? Math.max(1, rowCache) : 1;\n return [\n Math.max(0, startIndex - cacheBackward),\n Math.max(0, Math.min(totalRow - 1, stopIndex + cacheForward)),\n startIndex,\n stopIndex\n ];\n });\n const estimatedTotalHeight = computed(() => getEstimatedTotalHeight(props, $(cache)));\n const estimatedTotalWidth = computed(() => getEstimatedTotalWidth(props, $(cache)));\n const windowStyle = computed(() => [\n {\n position: \"relative\",\n overflow: \"auto\",\n WebkitOverflowScrolling: \"touch\",\n willChange: \"transform\"\n },\n __spreadValues$2({\n direction: props.direction,\n height: isNumber(props.height) ? `${props.height}px` : props.height,\n width: isNumber(props.width) ? `${props.width}px` : props.width\n }, props.style)\n ]);\n const innerStyle = computed(() => {\n const width = `${$(estimatedTotalWidth)}px`;\n const height = `${$(estimatedTotalHeight)}px`;\n return {\n height,\n pointerEvents: $(states).isScrolling ? \"none\" : void 0,\n width\n };\n });\n const emitEvents = () => {\n const { totalColumn, totalRow } = props;\n if (totalColumn > 0 && totalRow > 0) {\n const [columnCacheStart, columnCacheEnd, columnVisibleStart, columnVisibleEnd] = $(columnsToRender);\n const [rowCacheStart, rowCacheEnd, rowVisibleStart, rowVisibleEnd] = $(rowsToRender);\n emit(ITEM_RENDER_EVT, columnCacheStart, columnCacheEnd, rowCacheStart, rowCacheEnd, columnVisibleStart, columnVisibleEnd, rowVisibleStart, rowVisibleEnd);\n }\n const { scrollLeft, scrollTop, updateRequested, xAxisScrollDir, yAxisScrollDir } = $(states);\n emit(SCROLL_EVT, xAxisScrollDir, scrollLeft, yAxisScrollDir, scrollTop, updateRequested);\n };\n const onScroll = (e) => {\n const {\n clientHeight,\n clientWidth,\n scrollHeight,\n scrollLeft,\n scrollTop,\n scrollWidth\n } = e.currentTarget;\n const _states = $(states);\n if (_states.scrollTop === scrollTop && _states.scrollLeft === scrollLeft) {\n return;\n }\n let _scrollLeft = scrollLeft;\n if (isRTL(props.direction)) {\n switch (getRTLOffsetType()) {\n case RTL_OFFSET_NAG:\n _scrollLeft = -scrollLeft;\n break;\n case RTL_OFFSET_POS_DESC:\n _scrollLeft = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n }\n states.value = __spreadProps$2(__spreadValues$2({}, _states), {\n isScrolling: true,\n scrollLeft: _scrollLeft,\n scrollTop: Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight)),\n updateRequested: false,\n xAxisScrollDir: getScrollDir(_states.scrollLeft, _scrollLeft),\n yAxisScrollDir: getScrollDir(_states.scrollTop, scrollTop)\n });\n nextTick(resetIsScrolling);\n emitEvents();\n };\n const getItemStyleCache = memo((_, __, ___) => ({}));\n const scrollTo = ({\n scrollLeft,\n scrollTop\n }) => {\n scrollLeft = Math.max(scrollLeft, 0);\n scrollTop = Math.max(scrollTop, 0);\n const _states = $(states);\n if (scrollTop === _states.scrollTop && scrollLeft === _states.scrollLeft) {\n return;\n }\n states.value = __spreadProps$2(__spreadValues$2({}, _states), {\n xAxisScrollDir: getScrollDir(_states.scrollLeft, scrollLeft),\n yAxisScrollDir: getScrollDir(_states.scrollTop, scrollTop),\n scrollLeft,\n scrollTop,\n updateRequested: true\n });\n nextTick(resetIsScrolling);\n };\n const scrollToItem = (rowIndex = 0, columnIdx = 0, alignment = AUTO_ALIGNMENT) => {\n const _states = $(states);\n columnIdx = Math.max(0, Math.min(columnIdx, props.totalColumn - 1));\n rowIndex = Math.max(0, Math.min(rowIndex, props.totalRow - 1));\n const scrollBarWidth = getScrollBarWidth();\n const _cache = $(cache);\n const estimatedHeight = getEstimatedTotalHeight(props, _cache);\n const estimatedWidth = getEstimatedTotalWidth(props, _cache);\n scrollTo({\n scrollLeft: getColumnOffset(props, columnIdx, alignment, _states.scrollLeft, _cache, estimatedWidth > props.width ? scrollBarWidth : 0),\n scrollTop: getRowOffset(props, rowIndex, alignment, _states.scrollTop, _cache, estimatedHeight > props.height ? scrollBarWidth : 0)\n });\n };\n const getItemStyle = (rowIndex, columnIndex) => {\n const { columnWidth, direction, rowHeight } = props;\n const itemStyleCache = getItemStyleCache(clearCache && columnWidth, clearCache && rowHeight, clearCache && direction);\n const key = `${rowIndex},${columnIndex}`;\n if (hasOwn(itemStyleCache, key)) {\n return itemStyleCache[key];\n } else {\n const [, left] = getColumnPosition(props, columnIndex, $(cache));\n const _cache = $(cache);\n const rtl = isRTL(direction);\n const [height, top] = getRowPosition(props, rowIndex, _cache);\n const [width] = getColumnPosition(props, columnIndex, _cache);\n itemStyleCache[key] = {\n position: \"absolute\",\n left: rtl ? void 0 : `${left}px`,\n right: rtl ? `${left}px` : void 0,\n top: `${top}px`,\n height: `${height}px`,\n width: `${width}px`\n };\n return itemStyleCache[key];\n }\n };\n const resetIsScrolling = () => {\n states.value.isScrolling = false;\n nextTick(() => {\n getItemStyleCache(-1, null, null);\n });\n };\n onMounted(() => {\n if (isServer)\n return;\n const { initScrollLeft, initScrollTop } = props;\n const windowElement = $(windowRef);\n if (windowElement !== null) {\n if (isNumber(initScrollLeft)) {\n windowElement.scrollLeft = initScrollLeft;\n }\n if (isNumber(initScrollTop)) {\n windowElement.scrollTop = initScrollTop;\n }\n }\n emitEvents();\n });\n onUpdated(() => {\n const { direction } = props;\n const { scrollLeft, scrollTop, updateRequested } = $(states);\n if (updateRequested && $(windowRef) !== null) {\n const windowElement = $(windowRef);\n if (direction === RTL) {\n switch (getRTLOffsetType()) {\n case RTL_OFFSET_NAG: {\n windowElement.scrollLeft = -scrollLeft;\n break;\n }\n case RTL_OFFSET_POS_ASC: {\n windowElement.scrollLeft = scrollLeft;\n break;\n }\n default: {\n const { clientWidth, scrollWidth } = windowElement;\n windowElement.scrollLeft = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n }\n } else {\n windowElement.scrollLeft = Math.max(0, scrollLeft);\n }\n windowElement.scrollTop = Math.max(0, scrollTop);\n }\n });\n const api = {\n windowStyle,\n windowRef,\n columnsToRender,\n innerRef,\n innerStyle,\n states,\n rowsToRender,\n getItemStyle,\n onScroll,\n scrollTo,\n scrollToItem\n };\n expose({\n windowRef,\n innerRef,\n getItemStyleCache,\n scrollTo,\n scrollToItem,\n states\n });\n return api;\n },\n render(ctx) {\n var _a;\n const {\n $slots,\n className,\n containerElement,\n columnsToRender,\n data,\n getItemStyle,\n innerElement,\n innerStyle,\n rowsToRender,\n onScroll,\n states,\n useIsScrolling,\n windowStyle,\n totalColumn,\n totalRow\n } = ctx;\n const [columnStart, columnEnd] = columnsToRender;\n const [rowStart, rowEnd] = rowsToRender;\n const Container = resolveDynamicComponent(containerElement);\n const Inner = resolveDynamicComponent(innerElement);\n const children = [];\n if (totalRow > 0 && totalColumn > 0) {\n for (let row = rowStart; row <= rowEnd; row++) {\n for (let column = columnStart; column <= columnEnd; column++) {\n children.push((_a = $slots.default) == null ? void 0 : _a.call($slots, {\n columnIndex: column,\n data,\n key: column,\n isScrolling: useIsScrolling ? states.isScrolling : void 0,\n style: getItemStyle(row, column),\n rowIndex: row\n }));\n }\n }\n }\n const InnerNode = [h(Inner, {\n style: innerStyle,\n ref: \"innerRef\"\n }, !isString(Inner) ? {\n default: () => children\n } : children)];\n return h(Container, {\n class: className,\n style: windowStyle,\n onScroll,\n ref: \"windowRef\"\n }, !isString(Container) ? { default: () => InnerNode } : InnerNode);\n }\n });\n};\n\nconst SCOPE$1 = \"ElFixedSizeGrid\";\nconst FixedSizeGrid = createGrid({\n name: \"ElFixedSizeGrid\",\n getColumnPosition: ({ columnWidth }, index) => [\n columnWidth,\n index * columnWidth\n ],\n getRowPosition: ({ rowHeight }, index) => [\n rowHeight,\n index * rowHeight\n ],\n getEstimatedTotalHeight: ({ totalRow, rowHeight }) => rowHeight * totalRow,\n getEstimatedTotalWidth: ({ totalColumn, columnWidth }) => columnWidth * totalColumn,\n getColumnOffset: ({ totalColumn, columnWidth, width }, columnIndex, alignment, scrollLeft, _, scrollBarWidth) => {\n width = Number(width);\n const lastColumnOffset = Math.max(0, totalColumn * columnWidth - width);\n const maxOffset = Math.min(lastColumnOffset, columnIndex * columnWidth);\n const minOffset = Math.max(0, columnIndex * columnWidth - width + scrollBarWidth + columnWidth);\n if (alignment === \"smart\") {\n if (scrollLeft >= minOffset - width && scrollLeft <= maxOffset + width) {\n alignment = AUTO_ALIGNMENT;\n } else {\n alignment = CENTERED_ALIGNMENT;\n }\n }\n switch (alignment) {\n case START_ALIGNMENT:\n return maxOffset;\n case END_ALIGNMENT:\n return minOffset;\n case CENTERED_ALIGNMENT:\n const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);\n if (middleOffset < Math.ceil(width / 2)) {\n return 0;\n } else if (middleOffset > lastColumnOffset + Math.floor(width / 2)) {\n return lastColumnOffset;\n } else {\n return middleOffset;\n }\n case AUTO_ALIGNMENT:\n default:\n if (scrollLeft >= minOffset && scrollLeft <= maxOffset) {\n return scrollLeft;\n } else if (minOffset > maxOffset) {\n return minOffset;\n } else if (scrollLeft < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n }\n },\n getRowOffset: ({ rowHeight, height, totalRow }, rowIndex, align, scrollTop, _, scrollBarWidth) => {\n height = Number(height);\n const lastRowOffset = Math.max(0, totalRow * rowHeight - height);\n const maxOffset = Math.min(lastRowOffset, rowIndex * rowHeight);\n const minOffset = Math.max(0, rowIndex * rowHeight - height + scrollBarWidth + rowHeight);\n if (align === SMART_ALIGNMENT) {\n if (scrollTop >= minOffset - height && scrollTop <= maxOffset + height) {\n align = AUTO_ALIGNMENT;\n } else {\n align = CENTERED_ALIGNMENT;\n }\n }\n switch (align) {\n case START_ALIGNMENT:\n return maxOffset;\n case END_ALIGNMENT:\n return minOffset;\n case CENTERED_ALIGNMENT:\n const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);\n if (middleOffset < Math.ceil(height / 2)) {\n return 0;\n } else if (middleOffset > lastRowOffset + Math.floor(height / 2)) {\n return lastRowOffset;\n } else {\n return middleOffset;\n }\n case AUTO_ALIGNMENT:\n default:\n if (scrollTop >= minOffset && scrollTop <= maxOffset) {\n return scrollTop;\n } else if (minOffset > maxOffset) {\n return minOffset;\n } else if (scrollTop < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n }\n },\n getColumnStartIndexForOffset: ({ columnWidth, totalColumn }, scrollLeft) => Math.max(0, Math.min(totalColumn - 1, Math.floor(scrollLeft / columnWidth))),\n getColumnStopIndexForStartIndex: ({ columnWidth, totalColumn, width }, startIndex, scrollLeft) => {\n const left = startIndex * columnWidth;\n const visibleColumnsCount = Math.ceil((width + scrollLeft - left) / columnWidth);\n return Math.max(0, Math.min(totalColumn - 1, startIndex + visibleColumnsCount - 1));\n },\n getRowStartIndexForOffset: ({ rowHeight, totalRow }, scrollTop) => Math.max(0, Math.min(totalRow - 1, Math.floor(scrollTop / rowHeight))),\n getRowStopIndexForStartIndex: ({ rowHeight, totalRow, height }, startIndex, scrollTop) => {\n const top = startIndex * rowHeight;\n const numVisibleRows = Math.ceil((height + scrollTop - top) / rowHeight);\n return Math.max(0, Math.min(totalRow - 1, startIndex + numVisibleRows - 1));\n },\n initCache: () => void 0,\n clearCache: true,\n validateProps: ({ columnWidth, rowHeight }) => {\n if (process.env.NODE_ENV !== \"production\") {\n if (!isNumber(columnWidth)) {\n throwError(SCOPE$1, `\n \"columnWidth\" must be passed as number,\n instead ${typeof columnWidth} was given.\n `);\n }\n if (!isNumber(rowHeight)) {\n throwError(SCOPE$1, `\n \"columnWidth\" must be passed as number,\n instead ${typeof rowHeight} was given.\n `);\n }\n }\n }\n});\n\nconst { max, min, floor } = Math;\nconst SCOPE$2 = \"ElDynamicSizeGrid\";\nconst ACCESS_SIZER_KEY_MAP = {\n column: \"columnWidth\",\n row: \"rowHeight\"\n};\nconst ACCESS_LAST_VISITED_KEY_MAP = {\n column: \"lastVisitedColumnIndex\",\n row: \"lastVisitedRowIndex\"\n};\nconst getItemFromCache$1 = (props, index, gridCache, type) => {\n const [cachedItems, sizer, lastVisited] = [\n gridCache[type],\n props[ACCESS_SIZER_KEY_MAP[type]],\n gridCache[ACCESS_LAST_VISITED_KEY_MAP[type]]\n ];\n if (index > lastVisited) {\n let offset = 0;\n if (lastVisited >= 0) {\n const item = cachedItems[lastVisited];\n offset = item.offset + item.size;\n }\n for (let i = lastVisited + 1; i <= index; i++) {\n const size = sizer(i);\n cachedItems[i] = {\n offset,\n size\n };\n offset += size;\n }\n gridCache[ACCESS_LAST_VISITED_KEY_MAP[type]] = index;\n }\n return cachedItems[index];\n};\nconst bs$1 = (props, gridCache, low, high, offset, type) => {\n while (low <= high) {\n const mid = low + floor((high - low) / 2);\n const currentOffset = getItemFromCache$1(props, mid, gridCache, type).offset;\n if (currentOffset === offset) {\n return mid;\n } else if (currentOffset < offset) {\n low = mid + 1;\n } else {\n high = mid - 1;\n }\n }\n return max(0, low - 1);\n};\nconst es$1 = (props, gridCache, idx, offset, type) => {\n const total = type === \"column\" ? props.totalColumn : props.totalRow;\n let exponent = 1;\n while (idx < total && getItemFromCache$1(props, idx, gridCache, type).offset < offset) {\n idx += exponent;\n exponent *= 2;\n }\n return bs$1(props, gridCache, floor(idx / 2), min(idx, total - 1), offset, type);\n};\nconst findItem$1 = (props, gridCache, offset, type) => {\n const [cache, lastVisitedIndex] = [\n gridCache[type],\n gridCache[ACCESS_LAST_VISITED_KEY_MAP[type]]\n ];\n const lastVisitedItemOffset = lastVisitedIndex > 0 ? cache[lastVisitedIndex].offset : 0;\n if (lastVisitedItemOffset >= offset) {\n return bs$1(props, gridCache, 0, lastVisitedIndex, offset, type);\n }\n return es$1(props, gridCache, max(0, lastVisitedIndex), offset, type);\n};\nconst getEstimatedTotalHeight = ({ totalRow }, {\n estimatedRowHeight,\n lastVisitedRowIndex,\n row\n}) => {\n let sizeOfVisitedRows = 0;\n if (lastVisitedRowIndex >= totalRow) {\n lastVisitedRowIndex = totalRow - 1;\n }\n if (lastVisitedRowIndex >= 0) {\n const item = row[lastVisitedRowIndex];\n sizeOfVisitedRows = item.offset + item.size;\n }\n const unvisitedItems = totalRow - lastVisitedRowIndex - 1;\n const sizeOfUnvisitedItems = unvisitedItems * estimatedRowHeight;\n return sizeOfVisitedRows + sizeOfUnvisitedItems;\n};\nconst getEstimatedTotalWidth = ({\n totalColumn\n}, {\n column,\n estimatedColumnWidth,\n lastVisitedColumnIndex\n}) => {\n let sizeOfVisitedColumns = 0;\n if (lastVisitedColumnIndex > totalColumn) {\n lastVisitedColumnIndex = totalColumn - 1;\n }\n if (lastVisitedColumnIndex >= 0) {\n const item = column[lastVisitedColumnIndex];\n sizeOfVisitedColumns = item.offset + item.size;\n }\n const unvisitedItems = totalColumn - lastVisitedColumnIndex - 1;\n const sizeOfUnvisitedItems = unvisitedItems * estimatedColumnWidth;\n return sizeOfVisitedColumns + sizeOfUnvisitedItems;\n};\nconst ACCESS_ESTIMATED_SIZE_KEY_MAP = {\n column: getEstimatedTotalWidth,\n row: getEstimatedTotalHeight\n};\nconst getOffset = (props, index, alignment, scrollOffset, cache, type, scrollBarWidth) => {\n const [\n size,\n estimatedSizeAssociates\n ] = [\n type === \"row\" ? props.height : props.width,\n ACCESS_ESTIMATED_SIZE_KEY_MAP[type]\n ];\n const item = getItemFromCache$1(props, index, cache, type);\n const estimatedSize = estimatedSizeAssociates(props, cache);\n const maxOffset = max(0, min(estimatedSize - size, item.offset));\n const minOffset = max(0, item.offset - size + scrollBarWidth + item.size);\n if (alignment === SMART_ALIGNMENT) {\n if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {\n alignment = AUTO_ALIGNMENT;\n } else {\n alignment = CENTERED_ALIGNMENT;\n }\n }\n switch (alignment) {\n case START_ALIGNMENT: {\n return maxOffset;\n }\n case END_ALIGNMENT: {\n return minOffset;\n }\n case CENTERED_ALIGNMENT: {\n return Math.round(minOffset + (maxOffset - minOffset) / 2);\n }\n case AUTO_ALIGNMENT:\n default: {\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset;\n } else if (minOffset > maxOffset) {\n return minOffset;\n } else if (scrollOffset < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n }\n }\n};\nconst FixedSizeGrid$1 = createGrid({\n name: \"ElDynamicSizeGrid\",\n getColumnPosition: (props, idx, cache) => {\n const item = getItemFromCache$1(props, idx, cache, \"column\");\n return [item.size, item.offset];\n },\n getRowPosition: (props, idx, cache) => {\n const item = getItemFromCache$1(props, idx, cache, \"row\");\n return [item.size, item.offset];\n },\n getColumnOffset: (props, columnIndex, alignment, scrollLeft, cache, scrollBarWidth) => getOffset(props, columnIndex, alignment, scrollLeft, cache, \"column\", scrollBarWidth),\n getRowOffset: (props, rowIndex, alignment, scrollTop, cache, scrollBarWidth) => getOffset(props, rowIndex, alignment, scrollTop, cache, \"row\", scrollBarWidth),\n getColumnStartIndexForOffset: (props, scrollLeft, cache) => findItem$1(props, cache, scrollLeft, \"column\"),\n getColumnStopIndexForStartIndex: (props, startIndex, scrollLeft, cache) => {\n const item = getItemFromCache$1(props, startIndex, cache, \"column\");\n const maxOffset = scrollLeft + props.width;\n let offset = item.offset + item.size;\n let stopIndex = startIndex;\n while (stopIndex < props.totalColumn - 1 && offset < maxOffset) {\n stopIndex++;\n offset += getItemFromCache$1(props, startIndex, cache, \"column\").size;\n }\n return stopIndex;\n },\n getEstimatedTotalHeight,\n getEstimatedTotalWidth,\n getRowStartIndexForOffset: (props, scrollTop, cache) => findItem$1(props, cache, scrollTop, \"row\"),\n getRowStopIndexForStartIndex: (props, startIndex, scrollTop, cache) => {\n const { totalRow, height } = props;\n const item = getItemFromCache$1(props, startIndex, cache, \"row\");\n const maxOffset = scrollTop + height;\n let offset = item.size + item.offset;\n let stopIndex = startIndex;\n while (stopIndex < totalRow - 1 && offset < maxOffset) {\n stopIndex++;\n offset += getItemFromCache$1(props, stopIndex, cache, \"row\").size;\n }\n return stopIndex;\n },\n initCache: ({\n estimatedColumnWidth = DEFAULT_DYNAMIC_LIST_ITEM_SIZE,\n estimatedRowHeight = DEFAULT_DYNAMIC_LIST_ITEM_SIZE\n }) => {\n const cache = {\n column: {},\n estimatedColumnWidth,\n estimatedRowHeight,\n lastVisitedColumnIndex: -1,\n lastVisitedRowIndex: -1,\n row: {}\n };\n return cache;\n },\n clearCache: true,\n validateProps: ({ columnWidth, rowHeight }) => {\n if (process.env.NODE_ENV !== \"production\") {\n if (!isFunction(columnWidth)) {\n throwError(SCOPE$2, `\n \"columnWidth\" must be passed as function,\n instead ${typeof columnWidth} was given.\n `);\n }\n if (!isFunction(rowHeight)) {\n throwError(SCOPE$2, `\n \"columnWidth\" must be passed as function,\n instead ${typeof rowHeight} was given.\n `);\n }\n }\n }\n});\n\nexport { FixedSizeGrid$1 as DynamicSizeGrid, DynamicSizeList, FixedSizeGrid, FixedSizeList };\n","import { defineComponent, openBlock, createBlock, toDisplayString, createVNode, withModifiers, renderSlot, inject, ref, computed, h, withCtx, withKeys, reactive, nextTick, watch, onMounted, onBeforeMount, vModelText, provide, toRefs, resolveComponent, resolveDirective, withDirectives, createCommentVNode, Fragment, renderList, createTextVNode, vShow } from 'vue';\nimport ElTag from '../el-tag';\nimport ElPopper from '../el-popper';\nimport { isUndefined, isObject as isObject$1, getValueByPath, useGlobalConfig } from '../utils/util';\nimport { FixedSizeList, DynamicSizeList } from '../el-virtual-list';\nimport { ClickOutside } from '../directives';\nimport { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../utils/constants';\nimport isEqual from 'lodash/isEqual';\nimport lodashDebounce from 'lodash/debounce';\nimport { addResizeListener, removeResizeListener } from '../utils/resize-event';\nimport { useLocaleInject } from '../hooks';\nimport { elFormKey, elFormItemKey } from '../el-form';\nimport { isValidComponentSize } from '../utils/validators';\n\nvar script = defineComponent({\n props: {\n item: {\n type: Object,\n required: true\n },\n style: Object,\n height: Number\n }\n});\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return _ctx.item.isTitle ? (openBlock(), createBlock(\"div\", {\n key: 0,\n class: \"el-select-group__title\",\n style: [_ctx.style, { lineHeight: `${_ctx.height}px` }]\n }, toDisplayString(_ctx.item.label), 5)) : (openBlock(), createBlock(\"div\", {\n key: 1,\n class: \"el-select-group__split\",\n style: _ctx.style\n }, [\n createVNode(\"span\", {\n class: \"el-select-group__split-dash\",\n style: { top: `${_ctx.height / 2}px` }\n }, null, 4)\n ], 4));\n}\n\nscript.render = render;\nscript.__file = \"packages/select-v2/src/group-item.vue\";\n\nvar script$1 = defineComponent({\n props: {\n data: Array,\n disabled: Boolean,\n hovering: Boolean,\n item: Object,\n index: Number,\n style: Object,\n selected: Boolean\n },\n emits: [\"select\", \"hover\"],\n setup(props, { emit }) {\n return {\n hoverItem: () => {\n emit(\"hover\", props.index);\n },\n selectOptionClick: () => {\n if (!props.disabled) {\n emit(\"select\", props.item, props.index);\n }\n }\n };\n }\n});\n\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(\"li\", {\n \"aria-selected\": _ctx.selected,\n style: _ctx.style,\n class: {\n \"el-select-dropdown__option-item\": true,\n \"is-selected\": _ctx.selected,\n \"is-disabled\": _ctx.disabled,\n \"hover\": _ctx.hovering\n },\n onMouseenter: _cache[1] || (_cache[1] = (...args) => _ctx.hoverItem && _ctx.hoverItem(...args)),\n onClick: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.selectOptionClick && _ctx.selectOptionClick(...args), [\"stop\"]))\n }, [\n renderSlot(_ctx.$slots, \"default\", {\n item: _ctx.item,\n index: _ctx.index,\n disabled: _ctx.disabled\n }, () => [\n createVNode(\"span\", null, toDisplayString(_ctx.item.label), 1)\n ])\n ], 46, [\"aria-selected\"]);\n}\n\nscript$1.render = render$1;\nscript$1.__file = \"packages/select-v2/src/option-item.vue\";\n\nconst selectKey = \"ElSelect\";\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar script$2 = defineComponent({\n name: \"ElSelectDropdown\",\n props: {\n data: Array,\n hoveringIndex: Number,\n width: Number\n },\n setup(props) {\n const select = inject(selectKey);\n const cachedHeights = ref([]);\n const listRef = ref(null);\n const isSized = computed(() => isUndefined(select.props.estimatedOptionHeight));\n const listProps = computed(() => {\n if (isSized.value) {\n return {\n itemSize: select.props.itemHeight\n };\n }\n return {\n estimatedSize: select.props.estimatedOptionHeight,\n itemSize: (idx) => cachedHeights.value[idx]\n };\n });\n const contains = (arr = [], target) => {\n const {\n props: {\n valueKey\n }\n } = select;\n if (!isObject$1(target)) {\n return arr.includes(target);\n }\n return arr && arr.some((item) => {\n return getValueByPath(item, valueKey) === getValueByPath(target, valueKey);\n });\n };\n const isEqual = (selected, target) => {\n if (!isObject$1(target)) {\n return selected === target;\n } else {\n const { valueKey } = select.props;\n return getValueByPath(selected, valueKey) === getValueByPath(target, valueKey);\n }\n };\n const isItemSelected = (modelValue, target) => {\n if (select.props.multiple) {\n return contains(modelValue, target.value);\n }\n return isEqual(modelValue, target.value);\n };\n const isItemDisabled = (modelValue, selected) => {\n const { disabled, multiple, multipleLimit } = select.props;\n return disabled || !selected && (multiple ? multipleLimit > 0 && modelValue.length >= multipleLimit : false);\n };\n const isItemHovering = (target) => props.hoveringIndex === target;\n const scrollToItem = (index) => {\n listRef.value.scrollToItem(index);\n };\n return {\n select,\n listProps,\n listRef,\n isSized,\n isItemDisabled,\n isItemHovering,\n isItemSelected,\n scrollToItem\n };\n },\n render(_ctx, _cache) {\n var _a;\n const {\n $slots,\n data,\n listProps,\n select,\n isSized,\n width,\n isItemDisabled,\n isItemHovering,\n isItemSelected\n } = _ctx;\n const Comp = isSized ? FixedSizeList : DynamicSizeList;\n const { props: selectProps, onSelect, onKeyboardNavigate, onKeyboardSelect } = select;\n const { height, modelValue, multiple } = selectProps;\n if (data.length === 0) {\n return h(\"div\", {\n class: \"el-select-dropdown\",\n style: {\n width: `${width}px`\n }\n }, (_a = $slots.empty) == null ? void 0 : _a.call($slots));\n }\n const ListItem = withCtx((scoped) => {\n const { index, data: data2 } = scoped;\n const item = data2[index];\n if (data2[index].type === \"Group\") {\n return h(script, {\n item,\n style: scoped.style,\n height: isSized ? listProps.itemSize : listProps.estimatedSize\n });\n }\n const selected = isItemSelected(modelValue, item);\n const itemDisabled = isItemDisabled(modelValue, selected);\n return h(script$1, __spreadProps(__spreadValues({}, scoped), {\n selected,\n disabled: item.disabled || itemDisabled,\n hovering: isItemHovering(index),\n item,\n onSelect\n }), {\n default: withCtx((props) => {\n return renderSlot($slots, \"default\", props, () => [h(\"span\", item.label)]);\n })\n });\n });\n const List = h(Comp, __spreadValues({\n ref: \"listRef\",\n className: \"el-select-dropdown__list\",\n data,\n height,\n width,\n total: data.length,\n onKeydown: [\n _cache[1] || (_cache[1] = withKeys(withModifiers(() => onKeyboardNavigate(\"forward\"), [\"stop\", \"prevent\"]), [\"down\"])),\n _cache[2] || (_cache[2] = withKeys(withModifiers(() => onKeyboardNavigate(\"backward\"), [\"stop\", \"prevent\"]), [\"up\"])),\n _cache[3] || (_cache[3] = withKeys(withModifiers(onKeyboardSelect, [\"stop\", \"prevent\"]), [\"enter\"])),\n _cache[4] || (_cache[4] = withKeys(withModifiers(() => select.expanded = false, [\"stop\", \"prevent\"]), [\"esc\"])),\n _cache[5] || (_cache[5] = withKeys(() => select.expanded = false, [\"tab\"]))\n ]\n }, listProps), {\n default: ListItem\n });\n return h(\"div\", {\n class: {\n \"is-multiple\": multiple,\n \"el-select-dropdown\": true\n }\n }, [List]);\n }\n});\n\nscript$2.__file = \"packages/select-v2/src/select-dropdown.vue\";\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst isArray = Array.isArray;\r\nconst isFunction = (val) => typeof val === 'function';\r\nconst isObject = (val) => val !== null && typeof val === 'object';\n\nconst flattenOptions = (options) => {\n const flattened = [];\n options.map((option) => {\n if (isArray(option.options)) {\n flattened.push({\n label: option.label,\n isTitle: true,\n type: \"Group\"\n });\n option.options.forEach((o) => {\n flattened.push(o);\n });\n flattened.push({\n type: \"Group\"\n });\n } else {\n flattened.push(option);\n }\n });\n return flattened;\n};\n\nvar __defProp$1 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nconst DEFAULT_INPUT_PLACEHOLDER = \"\";\nconst MINIMUM_INPUT_WIDTH = 4;\nconst useSelect = (props, emit) => {\n const { t } = useLocaleInject();\n const elForm = inject(elFormKey, {});\n const elFormItem = inject(elFormItemKey, {});\n const $ELEMENT = useGlobalConfig();\n const states = reactive({\n inputValue: DEFAULT_INPUT_PLACEHOLDER,\n displayInputValue: DEFAULT_INPUT_PLACEHOLDER,\n calculatedWidth: 0,\n cachedPlaceholder: \"\",\n cachedOptions: [],\n createdOptions: [],\n createdLabel: \"\",\n createdSelected: false,\n currentPlaceholder: \"\",\n hoveringIndex: -1,\n comboBoxHovering: false,\n isOnComposition: false,\n isSilentBlur: false,\n isComposing: false,\n inputLength: 20,\n inputWidth: 240,\n initialInputHeight: 0,\n previousQuery: null,\n query: \"\",\n selectedLabel: \"\",\n softFocus: false,\n tagInMultiLine: false\n });\n const selectedIndex = ref(-1);\n const controlRef = ref(null);\n const inputRef = ref(null);\n const menuRef = ref(null);\n const popper = ref(null);\n const selectRef = ref(null);\n const selectionRef = ref(null);\n const calculatorRef = ref(null);\n const expanded = ref(false);\n const selectDisabled = computed(() => props.disabled || elForm.disabled);\n const popupHeight = computed(() => {\n const totalHeight = filteredOptions.value.length * 34;\n return totalHeight > props.height ? props.height : totalHeight;\n });\n const showClearBtn = computed(() => {\n const hasValue = props.multiple ? Array.isArray(props.modelValue) && props.modelValue.length > 0 : props.modelValue !== void 0 && props.modelValue !== null && props.modelValue !== \"\";\n const criteria = props.clearable && !selectDisabled.value && states.comboBoxHovering && hasValue;\n return criteria;\n });\n const iconClass = computed(() => props.remote && props.filterable ? \"\" : expanded.value ? \"arrow-up is-reverse\" : \"arrow-up\");\n const debounce = computed(() => props.remote ? 300 : 0);\n const emptyText = computed(() => {\n const options = filteredOptions.value;\n if (props.loading) {\n return props.loadingText || t(\"el.select.loading\");\n } else {\n if (props.remote && states.query === \"\" && options.length === 0)\n return false;\n if (props.filterable && states.query && options.length > 0) {\n return props.noMatchText || t(\"el.select.noMatch\");\n }\n if (options.length === 0) {\n return props.noDataText || t(\"el.select.noData\");\n }\n }\n return null;\n });\n const filteredOptions = computed(() => {\n const isValidOption = (o) => {\n const query = states.inputValue;\n const containsQueryString = query ? o.label.includes(query) : true;\n return containsQueryString;\n };\n return flattenOptions(props.options.concat(states.createdOptions).map((v) => {\n if (isArray(v.options)) {\n const filtered = v.options.filter(isValidOption);\n if (filtered.length > 0) {\n return __spreadProps$1(__spreadValues$1({}, v), {\n options: filtered\n });\n }\n } else {\n if (isValidOption(v)) {\n return v;\n }\n }\n return null;\n }).filter((v) => v !== null));\n });\n const selectSize = computed(() => props.size || elFormItem.size || $ELEMENT.size);\n const collapseTagSize = computed(() => selectSize.value);\n const popperSize = computed(() => {\n var _a, _b, _c;\n return ((_c = (_b = (_a = selectRef.value) == null ? void 0 : _a.getBoundingClientRect) == null ? void 0 : _b.call(_a)) == null ? void 0 : _c.width) || 200;\n });\n const inputWrapperStyle = computed(() => {\n return {\n width: `${states.calculatedWidth === 0 ? MINIMUM_INPUT_WIDTH : Math.ceil(states.calculatedWidth) + MINIMUM_INPUT_WIDTH}px`\n };\n });\n const shouldShowPlaceholder = computed(() => {\n if (isArray(props.modelValue)) {\n return props.modelValue.length === 0 && !states.displayInputValue;\n }\n return props.filterable ? states.displayInputValue.length === 0 : true;\n });\n const currentPlaceholder = computed(() => {\n const _placeholder = props.placeholder || t(\"el.select.placeholder\");\n return props.multiple ? _placeholder : states.selectedLabel || _placeholder;\n });\n const popperRef = computed(() => {\n var _a;\n return (_a = popper.value) == null ? void 0 : _a.popperRef;\n });\n const indexRef = computed(() => {\n if (props.multiple) {\n if (props.modelValue.length > 0) {\n return filteredOptions.value.findIndex((o) => o.value === props.modelValue[0]);\n }\n } else {\n if (props.modelValue) {\n return filteredOptions.value.findIndex((o) => o.value === props.modelValue);\n }\n }\n return -1;\n });\n const focusAndUpdatePopup = () => {\n var _a, _b, _c, _d;\n (_b = (_a = inputRef.value).focus) == null ? void 0 : _b.call(_a);\n (_d = (_c = popper.value).update) == null ? void 0 : _d.call(_c);\n };\n const toggleMenu = () => {\n var _a, _b;\n if (props.automaticDropdown)\n return;\n if (!selectDisabled.value) {\n if (states.isComposing)\n states.softFocus = true;\n expanded.value = !expanded.value;\n (_b = (_a = inputRef.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);\n }\n };\n const handleQueryChange = (val) => {\n if (states.previousQuery === val || states.isOnComposition)\n return;\n if (states.previousQuery === null && (isFunction(props.filterMethod) || isFunction(props.remoteMethod))) {\n states.previousQuery = val;\n return;\n }\n states.previousQuery = val;\n nextTick(() => {\n var _a, _b;\n if (expanded.value)\n (_b = (_a = popper.value) == null ? void 0 : _a.update) == null ? void 0 : _b.call(_a);\n });\n states.hoveringIndex = -1;\n if (props.multiple && props.filterable) {\n nextTick(() => {\n const length = inputRef.value.value.length * 15 + 20;\n states.inputLength = props.collapseTags ? Math.min(50, length) : length;\n resetInputHeight();\n });\n }\n if (props.remote && isFunction(props.remoteMethod)) {\n states.hoveringIndex = -1;\n props.remoteMethod(val);\n } else if (isFunction(props.filterMethod)) {\n props.filterMethod(val);\n } else ;\n if (props.defaultFirstOption && (props.filterable || props.remote)) ;\n };\n const onInputChange = () => {\n if (props.filterable && states.inputValue !== states.selectedLabel) {\n states.query = states.selectedLabel;\n handleQueryChange(states.query);\n }\n };\n const debouncedOnInputChange = lodashDebounce(onInputChange, debounce.value);\n const debouncedQueryChange = lodashDebounce((e) => {\n handleQueryChange(e.target.value);\n }, debounce.value);\n const emitChange = (val) => {\n if (!isEqual(props.modelValue, val)) {\n emit(CHANGE_EVENT, val);\n }\n };\n const update = (val) => {\n emit(UPDATE_MODEL_EVENT, val);\n emitChange(val);\n };\n const getValueIndex = (arr = [], value) => {\n if (!isObject(value))\n return arr.indexOf(value);\n const valueKey = props.valueKey;\n let index = -1;\n arr.some((item, i) => {\n if (getValueByPath(item, valueKey) === getValueByPath(value, valueKey)) {\n index = i;\n return true;\n }\n return false;\n });\n return index;\n };\n const getValueKey = (item) => {\n return isObject(item) ? getValueByPath(item, props.valueKey) : item;\n };\n const getLabel = (item) => {\n return isObject(item) ? item.label : item;\n };\n const resetInputHeight = () => {\n if (props.collapseTags && !props.filterable)\n return;\n nextTick(() => {\n var _a, _b;\n if (!inputRef.value)\n return;\n const selection = selectionRef.value;\n selectRef.value.height = selection.offsetHeight;\n if (expanded.value && emptyText.value !== false) {\n (_b = (_a = popper.value) == null ? void 0 : _a.update) == null ? void 0 : _b.call(_a);\n }\n });\n };\n const handleResize = () => {\n var _a, _b;\n resetInputWidth();\n (_b = (_a = popper.value) == null ? void 0 : _a.update) == null ? void 0 : _b.call(_a);\n if (props.multiple)\n resetInputHeight();\n };\n const resetInputWidth = () => {\n if (inputRef.value) {\n states.inputWidth = inputRef.value.getBoundingClientRect().width;\n }\n };\n const onSelect = (option, idx, byClick = true) => {\n var _a, _b;\n if (props.multiple) {\n let selectedOptions = props.modelValue.slice();\n const index = getValueIndex(selectedOptions, option.value);\n if (index > -1) {\n selectedOptions = [\n ...selectedOptions.slice(0, index),\n ...selectedOptions.slice(index + 1)\n ];\n states.cachedOptions.splice(index, 1);\n } else if (props.multipleLimit <= 0 || selectedOptions.length < props.multipleLimit) {\n selectedOptions = [...selectedOptions, option.value];\n states.cachedOptions.push(option);\n }\n update(selectedOptions);\n if (option.created) {\n states.query = \"\";\n handleQueryChange(\"\");\n states.inputLength = 20;\n }\n if (props.filterable) {\n (_b = (_a = inputRef.value).focus) == null ? void 0 : _b.call(_a);\n onUpdateInputValue(\"\");\n }\n if (props.filterable) {\n states.calculatedWidth = calculatorRef.value.getBoundingClientRect().width;\n }\n resetInputHeight();\n } else {\n selectedIndex.value = idx;\n states.selectedLabel = option.label;\n update(option.value);\n expanded.value = false;\n states.isComposing = false;\n states.isSilentBlur = byClick;\n }\n };\n const deleteTag = (event, tag) => {\n const index = props.modelValue.indexOf(tag.value);\n if (index > -1 && !selectDisabled.value) {\n const value = [\n ...props.modelValue.slice(0, index),\n ...props.modelValue.slice(index + 1)\n ];\n states.cachedOptions.splice(index, 1);\n update(value);\n emit(\"remove-tag\", tag.value);\n states.softFocus = true;\n nextTick(focusAndUpdatePopup);\n }\n event.stopPropagation();\n };\n const handleInputBoxClick = () => {\n if (states.displayInputValue.length === 0 && expanded.value) {\n expanded.value = false;\n }\n };\n const handleFocus = (event) => {\n const focused = states.isComposing;\n states.isComposing = true;\n if (!states.softFocus) {\n if (props.automaticDropdown || props.filterable) {\n expanded.value = true;\n }\n if (!focused)\n emit(\"focus\", event);\n } else {\n states.softFocus = false;\n }\n };\n const handleBlur = () => {\n if (props.filterable) {\n if (props.allowCreate) ;\n }\n states.softFocus = false;\n nextTick(() => {\n var _a, _b;\n (_b = (_a = inputRef.value) == null ? void 0 : _a.blur) == null ? void 0 : _b.call(_a);\n if (calculatorRef.value) {\n states.calculatedWidth = calculatorRef.value.getBoundingClientRect().width;\n }\n if (states.isSilentBlur) {\n states.isSilentBlur = false;\n } else {\n if (states.isComposing) {\n emit(\"blur\");\n }\n }\n states.isComposing = false;\n });\n };\n const handleEsc = () => {\n if (states.displayInputValue.length > 0) {\n onUpdateInputValue(\"\");\n } else {\n expanded.value = false;\n }\n };\n const handleDel = (e) => {\n if (states.displayInputValue.length === 0) {\n e.preventDefault();\n const selected = props.modelValue.slice();\n selected.pop();\n states.cachedOptions.pop();\n update(selected);\n }\n };\n const handleClear = () => {\n let emptyValue;\n if (isArray(props.modelValue)) {\n emptyValue = [];\n } else {\n emptyValue = \"\";\n }\n states.softFocus = true;\n if (props.multiple) {\n states.cachedOptions = [];\n } else {\n states.selectedLabel = \"\";\n }\n expanded.value = false;\n update(emptyValue);\n emit(\"clear\");\n nextTick(focusAndUpdatePopup);\n };\n const onUpdateInputValue = (val) => {\n states.displayInputValue = val;\n states.inputValue = val;\n };\n const onKeyboardNavigate = (direction) => {\n if (selectDisabled.value)\n return;\n if (props.multiple) {\n expanded.value = true;\n return;\n }\n let newIndex;\n if (props.options.length === 0 || filteredOptions.value.length === 0)\n return;\n if (filteredOptions.value.length > 0) {\n if (direction === \"forward\") {\n newIndex = selectedIndex.value + 1;\n if (newIndex > filteredOptions.value.length - 1) {\n newIndex = 0;\n }\n } else {\n newIndex = selectedIndex.value - 1;\n if (newIndex < 0) {\n newIndex = filteredOptions.value.length - 1;\n }\n }\n selectedIndex.value = newIndex;\n const option = filteredOptions.value[newIndex];\n if (option.disabled || option.type === \"Group\") {\n onKeyboardNavigate(direction);\n return;\n }\n emit(UPDATE_MODEL_EVENT, filteredOptions.value[newIndex]);\n emitChange(filteredOptions.value[newIndex]);\n }\n };\n const onKeyboardSelect = () => {\n if (!expanded.value) {\n toggleMenu();\n } else {\n onSelect(filteredOptions.value[states.hoveringIndex], states.hoveringIndex, false);\n }\n };\n const onInput = () => {\n if (states.displayInputValue.length > 0 && !expanded.value) {\n expanded.value = true;\n }\n states.calculatedWidth = calculatorRef.value.getBoundingClientRect().width;\n if (props.multiple) {\n resetInputHeight();\n }\n debouncedOnInputChange();\n };\n const onCompositionUpdate = (e) => {\n onUpdateInputValue(states.displayInputValue += e.data);\n onInput();\n };\n const handleClickOutside = () => {\n expanded.value = false;\n handleBlur();\n };\n const handleMenuEnter = () => {\n states.inputValue = states.displayInputValue;\n nextTick(() => {\n if (~indexRef.value) {\n scrollToItem(indexRef.value);\n }\n });\n };\n const scrollToItem = (index) => {\n menuRef.value.scrollToItem(index);\n };\n const initStates = () => {\n if (props.multiple) {\n if (props.modelValue.length > 0) {\n states.cachedOptions.length = 0;\n props.modelValue.map((selected) => {\n const item = filteredOptions.value.find((option) => option.value === selected);\n if (item) {\n states.cachedOptions.push(item);\n }\n });\n }\n } else {\n if (props.modelValue) {\n const selectedItem = filteredOptions.value.find((o) => o.value === props.modelValue);\n if (selectedItem) {\n states.selectedLabel = selectedItem.label;\n } else {\n states.selectedLabel = \"\";\n }\n } else {\n states.selectedLabel = \"\";\n }\n }\n };\n watch(expanded, (val) => {\n var _a, _b;\n emit(\"visible-change\", val);\n if (val) {\n (_b = (_a = popper.value).update) == null ? void 0 : _b.call(_a);\n } else {\n states.displayInputValue = \"\";\n }\n });\n watch([() => props.modelValue, () => props.options], () => {\n initStates();\n }, {\n deep: true\n });\n onMounted(() => {\n initStates();\n addResizeListener(selectRef.value, handleResize);\n });\n onBeforeMount(() => {\n removeResizeListener(selectRef.value, handleResize);\n });\n return {\n collapseTagSize,\n currentPlaceholder,\n expanded,\n emptyText,\n popupHeight,\n debounce,\n filteredOptions,\n iconClass,\n inputWrapperStyle,\n popperSize,\n shouldShowPlaceholder,\n selectDisabled,\n selectSize,\n showClearBtn,\n states,\n calculatorRef,\n controlRef,\n inputRef,\n menuRef,\n popper,\n selectRef,\n selectionRef,\n popperRef,\n debouncedOnInputChange,\n debouncedQueryChange,\n deleteTag,\n getLabel,\n getValueKey,\n handleBlur,\n handleClear,\n handleClickOutside,\n handleDel,\n handleEsc,\n handleFocus,\n handleInputBoxClick,\n handleMenuEnter,\n toggleMenu,\n scrollTo: scrollToItem,\n onCompositionUpdate,\n onInput,\n onKeyboardNavigate,\n onKeyboardSelect,\n onSelect,\n onUpdateInputValue\n };\n};\n\nconst SelectProps = {\n allowCreate: Boolean,\n autocomplete: {\n type: String,\n default: \"none\"\n },\n automaticDropdown: Boolean,\n clearable: Boolean,\n clearIcon: {\n type: String,\n default: \"el-icon-circle-close\"\n },\n collapseTags: Boolean,\n defaultFirstOption: Boolean,\n disabled: Boolean,\n estimatedOptionHeight: {\n type: Number,\n default: void 0\n },\n filterable: Boolean,\n filterMethod: Function,\n height: {\n type: Number,\n default: 170\n },\n itemHeight: {\n type: Number,\n default: 34\n },\n id: String,\n loading: Boolean,\n loadingText: String,\n label: String,\n modelValue: [Array, String, Number, Boolean, Object],\n multiple: Boolean,\n multipleLimit: {\n type: Number,\n default: 0\n },\n name: String,\n noDataText: String,\n noMatchText: String,\n remoteMethod: Function,\n reserveKeyword: Boolean,\n options: {\n type: Array,\n required: true\n },\n placeholder: {\n type: String\n },\n popperAppendToBody: {\n type: Boolean,\n default: true\n },\n popperClass: {\n type: String,\n default: \"\"\n },\n popperOptions: {\n type: Object,\n default: () => ({})\n },\n remote: Boolean,\n size: {\n type: String,\n validator: isValidComponentSize\n },\n valueKey: {\n type: String,\n default: \"value\"\n }\n};\n\nvar __defProp$2 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nvar script$3 = defineComponent({\n name: \"ElSelectV2\",\n components: {\n ElSelectMenu: script$2,\n ElTag,\n ElPopper\n },\n directives: { ClickOutside, ModelText: vModelText },\n props: SelectProps,\n emits: [UPDATE_MODEL_EVENT, CHANGE_EVENT, \"remove-tag\", \"clear\", \"visible-change\", \"focus\", \"blur\"],\n setup(props, { emit }) {\n const API = useSelect(props, emit);\n provide(selectKey, {\n props: reactive(__spreadProps$2(__spreadValues$2({}, toRefs(props)), {\n height: API.popupHeight\n })),\n onSelect: API.onSelect,\n onKeyboardNavigate: API.onKeyboardNavigate,\n onKeyboardSelect: API.onKeyboardSelect\n });\n return API;\n }\n});\n\nconst _hoisted_1 = { key: 0 };\nconst _hoisted_2 = {\n key: 1,\n class: \"el-select-v2__selection\"\n};\nconst _hoisted_3 = {\n key: 0,\n class: \"el-select-v2__selected-item\"\n};\nconst _hoisted_4 = { class: \"el-select-v2__tags-text\" };\nconst _hoisted_5 = { class: \"el-select-v2__selected-item el-select-v2__input-wrapper\" };\nconst _hoisted_6 = { class: \"el-select-v2__suffix\" };\nconst _hoisted_7 = { class: \"el-select-v2__empty\" };\nfunction render$2(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_tag = resolveComponent(\"el-tag\");\n const _component_el_select_menu = resolveComponent(\"el-select-menu\");\n const _component_el_popper = resolveComponent(\"el-popper\");\n const _directive_model_text = resolveDirective(\"model-text\");\n const _directive_click_outside = resolveDirective(\"click-outside\");\n return withDirectives((openBlock(), createBlock(\"div\", {\n ref: \"selectRef\",\n class: [[_ctx.selectSize ? \"el-select-v2--\" + _ctx.selectSize : \"\"], \"el-select-v2\"],\n onClick: _cache[20] || (_cache[20] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), [\"stop\"])),\n onMouseenter: _cache[21] || (_cache[21] = ($event) => _ctx.states.comboBoxHovering = true),\n onMouseleave: _cache[22] || (_cache[22] = ($event) => _ctx.states.comboBoxHovering = false)\n }, [\n createVNode(_component_el_popper, {\n ref: \"popper\",\n visible: _ctx.expanded,\n \"onUpdate:visible\": _cache[18] || (_cache[18] = ($event) => _ctx.expanded = $event),\n \"append-to-body\": _ctx.popperAppendToBody,\n \"popper-class\": `el-select-v2__popper ${_ctx.popperClass}`,\n \"gpu-acceleration\": false,\n \"stop-popper-mouse-event\": false,\n \"popper-options\": _ctx.popperOptions,\n \"fallback-placements\": [\"bottom-start\", \"top-start\", \"right\", \"left\"],\n effect: \"light\",\n \"manual-mode\": \"\",\n placement: \"bottom-start\",\n pure: \"\",\n transition: \"el-zoom-in-top\",\n trigger: \"click\",\n onBeforeEnter: _ctx.handleMenuEnter,\n onAfterLeave: _cache[19] || (_cache[19] = ($event) => _ctx.states.inputValue = _ctx.states.displayInputValue)\n }, {\n trigger: withCtx(() => [\n createVNode(\"div\", {\n ref: \"selectionRef\",\n class: [\"el-select-v2__wrapper\", {\n \"is-focused\": _ctx.states.isComposing,\n \"is-hovering\": _ctx.states.comboBoxHovering,\n \"is-filterable\": _ctx.filterable,\n \"is-disabled\": _ctx.disabled\n }]\n }, [\n _ctx.$slots.prefix ? (openBlock(), createBlock(\"div\", _hoisted_1, [\n renderSlot(_ctx.$slots, \"prefix\")\n ])) : createCommentVNode(\"v-if\", true),\n _ctx.multiple ? (openBlock(), createBlock(\"div\", _hoisted_2, [\n _ctx.collapseTags && _ctx.modelValue.length > 0 ? (openBlock(), createBlock(\"div\", _hoisted_3, [\n createVNode(_component_el_tag, {\n closable: !_ctx.selectDisabled && !_ctx.states.cachedOptions[0].disable,\n size: _ctx.collapseTagSize,\n type: \"info\",\n \"disable-transitions\": \"\",\n onClose: _cache[1] || (_cache[1] = ($event) => _ctx.deleteTag($event, _ctx.states.cachedOptions[0]))\n }, {\n default: withCtx(() => [\n createVNode(\"span\", {\n class: \"el-select-v2__tags-text\",\n style: { maxWidth: _ctx.states.inputWidth - 123 + \"px\" }\n }, toDisplayString(_ctx.states.cachedOptions[0].label), 5)\n ]),\n _: 1\n }, 8, [\"closable\", \"size\"]),\n _ctx.modelValue.length > 1 ? (openBlock(), createBlock(_component_el_tag, {\n key: 0,\n closable: false,\n size: _ctx.collapseTagSize,\n type: \"info\",\n \"disable-transitions\": \"\"\n }, {\n default: withCtx(() => [\n createVNode(\"span\", _hoisted_4, \"+ \" + toDisplayString(_ctx.modelValue.length - 1), 1)\n ]),\n _: 1\n }, 8, [\"size\"])) : createCommentVNode(\"v-if\", true)\n ])) : (openBlock(true), createBlock(Fragment, { key: 1 }, renderList(_ctx.states.cachedOptions, (selected, idx) => {\n return openBlock(), createBlock(\"div\", {\n key: idx,\n class: \"el-select-v2__selected-item\"\n }, [\n createVNode(_component_el_tag, {\n key: _ctx.getValueKey(selected),\n closable: !_ctx.selectDisabled && !selected.disabled,\n size: _ctx.collapseTagSize,\n type: \"info\",\n \"disable-transitions\": \"\",\n onClose: ($event) => _ctx.deleteTag($event, selected)\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.getLabel(selected)), 1)\n ]),\n _: 2\n }, 1032, [\"closable\", \"size\", \"onClose\"])\n ]);\n }), 128)),\n createVNode(\"div\", {\n class: \"el-select-v2__selected-item el-select-v2__input-wrapper\",\n style: _ctx.inputWrapperStyle\n }, [\n withDirectives(createVNode(\"input\", {\n id: _ctx.id,\n ref: \"inputRef\",\n autocomplete: _ctx.autocomplete,\n \"aria-autocomplete\": \"list\",\n \"aria-haspopup\": \"listbox\",\n autocapitalize: \"off\",\n \"aria-expanded\": _ctx.expanded,\n \"aria-labelledby\": _ctx.label,\n class: \"el-select-v2__combobox-input\",\n disabled: _ctx.disabled,\n role: \"combobox\",\n readonly: !_ctx.filterable,\n spellcheck: \"false\",\n type: \"text\",\n name: _ctx.name,\n unselectable: _ctx.expanded ? \"on\" : void 0,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = (...args) => _ctx.onUpdateInputValue && _ctx.onUpdateInputValue(...args)),\n onClick: _cache[3] || (_cache[3] = withModifiers((...args) => _ctx.handleInputBoxClick && _ctx.handleInputBoxClick(...args), [\"stop\", \"prevent\"])),\n onFocus: _cache[4] || (_cache[4] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),\n onInput: _cache[5] || (_cache[5] = (...args) => _ctx.onInput && _ctx.onInput(...args)),\n onCompositionupdate: _cache[6] || (_cache[6] = (...args) => _ctx.onCompositionUpdate && _ctx.onCompositionUpdate(...args)),\n onCompositionend: _cache[7] || (_cache[7] = (...args) => _ctx.onInput && _ctx.onInput(...args)),\n onKeydown: [\n _cache[8] || (_cache[8] = withKeys(withModifiers((...args) => _ctx.handleEsc && _ctx.handleEsc(...args), [\"stop\", \"prevent\"]), [\"esc\"])),\n _cache[9] || (_cache[9] = withKeys(withModifiers((...args) => _ctx.handleDel && _ctx.handleDel(...args), [\"stop\"]), [\"delete\"]))\n ]\n }, null, 40, [\"id\", \"autocomplete\", \"aria-expanded\", \"aria-labelledby\", \"disabled\", \"readonly\", \"name\", \"unselectable\"]), [\n [_directive_model_text, _ctx.states.displayInputValue]\n ]),\n _ctx.filterable ? (openBlock(), createBlock(\"span\", {\n key: 0,\n ref: \"calculatorRef\",\n \"aria-hidden\": \"true\",\n class: \"el-select-v2__input-calculator\",\n textContent: toDisplayString(_ctx.states.displayInputValue)\n }, null, 8, [\"textContent\"])) : createCommentVNode(\"v-if\", true)\n ], 4)\n ])) : (openBlock(), createBlock(Fragment, { key: 2 }, [\n createVNode(\"div\", _hoisted_5, [\n withDirectives(createVNode(\"input\", {\n id: _ctx.id,\n ref: \"inputRef\",\n \"aria-autocomplete\": \"list\",\n \"aria-haspopup\": \"listbox\",\n \"aria-labelledby\": _ctx.label,\n \"aria-expanded\": _ctx.expanded,\n autocapitalize: \"off\",\n autocomplete: _ctx.autocomplete,\n class: \"el-select-v2__combobox-input\",\n disabled: _ctx.disabled,\n name: _ctx.name,\n role: \"combobox\",\n readonly: !_ctx.filterable,\n spellcheck: \"false\",\n type: \"text\",\n unselectable: _ctx.expanded ? \"on\" : void 0,\n onClick: _cache[10] || (_cache[10] = withModifiers((...args) => _ctx.handleInputBoxClick && _ctx.handleInputBoxClick(...args), [\"stop\", \"prevent\"])),\n onCompositionend: _cache[11] || (_cache[11] = (...args) => _ctx.onInput && _ctx.onInput(...args)),\n onCompositionupdate: _cache[12] || (_cache[12] = (...args) => _ctx.onCompositionUpdate && _ctx.onCompositionUpdate(...args)),\n onFocus: _cache[13] || (_cache[13] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),\n onInput: _cache[14] || (_cache[14] = (...args) => _ctx.onInput && _ctx.onInput(...args)),\n onKeydown: _cache[15] || (_cache[15] = withKeys(withModifiers((...args) => _ctx.handleEsc && _ctx.handleEsc(...args), [\"stop\", \"prevent\"]), [\"esc\"])),\n \"onUpdate:modelValue\": _cache[16] || (_cache[16] = (...args) => _ctx.onUpdateInputValue && _ctx.onUpdateInputValue(...args))\n }, null, 40, [\"id\", \"aria-labelledby\", \"aria-expanded\", \"autocomplete\", \"disabled\", \"name\", \"readonly\", \"unselectable\"]), [\n [_directive_model_text, _ctx.states.displayInputValue]\n ])\n ]),\n _ctx.filterable ? (openBlock(), createBlock(\"span\", {\n key: 0,\n ref: \"calculatorRef\",\n \"aria-hidden\": \"true\",\n class: \"el-select-v2__selected-item el-select-v2__input-calculator\",\n textContent: toDisplayString(_ctx.states.displayInputValue)\n }, null, 8, [\"textContent\"])) : createCommentVNode(\"v-if\", true)\n ], 64)),\n _ctx.shouldShowPlaceholder ? (openBlock(), createBlock(\"span\", {\n key: 3,\n class: {\n \"el-select-v2__placeholder\": true,\n \"is-transparent\": _ctx.states.isComposing || (_ctx.placeholder && _ctx.multiple ? _ctx.modelValue.length === 0 : !_ctx.modelValue)\n }\n }, toDisplayString(_ctx.currentPlaceholder), 3)) : createCommentVNode(\"v-if\", true),\n createVNode(\"span\", _hoisted_6, [\n withDirectives(createVNode(\"i\", {\n class: [\"el-select-v2__caret\", \"el-input__icon\", \"el-icon-\" + _ctx.iconClass]\n }, null, 2), [\n [vShow, !_ctx.showClearBtn]\n ]),\n _ctx.showClearBtn ? (openBlock(), createBlock(\"i\", {\n key: 0,\n class: `el-select-v2__caret el-input__icon ${_ctx.clearIcon}`,\n onClick: _cache[17] || (_cache[17] = withModifiers((...args) => _ctx.handleClear && _ctx.handleClear(...args), [\"prevent\", \"stop\"]))\n }, null, 2)) : createCommentVNode(\"v-if\", true)\n ])\n ], 2)\n ]),\n default: withCtx(() => [\n createVNode(_component_el_select_menu, {\n ref: \"menuRef\",\n data: _ctx.filteredOptions,\n width: _ctx.popperSize,\n \"hovering-index\": _ctx.states.hoveringIndex\n }, {\n default: withCtx((scope) => [\n renderSlot(_ctx.$slots, \"default\", scope)\n ]),\n empty: withCtx(() => [\n renderSlot(_ctx.$slots, \"empty\", {}, () => [\n createVNode(\"p\", _hoisted_7, toDisplayString(_ctx.emptyText), 1)\n ])\n ]),\n _: 1\n }, 8, [\"data\", \"width\", \"hovering-index\"])\n ]),\n _: 1\n }, 8, [\"visible\", \"append-to-body\", \"popper-class\", \"popper-options\", \"onBeforeEnter\"])\n ], 34)), [\n [_directive_click_outside, _ctx.handleClickOutside, _ctx.popperRef]\n ]);\n}\n\nscript$3.render = render$2;\nscript$3.__file = \"packages/select-v2/src/select.vue\";\n\nscript$3.install = (app) => {\n app.component(script$3.name, script$3);\n};\n\nexport default script$3;\n","import { nextTick } from 'vue';\nimport throttle from 'lodash/throttle';\nimport { entries } from '../utils/util';\nimport { getScrollContainer, getOffsetTopDistance } from '../utils/dom';\nimport throwError from '../utils/error';\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst isFunction = (val) => typeof val === 'function';\n\nvar __async = (__this, __arguments, generator) => {\n return new Promise((resolve, reject) => {\n var fulfilled = (value) => {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n };\n var rejected = (value) => {\n try {\n step(generator.throw(value));\n } catch (e) {\n reject(e);\n }\n };\n var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);\n step((generator = generator.apply(__this, __arguments)).next());\n });\n};\nconst SCOPE = \"ElInfiniteScroll\";\nconst CHECK_INTERVAL = 50;\nconst DEFAULT_DELAY = 200;\nconst DEFAULT_DISTANCE = 0;\nconst attributes = {\n delay: {\n type: Number,\n default: DEFAULT_DELAY\n },\n distance: {\n type: Number,\n default: DEFAULT_DISTANCE\n },\n disabled: {\n type: Boolean,\n default: false\n },\n immediate: {\n type: Boolean,\n default: true\n }\n};\nconst getScrollOptions = (el, instance) => {\n return entries(attributes).reduce((acm, [name, option]) => {\n var _a, _b;\n const { type, default: defaultValue } = option;\n const attrVal = el.getAttribute(`infinite-scroll-${name}`);\n let value = (_b = (_a = instance[attrVal]) != null ? _a : attrVal) != null ? _b : defaultValue;\n value = value === \"false\" ? false : value;\n value = type(value);\n acm[name] = Number.isNaN(value) ? defaultValue : value;\n return acm;\n }, {});\n};\nconst destroyObserver = (el) => {\n const { observer } = el[SCOPE];\n if (observer) {\n observer.disconnect();\n delete el[SCOPE].observer;\n }\n};\nconst handleScroll = (el, cb) => {\n const {\n container,\n containerEl,\n instance,\n observer,\n lastScrollTop\n } = el[SCOPE];\n const { disabled, distance } = getScrollOptions(el, instance);\n const { clientHeight, scrollHeight, scrollTop } = containerEl;\n const delta = scrollTop - lastScrollTop;\n el[SCOPE].lastScrollTop = scrollTop;\n if (observer || disabled || delta < 0)\n return;\n let shouldTrigger = false;\n if (container === el) {\n shouldTrigger = scrollHeight - (clientHeight + scrollTop) <= distance;\n } else {\n const { clientTop, scrollHeight: height } = el;\n const offsetTop = getOffsetTopDistance(el, containerEl);\n shouldTrigger = scrollTop + clientHeight >= offsetTop + clientTop + height - distance;\n }\n if (shouldTrigger) {\n cb.call(instance);\n }\n};\nfunction checkFull(el, cb) {\n const { containerEl, instance } = el[SCOPE];\n const { disabled } = getScrollOptions(el, instance);\n if (disabled)\n return;\n if (containerEl.scrollHeight <= containerEl.clientHeight) {\n cb.call(instance);\n } else {\n destroyObserver(el);\n }\n}\nconst InfiniteScroll = {\n mounted(el, binding) {\n return __async(this, null, function* () {\n const { instance, value: cb } = binding;\n if (!isFunction(cb)) {\n throwError(SCOPE, \"'v-infinite-scroll' binding value must be a function\");\n }\n yield nextTick();\n const { delay, immediate } = getScrollOptions(el, instance);\n const container = getScrollContainer(el, true);\n const containerEl = container === window ? document.documentElement : container;\n const onScroll = throttle(handleScroll.bind(null, el, cb), delay);\n if (!container)\n return;\n el[SCOPE] = {\n instance,\n container,\n containerEl,\n delay,\n cb,\n onScroll,\n lastScrollTop: containerEl.scrollTop\n };\n if (immediate) {\n const observer = new MutationObserver(throttle(checkFull.bind(null, el, cb), CHECK_INTERVAL));\n el[SCOPE].observer = observer;\n observer.observe(el, { childList: true, subtree: true });\n checkFull(el, cb);\n }\n container.addEventListener(\"scroll\", onScroll);\n });\n },\n unmounted(el) {\n const { container, onScroll } = el[SCOPE];\n container == null ? void 0 : container.removeEventListener(\"scroll\", onScroll);\n destroyObserver(el);\n }\n};\n\nconst _InfiniteScroll = InfiniteScroll;\n_InfiniteScroll.install = (app) => {\n app.directive(\"InfiniteScroll\", _InfiniteScroll);\n};\n\nexport default _InfiniteScroll;\n","import { ref, reactive, toRefs, createVNode, render, h, Transition, withCtx, withDirectives, vShow, nextTick } from 'vue';\nimport { removeClass, getStyle, addClass } from '../utils/dom';\nimport PopupManager from '../utils/popup-manager';\nimport isServer from '../utils/isServer';\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\r\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction createLoadingComponent({\n options,\n globalLoadingOption\n}) {\n let vm = null;\n let afterLeaveTimer = null;\n const afterLeaveFlag = ref(false);\n const data = reactive(__spreadProps(__spreadValues({}, options), {\n originalPosition: \"\",\n originalOverflow: \"\",\n visible: false\n }));\n function setText(text) {\n data.text = text;\n }\n function destroySelf() {\n const target = data.parent;\n if (!target.vLoadingAddClassList) {\n let loadingNumber = target.getAttribute(\"loading-number\");\n loadingNumber = Number.parseInt(loadingNumber) - 1;\n if (!loadingNumber) {\n removeClass(target, \"el-loading-parent--relative\");\n target.removeAttribute(\"loading-number\");\n } else {\n target.setAttribute(\"loading-number\", loadingNumber.toString());\n }\n removeClass(target, \"el-loading-parent--hidden\");\n }\n if (vm.el && vm.el.parentNode) {\n vm.el.parentNode.removeChild(vm.el);\n }\n }\n function close() {\n const target = data.parent;\n target.vLoadingAddClassList = null;\n if (data.fullscreen) {\n globalLoadingOption.fullscreenLoading = void 0;\n }\n afterLeaveFlag.value = true;\n clearTimeout(afterLeaveTimer);\n afterLeaveTimer = window.setTimeout(() => {\n if (afterLeaveFlag.value) {\n afterLeaveFlag.value = false;\n destroySelf();\n }\n }, 400);\n data.visible = false;\n }\n function handleAfterLeave() {\n if (!afterLeaveFlag.value)\n return;\n afterLeaveFlag.value = false;\n destroySelf();\n }\n const componentSetupConfig = __spreadProps(__spreadValues({}, toRefs(data)), {\n setText,\n close,\n handleAfterLeave\n });\n const elLoadingComponent = {\n name: \"ElLoading\",\n setup() {\n return componentSetupConfig;\n },\n render() {\n const spinner = h(\"svg\", __spreadValues({\n class: \"circular\",\n viewBox: this.svgViewBox ? this.svgViewBox : \"25 25 50 50\"\n }, this.svg ? { innerHTML: this.svg } : {}), [\n h(\"circle\", { class: \"path\", cx: \"50\", cy: \"50\", r: \"20\", fill: \"none\" })\n ]);\n const noSpinner = h(\"i\", { class: this.spinner });\n const spinnerText = h(\"p\", { class: \"el-loading-text\" }, [this.text]);\n return h(Transition, {\n name: \"el-loading-fade\",\n onAfterLeave: this.handleAfterLeave\n }, {\n default: withCtx(() => [withDirectives(createVNode(\"div\", {\n style: {\n backgroundColor: this.background || \"\"\n },\n class: [\n \"el-loading-mask\",\n this.customClass,\n this.fullscreen ? \"is-fullscreen\" : \"\"\n ]\n }, [\n h(\"div\", {\n class: \"el-loading-spinner\"\n }, [\n !this.spinner ? spinner : noSpinner,\n this.text ? spinnerText : null\n ])\n ]), [[vShow, this.visible]])])\n });\n }\n };\n vm = createVNode(elLoadingComponent);\n render(vm, document.createElement(\"div\"));\n return __spreadProps(__spreadValues({}, componentSetupConfig), {\n vm,\n get $el() {\n return vm.el;\n }\n });\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nvar __async = (__this, __arguments, generator) => {\n return new Promise((resolve, reject) => {\n var fulfilled = (value) => {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n };\n var rejected = (value) => {\n try {\n step(generator.throw(value));\n } catch (e) {\n reject(e);\n }\n };\n var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);\n step((generator = generator.apply(__this, __arguments)).next());\n });\n};\nconst defaults = {\n parent: null,\n background: \"\",\n svg: null,\n svgViewBox: null,\n spinner: false,\n text: null,\n fullscreen: true,\n body: false,\n lock: false,\n customClass: \"\"\n};\nconst globalLoadingOption = {\n fullscreenLoading: null\n};\nconst addStyle = (options, parent, instance) => __async(undefined, null, function* () {\n const maskStyle = {};\n if (options.fullscreen) {\n instance.originalPosition.value = getStyle(document.body, \"position\");\n instance.originalOverflow.value = getStyle(document.body, \"overflow\");\n maskStyle.zIndex = String(PopupManager.nextZIndex());\n } else if (options.body) {\n instance.originalPosition.value = getStyle(document.body, \"position\");\n yield nextTick();\n [\"top\", \"left\"].forEach((property) => {\n const scroll = property === \"top\" ? \"scrollTop\" : \"scrollLeft\";\n maskStyle[property] = options.target.getBoundingClientRect()[property] + document.body[scroll] + document.documentElement[scroll] - parseInt(getStyle(document.body, `margin-${property}`), 10) + \"px\";\n });\n [\"height\", \"width\"].forEach((property) => {\n maskStyle[property] = options.target.getBoundingClientRect()[property] + \"px\";\n });\n } else {\n instance.originalPosition.value = getStyle(parent, \"position\");\n }\n Object.keys(maskStyle).forEach((property) => {\n instance.$el.style[property] = maskStyle[property];\n });\n});\nconst addClassList = (options, parent, instance) => {\n if (instance.originalPosition.value !== \"absolute\" && instance.originalPosition.value !== \"fixed\") {\n addClass(parent, \"el-loading-parent--relative\");\n } else {\n removeClass(parent, \"el-loading-parent--relative\");\n }\n if (options.fullscreen && options.lock) {\n addClass(parent, \"el-loading-parent--hidden\");\n } else {\n removeClass(parent, \"el-loading-parent--hidden\");\n }\n};\nconst Loading = function(options = {}) {\n if (isServer)\n return;\n options = __spreadValues$1(__spreadValues$1({}, defaults), options);\n if (typeof options.target === \"string\") {\n options.target = document.querySelector(options.target);\n }\n options.target = options.target || document.body;\n if (options.target !== document.body) {\n options.fullscreen = false;\n } else {\n options.body = true;\n }\n if (options.fullscreen && globalLoadingOption.fullscreenLoading) {\n globalLoadingOption.fullscreenLoading.close();\n }\n const parent = options.body ? document.body : options.target;\n options.parent = parent;\n const instance = createLoadingComponent({\n options,\n globalLoadingOption\n });\n addStyle(options, parent, instance);\n addClassList(options, parent, instance);\n options.parent.vLoadingAddClassList = () => {\n addClassList(options, parent, instance);\n };\n let loadingNumber = parent.getAttribute(\"loading-number\");\n if (!loadingNumber) {\n loadingNumber = 1;\n } else {\n loadingNumber = Number.parseInt(loadingNumber) + 1;\n }\n parent.setAttribute(\"loading-number\", loadingNumber.toString());\n parent.appendChild(instance.$el);\n nextTick().then(() => {\n instance.visible.value = hasOwn(options, \"visible\") ? options.visible : true;\n });\n if (options.fullscreen) {\n globalLoadingOption.fullscreenLoading = instance;\n }\n return instance;\n};\n\nconst createInstance = (el, binding) => {\n const textExr = el.getAttribute(\"element-loading-text\");\n const spinnerExr = el.getAttribute(\"element-loading-spinner\");\n const svgExr = el.getAttribute(\"element-loading-svg\");\n const svgViewBoxExr = el.getAttribute(\"element-loading-svg-view-box\");\n const backgroundExr = el.getAttribute(\"element-loading-background\");\n const customClassExr = el.getAttribute(\"element-loading-custom-class\");\n const vm = binding.instance;\n el.instance = Loading({\n text: vm && vm[textExr] || textExr,\n svg: vm && vm[svgExr] || svgExr,\n svgViewBox: vm && vm[svgViewBoxExr] || svgViewBoxExr,\n spinner: vm && vm[spinnerExr] || spinnerExr,\n background: vm && vm[backgroundExr] || backgroundExr,\n customClass: vm && vm[customClassExr] || customClassExr,\n fullscreen: !!binding.modifiers.fullscreen,\n target: !!binding.modifiers.fullscreen ? null : el,\n body: !!binding.modifiers.body,\n visible: true,\n lock: !!binding.modifiers.lock\n });\n};\nconst vLoading = {\n mounted(el, binding) {\n if (!!binding.value) {\n createInstance(el, binding);\n }\n },\n updated(el, binding) {\n const instance = el.instance;\n if (binding.oldValue !== binding.value) {\n if (binding.value) {\n createInstance(el, binding);\n } else {\n instance.close();\n }\n }\n },\n unmounted(el) {\n var _a;\n (_a = el == null ? void 0 : el.instance) == null ? void 0 : _a.close();\n }\n};\n\nvar index = {\n install(app) {\n app.directive(\"loading\", vLoading);\n app.config.globalProperties.$loading = Loading;\n },\n directive: vLoading,\n service: Loading\n};\n\nexport default index;\n","import { defineComponent, computed, ref, onMounted, onBeforeUnmount, openBlock, createBlock, Transition, withCtx, withDirectives, createVNode, createCommentVNode, renderSlot, toDisplayString, Fragment, withModifiers, vShow, render as render$1 } from 'vue';\nimport { isVNode } from '../utils/util';\nimport PopupManager from '../utils/popup-manager';\nimport isServer from '../utils/isServer';\nimport 'lodash/isEqualWith';\n\nconst EVENT_CODE = {\n tab: \"Tab\",\n enter: \"Enter\",\n space: \"Space\",\n left: \"ArrowLeft\",\n up: \"ArrowUp\",\n right: \"ArrowRight\",\n down: \"ArrowDown\",\n esc: \"Escape\",\n delete: \"Delete\",\n backspace: \"Backspace\"\n};\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\n\nconst on = function(element, event, handler, useCapture = false) {\n if (element && event && handler) {\n element.addEventListener(event, handler, useCapture);\n }\n};\nconst off = function(element, event, handler, useCapture = false) {\n if (element && event && handler) {\n element.removeEventListener(event, handler, useCapture);\n }\n};\n\nconst TypeMap = {\n success: \"success\",\n info: \"info\",\n warning: \"warning\",\n error: \"error\"\n};\nvar script = defineComponent({\n name: \"ElMessage\",\n props: {\n customClass: { type: String, default: \"\" },\n center: { type: Boolean, default: false },\n dangerouslyUseHTMLString: { type: Boolean, default: false },\n duration: { type: Number, default: 3e3 },\n iconClass: { type: String, default: \"\" },\n id: { type: String, default: \"\" },\n message: {\n type: [String, Object],\n default: \"\"\n },\n onClose: {\n type: Function,\n required: true\n },\n showClose: { type: Boolean, default: false },\n type: { type: String, default: \"info\" },\n offset: { type: Number, default: 20 },\n zIndex: { type: Number, default: 0 }\n },\n emits: [\"destroy\"],\n setup(props) {\n const typeClass = computed(() => {\n const type = props.type;\n return type && TypeMap[type] ? `el-message__icon el-icon-${TypeMap[type]}` : \"\";\n });\n const customStyle = computed(() => {\n return {\n top: `${props.offset}px`,\n zIndex: props.zIndex\n };\n });\n const visible = ref(false);\n let timer = null;\n function startTimer() {\n if (props.duration > 0) {\n timer = setTimeout(() => {\n if (visible.value) {\n close();\n }\n }, props.duration);\n }\n }\n function clearTimer() {\n clearTimeout(timer);\n timer = null;\n }\n function close() {\n visible.value = false;\n }\n function keydown({ code }) {\n if (code === EVENT_CODE.esc) {\n if (visible.value) {\n close();\n }\n } else {\n startTimer();\n }\n }\n onMounted(() => {\n startTimer();\n visible.value = true;\n on(document, \"keydown\", keydown);\n });\n onBeforeUnmount(() => {\n off(document, \"keydown\", keydown);\n });\n return {\n typeClass,\n customStyle,\n visible,\n close,\n clearTimer,\n startTimer\n };\n }\n});\n\nconst _hoisted_1 = {\n key: 0,\n class: \"el-message__content\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(Transition, {\n name: \"el-message-fade\",\n onBeforeLeave: _ctx.onClose,\n onAfterLeave: _cache[4] || (_cache[4] = ($event) => _ctx.$emit(\"destroy\"))\n }, {\n default: withCtx(() => [\n withDirectives(createVNode(\"div\", {\n id: _ctx.id,\n class: [\n \"el-message\",\n _ctx.type && !_ctx.iconClass ? `el-message--${_ctx.type}` : \"\",\n _ctx.center ? \"is-center\" : \"\",\n _ctx.showClose ? \"is-closable\" : \"\",\n _ctx.customClass\n ],\n style: _ctx.customStyle,\n role: \"alert\",\n onMouseenter: _cache[2] || (_cache[2] = (...args) => _ctx.clearTimer && _ctx.clearTimer(...args)),\n onMouseleave: _cache[3] || (_cache[3] = (...args) => _ctx.startTimer && _ctx.startTimer(...args))\n }, [\n _ctx.type || _ctx.iconClass ? (openBlock(), createBlock(\"i\", {\n key: 0,\n class: [_ctx.typeClass, _ctx.iconClass]\n }, null, 2)) : createCommentVNode(\"v-if\", true),\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n !_ctx.dangerouslyUseHTMLString ? (openBlock(), createBlock(\"p\", _hoisted_1, toDisplayString(_ctx.message), 1)) : (openBlock(), createBlock(Fragment, { key: 1 }, [\n createCommentVNode(\" Caution here, message could've been compromised, never use user's input as message \"),\n createCommentVNode(\" eslint-disable-next-line \"),\n createVNode(\"p\", {\n class: \"el-message__content\",\n innerHTML: _ctx.message\n }, null, 8, [\"innerHTML\"])\n ], 2112))\n ]),\n _ctx.showClose ? (openBlock(), createBlock(\"div\", {\n key: 1,\n class: \"el-message__closeBtn el-icon-close\",\n onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.close && _ctx.close(...args), [\"stop\"]))\n })) : createCommentVNode(\"v-if\", true)\n ], 46, [\"id\"]), [\n [vShow, _ctx.visible]\n ])\n ]),\n _: 3\n }, 8, [\"onBeforeLeave\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/message/src/index.vue\";\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nconst instances = [];\nlet seed = 1;\nconst Message = function(opts = {}) {\n if (isServer)\n return;\n if (typeof opts === \"string\") {\n opts = {\n message: opts\n };\n }\n let options = opts;\n let verticalOffset = opts.offset || 20;\n instances.forEach(({ vm: vm2 }) => {\n verticalOffset += (vm2.el.offsetHeight || 0) + 16;\n });\n verticalOffset += 16;\n const id = \"message_\" + seed++;\n const userOnClose = options.onClose;\n options = __spreadProps(__spreadValues({}, options), {\n onClose: () => {\n close(id, userOnClose);\n },\n offset: verticalOffset,\n id,\n zIndex: PopupManager.nextZIndex()\n });\n const container = document.createElement(\"div\");\n container.className = `container_${id}`;\n const message = options.message;\n const vm = createVNode(script, options, isVNode(options.message) ? { default: () => message } : null);\n vm.props.onDestroy = () => {\n render$1(null, container);\n };\n render$1(vm, container);\n instances.push({ vm });\n document.body.appendChild(container.firstElementChild);\n return {\n close: () => vm.component.proxy.visible = false\n };\n};\nfunction close(id, userOnClose) {\n const idx = instances.findIndex(({ vm: vm2 }) => {\n const { id: _id } = vm2.component.props;\n return id === _id;\n });\n if (idx === -1) {\n return;\n }\n const { vm } = instances[idx];\n if (!vm)\n return;\n userOnClose == null ? void 0 : userOnClose(vm);\n const removedHeight = vm.el.offsetHeight;\n instances.splice(idx, 1);\n const len = instances.length;\n if (len < 1)\n return;\n for (let i = idx; i < len; i++) {\n const pos = parseInt(instances[i].vm.el.style[\"top\"], 10) - removedHeight - 16;\n instances[i].vm.component.props.offset = pos;\n }\n}\nfunction closeAll() {\n for (let i = instances.length - 1; i >= 0; i--) {\n const instance = instances[i].vm.component;\n instance.ctx.close();\n }\n}\n[\"success\", \"warning\", \"info\", \"error\"].forEach((type) => {\n Message[type] = (options) => {\n if (typeof options === \"string\") {\n options = {\n message: options,\n type\n };\n } else {\n options.type = type;\n }\n return Message(options);\n };\n});\nMessage.closeAll = closeAll;\n\nconst _Message = Message;\n_Message.install = (app) => {\n app.config.globalProperties.$message = _Message;\n};\n\nexport default _Message;\n","import { defineComponent, ref, reactive, computed, watch, nextTick, onMounted, onBeforeUnmount, toRefs, resolveComponent, resolveDirective, openBlock, createBlock, Transition, withCtx, withDirectives, createVNode, withModifiers, createCommentVNode, toDisplayString, withKeys, renderSlot, vShow, createTextVNode, render as render$1, h } from 'vue';\nimport ElButton from '../el-button';\nimport ElInput from '../el-input';\nimport { useLocaleInject, useModal, usePreventGlobal, useLockScreen, useRestoreActive } from '../hooks';\nimport { Overlay } from '../el-overlay';\nimport { TrapFocus } from '../directives';\nimport PopupManager from '../utils/popup-manager';\nimport { on, off } from '../utils/dom';\nimport { EVENT_CODE } from '../utils/aria';\nimport { isValidComponentSize } from '../utils/validators';\nimport isServer from '../utils/isServer';\nimport { isString, isVNode } from '../utils/util';\n\n/**\r\n * Make a map and return a function for checking if a key\r\n * is in that map.\r\n * IMPORTANT: all calls of this function must be prefixed with\r\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\r\n * So that rollup can tree-shake them if necessary.\r\n */\r\nconst EMPTY_OBJ = (process.env.NODE_ENV !== 'production')\r\n ? Object.freeze({})\r\n : {};\r\nconst EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : [];\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\r\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar __async = (__this, __arguments, generator) => {\n return new Promise((resolve, reject) => {\n var fulfilled = (value) => {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n };\n var rejected = (value) => {\n try {\n step(generator.throw(value));\n } catch (e) {\n reject(e);\n }\n };\n var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);\n step((generator = generator.apply(__this, __arguments)).next());\n });\n};\nconst TypeMap = {\n success: \"success\",\n info: \"info\",\n warning: \"warning\",\n error: \"error\"\n};\nvar script = defineComponent({\n name: \"ElMessageBox\",\n directives: {\n TrapFocus\n },\n components: {\n ElButton,\n ElInput,\n ElOverlay: Overlay\n },\n inheritAttrs: false,\n props: {\n buttonSize: {\n type: String,\n validator: isValidComponentSize\n },\n modal: {\n type: Boolean,\n default: true\n },\n lockScroll: {\n type: Boolean,\n default: true\n },\n showClose: {\n type: Boolean,\n default: true\n },\n closeOnClickModal: {\n type: Boolean,\n default: true\n },\n closeOnPressEscape: {\n type: Boolean,\n default: true\n },\n closeOnHashChange: {\n type: Boolean,\n default: true\n },\n center: Boolean,\n roundButton: {\n default: false,\n type: Boolean\n },\n container: {\n type: String,\n default: \"body\"\n },\n boxType: {\n type: String,\n default: \"\"\n }\n },\n emits: [\"vanish\", \"action\"],\n setup(props, { emit }) {\n const { t } = useLocaleInject();\n const visible = ref(false);\n const state = reactive({\n beforeClose: null,\n callback: null,\n cancelButtonText: \"\",\n cancelButtonClass: \"\",\n confirmButtonText: \"\",\n confirmButtonClass: \"\",\n customClass: \"\",\n dangerouslyUseHTMLString: false,\n distinguishCancelAndClose: false,\n iconClass: \"\",\n inputPattern: null,\n inputPlaceholder: \"\",\n inputType: \"text\",\n inputValue: null,\n inputValidator: null,\n inputErrorMessage: \"\",\n message: null,\n modalFade: true,\n modalClass: \"\",\n showCancelButton: false,\n showConfirmButton: true,\n type: \"\",\n title: void 0,\n showInput: false,\n action: \"\",\n confirmButtonLoading: false,\n cancelButtonLoading: false,\n confirmButtonDisabled: false,\n editorErrorMessage: \"\",\n validateError: false,\n zIndex: PopupManager.nextZIndex()\n });\n const icon = computed(() => state.iconClass || (state.type && TypeMap[state.type] ? `el-icon-${TypeMap[state.type]}` : \"\"));\n const hasMessage = computed(() => !!state.message);\n const inputRef = ref(null);\n const confirmRef = ref(null);\n const confirmButtonClasses = computed(() => `el-button--primary ${state.confirmButtonClass}`);\n watch(() => state.inputValue, (val) => __async(this, null, function* () {\n yield nextTick();\n if (props.boxType === \"prompt\" && val !== null) {\n validate();\n }\n }), { immediate: true });\n watch(() => visible.value, (val) => {\n if (val) {\n if (props.boxType === \"alert\" || props.boxType === \"confirm\") {\n nextTick().then(() => {\n var _a, _b, _c;\n (_c = (_b = (_a = confirmRef.value) == null ? void 0 : _a.$el) == null ? void 0 : _b.focus) == null ? void 0 : _c.call(_b);\n });\n }\n state.zIndex = PopupManager.nextZIndex();\n }\n if (props.boxType !== \"prompt\")\n return;\n if (val) {\n nextTick().then(() => {\n if (inputRef.value && inputRef.value.$el) {\n getInputElement().focus();\n }\n });\n } else {\n state.editorErrorMessage = \"\";\n state.validateError = false;\n }\n });\n onMounted(() => __async(this, null, function* () {\n yield nextTick();\n if (props.closeOnHashChange) {\n on(window, \"hashchange\", doClose);\n }\n }));\n onBeforeUnmount(() => {\n if (props.closeOnHashChange) {\n off(window, \"hashchange\", doClose);\n }\n });\n function doClose() {\n if (!visible.value)\n return;\n visible.value = false;\n nextTick(() => {\n if (state.action)\n emit(\"action\", state.action);\n });\n }\n const handleWrapperClick = () => {\n if (props.closeOnClickModal) {\n handleAction(state.distinguishCancelAndClose ? \"close\" : \"cancel\");\n }\n };\n const handleInputEnter = () => {\n if (state.inputType !== \"textarea\") {\n return handleAction(\"confirm\");\n }\n };\n const handleAction = (action) => {\n var _a;\n if (props.boxType === \"prompt\" && action === \"confirm\" && !validate()) {\n return;\n }\n state.action = action;\n if (state.beforeClose) {\n (_a = state.beforeClose) == null ? void 0 : _a.call(state, action, state, doClose);\n } else {\n doClose();\n }\n };\n const validate = () => {\n if (props.boxType === \"prompt\") {\n const inputPattern = state.inputPattern;\n if (inputPattern && !inputPattern.test(state.inputValue || \"\")) {\n state.editorErrorMessage = state.inputErrorMessage || t(\"el.messagebox.error\");\n state.validateError = true;\n return false;\n }\n const inputValidator = state.inputValidator;\n if (typeof inputValidator === \"function\") {\n const validateResult = inputValidator(state.inputValue);\n if (validateResult === false) {\n state.editorErrorMessage = state.inputErrorMessage || t(\"el.messagebox.error\");\n state.validateError = true;\n return false;\n }\n if (typeof validateResult === \"string\") {\n state.editorErrorMessage = validateResult;\n state.validateError = true;\n return false;\n }\n }\n }\n state.editorErrorMessage = \"\";\n state.validateError = false;\n return true;\n };\n const getInputElement = () => {\n const inputRefs = inputRef.value.$refs;\n return inputRefs.input || inputRefs.textarea;\n };\n const handleClose = () => {\n handleAction(\"close\");\n };\n if (props.closeOnPressEscape) {\n useModal({\n handleClose\n }, visible);\n } else {\n usePreventGlobal(visible, \"keydown\", (e) => e.code === EVENT_CODE.esc);\n }\n if (props.lockScroll) {\n useLockScreen(visible);\n }\n useRestoreActive(visible);\n return __spreadProps(__spreadValues({}, toRefs(state)), {\n visible,\n hasMessage,\n icon,\n confirmButtonClasses,\n inputRef,\n confirmRef,\n doClose,\n handleClose,\n handleWrapperClick,\n handleInputEnter,\n handleAction,\n t\n });\n }\n});\n\nconst _hoisted_1 = {\n key: 0,\n class: \"el-message-box__header\"\n};\nconst _hoisted_2 = { class: \"el-message-box__title\" };\nconst _hoisted_3 = /* @__PURE__ */ createVNode(\"i\", { class: \"el-message-box__close el-icon-close\" }, null, -1);\nconst _hoisted_4 = { class: \"el-message-box__content\" };\nconst _hoisted_5 = { class: \"el-message-box__container\" };\nconst _hoisted_6 = {\n key: 1,\n class: \"el-message-box__message\"\n};\nconst _hoisted_7 = { key: 0 };\nconst _hoisted_8 = { class: \"el-message-box__input\" };\nconst _hoisted_9 = { class: \"el-message-box__btns\" };\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_input = resolveComponent(\"el-input\");\n const _component_el_button = resolveComponent(\"el-button\");\n const _component_el_overlay = resolveComponent(\"el-overlay\");\n const _directive_trap_focus = resolveDirective(\"trap-focus\");\n return openBlock(), createBlock(Transition, {\n name: \"fade-in-linear\",\n onAfterLeave: _cache[8] || (_cache[8] = ($event) => _ctx.$emit(\"vanish\"))\n }, {\n default: withCtx(() => [\n withDirectives(createVNode(_component_el_overlay, {\n \"z-index\": _ctx.zIndex,\n \"overlay-class\": [\"is-message-box\", _ctx.modalClass],\n mask: _ctx.modal,\n onClick: withModifiers(_ctx.handleWrapperClick, [\"self\"])\n }, {\n default: withCtx(() => [\n withDirectives(createVNode(\"div\", {\n ref: \"root\",\n \"aria-label\": _ctx.title || \"dialog\",\n \"aria-modal\": \"true\",\n class: [\n \"el-message-box\",\n _ctx.customClass,\n { \"el-message-box--center\": _ctx.center }\n ]\n }, [\n _ctx.title !== null && _ctx.title !== void 0 ? (openBlock(), createBlock(\"div\", _hoisted_1, [\n createVNode(\"div\", _hoisted_2, [\n _ctx.icon && _ctx.center ? (openBlock(), createBlock(\"div\", {\n key: 0,\n class: [\"el-message-box__status\", _ctx.icon]\n }, null, 2)) : createCommentVNode(\"v-if\", true),\n createVNode(\"span\", null, toDisplayString(_ctx.title), 1)\n ]),\n _ctx.showClose ? (openBlock(), createBlock(\"button\", {\n key: 0,\n type: \"button\",\n class: \"el-message-box__headerbtn\",\n \"aria-label\": \"Close\",\n onClick: _cache[1] || (_cache[1] = ($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? \"close\" : \"cancel\")),\n onKeydown: _cache[2] || (_cache[2] = withKeys(withModifiers(($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? \"close\" : \"cancel\"), [\"prevent\"]), [\"enter\"]))\n }, [\n _hoisted_3\n ], 32)) : createCommentVNode(\"v-if\", true)\n ])) : createCommentVNode(\"v-if\", true),\n createVNode(\"div\", _hoisted_4, [\n createVNode(\"div\", _hoisted_5, [\n _ctx.icon && !_ctx.center && _ctx.hasMessage ? (openBlock(), createBlock(\"div\", {\n key: 0,\n class: [\"el-message-box__status\", _ctx.icon]\n }, null, 2)) : createCommentVNode(\"v-if\", true),\n _ctx.hasMessage ? (openBlock(), createBlock(\"div\", _hoisted_6, [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n !_ctx.dangerouslyUseHTMLString ? (openBlock(), createBlock(\"p\", _hoisted_7, toDisplayString(_ctx.message), 1)) : (openBlock(), createBlock(\"p\", {\n key: 1,\n innerHTML: _ctx.message\n }, null, 8, [\"innerHTML\"]))\n ])\n ])) : createCommentVNode(\"v-if\", true)\n ]),\n withDirectives(createVNode(\"div\", _hoisted_8, [\n createVNode(_component_el_input, {\n ref: \"inputRef\",\n modelValue: _ctx.inputValue,\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = ($event) => _ctx.inputValue = $event),\n type: _ctx.inputType,\n placeholder: _ctx.inputPlaceholder,\n class: { invalid: _ctx.validateError },\n onKeydown: withKeys(withModifiers(_ctx.handleInputEnter, [\"prevent\"]), [\"enter\"])\n }, null, 8, [\"modelValue\", \"type\", \"placeholder\", \"class\", \"onKeydown\"]),\n createVNode(\"div\", {\n class: \"el-message-box__errormsg\",\n style: {\n visibility: !!_ctx.editorErrorMessage ? \"visible\" : \"hidden\"\n }\n }, toDisplayString(_ctx.editorErrorMessage), 5)\n ], 512), [\n [vShow, _ctx.showInput]\n ])\n ]),\n createVNode(\"div\", _hoisted_9, [\n _ctx.showCancelButton ? (openBlock(), createBlock(_component_el_button, {\n key: 0,\n loading: _ctx.cancelButtonLoading,\n class: [_ctx.cancelButtonClass],\n round: _ctx.roundButton,\n size: _ctx.buttonSize || \"small\",\n onClick: _cache[4] || (_cache[4] = ($event) => _ctx.handleAction(\"cancel\")),\n onKeydown: _cache[5] || (_cache[5] = withKeys(withModifiers(($event) => _ctx.handleAction(\"cancel\"), [\"prevent\"]), [\"enter\"]))\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.cancelButtonText || _ctx.t(\"el.messagebox.cancel\")), 1)\n ]),\n _: 1\n }, 8, [\"loading\", \"class\", \"round\", \"size\"])) : createCommentVNode(\"v-if\", true),\n withDirectives(createVNode(_component_el_button, {\n ref: \"confirmRef\",\n loading: _ctx.confirmButtonLoading,\n class: [_ctx.confirmButtonClasses],\n round: _ctx.roundButton,\n disabled: _ctx.confirmButtonDisabled,\n size: _ctx.buttonSize || \"small\",\n onClick: _cache[6] || (_cache[6] = ($event) => _ctx.handleAction(\"confirm\")),\n onKeydown: _cache[7] || (_cache[7] = withKeys(withModifiers(($event) => _ctx.handleAction(\"confirm\"), [\"prevent\"]), [\"enter\"]))\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.confirmButtonText || _ctx.t(\"el.messagebox.confirm\")), 1)\n ]),\n _: 1\n }, 8, [\"loading\", \"class\", \"round\", \"disabled\", \"size\"]), [\n [vShow, _ctx.showConfirmButton]\n ])\n ])\n ], 10, [\"aria-label\"]), [\n [_directive_trap_focus]\n ])\n ]),\n _: 3\n }, 8, [\"z-index\", \"overlay-class\", \"mask\", \"onClick\"]), [\n [vShow, _ctx.visible]\n ])\n ]),\n _: 1\n });\n}\n\nscript.render = render;\nscript.__file = \"packages/message-box/src/index.vue\";\n\nconst messageInstance = new Map();\nconst initInstance = (props, container) => {\n const vnode = h(script, props);\n render$1(vnode, container);\n document.body.appendChild(container.firstElementChild);\n return vnode.component;\n};\nconst genContainer = () => {\n return document.createElement(\"div\");\n};\nconst showMessage = (options) => {\n const container = genContainer();\n options.onVanish = () => {\n render$1(null, container);\n messageInstance.delete(vm);\n };\n options.onAction = (action) => {\n const currentMsg = messageInstance.get(vm);\n let resolve;\n if (options.showInput) {\n resolve = { value: vm.inputValue, action };\n } else {\n resolve = action;\n }\n if (options.callback) {\n options.callback(resolve, instance.proxy);\n } else {\n if (action === \"cancel\" || action === \"close\") {\n if (options.distinguishCancelAndClose && action !== \"cancel\") {\n currentMsg.reject(\"close\");\n } else {\n currentMsg.reject(\"cancel\");\n }\n } else {\n currentMsg.resolve(resolve);\n }\n }\n };\n const instance = initInstance(options, container);\n const vm = instance.proxy;\n for (const prop in options) {\n if (hasOwn(options, prop) && !hasOwn(vm.$props, prop)) {\n vm[prop] = options[prop];\n }\n }\n watch(() => vm.message, (newVal, oldVal) => {\n if (isVNode(newVal)) {\n instance.slots.default = () => [newVal];\n } else if (isVNode(oldVal) && !isVNode(newVal)) {\n delete instance.slots.default;\n }\n }, {\n immediate: true\n });\n vm.visible = true;\n return vm;\n};\nfunction MessageBox(options) {\n if (isServer)\n return;\n let callback;\n if (isString(options) || isVNode(options)) {\n options = {\n message: options\n };\n } else {\n callback = options.callback;\n }\n return new Promise((resolve, reject) => {\n const vm = showMessage(options);\n messageInstance.set(vm, {\n options,\n callback,\n resolve,\n reject\n });\n });\n}\nMessageBox.alert = (message, title, options) => {\n if (typeof title === \"object\") {\n options = title;\n title = \"\";\n } else if (title === void 0) {\n title = \"\";\n }\n return MessageBox(Object.assign({\n title,\n message,\n type: \"\",\n closeOnPressEscape: false,\n closeOnClickModal: false\n }, options, {\n boxType: \"alert\"\n }));\n};\nMessageBox.confirm = (message, title, options) => {\n if (typeof title === \"object\") {\n options = title;\n title = \"\";\n } else if (title === void 0) {\n title = \"\";\n }\n return MessageBox(Object.assign({\n title,\n message,\n type: \"\",\n showCancelButton: true\n }, options, {\n boxType: \"confirm\"\n }));\n};\nMessageBox.prompt = (message, title, options) => {\n if (typeof title === \"object\") {\n options = title;\n title = \"\";\n } else if (title === void 0) {\n title = \"\";\n }\n return MessageBox(Object.assign({\n title,\n message,\n showCancelButton: true,\n showInput: true,\n type: \"\"\n }, options, {\n boxType: \"prompt\"\n }));\n};\nMessageBox.close = () => {\n messageInstance.forEach((_, vm) => {\n vm.doClose();\n });\n messageInstance.clear();\n};\n\nconst _MessageBox = MessageBox;\n_MessageBox.install = (app) => {\n app.config.globalProperties.$msgbox = _MessageBox;\n app.config.globalProperties.$messageBox = _MessageBox;\n app.config.globalProperties.$alert = _MessageBox.alert;\n app.config.globalProperties.$confirm = _MessageBox.confirm;\n app.config.globalProperties.$prompt = _MessageBox.prompt;\n};\n\nexport default _MessageBox;\n","import { defineComponent, ref, computed, onMounted, onBeforeUnmount, openBlock, createBlock, Transition, withCtx, withDirectives, createVNode, createCommentVNode, toDisplayString, renderSlot, Fragment, vShow, withModifiers, render as render$1 } from 'vue';\nimport { EVENT_CODE } from '../utils/aria';\nimport { on, off } from '../utils/dom';\nimport isServer from '../utils/isServer';\nimport PopupManager from '../utils/popup-manager';\nimport { isVNode } from '../utils/util';\n\nconst TypeMap = {\n success: \"success\",\n info: \"info\",\n warning: \"warning\",\n error: \"error\"\n};\nvar script = defineComponent({\n name: \"ElNotification\",\n props: {\n customClass: { type: String, default: \"\" },\n dangerouslyUseHTMLString: { type: Boolean, default: false },\n duration: { type: Number, default: 4500 },\n iconClass: { type: String, default: \"\" },\n id: { type: String, default: \"\" },\n message: {\n type: [String, Object],\n default: \"\"\n },\n offset: { type: Number, default: 0 },\n onClick: {\n type: Function,\n default: () => void 0\n },\n onClose: {\n type: Function,\n required: true\n },\n position: {\n type: String,\n default: \"top-right\"\n },\n showClose: { type: Boolean, default: true },\n title: { type: String, default: \"\" },\n type: { type: String, default: \"\" },\n zIndex: { type: Number, default: 0 }\n },\n emits: [\"destroy\"],\n setup(props) {\n const visible = ref(false);\n let timer = null;\n const typeClass = computed(() => {\n const type = props.type;\n return type && TypeMap[type] ? `el-icon-${TypeMap[type]}` : \"\";\n });\n const horizontalClass = computed(() => {\n return props.position.indexOf(\"right\") > 1 ? \"right\" : \"left\";\n });\n const verticalProperty = computed(() => {\n return props.position.startsWith(\"top\") ? \"top\" : \"bottom\";\n });\n const positionStyle = computed(() => {\n return {\n [verticalProperty.value]: `${props.offset}px`,\n \"z-index\": props.zIndex\n };\n });\n function startTimer() {\n if (props.duration > 0) {\n timer = setTimeout(() => {\n if (visible.value) {\n close();\n }\n }, props.duration);\n }\n }\n function clearTimer() {\n clearTimeout(timer);\n timer = null;\n }\n function close() {\n visible.value = false;\n }\n function onKeydown({ code }) {\n if (code === EVENT_CODE.delete || code === EVENT_CODE.backspace) {\n clearTimer();\n } else if (code === EVENT_CODE.esc) {\n if (visible.value) {\n close();\n }\n } else {\n startTimer();\n }\n }\n onMounted(() => {\n startTimer();\n visible.value = true;\n on(document, \"keydown\", onKeydown);\n });\n onBeforeUnmount(() => {\n off(document, \"keydown\", onKeydown);\n });\n return {\n horizontalClass,\n typeClass,\n positionStyle,\n visible,\n close,\n clearTimer,\n startTimer\n };\n }\n});\n\nconst _hoisted_1 = { key: 0 };\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createBlock(Transition, {\n name: \"el-notification-fade\",\n onBeforeLeave: _ctx.onClose,\n onAfterLeave: _cache[5] || (_cache[5] = ($event) => _ctx.$emit(\"destroy\"))\n }, {\n default: withCtx(() => [\n withDirectives(createVNode(\"div\", {\n id: _ctx.id,\n class: [\"el-notification\", _ctx.customClass, _ctx.horizontalClass],\n style: _ctx.positionStyle,\n role: \"alert\",\n onMouseenter: _cache[2] || (_cache[2] = (...args) => _ctx.clearTimer && _ctx.clearTimer(...args)),\n onMouseleave: _cache[3] || (_cache[3] = (...args) => _ctx.startTimer && _ctx.startTimer(...args)),\n onClick: _cache[4] || (_cache[4] = (...args) => _ctx.onClick && _ctx.onClick(...args))\n }, [\n _ctx.type || _ctx.iconClass ? (openBlock(), createBlock(\"i\", {\n key: 0,\n class: [\"el-notification__icon\", [_ctx.typeClass, _ctx.iconClass]]\n }, null, 2)) : createCommentVNode(\"v-if\", true),\n createVNode(\"div\", {\n class: [\"el-notification__group\", { \"is-with-icon\": _ctx.typeClass || _ctx.iconClass }]\n }, [\n createVNode(\"h2\", {\n class: \"el-notification__title\",\n textContent: toDisplayString(_ctx.title)\n }, null, 8, [\"textContent\"]),\n withDirectives(createVNode(\"div\", {\n class: \"el-notification__content\",\n style: !!_ctx.title ? null : \"margin: 0\"\n }, [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n !_ctx.dangerouslyUseHTMLString ? (openBlock(), createBlock(\"p\", _hoisted_1, toDisplayString(_ctx.message), 1)) : (openBlock(), createBlock(Fragment, { key: 1 }, [\n createCommentVNode(\" Caution here, message could've been compromized, nerver use user's input as message \"),\n createCommentVNode(\" eslint-disable-next-line \"),\n createVNode(\"p\", { innerHTML: _ctx.message }, null, 8, [\"innerHTML\"])\n ], 2112))\n ])\n ], 4), [\n [vShow, _ctx.message]\n ]),\n _ctx.showClose ? (openBlock(), createBlock(\"div\", {\n key: 0,\n class: \"el-notification__closeBtn el-icon-close\",\n onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.close && _ctx.close(...args), [\"stop\"]))\n })) : createCommentVNode(\"v-if\", true)\n ], 2)\n ], 46, [\"id\"]), [\n [vShow, _ctx.visible]\n ])\n ]),\n _: 3\n }, 8, [\"onBeforeLeave\"]);\n}\n\nscript.render = render;\nscript.__file = \"packages/notification/src/index.vue\";\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nconst notifications = {\n \"top-left\": [],\n \"top-right\": [],\n \"bottom-left\": [],\n \"bottom-right\": []\n};\nconst GAP_SIZE = 16;\nlet seed = 1;\nconst Notification = function(options = {}) {\n if (isServer)\n return;\n const position = options.position || \"top-right\";\n let verticalOffset = options.offset || 0;\n notifications[position].forEach(({ vm: vm2 }) => {\n verticalOffset += (vm2.el.offsetHeight || 0) + GAP_SIZE;\n });\n verticalOffset += GAP_SIZE;\n const id = \"notification_\" + seed++;\n const userOnClose = options.onClose;\n options = __spreadProps(__spreadValues({}, options), {\n onClose: () => {\n close(id, position, userOnClose);\n },\n offset: verticalOffset,\n id,\n zIndex: PopupManager.nextZIndex()\n });\n const container = document.createElement(\"div\");\n const vm = createVNode(script, options, isVNode(options.message) ? {\n default: () => options.message\n } : null);\n vm.props.onDestroy = () => {\n render$1(null, container);\n };\n render$1(vm, container);\n notifications[position].push({ vm });\n document.body.appendChild(container.firstElementChild);\n return {\n close: () => {\n vm.component.proxy.visible = false;\n }\n };\n};\n[\"success\", \"warning\", \"info\", \"error\"].forEach((type) => {\n Object.assign(Notification, {\n [type]: (options = {}) => {\n if (typeof options === \"string\" || isVNode(options)) {\n options = {\n message: options\n };\n }\n options.type = type;\n return Notification(options);\n }\n });\n});\nfunction close(id, position, userOnClose) {\n const orientedNotifications = notifications[position];\n const idx = orientedNotifications.findIndex(({ vm: vm2 }) => vm2.component.props.id === id);\n if (idx === -1)\n return;\n const { vm } = orientedNotifications[idx];\n if (!vm)\n return;\n userOnClose == null ? void 0 : userOnClose(vm);\n const removedHeight = vm.el.offsetHeight;\n const verticalPos = position.split(\"-\")[0];\n orientedNotifications.splice(idx, 1);\n const len = orientedNotifications.length;\n if (len < 1)\n return;\n for (let i = idx; i < len; i++) {\n const { el, component } = orientedNotifications[i].vm;\n const pos = parseInt(el.style[verticalPos], 10) - removedHeight - GAP_SIZE;\n component.props.offset = pos;\n }\n}\n\nconst _Notify = Notification;\n_Notify.install = (app) => {\n app.config.globalProperties.$notify = _Notify;\n};\n\nexport default _Notify;\n","import { ref, computed, watch, defineComponent, toDisplayString, renderSlot, createTextVNode, createCommentVNode, h, Fragment, withDirectives, Teleport } from 'vue';\nimport ElPopper, { usePopper, renderPopper, Effect, renderArrow, renderTrigger, defaultProps } from '../el-popper';\nimport { ClickOutside } from '../directives';\nimport { warn } from '../utils/error';\nimport { renderIf, PatchFlags } from '../utils/vnode';\nimport { isString } from '../utils/util';\nimport PopupManager from '../utils/popup-manager';\nimport { on } from '../utils/dom';\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nconst SHOW_EVENT = \"show\";\nconst HIDE_EVENT = \"hide\";\nfunction usePopover(props, ctx) {\n const zIndex = ref(PopupManager.nextZIndex());\n const width = computed(() => {\n if (isString(props.width)) {\n return props.width;\n }\n return props.width + \"px\";\n });\n const popperStyle = computed(() => {\n return {\n width: width.value,\n zIndex: zIndex.value\n };\n });\n const popperProps = usePopper(props, ctx);\n watch(popperProps.visibility, (val) => {\n if (val) {\n zIndex.value = PopupManager.nextZIndex();\n }\n ctx.emit(val ? SHOW_EVENT : HIDE_EVENT);\n });\n return __spreadProps(__spreadValues({}, popperProps), {\n popperStyle\n });\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nconst emits = [\"update:visible\", \"after-enter\", \"after-leave\", SHOW_EVENT, HIDE_EVENT];\nconst NAME = \"ElPopover\";\nconst _hoist = { key: 0, class: \"el-popover__title\", role: \"title\" };\nvar script = defineComponent({\n name: NAME,\n components: {\n ElPopper\n },\n props: __spreadProps$1(__spreadValues$1({}, defaultProps), {\n content: {\n type: String\n },\n trigger: {\n type: String,\n default: \"click\"\n },\n title: {\n type: String\n },\n transition: {\n type: String,\n default: \"fade-in-linear\"\n },\n width: {\n type: [String, Number],\n default: 150\n },\n appendToBody: {\n type: Boolean,\n default: true\n },\n tabindex: [String, Number]\n }),\n emits,\n setup(props, ctx) {\n if (process.env.NODE_ENV !== \"production\" && props.visible && !ctx.slots.reference) {\n warn(NAME, `\n You cannot init popover without given reference\n `);\n }\n const states = usePopover(props, ctx);\n return states;\n },\n render() {\n const { $slots } = this;\n const trigger = $slots.reference ? $slots.reference() : null;\n const title = renderIf(this.title, \"div\", _hoist, toDisplayString(this.title), PatchFlags.TEXT);\n const content = renderSlot($slots, \"default\", {}, () => [createTextVNode(toDisplayString(this.content), PatchFlags.TEXT)]);\n const {\n events,\n onAfterEnter,\n onAfterLeave,\n onPopperMouseEnter,\n onPopperMouseLeave,\n popperStyle,\n popperId,\n popperClass,\n showArrow,\n transition,\n visibility,\n tabindex\n } = this;\n const kls = [\n this.content ? \"el-popover--plain\" : \"\",\n \"el-popover\",\n popperClass\n ].join(\" \");\n let popover = renderPopper({\n effect: Effect.LIGHT,\n name: transition,\n popperClass: kls,\n popperStyle,\n popperId,\n visibility,\n onMouseenter: onPopperMouseEnter,\n onMouseleave: onPopperMouseLeave,\n onAfterEnter,\n onAfterLeave,\n stopPopperMouseEvent: false\n }, [\n title,\n content,\n renderArrow(showArrow)\n ]);\n const _trigger = trigger ? renderTrigger(trigger, __spreadValues$1({\n ariaDescribedby: popperId,\n ref: \"triggerRef\",\n tabindex\n }, events)) : createCommentVNode(\"v-if\", true);\n return h(Fragment, null, [\n this.trigger === \"click\" ? withDirectives(_trigger, [[ClickOutside, this.hide]]) : _trigger,\n h(Teleport, {\n disabled: !this.appendToBody,\n to: \"body\"\n }, [popover])\n ]);\n }\n});\n\nscript.__file = \"packages/popover/src/index.vue\";\n\nconst attachEvents = (el, binding, vnode) => {\n const _ref = binding.arg || binding.value;\n const popover = vnode.dirs[0].instance.$refs[_ref];\n if (popover) {\n popover.triggerRef = el;\n el.setAttribute(\"tabindex\", popover.tabindex);\n Object.entries(popover.events).forEach(([eventName, e]) => {\n on(el, eventName.toLowerCase().slice(2), e);\n });\n }\n};\nvar PopoverDirective = {\n mounted(el, binding, vnode) {\n attachEvents(el, binding, vnode);\n },\n updated(el, binding, vnode) {\n attachEvents(el, binding, vnode);\n }\n};\nconst VPopover = \"popover\";\n\nscript.install = (app) => {\n app.component(script.name, script);\n app.directive(VPopover, PopoverDirective);\n};\nscript.directive = PopoverDirective;\nconst _Popover = script;\n\nexport default _Popover;\n","import { setLocale } from './locale';\nimport { setConfig } from './utils/config';\nimport isServer from './utils/isServer';\nimport affix from './el-affix';\nexport { default as ElAffix } from './el-affix';\nimport alert from './el-alert';\nexport { default as ElAlert } from './el-alert';\nimport aside from './el-aside';\nexport { default as ElAside } from './el-aside';\nimport autocomplete from './el-autocomplete';\nexport { default as ElAutocomplete } from './el-autocomplete';\nimport avatar from './el-avatar';\nexport { default as ElAvatar } from './el-avatar';\nimport backtop from './el-backtop';\nexport { default as ElBacktop } from './el-backtop';\nimport badge from './el-badge';\nexport { default as ElBadge } from './el-badge';\nimport breadcrumb from './el-breadcrumb';\nexport { default as ElBreadcrumb } from './el-breadcrumb';\nimport breadcrumbItem from './el-breadcrumb-item';\nexport { default as ElBreadcrumbItem } from './el-breadcrumb-item';\nimport button from './el-button';\nexport { default as ElButton } from './el-button';\nimport buttonGroup from './el-button-group';\nexport { default as ElButtonGroup } from './el-button-group';\nimport calendar from './el-calendar';\nexport { default as ElCalendar } from './el-calendar';\nimport card from './el-card';\nexport { default as ElCard } from './el-card';\nimport carousel from './el-carousel';\nexport { default as ElCarousel } from './el-carousel';\nimport carouselItem from './el-carousel-item';\nexport { default as ElCarouselItem } from './el-carousel-item';\nimport cascader from './el-cascader';\nexport { default as ElCascader } from './el-cascader';\nimport cascaderPanel from './el-cascader-panel';\nexport { default as ElCascaderPanel } from './el-cascader-panel';\nimport checkbox from './el-checkbox';\nexport { default as ElCheckbox } from './el-checkbox';\nimport checkboxButton from './el-checkbox-button';\nexport { default as ElCheckboxButton } from './el-checkbox-button';\nimport checkboxGroup from './el-checkbox-group';\nexport { default as ElCheckboxGroup } from './el-checkbox-group';\nimport col from './el-col';\nexport { default as ElCol } from './el-col';\nimport collapse from './el-collapse';\nexport { default as ElCollapse } from './el-collapse';\nimport collapseItem from './el-collapse-item';\nexport { default as ElCollapseItem } from './el-collapse-item';\nimport collapseTransition from './el-collapse-transition';\nexport { default as ElCollapseTransition } from './el-collapse-transition';\nimport colorPicker from './el-color-picker';\nexport { default as ElColorPicker } from './el-color-picker';\nimport container from './el-container';\nexport { default as ElContainer } from './el-container';\nimport configProvider from './el-config-provider';\nexport { default as ElConfigProvider } from './el-config-provider';\nimport datePicker from './el-date-picker';\nexport { default as ElDatePicker } from './el-date-picker';\nimport dialog from './el-dialog';\nexport { default as ElDialog } from './el-dialog';\nimport divider from './el-divider';\nexport { default as ElDivider } from './el-divider';\nimport drawer from './el-drawer';\nexport { default as ElDrawer } from './el-drawer';\nimport dropdown from './el-dropdown';\nexport { default as ElDropdown } from './el-dropdown';\nimport dropdownItem from './el-dropdown-item';\nexport { default as ElDropdownItem } from './el-dropdown-item';\nimport dropdownMenu from './el-dropdown-menu';\nexport { default as ElDropdownMenu } from './el-dropdown-menu';\nimport empty from './el-empty';\nexport { default as ElEmpty } from './el-empty';\nimport footer from './el-footer';\nexport { default as ElFooter } from './el-footer';\nimport form from './el-form';\nexport { default as ElForm } from './el-form';\nimport formItem from './el-form-item';\nexport { default as ElFormItem } from './el-form-item';\nimport header from './el-header';\nexport { default as ElHeader } from './el-header';\nimport icon from './el-icon';\nexport { default as ElIcon } from './el-icon';\nimport image from './el-image';\nexport { default as ElImage } from './el-image';\nimport imageViewer from './el-image-viewer';\nexport { default as ElImageViewer } from './el-image-viewer';\nimport input from './el-input';\nexport { default as ElInput } from './el-input';\nimport inputNumber from './el-input-number';\nexport { default as ElInputNumber } from './el-input-number';\nimport link from './el-link';\nexport { default as ElLink } from './el-link';\nimport main from './el-main';\nexport { default as ElMain } from './el-main';\nimport menu from './el-menu';\nexport { default as ElMenu } from './el-menu';\nimport menuItem from './el-menu-item';\nexport { default as ElMenuItem } from './el-menu-item';\nimport menuItemGroup from './el-menu-item-group';\nexport { default as ElMenuItemGroup } from './el-menu-item-group';\nimport option from './el-option';\nexport { default as ElOption } from './el-option';\nimport optionGroup from './el-option-group';\nexport { default as ElOptionGroup } from './el-option-group';\nimport pageHeader from './el-page-header';\nexport { default as ElPageHeader } from './el-page-header';\nimport pagination from './el-pagination';\nexport { default as ElPagination } from './el-pagination';\nimport popconfirm from './el-popconfirm';\nexport { default as ElPopconfirm } from './el-popconfirm';\nimport popper from './el-popper';\nexport { default as ElPopper } from './el-popper';\nimport progress from './el-progress';\nexport { default as ElProgress } from './el-progress';\nimport radio from './el-radio';\nexport { default as ElRadio } from './el-radio';\nimport radioButton from './el-radio-button';\nexport { default as ElRadioButton } from './el-radio-button';\nimport radioGroup from './el-radio-group';\nexport { default as ElRadioGroup } from './el-radio-group';\nimport rate from './el-rate';\nexport { default as ElRate } from './el-rate';\nimport row from './el-row';\nexport { default as ElRow } from './el-row';\nimport scrollbar from './el-scrollbar';\nexport { default as ElScrollbar } from './el-scrollbar';\nimport select from './el-select';\nexport { default as ElSelect } from './el-select';\nimport slider from './el-slider';\nexport { default as ElSlider } from './el-slider';\nimport step from './el-step';\nexport { default as ElStep } from './el-step';\nimport steps from './el-steps';\nexport { default as ElSteps } from './el-steps';\nimport submenu from './el-submenu';\nexport { default as ElSubmenu } from './el-submenu';\nimport _switch from './el-switch';\nexport { default as ElSwitch } from './el-switch';\nimport tabPane from './el-tab-pane';\nexport { default as ElTabPane } from './el-tab-pane';\nimport table from './el-table';\nexport { default as ElTable } from './el-table';\nimport tableColumn from './el-table-column';\nexport { default as ElTableColumn } from './el-table-column';\nimport tabs from './el-tabs';\nexport { default as ElTabs } from './el-tabs';\nimport tag from './el-tag';\nexport { default as ElTag } from './el-tag';\nimport timePicker from './el-time-picker';\nexport { default as ElTimePicker } from './el-time-picker';\nimport timeSelect from './el-time-select';\nexport { default as ElTimeSelect } from './el-time-select';\nimport timeline from './el-timeline';\nexport { default as ElTimeline } from './el-timeline';\nimport timelineItem from './el-timeline-item';\nexport { default as ElTimelineItem } from './el-timeline-item';\nimport tooltip from './el-tooltip';\nexport { default as ElTooltip } from './el-tooltip';\nimport transfer from './el-transfer';\nexport { default as ElTransfer } from './el-transfer';\nimport tree from './el-tree';\nexport { default as ElTree } from './el-tree';\nimport upload from './el-upload';\nexport { default as ElUpload } from './el-upload';\nimport space from './el-space';\nexport { default as ElSpace } from './el-space';\nimport skeleton from './el-skeleton';\nexport { default as ElSkeleton } from './el-skeleton';\nimport skeletonItem from './el-skeleton-item';\nexport { default as ElSkeletonItem } from './el-skeleton-item';\nimport checkTag from './el-check-tag';\nexport { default as ElCheckTag } from './el-check-tag';\nimport descriptions from './el-descriptions';\nexport { default as ElDescriptions } from './el-descriptions';\nimport descriptionsItem from './el-descriptions-item';\nexport { default as ElDescriptionsItem } from './el-descriptions-item';\nimport result from './el-result';\nexport { default as ElResult } from './el-result';\nimport selectV2 from './el-select-v2';\nexport { default as ElSelectV2 } from './el-select-v2';\nimport infiniteScroll from './el-infinite-scroll';\nexport { default as ElInfiniteScroll } from './el-infinite-scroll';\nimport loading from './el-loading';\nexport { default as ElLoading } from './el-loading';\nimport message from './el-message';\nexport { default as ElMessage } from './el-message';\nimport messageBox from './el-message-box';\nexport { default as ElMessageBox } from './el-message-box';\nimport notification from './el-notification';\nexport { default as ElNotification } from './el-notification';\nimport popover from './el-popover';\nexport { default as ElPopover } from './el-popover';\nimport dayjs from 'dayjs';\nexport * from './hooks';\n\nvar components = /*#__PURE__*/Object.freeze({\n __proto__: null,\n ElAffix: affix,\n ElAlert: alert,\n ElAside: aside,\n ElAutocomplete: autocomplete,\n ElAvatar: avatar,\n ElBacktop: backtop,\n ElBadge: badge,\n ElBreadcrumb: breadcrumb,\n ElBreadcrumbItem: breadcrumbItem,\n ElButton: button,\n ElButtonGroup: buttonGroup,\n ElCalendar: calendar,\n ElCard: card,\n ElCarousel: carousel,\n ElCarouselItem: carouselItem,\n ElCascader: cascader,\n ElCascaderPanel: cascaderPanel,\n ElCheckbox: checkbox,\n ElCheckboxButton: checkboxButton,\n ElCheckboxGroup: checkboxGroup,\n ElCol: col,\n ElCollapse: collapse,\n ElCollapseItem: collapseItem,\n ElCollapseTransition: collapseTransition,\n ElColorPicker: colorPicker,\n ElContainer: container,\n ElConfigProvider: configProvider,\n ElDatePicker: datePicker,\n ElDialog: dialog,\n ElDivider: divider,\n ElDrawer: drawer,\n ElDropdown: dropdown,\n ElDropdownItem: dropdownItem,\n ElDropdownMenu: dropdownMenu,\n ElEmpty: empty,\n ElFooter: footer,\n ElForm: form,\n ElFormItem: formItem,\n ElHeader: header,\n ElIcon: icon,\n ElImage: image,\n ElImageViewer: imageViewer,\n ElInput: input,\n ElInputNumber: inputNumber,\n ElLink: link,\n ElMain: main,\n ElMenu: menu,\n ElMenuItem: menuItem,\n ElMenuItemGroup: menuItemGroup,\n ElOption: option,\n ElOptionGroup: optionGroup,\n ElPageHeader: pageHeader,\n ElPagination: pagination,\n ElPopconfirm: popconfirm,\n ElPopper: popper,\n ElProgress: progress,\n ElRadio: radio,\n ElRadioButton: radioButton,\n ElRadioGroup: radioGroup,\n ElRate: rate,\n ElRow: row,\n ElScrollbar: scrollbar,\n ElSelect: select,\n ElSlider: slider,\n ElStep: step,\n ElSteps: steps,\n ElSubmenu: submenu,\n ElSwitch: _switch,\n ElTabPane: tabPane,\n ElTable: table,\n ElTableColumn: tableColumn,\n ElTabs: tabs,\n ElTag: tag,\n ElTimePicker: timePicker,\n ElTimeSelect: timeSelect,\n ElTimeline: timeline,\n ElTimelineItem: timelineItem,\n ElTooltip: tooltip,\n ElTransfer: transfer,\n ElTree: tree,\n ElUpload: upload,\n ElSpace: space,\n ElSkeleton: skeleton,\n ElSkeletonItem: skeletonItem,\n ElCheckTag: checkTag,\n ElDescriptions: descriptions,\n ElDescriptionsItem: descriptionsItem,\n ElResult: result,\n ElSelectV2: selectV2\n});\n\nvar plugins = /*#__PURE__*/Object.freeze({\n __proto__: null,\n ElInfiniteScroll: infiniteScroll,\n ElLoading: loading,\n ElMessage: message,\n ElMessageBox: messageBox,\n ElNotification: notification,\n ElPopover: popover\n});\n\nconst version = '1.0.2-beta.59';\n\nif (!isServer) {\r\n const _window = window;\r\n if (!_window.dayjs) {\r\n _window.dayjs = dayjs;\r\n }\r\n}\r\nconst version$1 = version;\r\nconst defaultInstallOpt = {\r\n size: '',\r\n zIndex: 2000,\r\n};\r\nconst install = (app, opt) => {\r\n const option = Object.assign(defaultInstallOpt, opt);\r\n app.config.globalProperties.$ELEMENT = option;\r\n setConfig(option);\r\n Object.keys(components).forEach(c => {\r\n app.use(components[c]);\r\n });\r\n Object.keys(plugins).forEach(plugin => {\r\n app.use(plugins[plugin]);\r\n });\r\n};\r\nconst locale = setLocale;\r\nvar index = {\r\n version: version$1,\r\n install,\r\n locale,\r\n};\n\nexport default index;\nexport { install, locale, version$1 as version };\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","import { EMPTY_OBJ, isArray, isMap, isIntegerKey, isSymbol, extend, hasOwn, isObject, hasChanged, makeMap, capitalize, toRawType, def, isFunction, NOOP } from '@vue/shared';\n\nconst targetMap = new WeakMap();\r\nconst effectStack = [];\r\nlet activeEffect;\r\nconst ITERATE_KEY = Symbol((process.env.NODE_ENV !== 'production') ? 'iterate' : '');\r\nconst MAP_KEY_ITERATE_KEY = Symbol((process.env.NODE_ENV !== 'production') ? 'Map key iterate' : '');\r\nfunction isEffect(fn) {\r\n return fn && fn._isEffect === true;\r\n}\r\nfunction effect(fn, options = EMPTY_OBJ) {\r\n if (isEffect(fn)) {\r\n fn = fn.raw;\r\n }\r\n const effect = createReactiveEffect(fn, options);\r\n if (!options.lazy) {\r\n effect();\r\n }\r\n return effect;\r\n}\r\nfunction stop(effect) {\r\n if (effect.active) {\r\n cleanup(effect);\r\n if (effect.options.onStop) {\r\n effect.options.onStop();\r\n }\r\n effect.active = false;\r\n }\r\n}\r\nlet uid = 0;\r\nfunction createReactiveEffect(fn, options) {\r\n const effect = function reactiveEffect() {\r\n if (!effect.active) {\r\n return fn();\r\n }\r\n if (!effectStack.includes(effect)) {\r\n cleanup(effect);\r\n try {\r\n enableTracking();\r\n effectStack.push(effect);\r\n activeEffect = effect;\r\n return fn();\r\n }\r\n finally {\r\n effectStack.pop();\r\n resetTracking();\r\n activeEffect = effectStack[effectStack.length - 1];\r\n }\r\n }\r\n };\r\n effect.id = uid++;\r\n effect.allowRecurse = !!options.allowRecurse;\r\n effect._isEffect = true;\r\n effect.active = true;\r\n effect.raw = fn;\r\n effect.deps = [];\r\n effect.options = options;\r\n return effect;\r\n}\r\nfunction cleanup(effect) {\r\n const { deps } = effect;\r\n if (deps.length) {\r\n for (let i = 0; i < deps.length; i++) {\r\n deps[i].delete(effect);\r\n }\r\n deps.length = 0;\r\n }\r\n}\r\nlet shouldTrack = true;\r\nconst trackStack = [];\r\nfunction pauseTracking() {\r\n trackStack.push(shouldTrack);\r\n shouldTrack = false;\r\n}\r\nfunction enableTracking() {\r\n trackStack.push(shouldTrack);\r\n shouldTrack = true;\r\n}\r\nfunction resetTracking() {\r\n const last = trackStack.pop();\r\n shouldTrack = last === undefined ? true : last;\r\n}\r\nfunction track(target, type, key) {\r\n if (!shouldTrack || activeEffect === undefined) {\r\n return;\r\n }\r\n let depsMap = targetMap.get(target);\r\n if (!depsMap) {\r\n targetMap.set(target, (depsMap = new Map()));\r\n }\r\n let dep = depsMap.get(key);\r\n if (!dep) {\r\n depsMap.set(key, (dep = new Set()));\r\n }\r\n if (!dep.has(activeEffect)) {\r\n dep.add(activeEffect);\r\n activeEffect.deps.push(dep);\r\n if ((process.env.NODE_ENV !== 'production') && activeEffect.options.onTrack) {\r\n activeEffect.options.onTrack({\r\n effect: activeEffect,\r\n target,\r\n type,\r\n key\r\n });\r\n }\r\n }\r\n}\r\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\r\n const depsMap = targetMap.get(target);\r\n if (!depsMap) {\r\n // never been tracked\r\n return;\r\n }\r\n const effects = new Set();\r\n const add = (effectsToAdd) => {\r\n if (effectsToAdd) {\r\n effectsToAdd.forEach(effect => {\r\n if (effect !== activeEffect || effect.allowRecurse) {\r\n effects.add(effect);\r\n }\r\n });\r\n }\r\n };\r\n if (type === \"clear\" /* CLEAR */) {\r\n // collection being cleared\r\n // trigger all effects for target\r\n depsMap.forEach(add);\r\n }\r\n else if (key === 'length' && isArray(target)) {\r\n depsMap.forEach((dep, key) => {\r\n if (key === 'length' || key >= newValue) {\r\n add(dep);\r\n }\r\n });\r\n }\r\n else {\r\n // schedule runs for SET | ADD | DELETE\r\n if (key !== void 0) {\r\n add(depsMap.get(key));\r\n }\r\n // also run for iteration key on ADD | DELETE | Map.SET\r\n switch (type) {\r\n case \"add\" /* ADD */:\r\n if (!isArray(target)) {\r\n add(depsMap.get(ITERATE_KEY));\r\n if (isMap(target)) {\r\n add(depsMap.get(MAP_KEY_ITERATE_KEY));\r\n }\r\n }\r\n else if (isIntegerKey(key)) {\r\n // new index added to array -> length changes\r\n add(depsMap.get('length'));\r\n }\r\n break;\r\n case \"delete\" /* DELETE */:\r\n if (!isArray(target)) {\r\n add(depsMap.get(ITERATE_KEY));\r\n if (isMap(target)) {\r\n add(depsMap.get(MAP_KEY_ITERATE_KEY));\r\n }\r\n }\r\n break;\r\n case \"set\" /* SET */:\r\n if (isMap(target)) {\r\n add(depsMap.get(ITERATE_KEY));\r\n }\r\n break;\r\n }\r\n }\r\n const run = (effect) => {\r\n if ((process.env.NODE_ENV !== 'production') && effect.options.onTrigger) {\r\n effect.options.onTrigger({\r\n effect,\r\n target,\r\n key,\r\n type,\r\n newValue,\r\n oldValue,\r\n oldTarget\r\n });\r\n }\r\n if (effect.options.scheduler) {\r\n effect.options.scheduler(effect);\r\n }\r\n else {\r\n effect();\r\n }\r\n };\r\n effects.forEach(run);\r\n}\n\nconst isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);\r\nconst builtInSymbols = new Set(Object.getOwnPropertyNames(Symbol)\r\n .map(key => Symbol[key])\r\n .filter(isSymbol));\r\nconst get = /*#__PURE__*/ createGetter();\r\nconst shallowGet = /*#__PURE__*/ createGetter(false, true);\r\nconst readonlyGet = /*#__PURE__*/ createGetter(true);\r\nconst shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true);\r\nconst arrayInstrumentations = /*#__PURE__*/ createArrayInstrumentations();\r\nfunction createArrayInstrumentations() {\r\n const instrumentations = {};\r\n ['includes', 'indexOf', 'lastIndexOf'].forEach(key => {\r\n instrumentations[key] = function (...args) {\r\n const arr = toRaw(this);\r\n for (let i = 0, l = this.length; i < l; i++) {\r\n track(arr, \"get\" /* GET */, i + '');\r\n }\r\n // we run the method using the original args first (which may be reactive)\r\n const res = arr[key](...args);\r\n if (res === -1 || res === false) {\r\n // if that didn't work, run it again using raw values.\r\n return arr[key](...args.map(toRaw));\r\n }\r\n else {\r\n return res;\r\n }\r\n };\r\n });\r\n ['push', 'pop', 'shift', 'unshift', 'splice'].forEach(key => {\r\n instrumentations[key] = function (...args) {\r\n pauseTracking();\r\n const res = toRaw(this)[key].apply(this, args);\r\n resetTracking();\r\n return res;\r\n };\r\n });\r\n return instrumentations;\r\n}\r\nfunction createGetter(isReadonly = false, shallow = false) {\r\n return function get(target, key, receiver) {\r\n if (key === \"__v_isReactive\" /* IS_REACTIVE */) {\r\n return !isReadonly;\r\n }\r\n else if (key === \"__v_isReadonly\" /* IS_READONLY */) {\r\n return isReadonly;\r\n }\r\n else if (key === \"__v_raw\" /* RAW */ &&\r\n receiver ===\r\n (isReadonly\r\n ? shallow\r\n ? shallowReadonlyMap\r\n : readonlyMap\r\n : shallow\r\n ? shallowReactiveMap\r\n : reactiveMap).get(target)) {\r\n return target;\r\n }\r\n const targetIsArray = isArray(target);\r\n if (!isReadonly && targetIsArray && hasOwn(arrayInstrumentations, key)) {\r\n return Reflect.get(arrayInstrumentations, key, receiver);\r\n }\r\n const res = Reflect.get(target, key, receiver);\r\n if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\r\n return res;\r\n }\r\n if (!isReadonly) {\r\n track(target, \"get\" /* GET */, key);\r\n }\r\n if (shallow) {\r\n return res;\r\n }\r\n if (isRef(res)) {\r\n // ref unwrapping - does not apply for Array + integer key.\r\n const shouldUnwrap = !targetIsArray || !isIntegerKey(key);\r\n return shouldUnwrap ? res.value : res;\r\n }\r\n if (isObject(res)) {\r\n // Convert returned value into a proxy as well. we do the isObject check\r\n // here to avoid invalid value warning. Also need to lazy access readonly\r\n // and reactive here to avoid circular dependency.\r\n return isReadonly ? readonly(res) : reactive(res);\r\n }\r\n return res;\r\n };\r\n}\r\nconst set = /*#__PURE__*/ createSetter();\r\nconst shallowSet = /*#__PURE__*/ createSetter(true);\r\nfunction createSetter(shallow = false) {\r\n return function set(target, key, value, receiver) {\r\n let oldValue = target[key];\r\n if (!shallow) {\r\n value = toRaw(value);\r\n oldValue = toRaw(oldValue);\r\n if (!isArray(target) && isRef(oldValue) && !isRef(value)) {\r\n oldValue.value = value;\r\n return true;\r\n }\r\n }\r\n const hadKey = isArray(target) && isIntegerKey(key)\r\n ? Number(key) < target.length\r\n : hasOwn(target, key);\r\n const result = Reflect.set(target, key, value, receiver);\r\n // don't trigger if target is something up in the prototype chain of original\r\n if (target === toRaw(receiver)) {\r\n if (!hadKey) {\r\n trigger(target, \"add\" /* ADD */, key, value);\r\n }\r\n else if (hasChanged(value, oldValue)) {\r\n trigger(target, \"set\" /* SET */, key, value, oldValue);\r\n }\r\n }\r\n return result;\r\n };\r\n}\r\nfunction deleteProperty(target, key) {\r\n const hadKey = hasOwn(target, key);\r\n const oldValue = target[key];\r\n const result = Reflect.deleteProperty(target, key);\r\n if (result && hadKey) {\r\n trigger(target, \"delete\" /* DELETE */, key, undefined, oldValue);\r\n }\r\n return result;\r\n}\r\nfunction has(target, key) {\r\n const result = Reflect.has(target, key);\r\n if (!isSymbol(key) || !builtInSymbols.has(key)) {\r\n track(target, \"has\" /* HAS */, key);\r\n }\r\n return result;\r\n}\r\nfunction ownKeys(target) {\r\n track(target, \"iterate\" /* ITERATE */, isArray(target) ? 'length' : ITERATE_KEY);\r\n return Reflect.ownKeys(target);\r\n}\r\nconst mutableHandlers = {\r\n get,\r\n set,\r\n deleteProperty,\r\n has,\r\n ownKeys\r\n};\r\nconst readonlyHandlers = {\r\n get: readonlyGet,\r\n set(target, key) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n console.warn(`Set operation on key \"${String(key)}\" failed: target is readonly.`, target);\r\n }\r\n return true;\r\n },\r\n deleteProperty(target, key) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n console.warn(`Delete operation on key \"${String(key)}\" failed: target is readonly.`, target);\r\n }\r\n return true;\r\n }\r\n};\r\nconst shallowReactiveHandlers = /*#__PURE__*/ extend({}, mutableHandlers, {\r\n get: shallowGet,\r\n set: shallowSet\r\n});\r\n// Props handlers are special in the sense that it should not unwrap top-level\r\n// refs (in order to allow refs to be explicitly passed down), but should\r\n// retain the reactivity of the normal readonly object.\r\nconst shallowReadonlyHandlers = /*#__PURE__*/ extend({}, readonlyHandlers, {\r\n get: shallowReadonlyGet\r\n});\n\nconst toReactive = (value) => isObject(value) ? reactive(value) : value;\r\nconst toReadonly = (value) => isObject(value) ? readonly(value) : value;\r\nconst toShallow = (value) => value;\r\nconst getProto = (v) => Reflect.getPrototypeOf(v);\r\nfunction get$1(target, key, isReadonly = false, isShallow = false) {\r\n // #1772: readonly(reactive(Map)) should return readonly + reactive version\r\n // of the value\r\n target = target[\"__v_raw\" /* RAW */];\r\n const rawTarget = toRaw(target);\r\n const rawKey = toRaw(key);\r\n if (key !== rawKey) {\r\n !isReadonly && track(rawTarget, \"get\" /* GET */, key);\r\n }\r\n !isReadonly && track(rawTarget, \"get\" /* GET */, rawKey);\r\n const { has } = getProto(rawTarget);\r\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\r\n if (has.call(rawTarget, key)) {\r\n return wrap(target.get(key));\r\n }\r\n else if (has.call(rawTarget, rawKey)) {\r\n return wrap(target.get(rawKey));\r\n }\r\n else if (target !== rawTarget) {\r\n // #3602 readonly(reactive(Map))\r\n // ensure that the nested reactive `Map` can do tracking for itself\r\n target.get(key);\r\n }\r\n}\r\nfunction has$1(key, isReadonly = false) {\r\n const target = this[\"__v_raw\" /* RAW */];\r\n const rawTarget = toRaw(target);\r\n const rawKey = toRaw(key);\r\n if (key !== rawKey) {\r\n !isReadonly && track(rawTarget, \"has\" /* HAS */, key);\r\n }\r\n !isReadonly && track(rawTarget, \"has\" /* HAS */, rawKey);\r\n return key === rawKey\r\n ? target.has(key)\r\n : target.has(key) || target.has(rawKey);\r\n}\r\nfunction size(target, isReadonly = false) {\r\n target = target[\"__v_raw\" /* RAW */];\r\n !isReadonly && track(toRaw(target), \"iterate\" /* ITERATE */, ITERATE_KEY);\r\n return Reflect.get(target, 'size', target);\r\n}\r\nfunction add(value) {\r\n value = toRaw(value);\r\n const target = toRaw(this);\r\n const proto = getProto(target);\r\n const hadKey = proto.has.call(target, value);\r\n if (!hadKey) {\r\n target.add(value);\r\n trigger(target, \"add\" /* ADD */, value, value);\r\n }\r\n return this;\r\n}\r\nfunction set$1(key, value) {\r\n value = toRaw(value);\r\n const target = toRaw(this);\r\n const { has, get } = getProto(target);\r\n let hadKey = has.call(target, key);\r\n if (!hadKey) {\r\n key = toRaw(key);\r\n hadKey = has.call(target, key);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n checkIdentityKeys(target, has, key);\r\n }\r\n const oldValue = get.call(target, key);\r\n target.set(key, value);\r\n if (!hadKey) {\r\n trigger(target, \"add\" /* ADD */, key, value);\r\n }\r\n else if (hasChanged(value, oldValue)) {\r\n trigger(target, \"set\" /* SET */, key, value, oldValue);\r\n }\r\n return this;\r\n}\r\nfunction deleteEntry(key) {\r\n const target = toRaw(this);\r\n const { has, get } = getProto(target);\r\n let hadKey = has.call(target, key);\r\n if (!hadKey) {\r\n key = toRaw(key);\r\n hadKey = has.call(target, key);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n checkIdentityKeys(target, has, key);\r\n }\r\n const oldValue = get ? get.call(target, key) : undefined;\r\n // forward the operation before queueing reactions\r\n const result = target.delete(key);\r\n if (hadKey) {\r\n trigger(target, \"delete\" /* DELETE */, key, undefined, oldValue);\r\n }\r\n return result;\r\n}\r\nfunction clear() {\r\n const target = toRaw(this);\r\n const hadItems = target.size !== 0;\r\n const oldTarget = (process.env.NODE_ENV !== 'production')\r\n ? isMap(target)\r\n ? new Map(target)\r\n : new Set(target)\r\n : undefined;\r\n // forward the operation before queueing reactions\r\n const result = target.clear();\r\n if (hadItems) {\r\n trigger(target, \"clear\" /* CLEAR */, undefined, undefined, oldTarget);\r\n }\r\n return result;\r\n}\r\nfunction createForEach(isReadonly, isShallow) {\r\n return function forEach(callback, thisArg) {\r\n const observed = this;\r\n const target = observed[\"__v_raw\" /* RAW */];\r\n const rawTarget = toRaw(target);\r\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\r\n !isReadonly && track(rawTarget, \"iterate\" /* ITERATE */, ITERATE_KEY);\r\n return target.forEach((value, key) => {\r\n // important: make sure the callback is\r\n // 1. invoked with the reactive map as `this` and 3rd arg\r\n // 2. the value received should be a corresponding reactive/readonly.\r\n return callback.call(thisArg, wrap(value), wrap(key), observed);\r\n });\r\n };\r\n}\r\nfunction createIterableMethod(method, isReadonly, isShallow) {\r\n return function (...args) {\r\n const target = this[\"__v_raw\" /* RAW */];\r\n const rawTarget = toRaw(target);\r\n const targetIsMap = isMap(rawTarget);\r\n const isPair = method === 'entries' || (method === Symbol.iterator && targetIsMap);\r\n const isKeyOnly = method === 'keys' && targetIsMap;\r\n const innerIterator = target[method](...args);\r\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\r\n !isReadonly &&\r\n track(rawTarget, \"iterate\" /* ITERATE */, isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);\r\n // return a wrapped iterator which returns observed versions of the\r\n // values emitted from the real iterator\r\n return {\r\n // iterator protocol\r\n next() {\r\n const { value, done } = innerIterator.next();\r\n return done\r\n ? { value, done }\r\n : {\r\n value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\r\n done\r\n };\r\n },\r\n // iterable protocol\r\n [Symbol.iterator]() {\r\n return this;\r\n }\r\n };\r\n };\r\n}\r\nfunction createReadonlyMethod(type) {\r\n return function (...args) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const key = args[0] ? `on key \"${args[0]}\" ` : ``;\r\n console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this));\r\n }\r\n return type === \"delete\" /* DELETE */ ? false : this;\r\n };\r\n}\r\nfunction createInstrumentations() {\r\n const mutableInstrumentations = {\r\n get(key) {\r\n return get$1(this, key);\r\n },\r\n get size() {\r\n return size(this);\r\n },\r\n has: has$1,\r\n add,\r\n set: set$1,\r\n delete: deleteEntry,\r\n clear,\r\n forEach: createForEach(false, false)\r\n };\r\n const shallowInstrumentations = {\r\n get(key) {\r\n return get$1(this, key, false, true);\r\n },\r\n get size() {\r\n return size(this);\r\n },\r\n has: has$1,\r\n add,\r\n set: set$1,\r\n delete: deleteEntry,\r\n clear,\r\n forEach: createForEach(false, true)\r\n };\r\n const readonlyInstrumentations = {\r\n get(key) {\r\n return get$1(this, key, true);\r\n },\r\n get size() {\r\n return size(this, true);\r\n },\r\n has(key) {\r\n return has$1.call(this, key, true);\r\n },\r\n add: createReadonlyMethod(\"add\" /* ADD */),\r\n set: createReadonlyMethod(\"set\" /* SET */),\r\n delete: createReadonlyMethod(\"delete\" /* DELETE */),\r\n clear: createReadonlyMethod(\"clear\" /* CLEAR */),\r\n forEach: createForEach(true, false)\r\n };\r\n const shallowReadonlyInstrumentations = {\r\n get(key) {\r\n return get$1(this, key, true, true);\r\n },\r\n get size() {\r\n return size(this, true);\r\n },\r\n has(key) {\r\n return has$1.call(this, key, true);\r\n },\r\n add: createReadonlyMethod(\"add\" /* ADD */),\r\n set: createReadonlyMethod(\"set\" /* SET */),\r\n delete: createReadonlyMethod(\"delete\" /* DELETE */),\r\n clear: createReadonlyMethod(\"clear\" /* CLEAR */),\r\n forEach: createForEach(true, true)\r\n };\r\n const iteratorMethods = ['keys', 'values', 'entries', Symbol.iterator];\r\n iteratorMethods.forEach(method => {\r\n mutableInstrumentations[method] = createIterableMethod(method, false, false);\r\n readonlyInstrumentations[method] = createIterableMethod(method, true, false);\r\n shallowInstrumentations[method] = createIterableMethod(method, false, true);\r\n shallowReadonlyInstrumentations[method] = createIterableMethod(method, true, true);\r\n });\r\n return [\r\n mutableInstrumentations,\r\n readonlyInstrumentations,\r\n shallowInstrumentations,\r\n shallowReadonlyInstrumentations\r\n ];\r\n}\r\nconst [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* #__PURE__*/ createInstrumentations();\r\nfunction createInstrumentationGetter(isReadonly, shallow) {\r\n const instrumentations = shallow\r\n ? isReadonly\r\n ? shallowReadonlyInstrumentations\r\n : shallowInstrumentations\r\n : isReadonly\r\n ? readonlyInstrumentations\r\n : mutableInstrumentations;\r\n return (target, key, receiver) => {\r\n if (key === \"__v_isReactive\" /* IS_REACTIVE */) {\r\n return !isReadonly;\r\n }\r\n else if (key === \"__v_isReadonly\" /* IS_READONLY */) {\r\n return isReadonly;\r\n }\r\n else if (key === \"__v_raw\" /* RAW */) {\r\n return target;\r\n }\r\n return Reflect.get(hasOwn(instrumentations, key) && key in target\r\n ? instrumentations\r\n : target, key, receiver);\r\n };\r\n}\r\nconst mutableCollectionHandlers = {\r\n get: /*#__PURE__*/ createInstrumentationGetter(false, false)\r\n};\r\nconst shallowCollectionHandlers = {\r\n get: /*#__PURE__*/ createInstrumentationGetter(false, true)\r\n};\r\nconst readonlyCollectionHandlers = {\r\n get: /*#__PURE__*/ createInstrumentationGetter(true, false)\r\n};\r\nconst shallowReadonlyCollectionHandlers = {\r\n get: /*#__PURE__*/ createInstrumentationGetter(true, true)\r\n};\r\nfunction checkIdentityKeys(target, has, key) {\r\n const rawKey = toRaw(key);\r\n if (rawKey !== key && has.call(target, rawKey)) {\r\n const type = toRawType(target);\r\n console.warn(`Reactive ${type} contains both the raw and reactive ` +\r\n `versions of the same object${type === `Map` ? ` as keys` : ``}, ` +\r\n `which can lead to inconsistencies. ` +\r\n `Avoid differentiating between the raw and reactive versions ` +\r\n `of an object and only use the reactive version if possible.`);\r\n }\r\n}\n\nconst reactiveMap = new WeakMap();\r\nconst shallowReactiveMap = new WeakMap();\r\nconst readonlyMap = new WeakMap();\r\nconst shallowReadonlyMap = new WeakMap();\r\nfunction targetTypeMap(rawType) {\r\n switch (rawType) {\r\n case 'Object':\r\n case 'Array':\r\n return 1 /* COMMON */;\r\n case 'Map':\r\n case 'Set':\r\n case 'WeakMap':\r\n case 'WeakSet':\r\n return 2 /* COLLECTION */;\r\n default:\r\n return 0 /* INVALID */;\r\n }\r\n}\r\nfunction getTargetType(value) {\r\n return value[\"__v_skip\" /* SKIP */] || !Object.isExtensible(value)\r\n ? 0 /* INVALID */\r\n : targetTypeMap(toRawType(value));\r\n}\r\nfunction reactive(target) {\r\n // if trying to observe a readonly proxy, return the readonly version.\r\n if (target && target[\"__v_isReadonly\" /* IS_READONLY */]) {\r\n return target;\r\n }\r\n return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);\r\n}\r\n/**\r\n * Return a shallowly-reactive copy of the original object, where only the root\r\n * level properties are reactive. It also does not auto-unwrap refs (even at the\r\n * root level).\r\n */\r\nfunction shallowReactive(target) {\r\n return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);\r\n}\r\n/**\r\n * Creates a readonly copy of the original object. Note the returned copy is not\r\n * made reactive, but `readonly` can be called on an already reactive object.\r\n */\r\nfunction readonly(target) {\r\n return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);\r\n}\r\n/**\r\n * Returns a reactive-copy of the original object, where only the root level\r\n * properties are readonly, and does NOT unwrap refs nor recursively convert\r\n * returned properties.\r\n * This is used for creating the props proxy object for stateful components.\r\n */\r\nfunction shallowReadonly(target) {\r\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\r\n}\r\nfunction createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) {\r\n if (!isObject(target)) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n console.warn(`value cannot be made reactive: ${String(target)}`);\r\n }\r\n return target;\r\n }\r\n // target is already a Proxy, return it.\r\n // exception: calling readonly() on a reactive object\r\n if (target[\"__v_raw\" /* RAW */] &&\r\n !(isReadonly && target[\"__v_isReactive\" /* IS_REACTIVE */])) {\r\n return target;\r\n }\r\n // target already has corresponding Proxy\r\n const existingProxy = proxyMap.get(target);\r\n if (existingProxy) {\r\n return existingProxy;\r\n }\r\n // only a whitelist of value types can be observed.\r\n const targetType = getTargetType(target);\r\n if (targetType === 0 /* INVALID */) {\r\n return target;\r\n }\r\n const proxy = new Proxy(target, targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers);\r\n proxyMap.set(target, proxy);\r\n return proxy;\r\n}\r\nfunction isReactive(value) {\r\n if (isReadonly(value)) {\r\n return isReactive(value[\"__v_raw\" /* RAW */]);\r\n }\r\n return !!(value && value[\"__v_isReactive\" /* IS_REACTIVE */]);\r\n}\r\nfunction isReadonly(value) {\r\n return !!(value && value[\"__v_isReadonly\" /* IS_READONLY */]);\r\n}\r\nfunction isProxy(value) {\r\n return isReactive(value) || isReadonly(value);\r\n}\r\nfunction toRaw(observed) {\r\n return ((observed && toRaw(observed[\"__v_raw\" /* RAW */])) || observed);\r\n}\r\nfunction markRaw(value) {\r\n def(value, \"__v_skip\" /* SKIP */, true);\r\n return value;\r\n}\n\nconst convert = (val) => isObject(val) ? reactive(val) : val;\r\nfunction isRef(r) {\r\n return Boolean(r && r.__v_isRef === true);\r\n}\r\nfunction ref(value) {\r\n return createRef(value);\r\n}\r\nfunction shallowRef(value) {\r\n return createRef(value, true);\r\n}\r\nclass RefImpl {\r\n constructor(value, _shallow = false) {\r\n this._shallow = _shallow;\r\n this.__v_isRef = true;\r\n this._rawValue = _shallow ? value : toRaw(value);\r\n this._value = _shallow ? value : convert(value);\r\n }\r\n get value() {\r\n track(toRaw(this), \"get\" /* GET */, 'value');\r\n return this._value;\r\n }\r\n set value(newVal) {\r\n newVal = this._shallow ? newVal : toRaw(newVal);\r\n if (hasChanged(newVal, this._rawValue)) {\r\n this._rawValue = newVal;\r\n this._value = this._shallow ? newVal : convert(newVal);\r\n trigger(toRaw(this), \"set\" /* SET */, 'value', newVal);\r\n }\r\n }\r\n}\r\nfunction createRef(rawValue, shallow = false) {\r\n if (isRef(rawValue)) {\r\n return rawValue;\r\n }\r\n return new RefImpl(rawValue, shallow);\r\n}\r\nfunction triggerRef(ref) {\r\n trigger(toRaw(ref), \"set\" /* SET */, 'value', (process.env.NODE_ENV !== 'production') ? ref.value : void 0);\r\n}\r\nfunction unref(ref) {\r\n return isRef(ref) ? ref.value : ref;\r\n}\r\nconst shallowUnwrapHandlers = {\r\n get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),\r\n set: (target, key, value, receiver) => {\r\n const oldValue = target[key];\r\n if (isRef(oldValue) && !isRef(value)) {\r\n oldValue.value = value;\r\n return true;\r\n }\r\n else {\r\n return Reflect.set(target, key, value, receiver);\r\n }\r\n }\r\n};\r\nfunction proxyRefs(objectWithRefs) {\r\n return isReactive(objectWithRefs)\r\n ? objectWithRefs\r\n : new Proxy(objectWithRefs, shallowUnwrapHandlers);\r\n}\r\nclass CustomRefImpl {\r\n constructor(factory) {\r\n this.__v_isRef = true;\r\n const { get, set } = factory(() => track(this, \"get\" /* GET */, 'value'), () => trigger(this, \"set\" /* SET */, 'value'));\r\n this._get = get;\r\n this._set = set;\r\n }\r\n get value() {\r\n return this._get();\r\n }\r\n set value(newVal) {\r\n this._set(newVal);\r\n }\r\n}\r\nfunction customRef(factory) {\r\n return new CustomRefImpl(factory);\r\n}\r\nfunction toRefs(object) {\r\n if ((process.env.NODE_ENV !== 'production') && !isProxy(object)) {\r\n console.warn(`toRefs() expects a reactive object but received a plain one.`);\r\n }\r\n const ret = isArray(object) ? new Array(object.length) : {};\r\n for (const key in object) {\r\n ret[key] = toRef(object, key);\r\n }\r\n return ret;\r\n}\r\nclass ObjectRefImpl {\r\n constructor(_object, _key) {\r\n this._object = _object;\r\n this._key = _key;\r\n this.__v_isRef = true;\r\n }\r\n get value() {\r\n return this._object[this._key];\r\n }\r\n set value(newVal) {\r\n this._object[this._key] = newVal;\r\n }\r\n}\r\nfunction toRef(object, key) {\r\n return isRef(object[key])\r\n ? object[key]\r\n : new ObjectRefImpl(object, key);\r\n}\n\nclass ComputedRefImpl {\r\n constructor(getter, _setter, isReadonly) {\r\n this._setter = _setter;\r\n this._dirty = true;\r\n this.__v_isRef = true;\r\n this.effect = effect(getter, {\r\n lazy: true,\r\n scheduler: () => {\r\n if (!this._dirty) {\r\n this._dirty = true;\r\n trigger(toRaw(this), \"set\" /* SET */, 'value');\r\n }\r\n }\r\n });\r\n this[\"__v_isReadonly\" /* IS_READONLY */] = isReadonly;\r\n }\r\n get value() {\r\n // the computed ref may get wrapped by other proxies e.g. readonly() #3376\r\n const self = toRaw(this);\r\n if (self._dirty) {\r\n self._value = this.effect();\r\n self._dirty = false;\r\n }\r\n track(self, \"get\" /* GET */, 'value');\r\n return self._value;\r\n }\r\n set value(newValue) {\r\n this._setter(newValue);\r\n }\r\n}\r\nfunction computed(getterOrOptions) {\r\n let getter;\r\n let setter;\r\n if (isFunction(getterOrOptions)) {\r\n getter = getterOrOptions;\r\n setter = (process.env.NODE_ENV !== 'production')\r\n ? () => {\r\n console.warn('Write operation failed: computed value is readonly');\r\n }\r\n : NOOP;\r\n }\r\n else {\r\n getter = getterOrOptions.get;\r\n setter = getterOrOptions.set;\r\n }\r\n return new ComputedRefImpl(getter, setter, isFunction(getterOrOptions) || !getterOrOptions.set);\r\n}\n\nexport { ITERATE_KEY, computed, customRef, effect, enableTracking, isProxy, isReactive, isReadonly, isRef, markRaw, pauseTracking, proxyRefs, reactive, readonly, ref, resetTracking, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, track, trigger, triggerRef, unref };\n","import { pauseTracking, resetTracking, isRef, toRaw, isReactive, effect, stop, ref, reactive, shallowReactive, trigger, isProxy, shallowReadonly, track, markRaw, proxyRefs, computed as computed$1, isReadonly } from '@vue/reactivity';\nexport { customRef, isProxy, isReactive, isReadonly, isRef, markRaw, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, toRaw, toRef, toRefs, triggerRef, unref } from '@vue/reactivity';\nimport { isString, isFunction as isFunction$1, isPromise as isPromise$1, isArray, extend, hasOwn, EMPTY_OBJ, toHandlerKey, toNumber, hyphenate, camelize, isOn, isModelListener, remove, NOOP, hasChanged, isObject as isObject$1, isSet, isMap, isPlainObject, invokeArrayFns, def, isReservedProp, EMPTY_ARR, capitalize, toRawType, makeMap, NO, getGlobalThis, normalizeClass, normalizeStyle, isGloballyWhitelisted } from '@vue/shared';\nexport { camelize, capitalize, toDisplayString, toHandlerKey } from '@vue/shared';\n\nconst stack = [];\r\nfunction pushWarningContext(vnode) {\r\n stack.push(vnode);\r\n}\r\nfunction popWarningContext() {\r\n stack.pop();\r\n}\r\nfunction warn(msg, ...args) {\r\n // avoid props formatting or warn handler tracking deps that might be mutated\r\n // during patch, leading to infinite recursion.\r\n pauseTracking();\r\n const instance = stack.length ? stack[stack.length - 1].component : null;\r\n const appWarnHandler = instance && instance.appContext.config.warnHandler;\r\n const trace = getComponentTrace();\r\n if (appWarnHandler) {\r\n callWithErrorHandling(appWarnHandler, instance, 11 /* APP_WARN_HANDLER */, [\r\n msg + args.join(''),\r\n instance && instance.proxy,\r\n trace\r\n .map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`)\r\n .join('\\n'),\r\n trace\r\n ]);\r\n }\r\n else {\r\n const warnArgs = [`[Vue warn]: ${msg}`, ...args];\r\n /* istanbul ignore if */\r\n if (trace.length &&\r\n // avoid spamming console during tests\r\n !false) {\r\n warnArgs.push(`\\n`, ...formatTrace(trace));\r\n }\r\n console.warn(...warnArgs);\r\n }\r\n resetTracking();\r\n}\r\nfunction getComponentTrace() {\r\n let currentVNode = stack[stack.length - 1];\r\n if (!currentVNode) {\r\n return [];\r\n }\r\n // we can't just use the stack because it will be incomplete during updates\r\n // that did not start from the root. Re-construct the parent chain using\r\n // instance parent pointers.\r\n const normalizedStack = [];\r\n while (currentVNode) {\r\n const last = normalizedStack[0];\r\n if (last && last.vnode === currentVNode) {\r\n last.recurseCount++;\r\n }\r\n else {\r\n normalizedStack.push({\r\n vnode: currentVNode,\r\n recurseCount: 0\r\n });\r\n }\r\n const parentInstance = currentVNode.component && currentVNode.component.parent;\r\n currentVNode = parentInstance && parentInstance.vnode;\r\n }\r\n return normalizedStack;\r\n}\r\n/* istanbul ignore next */\r\nfunction formatTrace(trace) {\r\n const logs = [];\r\n trace.forEach((entry, i) => {\r\n logs.push(...(i === 0 ? [] : [`\\n`]), ...formatTraceEntry(entry));\r\n });\r\n return logs;\r\n}\r\nfunction formatTraceEntry({ vnode, recurseCount }) {\r\n const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;\r\n const isRoot = vnode.component ? vnode.component.parent == null : false;\r\n const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`;\r\n const close = `>` + postfix;\r\n return vnode.props\r\n ? [open, ...formatProps(vnode.props), close]\r\n : [open + close];\r\n}\r\n/* istanbul ignore next */\r\nfunction formatProps(props) {\r\n const res = [];\r\n const keys = Object.keys(props);\r\n keys.slice(0, 3).forEach(key => {\r\n res.push(...formatProp(key, props[key]));\r\n });\r\n if (keys.length > 3) {\r\n res.push(` ...`);\r\n }\r\n return res;\r\n}\r\n/* istanbul ignore next */\r\nfunction formatProp(key, value, raw) {\r\n if (isString(value)) {\r\n value = JSON.stringify(value);\r\n return raw ? value : [`${key}=${value}`];\r\n }\r\n else if (typeof value === 'number' ||\r\n typeof value === 'boolean' ||\r\n value == null) {\r\n return raw ? value : [`${key}=${value}`];\r\n }\r\n else if (isRef(value)) {\r\n value = formatProp(key, toRaw(value.value), true);\r\n return raw ? value : [`${key}=Ref<`, value, `>`];\r\n }\r\n else if (isFunction$1(value)) {\r\n return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];\r\n }\r\n else {\r\n value = toRaw(value);\r\n return raw ? value : [`${key}=`, value];\r\n }\r\n}\n\nconst ErrorTypeStrings = {\r\n [\"sp\" /* SERVER_PREFETCH */]: 'serverPrefetch hook',\r\n [\"bc\" /* BEFORE_CREATE */]: 'beforeCreate hook',\r\n [\"c\" /* CREATED */]: 'created hook',\r\n [\"bm\" /* BEFORE_MOUNT */]: 'beforeMount hook',\r\n [\"m\" /* MOUNTED */]: 'mounted hook',\r\n [\"bu\" /* BEFORE_UPDATE */]: 'beforeUpdate hook',\r\n [\"u\" /* UPDATED */]: 'updated',\r\n [\"bum\" /* BEFORE_UNMOUNT */]: 'beforeUnmount hook',\r\n [\"um\" /* UNMOUNTED */]: 'unmounted hook',\r\n [\"a\" /* ACTIVATED */]: 'activated hook',\r\n [\"da\" /* DEACTIVATED */]: 'deactivated hook',\r\n [\"ec\" /* ERROR_CAPTURED */]: 'errorCaptured hook',\r\n [\"rtc\" /* RENDER_TRACKED */]: 'renderTracked hook',\r\n [\"rtg\" /* RENDER_TRIGGERED */]: 'renderTriggered hook',\r\n [0 /* SETUP_FUNCTION */]: 'setup function',\r\n [1 /* RENDER_FUNCTION */]: 'render function',\r\n [2 /* WATCH_GETTER */]: 'watcher getter',\r\n [3 /* WATCH_CALLBACK */]: 'watcher callback',\r\n [4 /* WATCH_CLEANUP */]: 'watcher cleanup function',\r\n [5 /* NATIVE_EVENT_HANDLER */]: 'native event handler',\r\n [6 /* COMPONENT_EVENT_HANDLER */]: 'component event handler',\r\n [7 /* VNODE_HOOK */]: 'vnode hook',\r\n [8 /* DIRECTIVE_HOOK */]: 'directive hook',\r\n [9 /* TRANSITION_HOOK */]: 'transition hook',\r\n [10 /* APP_ERROR_HANDLER */]: 'app errorHandler',\r\n [11 /* APP_WARN_HANDLER */]: 'app warnHandler',\r\n [12 /* FUNCTION_REF */]: 'ref function',\r\n [13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader',\r\n [14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' +\r\n 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/vue-next'\r\n};\r\nfunction callWithErrorHandling(fn, instance, type, args) {\r\n let res;\r\n try {\r\n res = args ? fn(...args) : fn();\r\n }\r\n catch (err) {\r\n handleError(err, instance, type);\r\n }\r\n return res;\r\n}\r\nfunction callWithAsyncErrorHandling(fn, instance, type, args) {\r\n if (isFunction$1(fn)) {\r\n const res = callWithErrorHandling(fn, instance, type, args);\r\n if (res && isPromise$1(res)) {\r\n res.catch(err => {\r\n handleError(err, instance, type);\r\n });\r\n }\r\n return res;\r\n }\r\n const values = [];\r\n for (let i = 0; i < fn.length; i++) {\r\n values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));\r\n }\r\n return values;\r\n}\r\nfunction handleError(err, instance, type, throwInDev = true) {\r\n const contextVNode = instance ? instance.vnode : null;\r\n if (instance) {\r\n let cur = instance.parent;\r\n // the exposed instance is the render proxy to keep it consistent with 2.x\r\n const exposedInstance = instance.proxy;\r\n // in production the hook receives only the error code\r\n const errorInfo = (process.env.NODE_ENV !== 'production') ? ErrorTypeStrings[type] : type;\r\n while (cur) {\r\n const errorCapturedHooks = cur.ec;\r\n if (errorCapturedHooks) {\r\n for (let i = 0; i < errorCapturedHooks.length; i++) {\r\n if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {\r\n return;\r\n }\r\n }\r\n }\r\n cur = cur.parent;\r\n }\r\n // app-level handling\r\n const appErrorHandler = instance.appContext.config.errorHandler;\r\n if (appErrorHandler) {\r\n callWithErrorHandling(appErrorHandler, null, 10 /* APP_ERROR_HANDLER */, [err, exposedInstance, errorInfo]);\r\n return;\r\n }\r\n }\r\n logError(err, type, contextVNode, throwInDev);\r\n}\r\nfunction logError(err, type, contextVNode, throwInDev = true) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const info = ErrorTypeStrings[type];\r\n if (contextVNode) {\r\n pushWarningContext(contextVNode);\r\n }\r\n warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);\r\n if (contextVNode) {\r\n popWarningContext();\r\n }\r\n // crash in dev by default so it's more noticeable\r\n if (throwInDev) {\r\n throw err;\r\n }\r\n else {\r\n console.error(err);\r\n }\r\n }\r\n else {\r\n // recover in prod to reduce the impact on end-user\r\n console.error(err);\r\n }\r\n}\n\nlet isFlushing = false;\r\nlet isFlushPending = false;\r\nconst queue = [];\r\nlet flushIndex = 0;\r\nconst pendingPreFlushCbs = [];\r\nlet activePreFlushCbs = null;\r\nlet preFlushIndex = 0;\r\nconst pendingPostFlushCbs = [];\r\nlet activePostFlushCbs = null;\r\nlet postFlushIndex = 0;\r\nconst resolvedPromise = Promise.resolve();\r\nlet currentFlushPromise = null;\r\nlet currentPreFlushParentJob = null;\r\nconst RECURSION_LIMIT = 100;\r\nfunction nextTick(fn) {\r\n const p = currentFlushPromise || resolvedPromise;\r\n return fn ? p.then(this ? fn.bind(this) : fn) : p;\r\n}\r\n// #2768\r\n// Use binary-search to find a suitable position in the queue,\r\n// so that the queue maintains the increasing order of job's id,\r\n// which can prevent the job from being skipped and also can avoid repeated patching.\r\nfunction findInsertionIndex(job) {\r\n // the start index should be `flushIndex + 1`\r\n let start = flushIndex + 1;\r\n let end = queue.length;\r\n const jobId = getId(job);\r\n while (start < end) {\r\n const middle = (start + end) >>> 1;\r\n const middleJobId = getId(queue[middle]);\r\n middleJobId < jobId ? (start = middle + 1) : (end = middle);\r\n }\r\n return start;\r\n}\r\nfunction queueJob(job) {\r\n // the dedupe search uses the startIndex argument of Array.includes()\r\n // by default the search index includes the current job that is being run\r\n // so it cannot recursively trigger itself again.\r\n // if the job is a watch() callback, the search will start with a +1 index to\r\n // allow it recursively trigger itself - it is the user's responsibility to\r\n // ensure it doesn't end up in an infinite loop.\r\n if ((!queue.length ||\r\n !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) &&\r\n job !== currentPreFlushParentJob) {\r\n const pos = findInsertionIndex(job);\r\n if (pos > -1) {\r\n queue.splice(pos, 0, job);\r\n }\r\n else {\r\n queue.push(job);\r\n }\r\n queueFlush();\r\n }\r\n}\r\nfunction queueFlush() {\r\n if (!isFlushing && !isFlushPending) {\r\n isFlushPending = true;\r\n currentFlushPromise = resolvedPromise.then(flushJobs);\r\n }\r\n}\r\nfunction invalidateJob(job) {\r\n const i = queue.indexOf(job);\r\n if (i > flushIndex) {\r\n queue.splice(i, 1);\r\n }\r\n}\r\nfunction queueCb(cb, activeQueue, pendingQueue, index) {\r\n if (!isArray(cb)) {\r\n if (!activeQueue ||\r\n !activeQueue.includes(cb, cb.allowRecurse ? index + 1 : index)) {\r\n pendingQueue.push(cb);\r\n }\r\n }\r\n else {\r\n // if cb is an array, it is a component lifecycle hook which can only be\r\n // triggered by a job, which is already deduped in the main queue, so\r\n // we can skip duplicate check here to improve perf\r\n pendingQueue.push(...cb);\r\n }\r\n queueFlush();\r\n}\r\nfunction queuePreFlushCb(cb) {\r\n queueCb(cb, activePreFlushCbs, pendingPreFlushCbs, preFlushIndex);\r\n}\r\nfunction queuePostFlushCb(cb) {\r\n queueCb(cb, activePostFlushCbs, pendingPostFlushCbs, postFlushIndex);\r\n}\r\nfunction flushPreFlushCbs(seen, parentJob = null) {\r\n if (pendingPreFlushCbs.length) {\r\n currentPreFlushParentJob = parentJob;\r\n activePreFlushCbs = [...new Set(pendingPreFlushCbs)];\r\n pendingPreFlushCbs.length = 0;\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n seen = seen || new Map();\r\n }\r\n for (preFlushIndex = 0; preFlushIndex < activePreFlushCbs.length; preFlushIndex++) {\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n checkRecursiveUpdates(seen, activePreFlushCbs[preFlushIndex])) {\r\n continue;\r\n }\r\n activePreFlushCbs[preFlushIndex]();\r\n }\r\n activePreFlushCbs = null;\r\n preFlushIndex = 0;\r\n currentPreFlushParentJob = null;\r\n // recursively flush until it drains\r\n flushPreFlushCbs(seen, parentJob);\r\n }\r\n}\r\nfunction flushPostFlushCbs(seen) {\r\n if (pendingPostFlushCbs.length) {\r\n const deduped = [...new Set(pendingPostFlushCbs)];\r\n pendingPostFlushCbs.length = 0;\r\n // #1947 already has active queue, nested flushPostFlushCbs call\r\n if (activePostFlushCbs) {\r\n activePostFlushCbs.push(...deduped);\r\n return;\r\n }\r\n activePostFlushCbs = deduped;\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n seen = seen || new Map();\r\n }\r\n activePostFlushCbs.sort((a, b) => getId(a) - getId(b));\r\n for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {\r\n continue;\r\n }\r\n activePostFlushCbs[postFlushIndex]();\r\n }\r\n activePostFlushCbs = null;\r\n postFlushIndex = 0;\r\n }\r\n}\r\nconst getId = (job) => job.id == null ? Infinity : job.id;\r\nfunction flushJobs(seen) {\r\n isFlushPending = false;\r\n isFlushing = true;\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n seen = seen || new Map();\r\n }\r\n flushPreFlushCbs(seen);\r\n // Sort queue before flush.\r\n // This ensures that:\r\n // 1. Components are updated from parent to child. (because parent is always\r\n // created before the child so its render effect will have smaller\r\n // priority number)\r\n // 2. If a component is unmounted during a parent component's update,\r\n // its update can be skipped.\r\n queue.sort((a, b) => getId(a) - getId(b));\r\n try {\r\n for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {\r\n const job = queue[flushIndex];\r\n if (job && job.active !== false) {\r\n if ((process.env.NODE_ENV !== 'production') && checkRecursiveUpdates(seen, job)) {\r\n continue;\r\n }\r\n callWithErrorHandling(job, null, 14 /* SCHEDULER */);\r\n }\r\n }\r\n }\r\n finally {\r\n flushIndex = 0;\r\n queue.length = 0;\r\n flushPostFlushCbs(seen);\r\n isFlushing = false;\r\n currentFlushPromise = null;\r\n // some postFlushCb queued jobs!\r\n // keep flushing until it drains.\r\n if (queue.length ||\r\n pendingPreFlushCbs.length ||\r\n pendingPostFlushCbs.length) {\r\n flushJobs(seen);\r\n }\r\n }\r\n}\r\nfunction checkRecursiveUpdates(seen, fn) {\r\n if (!seen.has(fn)) {\r\n seen.set(fn, 1);\r\n }\r\n else {\r\n const count = seen.get(fn);\r\n if (count > RECURSION_LIMIT) {\r\n const instance = fn.ownerInstance;\r\n const componentName = instance && getComponentName(instance.type);\r\n warn(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. ` +\r\n `This means you have a reactive effect that is mutating its own ` +\r\n `dependencies and thus recursively triggering itself. Possible sources ` +\r\n `include component template, render function, updated hook or ` +\r\n `watcher source function.`);\r\n return true;\r\n }\r\n else {\r\n seen.set(fn, count + 1);\r\n }\r\n }\r\n}\n\n/* eslint-disable no-restricted-globals */\r\nlet isHmrUpdating = false;\r\nconst hmrDirtyComponents = new Set();\r\n// Expose the HMR runtime on the global object\r\n// This makes it entirely tree-shakable without polluting the exports and makes\r\n// it easier to be used in toolings like vue-loader\r\n// Note: for a component to be eligible for HMR it also needs the __hmrId option\r\n// to be set so that its instances can be registered / removed.\r\nif ((process.env.NODE_ENV !== 'production')) {\r\n const globalObject = typeof global !== 'undefined'\r\n ? global\r\n : typeof self !== 'undefined'\r\n ? self\r\n : typeof window !== 'undefined'\r\n ? window\r\n : {};\r\n globalObject.__VUE_HMR_RUNTIME__ = {\r\n createRecord: tryWrap(createRecord),\r\n rerender: tryWrap(rerender),\r\n reload: tryWrap(reload)\r\n };\r\n}\r\nconst map = new Map();\r\nfunction registerHMR(instance) {\r\n const id = instance.type.__hmrId;\r\n let record = map.get(id);\r\n if (!record) {\r\n createRecord(id, instance.type);\r\n record = map.get(id);\r\n }\r\n record.instances.add(instance);\r\n}\r\nfunction unregisterHMR(instance) {\r\n map.get(instance.type.__hmrId).instances.delete(instance);\r\n}\r\nfunction createRecord(id, component) {\r\n if (!component) {\r\n warn(`HMR API usage is out of date.\\n` +\r\n `Please upgrade vue-loader/vite/rollup-plugin-vue or other relevant ` +\r\n `dependency that handles Vue SFC compilation.`);\r\n component = {};\r\n }\r\n if (map.has(id)) {\r\n return false;\r\n }\r\n map.set(id, {\r\n component: isClassComponent(component) ? component.__vccOpts : component,\r\n instances: new Set()\r\n });\r\n return true;\r\n}\r\nfunction rerender(id, newRender) {\r\n const record = map.get(id);\r\n if (!record)\r\n return;\r\n if (newRender)\r\n record.component.render = newRender;\r\n // Array.from creates a snapshot which avoids the set being mutated during\r\n // updates\r\n Array.from(record.instances).forEach(instance => {\r\n if (newRender) {\r\n instance.render = newRender;\r\n }\r\n instance.renderCache = [];\r\n // this flag forces child components with slot content to update\r\n isHmrUpdating = true;\r\n instance.update();\r\n isHmrUpdating = false;\r\n });\r\n}\r\nfunction reload(id, newComp) {\r\n const record = map.get(id);\r\n if (!record)\r\n return;\r\n // Array.from creates a snapshot which avoids the set being mutated during\r\n // updates\r\n const { component, instances } = record;\r\n if (!hmrDirtyComponents.has(component)) {\r\n // 1. Update existing comp definition to match new one\r\n newComp = isClassComponent(newComp) ? newComp.__vccOpts : newComp;\r\n extend(component, newComp);\r\n for (const key in component) {\r\n if (key !== '__file' && !(key in newComp)) {\r\n delete component[key];\r\n }\r\n }\r\n // 2. Mark component dirty. This forces the renderer to replace the component\r\n // on patch.\r\n hmrDirtyComponents.add(component);\r\n // 3. Make sure to unmark the component after the reload.\r\n queuePostFlushCb(() => {\r\n hmrDirtyComponents.delete(component);\r\n });\r\n }\r\n Array.from(instances).forEach(instance => {\r\n if (instance.parent) {\r\n // 4. Force the parent instance to re-render. This will cause all updated\r\n // components to be unmounted and re-mounted. Queue the update so that we\r\n // don't end up forcing the same parent to re-render multiple times.\r\n queueJob(instance.parent.update);\r\n }\r\n else if (instance.appContext.reload) {\r\n // root instance mounted via createApp() has a reload method\r\n instance.appContext.reload();\r\n }\r\n else if (typeof window !== 'undefined') {\r\n // root instance inside tree created via raw render(). Force reload.\r\n window.location.reload();\r\n }\r\n else {\r\n console.warn('[HMR] Root or manually mounted instance modified. Full reload required.');\r\n }\r\n });\r\n}\r\nfunction tryWrap(fn) {\r\n return (id, arg) => {\r\n try {\r\n return fn(id, arg);\r\n }\r\n catch (e) {\r\n console.error(e);\r\n console.warn(`[HMR] Something went wrong during Vue component hot-reload. ` +\r\n `Full reload required.`);\r\n }\r\n };\r\n}\n\nlet devtools;\r\nfunction setDevtoolsHook(hook) {\r\n devtools = hook;\r\n}\r\nfunction devtoolsInitApp(app, version) {\r\n // TODO queue if devtools is undefined\r\n if (!devtools)\r\n return;\r\n devtools.emit(\"app:init\" /* APP_INIT */, app, version, {\r\n Fragment,\r\n Text,\r\n Comment: Comment$1,\r\n Static\r\n });\r\n}\r\nfunction devtoolsUnmountApp(app) {\r\n if (!devtools)\r\n return;\r\n devtools.emit(\"app:unmount\" /* APP_UNMOUNT */, app);\r\n}\r\nconst devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook(\"component:added\" /* COMPONENT_ADDED */);\r\nconst devtoolsComponentUpdated = /*#__PURE__*/ createDevtoolsComponentHook(\"component:updated\" /* COMPONENT_UPDATED */);\r\nconst devtoolsComponentRemoved = /*#__PURE__*/ createDevtoolsComponentHook(\"component:removed\" /* COMPONENT_REMOVED */);\r\nfunction createDevtoolsComponentHook(hook) {\r\n return (component) => {\r\n if (!devtools)\r\n return;\r\n devtools.emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);\r\n };\r\n}\r\nconst devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook(\"perf:start\" /* PERFORMANCE_START */);\r\nconst devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook(\"perf:end\" /* PERFORMANCE_END */);\r\nfunction createDevtoolsPerformanceHook(hook) {\r\n return (component, type, time) => {\r\n if (!devtools)\r\n return;\r\n devtools.emit(hook, component.appContext.app, component.uid, component, type, time);\r\n };\r\n}\r\nfunction devtoolsComponentEmit(component, event, params) {\r\n if (!devtools)\r\n return;\r\n devtools.emit(\"component:emit\" /* COMPONENT_EMIT */, component.appContext.app, component, event, params);\r\n}\n\nconst deprecationData = {\r\n [\"GLOBAL_MOUNT\" /* GLOBAL_MOUNT */]: {\r\n message: `The global app bootstrapping API has changed: vm.$mount() and the \"el\" ` +\r\n `option have been removed. Use createApp(RootComponent).mount() instead.`,\r\n link: `https://v3.vuejs.org/guide/migration/global-api.html#mounting-app-instance`\r\n },\r\n [\"GLOBAL_MOUNT_CONTAINER\" /* GLOBAL_MOUNT_CONTAINER */]: {\r\n message: `Vue detected directives on the mount container. ` +\r\n `In Vue 3, the container is no longer considered part of the template ` +\r\n `and will not be processed/replaced.`,\r\n link: `https://v3.vuejs.org/guide/migration/mount-changes.html`\r\n },\r\n [\"GLOBAL_EXTEND\" /* GLOBAL_EXTEND */]: {\r\n message: `Vue.extend() has been removed in Vue 3. ` +\r\n `Use defineComponent() instead.`,\r\n link: `https://v3.vuejs.org/api/global-api.html#definecomponent`\r\n },\r\n [\"GLOBAL_PROTOTYPE\" /* GLOBAL_PROTOTYPE */]: {\r\n message: `Vue.prototype is no longer available in Vue 3. ` +\r\n `Use app.config.globalProperties instead.`,\r\n link: `https://v3.vuejs.org/guide/migration/global-api.html#vue-prototype-replaced-by-config-globalproperties`\r\n },\r\n [\"GLOBAL_SET\" /* GLOBAL_SET */]: {\r\n message: `Vue.set() has been removed as it is no longer needed in Vue 3. ` +\r\n `Simply use native JavaScript mutations.`\r\n },\r\n [\"GLOBAL_DELETE\" /* GLOBAL_DELETE */]: {\r\n message: `Vue.delete() has been removed as it is no longer needed in Vue 3. ` +\r\n `Simply use native JavaScript mutations.`\r\n },\r\n [\"GLOBAL_OBSERVABLE\" /* GLOBAL_OBSERVABLE */]: {\r\n message: `Vue.observable() has been removed. ` +\r\n `Use \\`import { reactive } from \"vue\"\\` from Composition API instead.`,\r\n link: `https://v3.vuejs.org/api/basic-reactivity.html`\r\n },\r\n [\"GLOBAL_PRIVATE_UTIL\" /* GLOBAL_PRIVATE_UTIL */]: {\r\n message: `Vue.util has been removed. Please refactor to avoid its usage ` +\r\n `since it was an internal API even in Vue 2.`\r\n },\r\n [\"CONFIG_SILENT\" /* CONFIG_SILENT */]: {\r\n message: `config.silent has been removed because it is not good practice to ` +\r\n `intentionally suppress warnings. You can use your browser console's ` +\r\n `filter features to focus on relevant messages.`\r\n },\r\n [\"CONFIG_DEVTOOLS\" /* CONFIG_DEVTOOLS */]: {\r\n message: `config.devtools has been removed. To enable devtools for ` +\r\n `production, configure the __VUE_PROD_DEVTOOLS__ compile-time flag.`,\r\n link: `https://github.com/vuejs/vue-next/tree/master/packages/vue#bundler-build-feature-flags`\r\n },\r\n [\"CONFIG_KEY_CODES\" /* CONFIG_KEY_CODES */]: {\r\n message: `config.keyCodes has been removed. ` +\r\n `In Vue 3, you can directly use the kebab-case key names as v-on modifiers.`,\r\n link: `https://v3.vuejs.org/guide/migration/keycode-modifiers.html`\r\n },\r\n [\"CONFIG_PRODUCTION_TIP\" /* CONFIG_PRODUCTION_TIP */]: {\r\n message: `config.productionTip has been removed.`,\r\n link: `https://v3.vuejs.org/guide/migration/global-api.html#config-productiontip-removed`\r\n },\r\n [\"CONFIG_IGNORED_ELEMENTS\" /* CONFIG_IGNORED_ELEMENTS */]: {\r\n message: () => {\r\n let msg = `config.ignoredElements has been removed.`;\r\n if (isRuntimeOnly()) {\r\n msg += ` Pass the \"isCustomElement\" option to @vue/compiler-dom instead.`;\r\n }\r\n else {\r\n msg += ` Use config.isCustomElement instead.`;\r\n }\r\n return msg;\r\n },\r\n link: `https://v3.vuejs.org/guide/migration/global-api.html#config-ignoredelements-is-now-config-iscustomelement`\r\n },\r\n [\"CONFIG_WHITESPACE\" /* CONFIG_WHITESPACE */]: {\r\n // this warning is only relevant in the full build when using runtime\r\n // compilation, so it's put in the runtime compatConfig list.\r\n message: `Vue 3 compiler's whitespace option will default to \"condense\" instead of ` +\r\n `\"preserve\". To suppress this warning, provide an explicit value for ` +\r\n `\\`config.compilerOptions.whitespace\\`.`\r\n },\r\n [\"CONFIG_OPTION_MERGE_STRATS\" /* CONFIG_OPTION_MERGE_STRATS */]: {\r\n message: `config.optionMergeStrategies no longer exposes internal strategies. ` +\r\n `Use custom merge functions instead.`\r\n },\r\n [\"INSTANCE_SET\" /* INSTANCE_SET */]: {\r\n message: `vm.$set() has been removed as it is no longer needed in Vue 3. ` +\r\n `Simply use native JavaScript mutations.`\r\n },\r\n [\"INSTANCE_DELETE\" /* INSTANCE_DELETE */]: {\r\n message: `vm.$delete() has been removed as it is no longer needed in Vue 3. ` +\r\n `Simply use native JavaScript mutations.`\r\n },\r\n [\"INSTANCE_DESTROY\" /* INSTANCE_DESTROY */]: {\r\n message: `vm.$destroy() has been removed. Use app.unmount() instead.`,\r\n link: `https://v3.vuejs.org/api/application-api.html#unmount`\r\n },\r\n [\"INSTANCE_EVENT_EMITTER\" /* INSTANCE_EVENT_EMITTER */]: {\r\n message: `vm.$on/$once/$off() have been removed. ` +\r\n `Use an external event emitter library instead.`,\r\n link: `https://v3.vuejs.org/guide/migration/events-api.html`\r\n },\r\n [\"INSTANCE_EVENT_HOOKS\" /* INSTANCE_EVENT_HOOKS */]: {\r\n message: event => `\"${event}\" lifecycle events are no longer supported. From templates, ` +\r\n `use the \"vnode\" prefix instead of \"hook:\". For example, @${event} ` +\r\n `should be changed to @vnode-${event.slice(5)}. ` +\r\n `From JavaScript, use Composition API to dynamically register lifecycle ` +\r\n `hooks.`,\r\n link: `https://v3.vuejs.org/guide/migration/vnode-lifecycle-events.html`\r\n },\r\n [\"INSTANCE_CHILDREN\" /* INSTANCE_CHILDREN */]: {\r\n message: `vm.$children has been removed. Consider refactoring your logic ` +\r\n `to avoid relying on direct access to child components.`,\r\n link: `https://v3.vuejs.org/guide/migration/children.html`\r\n },\r\n [\"INSTANCE_LISTENERS\" /* INSTANCE_LISTENERS */]: {\r\n message: `vm.$listeners has been removed. In Vue 3, parent v-on listeners are ` +\r\n `included in vm.$attrs and it is no longer necessary to separately use ` +\r\n `v-on=\"$listeners\" if you are already using v-bind=\"$attrs\". ` +\r\n `(Note: the Vue 3 behavior only applies if this compat config is disabled)`,\r\n link: `https://v3.vuejs.org/guide/migration/listeners-removed.html`\r\n },\r\n [\"INSTANCE_SCOPED_SLOTS\" /* INSTANCE_SCOPED_SLOTS */]: {\r\n message: `vm.$scopedSlots has been removed. Use vm.$slots instead.`,\r\n link: `https://v3.vuejs.org/guide/migration/slots-unification.html`\r\n },\r\n [\"INSTANCE_ATTRS_CLASS_STYLE\" /* INSTANCE_ATTRS_CLASS_STYLE */]: {\r\n message: componentName => `Component <${componentName ||\r\n 'Anonymous'}> has \\`inheritAttrs: false\\` but is ` +\r\n `relying on class/style fallthrough from parent. In Vue 3, class/style ` +\r\n `are now included in $attrs and will no longer fallthrough when ` +\r\n `inheritAttrs is false. If you are already using v-bind=\"$attrs\" on ` +\r\n `component root it should render the same end result. ` +\r\n `If you are binding $attrs to a non-root element and expecting ` +\r\n `class/style to fallthrough on root, you will need to now manually bind ` +\r\n `them on root via :class=\"$attrs.class\".`,\r\n link: `https://v3.vuejs.org/guide/migration/attrs-includes-class-style.html`\r\n },\r\n [\"OPTIONS_DATA_FN\" /* OPTIONS_DATA_FN */]: {\r\n message: `The \"data\" option can no longer be a plain object. ` +\r\n `Always use a function.`,\r\n link: `https://v3.vuejs.org/guide/migration/data-option.html`\r\n },\r\n [\"OPTIONS_DATA_MERGE\" /* OPTIONS_DATA_MERGE */]: {\r\n message: (key) => `Detected conflicting key \"${key}\" when merging data option values. ` +\r\n `In Vue 3, data keys are merged shallowly and will override one another.`,\r\n link: `https://v3.vuejs.org/guide/migration/data-option.html#mixin-merge-behavior-change`\r\n },\r\n [\"OPTIONS_BEFORE_DESTROY\" /* OPTIONS_BEFORE_DESTROY */]: {\r\n message: `\\`beforeDestroy\\` has been renamed to \\`beforeUnmount\\`.`\r\n },\r\n [\"OPTIONS_DESTROYED\" /* OPTIONS_DESTROYED */]: {\r\n message: `\\`destroyed\\` has been renamed to \\`unmounted\\`.`\r\n },\r\n [\"WATCH_ARRAY\" /* WATCH_ARRAY */]: {\r\n message: `\"watch\" option or vm.$watch on an array value will no longer ` +\r\n `trigger on array mutation unless the \"deep\" option is specified. ` +\r\n `If current usage is intended, you can disable the compat behavior and ` +\r\n `suppress this warning with:` +\r\n `\\n\\n configureCompat({ ${\"WATCH_ARRAY\" /* WATCH_ARRAY */}: false })\\n`,\r\n link: `https://v3.vuejs.org/guide/migration/watch.html`\r\n },\r\n [\"PROPS_DEFAULT_THIS\" /* PROPS_DEFAULT_THIS */]: {\r\n message: (key) => `props default value function no longer has access to \"this\". The compat ` +\r\n `build only offers access to this.$options.` +\r\n `(found in prop \"${key}\")`,\r\n link: `https://v3.vuejs.org/guide/migration/props-default-this.html`\r\n },\r\n [\"CUSTOM_DIR\" /* CUSTOM_DIR */]: {\r\n message: (legacyHook, newHook) => `Custom directive hook \"${legacyHook}\" has been removed. ` +\r\n `Use \"${newHook}\" instead.`,\r\n link: `https://v3.vuejs.org/guide/migration/custom-directives.html`\r\n },\r\n [\"V_FOR_REF\" /* V_FOR_REF */]: {\r\n message: `Ref usage on v-for no longer creates array ref values in Vue 3. ` +\r\n `Consider using function refs or refactor to avoid ref usage altogether.`,\r\n link: `https://v3.vuejs.org/guide/migration/array-refs.html`\r\n },\r\n [\"V_ON_KEYCODE_MODIFIER\" /* V_ON_KEYCODE_MODIFIER */]: {\r\n message: `Using keyCode as v-on modifier is no longer supported. ` +\r\n `Use kebab-case key name modifiers instead.`,\r\n link: `https://v3.vuejs.org/guide/migration/keycode-modifiers.html`\r\n },\r\n [\"ATTR_FALSE_VALUE\" /* ATTR_FALSE_VALUE */]: {\r\n message: (name) => `Attribute \"${name}\" with v-bind value \\`false\\` will render ` +\r\n `${name}=\"false\" instead of removing it in Vue 3. To remove the attribute, ` +\r\n `use \\`null\\` or \\`undefined\\` instead. If the usage is intended, ` +\r\n `you can disable the compat behavior and suppress this warning with:` +\r\n `\\n\\n configureCompat({ ${\"ATTR_FALSE_VALUE\" /* ATTR_FALSE_VALUE */}: false })\\n`,\r\n link: `https://v3.vuejs.org/guide/migration/attribute-coercion.html`\r\n },\r\n [\"ATTR_ENUMERATED_COERCION\" /* ATTR_ENUMERATED_COERCION */]: {\r\n message: (name, value, coerced) => `Enumerated attribute \"${name}\" with v-bind value \\`${value}\\` will ` +\r\n `${value === null ? `be removed` : `render the value as-is`} instead of coercing the value to \"${coerced}\" in Vue 3. ` +\r\n `Always use explicit \"true\" or \"false\" values for enumerated attributes. ` +\r\n `If the usage is intended, ` +\r\n `you can disable the compat behavior and suppress this warning with:` +\r\n `\\n\\n configureCompat({ ${\"ATTR_ENUMERATED_COERCION\" /* ATTR_ENUMERATED_COERCION */}: false })\\n`,\r\n link: `https://v3.vuejs.org/guide/migration/attribute-coercion.html`\r\n },\r\n [\"TRANSITION_CLASSES\" /* TRANSITION_CLASSES */]: {\r\n message: `` // this feature cannot be runtime-detected\r\n },\r\n [\"TRANSITION_GROUP_ROOT\" /* TRANSITION_GROUP_ROOT */]: {\r\n message: ` no longer renders a root element by ` +\r\n `default if no \"tag\" prop is specified. If you do not rely on the span ` +\r\n `for styling, you can disable the compat behavior and suppress this ` +\r\n `warning with:` +\r\n `\\n\\n configureCompat({ ${\"TRANSITION_GROUP_ROOT\" /* TRANSITION_GROUP_ROOT */}: false })\\n`,\r\n link: `https://v3.vuejs.org/guide/migration/transition-group.html`\r\n },\r\n [\"COMPONENT_ASYNC\" /* COMPONENT_ASYNC */]: {\r\n message: (comp) => {\r\n const name = getComponentName(comp);\r\n return (`Async component${name ? ` <${name}>` : `s`} should be explicitly created via \\`defineAsyncComponent()\\` ` +\r\n `in Vue 3. Plain functions will be treated as functional components in ` +\r\n `non-compat build. If you have already migrated all async component ` +\r\n `usage and intend to use plain functions for functional components, ` +\r\n `you can disable the compat behavior and suppress this ` +\r\n `warning with:` +\r\n `\\n\\n configureCompat({ ${\"COMPONENT_ASYNC\" /* COMPONENT_ASYNC */}: false })\\n`);\r\n },\r\n link: `https://v3.vuejs.org/guide/migration/async-components.html`\r\n },\r\n [\"COMPONENT_FUNCTIONAL\" /* COMPONENT_FUNCTIONAL */]: {\r\n message: (comp) => {\r\n const name = getComponentName(comp);\r\n return (`Functional component${name ? ` <${name}>` : `s`} should be defined as a plain function in Vue 3. The \"functional\" ` +\r\n `option has been removed. NOTE: Before migrating to use plain ` +\r\n `functions for functional components, first make sure that all async ` +\r\n `components usage have been migrated and its compat behavior has ` +\r\n `been disabled.`);\r\n },\r\n link: `https://v3.vuejs.org/guide/migration/functional-components.html`\r\n },\r\n [\"COMPONENT_V_MODEL\" /* COMPONENT_V_MODEL */]: {\r\n message: (comp) => {\r\n const configMsg = `opt-in to ` +\r\n `Vue 3 behavior on a per-component basis with \\`compatConfig: { ${\"COMPONENT_V_MODEL\" /* COMPONENT_V_MODEL */}: false }\\`.`;\r\n if (comp.props &&\r\n (isArray(comp.props)\r\n ? comp.props.includes('modelValue')\r\n : hasOwn(comp.props, 'modelValue'))) {\r\n return (`Component delcares \"modelValue\" prop, which is Vue 3 usage, but ` +\r\n `is running under Vue 2 compat v-model behavior. You can ${configMsg}`);\r\n }\r\n return (`v-model usage on component has changed in Vue 3. Component that expects ` +\r\n `to work with v-model should now use the \"modelValue\" prop and emit the ` +\r\n `\"update:modelValue\" event. You can update the usage and then ${configMsg}`);\r\n },\r\n link: `https://v3.vuejs.org/guide/migration/v-model.html`\r\n },\r\n [\"RENDER_FUNCTION\" /* RENDER_FUNCTION */]: {\r\n message: `Vue 3's render function API has changed. ` +\r\n `You can opt-in to the new API with:` +\r\n `\\n\\n configureCompat({ ${\"RENDER_FUNCTION\" /* RENDER_FUNCTION */}: false })\\n` +\r\n `\\n (This can also be done per-component via the \"compatConfig\" option.)`,\r\n link: `https://v3.vuejs.org/guide/migration/render-function-api.html`\r\n },\r\n [\"FILTERS\" /* FILTERS */]: {\r\n message: `filters have been removed in Vue 3. ` +\r\n `The \"|\" symbol will be treated as native JavaScript bitwise OR operator. ` +\r\n `Use method calls or computed properties instead.`,\r\n link: `https://v3.vuejs.org/guide/migration/filters.html`\r\n },\r\n [\"PRIVATE_APIS\" /* PRIVATE_APIS */]: {\r\n message: name => `\"${name}\" is a Vue 2 private API that no longer exists in Vue 3. ` +\r\n `If you are seeing this warning only due to a dependency, you can ` +\r\n `suppress this warning via { PRIVATE_APIS: 'supress-warning' }.`\r\n }\r\n};\r\nconst instanceWarned = Object.create(null);\r\nconst warnCount = Object.create(null);\r\nfunction warnDeprecation(key, instance, ...args) {\r\n if (!(process.env.NODE_ENV !== 'production')) {\r\n return;\r\n }\r\n instance = instance || getCurrentInstance();\r\n // check user config\r\n const config = getCompatConfigForKey(key, instance);\r\n if (config === 'suppress-warning') {\r\n return;\r\n }\r\n const dupKey = key + args.join('');\r\n let compId = instance && formatComponentName(instance, instance.type);\r\n if (compId === 'Anonymous' && instance) {\r\n compId = instance.uid;\r\n }\r\n // skip if the same warning is emitted for the same component type\r\n const componentDupKey = dupKey + compId;\r\n if (componentDupKey in instanceWarned) {\r\n return;\r\n }\r\n instanceWarned[componentDupKey] = true;\r\n // same warning, but different component. skip the long message and just\r\n // log the key and count.\r\n if (dupKey in warnCount) {\r\n warn(`(deprecation ${key}) (${++warnCount[dupKey] + 1})`);\r\n return;\r\n }\r\n warnCount[dupKey] = 0;\r\n const { message, link } = deprecationData[key];\r\n warn(`(deprecation ${key}) ${typeof message === 'function' ? message(...args) : message}${link ? `\\n Details: ${link}` : ``}`);\r\n if (!isCompatEnabled(key, instance, true)) {\r\n console.error(`^ The above deprecation's compat behavior is disabled and will likely ` +\r\n `lead to runtime errors.`);\r\n }\r\n}\r\nconst globalCompatConfig = {\r\n MODE: 2\r\n};\r\nfunction getCompatConfigForKey(key, instance) {\r\n const instanceConfig = instance && instance.type.compatConfig;\r\n if (instanceConfig && key in instanceConfig) {\r\n return instanceConfig[key];\r\n }\r\n return globalCompatConfig[key];\r\n}\r\nfunction isCompatEnabled(key, instance, enableForBuiltIn = false) {\r\n // skip compat for built-in components\r\n if (!enableForBuiltIn && instance && instance.type.__isBuiltIn) {\r\n return false;\r\n }\r\n const rawMode = getCompatConfigForKey('MODE', instance) || 2;\r\n const val = getCompatConfigForKey(key, instance);\r\n const mode = isFunction$1(rawMode)\r\n ? rawMode(instance && instance.type)\r\n : rawMode;\r\n if (mode === 2) {\r\n return val !== false;\r\n }\r\n else {\r\n return val === true || val === 'suppress-warning';\r\n }\r\n}\n\nfunction emit(instance, event, ...rawArgs) {\r\n const props = instance.vnode.props || EMPTY_OBJ;\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const { emitsOptions, propsOptions: [propsOptions] } = instance;\r\n if (emitsOptions) {\r\n if (!(event in emitsOptions) &&\r\n !(false )) {\r\n if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {\r\n warn(`Component emitted event \"${event}\" but it is neither declared in ` +\r\n `the emits option nor as an \"${toHandlerKey(event)}\" prop.`);\r\n }\r\n }\r\n else {\r\n const validator = emitsOptions[event];\r\n if (isFunction$1(validator)) {\r\n const isValid = validator(...rawArgs);\r\n if (!isValid) {\r\n warn(`Invalid event arguments: event validation failed for event \"${event}\".`);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n let args = rawArgs;\r\n const isModelListener = event.startsWith('update:');\r\n // for v-model update:xxx events, apply modifiers on args\r\n const modelArg = isModelListener && event.slice(7);\r\n if (modelArg && modelArg in props) {\r\n const modifiersKey = `${modelArg === 'modelValue' ? 'model' : modelArg}Modifiers`;\r\n const { number, trim } = props[modifiersKey] || EMPTY_OBJ;\r\n if (trim) {\r\n args = rawArgs.map(a => a.trim());\r\n }\r\n else if (number) {\r\n args = rawArgs.map(toNumber);\r\n }\r\n }\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n devtoolsComponentEmit(instance, event, args);\r\n }\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const lowerCaseEvent = event.toLowerCase();\r\n if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {\r\n warn(`Event \"${lowerCaseEvent}\" is emitted in component ` +\r\n `${formatComponentName(instance, instance.type)} but the handler is registered for \"${event}\". ` +\r\n `Note that HTML attributes are case-insensitive and you cannot use ` +\r\n `v-on to listen to camelCase events when using in-DOM templates. ` +\r\n `You should probably use \"${hyphenate(event)}\" instead of \"${event}\".`);\r\n }\r\n }\r\n let handlerName;\r\n let handler = props[(handlerName = toHandlerKey(event))] ||\r\n // also try camelCase event handler (#2249)\r\n props[(handlerName = toHandlerKey(camelize(event)))];\r\n // for v-model update:xxx events, also trigger kebab-case equivalent\r\n // for props passed via kebab-case\r\n if (!handler && isModelListener) {\r\n handler = props[(handlerName = toHandlerKey(hyphenate(event)))];\r\n }\r\n if (handler) {\r\n callWithAsyncErrorHandling(handler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args);\r\n }\r\n const onceHandler = props[handlerName + `Once`];\r\n if (onceHandler) {\r\n if (!instance.emitted) {\r\n instance.emitted = {};\r\n }\r\n else if (instance.emitted[handlerName]) {\r\n return;\r\n }\r\n instance.emitted[handlerName] = true;\r\n callWithAsyncErrorHandling(onceHandler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args);\r\n }\r\n}\r\nfunction normalizeEmitsOptions(comp, appContext, asMixin = false) {\r\n const cache = appContext.emitsCache;\r\n const cached = cache.get(comp);\r\n if (cached !== undefined) {\r\n return cached;\r\n }\r\n const raw = comp.emits;\r\n let normalized = {};\r\n // apply mixin/extends props\r\n let hasExtends = false;\r\n if (__VUE_OPTIONS_API__ && !isFunction$1(comp)) {\r\n const extendEmits = (raw) => {\r\n const normalizedFromExtend = normalizeEmitsOptions(raw, appContext, true);\r\n if (normalizedFromExtend) {\r\n hasExtends = true;\r\n extend(normalized, normalizedFromExtend);\r\n }\r\n };\r\n if (!asMixin && appContext.mixins.length) {\r\n appContext.mixins.forEach(extendEmits);\r\n }\r\n if (comp.extends) {\r\n extendEmits(comp.extends);\r\n }\r\n if (comp.mixins) {\r\n comp.mixins.forEach(extendEmits);\r\n }\r\n }\r\n if (!raw && !hasExtends) {\r\n cache.set(comp, null);\r\n return null;\r\n }\r\n if (isArray(raw)) {\r\n raw.forEach(key => (normalized[key] = null));\r\n }\r\n else {\r\n extend(normalized, raw);\r\n }\r\n cache.set(comp, normalized);\r\n return normalized;\r\n}\r\n// Check if an incoming prop key is a declared emit event listener.\r\n// e.g. With `emits: { click: null }`, props named `onClick` and `onclick` are\r\n// both considered matched listeners.\r\nfunction isEmitListener(options, key) {\r\n if (!options || !isOn(key)) {\r\n return false;\r\n }\r\n key = key.slice(2).replace(/Once$/, '');\r\n return (hasOwn(options, key[0].toLowerCase() + key.slice(1)) ||\r\n hasOwn(options, hyphenate(key)) ||\r\n hasOwn(options, key));\r\n}\n\n/**\r\n * mark the current rendering instance for asset resolution (e.g.\r\n * resolveComponent, resolveDirective) during render\r\n */\r\nlet currentRenderingInstance = null;\r\nlet currentScopeId = null;\r\n/**\r\n * Note: rendering calls maybe nested. The function returns the parent rendering\r\n * instance if present, which should be restored after the render is done:\r\n *\r\n * ```js\r\n * const prev = setCurrentRenderingInstance(i)\r\n * // ...render\r\n * setCurrentRenderingInstance(prev)\r\n * ```\r\n */\r\nfunction setCurrentRenderingInstance(instance) {\r\n const prev = currentRenderingInstance;\r\n currentRenderingInstance = instance;\r\n currentScopeId = (instance && instance.type.__scopeId) || null;\r\n return prev;\r\n}\r\n/**\r\n * Set scope id when creating hoisted vnodes.\r\n * @private compiler helper\r\n */\r\nfunction pushScopeId(id) {\r\n currentScopeId = id;\r\n}\r\n/**\r\n * Technically we no longer need this after 3.0.8 but we need to keep the same\r\n * API for backwards compat w/ code generated by compilers.\r\n * @private\r\n */\r\nfunction popScopeId() {\r\n currentScopeId = null;\r\n}\r\n/**\r\n * Only for backwards compat\r\n * @private\r\n */\r\nconst withScopeId = (_id) => withCtx;\r\n/**\r\n * Wrap a slot function to memoize current rendering instance\r\n * @private compiler helper\r\n */\r\nfunction withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot // false only\r\n) {\r\n if (!ctx)\r\n return fn;\r\n // already normalized\r\n if (fn._n) {\r\n return fn;\r\n }\r\n const renderFnWithContext = (...args) => {\r\n // If a user calls a compiled slot inside a template expression (#1745), it\r\n // can mess up block tracking, so by default we disable block tracking and\r\n // force bail out when invoking a compiled slot (indicated by the ._d flag).\r\n // This isn't necessary if rendering a compiled ``, so we flip the\r\n // ._d flag off when invoking the wrapped fn inside `renderSlot`.\r\n if (renderFnWithContext._d) {\r\n setBlockTracking(-1);\r\n }\r\n const prevInstance = setCurrentRenderingInstance(ctx);\r\n const res = fn(...args);\r\n setCurrentRenderingInstance(prevInstance);\r\n if (renderFnWithContext._d) {\r\n setBlockTracking(1);\r\n }\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n devtoolsComponentUpdated(ctx);\r\n }\r\n return res;\r\n };\r\n // mark normalized to avoid duplicated wrapping\r\n renderFnWithContext._n = true;\r\n // mark this as compiled by default\r\n // this is used in vnode.ts -> normalizeChildren() to set the slot\r\n // rendering flag.\r\n renderFnWithContext._c = true;\r\n // disable block tracking by default\r\n renderFnWithContext._d = true;\r\n return renderFnWithContext;\r\n}\n\n/**\r\n * dev only flag to track whether $attrs was used during render.\r\n * If $attrs was used during render then the warning for failed attrs\r\n * fallthrough can be suppressed.\r\n */\r\nlet accessedAttrs = false;\r\nfunction markAttrsAccessed() {\r\n accessedAttrs = true;\r\n}\r\nfunction renderComponentRoot(instance) {\r\n const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit, render, renderCache, data, setupState, ctx, inheritAttrs } = instance;\r\n let result;\r\n const prev = setCurrentRenderingInstance(instance);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n accessedAttrs = false;\r\n }\r\n try {\r\n let fallthroughAttrs;\r\n if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) {\r\n // withProxy is a proxy with a different `has` trap only for\r\n // runtime-compiled render functions using `with` block.\r\n const proxyToUse = withProxy || proxy;\r\n result = normalizeVNode(render.call(proxyToUse, proxyToUse, renderCache, props, setupState, data, ctx));\r\n fallthroughAttrs = attrs;\r\n }\r\n else {\r\n // functional\r\n const render = Component;\r\n // in dev, mark attrs accessed if optional props (attrs === props)\r\n if ((process.env.NODE_ENV !== 'production') && attrs === props) {\r\n markAttrsAccessed();\r\n }\r\n result = normalizeVNode(render.length > 1\r\n ? render(props, (process.env.NODE_ENV !== 'production')\r\n ? {\r\n get attrs() {\r\n markAttrsAccessed();\r\n return attrs;\r\n },\r\n slots,\r\n emit\r\n }\r\n : { attrs, slots, emit })\r\n : render(props, null /* we know it doesn't need it */));\r\n fallthroughAttrs = Component.props\r\n ? attrs\r\n : getFunctionalFallthrough(attrs);\r\n }\r\n // attr merging\r\n // in dev mode, comments are preserved, and it's possible for a template\r\n // to have comments along side the root element which makes it a fragment\r\n let root = result;\r\n let setRoot = undefined;\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n result.patchFlag > 0 &&\r\n result.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) {\r\n ;\r\n [root, setRoot] = getChildRoot(result);\r\n }\r\n if (fallthroughAttrs && inheritAttrs !== false) {\r\n const keys = Object.keys(fallthroughAttrs);\r\n const { shapeFlag } = root;\r\n if (keys.length) {\r\n if (shapeFlag & 1 /* ELEMENT */ ||\r\n shapeFlag & 6 /* COMPONENT */) {\r\n if (propsOptions && keys.some(isModelListener)) {\r\n // If a v-model listener (onUpdate:xxx) has a corresponding declared\r\n // prop, it indicates this component expects to handle v-model and\r\n // it should not fallthrough.\r\n // related: #1543, #1643, #1989\r\n fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions);\r\n }\r\n root = cloneVNode(root, fallthroughAttrs);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production') && !accessedAttrs && root.type !== Comment$1) {\r\n const allAttrs = Object.keys(attrs);\r\n const eventAttrs = [];\r\n const extraAttrs = [];\r\n for (let i = 0, l = allAttrs.length; i < l; i++) {\r\n const key = allAttrs[i];\r\n if (isOn(key)) {\r\n // ignore v-model handlers when they fail to fallthrough\r\n if (!isModelListener(key)) {\r\n // remove `on`, lowercase first letter to reflect event casing\r\n // accurately\r\n eventAttrs.push(key[2].toLowerCase() + key.slice(3));\r\n }\r\n }\r\n else {\r\n extraAttrs.push(key);\r\n }\r\n }\r\n if (extraAttrs.length) {\r\n warn(`Extraneous non-props attributes (` +\r\n `${extraAttrs.join(', ')}) ` +\r\n `were passed to component but could not be automatically inherited ` +\r\n `because component renders fragment or text root nodes.`);\r\n }\r\n if (eventAttrs.length) {\r\n warn(`Extraneous non-emits event listeners (` +\r\n `${eventAttrs.join(', ')}) ` +\r\n `were passed to component but could not be automatically inherited ` +\r\n `because component renders fragment or text root nodes. ` +\r\n `If the listener is intended to be a component custom event listener only, ` +\r\n `declare it using the \"emits\" option.`);\r\n }\r\n }\r\n }\r\n }\r\n if (false &&\r\n isCompatEnabled(\"INSTANCE_ATTRS_CLASS_STYLE\" /* INSTANCE_ATTRS_CLASS_STYLE */, instance) &&\r\n vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */ &&\r\n (root.shapeFlag & 1 /* ELEMENT */ ||\r\n root.shapeFlag & 6 /* COMPONENT */)) ;\r\n // inherit directives\r\n if (vnode.dirs) {\r\n if ((process.env.NODE_ENV !== 'production') && !isElementRoot(root)) {\r\n warn(`Runtime directive used on component with non-element root node. ` +\r\n `The directives will not function as intended.`);\r\n }\r\n root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;\r\n }\r\n // inherit transition data\r\n if (vnode.transition) {\r\n if ((process.env.NODE_ENV !== 'production') && !isElementRoot(root)) {\r\n warn(`Component inside renders non-element root node ` +\r\n `that cannot be animated.`);\r\n }\r\n root.transition = vnode.transition;\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && setRoot) {\r\n setRoot(root);\r\n }\r\n else {\r\n result = root;\r\n }\r\n }\r\n catch (err) {\r\n blockStack.length = 0;\r\n handleError(err, instance, 1 /* RENDER_FUNCTION */);\r\n result = createVNode(Comment$1);\r\n }\r\n setCurrentRenderingInstance(prev);\r\n return result;\r\n}\r\n/**\r\n * dev only\r\n * In dev mode, template root level comments are rendered, which turns the\r\n * template into a fragment root, but we need to locate the single element\r\n * root for attrs and scope id processing.\r\n */\r\nconst getChildRoot = (vnode) => {\r\n const rawChildren = vnode.children;\r\n const dynamicChildren = vnode.dynamicChildren;\r\n const childRoot = filterSingleRoot(rawChildren);\r\n if (!childRoot) {\r\n return [vnode, undefined];\r\n }\r\n const index = rawChildren.indexOf(childRoot);\r\n const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;\r\n const setRoot = (updatedRoot) => {\r\n rawChildren[index] = updatedRoot;\r\n if (dynamicChildren) {\r\n if (dynamicIndex > -1) {\r\n dynamicChildren[dynamicIndex] = updatedRoot;\r\n }\r\n else if (updatedRoot.patchFlag > 0) {\r\n vnode.dynamicChildren = [...dynamicChildren, updatedRoot];\r\n }\r\n }\r\n };\r\n return [normalizeVNode(childRoot), setRoot];\r\n};\r\nfunction filterSingleRoot(children) {\r\n let singleRoot;\r\n for (let i = 0; i < children.length; i++) {\r\n const child = children[i];\r\n if (isVNode(child)) {\r\n // ignore user comment\r\n if (child.type !== Comment$1 || child.children === 'v-if') {\r\n if (singleRoot) {\r\n // has more than 1 non-comment child, return now\r\n return;\r\n }\r\n else {\r\n singleRoot = child;\r\n }\r\n }\r\n }\r\n else {\r\n return;\r\n }\r\n }\r\n return singleRoot;\r\n}\r\nconst getFunctionalFallthrough = (attrs) => {\r\n let res;\r\n for (const key in attrs) {\r\n if (key === 'class' || key === 'style' || isOn(key)) {\r\n (res || (res = {}))[key] = attrs[key];\r\n }\r\n }\r\n return res;\r\n};\r\nconst filterModelListeners = (attrs, props) => {\r\n const res = {};\r\n for (const key in attrs) {\r\n if (!isModelListener(key) || !(key.slice(9) in props)) {\r\n res[key] = attrs[key];\r\n }\r\n }\r\n return res;\r\n};\r\nconst isElementRoot = (vnode) => {\r\n return (vnode.shapeFlag & 6 /* COMPONENT */ ||\r\n vnode.shapeFlag & 1 /* ELEMENT */ ||\r\n vnode.type === Comment$1 // potential v-if branch switch\r\n );\r\n};\r\nfunction shouldUpdateComponent(prevVNode, nextVNode, optimized) {\r\n const { props: prevProps, children: prevChildren, component } = prevVNode;\r\n const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;\r\n const emits = component.emitsOptions;\r\n // Parent component's render function was hot-updated. Since this may have\r\n // caused the child component's slots content to have changed, we need to\r\n // force the child to update as well.\r\n if ((process.env.NODE_ENV !== 'production') && (prevChildren || nextChildren) && isHmrUpdating) {\r\n return true;\r\n }\r\n // force child update for runtime directive or transition on component vnode.\r\n if (nextVNode.dirs || nextVNode.transition) {\r\n return true;\r\n }\r\n if (optimized && patchFlag >= 0) {\r\n if (patchFlag & 1024 /* DYNAMIC_SLOTS */) {\r\n // slot content that references values that might have changed,\r\n // e.g. in a v-for\r\n return true;\r\n }\r\n if (patchFlag & 16 /* FULL_PROPS */) {\r\n if (!prevProps) {\r\n return !!nextProps;\r\n }\r\n // presence of this flag indicates props are always non-null\r\n return hasPropsChanged(prevProps, nextProps, emits);\r\n }\r\n else if (patchFlag & 8 /* PROPS */) {\r\n const dynamicProps = nextVNode.dynamicProps;\r\n for (let i = 0; i < dynamicProps.length; i++) {\r\n const key = dynamicProps[i];\r\n if (nextProps[key] !== prevProps[key] &&\r\n !isEmitListener(emits, key)) {\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n // this path is only taken by manually written render functions\r\n // so presence of any children leads to a forced update\r\n if (prevChildren || nextChildren) {\r\n if (!nextChildren || !nextChildren.$stable) {\r\n return true;\r\n }\r\n }\r\n if (prevProps === nextProps) {\r\n return false;\r\n }\r\n if (!prevProps) {\r\n return !!nextProps;\r\n }\r\n if (!nextProps) {\r\n return true;\r\n }\r\n return hasPropsChanged(prevProps, nextProps, emits);\r\n }\r\n return false;\r\n}\r\nfunction hasPropsChanged(prevProps, nextProps, emitsOptions) {\r\n const nextKeys = Object.keys(nextProps);\r\n if (nextKeys.length !== Object.keys(prevProps).length) {\r\n return true;\r\n }\r\n for (let i = 0; i < nextKeys.length; i++) {\r\n const key = nextKeys[i];\r\n if (nextProps[key] !== prevProps[key] &&\r\n !isEmitListener(emitsOptions, key)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}\r\nfunction updateHOCHostEl({ vnode, parent }, el // HostNode\r\n) {\r\n while (parent && parent.subTree === vnode) {\r\n (vnode = parent.vnode).el = el;\r\n parent = parent.parent;\r\n }\r\n}\n\nconst isSuspense = (type) => type.__isSuspense;\r\n// Suspense exposes a component-like API, and is treated like a component\r\n// in the compiler, but internally it's a special built-in type that hooks\r\n// directly into the renderer.\r\nconst SuspenseImpl = {\r\n name: 'Suspense',\r\n // In order to make Suspense tree-shakable, we need to avoid importing it\r\n // directly in the renderer. The renderer checks for the __isSuspense flag\r\n // on a vnode's type and calls the `process` method, passing in renderer\r\n // internals.\r\n __isSuspense: true,\r\n process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, \r\n // platform-specific impl passed from renderer\r\n rendererInternals) {\r\n if (n1 == null) {\r\n mountSuspense(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals);\r\n }\r\n else {\r\n patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, rendererInternals);\r\n }\r\n },\r\n hydrate: hydrateSuspense,\r\n create: createSuspenseBoundary,\r\n normalize: normalizeSuspenseChildren\r\n};\r\n// Force-casted public typing for h and TSX props inference\r\nconst Suspense = (SuspenseImpl\r\n );\r\nfunction triggerEvent(vnode, name) {\r\n const eventListener = vnode.props && vnode.props[name];\r\n if (isFunction$1(eventListener)) {\r\n eventListener();\r\n }\r\n}\r\nfunction mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {\r\n const { p: patch, o: { createElement } } = rendererInternals;\r\n const hiddenContainer = createElement('div');\r\n const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals));\r\n // start mounting the content subtree in an off-dom container\r\n patch(null, (suspense.pendingBranch = vnode.ssContent), hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds);\r\n // now check if we have encountered any async deps\r\n if (suspense.deps > 0) {\r\n // has async\r\n // invoke @fallback event\r\n triggerEvent(vnode, 'onPending');\r\n triggerEvent(vnode, 'onFallback');\r\n // mount the fallback tree\r\n patch(null, vnode.ssFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context\r\n isSVG, slotScopeIds);\r\n setActiveBranch(suspense, vnode.ssFallback);\r\n }\r\n else {\r\n // Suspense has no async deps. Just resolve.\r\n suspense.resolve();\r\n }\r\n}\r\nfunction patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {\r\n const suspense = (n2.suspense = n1.suspense);\r\n suspense.vnode = n2;\r\n n2.el = n1.el;\r\n const newBranch = n2.ssContent;\r\n const newFallback = n2.ssFallback;\r\n const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;\r\n if (pendingBranch) {\r\n suspense.pendingBranch = newBranch;\r\n if (isSameVNodeType(newBranch, pendingBranch)) {\r\n // same root type but content may have changed.\r\n patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized);\r\n if (suspense.deps <= 0) {\r\n suspense.resolve();\r\n }\r\n else if (isInFallback) {\r\n patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context\r\n isSVG, slotScopeIds, optimized);\r\n setActiveBranch(suspense, newFallback);\r\n }\r\n }\r\n else {\r\n // toggled before pending tree is resolved\r\n suspense.pendingId++;\r\n if (isHydrating) {\r\n // if toggled before hydration is finished, the current DOM tree is\r\n // no longer valid. set it as the active branch so it will be unmounted\r\n // when resolved\r\n suspense.isHydrating = false;\r\n suspense.activeBranch = pendingBranch;\r\n }\r\n else {\r\n unmount(pendingBranch, parentComponent, suspense);\r\n }\r\n // increment pending ID. this is used to invalidate async callbacks\r\n // reset suspense state\r\n suspense.deps = 0;\r\n // discard effects from pending branch\r\n suspense.effects.length = 0;\r\n // discard previous container\r\n suspense.hiddenContainer = createElement('div');\r\n if (isInFallback) {\r\n // already in fallback state\r\n patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized);\r\n if (suspense.deps <= 0) {\r\n suspense.resolve();\r\n }\r\n else {\r\n patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context\r\n isSVG, slotScopeIds, optimized);\r\n setActiveBranch(suspense, newFallback);\r\n }\r\n }\r\n else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\r\n // toggled \"back\" to current active branch\r\n patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized);\r\n // force resolve\r\n suspense.resolve(true);\r\n }\r\n else {\r\n // switched to a 3rd branch\r\n patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized);\r\n if (suspense.deps <= 0) {\r\n suspense.resolve();\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\r\n // root did not change, just normal patch\r\n patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized);\r\n setActiveBranch(suspense, newBranch);\r\n }\r\n else {\r\n // root node toggled\r\n // invoke @pending event\r\n triggerEvent(n2, 'onPending');\r\n // mount pending branch in off-dom container\r\n suspense.pendingBranch = newBranch;\r\n suspense.pendingId++;\r\n patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized);\r\n if (suspense.deps <= 0) {\r\n // incoming branch has no async deps, resolve now.\r\n suspense.resolve();\r\n }\r\n else {\r\n const { timeout, pendingId } = suspense;\r\n if (timeout > 0) {\r\n setTimeout(() => {\r\n if (suspense.pendingId === pendingId) {\r\n suspense.fallback(newFallback);\r\n }\r\n }, timeout);\r\n }\r\n else if (timeout === 0) {\r\n suspense.fallback(newFallback);\r\n }\r\n }\r\n }\r\n }\r\n}\r\nlet hasWarned = false;\r\nfunction createSuspenseBoundary(vnode, parent, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {\r\n /* istanbul ignore if */\r\n if ((process.env.NODE_ENV !== 'production') && !false && !hasWarned) {\r\n hasWarned = true;\r\n // @ts-ignore `console.info` cannot be null error\r\n console[console.info ? 'info' : 'log'](` is an experimental feature and its API will likely change.`);\r\n }\r\n const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals;\r\n const timeout = toNumber(vnode.props && vnode.props.timeout);\r\n const suspense = {\r\n vnode,\r\n parent,\r\n parentComponent,\r\n isSVG,\r\n container,\r\n hiddenContainer,\r\n anchor,\r\n deps: 0,\r\n pendingId: 0,\r\n timeout: typeof timeout === 'number' ? timeout : -1,\r\n activeBranch: null,\r\n pendingBranch: null,\r\n isInFallback: true,\r\n isHydrating,\r\n isUnmounted: false,\r\n effects: [],\r\n resolve(resume = false) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n if (!resume && !suspense.pendingBranch) {\r\n throw new Error(`suspense.resolve() is called without a pending branch.`);\r\n }\r\n if (suspense.isUnmounted) {\r\n throw new Error(`suspense.resolve() is called on an already unmounted suspense boundary.`);\r\n }\r\n }\r\n const { vnode, activeBranch, pendingBranch, pendingId, effects, parentComponent, container } = suspense;\r\n if (suspense.isHydrating) {\r\n suspense.isHydrating = false;\r\n }\r\n else if (!resume) {\r\n const delayEnter = activeBranch &&\r\n pendingBranch.transition &&\r\n pendingBranch.transition.mode === 'out-in';\r\n if (delayEnter) {\r\n activeBranch.transition.afterLeave = () => {\r\n if (pendingId === suspense.pendingId) {\r\n move(pendingBranch, container, anchor, 0 /* ENTER */);\r\n }\r\n };\r\n }\r\n // this is initial anchor on mount\r\n let { anchor } = suspense;\r\n // unmount current active tree\r\n if (activeBranch) {\r\n // if the fallback tree was mounted, it may have been moved\r\n // as part of a parent suspense. get the latest anchor for insertion\r\n anchor = next(activeBranch);\r\n unmount(activeBranch, parentComponent, suspense, true);\r\n }\r\n if (!delayEnter) {\r\n // move content from off-dom container to actual container\r\n move(pendingBranch, container, anchor, 0 /* ENTER */);\r\n }\r\n }\r\n setActiveBranch(suspense, pendingBranch);\r\n suspense.pendingBranch = null;\r\n suspense.isInFallback = false;\r\n // flush buffered effects\r\n // check if there is a pending parent suspense\r\n let parent = suspense.parent;\r\n let hasUnresolvedAncestor = false;\r\n while (parent) {\r\n if (parent.pendingBranch) {\r\n // found a pending parent suspense, merge buffered post jobs\r\n // into that parent\r\n parent.effects.push(...effects);\r\n hasUnresolvedAncestor = true;\r\n break;\r\n }\r\n parent = parent.parent;\r\n }\r\n // no pending parent suspense, flush all jobs\r\n if (!hasUnresolvedAncestor) {\r\n queuePostFlushCb(effects);\r\n }\r\n suspense.effects = [];\r\n // invoke @resolve event\r\n triggerEvent(vnode, 'onResolve');\r\n },\r\n fallback(fallbackVNode) {\r\n if (!suspense.pendingBranch) {\r\n return;\r\n }\r\n const { vnode, activeBranch, parentComponent, container, isSVG } = suspense;\r\n // invoke @fallback event\r\n triggerEvent(vnode, 'onFallback');\r\n const anchor = next(activeBranch);\r\n const mountFallback = () => {\r\n if (!suspense.isInFallback) {\r\n return;\r\n }\r\n // mount the fallback tree\r\n patch(null, fallbackVNode, container, anchor, parentComponent, null, // fallback tree will not have suspense context\r\n isSVG, slotScopeIds, optimized);\r\n setActiveBranch(suspense, fallbackVNode);\r\n };\r\n const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === 'out-in';\r\n if (delayEnter) {\r\n activeBranch.transition.afterLeave = mountFallback;\r\n }\r\n suspense.isInFallback = true;\r\n // unmount current active branch\r\n unmount(activeBranch, parentComponent, null, // no suspense so unmount hooks fire now\r\n true // shouldRemove\r\n );\r\n if (!delayEnter) {\r\n mountFallback();\r\n }\r\n },\r\n move(container, anchor, type) {\r\n suspense.activeBranch &&\r\n move(suspense.activeBranch, container, anchor, type);\r\n suspense.container = container;\r\n },\r\n next() {\r\n return suspense.activeBranch && next(suspense.activeBranch);\r\n },\r\n registerDep(instance, setupRenderEffect) {\r\n const isInPendingSuspense = !!suspense.pendingBranch;\r\n if (isInPendingSuspense) {\r\n suspense.deps++;\r\n }\r\n const hydratedEl = instance.vnode.el;\r\n instance\r\n .asyncDep.catch(err => {\r\n handleError(err, instance, 0 /* SETUP_FUNCTION */);\r\n })\r\n .then(asyncSetupResult => {\r\n // retry when the setup() promise resolves.\r\n // component may have been unmounted before resolve.\r\n if (instance.isUnmounted ||\r\n suspense.isUnmounted ||\r\n suspense.pendingId !== instance.suspenseId) {\r\n return;\r\n }\r\n // retry from this component\r\n instance.asyncResolved = true;\r\n const { vnode } = instance;\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n pushWarningContext(vnode);\r\n }\r\n handleSetupResult(instance, asyncSetupResult, false);\r\n if (hydratedEl) {\r\n // vnode may have been replaced if an update happened before the\r\n // async dep is resolved.\r\n vnode.el = hydratedEl;\r\n }\r\n const placeholder = !hydratedEl && instance.subTree.el;\r\n setupRenderEffect(instance, vnode, \r\n // component may have been moved before resolve.\r\n // if this is not a hydration, instance.subTree will be the comment\r\n // placeholder.\r\n parentNode(hydratedEl || instance.subTree.el), \r\n // anchor will not be used if this is hydration, so only need to\r\n // consider the comment placeholder case.\r\n hydratedEl ? null : next(instance.subTree), suspense, isSVG, optimized);\r\n if (placeholder) {\r\n remove(placeholder);\r\n }\r\n updateHOCHostEl(instance, vnode.el);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n popWarningContext();\r\n }\r\n // only decrease deps count if suspense is not already resolved\r\n if (isInPendingSuspense && --suspense.deps === 0) {\r\n suspense.resolve();\r\n }\r\n });\r\n },\r\n unmount(parentSuspense, doRemove) {\r\n suspense.isUnmounted = true;\r\n if (suspense.activeBranch) {\r\n unmount(suspense.activeBranch, parentComponent, parentSuspense, doRemove);\r\n }\r\n if (suspense.pendingBranch) {\r\n unmount(suspense.pendingBranch, parentComponent, parentSuspense, doRemove);\r\n }\r\n }\r\n };\r\n return suspense;\r\n}\r\nfunction hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) {\r\n /* eslint-disable no-restricted-globals */\r\n const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, node.parentNode, document.createElement('div'), null, isSVG, slotScopeIds, optimized, rendererInternals, true /* hydrating */));\r\n // there are two possible scenarios for server-rendered suspense:\r\n // - success: ssr content should be fully resolved\r\n // - failure: ssr content should be the fallback branch.\r\n // however, on the client we don't really know if it has failed or not\r\n // attempt to hydrate the DOM assuming it has succeeded, but we still\r\n // need to construct a suspense boundary first\r\n const result = hydrateNode(node, (suspense.pendingBranch = vnode.ssContent), parentComponent, suspense, slotScopeIds, optimized);\r\n if (suspense.deps === 0) {\r\n suspense.resolve();\r\n }\r\n return result;\r\n /* eslint-enable no-restricted-globals */\r\n}\r\nfunction normalizeSuspenseChildren(vnode) {\r\n const { shapeFlag, children } = vnode;\r\n const isSlotChildren = shapeFlag & 32 /* SLOTS_CHILDREN */;\r\n vnode.ssContent = normalizeSuspenseSlot(isSlotChildren ? children.default : children);\r\n vnode.ssFallback = isSlotChildren\r\n ? normalizeSuspenseSlot(children.fallback)\r\n : createVNode(Comment);\r\n}\r\nfunction normalizeSuspenseSlot(s) {\r\n let block;\r\n if (isFunction$1(s)) {\r\n const isCompiledSlot = s._c;\r\n if (isCompiledSlot) {\r\n // disableTracking: false\r\n // allow block tracking for compiled slots\r\n // (see ./componentRenderContext.ts)\r\n s._d = false;\r\n openBlock();\r\n }\r\n s = s();\r\n if (isCompiledSlot) {\r\n s._d = true;\r\n block = currentBlock;\r\n closeBlock();\r\n }\r\n }\r\n if (isArray(s)) {\r\n const singleChild = filterSingleRoot(s);\r\n if ((process.env.NODE_ENV !== 'production') && !singleChild) {\r\n warn(` slots expect a single root node.`);\r\n }\r\n s = singleChild;\r\n }\r\n s = normalizeVNode(s);\r\n if (block) {\r\n s.dynamicChildren = block.filter(c => c !== s);\r\n }\r\n return s;\r\n}\r\nfunction queueEffectWithSuspense(fn, suspense) {\r\n if (suspense && suspense.pendingBranch) {\r\n if (isArray(fn)) {\r\n suspense.effects.push(...fn);\r\n }\r\n else {\r\n suspense.effects.push(fn);\r\n }\r\n }\r\n else {\r\n queuePostFlushCb(fn);\r\n }\r\n}\r\nfunction setActiveBranch(suspense, branch) {\r\n suspense.activeBranch = branch;\r\n const { vnode, parentComponent } = suspense;\r\n const el = (vnode.el = branch.el);\r\n // in case suspense is the root node of a component,\r\n // recursively update the HOC el\r\n if (parentComponent && parentComponent.subTree === vnode) {\r\n parentComponent.vnode.el = el;\r\n updateHOCHostEl(parentComponent, el);\r\n }\r\n}\n\nfunction provide(key, value) {\r\n if (!currentInstance) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`provide() can only be used inside setup().`);\r\n }\r\n }\r\n else {\r\n let provides = currentInstance.provides;\r\n // by default an instance inherits its parent's provides object\r\n // but when it needs to provide values of its own, it creates its\r\n // own provides object using parent provides object as prototype.\r\n // this way in `inject` we can simply look up injections from direct\r\n // parent and let the prototype chain do the work.\r\n const parentProvides = currentInstance.parent && currentInstance.parent.provides;\r\n if (parentProvides === provides) {\r\n provides = currentInstance.provides = Object.create(parentProvides);\r\n }\r\n // TS doesn't allow symbol as index type\r\n provides[key] = value;\r\n }\r\n}\r\nfunction inject(key, defaultValue, treatDefaultAsFactory = false) {\r\n // fallback to `currentRenderingInstance` so that this can be called in\r\n // a functional component\r\n const instance = currentInstance || currentRenderingInstance;\r\n if (instance) {\r\n // #2400\r\n // to support `app.use` plugins,\r\n // fallback to appContext's `provides` if the intance is at root\r\n const provides = instance.parent == null\r\n ? instance.vnode.appContext && instance.vnode.appContext.provides\r\n : instance.parent.provides;\r\n if (provides && key in provides) {\r\n // TS doesn't allow symbol as index type\r\n return provides[key];\r\n }\r\n else if (arguments.length > 1) {\r\n return treatDefaultAsFactory && isFunction$1(defaultValue)\r\n ? defaultValue.call(instance.proxy)\r\n : defaultValue;\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`injection \"${String(key)}\" not found.`);\r\n }\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`inject() can only be used inside setup() or functional components.`);\r\n }\r\n}\n\n// Simple effect.\r\nfunction watchEffect(effect, options) {\r\n return doWatch(effect, null, options);\r\n}\r\n// initial value for watchers to trigger on undefined initial values\r\nconst INITIAL_WATCHER_VALUE = {};\r\n// implementation\r\nfunction watch(source, cb, options) {\r\n if ((process.env.NODE_ENV !== 'production') && !isFunction$1(cb)) {\r\n warn(`\\`watch(fn, options?)\\` signature has been moved to a separate API. ` +\r\n `Use \\`watchEffect(fn, options?)\\` instead. \\`watch\\` now only ` +\r\n `supports \\`watch(source, cb, options?) signature.`);\r\n }\r\n return doWatch(source, cb, options);\r\n}\r\nfunction doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ, instance = currentInstance) {\r\n if ((process.env.NODE_ENV !== 'production') && !cb) {\r\n if (immediate !== undefined) {\r\n warn(`watch() \"immediate\" option is only respected when using the ` +\r\n `watch(source, callback, options?) signature.`);\r\n }\r\n if (deep !== undefined) {\r\n warn(`watch() \"deep\" option is only respected when using the ` +\r\n `watch(source, callback, options?) signature.`);\r\n }\r\n }\r\n const warnInvalidSource = (s) => {\r\n warn(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, ` +\r\n `a reactive object, or an array of these types.`);\r\n };\r\n let getter;\r\n let forceTrigger = false;\r\n let isMultiSource = false;\r\n if (isRef(source)) {\r\n getter = () => source.value;\r\n forceTrigger = !!source._shallow;\r\n }\r\n else if (isReactive(source)) {\r\n getter = () => source;\r\n deep = true;\r\n }\r\n else if (isArray(source)) {\r\n isMultiSource = true;\r\n forceTrigger = source.some(isReactive);\r\n getter = () => source.map(s => {\r\n if (isRef(s)) {\r\n return s.value;\r\n }\r\n else if (isReactive(s)) {\r\n return traverse(s);\r\n }\r\n else if (isFunction$1(s)) {\r\n return callWithErrorHandling(s, instance, 2 /* WATCH_GETTER */);\r\n }\r\n else {\r\n (process.env.NODE_ENV !== 'production') && warnInvalidSource(s);\r\n }\r\n });\r\n }\r\n else if (isFunction$1(source)) {\r\n if (cb) {\r\n // getter with cb\r\n getter = () => callWithErrorHandling(source, instance, 2 /* WATCH_GETTER */);\r\n }\r\n else {\r\n // no cb -> simple effect\r\n getter = () => {\r\n if (instance && instance.isUnmounted) {\r\n return;\r\n }\r\n if (cleanup) {\r\n cleanup();\r\n }\r\n return callWithAsyncErrorHandling(source, instance, 3 /* WATCH_CALLBACK */, [onInvalidate]);\r\n };\r\n }\r\n }\r\n else {\r\n getter = NOOP;\r\n (process.env.NODE_ENV !== 'production') && warnInvalidSource(source);\r\n }\r\n if (cb && deep) {\r\n const baseGetter = getter;\r\n getter = () => traverse(baseGetter());\r\n }\r\n let cleanup;\r\n let onInvalidate = (fn) => {\r\n cleanup = runner.options.onStop = () => {\r\n callWithErrorHandling(fn, instance, 4 /* WATCH_CLEANUP */);\r\n };\r\n };\r\n let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;\r\n const job = () => {\r\n if (!runner.active) {\r\n return;\r\n }\r\n if (cb) {\r\n // watch(source, cb)\r\n const newValue = runner();\r\n if (deep ||\r\n forceTrigger ||\r\n (isMultiSource\r\n ? newValue.some((v, i) => hasChanged(v, oldValue[i]))\r\n : hasChanged(newValue, oldValue)) ||\r\n (false )) {\r\n // cleanup before running cb again\r\n if (cleanup) {\r\n cleanup();\r\n }\r\n callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [\r\n newValue,\r\n // pass undefined as the old value when it's changed for the first time\r\n oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue,\r\n onInvalidate\r\n ]);\r\n oldValue = newValue;\r\n }\r\n }\r\n else {\r\n // watchEffect\r\n runner();\r\n }\r\n };\r\n // important: mark the job as a watcher callback so that scheduler knows\r\n // it is allowed to self-trigger (#1727)\r\n job.allowRecurse = !!cb;\r\n let scheduler;\r\n if (flush === 'sync') {\r\n scheduler = job; // the scheduler function gets called directly\r\n }\r\n else if (flush === 'post') {\r\n scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);\r\n }\r\n else {\r\n // default: 'pre'\r\n scheduler = () => {\r\n if (!instance || instance.isMounted) {\r\n queuePreFlushCb(job);\r\n }\r\n else {\r\n // with 'pre' option, the first call must happen before\r\n // the component is mounted so it is called synchronously.\r\n job();\r\n }\r\n };\r\n }\r\n const runner = effect(getter, {\r\n lazy: true,\r\n onTrack,\r\n onTrigger,\r\n scheduler\r\n });\r\n recordInstanceBoundEffect(runner, instance);\r\n // initial run\r\n if (cb) {\r\n if (immediate) {\r\n job();\r\n }\r\n else {\r\n oldValue = runner();\r\n }\r\n }\r\n else if (flush === 'post') {\r\n queuePostRenderEffect(runner, instance && instance.suspense);\r\n }\r\n else {\r\n runner();\r\n }\r\n return () => {\r\n stop(runner);\r\n if (instance) {\r\n remove(instance.effects, runner);\r\n }\r\n };\r\n}\r\n// this.$watch\r\nfunction instanceWatch(source, value, options) {\r\n const publicThis = this.proxy;\r\n const getter = isString(source)\r\n ? source.includes('.')\r\n ? createPathGetter(publicThis, source)\r\n : () => publicThis[source]\r\n : source.bind(publicThis, publicThis);\r\n let cb;\r\n if (isFunction$1(value)) {\r\n cb = value;\r\n }\r\n else {\r\n cb = value.handler;\r\n options = value;\r\n }\r\n return doWatch(getter, cb.bind(publicThis), options, this);\r\n}\r\nfunction createPathGetter(ctx, path) {\r\n const segments = path.split('.');\r\n return () => {\r\n let cur = ctx;\r\n for (let i = 0; i < segments.length && cur; i++) {\r\n cur = cur[segments[i]];\r\n }\r\n return cur;\r\n };\r\n}\r\nfunction traverse(value, seen = new Set()) {\r\n if (!isObject$1(value) || value[\"__v_skip\" /* SKIP */]) {\r\n return value;\r\n }\r\n seen = seen || new Set();\r\n if (seen.has(value)) {\r\n return value;\r\n }\r\n seen.add(value);\r\n if (isRef(value)) {\r\n traverse(value.value, seen);\r\n }\r\n else if (isArray(value)) {\r\n for (let i = 0; i < value.length; i++) {\r\n traverse(value[i], seen);\r\n }\r\n }\r\n else if (isSet(value) || isMap(value)) {\r\n value.forEach((v) => {\r\n traverse(v, seen);\r\n });\r\n }\r\n else if (isPlainObject(value)) {\r\n for (const key in value) {\r\n traverse(value[key], seen);\r\n }\r\n }\r\n return value;\r\n}\n\nfunction useTransitionState() {\r\n const state = {\r\n isMounted: false,\r\n isLeaving: false,\r\n isUnmounting: false,\r\n leavingVNodes: new Map()\r\n };\r\n onMounted(() => {\r\n state.isMounted = true;\r\n });\r\n onBeforeUnmount(() => {\r\n state.isUnmounting = true;\r\n });\r\n return state;\r\n}\r\nconst TransitionHookValidator = [Function, Array];\r\nconst BaseTransitionImpl = {\r\n name: `BaseTransition`,\r\n props: {\r\n mode: String,\r\n appear: Boolean,\r\n persisted: Boolean,\r\n // enter\r\n onBeforeEnter: TransitionHookValidator,\r\n onEnter: TransitionHookValidator,\r\n onAfterEnter: TransitionHookValidator,\r\n onEnterCancelled: TransitionHookValidator,\r\n // leave\r\n onBeforeLeave: TransitionHookValidator,\r\n onLeave: TransitionHookValidator,\r\n onAfterLeave: TransitionHookValidator,\r\n onLeaveCancelled: TransitionHookValidator,\r\n // appear\r\n onBeforeAppear: TransitionHookValidator,\r\n onAppear: TransitionHookValidator,\r\n onAfterAppear: TransitionHookValidator,\r\n onAppearCancelled: TransitionHookValidator\r\n },\r\n setup(props, { slots }) {\r\n const instance = getCurrentInstance();\r\n const state = useTransitionState();\r\n let prevTransitionKey;\r\n return () => {\r\n const children = slots.default && getTransitionRawChildren(slots.default(), true);\r\n if (!children || !children.length) {\r\n return;\r\n }\r\n // warn multiple elements\r\n if ((process.env.NODE_ENV !== 'production') && children.length > 1) {\r\n warn(' can only be used on a single element or component. Use ' +\r\n ' for lists.');\r\n }\r\n // there's no need to track reactivity for these props so use the raw\r\n // props for a bit better perf\r\n const rawProps = toRaw(props);\r\n const { mode } = rawProps;\r\n // check mode\r\n if ((process.env.NODE_ENV !== 'production') && mode && !['in-out', 'out-in', 'default'].includes(mode)) {\r\n warn(`invalid mode: ${mode}`);\r\n }\r\n // at this point children has a guaranteed length of 1.\r\n const child = children[0];\r\n if (state.isLeaving) {\r\n return emptyPlaceholder(child);\r\n }\r\n // in the case of , we need to\r\n // compare the type of the kept-alive children.\r\n const innerChild = getKeepAliveChild(child);\r\n if (!innerChild) {\r\n return emptyPlaceholder(child);\r\n }\r\n const enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance);\r\n setTransitionHooks(innerChild, enterHooks);\r\n const oldChild = instance.subTree;\r\n const oldInnerChild = oldChild && getKeepAliveChild(oldChild);\r\n let transitionKeyChanged = false;\r\n const { getTransitionKey } = innerChild.type;\r\n if (getTransitionKey) {\r\n const key = getTransitionKey();\r\n if (prevTransitionKey === undefined) {\r\n prevTransitionKey = key;\r\n }\r\n else if (key !== prevTransitionKey) {\r\n prevTransitionKey = key;\r\n transitionKeyChanged = true;\r\n }\r\n }\r\n // handle mode\r\n if (oldInnerChild &&\r\n oldInnerChild.type !== Comment$1 &&\r\n (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {\r\n const leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance);\r\n // update old tree's hooks in case of dynamic transition\r\n setTransitionHooks(oldInnerChild, leavingHooks);\r\n // switching between different views\r\n if (mode === 'out-in') {\r\n state.isLeaving = true;\r\n // return placeholder node and queue update when leave finishes\r\n leavingHooks.afterLeave = () => {\r\n state.isLeaving = false;\r\n instance.update();\r\n };\r\n return emptyPlaceholder(child);\r\n }\r\n else if (mode === 'in-out' && innerChild.type !== Comment$1) {\r\n leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {\r\n const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild);\r\n leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;\r\n // early removal callback\r\n el._leaveCb = () => {\r\n earlyRemove();\r\n el._leaveCb = undefined;\r\n delete enterHooks.delayedLeave;\r\n };\r\n enterHooks.delayedLeave = delayedLeave;\r\n };\r\n }\r\n }\r\n return child;\r\n };\r\n }\r\n};\r\n// export the public type for h/tsx inference\r\n// also to avoid inline import() in generated d.ts files\r\nconst BaseTransition = BaseTransitionImpl;\r\nfunction getLeavingNodesForType(state, vnode) {\r\n const { leavingVNodes } = state;\r\n let leavingVNodesCache = leavingVNodes.get(vnode.type);\r\n if (!leavingVNodesCache) {\r\n leavingVNodesCache = Object.create(null);\r\n leavingVNodes.set(vnode.type, leavingVNodesCache);\r\n }\r\n return leavingVNodesCache;\r\n}\r\n// The transition hooks are attached to the vnode as vnode.transition\r\n// and will be called at appropriate timing in the renderer.\r\nfunction resolveTransitionHooks(vnode, props, state, instance) {\r\n const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props;\r\n const key = String(vnode.key);\r\n const leavingVNodesCache = getLeavingNodesForType(state, vnode);\r\n const callHook = (hook, args) => {\r\n hook &&\r\n callWithAsyncErrorHandling(hook, instance, 9 /* TRANSITION_HOOK */, args);\r\n };\r\n const hooks = {\r\n mode,\r\n persisted,\r\n beforeEnter(el) {\r\n let hook = onBeforeEnter;\r\n if (!state.isMounted) {\r\n if (appear) {\r\n hook = onBeforeAppear || onBeforeEnter;\r\n }\r\n else {\r\n return;\r\n }\r\n }\r\n // for same element (v-show)\r\n if (el._leaveCb) {\r\n el._leaveCb(true /* cancelled */);\r\n }\r\n // for toggled element with same key (v-if)\r\n const leavingVNode = leavingVNodesCache[key];\r\n if (leavingVNode &&\r\n isSameVNodeType(vnode, leavingVNode) &&\r\n leavingVNode.el._leaveCb) {\r\n // force early removal (not cancelled)\r\n leavingVNode.el._leaveCb();\r\n }\r\n callHook(hook, [el]);\r\n },\r\n enter(el) {\r\n let hook = onEnter;\r\n let afterHook = onAfterEnter;\r\n let cancelHook = onEnterCancelled;\r\n if (!state.isMounted) {\r\n if (appear) {\r\n hook = onAppear || onEnter;\r\n afterHook = onAfterAppear || onAfterEnter;\r\n cancelHook = onAppearCancelled || onEnterCancelled;\r\n }\r\n else {\r\n return;\r\n }\r\n }\r\n let called = false;\r\n const done = (el._enterCb = (cancelled) => {\r\n if (called)\r\n return;\r\n called = true;\r\n if (cancelled) {\r\n callHook(cancelHook, [el]);\r\n }\r\n else {\r\n callHook(afterHook, [el]);\r\n }\r\n if (hooks.delayedLeave) {\r\n hooks.delayedLeave();\r\n }\r\n el._enterCb = undefined;\r\n });\r\n if (hook) {\r\n hook(el, done);\r\n if (hook.length <= 1) {\r\n done();\r\n }\r\n }\r\n else {\r\n done();\r\n }\r\n },\r\n leave(el, remove) {\r\n const key = String(vnode.key);\r\n if (el._enterCb) {\r\n el._enterCb(true /* cancelled */);\r\n }\r\n if (state.isUnmounting) {\r\n return remove();\r\n }\r\n callHook(onBeforeLeave, [el]);\r\n let called = false;\r\n const done = (el._leaveCb = (cancelled) => {\r\n if (called)\r\n return;\r\n called = true;\r\n remove();\r\n if (cancelled) {\r\n callHook(onLeaveCancelled, [el]);\r\n }\r\n else {\r\n callHook(onAfterLeave, [el]);\r\n }\r\n el._leaveCb = undefined;\r\n if (leavingVNodesCache[key] === vnode) {\r\n delete leavingVNodesCache[key];\r\n }\r\n });\r\n leavingVNodesCache[key] = vnode;\r\n if (onLeave) {\r\n onLeave(el, done);\r\n if (onLeave.length <= 1) {\r\n done();\r\n }\r\n }\r\n else {\r\n done();\r\n }\r\n },\r\n clone(vnode) {\r\n return resolveTransitionHooks(vnode, props, state, instance);\r\n }\r\n };\r\n return hooks;\r\n}\r\n// the placeholder really only handles one special case: KeepAlive\r\n// in the case of a KeepAlive in a leave phase we need to return a KeepAlive\r\n// placeholder with empty content to avoid the KeepAlive instance from being\r\n// unmounted.\r\nfunction emptyPlaceholder(vnode) {\r\n if (isKeepAlive(vnode)) {\r\n vnode = cloneVNode(vnode);\r\n vnode.children = null;\r\n return vnode;\r\n }\r\n}\r\nfunction getKeepAliveChild(vnode) {\r\n return isKeepAlive(vnode)\r\n ? vnode.children\r\n ? vnode.children[0]\r\n : undefined\r\n : vnode;\r\n}\r\nfunction setTransitionHooks(vnode, hooks) {\r\n if (vnode.shapeFlag & 6 /* COMPONENT */ && vnode.component) {\r\n setTransitionHooks(vnode.component.subTree, hooks);\r\n }\r\n else if (vnode.shapeFlag & 128 /* SUSPENSE */) {\r\n vnode.ssContent.transition = hooks.clone(vnode.ssContent);\r\n vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);\r\n }\r\n else {\r\n vnode.transition = hooks;\r\n }\r\n}\r\nfunction getTransitionRawChildren(children, keepComment = false) {\r\n let ret = [];\r\n let keyedFragmentCount = 0;\r\n for (let i = 0; i < children.length; i++) {\r\n const child = children[i];\r\n // handle fragment children case, e.g. v-for\r\n if (child.type === Fragment) {\r\n if (child.patchFlag & 128 /* KEYED_FRAGMENT */)\r\n keyedFragmentCount++;\r\n ret = ret.concat(getTransitionRawChildren(child.children, keepComment));\r\n }\r\n // comment placeholders should be skipped, e.g. v-if\r\n else if (keepComment || child.type !== Comment$1) {\r\n ret.push(child);\r\n }\r\n }\r\n // #1126 if a transition children list contains multiple sub fragments, these\r\n // fragments will be merged into a flat children array. Since each v-for\r\n // fragment may contain different static bindings inside, we need to de-op\r\n // these children to force full diffs to ensure correct behavior.\r\n if (keyedFragmentCount > 1) {\r\n for (let i = 0; i < ret.length; i++) {\r\n ret[i].patchFlag = -2 /* BAIL */;\r\n }\r\n }\r\n return ret;\r\n}\n\n// implementation, close to no-op\r\nfunction defineComponent(options) {\r\n return isFunction$1(options) ? { setup: options, name: options.name } : options;\r\n}\n\nconst isAsyncWrapper = (i) => !!i.type.__asyncLoader;\r\nfunction defineAsyncComponent(source) {\r\n if (isFunction$1(source)) {\r\n source = { loader: source };\r\n }\r\n const { loader, loadingComponent, errorComponent, delay = 200, timeout, // undefined = never times out\r\n suspensible = true, onError: userOnError } = source;\r\n let pendingRequest = null;\r\n let resolvedComp;\r\n let retries = 0;\r\n const retry = () => {\r\n retries++;\r\n pendingRequest = null;\r\n return load();\r\n };\r\n const load = () => {\r\n let thisRequest;\r\n return (pendingRequest ||\r\n (thisRequest = pendingRequest = loader()\r\n .catch(err => {\r\n err = err instanceof Error ? err : new Error(String(err));\r\n if (userOnError) {\r\n return new Promise((resolve, reject) => {\r\n const userRetry = () => resolve(retry());\r\n const userFail = () => reject(err);\r\n userOnError(err, userRetry, userFail, retries + 1);\r\n });\r\n }\r\n else {\r\n throw err;\r\n }\r\n })\r\n .then((comp) => {\r\n if (thisRequest !== pendingRequest && pendingRequest) {\r\n return pendingRequest;\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && !comp) {\r\n warn(`Async component loader resolved to undefined. ` +\r\n `If you are using retry(), make sure to return its return value.`);\r\n }\r\n // interop module default\r\n if (comp &&\r\n (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) {\r\n comp = comp.default;\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && comp && !isObject$1(comp) && !isFunction$1(comp)) {\r\n throw new Error(`Invalid async component load result: ${comp}`);\r\n }\r\n resolvedComp = comp;\r\n return comp;\r\n })));\r\n };\r\n return defineComponent({\r\n name: 'AsyncComponentWrapper',\r\n __asyncLoader: load,\r\n get __asyncResolved() {\r\n return resolvedComp;\r\n },\r\n setup() {\r\n const instance = currentInstance;\r\n // already resolved\r\n if (resolvedComp) {\r\n return () => createInnerComp(resolvedComp, instance);\r\n }\r\n const onError = (err) => {\r\n pendingRequest = null;\r\n handleError(err, instance, 13 /* ASYNC_COMPONENT_LOADER */, !errorComponent /* do not throw in dev if user provided error component */);\r\n };\r\n // suspense-controlled or SSR.\r\n if ((suspensible && instance.suspense) ||\r\n (false )) {\r\n return load()\r\n .then(comp => {\r\n return () => createInnerComp(comp, instance);\r\n })\r\n .catch(err => {\r\n onError(err);\r\n return () => errorComponent\r\n ? createVNode(errorComponent, {\r\n error: err\r\n })\r\n : null;\r\n });\r\n }\r\n const loaded = ref(false);\r\n const error = ref();\r\n const delayed = ref(!!delay);\r\n if (delay) {\r\n setTimeout(() => {\r\n delayed.value = false;\r\n }, delay);\r\n }\r\n if (timeout != null) {\r\n setTimeout(() => {\r\n if (!loaded.value && !error.value) {\r\n const err = new Error(`Async component timed out after ${timeout}ms.`);\r\n onError(err);\r\n error.value = err;\r\n }\r\n }, timeout);\r\n }\r\n load()\r\n .then(() => {\r\n loaded.value = true;\r\n if (instance.parent && isKeepAlive(instance.parent.vnode)) {\r\n // parent is keep-alive, force update so the loaded component's\r\n // name is taken into account\r\n queueJob(instance.parent.update);\r\n }\r\n })\r\n .catch(err => {\r\n onError(err);\r\n error.value = err;\r\n });\r\n return () => {\r\n if (loaded.value && resolvedComp) {\r\n return createInnerComp(resolvedComp, instance);\r\n }\r\n else if (error.value && errorComponent) {\r\n return createVNode(errorComponent, {\r\n error: error.value\r\n });\r\n }\r\n else if (loadingComponent && !delayed.value) {\r\n return createVNode(loadingComponent);\r\n }\r\n };\r\n }\r\n });\r\n}\r\nfunction createInnerComp(comp, { vnode: { ref, props, children } }) {\r\n const vnode = createVNode(comp, props, children);\r\n // ensure inner component inherits the async wrapper's ref owner\r\n vnode.ref = ref;\r\n return vnode;\r\n}\n\nconst isKeepAlive = (vnode) => vnode.type.__isKeepAlive;\r\nconst KeepAliveImpl = {\r\n name: `KeepAlive`,\r\n // Marker for special handling inside the renderer. We are not using a ===\r\n // check directly on KeepAlive in the renderer, because importing it directly\r\n // would prevent it from being tree-shaken.\r\n __isKeepAlive: true,\r\n props: {\r\n include: [String, RegExp, Array],\r\n exclude: [String, RegExp, Array],\r\n max: [String, Number]\r\n },\r\n setup(props, { slots }) {\r\n const instance = getCurrentInstance();\r\n // KeepAlive communicates with the instantiated renderer via the\r\n // ctx where the renderer passes in its internals,\r\n // and the KeepAlive instance exposes activate/deactivate implementations.\r\n // The whole point of this is to avoid importing KeepAlive directly in the\r\n // renderer to facilitate tree-shaking.\r\n const sharedContext = instance.ctx;\r\n // if the internal renderer is not registered, it indicates that this is server-side rendering,\r\n // for KeepAlive, we just need to render its children\r\n if (!sharedContext.renderer) {\r\n return slots.default;\r\n }\r\n const cache = new Map();\r\n const keys = new Set();\r\n let current = null;\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n instance.__v_cache = cache;\r\n }\r\n const parentSuspense = instance.suspense;\r\n const { renderer: { p: patch, m: move, um: _unmount, o: { createElement } } } = sharedContext;\r\n const storageContainer = createElement('div');\r\n sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {\r\n const instance = vnode.component;\r\n move(vnode, container, anchor, 0 /* ENTER */, parentSuspense);\r\n // in case props have changed\r\n patch(instance.vnode, vnode, container, anchor, instance, parentSuspense, isSVG, vnode.slotScopeIds, optimized);\r\n queuePostRenderEffect(() => {\r\n instance.isDeactivated = false;\r\n if (instance.a) {\r\n invokeArrayFns(instance.a);\r\n }\r\n const vnodeHook = vnode.props && vnode.props.onVnodeMounted;\r\n if (vnodeHook) {\r\n invokeVNodeHook(vnodeHook, instance.parent, vnode);\r\n }\r\n }, parentSuspense);\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n // Update components tree\r\n devtoolsComponentAdded(instance);\r\n }\r\n };\r\n sharedContext.deactivate = (vnode) => {\r\n const instance = vnode.component;\r\n move(vnode, storageContainer, null, 1 /* LEAVE */, parentSuspense);\r\n queuePostRenderEffect(() => {\r\n if (instance.da) {\r\n invokeArrayFns(instance.da);\r\n }\r\n const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;\r\n if (vnodeHook) {\r\n invokeVNodeHook(vnodeHook, instance.parent, vnode);\r\n }\r\n instance.isDeactivated = true;\r\n }, parentSuspense);\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n // Update components tree\r\n devtoolsComponentAdded(instance);\r\n }\r\n };\r\n function unmount(vnode) {\r\n // reset the shapeFlag so it can be properly unmounted\r\n resetShapeFlag(vnode);\r\n _unmount(vnode, instance, parentSuspense);\r\n }\r\n function pruneCache(filter) {\r\n cache.forEach((vnode, key) => {\r\n const name = getComponentName(vnode.type);\r\n if (name && (!filter || !filter(name))) {\r\n pruneCacheEntry(key);\r\n }\r\n });\r\n }\r\n function pruneCacheEntry(key) {\r\n const cached = cache.get(key);\r\n if (!current || cached.type !== current.type) {\r\n unmount(cached);\r\n }\r\n else if (current) {\r\n // current active instance should no longer be kept-alive.\r\n // we can't unmount it now but it might be later, so reset its flag now.\r\n resetShapeFlag(current);\r\n }\r\n cache.delete(key);\r\n keys.delete(key);\r\n }\r\n // prune cache on include/exclude prop change\r\n watch(() => [props.include, props.exclude], ([include, exclude]) => {\r\n include && pruneCache(name => matches(include, name));\r\n exclude && pruneCache(name => !matches(exclude, name));\r\n }, \r\n // prune post-render after `current` has been updated\r\n { flush: 'post', deep: true });\r\n // cache sub tree after render\r\n let pendingCacheKey = null;\r\n const cacheSubtree = () => {\r\n // fix #1621, the pendingCacheKey could be 0\r\n if (pendingCacheKey != null) {\r\n cache.set(pendingCacheKey, getInnerChild(instance.subTree));\r\n }\r\n };\r\n onMounted(cacheSubtree);\r\n onUpdated(cacheSubtree);\r\n onBeforeUnmount(() => {\r\n cache.forEach(cached => {\r\n const { subTree, suspense } = instance;\r\n const vnode = getInnerChild(subTree);\r\n if (cached.type === vnode.type) {\r\n // current instance will be unmounted as part of keep-alive's unmount\r\n resetShapeFlag(vnode);\r\n // but invoke its deactivated hook here\r\n const da = vnode.component.da;\r\n da && queuePostRenderEffect(da, suspense);\r\n return;\r\n }\r\n unmount(cached);\r\n });\r\n });\r\n return () => {\r\n pendingCacheKey = null;\r\n if (!slots.default) {\r\n return null;\r\n }\r\n const children = slots.default();\r\n const rawVNode = children[0];\r\n if (children.length > 1) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`KeepAlive should contain exactly one component child.`);\r\n }\r\n current = null;\r\n return children;\r\n }\r\n else if (!isVNode(rawVNode) ||\r\n (!(rawVNode.shapeFlag & 4 /* STATEFUL_COMPONENT */) &&\r\n !(rawVNode.shapeFlag & 128 /* SUSPENSE */))) {\r\n current = null;\r\n return rawVNode;\r\n }\r\n let vnode = getInnerChild(rawVNode);\r\n const comp = vnode.type;\r\n // for async components, name check should be based in its loaded\r\n // inner component if available\r\n const name = getComponentName(isAsyncWrapper(vnode)\r\n ? vnode.type.__asyncResolved || {}\r\n : comp);\r\n const { include, exclude, max } = props;\r\n if ((include && (!name || !matches(include, name))) ||\r\n (exclude && name && matches(exclude, name))) {\r\n current = vnode;\r\n return rawVNode;\r\n }\r\n const key = vnode.key == null ? comp : vnode.key;\r\n const cachedVNode = cache.get(key);\r\n // clone vnode if it's reused because we are going to mutate it\r\n if (vnode.el) {\r\n vnode = cloneVNode(vnode);\r\n if (rawVNode.shapeFlag & 128 /* SUSPENSE */) {\r\n rawVNode.ssContent = vnode;\r\n }\r\n }\r\n // #1513 it's possible for the returned vnode to be cloned due to attr\r\n // fallthrough or scopeId, so the vnode here may not be the final vnode\r\n // that is mounted. Instead of caching it directly, we store the pending\r\n // key and cache `instance.subTree` (the normalized vnode) in\r\n // beforeMount/beforeUpdate hooks.\r\n pendingCacheKey = key;\r\n if (cachedVNode) {\r\n // copy over mounted state\r\n vnode.el = cachedVNode.el;\r\n vnode.component = cachedVNode.component;\r\n if (vnode.transition) {\r\n // recursively update transition hooks on subTree\r\n setTransitionHooks(vnode, vnode.transition);\r\n }\r\n // avoid vnode being mounted as fresh\r\n vnode.shapeFlag |= 512 /* COMPONENT_KEPT_ALIVE */;\r\n // make this key the freshest\r\n keys.delete(key);\r\n keys.add(key);\r\n }\r\n else {\r\n keys.add(key);\r\n // prune oldest entry\r\n if (max && keys.size > parseInt(max, 10)) {\r\n pruneCacheEntry(keys.values().next().value);\r\n }\r\n }\r\n // avoid vnode being unmounted\r\n vnode.shapeFlag |= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */;\r\n current = vnode;\r\n return rawVNode;\r\n };\r\n }\r\n};\r\n// export the public type for h/tsx inference\r\n// also to avoid inline import() in generated d.ts files\r\nconst KeepAlive = KeepAliveImpl;\r\nfunction matches(pattern, name) {\r\n if (isArray(pattern)) {\r\n return pattern.some((p) => matches(p, name));\r\n }\r\n else if (isString(pattern)) {\r\n return pattern.split(',').indexOf(name) > -1;\r\n }\r\n else if (pattern.test) {\r\n return pattern.test(name);\r\n }\r\n /* istanbul ignore next */\r\n return false;\r\n}\r\nfunction onActivated(hook, target) {\r\n registerKeepAliveHook(hook, \"a\" /* ACTIVATED */, target);\r\n}\r\nfunction onDeactivated(hook, target) {\r\n registerKeepAliveHook(hook, \"da\" /* DEACTIVATED */, target);\r\n}\r\nfunction registerKeepAliveHook(hook, type, target = currentInstance) {\r\n // cache the deactivate branch check wrapper for injected hooks so the same\r\n // hook can be properly deduped by the scheduler. \"__wdc\" stands for \"with\r\n // deactivation check\".\r\n const wrappedHook = hook.__wdc ||\r\n (hook.__wdc = () => {\r\n // only fire the hook if the target instance is NOT in a deactivated branch.\r\n let current = target;\r\n while (current) {\r\n if (current.isDeactivated) {\r\n return;\r\n }\r\n current = current.parent;\r\n }\r\n hook();\r\n });\r\n injectHook(type, wrappedHook, target);\r\n // In addition to registering it on the target instance, we walk up the parent\r\n // chain and register it on all ancestor instances that are keep-alive roots.\r\n // This avoids the need to walk the entire component tree when invoking these\r\n // hooks, and more importantly, avoids the need to track child components in\r\n // arrays.\r\n if (target) {\r\n let current = target.parent;\r\n while (current && current.parent) {\r\n if (isKeepAlive(current.parent.vnode)) {\r\n injectToKeepAliveRoot(wrappedHook, type, target, current);\r\n }\r\n current = current.parent;\r\n }\r\n }\r\n}\r\nfunction injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {\r\n // injectHook wraps the original for error handling, so make sure to remove\r\n // the wrapped version.\r\n const injected = injectHook(type, hook, keepAliveRoot, true /* prepend */);\r\n onUnmounted(() => {\r\n remove(keepAliveRoot[type], injected);\r\n }, target);\r\n}\r\nfunction resetShapeFlag(vnode) {\r\n let shapeFlag = vnode.shapeFlag;\r\n if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) {\r\n shapeFlag -= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */;\r\n }\r\n if (shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) {\r\n shapeFlag -= 512 /* COMPONENT_KEPT_ALIVE */;\r\n }\r\n vnode.shapeFlag = shapeFlag;\r\n}\r\nfunction getInnerChild(vnode) {\r\n return vnode.shapeFlag & 128 /* SUSPENSE */ ? vnode.ssContent : vnode;\r\n}\n\nfunction injectHook(type, hook, target = currentInstance, prepend = false) {\r\n if (target) {\r\n const hooks = target[type] || (target[type] = []);\r\n // cache the error handling wrapper for injected hooks so the same hook\r\n // can be properly deduped by the scheduler. \"__weh\" stands for \"with error\r\n // handling\".\r\n const wrappedHook = hook.__weh ||\r\n (hook.__weh = (...args) => {\r\n if (target.isUnmounted) {\r\n return;\r\n }\r\n // disable tracking inside all lifecycle hooks\r\n // since they can potentially be called inside effects.\r\n pauseTracking();\r\n // Set currentInstance during hook invocation.\r\n // This assumes the hook does not synchronously trigger other hooks, which\r\n // can only be false when the user does something really funky.\r\n setCurrentInstance(target);\r\n const res = callWithAsyncErrorHandling(hook, target, type, args);\r\n setCurrentInstance(null);\r\n resetTracking();\r\n return res;\r\n });\r\n if (prepend) {\r\n hooks.unshift(wrappedHook);\r\n }\r\n else {\r\n hooks.push(wrappedHook);\r\n }\r\n return wrappedHook;\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, ''));\r\n warn(`${apiName} is called when there is no active component instance to be ` +\r\n `associated with. ` +\r\n `Lifecycle injection APIs can only be used during execution of setup().` +\r\n (` If you are using async setup(), make sure to register lifecycle ` +\r\n `hooks before the first await statement.`\r\n ));\r\n }\r\n}\r\nconst createHook = (lifecycle) => (hook, target = currentInstance) => \r\n// post-create lifecycle registrations are noops during SSR (except for serverPrefetch)\r\n(!isInSSRComponentSetup || lifecycle === \"sp\" /* SERVER_PREFETCH */) &&\r\n injectHook(lifecycle, hook, target);\r\nconst onBeforeMount = createHook(\"bm\" /* BEFORE_MOUNT */);\r\nconst onMounted = createHook(\"m\" /* MOUNTED */);\r\nconst onBeforeUpdate = createHook(\"bu\" /* BEFORE_UPDATE */);\r\nconst onUpdated = createHook(\"u\" /* UPDATED */);\r\nconst onBeforeUnmount = createHook(\"bum\" /* BEFORE_UNMOUNT */);\r\nconst onUnmounted = createHook(\"um\" /* UNMOUNTED */);\r\nconst onServerPrefetch = createHook(\"sp\" /* SERVER_PREFETCH */);\r\nconst onRenderTriggered = createHook(\"rtg\" /* RENDER_TRIGGERED */);\r\nconst onRenderTracked = createHook(\"rtc\" /* RENDER_TRACKED */);\r\nfunction onErrorCaptured(hook, target = currentInstance) {\r\n injectHook(\"ec\" /* ERROR_CAPTURED */, hook, target);\r\n}\n\nfunction createDuplicateChecker() {\r\n const cache = Object.create(null);\r\n return (type, key) => {\r\n if (cache[key]) {\r\n warn(`${type} property \"${key}\" is already defined in ${cache[key]}.`);\r\n }\r\n else {\r\n cache[key] = type;\r\n }\r\n };\r\n}\r\nlet shouldCacheAccess = true;\r\nfunction applyOptions(instance) {\r\n const options = resolveMergedOptions(instance);\r\n const publicThis = instance.proxy;\r\n const ctx = instance.ctx;\r\n // do not cache property access on public proxy during state initialization\r\n shouldCacheAccess = false;\r\n // call beforeCreate first before accessing other options since\r\n // the hook may mutate resolved options (#2791)\r\n if (options.beforeCreate) {\r\n callHook(options.beforeCreate, instance, \"bc\" /* BEFORE_CREATE */);\r\n }\r\n const { \r\n // state\r\n data: dataOptions, computed: computedOptions, methods, watch: watchOptions, provide: provideOptions, inject: injectOptions, \r\n // lifecycle\r\n created, beforeMount, mounted, beforeUpdate, updated, activated, deactivated, beforeDestroy, beforeUnmount, destroyed, unmounted, render, renderTracked, renderTriggered, errorCaptured, serverPrefetch, \r\n // public API\r\n expose, inheritAttrs, \r\n // assets\r\n components, directives, filters } = options;\r\n const checkDuplicateProperties = (process.env.NODE_ENV !== 'production') ? createDuplicateChecker() : null;\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const [propsOptions] = instance.propsOptions;\r\n if (propsOptions) {\r\n for (const key in propsOptions) {\r\n checkDuplicateProperties(\"Props\" /* PROPS */, key);\r\n }\r\n }\r\n }\r\n // options initialization order (to be consistent with Vue 2):\r\n // - props (already done outside of this function)\r\n // - inject\r\n // - methods\r\n // - data (deferred since it relies on `this` access)\r\n // - computed\r\n // - watch (deferred since it relies on `this` access)\r\n if (injectOptions) {\r\n resolveInjections(injectOptions, ctx, checkDuplicateProperties);\r\n }\r\n if (methods) {\r\n for (const key in methods) {\r\n const methodHandler = methods[key];\r\n if (isFunction$1(methodHandler)) {\r\n // In dev mode, we use the `createRenderContext` function to define methods to the proxy target,\r\n // and those are read-only but reconfigurable, so it needs to be redefined here\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n Object.defineProperty(ctx, key, {\r\n value: methodHandler.bind(publicThis),\r\n configurable: true,\r\n enumerable: true,\r\n writable: true\r\n });\r\n }\r\n else {\r\n ctx[key] = methodHandler.bind(publicThis);\r\n }\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n checkDuplicateProperties(\"Methods\" /* METHODS */, key);\r\n }\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Method \"${key}\" has type \"${typeof methodHandler}\" in the component definition. ` +\r\n `Did you reference the function correctly?`);\r\n }\r\n }\r\n }\r\n if (dataOptions) {\r\n if ((process.env.NODE_ENV !== 'production') && !isFunction$1(dataOptions)) {\r\n warn(`The data option must be a function. ` +\r\n `Plain object usage is no longer supported.`);\r\n }\r\n const data = dataOptions.call(publicThis, publicThis);\r\n if ((process.env.NODE_ENV !== 'production') && isPromise$1(data)) {\r\n warn(`data() returned a Promise - note data() cannot be async; If you ` +\r\n `intend to perform data fetching before component renders, use ` +\r\n `async setup() + .`);\r\n }\r\n if (!isObject$1(data)) {\r\n (process.env.NODE_ENV !== 'production') && warn(`data() should return an object.`);\r\n }\r\n else {\r\n instance.data = reactive(data);\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n for (const key in data) {\r\n checkDuplicateProperties(\"Data\" /* DATA */, key);\r\n // expose data on ctx during dev\r\n if (key[0] !== '$' && key[0] !== '_') {\r\n Object.defineProperty(ctx, key, {\r\n configurable: true,\r\n enumerable: true,\r\n get: () => data[key],\r\n set: NOOP\r\n });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n // state initialization complete at this point - start caching access\r\n shouldCacheAccess = true;\r\n if (computedOptions) {\r\n for (const key in computedOptions) {\r\n const opt = computedOptions[key];\r\n const get = isFunction$1(opt)\r\n ? opt.bind(publicThis, publicThis)\r\n : isFunction$1(opt.get)\r\n ? opt.get.bind(publicThis, publicThis)\r\n : NOOP;\r\n if ((process.env.NODE_ENV !== 'production') && get === NOOP) {\r\n warn(`Computed property \"${key}\" has no getter.`);\r\n }\r\n const set = !isFunction$1(opt) && isFunction$1(opt.set)\r\n ? opt.set.bind(publicThis)\r\n : (process.env.NODE_ENV !== 'production')\r\n ? () => {\r\n warn(`Write operation failed: computed property \"${key}\" is readonly.`);\r\n }\r\n : NOOP;\r\n const c = computed({\r\n get,\r\n set\r\n });\r\n Object.defineProperty(ctx, key, {\r\n enumerable: true,\r\n configurable: true,\r\n get: () => c.value,\r\n set: v => (c.value = v)\r\n });\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n checkDuplicateProperties(\"Computed\" /* COMPUTED */, key);\r\n }\r\n }\r\n }\r\n if (watchOptions) {\r\n for (const key in watchOptions) {\r\n createWatcher(watchOptions[key], ctx, publicThis, key);\r\n }\r\n }\r\n if (provideOptions) {\r\n const provides = isFunction$1(provideOptions)\r\n ? provideOptions.call(publicThis)\r\n : provideOptions;\r\n Reflect.ownKeys(provides).forEach(key => {\r\n provide(key, provides[key]);\r\n });\r\n }\r\n if (created) {\r\n callHook(created, instance, \"c\" /* CREATED */);\r\n }\r\n function registerLifecycleHook(register, hook) {\r\n if (isArray(hook)) {\r\n hook.forEach(_hook => register(_hook.bind(publicThis)));\r\n }\r\n else if (hook) {\r\n register(hook.bind(publicThis));\r\n }\r\n }\r\n registerLifecycleHook(onBeforeMount, beforeMount);\r\n registerLifecycleHook(onMounted, mounted);\r\n registerLifecycleHook(onBeforeUpdate, beforeUpdate);\r\n registerLifecycleHook(onUpdated, updated);\r\n registerLifecycleHook(onActivated, activated);\r\n registerLifecycleHook(onDeactivated, deactivated);\r\n registerLifecycleHook(onErrorCaptured, errorCaptured);\r\n registerLifecycleHook(onRenderTracked, renderTracked);\r\n registerLifecycleHook(onRenderTriggered, renderTriggered);\r\n registerLifecycleHook(onBeforeUnmount, beforeUnmount);\r\n registerLifecycleHook(onUnmounted, unmounted);\r\n registerLifecycleHook(onServerPrefetch, serverPrefetch);\r\n if (isArray(expose)) {\r\n if (expose.length) {\r\n const exposed = instance.exposed || (instance.exposed = {});\r\n expose.forEach(key => {\r\n Object.defineProperty(exposed, key, {\r\n get: () => publicThis[key],\r\n set: val => (publicThis[key] = val)\r\n });\r\n });\r\n }\r\n else if (!instance.exposed) {\r\n instance.exposed = {};\r\n }\r\n }\r\n // options that are handled when creating the instance but also need to be\r\n // applied from mixins\r\n if (render && instance.render === NOOP) {\r\n instance.render = render;\r\n }\r\n if (inheritAttrs != null) {\r\n instance.inheritAttrs = inheritAttrs;\r\n }\r\n // asset options.\r\n if (components)\r\n instance.components = components;\r\n if (directives)\r\n instance.directives = directives;\r\n}\r\nfunction resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) {\r\n if (isArray(injectOptions)) {\r\n injectOptions = normalizeInject(injectOptions);\r\n }\r\n for (const key in injectOptions) {\r\n const opt = injectOptions[key];\r\n if (isObject$1(opt)) {\r\n if ('default' in opt) {\r\n ctx[key] = inject(opt.from || key, opt.default, true /* treat default function as factory */);\r\n }\r\n else {\r\n ctx[key] = inject(opt.from || key);\r\n }\r\n }\r\n else {\r\n ctx[key] = inject(opt);\r\n }\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n checkDuplicateProperties(\"Inject\" /* INJECT */, key);\r\n }\r\n }\r\n}\r\nfunction callHook(hook, instance, type) {\r\n callWithAsyncErrorHandling(isArray(hook)\r\n ? hook.map(h => h.bind(instance.proxy))\r\n : hook.bind(instance.proxy), instance, type);\r\n}\r\nfunction createWatcher(raw, ctx, publicThis, key) {\r\n const getter = key.includes('.')\r\n ? createPathGetter(publicThis, key)\r\n : () => publicThis[key];\r\n if (isString(raw)) {\r\n const handler = ctx[raw];\r\n if (isFunction$1(handler)) {\r\n watch(getter, handler);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Invalid watch handler specified by key \"${raw}\"`, handler);\r\n }\r\n }\r\n else if (isFunction$1(raw)) {\r\n watch(getter, raw.bind(publicThis));\r\n }\r\n else if (isObject$1(raw)) {\r\n if (isArray(raw)) {\r\n raw.forEach(r => createWatcher(r, ctx, publicThis, key));\r\n }\r\n else {\r\n const handler = isFunction$1(raw.handler)\r\n ? raw.handler.bind(publicThis)\r\n : ctx[raw.handler];\r\n if (isFunction$1(handler)) {\r\n watch(getter, handler, raw);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Invalid watch handler specified by key \"${raw.handler}\"`, handler);\r\n }\r\n }\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Invalid watch option: \"${key}\"`, raw);\r\n }\r\n}\r\n/**\r\n * Resolve merged options and cache it on the component.\r\n * This is done only once per-component since the merging does not involve\r\n * instances.\r\n */\r\nfunction resolveMergedOptions(instance) {\r\n const base = instance.type;\r\n const { mixins, extends: extendsOptions } = base;\r\n const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext;\r\n const cached = cache.get(base);\r\n let resolved;\r\n if (cached) {\r\n resolved = cached;\r\n }\r\n else if (!globalMixins.length && !mixins && !extendsOptions) {\r\n {\r\n resolved = base;\r\n }\r\n }\r\n else {\r\n resolved = {};\r\n if (globalMixins.length) {\r\n globalMixins.forEach(m => mergeOptions(resolved, m, optionMergeStrategies, true));\r\n }\r\n mergeOptions(resolved, base, optionMergeStrategies);\r\n }\r\n cache.set(base, resolved);\r\n return resolved;\r\n}\r\nfunction mergeOptions(to, from, strats, asMixin = false) {\r\n const { mixins, extends: extendsOptions } = from;\r\n if (extendsOptions) {\r\n mergeOptions(to, extendsOptions, strats, true);\r\n }\r\n if (mixins) {\r\n mixins.forEach((m) => mergeOptions(to, m, strats, true));\r\n }\r\n for (const key in from) {\r\n if (asMixin && key === 'expose') {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(`\"expose\" option is ignored when declared in mixins or extends. ` +\r\n `It should only be declared in the base component itself.`);\r\n }\r\n else {\r\n const strat = internalOptionMergeStrats[key] || (strats && strats[key]);\r\n to[key] = strat ? strat(to[key], from[key]) : from[key];\r\n }\r\n }\r\n return to;\r\n}\r\nconst internalOptionMergeStrats = {\r\n data: mergeDataFn,\r\n props: mergeObjectOptions,\r\n emits: mergeObjectOptions,\r\n // objects\r\n methods: mergeObjectOptions,\r\n computed: mergeObjectOptions,\r\n // lifecycle\r\n beforeCreate: mergeAsArray,\r\n created: mergeAsArray,\r\n beforeMount: mergeAsArray,\r\n mounted: mergeAsArray,\r\n beforeUpdate: mergeAsArray,\r\n updated: mergeAsArray,\r\n beforeDestroy: mergeAsArray,\r\n destroyed: mergeAsArray,\r\n activated: mergeAsArray,\r\n deactivated: mergeAsArray,\r\n errorCaptured: mergeAsArray,\r\n serverPrefetch: mergeAsArray,\r\n // assets\r\n components: mergeObjectOptions,\r\n directives: mergeObjectOptions,\r\n // watch\r\n watch: mergeWatchOptions,\r\n // provide / inject\r\n provide: mergeDataFn,\r\n inject: mergeInject\r\n};\r\nfunction mergeDataFn(to, from) {\r\n if (!from) {\r\n return to;\r\n }\r\n if (!to) {\r\n return from;\r\n }\r\n return function mergedDataFn() {\r\n return (extend)(isFunction$1(to) ? to.call(this, this) : to, isFunction$1(from) ? from.call(this, this) : from);\r\n };\r\n}\r\nfunction mergeInject(to, from) {\r\n return mergeObjectOptions(normalizeInject(to), normalizeInject(from));\r\n}\r\nfunction normalizeInject(raw) {\r\n if (isArray(raw)) {\r\n const res = {};\r\n for (let i = 0; i < raw.length; i++) {\r\n res[raw[i]] = raw[i];\r\n }\r\n return res;\r\n }\r\n return raw;\r\n}\r\nfunction mergeAsArray(to, from) {\r\n return to ? [...new Set([].concat(to, from))] : from;\r\n}\r\nfunction mergeObjectOptions(to, from) {\r\n return to ? extend(extend(Object.create(null), to), from) : from;\r\n}\r\nfunction mergeWatchOptions(to, from) {\r\n if (!to)\r\n return from;\r\n if (!from)\r\n return to;\r\n const merged = extend(Object.create(null), to);\r\n for (const key in from) {\r\n merged[key] = mergeAsArray(to[key], from[key]);\r\n }\r\n return merged;\r\n}\n\nfunction initProps(instance, rawProps, isStateful, // result of bitwise flag comparison\r\nisSSR = false) {\r\n const props = {};\r\n const attrs = {};\r\n def(attrs, InternalObjectKey, 1);\r\n instance.propsDefaults = Object.create(null);\r\n setFullProps(instance, rawProps, props, attrs);\r\n // ensure all declared prop keys are present\r\n for (const key in instance.propsOptions[0]) {\r\n if (!(key in props)) {\r\n props[key] = undefined;\r\n }\r\n }\r\n // validation\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n validateProps(rawProps || {}, props, instance);\r\n }\r\n if (isStateful) {\r\n // stateful\r\n instance.props = isSSR ? props : shallowReactive(props);\r\n }\r\n else {\r\n if (!instance.type.props) {\r\n // functional w/ optional props, props === attrs\r\n instance.props = attrs;\r\n }\r\n else {\r\n // functional w/ declared props\r\n instance.props = props;\r\n }\r\n }\r\n instance.attrs = attrs;\r\n}\r\nfunction updateProps(instance, rawProps, rawPrevProps, optimized) {\r\n const { props, attrs, vnode: { patchFlag } } = instance;\r\n const rawCurrentProps = toRaw(props);\r\n const [options] = instance.propsOptions;\r\n let hasAttrsChanged = false;\r\n if (\r\n // always force full diff in dev\r\n // - #1942 if hmr is enabled with sfc component\r\n // - vite#872 non-sfc component used by sfc component\r\n !((process.env.NODE_ENV !== 'production') &&\r\n (instance.type.__hmrId ||\r\n (instance.parent && instance.parent.type.__hmrId))) &&\r\n (optimized || patchFlag > 0) &&\r\n !(patchFlag & 16 /* FULL_PROPS */)) {\r\n if (patchFlag & 8 /* PROPS */) {\r\n // Compiler-generated props & no keys change, just set the updated\r\n // the props.\r\n const propsToUpdate = instance.vnode.dynamicProps;\r\n for (let i = 0; i < propsToUpdate.length; i++) {\r\n let key = propsToUpdate[i];\r\n // PROPS flag guarantees rawProps to be non-null\r\n const value = rawProps[key];\r\n if (options) {\r\n // attr / props separation was done on init and will be consistent\r\n // in this code path, so just check if attrs have it.\r\n if (hasOwn(attrs, key)) {\r\n if (value !== attrs[key]) {\r\n attrs[key] = value;\r\n hasAttrsChanged = true;\r\n }\r\n }\r\n else {\r\n const camelizedKey = camelize(key);\r\n props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false /* isAbsent */);\r\n }\r\n }\r\n else {\r\n if (value !== attrs[key]) {\r\n attrs[key] = value;\r\n hasAttrsChanged = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n // full props update.\r\n if (setFullProps(instance, rawProps, props, attrs)) {\r\n hasAttrsChanged = true;\r\n }\r\n // in case of dynamic props, check if we need to delete keys from\r\n // the props object\r\n let kebabKey;\r\n for (const key in rawCurrentProps) {\r\n if (!rawProps ||\r\n // for camelCase\r\n (!hasOwn(rawProps, key) &&\r\n // it's possible the original props was passed in as kebab-case\r\n // and converted to camelCase (#955)\r\n ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey)))) {\r\n if (options) {\r\n if (rawPrevProps &&\r\n // for camelCase\r\n (rawPrevProps[key] !== undefined ||\r\n // for kebab-case\r\n rawPrevProps[kebabKey] !== undefined)) {\r\n props[key] = resolvePropValue(options, rawCurrentProps, key, undefined, instance, true /* isAbsent */);\r\n }\r\n }\r\n else {\r\n delete props[key];\r\n }\r\n }\r\n }\r\n // in the case of functional component w/o props declaration, props and\r\n // attrs point to the same object so it should already have been updated.\r\n if (attrs !== rawCurrentProps) {\r\n for (const key in attrs) {\r\n if (!rawProps || !hasOwn(rawProps, key)) {\r\n delete attrs[key];\r\n hasAttrsChanged = true;\r\n }\r\n }\r\n }\r\n }\r\n // trigger updates for $attrs in case it's used in component slots\r\n if (hasAttrsChanged) {\r\n trigger(instance, \"set\" /* SET */, '$attrs');\r\n }\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n validateProps(rawProps || {}, props, instance);\r\n }\r\n}\r\nfunction setFullProps(instance, rawProps, props, attrs) {\r\n const [options, needCastKeys] = instance.propsOptions;\r\n let hasAttrsChanged = false;\r\n let rawCastValues;\r\n if (rawProps) {\r\n for (let key in rawProps) {\r\n // key, ref are reserved and never passed down\r\n if (isReservedProp(key)) {\r\n continue;\r\n }\r\n const value = rawProps[key];\r\n // prop option names are camelized during normalization, so to support\r\n // kebab -> camel conversion here we need to camelize the key.\r\n let camelKey;\r\n if (options && hasOwn(options, (camelKey = camelize(key)))) {\r\n if (!needCastKeys || !needCastKeys.includes(camelKey)) {\r\n props[camelKey] = value;\r\n }\r\n else {\r\n (rawCastValues || (rawCastValues = {}))[camelKey] = value;\r\n }\r\n }\r\n else if (!isEmitListener(instance.emitsOptions, key)) {\r\n if (value !== attrs[key]) {\r\n attrs[key] = value;\r\n hasAttrsChanged = true;\r\n }\r\n }\r\n }\r\n }\r\n if (needCastKeys) {\r\n const rawCurrentProps = toRaw(props);\r\n const castValues = rawCastValues || EMPTY_OBJ;\r\n for (let i = 0; i < needCastKeys.length; i++) {\r\n const key = needCastKeys[i];\r\n props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn(castValues, key));\r\n }\r\n }\r\n return hasAttrsChanged;\r\n}\r\nfunction resolvePropValue(options, props, key, value, instance, isAbsent) {\r\n const opt = options[key];\r\n if (opt != null) {\r\n const hasDefault = hasOwn(opt, 'default');\r\n // default values\r\n if (hasDefault && value === undefined) {\r\n const defaultValue = opt.default;\r\n if (opt.type !== Function && isFunction$1(defaultValue)) {\r\n const { propsDefaults } = instance;\r\n if (key in propsDefaults) {\r\n value = propsDefaults[key];\r\n }\r\n else {\r\n setCurrentInstance(instance);\r\n value = propsDefaults[key] = defaultValue.call(null, props);\r\n setCurrentInstance(null);\r\n }\r\n }\r\n else {\r\n value = defaultValue;\r\n }\r\n }\r\n // boolean casting\r\n if (opt[0 /* shouldCast */]) {\r\n if (isAbsent && !hasDefault) {\r\n value = false;\r\n }\r\n else if (opt[1 /* shouldCastTrue */] &&\r\n (value === '' || value === hyphenate(key))) {\r\n value = true;\r\n }\r\n }\r\n }\r\n return value;\r\n}\r\nfunction normalizePropsOptions(comp, appContext, asMixin = false) {\r\n const cache = appContext.propsCache;\r\n const cached = cache.get(comp);\r\n if (cached) {\r\n return cached;\r\n }\r\n const raw = comp.props;\r\n const normalized = {};\r\n const needCastKeys = [];\r\n // apply mixin/extends props\r\n let hasExtends = false;\r\n if (__VUE_OPTIONS_API__ && !isFunction$1(comp)) {\r\n const extendProps = (raw) => {\r\n hasExtends = true;\r\n const [props, keys] = normalizePropsOptions(raw, appContext, true);\r\n extend(normalized, props);\r\n if (keys)\r\n needCastKeys.push(...keys);\r\n };\r\n if (!asMixin && appContext.mixins.length) {\r\n appContext.mixins.forEach(extendProps);\r\n }\r\n if (comp.extends) {\r\n extendProps(comp.extends);\r\n }\r\n if (comp.mixins) {\r\n comp.mixins.forEach(extendProps);\r\n }\r\n }\r\n if (!raw && !hasExtends) {\r\n cache.set(comp, EMPTY_ARR);\r\n return EMPTY_ARR;\r\n }\r\n if (isArray(raw)) {\r\n for (let i = 0; i < raw.length; i++) {\r\n if ((process.env.NODE_ENV !== 'production') && !isString(raw[i])) {\r\n warn(`props must be strings when using array syntax.`, raw[i]);\r\n }\r\n const normalizedKey = camelize(raw[i]);\r\n if (validatePropName(normalizedKey)) {\r\n normalized[normalizedKey] = EMPTY_OBJ;\r\n }\r\n }\r\n }\r\n else if (raw) {\r\n if ((process.env.NODE_ENV !== 'production') && !isObject$1(raw)) {\r\n warn(`invalid props options`, raw);\r\n }\r\n for (const key in raw) {\r\n const normalizedKey = camelize(key);\r\n if (validatePropName(normalizedKey)) {\r\n const opt = raw[key];\r\n const prop = (normalized[normalizedKey] =\r\n isArray(opt) || isFunction$1(opt) ? { type: opt } : opt);\r\n if (prop) {\r\n const booleanIndex = getTypeIndex(Boolean, prop.type);\r\n const stringIndex = getTypeIndex(String, prop.type);\r\n prop[0 /* shouldCast */] = booleanIndex > -1;\r\n prop[1 /* shouldCastTrue */] =\r\n stringIndex < 0 || booleanIndex < stringIndex;\r\n // if the prop needs boolean casting or default value\r\n if (booleanIndex > -1 || hasOwn(prop, 'default')) {\r\n needCastKeys.push(normalizedKey);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n const res = [normalized, needCastKeys];\r\n cache.set(comp, res);\r\n return res;\r\n}\r\nfunction validatePropName(key) {\r\n if (key[0] !== '$') {\r\n return true;\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Invalid prop name: \"${key}\" is a reserved property.`);\r\n }\r\n return false;\r\n}\r\n// use function string name to check type constructors\r\n// so that it works across vms / iframes.\r\nfunction getType(ctor) {\r\n const match = ctor && ctor.toString().match(/^\\s*function (\\w+)/);\r\n return match ? match[1] : '';\r\n}\r\nfunction isSameType(a, b) {\r\n return getType(a) === getType(b);\r\n}\r\nfunction getTypeIndex(type, expectedTypes) {\r\n if (isArray(expectedTypes)) {\r\n return expectedTypes.findIndex(t => isSameType(t, type));\r\n }\r\n else if (isFunction$1(expectedTypes)) {\r\n return isSameType(expectedTypes, type) ? 0 : -1;\r\n }\r\n return -1;\r\n}\r\n/**\r\n * dev only\r\n */\r\nfunction validateProps(rawProps, props, instance) {\r\n const resolvedValues = toRaw(props);\r\n const options = instance.propsOptions[0];\r\n for (const key in options) {\r\n let opt = options[key];\r\n if (opt == null)\r\n continue;\r\n validateProp(key, resolvedValues[key], opt, !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key)));\r\n }\r\n}\r\n/**\r\n * dev only\r\n */\r\nfunction validateProp(name, value, prop, isAbsent) {\r\n const { type, required, validator } = prop;\r\n // required!\r\n if (required && isAbsent) {\r\n warn('Missing required prop: \"' + name + '\"');\r\n return;\r\n }\r\n // missing but optional\r\n if (value == null && !prop.required) {\r\n return;\r\n }\r\n // type check\r\n if (type != null && type !== true) {\r\n let isValid = false;\r\n const types = isArray(type) ? type : [type];\r\n const expectedTypes = [];\r\n // value is valid as long as one of the specified types match\r\n for (let i = 0; i < types.length && !isValid; i++) {\r\n const { valid, expectedType } = assertType(value, types[i]);\r\n expectedTypes.push(expectedType || '');\r\n isValid = valid;\r\n }\r\n if (!isValid) {\r\n warn(getInvalidTypeMessage(name, value, expectedTypes));\r\n return;\r\n }\r\n }\r\n // custom validator\r\n if (validator && !validator(value)) {\r\n warn('Invalid prop: custom validator check failed for prop \"' + name + '\".');\r\n }\r\n}\r\nconst isSimpleType = /*#__PURE__*/ makeMap('String,Number,Boolean,Function,Symbol,BigInt');\r\n/**\r\n * dev only\r\n */\r\nfunction assertType(value, type) {\r\n let valid;\r\n const expectedType = getType(type);\r\n if (isSimpleType(expectedType)) {\r\n const t = typeof value;\r\n valid = t === expectedType.toLowerCase();\r\n // for primitive wrapper objects\r\n if (!valid && t === 'object') {\r\n valid = value instanceof type;\r\n }\r\n }\r\n else if (expectedType === 'Object') {\r\n valid = isObject$1(value);\r\n }\r\n else if (expectedType === 'Array') {\r\n valid = isArray(value);\r\n }\r\n else {\r\n valid = value instanceof type;\r\n }\r\n return {\r\n valid,\r\n expectedType\r\n };\r\n}\r\n/**\r\n * dev only\r\n */\r\nfunction getInvalidTypeMessage(name, value, expectedTypes) {\r\n let message = `Invalid prop: type check failed for prop \"${name}\".` +\r\n ` Expected ${expectedTypes.map(capitalize).join(', ')}`;\r\n const expectedType = expectedTypes[0];\r\n const receivedType = toRawType(value);\r\n const expectedValue = styleValue(value, expectedType);\r\n const receivedValue = styleValue(value, receivedType);\r\n // check if we need to specify expected value\r\n if (expectedTypes.length === 1 &&\r\n isExplicable(expectedType) &&\r\n !isBoolean(expectedType, receivedType)) {\r\n message += ` with value ${expectedValue}`;\r\n }\r\n message += `, got ${receivedType} `;\r\n // check if we need to specify received value\r\n if (isExplicable(receivedType)) {\r\n message += `with value ${receivedValue}.`;\r\n }\r\n return message;\r\n}\r\n/**\r\n * dev only\r\n */\r\nfunction styleValue(value, type) {\r\n if (type === 'String') {\r\n return `\"${value}\"`;\r\n }\r\n else if (type === 'Number') {\r\n return `${Number(value)}`;\r\n }\r\n else {\r\n return `${value}`;\r\n }\r\n}\r\n/**\r\n * dev only\r\n */\r\nfunction isExplicable(type) {\r\n const explicitTypes = ['string', 'number', 'boolean'];\r\n return explicitTypes.some(elem => type.toLowerCase() === elem);\r\n}\r\n/**\r\n * dev only\r\n */\r\nfunction isBoolean(...args) {\r\n return args.some(elem => elem.toLowerCase() === 'boolean');\r\n}\n\nconst isInternalKey = (key) => key[0] === '_' || key === '$stable';\r\nconst normalizeSlotValue = (value) => isArray(value)\r\n ? value.map(normalizeVNode)\r\n : [normalizeVNode(value)];\r\nconst normalizeSlot = (key, rawSlot, ctx) => {\r\n const normalized = withCtx((props) => {\r\n if ((process.env.NODE_ENV !== 'production') && currentInstance) {\r\n warn(`Slot \"${key}\" invoked outside of the render function: ` +\r\n `this will not track dependencies used in the slot. ` +\r\n `Invoke the slot function inside the render function instead.`);\r\n }\r\n return normalizeSlotValue(rawSlot(props));\r\n }, ctx);\r\n normalized._c = false;\r\n return normalized;\r\n};\r\nconst normalizeObjectSlots = (rawSlots, slots, instance) => {\r\n const ctx = rawSlots._ctx;\r\n for (const key in rawSlots) {\r\n if (isInternalKey(key))\r\n continue;\r\n const value = rawSlots[key];\r\n if (isFunction$1(value)) {\r\n slots[key] = normalizeSlot(key, value, ctx);\r\n }\r\n else if (value != null) {\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n !(false )) {\r\n warn(`Non-function value encountered for slot \"${key}\". ` +\r\n `Prefer function slots for better performance.`);\r\n }\r\n const normalized = normalizeSlotValue(value);\r\n slots[key] = () => normalized;\r\n }\r\n }\r\n};\r\nconst normalizeVNodeSlots = (instance, children) => {\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n !isKeepAlive(instance.vnode) &&\r\n !(false )) {\r\n warn(`Non-function value encountered for default slot. ` +\r\n `Prefer function slots for better performance.`);\r\n }\r\n const normalized = normalizeSlotValue(children);\r\n instance.slots.default = () => normalized;\r\n};\r\nconst initSlots = (instance, children) => {\r\n if (instance.vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) {\r\n const type = children._;\r\n if (type) {\r\n // users can get the shallow readonly version of the slots object through `this.$slots`,\r\n // we should avoid the proxy object polluting the slots of the internal instance\r\n instance.slots = toRaw(children);\r\n // make compiler marker non-enumerable\r\n def(children, '_', type);\r\n }\r\n else {\r\n normalizeObjectSlots(children, (instance.slots = {}));\r\n }\r\n }\r\n else {\r\n instance.slots = {};\r\n if (children) {\r\n normalizeVNodeSlots(instance, children);\r\n }\r\n }\r\n def(instance.slots, InternalObjectKey, 1);\r\n};\r\nconst updateSlots = (instance, children, optimized) => {\r\n const { vnode, slots } = instance;\r\n let needDeletionCheck = true;\r\n let deletionComparisonTarget = EMPTY_OBJ;\r\n if (vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) {\r\n const type = children._;\r\n if (type) {\r\n // compiled slots.\r\n if ((process.env.NODE_ENV !== 'production') && isHmrUpdating) {\r\n // Parent was HMR updated so slot content may have changed.\r\n // force update slots and mark instance for hmr as well\r\n extend(slots, children);\r\n }\r\n else if (optimized && type === 1 /* STABLE */) {\r\n // compiled AND stable.\r\n // no need to update, and skip stale slots removal.\r\n needDeletionCheck = false;\r\n }\r\n else {\r\n // compiled but dynamic (v-if/v-for on slots) - update slots, but skip\r\n // normalization.\r\n extend(slots, children);\r\n // #2893\r\n // when rendering the optimized slots by manually written render function,\r\n // we need to delete the `slots._` flag if necessary to make subsequent updates reliable,\r\n // i.e. let the `renderSlot` create the bailed Fragment\r\n if (!optimized && type === 1 /* STABLE */) {\r\n delete slots._;\r\n }\r\n }\r\n }\r\n else {\r\n needDeletionCheck = !children.$stable;\r\n normalizeObjectSlots(children, slots);\r\n }\r\n deletionComparisonTarget = children;\r\n }\r\n else if (children) {\r\n // non slot object children (direct value) passed to a component\r\n normalizeVNodeSlots(instance, children);\r\n deletionComparisonTarget = { default: 1 };\r\n }\r\n // delete stale slots\r\n if (needDeletionCheck) {\r\n for (const key in slots) {\r\n if (!isInternalKey(key) && !(key in deletionComparisonTarget)) {\r\n delete slots[key];\r\n }\r\n }\r\n }\r\n};\n\n/**\r\nRuntime helper for applying directives to a vnode. Example usage:\r\n\nconst comp = resolveComponent('comp')\r\nconst foo = resolveDirective('foo')\r\nconst bar = resolveDirective('bar')\r\n\nreturn withDirectives(h(comp), [\r\n [foo, this.x],\r\n [bar, this.y]\r\n])\r\n*/\r\nconst isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text');\r\nfunction validateDirectiveName(name) {\r\n if (isBuiltInDirective(name)) {\r\n warn('Do not use built-in directive ids as custom directive id: ' + name);\r\n }\r\n}\r\n/**\r\n * Adds directives to a VNode.\r\n */\r\nfunction withDirectives(vnode, directives) {\r\n const internalInstance = currentRenderingInstance;\r\n if (internalInstance === null) {\r\n (process.env.NODE_ENV !== 'production') && warn(`withDirectives can only be used inside render functions.`);\r\n return vnode;\r\n }\r\n const instance = internalInstance.proxy;\r\n const bindings = vnode.dirs || (vnode.dirs = []);\r\n for (let i = 0; i < directives.length; i++) {\r\n let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];\r\n if (isFunction$1(dir)) {\r\n dir = {\r\n mounted: dir,\r\n updated: dir\r\n };\r\n }\r\n if (dir.deep) {\r\n traverse(value);\r\n }\r\n bindings.push({\r\n dir,\r\n instance,\r\n value,\r\n oldValue: void 0,\r\n arg,\r\n modifiers\r\n });\r\n }\r\n return vnode;\r\n}\r\nfunction invokeDirectiveHook(vnode, prevVNode, instance, name) {\r\n const bindings = vnode.dirs;\r\n const oldBindings = prevVNode && prevVNode.dirs;\r\n for (let i = 0; i < bindings.length; i++) {\r\n const binding = bindings[i];\r\n if (oldBindings) {\r\n binding.oldValue = oldBindings[i].value;\r\n }\r\n let hook = binding.dir[name];\r\n if (hook) {\r\n // disable tracking inside all lifecycle hooks\r\n // since they can potentially be called inside effects.\r\n pauseTracking();\r\n callWithAsyncErrorHandling(hook, instance, 8 /* DIRECTIVE_HOOK */, [\r\n vnode.el,\r\n binding,\r\n vnode,\r\n prevVNode\r\n ]);\r\n resetTracking();\r\n }\r\n }\r\n}\n\nfunction createAppContext() {\r\n return {\r\n app: null,\r\n config: {\r\n isNativeTag: NO,\r\n performance: false,\r\n globalProperties: {},\r\n optionMergeStrategies: {},\r\n errorHandler: undefined,\r\n warnHandler: undefined,\r\n compilerOptions: {}\r\n },\r\n mixins: [],\r\n components: {},\r\n directives: {},\r\n provides: Object.create(null),\r\n optionsCache: new WeakMap(),\r\n propsCache: new WeakMap(),\r\n emitsCache: new WeakMap()\r\n };\r\n}\r\nlet uid = 0;\r\nfunction createAppAPI(render, hydrate) {\r\n return function createApp(rootComponent, rootProps = null) {\r\n if (rootProps != null && !isObject$1(rootProps)) {\r\n (process.env.NODE_ENV !== 'production') && warn(`root props passed to app.mount() must be an object.`);\r\n rootProps = null;\r\n }\r\n const context = createAppContext();\r\n const installedPlugins = new Set();\r\n let isMounted = false;\r\n const app = (context.app = {\r\n _uid: uid++,\r\n _component: rootComponent,\r\n _props: rootProps,\r\n _container: null,\r\n _context: context,\r\n _instance: null,\r\n version,\r\n get config() {\r\n return context.config;\r\n },\r\n set config(v) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`app.config cannot be replaced. Modify individual options instead.`);\r\n }\r\n },\r\n use(plugin, ...options) {\r\n if (installedPlugins.has(plugin)) {\r\n (process.env.NODE_ENV !== 'production') && warn(`Plugin has already been applied to target app.`);\r\n }\r\n else if (plugin && isFunction$1(plugin.install)) {\r\n installedPlugins.add(plugin);\r\n plugin.install(app, ...options);\r\n }\r\n else if (isFunction$1(plugin)) {\r\n installedPlugins.add(plugin);\r\n plugin(app, ...options);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`A plugin must either be a function or an object with an \"install\" ` +\r\n `function.`);\r\n }\r\n return app;\r\n },\r\n mixin(mixin) {\r\n if (__VUE_OPTIONS_API__) {\r\n if (!context.mixins.includes(mixin)) {\r\n context.mixins.push(mixin);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn('Mixin has already been applied to target app' +\r\n (mixin.name ? `: ${mixin.name}` : ''));\r\n }\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn('Mixins are only available in builds supporting Options API');\r\n }\r\n return app;\r\n },\r\n component(name, component) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n validateComponentName(name, context.config);\r\n }\r\n if (!component) {\r\n return context.components[name];\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && context.components[name]) {\r\n warn(`Component \"${name}\" has already been registered in target app.`);\r\n }\r\n context.components[name] = component;\r\n return app;\r\n },\r\n directive(name, directive) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n validateDirectiveName(name);\r\n }\r\n if (!directive) {\r\n return context.directives[name];\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && context.directives[name]) {\r\n warn(`Directive \"${name}\" has already been registered in target app.`);\r\n }\r\n context.directives[name] = directive;\r\n return app;\r\n },\r\n mount(rootContainer, isHydrate, isSVG) {\r\n if (!isMounted) {\r\n const vnode = createVNode(rootComponent, rootProps);\r\n // store app context on the root VNode.\r\n // this will be set on the root instance on initial mount.\r\n vnode.appContext = context;\r\n // HMR root reload\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n context.reload = () => {\r\n render(cloneVNode(vnode), rootContainer, isSVG);\r\n };\r\n }\r\n if (isHydrate && hydrate) {\r\n hydrate(vnode, rootContainer);\r\n }\r\n else {\r\n render(vnode, rootContainer, isSVG);\r\n }\r\n isMounted = true;\r\n app._container = rootContainer;\r\n rootContainer.__vue_app__ = app;\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n app._instance = vnode.component;\r\n devtoolsInitApp(app, version);\r\n }\r\n return vnode.component.proxy;\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`App has already been mounted.\\n` +\r\n `If you want to remount the same app, move your app creation logic ` +\r\n `into a factory function and create fresh app instances for each ` +\r\n `mount - e.g. \\`const createMyApp = () => createApp(App)\\``);\r\n }\r\n },\r\n unmount() {\r\n if (isMounted) {\r\n render(null, app._container);\r\n if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {\r\n app._instance = null;\r\n devtoolsUnmountApp(app);\r\n }\r\n delete app._container.__vue_app__;\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn(`Cannot unmount an app that is not mounted.`);\r\n }\r\n },\r\n provide(key, value) {\r\n if ((process.env.NODE_ENV !== 'production') && key in context.provides) {\r\n warn(`App already provides property with key \"${String(key)}\". ` +\r\n `It will be overwritten with the new value.`);\r\n }\r\n // TypeScript doesn't allow symbols as index type\r\n // https://github.com/Microsoft/TypeScript/issues/24587\r\n context.provides[key] = value;\r\n return app;\r\n }\r\n });\r\n return app;\r\n };\r\n}\n\nlet hasMismatch = false;\r\nconst isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== 'foreignObject';\r\nconst isComment = (node) => node.nodeType === 8 /* COMMENT */;\r\n// Note: hydration is DOM-specific\r\n// But we have to place it in core due to tight coupling with core - splitting\r\n// it out creates a ton of unnecessary complexity.\r\n// Hydration also depends on some renderer internal logic which needs to be\r\n// passed in via arguments.\r\nfunction createHydrationFunctions(rendererInternals) {\r\n const { mt: mountComponent, p: patch, o: { patchProp, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals;\r\n const hydrate = (vnode, container) => {\r\n if (!container.hasChildNodes()) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(`Attempting to hydrate existing markup but container is empty. ` +\r\n `Performing full mount instead.`);\r\n patch(null, vnode, container);\r\n flushPostFlushCbs();\r\n return;\r\n }\r\n hasMismatch = false;\r\n hydrateNode(container.firstChild, vnode, null, null, null);\r\n flushPostFlushCbs();\r\n if (hasMismatch && !false) {\r\n // this error should show up in production\r\n console.error(`Hydration completed but contains mismatches.`);\r\n }\r\n };\r\n const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {\r\n const isFragmentStart = isComment(node) && node.data === '[';\r\n const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);\r\n const { type, ref, shapeFlag } = vnode;\r\n const domType = node.nodeType;\r\n vnode.el = node;\r\n let nextNode = null;\r\n switch (type) {\r\n case Text:\r\n if (domType !== 3 /* TEXT */) {\r\n nextNode = onMismatch();\r\n }\r\n else {\r\n if (node.data !== vnode.children) {\r\n hasMismatch = true;\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(`Hydration text mismatch:` +\r\n `\\n- Client: ${JSON.stringify(node.data)}` +\r\n `\\n- Server: ${JSON.stringify(vnode.children)}`);\r\n node.data = vnode.children;\r\n }\r\n nextNode = nextSibling(node);\r\n }\r\n break;\r\n case Comment$1:\r\n if (domType !== 8 /* COMMENT */ || isFragmentStart) {\r\n nextNode = onMismatch();\r\n }\r\n else {\r\n nextNode = nextSibling(node);\r\n }\r\n break;\r\n case Static:\r\n if (domType !== 1 /* ELEMENT */) {\r\n nextNode = onMismatch();\r\n }\r\n else {\r\n // determine anchor, adopt content\r\n nextNode = node;\r\n // if the static vnode has its content stripped during build,\r\n // adopt it from the server-rendered HTML.\r\n const needToAdoptContent = !vnode.children.length;\r\n for (let i = 0; i < vnode.staticCount; i++) {\r\n if (needToAdoptContent)\r\n vnode.children += nextNode.outerHTML;\r\n if (i === vnode.staticCount - 1) {\r\n vnode.anchor = nextNode;\r\n }\r\n nextNode = nextSibling(nextNode);\r\n }\r\n return nextNode;\r\n }\r\n break;\r\n case Fragment:\r\n if (!isFragmentStart) {\r\n nextNode = onMismatch();\r\n }\r\n else {\r\n nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);\r\n }\r\n break;\r\n default:\r\n if (shapeFlag & 1 /* ELEMENT */) {\r\n if (domType !== 1 /* ELEMENT */ ||\r\n vnode.type.toLowerCase() !==\r\n node.tagName.toLowerCase()) {\r\n nextNode = onMismatch();\r\n }\r\n else {\r\n nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);\r\n }\r\n }\r\n else if (shapeFlag & 6 /* COMPONENT */) {\r\n // when setting up the render effect, if the initial vnode already\r\n // has .el set, the component will perform hydration instead of mount\r\n // on its sub-tree.\r\n vnode.slotScopeIds = slotScopeIds;\r\n const container = parentNode(node);\r\n mountComponent(vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), optimized);\r\n // component may be async, so in the case of fragments we cannot rely\r\n // on component's rendered output to determine the end of the fragment\r\n // instead, we do a lookahead to find the end anchor node.\r\n nextNode = isFragmentStart\r\n ? locateClosingAsyncAnchor(node)\r\n : nextSibling(node);\r\n // #3787\r\n // if component is async, it may get moved / unmounted before its\r\n // inner component is loaded, so we need to give it a placeholder\r\n // vnode that matches its adopted DOM.\r\n if (isAsyncWrapper(vnode)) {\r\n let subTree;\r\n if (isFragmentStart) {\r\n subTree = createVNode(Fragment);\r\n subTree.anchor = nextNode\r\n ? nextNode.previousSibling\r\n : container.lastChild;\r\n }\r\n else {\r\n subTree =\r\n node.nodeType === 3 ? createTextVNode('') : createVNode('div');\r\n }\r\n subTree.el = node;\r\n vnode.component.subTree = subTree;\r\n }\r\n }\r\n else if (shapeFlag & 64 /* TELEPORT */) {\r\n if (domType !== 8 /* COMMENT */) {\r\n nextNode = onMismatch();\r\n }\r\n else {\r\n nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);\r\n }\r\n }\r\n else if (shapeFlag & 128 /* SUSPENSE */) {\r\n nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);\r\n }\r\n else if ((process.env.NODE_ENV !== 'production')) {\r\n warn('Invalid HostVNode type:', type, `(${typeof type})`);\r\n }\r\n }\r\n if (ref != null) {\r\n setRef(ref, null, parentSuspense, vnode);\r\n }\r\n return nextNode;\r\n };\r\n const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {\r\n optimized = optimized || !!vnode.dynamicChildren;\r\n const { type, props, patchFlag, shapeFlag, dirs } = vnode;\r\n // #4006 for form elements with non-string v-model value bindings\r\n // e.g.